@qitqode/qitqode-android-arm64 0.1.25 → 0.1.27

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 (420) hide show
  1. package/bundle/chunk-02y04bsz.js +2 -0
  2. package/bundle/{chunk-23f6rc7a.js → chunk-04tw0r4s.js} +1 -1
  3. package/bundle/chunk-07ws99b1.js +2 -0
  4. package/bundle/chunk-09c4ngag.js +2 -0
  5. package/bundle/{chunk-ym4ydwrz.js → chunk-09kba1hg.js} +2 -2
  6. package/bundle/{chunk-pfn1db1m.js → chunk-0a0vat1h.js} +2 -2
  7. package/bundle/{chunk-pepn5jp4.js → chunk-0eqwm9a8.js} +2 -2
  8. package/bundle/chunk-0jgst767.js +2 -0
  9. package/bundle/chunk-0psrr9vp.js +2 -0
  10. package/bundle/chunk-0srrmwqs.js +2 -0
  11. package/bundle/{chunk-3xna2rk5.js → chunk-0x3sbyny.js} +2 -2
  12. package/bundle/chunk-0zkejr6k.js +2 -0
  13. package/bundle/{chunk-xw283h2r.js → chunk-12bssxd4.js} +2 -2
  14. package/bundle/chunk-14n6rvh2.js +2 -0
  15. package/bundle/{chunk-meaybtcc.js → chunk-17psxhve.js} +3 -3
  16. package/bundle/{chunk-jgs6ngte.js → chunk-1bhvt33f.js} +1 -1
  17. package/bundle/{chunk-78h5dd4t.js → chunk-1dwcga8g.js} +2 -2
  18. package/bundle/{chunk-5mdsrv0a.js → chunk-1fbeendk.js} +1 -1
  19. package/bundle/chunk-1fja3j80.js +2 -0
  20. package/bundle/chunk-1j73cnvz.js +2 -0
  21. package/bundle/{chunk-fgw420gb.js → chunk-1qshjfzm.js} +1 -1
  22. package/bundle/{chunk-bpnpxdyv.js → chunk-1rp1cvmc.js} +2 -2
  23. package/bundle/{chunk-b50t4jc5.js → chunk-1sgby720.js} +1 -1
  24. package/bundle/{chunk-3tnek022.js → chunk-1t9jne14.js} +1 -1
  25. package/bundle/chunk-1yddn03z.js +2 -0
  26. package/bundle/{chunk-3fy57jcy.js → chunk-26nfphsg.js} +1 -1
  27. package/bundle/{chunk-754varfr.js → chunk-27yxgy03.js} +2 -2
  28. package/bundle/{chunk-ydsen7w0.js → chunk-2ahqhh4z.js} +1 -1
  29. package/bundle/{chunk-ey4ktbyb.js → chunk-2bn4b42t.js} +1 -1
  30. package/bundle/{chunk-0hsb4knd.js → chunk-2dzk5txw.js} +1 -1
  31. package/bundle/{chunk-vq6bh2z9.js → chunk-2jmxt3fb.js} +1 -1
  32. package/bundle/{chunk-xjrt0dta.js → chunk-2km50rd3.js} +1 -1
  33. package/bundle/{chunk-1e8mja6v.js → chunk-2q96x1t5.js} +1 -1
  34. package/bundle/{chunk-7rjf9b8n.js → chunk-2rs39vj2.js} +2 -2
  35. package/bundle/{chunk-5zw7knvd.js → chunk-2tnarng3.js} +1 -1
  36. package/bundle/{chunk-4wgb80jm.js → chunk-2vepzgek.js} +2 -2
  37. package/bundle/{chunk-4pssh5d3.js → chunk-2wcv3sq5.js} +2 -2
  38. package/bundle/{chunk-6rrmjrm2.js → chunk-371r2111.js} +1 -1
  39. package/bundle/{chunk-kb14wxcs.js → chunk-37n34pzd.js} +2 -2
  40. package/bundle/chunk-38g8yzw0.js +2 -0
  41. package/bundle/chunk-3bkd0ar3.js +2 -0
  42. package/bundle/{chunk-c27rpvdz.js → chunk-3bmzjznz.js} +1 -1
  43. package/bundle/chunk-3c7d3dqt.js +3 -0
  44. package/bundle/{chunk-xy4t5qf8.js → chunk-3nwve06r.js} +1 -1
  45. package/bundle/{chunk-veev25yg.js → chunk-3nyqh1d6.js} +1 -1
  46. package/bundle/{chunk-grkkzrg1.js → chunk-463f9wre.js} +2 -2
  47. package/bundle/{chunk-vqq5vmh1.js → chunk-47b084yv.js} +204 -202
  48. package/bundle/{chunk-6s2f5sv4.js → chunk-48fvrggx.js} +1 -1
  49. package/bundle/chunk-4amgp4yd.js +3 -0
  50. package/bundle/chunk-4k7kbhps.js +2 -0
  51. package/bundle/{chunk-e075v4e9.js → chunk-4qqkqrn9.js} +2 -2
  52. package/bundle/chunk-4sz3jbc5.js +2 -0
  53. package/bundle/{chunk-zny2qaqa.js → chunk-4tbwha3m.js} +2 -2
  54. package/bundle/{chunk-dgggvses.js → chunk-4ypcf4tg.js} +1 -1
  55. package/bundle/chunk-4z4p492c.js +3 -0
  56. package/bundle/chunk-55b9699f.js +2 -0
  57. package/bundle/{chunk-1ce5jpdc.js → chunk-5a5t01ka.js} +1 -1
  58. package/bundle/{chunk-1n1dh6zj.js → chunk-5fgx6fa4.js} +1 -1
  59. package/bundle/{chunk-2k2axg73.js → chunk-5fz8tph5.js} +1 -1
  60. package/bundle/{chunk-99p5m2f1.js → chunk-5qam3c8r.js} +1 -1
  61. package/bundle/{chunk-0jaxgrq0.js → chunk-61c62e5s.js} +2 -2
  62. package/bundle/chunk-6d9wsjxm.js +2 -0
  63. package/bundle/{chunk-mybpgrjj.js → chunk-6fp8a9ek.js} +2 -2
  64. package/bundle/chunk-6gz9cthq.js +2 -0
  65. package/bundle/{chunk-692vn48b.js → chunk-6hv59ere.js} +1 -1
  66. package/bundle/{chunk-av290sja.js → chunk-6nbzdb0r.js} +1 -1
  67. package/bundle/{chunk-8ahpk8td.js → chunk-6p7yg5sr.js} +1 -1
  68. package/bundle/chunk-6q87abbr.js +2 -0
  69. package/bundle/{chunk-3nhth7c2.js → chunk-6qy1ghrx.js} +1 -1
  70. package/bundle/chunk-730a2d1k.js +2 -0
  71. package/bundle/chunk-7bd0x9vf.js +2 -0
  72. package/bundle/chunk-7czkntef.js +2 -0
  73. package/bundle/chunk-7ex57nyh.js +2 -0
  74. package/bundle/chunk-7gpczxbh.js +2 -0
  75. package/bundle/chunk-7j0bgeh2.js +2 -0
  76. package/bundle/{chunk-hvpe07pt.js → chunk-7jbz3dgt.js} +1 -1
  77. package/bundle/{chunk-qe0sfafy.js → chunk-7ppd2phw.js} +2 -2
  78. package/bundle/chunk-7py443fe.js +2 -0
  79. package/bundle/{chunk-8jcx4tep.js → chunk-7yrhe3xq.js} +2 -2
  80. package/bundle/{chunk-8za87zkr.js → chunk-89q1y7tc.js} +1 -1
  81. package/bundle/{chunk-vfj5nwab.js → chunk-89v6dgpp.js} +2 -2
  82. package/bundle/chunk-8cdm8gh2.js +2 -0
  83. package/bundle/chunk-90q5sae0.js +2 -0
  84. package/bundle/chunk-90zd5rss.js +5 -0
  85. package/bundle/chunk-9grvepmd.js +2 -0
  86. package/bundle/chunk-9hrh15p2.js +2 -0
  87. package/bundle/{chunk-xqa6qkx2.js → chunk-9j1qqdr2.js} +1 -1
  88. package/bundle/{chunk-p80dc6kt.js → chunk-9t84mh6t.js} +2 -2
  89. package/bundle/{chunk-9dpn4792.js → chunk-a1p2f16h.js} +2 -2
  90. package/bundle/{chunk-c1ypbbka.js → chunk-a1pw9r6f.js} +2 -2
  91. package/bundle/chunk-a2qz9m10.js +2 -0
  92. package/bundle/{chunk-gvtw9c44.js → chunk-ab6cabxh.js} +1 -1
  93. package/bundle/{chunk-rjcptzem.js → chunk-ad46r434.js} +2 -2
  94. package/bundle/{chunk-9r6bvkp4.js → chunk-ak5ngp50.js} +2 -2
  95. package/bundle/{chunk-xyn3xxfs.js → chunk-apbgb4h0.js} +1 -1
  96. package/bundle/chunk-av6ezvxm.js +2 -0
  97. package/bundle/{chunk-0rmmg3g4.js → chunk-aztre27e.js} +1 -1
  98. package/bundle/{chunk-ddxjc803.js → chunk-b0syck9r.js} +2 -2
  99. package/bundle/{chunk-8gy99gfb.js → chunk-b2z0kjss.js} +2 -2
  100. package/bundle/{chunk-wrgg270f.js → chunk-b3dqcbsc.js} +1 -1
  101. package/bundle/{chunk-aw0q4y3s.js → chunk-b75gpv0q.js} +1 -1
  102. package/bundle/chunk-b7mg883n.js +3 -0
  103. package/bundle/{chunk-zh808d4t.js → chunk-b8tw709r.js} +1 -1
  104. package/bundle/{chunk-pvee151a.js → chunk-b9za12y1.js} +1 -1
  105. package/bundle/{chunk-cjxp72dv.js → chunk-baet4zev.js} +2 -2
  106. package/bundle/{chunk-jhq5bvhs.js → chunk-be216spx.js} +2 -2
  107. package/bundle/chunk-beksar7w.js +2 -0
  108. package/bundle/chunk-bg66rqrx.js +2 -0
  109. package/bundle/{chunk-h19ty95q.js → chunk-brpx707p.js} +1 -1
  110. package/bundle/{chunk-ykfq8bem.js → chunk-bss414qz.js} +1 -1
  111. package/bundle/{chunk-3dvyfmgc.js → chunk-btneef3z.js} +1 -1
  112. package/bundle/{chunk-7v4fzkbb.js → chunk-btz9jvec.js} +1 -1
  113. package/bundle/{chunk-bsqcfqya.js → chunk-bvkq0a5q.js} +1 -1
  114. package/bundle/{chunk-mkdyknbz.js → chunk-c01z3cvg.js} +2 -2
  115. package/bundle/{chunk-dd11kryy.js → chunk-c0796v8j.js} +2 -2
  116. package/bundle/{chunk-qpm5afdz.js → chunk-c5e6sk9c.js} +1 -1
  117. package/bundle/chunk-c7yy1km8.js +2 -0
  118. package/bundle/{chunk-453wpzg6.js → chunk-c8k32724.js} +1 -1
  119. package/bundle/{chunk-mbh1pdv9.js → chunk-cafzcmrg.js} +2 -2
  120. package/bundle/{chunk-d1bsxz2t.js → chunk-cdhmc0t0.js} +1 -1
  121. package/bundle/{chunk-t0amhhsk.js → chunk-chmrvbbj.js} +1 -1
  122. package/bundle/{chunk-jqzejny3.js → chunk-cpmmvwgw.js} +1 -1
  123. package/bundle/{chunk-zbdbsagd.js → chunk-crx18k6g.js} +2 -2
  124. package/bundle/{chunk-ybn8tb09.js → chunk-ct48575c.js} +1 -1
  125. package/bundle/chunk-ct6dv8st.js +2 -0
  126. package/bundle/{chunk-4wyjapes.js → chunk-cvdxgsq1.js} +2 -2
  127. package/bundle/{chunk-qdnxv55k.js → chunk-cvwa142e.js} +1 -1
  128. package/bundle/chunk-cy9s1ma5.js +2 -0
  129. package/bundle/{chunk-qnqqrvvs.js → chunk-d5bxan80.js} +2 -2
  130. package/bundle/{chunk-hmfefq0d.js → chunk-d6r4xwtg.js} +4 -4
  131. package/bundle/{chunk-g3s2z5xa.js → chunk-deae0y1j.js} +1 -1
  132. package/bundle/{chunk-a27yjp71.js → chunk-dfnv7vkn.js} +1 -1
  133. package/bundle/{chunk-4kb2efq3.js → chunk-dhjp0zx2.js} +1 -1
  134. package/bundle/{chunk-se79ke63.js → chunk-dq9kpj4a.js} +2 -2
  135. package/bundle/{chunk-zss93r48.js → chunk-dqed63ek.js} +1 -1
  136. package/bundle/{chunk-nqefvn28.js → chunk-drs1gv2b.js} +1 -1
  137. package/bundle/{chunk-t2tsyazc.js → chunk-ds69qc8b.js} +1 -1
  138. package/bundle/chunk-dtv1vp0d.js +2 -0
  139. package/bundle/chunk-dvk2wwjj.js +2 -0
  140. package/bundle/{chunk-d5b0bqbr.js → chunk-dzxzcb2e.js} +1 -1
  141. package/bundle/chunk-e0jy9qxd.js +2 -0
  142. package/bundle/{chunk-nhx2xp2x.js → chunk-eb9mytjq.js} +1 -1
  143. package/bundle/{chunk-gsz1wqy6.js → chunk-ecn8gbtz.js} +1 -1
  144. package/bundle/chunk-erg0ske8.js +2 -0
  145. package/bundle/chunk-ew51rwdp.js +9 -0
  146. package/bundle/{chunk-2rxt1s22.js → chunk-exh6cg1r.js} +2 -2
  147. package/bundle/{chunk-tdmaxc6n.js → chunk-f45tp3e3.js} +1 -1
  148. package/bundle/chunk-f72pppr7.js +2 -0
  149. package/bundle/{chunk-k8bp3jjv.js → chunk-fddsgvjy.js} +1 -1
  150. package/bundle/{chunk-4w5t515p.js → chunk-fff3151r.js} +1 -1
  151. package/bundle/{chunk-pk0tytcm.js → chunk-fkgv2hqd.js} +1 -1
  152. package/bundle/{chunk-f84cd0a1.js → chunk-fnbpap62.js} +2 -2
  153. package/bundle/{chunk-hwbxehhf.js → chunk-g1dwbvkg.js} +1 -1
  154. package/bundle/{chunk-dk3z4k46.js → chunk-g3dhsmbt.js} +3 -3
  155. package/bundle/{chunk-n8dcmjph.js → chunk-g7rjtehn.js} +1 -1
  156. package/bundle/chunk-gbyy8sh5.js +2 -0
  157. package/bundle/{chunk-z015twaq.js → chunk-gf0pdgjs.js} +2 -2
  158. package/bundle/{chunk-9f6pqped.js → chunk-ggqst87g.js} +1 -1
  159. package/bundle/chunk-gk34kh8p.js +2 -0
  160. package/bundle/{chunk-j5b5h08g.js → chunk-gm85xefs.js} +1 -1
  161. package/bundle/chunk-gn50xqbd.js +2 -0
  162. package/bundle/{chunk-wmrq9qqf.js → chunk-gsez13bg.js} +1 -1
  163. package/bundle/{chunk-3f054f69.js → chunk-gsvdt4kq.js} +7 -7
  164. package/bundle/{chunk-3jhx8g5d.js → chunk-h0rpmne5.js} +1 -1
  165. package/bundle/chunk-h7s2w1e2.js +2 -0
  166. package/bundle/chunk-h7yya9pv.js +7610 -0
  167. package/bundle/{chunk-5mp82az0.js → chunk-h9pvnp5c.js} +1 -1
  168. package/bundle/chunk-hgxdg1y5.js +2 -0
  169. package/bundle/{chunk-t07a5431.js → chunk-hj5y7fvk.js} +1 -1
  170. package/bundle/chunk-hmv2cdnz.js +2 -0
  171. package/bundle/chunk-ht81ensf.js +2 -0
  172. package/bundle/chunk-j59ktwny.js +2 -0
  173. package/bundle/{chunk-08ba67f4.js → chunk-j5kb0y1m.js} +1 -1
  174. package/bundle/{chunk-rgecc41f.js → chunk-j5y10dn6.js} +2 -2
  175. package/bundle/{chunk-jv98gw88.js → chunk-j6emx6jn.js} +2 -2
  176. package/bundle/{chunk-x36jhtex.js → chunk-j8efst22.js} +1 -1
  177. package/bundle/{chunk-mczw8e3s.js → chunk-j94bdaav.js} +2 -2
  178. package/bundle/{chunk-g73drh98.js → chunk-j9pcnkkq.js} +3 -3
  179. package/bundle/{chunk-nf8gkxbk.js → chunk-jg7s9rqz.js} +2 -2
  180. package/bundle/chunk-jh3nw7fd.js +2 -0
  181. package/bundle/chunk-jh6yvzee.js +2 -0
  182. package/bundle/{chunk-9jncnqbj.js → chunk-jje0srjq.js} +2 -2
  183. package/bundle/{chunk-3e8p4a3y.js → chunk-jm1ptn8n.js} +1 -1
  184. package/bundle/chunk-jmz2mq3t.js +2 -0
  185. package/bundle/{chunk-6ddp36ar.js → chunk-jnabd9gn.js} +1 -1
  186. package/bundle/chunk-k309zez0.js +3 -0
  187. package/bundle/chunk-k3fn3yed.js +2 -0
  188. package/bundle/{chunk-0x7dbj5e.js → chunk-k7gq9bra.js} +1 -1
  189. package/bundle/{chunk-8cty50g7.js → chunk-k9b1jcqw.js} +1 -1
  190. package/bundle/{chunk-2s28fdbp.js → chunk-kavhpdvb.js} +1 -1
  191. package/bundle/{chunk-qm9ezq93.js → chunk-kdcnder5.js} +1 -1
  192. package/bundle/{chunk-b2xya6pq.js → chunk-kfsb2stm.js} +1 -1
  193. package/bundle/{chunk-z3zx6g09.js → chunk-knpt9n8f.js} +1 -1
  194. package/bundle/chunk-kpw6nghv.js +2 -0
  195. package/bundle/{chunk-4stgw33j.js → chunk-kqn9h2gk.js} +1 -1
  196. package/bundle/{chunk-gw0j8hr9.js → chunk-ksyh6h3a.js} +2 -2
  197. package/bundle/{chunk-jtrcnpm7.js → chunk-m02zt1a3.js} +2 -2
  198. package/bundle/{chunk-p883sz67.js → chunk-m1h5a4vg.js} +1 -1
  199. package/bundle/{chunk-m2ang7yb.js → chunk-m2ekhbdp.js} +1 -1
  200. package/bundle/{chunk-3j7skhxg.js → chunk-m2x9xhha.js} +2 -2
  201. package/bundle/chunk-m5ghbt5y.js +2 -0
  202. package/bundle/{chunk-9va5eh9s.js → chunk-m612agnk.js} +1 -1
  203. package/bundle/{chunk-42t25nkb.js → chunk-m67tcnk4.js} +1 -1
  204. package/bundle/{chunk-2sy1wx99.js → chunk-m8yv4sd2.js} +1 -1
  205. package/bundle/{chunk-x6b99nt3.js → chunk-mdck9s88.js} +1 -1
  206. package/bundle/{chunk-psveqqv2.js → chunk-mgk9sh16.js} +1 -1
  207. package/bundle/{chunk-7d6jhzng.js → chunk-mk6cddvd.js} +1 -1
  208. package/bundle/chunk-mn41f9qv.js +2 -0
  209. package/bundle/chunk-mqjf9sbm.js +2 -0
  210. package/bundle/{chunk-7ws3gdjq.js → chunk-msegx0t7.js} +1 -1
  211. package/bundle/{chunk-evmfntm3.js → chunk-mskwkcgj.js} +1 -1
  212. package/bundle/chunk-n5gwrrbb.js +2 -0
  213. package/bundle/{chunk-dee1a3yk.js → chunk-n8h6x2en.js} +2 -2
  214. package/bundle/chunk-nfjhem1c.js +2 -0
  215. package/bundle/{chunk-hznsed5n.js → chunk-ngchsw2g.js} +2 -2
  216. package/bundle/chunk-nj4d554m.js +11 -0
  217. package/bundle/{chunk-msm3r7ny.js → chunk-njnwdgvd.js} +2 -2
  218. package/bundle/{chunk-pf7cj4jd.js → chunk-nt4e3em9.js} +1 -1
  219. package/bundle/chunk-nx90tvwg.js +2 -0
  220. package/bundle/{chunk-bqs6a1ts.js → chunk-nxbkh4k9.js} +2 -2
  221. package/bundle/chunk-nxyyn2ra.js +2 -0
  222. package/bundle/{chunk-vb4e7y4d.js → chunk-nzehfpxp.js} +1 -1
  223. package/bundle/chunk-p5tceb4k.js +2 -0
  224. package/bundle/{chunk-wb69d52j.js → chunk-p68rwmhc.js} +2 -2
  225. package/bundle/{chunk-nmnsf3fc.js → chunk-pekm54ce.js} +1 -1
  226. package/bundle/{chunk-syhay5ye.js → chunk-pget15wc.js} +1 -1
  227. package/bundle/{chunk-p409grvp.js → chunk-phxrg7aw.js} +2 -2
  228. package/bundle/{chunk-14qvaxtp.js → chunk-ppfjf7qx.js} +1 -1
  229. package/bundle/{chunk-mr7agwgn.js → chunk-q1v2pytx.js} +1 -1
  230. package/bundle/{chunk-kyny0t2g.js → chunk-q6ztpfcs.js} +2 -2
  231. package/bundle/{chunk-xdde80rf.js → chunk-qhc90p4a.js} +2 -2
  232. package/bundle/chunk-qjgm3e2p.js +2 -0
  233. package/bundle/{chunk-7fx6x8x9.js → chunk-qjjch1zt.js} +2 -2
  234. package/bundle/{chunk-h2fh1g8g.js → chunk-qjn86fc0.js} +1 -1
  235. package/bundle/{chunk-yhqk8bzk.js → chunk-qrey2gwb.js} +2 -2
  236. package/bundle/chunk-qt1wffbh.js +3 -0
  237. package/bundle/{chunk-jvaffe5d.js → chunk-qt2c4bty.js} +1 -1
  238. package/bundle/{chunk-kgsq240v.js → chunk-qv2s39dv.js} +2 -2
  239. package/bundle/chunk-r08957sm.js +11 -0
  240. package/bundle/chunk-r1616dce.js +2 -0
  241. package/bundle/chunk-s07j8hfy.js +2 -0
  242. package/bundle/{chunk-sx5m81em.js → chunk-s3yna2wm.js} +1 -1
  243. package/bundle/{chunk-0vqrakhw.js → chunk-s6bar2f9.js} +1 -1
  244. package/bundle/chunk-sbyey0qb.js +2 -0
  245. package/bundle/{chunk-aqm597px.js → chunk-scnz207s.js} +2 -2
  246. package/bundle/{chunk-rjf21v5c.js → chunk-sermjas1.js} +1 -1
  247. package/bundle/chunk-sj5v361q.js +2 -0
  248. package/bundle/chunk-smtvgr3w.js +2 -0
  249. package/bundle/{chunk-ag9thqkv.js → chunk-snm5q21k.js} +2 -2
  250. package/bundle/{chunk-bnc4626b.js → chunk-srh4xvsj.js} +1 -1
  251. package/bundle/{chunk-y0xt5a6g.js → chunk-stezw26z.js} +1 -1
  252. package/bundle/{chunk-rq4hqwjy.js → chunk-szr0f7k2.js} +1 -1
  253. package/bundle/{chunk-vmgknvxs.js → chunk-t12xrrfr.js} +2 -2
  254. package/bundle/{chunk-6gbaw2pk.js → chunk-tj78jsp9.js} +1 -1
  255. package/bundle/chunk-tpndnprb.js +2 -0
  256. package/bundle/{chunk-yzchwmb4.js → chunk-tr8sf0dk.js} +1 -1
  257. package/bundle/{chunk-e1pwnf0b.js → chunk-v2zp22r3.js} +2 -2
  258. package/bundle/{chunk-2armxd20.js → chunk-v4xcysh0.js} +1 -1
  259. package/bundle/{chunk-amx3x4kd.js → chunk-v965rsr8.js} +2 -2
  260. package/bundle/{chunk-0304b7xg.js → chunk-va316nee.js} +1 -1
  261. package/bundle/chunk-vfdhqf4h.js +28 -0
  262. package/bundle/{chunk-gaen9ya4.js → chunk-vg2fmyje.js} +2 -2
  263. package/bundle/{chunk-kdcspxvq.js → chunk-vj62pc0h.js} +1 -1
  264. package/bundle/{chunk-3h08jdq8.js → chunk-vkskqhag.js} +2 -2
  265. package/bundle/{chunk-zsnbxsdx.js → chunk-vn7nkrqb.js} +2 -2
  266. package/bundle/{chunk-58680z2j.js → chunk-vsjyr170.js} +2 -2
  267. package/bundle/chunk-vwxfgea7.js +2 -0
  268. package/bundle/chunk-w0kgcz1t.js +2 -0
  269. package/bundle/{chunk-1txkz6dt.js → chunk-w87a3mzm.js} +1 -1
  270. package/bundle/chunk-wajmd3r7.js +2 -0
  271. package/bundle/{chunk-d0m7nbbx.js → chunk-whxjkz9a.js} +2 -2
  272. package/bundle/chunk-wksczmes.js +2 -0
  273. package/bundle/{chunk-0xmx2zfg.js → chunk-wnqwb6fd.js} +1 -1
  274. package/bundle/chunk-wrw22v0a.js +616 -0
  275. package/bundle/chunk-wsxta33r.js +2 -0
  276. package/bundle/{chunk-8atry88r.js → chunk-wsy0m70r.js} +1 -1
  277. package/bundle/{chunk-kdct3e8s.js → chunk-wy46mbwt.js} +1 -1
  278. package/bundle/{chunk-tf1me2r4.js → chunk-wz0zcddf.js} +3 -3
  279. package/bundle/{chunk-ggeena9t.js → chunk-x067eetw.js} +1 -1
  280. package/bundle/{chunk-eg7drzzt.js → chunk-xc5044tm.js} +1 -1
  281. package/bundle/chunk-xck0sq3k.js +2 -0
  282. package/bundle/chunk-xjyhtm8r.js +2 -0
  283. package/bundle/{chunk-j9s62g01.js → chunk-xn2ds2s4.js} +2 -2
  284. package/bundle/{chunk-qnv2v02g.js → chunk-xpc2zgj7.js} +2 -2
  285. package/bundle/{chunk-54pk7nna.js → chunk-xrxyrr00.js} +1 -1
  286. package/bundle/{chunk-f55txcsa.js → chunk-xs3xtz6x.js} +1 -1
  287. package/bundle/{chunk-crap29f6.js → chunk-xxbqhg9n.js} +1 -1
  288. package/bundle/{chunk-2je5tp0x.js → chunk-y062spw2.js} +1 -1
  289. package/bundle/{chunk-v4xgceeq.js → chunk-y2v09y71.js} +1 -1
  290. package/bundle/chunk-y9p87bfd.js +2 -0
  291. package/bundle/{chunk-g4qwkcdv.js → chunk-yajd975f.js} +1 -1
  292. package/bundle/{chunk-2z35ewwc.js → chunk-ydp0q1hk.js} +1 -1
  293. package/bundle/{chunk-gfmfrkxc.js → chunk-yfkvjphe.js} +1 -1
  294. package/bundle/chunk-ygc5qegv.js +2 -0
  295. package/bundle/{chunk-eaatrmcg.js → chunk-yhk7d1j0.js} +1 -1
  296. package/bundle/chunk-yhwx62yf.js +2 -0
  297. package/bundle/chunk-yjqmzm51.js +2 -0
  298. package/bundle/{chunk-9jvnc14g.js → chunk-yjtdgcq5.js} +1 -1
  299. package/bundle/{chunk-61ks7c71.js → chunk-yp0a8q29.js} +3 -3
  300. package/bundle/{chunk-mkyrg7gt.js → chunk-yq3m8190.js} +2 -2
  301. package/bundle/{chunk-rze20q68.js → chunk-yt3f3j35.js} +1 -1
  302. package/bundle/{chunk-tfggzzqw.js → chunk-ywkvq7zb.js} +1 -1
  303. package/bundle/chunk-z4z8hk7e.js +2 -0
  304. package/bundle/chunk-z7y9pdj7.js +2 -0
  305. package/bundle/chunk-z8g819cz.js +2 -0
  306. package/bundle/{chunk-h56jxxvj.js → chunk-z8v2tsz2.js} +1 -1
  307. package/bundle/{chunk-rs1mm5ef.js → chunk-zb0me4kk.js} +1 -1
  308. package/bundle/{chunk-gefh32jb.js → chunk-zcm2jdr5.js} +1 -1
  309. package/bundle/chunk-zqv7fx25.js +2 -0
  310. package/bundle/{chunk-jq81hb32.js → chunk-zrc54vc4.js} +2 -2
  311. package/bundle/chunk-zs2a1f20.js +2 -0
  312. package/bundle/chunk-zt1nbwmm.js +2 -0
  313. package/bundle/{chunk-2zj3h3xj.js → chunk-ztc3gm8y.js} +2 -2
  314. package/bundle/{chunk-v7ah9gg0.js → chunk-zxaaxb99.js} +2 -2
  315. package/bundle/{chunk-ww8ear80.js → chunk-zyhdxggp.js} +2 -2
  316. package/bundle/index.js +3 -3
  317. package/bundle/parser.worker.js +2 -2
  318. package/bundle/qffi.node +0 -0
  319. package/bundle/worker.js +1 -1
  320. package/package.json +1 -1
  321. package/bundle/chunk-0eneddjj.js +0 -2
  322. package/bundle/chunk-0ke6x10y.js +0 -5
  323. package/bundle/chunk-0yb4pxjv.js +0 -2
  324. package/bundle/chunk-129kq1w7.js +0 -2
  325. package/bundle/chunk-1a5hq7d5.js +0 -2
  326. package/bundle/chunk-1w3y1dkk.js +0 -2
  327. package/bundle/chunk-26qt44f1.js +0 -3
  328. package/bundle/chunk-2pkake0h.js +0 -2
  329. package/bundle/chunk-32188rww.js +0 -2
  330. package/bundle/chunk-334tc1rh.js +0 -2
  331. package/bundle/chunk-3ff94m8r.js +0 -2
  332. package/bundle/chunk-4aqd2bty.js +0 -2
  333. package/bundle/chunk-4wa0gf8y.js +0 -28
  334. package/bundle/chunk-4xg5ptk9.js +0 -2
  335. package/bundle/chunk-5nm36wxa.js +0 -2
  336. package/bundle/chunk-64jet8nc.js +0 -2
  337. package/bundle/chunk-6584d9m8.js +0 -2
  338. package/bundle/chunk-66hv9bbw.js +0 -2
  339. package/bundle/chunk-6a1g6jzn.js +0 -2
  340. package/bundle/chunk-6be8p915.js +0 -2
  341. package/bundle/chunk-6f03158n.js +0 -2
  342. package/bundle/chunk-7jnjttqx.js +0 -2
  343. package/bundle/chunk-7q5srx7q.js +0 -3
  344. package/bundle/chunk-7q8pa6s8.js +0 -2
  345. package/bundle/chunk-7qvkyjjg.js +0 -2
  346. package/bundle/chunk-7w84hfxs.js +0 -3
  347. package/bundle/chunk-87x607rz.js +0 -8223
  348. package/bundle/chunk-8casywce.js +0 -2
  349. package/bundle/chunk-8hxwxt5p.js +0 -2
  350. package/bundle/chunk-8y8140dm.js +0 -2
  351. package/bundle/chunk-9dqcyt6x.js +0 -2
  352. package/bundle/chunk-9he248a8.js +0 -2
  353. package/bundle/chunk-9qmmse2n.js +0 -2
  354. package/bundle/chunk-9w5rx0fb.js +0 -3
  355. package/bundle/chunk-aabrsxrq.js +0 -2
  356. package/bundle/chunk-atd0q4v8.js +0 -3
  357. package/bundle/chunk-avaba4sr.js +0 -2
  358. package/bundle/chunk-bdy1etja.js +0 -2
  359. package/bundle/chunk-bqdvqmjc.js +0 -2
  360. package/bundle/chunk-cdws8ggq.js +0 -2
  361. package/bundle/chunk-cqs9a2cs.js +0 -2
  362. package/bundle/chunk-d0rjst58.js +0 -2
  363. package/bundle/chunk-d833a2fj.js +0 -2
  364. package/bundle/chunk-dday4nm2.js +0 -2
  365. package/bundle/chunk-e2sj30hk.js +0 -2
  366. package/bundle/chunk-enc0fykg.js +0 -2
  367. package/bundle/chunk-evan93av.js +0 -2
  368. package/bundle/chunk-f600dzsr.js +0 -2
  369. package/bundle/chunk-f6jzwydk.js +0 -2
  370. package/bundle/chunk-fv67ng8z.js +0 -2
  371. package/bundle/chunk-gevazsx3.js +0 -2
  372. package/bundle/chunk-gh18pzkx.js +0 -2
  373. package/bundle/chunk-gnvvgr4y.js +0 -2
  374. package/bundle/chunk-gsbjs2ws.js +0 -2
  375. package/bundle/chunk-j7pdz979.js +0 -2
  376. package/bundle/chunk-jfe2qbv8.js +0 -2
  377. package/bundle/chunk-k6zvb8xm.js +0 -2
  378. package/bundle/chunk-kcht9kvx.js +0 -2
  379. package/bundle/chunk-knvsa1d4.js +0 -2
  380. package/bundle/chunk-kp6d68hd.js +0 -2
  381. package/bundle/chunk-kwm87f18.js +0 -2
  382. package/bundle/chunk-me78p9x4.js +0 -2
  383. package/bundle/chunk-mv1d7wyt.js +0 -2
  384. package/bundle/chunk-n8xmmxh5.js +0 -2
  385. package/bundle/chunk-n90219q9.js +0 -2
  386. package/bundle/chunk-nckg3ydx.js +0 -2
  387. package/bundle/chunk-nhaenjw3.js +0 -2
  388. package/bundle/chunk-nhtrt5ec.js +0 -2
  389. package/bundle/chunk-p72n0tfq.js +0 -2
  390. package/bundle/chunk-p8enedkf.js +0 -3
  391. package/bundle/chunk-pd33qvr0.js +0 -2
  392. package/bundle/chunk-pq3622ae.js +0 -2
  393. package/bundle/chunk-qatj4h6b.js +0 -2
  394. package/bundle/chunk-qfz0a58d.js +0 -2
  395. package/bundle/chunk-qjwfj51e.js +0 -2
  396. package/bundle/chunk-qkg73rs9.js +0 -2
  397. package/bundle/chunk-qvcfst7n.js +0 -11
  398. package/bundle/chunk-rmsqb6r4.js +0 -10
  399. package/bundle/chunk-rqrpbcm6.js +0 -2
  400. package/bundle/chunk-s76hdgw6.js +0 -2
  401. package/bundle/chunk-s7vhjg9e.js +0 -2
  402. package/bundle/chunk-sec3a60m.js +0 -2
  403. package/bundle/chunk-sjnt5e6w.js +0 -2
  404. package/bundle/chunk-sntb757q.js +0 -2
  405. package/bundle/chunk-svscftd7.js +0 -2
  406. package/bundle/chunk-sx0cabcs.js +0 -2
  407. package/bundle/chunk-tmdm6vm6.js +0 -2
  408. package/bundle/chunk-v6g0ksks.js +0 -2
  409. package/bundle/chunk-vbf73c7z.js +0 -2
  410. package/bundle/chunk-vbf9jpas.js +0 -2
  411. package/bundle/chunk-vrcf5q4s.js +0 -2
  412. package/bundle/chunk-vxrsp6n7.js +0 -2
  413. package/bundle/chunk-w8ax3pvh.js +0 -2
  414. package/bundle/chunk-w98r39gd.js +0 -9
  415. package/bundle/chunk-xk2cmh49.js +0 -2
  416. package/bundle/chunk-xzhkfctf.js +0 -2
  417. package/bundle/chunk-ydmrvx7q.js +0 -2
  418. package/bundle/chunk-z2rtcgad.js +0 -3
  419. package/bundle/chunk-z9b3t2jm.js +0 -2
  420. package/bundle/chunk-zzr8smtm.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":'Posez votre question... "{{example}}"',"tui.prompt.placeholder.shell":'Ex\xE9cuter une commande... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab pour accepter)","tui.home.placeholder.example.todo":"Corriger un TODO dans le code","tui.home.placeholder.example.stack":"Quelle est la stack technique de ce projet ?","tui.home.placeholder.example.tests":"R\xE9parer les tests cass\xE9s","tui.home.agreement.prefix":"En utilisant QitQode, vous acceptez nos ","tui.home.agreement.terms":"Conditions d'utilisation","tui.home.agreement.separator":" et notre ","tui.home.agreement.privacy":"Politique de confidentialit\xE9","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"joindre un fichier","tui.prompt.hint.subagent":"sous-agent","tui.prompt.hint.commands":"commandes","tui.prompt.hint.switch_mode":"changer de mode","tui.prompt.hint.settings":"param\xE8tres","tui.tips.label":"Astuce","tui.tips.plain_terminal":"Nous recommandons iTerm ou le terminal VS Code","tui.tips.attach_file":"Tapez {highlight}@{/highlight} suivi d'un nom de fichier pour rechercher et joindre des fichiers","tui.tips.shell_prefix":"Commencez un message par {highlight}!{/highlight} pour ex\xE9cuter directement des commandes shell (ex. {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Appuyez sur {highlight}Tab{/highlight} ou {highlight}Shift+Tab{/highlight} pour basculer entre les agents Build, Plan et Compose","tui.tips.theme_mode":"Ex\xE9cutez {highlight}/dark{/highlight} pour le mode sombre ou {highlight}/light{/highlight} pour le mode clair","tui.tips.doc":"Ex\xE9cutez {highlight}/doc{/highlight} pour ouvrir la documentation utilisateur","tui.tips.undo":"Utilisez {highlight}/undo{/highlight} pour annuler le dernier message et ses modifications","tui.tips.redo":"Utilisez {highlight}/redo{/highlight} pour r\xE9tablir des messages et modifications pr\xE9c\xE9demment annul\xE9s","tui.tips.drag_drop":"Glissez-d\xE9posez des images ou PDF dans le terminal pour les ajouter au contexte","tui.tips.paste_image":"Appuyez sur {highlight}Ctrl+V{/highlight} pour coller des images du presse-papiers dans l'invite","tui.tips.editor":"Appuyez sur {highlight}Ctrl+X E{/highlight} ou {highlight}/editor{/highlight} pour r\xE9diger des messages dans votre \xE9diteur externe","tui.tips.init":"Ex\xE9cutez {highlight}/init{/highlight} pour g\xE9n\xE9rer automatiquement les r\xE8gles du projet \xE0 partir de votre code","tui.tips.models":"Ex\xE9cutez {highlight}/models{/highlight} ou {highlight}Ctrl+X M{/highlight} pour changer de mod\xE8le","tui.tips.theme":`Verrouillez le mode du th\xE8me face \xE0 l'arri\xE8re-plan du terminal \u2014 ouvrez la palette de commandes ({highlight}Ctrl+P{/highlight}) et cherchez "lock"`,"tui.tips.new_session":"Appuyez sur {highlight}Ctrl+X N{/highlight} ou {highlight}/new{/highlight} pour d\xE9marrer une nouvelle session","tui.tips.sessions":"Utilisez {highlight}/sessions{/highlight} ou {highlight}Ctrl+X L{/highlight} pour lister et reprendre des conversations","tui.tips.compact":"Ex\xE9cutez {highlight}/compact{/highlight} pour r\xE9sumer les longues sessions \xE0 l'approche de la limite de contexte","tui.tips.export":"Appuyez sur {highlight}Ctrl+X X{/highlight} ou {highlight}/export{/highlight} pour enregistrer la conversation en Markdown","tui.tips.copy_last":"Appuyez sur {highlight}Ctrl+X Y{/highlight} pour copier le dernier message de l'assistant","tui.tips.command_palette":"Appuyez sur {highlight}Ctrl+P{/highlight} pour voir toutes les actions et commandes disponibles","tui.tips.leader":"La touche leader est {highlight}Ctrl+X{/highlight} ; combinez-la avec d'autres pour des actions rapides","tui.tips.f2":"Appuyez sur {highlight}F2{/highlight} pour basculer rapidement entre les mod\xE8les r\xE9cents","tui.tips.sidebar":"Appuyez sur {highlight}Ctrl+X B{/highlight} pour afficher/masquer la barre lat\xE9rale","tui.tips.history":"Utilisez {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} pour parcourir l'historique de la conversation","tui.tips.jump_first":"Appuyez sur {highlight}Ctrl+G{/highlight} ou {highlight}Home{/highlight} pour aller au d\xE9but de la conversation","tui.tips.jump_last":"Appuyez sur {highlight}Ctrl+Alt+G{/highlight} ou {highlight}End{/highlight} pour aller au message le plus r\xE9cent","tui.tips.newline":"Appuyez sur {highlight}Shift+Enter{/highlight} ou {highlight}Ctrl+J{/highlight} pour ins\xE9rer un saut de ligne dans l'invite","tui.tips.clear_input":"Appuyez sur {highlight}Ctrl+C{/highlight} pendant la saisie pour vider le champ","tui.tips.escape":"Appuyez sur {highlight}Escape{/highlight} pour interrompre l'IA en cours de r\xE9ponse","tui.tips.plan_agent":"Passez \xE0 l'agent {highlight}Plan{/highlight} pour obtenir des suggestions sans appliquer de modifications","tui.tips.subagent":"Utilisez {highlight}@agent-name{/highlight} dans les invites pour invoquer des sous-agents sp\xE9cialis\xE9s","tui.tips.cycle_sessions":"Appuyez sur {highlight}Ctrl+X Right/Left{/highlight} pour parcourir les sessions parent et enfant","tui.tips.config_files":"Cr\xE9ez {highlight}qitqode.json{/highlight} pour la configuration serveur et {highlight}tui.json{/highlight} pour le TUI","tui.tips.global_config":"Placez les param\xE8tres TUI dans {highlight}~/.config/qitqode/tui.json{/highlight} comme configuration globale","tui.tips.schema":"Ajoutez {highlight}$schema{/highlight} \xE0 votre config pour l'auto-compl\xE9tion dans l'\xE9diteur","tui.tips.default_model":"Configurez {highlight}model{/highlight} dans la config pour d\xE9finir le mod\xE8le par d\xE9faut","tui.tips.keybinds":"Remplacez n'importe quel raccourci dans {highlight}tui.json{/highlight} via la section {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"D\xE9finissez un raccourci sur {highlight}none{/highlight} pour le d\xE9sactiver compl\xE8tement","tui.tips.mcp_config":"Configurez les serveurs MCP locaux ou distants dans la section {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"QitQode g\xE8re automatiquement OAuth pour les serveurs MCP distants n\xE9cessitant une authentification","tui.tips.custom_command":"Ajoutez des fichiers {highlight}.md{/highlight} dans {highlight}.qitqode/command/{/highlight} pour d\xE9finir des invites personnalis\xE9es r\xE9utilisables","tui.tips.command_args":"Utilisez {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} dans les commandes pour des entr\xE9es dynamiques","tui.tips.command_backticks":"Utilisez des backticks dans les commandes pour injecter la sortie shell (ex. {highlight}`git status`{/highlight})","tui.tips.custom_agent":"Ajoutez des fichiers {highlight}.md{/highlight} dans {highlight}.qitqode/agent/{/highlight} pour des personas IA sp\xE9cialis\xE9s","tui.tips.agent_perms":"Configurez par agent les permissions des outils {highlight}edit{/highlight}, {highlight}bash{/highlight} et {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Utilisez des motifs comme {highlight}"git *": "allow"{/highlight} pour des permissions bash fines',"tui.tips.bash_deny":'D\xE9finissez {highlight}"rm -rf *": "deny"{/highlight} pour bloquer les commandes destructrices',"tui.tips.bash_ask":'Configurez {highlight}"git push": "ask"{/highlight} pour exiger une confirmation avant le push',"tui.tips.formatter":"QitQode formate automatiquement les fichiers avec prettier, gofmt, ruff, etc.","tui.tips.disable_formatter":'D\xE9finissez {highlight}"formatter": false{/highlight} dans la config pour d\xE9sactiver le formatage automatique',"tui.tips.custom_formatter":"D\xE9finissez des commandes de formatage personnalis\xE9es par extension de fichier dans la config","tui.tips.lsp":"QitQode utilise des serveurs LSP pour une analyse de code intelligente","tui.tips.custom_tool":"Cr\xE9ez des fichiers {highlight}.ts{/highlight} dans {highlight}.qitqode/tools/{/highlight} pour d\xE9finir de nouveaux outils LLM","tui.tips.tool_scripts":"Les d\xE9finitions d'outils peuvent invoquer des scripts en Python, Go, etc.","tui.tips.plugins":"Ajoutez des fichiers {highlight}.ts{/highlight} dans {highlight}.qitqode/plugin/{/highlight} pour des hooks d'\xE9v\xE9nements","tui.tips.plugin_notify":"Utilisez des plugins pour envoyer des notifications syst\xE8me \xE0 la fin des sessions","tui.tips.plugin_protect":"Cr\xE9ez un plugin pour emp\xEAcher QitQode de lire des fichiers sensibles","tui.tips.run":"Utilisez {highlight}qitqode run{/highlight} pour des scripts non interactifs","tui.tips.continue":"Utilisez {highlight}qitqode --continue{/highlight} pour reprendre la derni\xE8re session","tui.tips.attach_cli":"Utilisez {highlight}qitqode run -f file.ts{/highlight} pour joindre des fichiers via la CLI","tui.tips.format_json":"Utilisez {highlight}--format json{/highlight} pour une sortie lisible par machine dans les scripts","tui.tips.auth_list":"Ex\xE9cutez {highlight}qitqode auth status{/highlight} pour voir votre \xE9tat de connexion actuel","tui.tips.agent_create":"Ex\xE9cutez {highlight}qitqode agent create{/highlight} pour cr\xE9er un agent en mode guid\xE9","tui.tips.theme_system":'Utilisez {highlight}"theme": "system"{/highlight} pour suivre les couleurs du terminal',"tui.tips.theme_files":"Cr\xE9ez des fichiers de th\xE8me JSON dans le dossier {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Les th\xE8mes prennent en charge des variantes claires/sombres pour les deux modes","tui.tips.theme_ansi":"R\xE9f\xE9rencez les couleurs ANSI 0-255 dans des th\xE8mes personnalis\xE9s","tui.tips.env_var":"Utilisez la syntaxe {highlight}{env:VAR_NAME}{/highlight} pour r\xE9f\xE9rencer des variables d'environnement","tui.tips.file_var":"Utilisez {highlight}{file:path}{/highlight} pour inclure le contenu d'un fichier dans la config","tui.tips.instructions":"Utilisez {highlight}instructions{/highlight} dans la config pour charger des fichiers de r\xE8gles suppl\xE9mentaires","tui.tips.temperature":"R\xE9glez la {highlight}temperature{/highlight} de l'agent de 0.0 (focalis\xE9) \xE0 1.0 (cr\xE9atif)","tui.tips.steps":"Configurez {highlight}steps{/highlight} pour limiter les it\xE9rations agentiques par requ\xEAte","tui.tips.disable_tool":'D\xE9finissez {highlight}"tools": {"bash": false}{/highlight} pour d\xE9sactiver des outils sp\xE9cifiques',"tui.tips.disable_mcp_tools":`D\xE9finissez {highlight}"mcp_*": false{/highlight} pour d\xE9sactiver tous les outils d'un serveur MCP`,"tui.tips.tool_override":"Remplacez les param\xE8tres globaux des outils dans la configuration de chaque agent","tui.tips.doom_loop":"La permission {highlight}doom_loop{/highlight} pr\xE9vient les boucles infinies d'appels d'outils","tui.tips.external_dir":"La permission {highlight}external_directory{/highlight} prot\xE8ge les fichiers en dehors du projet","tui.tips.debug_config":"Ex\xE9cutez {highlight}qitqode debug config{/highlight} pour diagnostiquer la configuration","tui.tips.print_logs":"Utilisez l'option {highlight}--print-logs{/highlight} pour afficher des journaux d\xE9taill\xE9s sur stderr","tui.tips.timeline":"Appuyez sur {highlight}Ctrl+X G{/highlight} ou {highlight}/timeline{/highlight} pour aller \xE0 un message pr\xE9cis","tui.tips.toggle_code":"Appuyez sur {highlight}Ctrl+X H{/highlight} pour afficher/masquer les blocs de code des messages","tui.tips.status":"Appuyez sur {highlight}Ctrl+X S{/highlight} ou {highlight}/status{/highlight} pour voir l'\xE9tat du syst\xE8me","tui.tips.scroll_accel":"Activez {highlight}scroll_acceleration{/highlight} dans {highlight}tui.json{/highlight} pour un d\xE9filement fluide","tui.tips.agents_md":"Versionnez le fichier {highlight}AGENTS.md{/highlight} de votre projet sur Git pour le partager avec l'\xE9quipe","tui.tips.review":"Utilisez {highlight}/review{/highlight} pour r\xE9viser les modifications non commit, branches ou PR","tui.tips.help":"Ex\xE9cutez {highlight}/help{/highlight} ou {highlight}Ctrl+X H{/highlight} pour ouvrir l'aide","tui.tips.rename":"Utilisez {highlight}/rename{/highlight} pour renommer la session courante","tui.tips.suspend.unix":"Appuyez sur {highlight}Ctrl+Z{/highlight} pour suspendre le terminal et revenir au shell","tui.tips.suspend.win":"Appuyez sur {highlight}Ctrl+Z{/highlight} pour annuler les modifications dans l'invite","tui.command.palette.title":"Commandes","tui.command.palette.suggested":"Sugg\xE9r\xE9es","tui.command.category.session":"Session","tui.command.category.agent":"Agent","tui.command.category.provider":"Fournisseur","tui.command.category.system":"Syst\xE8me","tui.command.category.prompt":"Invite","tui.command.category.internal":"Interne","tui.command.category.external":"Externe","tui.slash.init.description":"configuration guid\xE9e de AGENTS.md","tui.slash.review.description":"revoir les changements [commit|branch|pr], par d\xE9faut non commit\xE9s","tui.slash.dream.description":"consolider manuellement la m\xE9moire du projet \xE0 partir des fichiers memory et de la trajectoire brute","tui.slash.distill.description":"trouver les workflows r\xE9p\xE9t\xE9s dans le travail r\xE9cent et les empaqueter en skills, sous-agents ou commandes","tui.slash.goal.description":"d\xE9finir un objectif avec condition d'arr\xEAt ; s'ex\xE9cute jusqu'\xE0 ce qu'un juge confirme. /goal clear pour annuler","tui.slash.deep-research.description":"rapport de recherche approfondi multi-sources et v\xE9rifi\xE9 (ex\xE9cute le workflow deep-research)","tui.command.language.switch.title":"Changer de langue","tui.command.language.switch.description":"Modifier la langue d'affichage","tui.command.language.dialog.title":"Changer de langue","tui.language.auto":"Auto (syst\xE8me)","tui.language.current":"Actuelle","tui.command.session.list.title":"Changer de session","tui.command.session.new.title":"Nouvelle session","tui.command.workflow.list.title":"Workflows","tui.command.model.list.title":"Changer de mod\xE8le","tui.command.model.cycle_recent.title":"Mod\xE8les r\xE9cents","tui.command.model.cycle_recent_reverse.title":"Mod\xE8les r\xE9cents (inverse)","tui.command.model.cycle_favorite.title":"Favoris","tui.command.model.cycle_favorite_reverse.title":"Favoris (inverse)","tui.command.agent.list.title":"Changer d'agent","tui.command.mcp.list.title":"Activer/d\xE9sactiver MCP","tui.command.never_ask.title_on":"Sans questions : ACTIV\xC9 (auto-d\xE9cider, autorisations exclues) \u2014 cliquer pour d\xE9sactiver","tui.command.never_ask.title_off":"Sans questions : D\xC9SACTIV\xC9 \u2014 cliquer pour activer (auto-d\xE9cider, autorisations exclues)","tui.command.never_ask.toast_on":"Sans questions ACTIV\xC9 \u2014 je ne te demanderai rien ; je choisirai moi-m\xEAme la meilleure option jusqu'\xE0 ce que tu le d\xE9sactives (/never-ask). Les demandes d'autorisation n\xE9cessitent toujours ton approbation.","tui.command.never_ask.toast_off":"Sans questions D\xC9SACTIV\xC9 \u2014 je te redemanderai aux points de d\xE9cision.","tui.command.agent.cycle.title":"Cycle d'agents","tui.command.variant.cycle.title":"Cycle de variantes","tui.command.variant.list.title":"Changer de variante de mod\xE8le","tui.command.agent.cycle.reverse.title":"Cycle d'agents (inverse)","tui.command.provider.login.title":"Connexion","tui.command.provider.logout.title":"D\xE9connexion","tui.command.console.org.switch.title":"Changer d'organisation","tui.command.qitqode.status.title":"Voir l'\xE9tat","tui.command.theme.switch.title":"Changer de th\xE8me","tui.command.theme.switch_mode.to_light":"Passer au mode clair","tui.command.theme.switch_mode.to_dark":"Passer au mode sombre","tui.command.theme.mode.unlock":"D\xE9verrouiller le mode du th\xE8me","tui.command.theme.mode.lock":"Verrouiller le mode du th\xE8me","tui.command.help.show.title":"Aide","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accessibilit\xE9 : activez ou d\xE9sactivez les animations et le son depuis la liste de commandes. Variables d'environnement : NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Annonces : en mode accessible, choisissez le niveau de d\xE9tail des annonces du lecteur d'\xE9cran (silencieux, normal, d\xE9taill\xE9) depuis la liste de commandes ou avec QITQODE_TUI_ANNOUNCEMENTS. Les erreurs sont toujours annonc\xE9es.","tui.dialog.help.dialog_keys":"Bo\xEEtes de dialogue : toutes fonctionnent uniquement au clavier \u2014 \xC9chap ferme, Tab ou les fl\xE8ches d\xE9placent le focus, Entr\xE9e ou Espace active le contr\xF4le cibl\xE9.","tui.command.app.announcements.cycle":"Annonces : {{level}} (s\xE9lectionner pour changer)","tui.announcements.level.quiet":"silencieux","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"d\xE9taill\xE9","tui.app.terminal_too_small":"Terminal trop petit ({{width}}x{{height}}). Redimensionnez-le \xE0 au moins 40x8.","tui.dialog.help.command_list":"Appuyez sur {{keybind}} pour voir toutes les actions et commandes disponibles dans n'importe quel contexte.","tui.dialog.help.ok":"OK","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 d\xE9filer \xB7 PgPr\xE9c/PgSuiv page \xB7 esc fermer","tui.dialog.ok":"OK","tui.dialog.confirm.cancel":"Annuler","tui.dialog.confirm.confirm":"Confirmer","tui.dialog.agreement.title":"Conditions et confidentialit\xE9","tui.dialog.agreement.message":"Veuillez les lire et les accepter pour continuer.","tui.dialog.agreement.confirm":"Accepter et continuer","tui.command.docs.terms.title":"Voir les conditions d'utilisation","tui.command.docs.privacy.title":"Voir la politique de confidentialit\xE9","tui.command.consent.revoke.title":"R\xE9voquer l'accord du mod\xE8le gratuit","tui.consent.revoked":"Accord du mod\xE8le gratuit r\xE9voqu\xE9 \u2014 vous devrez l'accepter \xE0 nouveau","tui.dialog.select.placeholder":"Rechercher","tui.dialog.select.no_results":"Aucun r\xE9sultat trouv\xE9","tui.dialog.prompt.placeholder":"Saisir du texte","tui.dialog.prompt.busy":"Traitement...","tui.dialog.prompt.processing":"traitement...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"envoyer","tui.dialog.export.title":"Options d'export","tui.dialog.export.filename":"Nom du fichier :","tui.dialog.export.filename_placeholder":"Saisir le nom du fichier","tui.dialog.export.include_thinking":"Inclure la r\xE9flexion","tui.dialog.export.include_tool_details":"Inclure les d\xE9tails des outils","tui.dialog.export.include_assistant_metadata":"Inclure les m\xE9tadonn\xE9es de l'assistant","tui.dialog.export.open_without_saving":"Ouvrir sans enregistrer","tui.dialog.export.hint.toggle_prefix":"Appuyez sur","tui.dialog.export.hint.toggle_action":"pour basculer","tui.dialog.export.hint.confirm_action":"pour confirmer","tui.dialog.export.hint.options_action":"pour les options","tui.toast.copied_to_clipboard":"Copi\xE9 dans le presse-papiers","tui.toast.instructions_loaded":"Charg\xE9 {{files}}","tui.toast.update_available.title":"Mise \xE0 jour disponible","tui.toast.update_available.confirm":"La nouvelle version v{{version}} est disponible. Voulez-vous mettre \xE0 jour maintenant ?","tui.toast.update_available.updating":"Mise \xE0 jour vers v{{version}}...","tui.toast.update_available.failed":"La mise \xE0 jour a \xE9chou\xE9","tui.toast.update_available.success":"Mis \xE0 jour vers QitQode v{{version}}. Veuillez red\xE9marrer l'application.","tui.toast.updated.title":"Mis \xE0 jour automatiquement","tui.toast.updated.message":"Correctif appliqu\xE9 automatiquement : v{{version}}. Red\xE9marrez pour utiliser la nouvelle version. D\xE9sactivez avec autoupdate: false dans la configuration.","tui.sidebar.instructions":"Instructions","tui.sidebar.cwd":"R\xE9pertoire de travail","tui.toast.unknown_error":"Une erreur inconnue s'est produite","tui.command.docs.open.title":"Ouvrir la documentation","tui.command.app.exit.title":"Quitter l'application","tui.command.app.debug.title":"Basculer le panneau de d\xE9bogage","tui.command.app.console.title":"Basculer la console","tui.command.app.heap_snapshot.title":"Exporter le snapshot du tas","tui.command.terminal.suspend.title":"Suspendre le terminal","tui.command.terminal.title.disable":"D\xE9sactiver le titre du terminal","tui.command.terminal.title.enable":"Activer le titre du terminal","tui.command.app.toggle.animations.disable":"D\xE9sactiver les animations","tui.command.app.toggle.animations.enable":"Activer les animations","tui.command.app.toggle.diffwrap.disable":"D\xE9sactiver le retour \xE0 la ligne des diffs","tui.command.app.toggle.diffwrap.enable":"Activer le retour \xE0 la ligne des diffs","tui.command.app.toggle.sound.disable":"D\xE9sactiver le son","tui.command.app.toggle.sound.enable":"Activer le son","tui.command.logout.toast":"D\xE9connect\xE9","tui.command.session.share.title":"Partager la session","tui.command.session.share.copy_link":"Copier le lien de partage","tui.command.session.rename.title":"Renommer la session","tui.command.session.timeline.title":"Aller \xE0 un message","tui.command.session.fork.title":"Dupliquer la session","tui.command.session.compact.title":"Compacter la session","tui.command.session.unshare.title":"Annuler le partage","tui.command.session.undo.title":"Annuler le message pr\xE9c\xE9dent","tui.command.session.redo.title":"R\xE9tablir","tui.command.session.sidebar.show":"Afficher la barre lat\xE9rale","tui.command.session.sidebar.hide":"Masquer la barre lat\xE9rale","tui.command.session.conceal.disable":"D\xE9sactiver le masquage du code","tui.command.session.conceal.enable":"Activer le masquage du code","tui.command.session.timestamps.show":"Afficher les horodatages","tui.command.session.timestamps.hide":"Masquer les horodatages","tui.command.session.thinking.expand":"D\xE9velopper la r\xE9flexion","tui.command.session.thinking.collapse":"R\xE9duire la r\xE9flexion","tui.command.session.tool_details.show":"Afficher les d\xE9tails des outils","tui.command.session.tool_details.hide":"Masquer les d\xE9tails des outils","tui.command.session.scrollbar.toggle":"Basculer la barre de d\xE9filement","tui.command.session.generic_tool_output.show":"Afficher la sortie d'outil g\xE9n\xE9rique","tui.command.session.generic_tool_output.hide":"Masquer la sortie d'outil g\xE9n\xE9rique","tui.command.session.page_up.title":"Page pr\xE9c\xE9dente","tui.command.session.page_down.title":"Page suivante","tui.command.session.line_up.title":"Ligne au-dessus","tui.command.session.line_down.title":"Ligne en dessous","tui.command.session.half_page_up.title":"Demi-page vers le haut","tui.command.session.half_page_down.title":"Demi-page vers le bas","tui.command.session.first.title":"Premier message","tui.command.session.last.title":"Dernier message","tui.command.session.last_user.title":"Aller au dernier message utilisateur","tui.command.session.message_next.title":"Message suivant","tui.command.session.message_previous.title":"Message pr\xE9c\xE9dent","tui.command.messages.copy.title":"Copier le dernier message de l'assistant","tui.command.session.copy.title":"Copier la transcription","tui.command.session.export.title":"Exporter la transcription","tui.command.session.child_first.title":"Aller \xE0 la session enfant","tui.command.session.parent.title":"Aller \xE0 la session parente","tui.command.session.child_next.title":"Session enfant suivante","tui.command.session.child_previous.title":"Session enfant pr\xE9c\xE9dente","tui.command.prompt.clear.title":"Vider l'invite","tui.command.prompt.submit.title":"Envoyer l'invite","tui.command.prompt.paste.title":"Coller","tui.command.session.interrupt.title":"Interrompre la session","tui.command.prompt.editor.title":"Ouvrir l'\xE9diteur","tui.command.prompt.skills.title":"Comp\xE9tences","tui.command.voice.toggle.title":"Activer/d\xE9sactiver la saisie vocale","tui.command.voice.toggle.title_on":"Saisie vocale : activ\xE9e \u2014 cliquer pour d\xE9sactiver","tui.command.voice.toggle.title_off":"Saisie vocale : d\xE9sactiv\xE9e \u2014 cliquer pour activer","tui.voice.enabled":"Saisie vocale activ\xE9e (chinois/anglais) \u2014 cliquez sur [Voice] pour enregistrer","tui.voice.disabled":"Saisie vocale d\xE9sactiv\xE9e","tui.voice.send.enabled":'Envoi vocal activ\xE9 \u2014 dites\u300C\u53D1\u9001\u300Dou "send it" pour envoyer',"tui.voice.send.disabled":"Envoi vocal d\xE9sactiv\xE9","tui.command.voice.send.title":"Basculer l'envoi vocal","tui.command.voice.send.title_on":"Envoi vocal : activ\xE9 \u2014 cliquer pour d\xE9sactiver","tui.command.voice.send.title_off":"Envoi vocal : d\xE9sactiv\xE9 \u2014 cliquer pour activer","tui.voice.control.enabled":"Contr\xF4le vocal activ\xE9 \u2014 utilise le mod\xE8le multimodal pour l'\xE9dition intelligente (plus lent)","tui.voice.control.disabled":"Contr\xF4le vocal d\xE9sactiv\xE9 \u2014 utilise la transcription ASR rapide","tui.command.voice.control.title":"Basculer le contr\xF4le vocal (multimodal)","tui.command.voice.control.title_on":"Contr\xF4le vocal : activ\xE9 (multimodal) \u2014 cliquer pour d\xE9sactiver","tui.command.voice.control.title_off":"Contr\xF4le vocal : d\xE9sactiv\xE9 (ASR rapide) \u2014 cliquer pour activer","tui.voice.error.no_auth":"Utilisez /connect pour vous connecter \xE0 QitQode, ou configurez voice.asr_model pour un autre fournisseur","tui.voice.error.no_auth_provider":`Le fournisseur vocal "{{provider}}" n'est pas authentifi\xE9, v\xE9rifiez son apiKey`,"tui.voice.error.provider_not_found":`Fournisseur "{{provider}}" indisponible \u2014 /connect pour s'authentifier, ou d\xE9clarez models dans la config pour les endpoints personnalis\xE9s`,"tui.voice.error.no_url":`Le fournisseur "{{provider}}" n'a pas de baseURL configur\xE9 \u2014 d\xE9finissez options.baseURL dans la configuration`,"tui.voice.error.no_device":"Aucun microphone/appareil audio trouv\xE9 \u2014 v\xE9rifiez les param\xE8tres audio du syst\xE8me","tui.voice.error.recorder_failed":"L'enregistrement a \xE9chou\xE9","tui.voice.error.no_recorder":"Aucun outil d'enregistrement trouv\xE9, installez sox","tui.voice.error.too_short":"Enregistrement trop court","tui.voice.error.network":"La transcription a \xE9chou\xE9, v\xE9rifiez votre r\xE9seau","tui.command.prompt.stash.title":"Mettre l'invite de c\xF4t\xE9","tui.command.prompt.stash.pop.title":"R\xE9cup\xE9rer l'invite","tui.command.prompt.stash.list.title":"Liste des invites mises de c\xF4t\xE9","tui.command.tips.toggle.show":"Afficher les astuces","tui.command.tips.toggle.hide":"Masquer les astuces","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Installer un plugin","cli.providers.select":"S\xE9lectionner un fournisseur","cli.providers.other":"Autre fournisseur","tui.question.plan_enter.question":"Voulez-vous basculer en mode plan pour une planification structur\xE9e ?","tui.question.plan_enter.header":"Entrer dans le plan","tui.question.plan_enter.option.0.label":"Oui","tui.question.plan_enter.option.0.description":"Basculer vers l'agent plan pour une planification en lecture seule","tui.question.plan_enter.option.1.label":"Non","tui.question.plan_enter.option.1.description":"Rester dans le mode actuel","tui.question.plan_exit.question":"Le plan {{plan}} est termin\xE9. Voulez-vous basculer vers l'agent build pour commencer l'impl\xE9mentation ?","tui.question.plan_exit.header":"Quitter le plan","tui.question.plan_exit.option.0.label":"Oui","tui.question.plan_exit.option.0.description":"Basculer vers l'agent build et commencer l'impl\xE9mentation","tui.question.plan_exit.option.1.label":"Non","tui.question.plan_exit.option.1.description":"Rester avec l'agent plan pour continuer \xE0 affiner","tui.session.badge.auto":"Auto","trust.title":"Acc\xE8s \xE0 l'espace de travail :","trust.safety_check":"V\xE9rification rapide : est-ce un projet que vous avez cr\xE9\xE9 ou auquel vous faites confiance ? (Votre propre code, un projet open source reconnu ou un travail de votre \xE9quipe). Sinon, prenez un moment pour examiner le contenu de ce dossier.","trust.capabilities":"QitQode pourra lire, modifier et ex\xE9cuter des fichiers ici.","trust.plugin_warn":"Si des plugins malveillants existent dans ce r\xE9pertoire, ils peuvent ex\xE9cuter du code arbitraire, lire, modifier ou exfiltrer vos fichiers.","trust.option.yes":"Oui, je fais confiance \xE0 ce dossier","trust.option.no":"Non, quitter","trust.dangerous.title_home":"ATTENTION : Vous \xEAtes sur le point d'ouvrir votre R\xC9PERTOIRE PERSONNEL.","trust.dangerous.title_root":"ATTENTION : Vous \xEAtes sur le point d'ouvrir la RACINE DU SYST\xC8ME DE FICHIERS.","trust.dangerous.body_home":"Le mod\xE8le aura acc\xE8s \xE0 TOUS vos fichiers personnels \u2014 cl\xE9s SSH, identifiants, profils de navigateur et tout le contenu de votre dossier personnel.","trust.dangerous.body_root":"Le mod\xE8le aura acc\xE8s \xE0 l'ENSEMBLE du syst\xE8me de fichiers \u2014 fichiers syst\xE8me, donn\xE9es de tous les utilisateurs, identifiants et tout sur cette machine.","trust.dangerous.advice_home":"Sauf raison tr\xE8s sp\xE9cifique, NE faites PAS confiance \xE0 l'int\xE9gralit\xE9 de votre r\xE9pertoire personnel.","trust.dangerous.advice_root":"Sauf raison tr\xE8s sp\xE9cifique, NE faites PAS confiance \xE0 la racine du syst\xE8me de fichiers.","trust.dangerous.option.yes":"Je comprends les risques, faire confiance pour cette session","trust.dangerous.option.no":"Quitter (recommand\xE9)"};
3
- export{f as xd};
3
+ export{f as yd};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{dQ as o}from"./chunk-aztre27e.js";var i=(t)=>`standard-openapi: ${t}`,s=new Map,r=async(t)=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./chunk-knpt9n8f.js")).default();break;case"zod":a=(await import("./chunk-z7y9pdj7.js")).default();break;default:a=(await import("./chunk-nfjhem1c.js")).default()}return s.set(t,a),a},d=async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:n={},options:c}=e;return{schema:await a(t,{components:n,options:c}),components:Object.keys(n).length>0?n:void 0}};
3
+ export{i as Hg,d as Ig};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hs as a,is as b,js as c}from"./chunk-c0796v8j.js";import"./chunk-njnwdgvd.js";import"./chunk-4qqkqrn9.js";import"./chunk-zxaaxb99.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import"./chunk-snm5q21k.js";import"./chunk-aztre27e.js";export{c as makeRuntime,a as attachWith,b as attach};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Jy as a7,Ky as o7,qy as RZ}from"./chunk-p409grvp.js";import{$D as YJ,$F as c7,$J as f,$L as w$,AD as F$,BB as b1,BD as x5,BF as D5,BG as o,BK as H6,CB as W6,CD as O1,CN as P$,DJ as D0,DK as y1,DN as DJ,EB as q5,EE as N$,EI as D1,EK as E6,FB as A6,FE as m8,FG as _0,FI as L$,FK as k0,GB as wJ,GF as y7,GJ as m6,GK as I0,HB as HJ,HE as g7,HF as k7,IG as F0,II as C5,IM as H$,JE as C7,JF as m7,JI as M$,JK as cY,KB as U6,KF as h7,LG as l5,LK as mY,LM as K1,MA as H,MB as F6,MG as a$,MM as I5,Mz as q,NA as b,NF as $J,NK as k1,NM as p7,OA as y$,OF as jZ,OL as AZ,OM as tZ,Oz as P7,PA as r,PD as p$,PF as f7,PM as k$,QA as BY,QB as S,QE as FY,QF as E5,Qz as S0,RA as L1,RB as bY,RF as ZY,RG as V0,RM as SY,SB as e$,SD as L0,SF as J6,SG as bZ,TA as l1,TB as GZ,TE as h8,TM as $5,UB as gZ,UD as a5,VA as XZ,VD as x8,VE as d,VF as W5,Vz as K6,WA as O6,WE as F,Wz as _6,XB as zY,XE as _Z,XJ as x1,YB as y,YD as y8,YE as WY,YJ as F7,Yz as g0,ZA as PY,ZE as e,ZG as i0,ZJ as H8,_A as h,_B as j7,_D as z0,_G as g1,_L as I6,_M as X0,aB as a6,aC as j,aG as c8,aH as L6,aK as iY,bA as B6,bF as i,bG as w1,bH as M6,cA as hZ,cB as iZ,cC as aZ,cD as i$,cE as EJ,cF as g,cN as h5,dB as o6,dC as z7,dE as H1,dF as eZ,dG as OY,eB as X7,eC as v7,eE as Z6,eF as BJ,eI as nY,fE as ZJ,fF as GY,fG as jJ,fK as E0,gE as M0,gG as d7,gN as XJ,hB as D6,hC as gY,hD as p5,hE as IJ,hF as u,hG as JJ,hN as n7,iA as V6,iC as IZ,iD as V1,iF as U,iG as K5,iH as T6,jA as fY,jE as pY,jG as d8,jH as q1,jN as E$,kC as _7,kE as $6,kF as $0,kG as u7,lA as k6,lC as Y0,lD as R8,lE as DZ,lF as Q1,lN as I$,mC as B5,mE as PJ,mM as tY,mz as vY,nE as _J,nF as n$,nG as l7,nM as r8,oA as hY,oD as G5,oE as rY,oF as L,oM as LZ,oz as O,pE as sY,pG as i7,pN as P5,pz as BZ,qG as g5,qI as u8,qK as IY,qN as wZ,rA as _Y,rB as G7,rK as o8,rN as J8,rz as DY,sA as RY,sB as K7,sD as w8,sF as b7,sz as I7,tC as T1,tD as A$,tE as n0,tF as X1,tI as l8,tN as O0,tz as $1,uD as U$,uE as P,uF as q7,uG as QJ,uI as i8,uN as dY,uz as v8,vA as x0,vB as V7,vC as Y1,vD as S7,vF as K0,vz as b8,wB as z6,wC as R7,wE as J1,wF as f8,wN as OJ,wz as Y6,xD as S8,xF as JZ,xG as n5,xI as p8,yK as T$,zB as y0,zF as x7,zI as n8,zK as w6,zz as _5}from"./chunk-ag9thqkv.js";import{fO as kY}from"./chunk-0rmmg3g4.js";var mZ={};kY(mZ,{isHttpClientError:()=>P0,TransportError:()=>j0,StatusCodeError:()=>kZ,InvalidUrlError:()=>v0,HttpClientErrorSchema:()=>S1,HttpClientError:()=>x,EncodeError:()=>X6,EmptyBodyError:()=>R0,DecodeError:()=>TY});var H0="~effect/http/HttpClientError",P0=(Y)=>q(Y,H0);class x extends P("HttpClientError"){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[H0]=H0;get request(){return this.reason.request}get response(){return"response"in this.reason?this.reason.response:void 0}get message(){return this.reason.message}}var UZ=(Y)=>Y.endsWith("Error")?Y.slice(0,-5):Y,FZ=(Y,Z,$)=>Z?`${Y}: ${Z} (${$})`:`${Y} error (${$})`;class j0 extends P("TransportError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class X6 extends P("EncodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class v0 extends P("InvalidUrlError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class kZ extends P("StatusCodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class TY extends P("DecodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class R0 extends P("EmptyBodyError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class S1 extends tY(H0)({_tag:mY("HttpError"),kind:I0(["EncodeError","DecodeError","TransportError","InvalidUrlError","StatusCodeError","EmptyBodyError"]),cause:E0(AZ)}){static fromHttpClientError(Y){return new S1({_tag:"HttpError",kind:Y.reason._tag,cause:Y.reason})}}var pZ={};kY(pZ,{updateUrl:()=>zQ,trace:()=>XQ,toWebResult:()=>Z7,toWeb:()=>vQ,toUrl:()=>o1,setUrlParams:()=>e6,setUrlParam:()=>_Q,setUrl:()=>EZ,setMethod:()=>r6,setHeaders:()=>p0,setHeader:()=>HZ,setHash:()=>Y7,setBody:()=>$Y,schemaBodyJson:()=>NQ,removeHash:()=>DQ,put:()=>ZQ,prependUrl:()=>a1,post:()=>eJ,patch:()=>YQ,options:()=>QQ,modify:()=>p1,makeWith:()=>R,make:()=>KY,isHttpClientRequest:()=>KZ,head:()=>JQ,get:()=>tJ,fromWeb:()=>EQ,empty:()=>i1,delete:()=>$Q,bodyUrlParams:()=>LQ,bodyUint8Array:()=>WQ,bodyText:()=>AQ,bodyStream:()=>wQ,bodyJsonUnsafe:()=>FQ,bodyJson:()=>UQ,bodyFormDataRecord:()=>TQ,bodyFormData:()=>MQ,bodyFile:()=>HQ,bearerToken:()=>KQ,basicAuth:()=>GQ,appendUrlParams:()=>OQ,appendUrlParam:()=>BQ,appendUrl:()=>VQ,acceptJson:()=>s6,accept:()=>n1});var G6=Symbol.for("~effect/http/Headers");var NZ=Object.create(null);Object.defineProperties(NZ,{[G6]:{value:G6},[V6]:{value(Y){return YZ(this,y(Y,cZ))}},toJSON:{value(){return fY(this)}},[g0]:{value(Y){return fJ(this,Y)}},[S0]:{value(){return K6(this)}},toString:{value:_Y.toString},[hY]:{value:_Y[hY]}});var C0=(Y)=>Object.assign(Object.create(NZ),Y),fJ=z6(hZ());var n=Object.create(NZ),C=(Y)=>{if(Y===void 0)return n;else if(Symbol.iterator in Y){let $=Object.create(NZ);for(let[J,Q]of Y)$[J.toLowerCase()]=Q;return $}let Z=Object.create(NZ);for(let[$,J]of Object.entries(Y))if(Array.isArray(J))Z[$.toLowerCase()]=J.join(", ");else if(J!==void 0)Z[$.toLowerCase()]=J;return Z},wY=(Y)=>Object.setPrototypeOf(Y,NZ);var HY=O(3,(Y,Z,$)=>{let J=C0(Y);return J[Z.toLowerCase()]=$,J}),b0=O(2,(Y,Z)=>C0({...Y,...C(Z)})),fZ=O(2,(Y,Z)=>{let $=C0(Y);return Object.assign($,Z),$}),q0=O(2,(Y,Z)=>{let $=C0(Y);return delete $[Z.toLowerCase()],$});var YZ=O(2,(Y,Z)=>{let $={...Y},J=(Q)=>{if(typeof Q==="string"){let X=Q.toLowerCase();if(X in Y)$[X]=g1(Y[X])}else for(let X in Y)if(Q.test(X))$[X]=g1(Y[X])};if(Array.isArray(Z))for(let Q=0;Q<Z.length;Q++)J(Z[Q]);else J(Z);return $}),cZ=j("effect/Headers/CurrentRedactedNames",{defaultValue:()=>["authorization","cookie","set-cookie","x-api-key"]});var C1="~effect/http/UrlParams",cJ=(Y)=>q(Y,C1),dJ={...x0,[C1]:C1,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:"UrlParams",params:Object.fromEntries(this.params)}},[g0](Y){return j6(this,Y)},[S0](){return _6(this.params.flat())}},ZZ=(Y)=>{let Z=Object.create(dJ);return Z.params=Y,Z},a=(Y)=>{let Z=P6(Y),$=[];for(let J=0;J<Z.length;J++)if(Array.isArray(Z[J][0])){let[Q,X]=Z[J];$.push([`${Q[0]}[${Q.slice(1).join("][")}]`,X])}else $.push(Z[J]);return ZZ($)},P6=(Y)=>{let Z=typeof Y[Symbol.iterator]==="function"?y0(Y):Object.entries(Y),$=[];for(let[J,Q]of Z)if(Array.isArray(Q)){for(let X=0;X<Q.length;X++)if(Q[X]!==void 0)$.push([J,String(Q[X])])}else if(typeof Q==="object"){let X=P6(Q);for(let[G,K]of X)$.push([[J,...typeof G==="string"?[G]:G],K])}else if(Q!==void 0)$.push([J,String(Q)]);return $},j6=B6((Y,Z)=>uJ(Y.params,Z.params)),uJ=F6(D6([hZ(),hZ()])),v6=x1(cJ,{typeConstructor:{_tag:"effect/http/UrlParams"},generation:{runtime:"UrlParams.UrlParamsSchema",Type:"UrlParams.UrlParams",Encoded:'typeof UrlParams.UrlParamsSchema["Encoded"]',importDeclaration:'import * as UrlParams from "effect/unstable/http/UrlParams"'},expected:"UrlParams",toEquivalence:()=>j6,toCodec:()=>k1()(y1(H6([IY,IY])),q1({decode:ZZ,encode:(Y)=>Y.params}))}),m0=ZZ([]);var lJ=O(2,(Y,Z)=>A6(Y.params,([$])=>$===Z).pipe(O6(([,$])=>$)));var R6=O(3,(Y,Z,$)=>ZZ(b1(U6(Y.params,([J])=>J!==Z),[Z,String($)]))),iJ=O(2,(Y,Z)=>ZZ(Z(Y.params))),S6=O(2,(Y,Z)=>{let $=a(Z),J=$.params,Q=new Set;for(let X=0;X<J.length;X++)Q.add(J[X][0]);for(let X=0;X<Y.params.length;X++){if(Q.has(Y.params[X][0]))continue;J.push(Y.params[X])}return $}),g6=O(3,(Y,Z,$)=>ZZ(b1(Y.params,[Z,String($)]))),C6=O(2,(Y,Z)=>iJ(Y,W6(a(Z).params)));class h0 extends P("UrlParamsError"){}var uZ=(Y,Z,$)=>{try{let J=new URL(Y,pJ());for(let Q=0;Q<Z.params.length;Q++){let[X,G]=Z.params[Q];if(G!==void 0)J.searchParams.append(X,G)}if($!==void 0)J.hash=$;return PY(J)}catch(J){return h(new h0({cause:J}))}},f0=(Y)=>new URLSearchParams(Y.params).toString(),pJ=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname;return},nJ=(Y)=>{let Z={};for(let[$,J]of Y.params){let Q=Z[$];if(Q===void 0)Z[$]=J;else if(typeof Q==="string")Z[$]=[Q,J];else Q.push(J)}return Z},aJ=nJ,b6=(Y)=>v6.pipe(cY(I6,T6({decode:(Z)=>BY(lJ(Z,Y),{onNone:()=>g(new L6([Y],new M6(void 0))),onSome:F}),encode:(Z)=>F(ZZ([[Y,Z]]))}))),q6=v6.pipe(cY(w6(IY,k0([IY,E6(IY)])),q1({decode:aJ,encode:a})));var m1="~effect/http/HttpBody";var x6="~effect/http/HttpBody/HttpBodyError";class f1 extends P("HttpBodyError"){[x6]=x6}class MZ{[m1];constructor(){this[m1]=m1}[hY](){return this.toJSON()}toString(){return k6(this,{ignoreToString:!0})}}class h6 extends MZ{_tag="Empty";toJSON(){return{_id:"effect/HttpBody",_tag:"Empty"}}}var QZ=new h6;class f6 extends MZ{_tag="Raw";body;contentType;contentLength;constructor(Y,Z,$){super();this.body=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Raw",body:this.body,contentType:this.contentType,contentLength:this.contentLength}}}var c1=(Y,Z)=>new f6(Y,Z?.contentType,Z?.contentLength);class c6 extends MZ{_tag="Uint8Array";body;contentType;contentLength;constructor(Y,Z,$){super();this.body=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}var lZ=(Y,Z)=>new c6(Y,Z??"application/octet-stream",Y.length),oJ=new TextEncoder,uY=(Y,Z)=>lZ(oJ.encode(Y),Z??"text/plain"),c0=(Y,Z)=>uY(JSON.stringify(Y),Z??"application/json"),d0=(Y,Z)=>GY({try:()=>uY(JSON.stringify(Y),Z??"application/json"),catch:($)=>new f1({reason:{_tag:"JsonError"},cause:$})}),d1=(Y,Z)=>{let $=m6(LZ(Y));return(J,Q)=>$(J,Z).pipe(JZ((X)=>new f1({reason:{_tag:"SchemaError",issue:X},cause:X})),U((X)=>d0(X,Q)))},d6=(Y,Z)=>uY(f0(Y),Z??"application/x-www-form-urlencoded");class u6 extends MZ{_tag="FormData";contentType=void 0;contentLength=void 0;formData;constructor(Y){super();this.formData=Y}toJSON(){return{_id:"effect/HttpBody",_tag:"FormData",formData:this.formData}}}var u0=(Y)=>new u6(Y),y6=(Y,Z,$)=>{if($==null)return;if(typeof $==="object"){Y.append(Z,$);return}Y.append(Z,String($))},l6=(Y)=>{let Z=new globalThis.FormData;for(let[$,J]of Object.entries(Y))if(Array.isArray(J))for(let Q of J)y6(Z,$,Q);else y6(Z,$,J);return u0(Z)};class i6 extends MZ{_tag="Stream";stream;contentType;contentLength;constructor(Y,Z,$){super();this.stream=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Stream",contentType:this.contentType,contentLength:this.contentLength}}}var jY=(Y,Z,$)=>new i6(Y,Z??"application/octet-stream",$),p6=(Y,Z)=>U(dY.asEffect(),($)=>L($.stat(Y),(J)=>jY($.stream(Y,Z),Z?.contentType,Number(J.size))));var TZ=(Y)=>Y!=="GET"&&Y!=="HEAD"&&Y!=="OPTIONS"&&Y!=="TRACE";var n6=[["GET","get"],["POST","post"],["PUT","put"],["DELETE","del"],["PATCH","patch"],["HEAD","head"],["OPTIONS","options"],["TRACE","trace"]];var u1="~effect/http/HttpClientRequest",KZ=(Y)=>q(Y,u1),sJ={[u1]:u1,..._Y,toJSON(){return{_id:"HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:fY(this.headers),body:this.body.toJSON()}},pipe(){return vY(this,arguments)}};function R(Y,Z,$,J,Q,X){let G=Object.create(sJ);return G.method=Y,G.url=Z,G.urlParams=$,G.hash=J,G.headers=Q,G.body=X,G}var i1=R("GET","",m0,H(),n,QZ),KY=(Y)=>(Z,$)=>p1(i1,{method:Y,url:Z,...$??void 0}),tJ=KY("GET"),eJ=KY("POST"),YQ=KY("PATCH"),ZQ=KY("PUT"),$Q=KY("DELETE");var JQ=KY("HEAD"),QQ=KY("OPTIONS"),XQ=KY("TRACE"),p1=O(2,(Y,Z)=>{let $=Y;if(Z.method)$=r6($,Z.method);if(Z.url)$=EZ($,Z.url);if(Z.headers)$=p0($,Z.headers);if(Z.urlParams)$=e6($,Z.urlParams);if(Z.hash)$=Y7($,Z.hash);if(Z.body)$=$Y($,Z.body);if(Z.accept)$=n1($,Z.accept);if(Z.acceptJson)$=s6($);return $}),r6=O(2,(Y,Z)=>R(Z,Y.url,Y.urlParams,Y.hash,Y.headers,Y.body)),HZ=O(3,(Y,Z,$)=>R(Y.method,Y.url,Y.urlParams,Y.hash,HY(Y.headers,Z,$),Y.body)),p0=O(2,(Y,Z)=>R(Y.method,Y.url,Y.urlParams,Y.hash,b0(Y.headers,Z),Y.body)),GQ=O(3,(Y,Z,$)=>HZ(Y,"Authorization",`Basic ${btoa(`${i0(Z)}:${i0($)}`)}`)),KQ=O(2,(Y,Z)=>HZ(Y,"Authorization",`Bearer ${i0(Z)}`)),n1=O(2,(Y,Z)=>HZ(Y,"Accept",Z)),s6=n1("application/json"),EZ=O(2,(Y,Z)=>{if(typeof Z==="string")return R(Y.method,Z,Y.urlParams,Y.hash,Y.headers,Y.body);let $=new URL(Z.toString()),J=a($.searchParams),Q=l1($.hash===""?void 0:$.hash.slice(1));return $.search="",$.hash="",R(Y.method,$.toString(),J,Q,Y.headers,Y.body)}),a1=O(2,(Y,Z)=>{if(Z==="")return Y;return R(Y.method,t6(Z,Y.url),Y.urlParams,Y.hash,Y.headers,Y.body)}),VQ=O(2,(Y,Z)=>{if(Z==="")return Y;return R(Y.method,t6(Y.url,Z),Y.urlParams,Y.hash,Y.headers,Y.body)}),t6=(Y,Z)=>{let $=Y.endsWith("/"),J=Z.startsWith("/");return $&&J?Y+Z.slice(1):!$&&!J?Y+"/"+Z:Y+Z},zQ=O(2,(Y,Z)=>R(Y.method,Z(Y.url),Y.urlParams,Y.hash,Y.headers,Y.body)),_Q=O(3,(Y,Z,$)=>R(Y.method,Y.url,R6(Y.urlParams,Z,$),Y.hash,Y.headers,Y.body)),e6=O(2,(Y,Z)=>R(Y.method,Y.url,S6(Y.urlParams,Z),Y.hash,Y.headers,Y.body)),BQ=O(3,(Y,Z,$)=>R(Y.method,Y.url,g6(Y.urlParams,Z,$),Y.hash,Y.headers,Y.body)),OQ=O(2,(Y,Z)=>R(Y.method,Y.url,C6(Y.urlParams,Z),Y.hash,Y.headers,Y.body)),Y7=O(2,(Y,Z)=>R(Y.method,Y.url,Y.urlParams,b(Z),Y.headers,Y.body)),DQ=(Y)=>R(Y.method,Y.url,Y.urlParams,H(),Y.headers,Y.body),$Y=O(2,(Y,Z)=>{let $=Y.headers;if(Z._tag==="Empty"||Z._tag==="FormData")$=q0(q0($,"Content-Type"),"Content-length");else{if(Z.contentType)$=HY($,"content-type",Z.contentType);if(Z.contentLength!==void 0)$=HY($,"content-length",Z.contentLength.toString())}return R(Y.method,Y.url,Y.urlParams,Y.hash,$,Z)}),WQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,lZ(Z,$))),AQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,uY(Z,$))),UQ=O(2,(Y,Z)=>L(d0(Z),($)=>$Y(Y,$))),FQ=O(2,(Y,Z)=>$Y(Y,c0(Z))),NQ=(Y,Z)=>{let $=d1(Y,Z);return O(2,(J,Q)=>L($(Q),(X)=>$Y(J,X)))},LQ=O(2,(Y,Z)=>$Y(Y,d6(a(Z)))),MQ=O(2,(Y,Z)=>$Y(Y,u0(Z))),TQ=O(2,(Y,Z)=>$Y(Y,l6(Z))),wQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,jY(Z,$?.contentType,$?.contentLength))),HQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>L(p6(Z,$),(J)=>$Y(Y,J)));function o1(Y){let Z=uZ(Y.url,Y.urlParams,XZ(Y.hash));if(o6(Z))return b(Z.success);return H()}var EQ=(Y)=>{let Z=Y.method.toUpperCase();return p1(i1,{method:Z,url:new URL(Y.url),headers:Y.headers,body:IQ(Y,Z)})},IQ=(Y,Z)=>{if(!TZ(Z)||Y.body===null)return QZ;return c1(Y.body,{contentType:Y.headers.get("content-type")??void 0,contentLength:PQ(Y.headers.get("content-length"))})},PQ=(Y)=>{if(Y===null)return;let Z=Number.parseInt(Y,10);return Number.isNaN(Z)?void 0:Z},Z7=(Y,Z)=>{let $=uZ(Y.url,Y.urlParams,XZ(Y.hash));if(iZ($))return h($.failure);let J={method:Y.method,headers:Y.headers};if(Z?.signal)J.signal=Z.signal;if(TZ(Y.method))switch(Y.body._tag){case"Empty":break;case"Raw":{if(J.body=Y.body.body,jQ(Y.body.body))J.duplex="half";break}case"Uint8Array":{J.body=Y.body.body;break}case"FormData":{J.body=Y.body.formData;break}case"Stream":{J.body=wZ(Y.body.stream,Z?.context??GZ()),J.duplex="half";break}}return a6({try:()=>new Request($.success,J),catch:(Q)=>new h0({cause:Q})})},jQ=(Y)=>typeof ReadableStream<"u"&&Y instanceof ReadableStream,vQ=(Y,Z)=>ZY(($)=>Z7(Y,{context:$,signal:Z?.signal}).asEffect());var e0={};kY(e0,{stream:()=>kQ,schemaNoBody:()=>yQ,schemaJson:()=>xQ,schemaHeaders:()=>N7,schemaBodyUrlParams:()=>oZ,schemaBodyJson:()=>s0,matchStatus:()=>mQ,fromWeb:()=>J5,filterStatusOk:()=>X5,filterStatus:()=>Q5,TypeId:()=>zZ});var r1="~effect/http/Cookies",SQ=(Y)=>q(Y,r1);var $7="~effect/http/Cookies/Cookie";var J7="~effect/http/Cookies/CookieError";class B7 extends n0{}class VZ extends P("CookieError"){static fromReason(Y,Z){return new VZ({reason:new B7({_tag:Y,cause:Z})})}[J7]=J7;get message(){return this.reason._tag}}var gQ={[r1]:r1,..._Y,toJSON(){return{_id:"effect/Cookies",cookies:K7(this.cookies,(Y)=>Y.toJSON())}},pipe(){return vY(this,arguments)}},t1=(Y)=>{let Z=Object.create(gQ);return Z.cookies=Y,Z},O7=(Y)=>{let Z={};for(let $ of Y)Z[$.name]=$;return t1(Z)},e1=(Y)=>{let Z=typeof Y==="string"?[Y]:Y,$=[];for(let J of Z){let Q=CQ(J.trim());if(Q)$.push(Q)}return O7($)};function CQ(Y){let Z=Y.split(";").map((K)=>K.trim()).filter((K)=>K!=="");if(Z.length===0)return;let $=Z[0].indexOf("=");if($===-1)return;let J=Z[0].slice(0,$);if(!nZ.test(J))return;let Q=Z[0].slice($+1),X=U7(Q);if(Z.length===1)return Object.assign(Object.create(s1),{name:J,value:X,valueEncoded:Q});let G={};for(let K=1;K<Z.length;K++){let z=Z[K],_=z.indexOf("="),B=_===-1?z:z.slice(0,_).trim(),V=_===-1?void 0:z.slice(_+1).trim();switch(B.toLowerCase()){case"domain":{if(V===void 0)break;let D=V.trim().replace(/^\./,"");if(D)G.domain=D;break}case"expires":{if(V===void 0)break;let D=new Date(V);if(!isNaN(D.getTime()))G.expires=D;break}case"max-age":{if(V===void 0)break;let D=parseInt(V,10);if(!isNaN(D))G.maxAge=IZ(D);break}case"path":{if(V===void 0)break;if(V[0]==="/")G.path=V;break}case"priority":{if(V===void 0)break;switch(V.toLowerCase()){case"low":G.priority="low";break;case"medium":G.priority="medium";break;case"high":G.priority="high";break}break}case"httponly":{G.httpOnly=!0;break}case"secure":{G.secure=!0;break}case"partitioned":{G.partitioned=!0;break}case"samesite":{if(V===void 0)break;switch(V.toLowerCase()){case"lax":G.sameSite="lax";break;case"strict":G.sameSite="strict";break;case"none":G.sameSite="none";break}break}}}return Object.assign(Object.create(s1),{name:J,value:X,valueEncoded:Q,options:Object.keys(G).length>0?G:void 0})}var a0=O7([]),o0=(Y)=>G7(Y.cookies),nZ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,s1={[$7]:$7,..._Y,toJSON(){return{_id:"effect/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}};function bQ(Y,Z,$){if(!nZ.test(Y))return h(VZ.fromReason("InvalidCookieName"));let J=encodeURIComponent(Z);if(J&&!nZ.test(J))return h(VZ.fromReason("InvalidCookieValue"));if($!==void 0){if($.domain!==void 0&&!nZ.test($.domain))return h(VZ.fromReason("InvalidCookieDomain"));if($.path!==void 0&&!nZ.test($.path))return h(VZ.fromReason("InvalidCookiePath"));if($.maxAge!==void 0&&!z7(aZ($.maxAge)))return h(VZ.fromReason("CookieInfinityMaxAge"))}return PY(Object.assign(Object.create(s1),{name:Y,value:Z,valueEncoded:J,options:$}))}var Y5=O(2,(Y,Z)=>t1({...Y.cookies,...Z.cookies}));var D7=O((Y)=>SQ(Y[0]),(Y,Z,$,J)=>X7(bQ(Z,$,J),(Q)=>t1(V7(Y.cookies,Z,Q))));function qQ(Y){let Z=Y.name+"="+Y.valueEncoded;if(Y.options===void 0)return Z;let $=Y.options;if($.maxAge!==void 0){let J=_7(aZ($.maxAge));Z+="; Max-Age="+Math.trunc(J)}if($.domain!==void 0)Z+="; Domain="+$.domain;if($.path!==void 0)Z+="; Path="+$.path;if($.priority!==void 0)switch($.priority){case"low":Z+="; Priority=Low";break;case"medium":Z+="; Priority=Medium";break;case"high":Z+="; Priority=High";break}if($.expires!==void 0)Z+="; Expires="+$.expires.toUTCString();if($.httpOnly)Z+="; HttpOnly";if($.secure)Z+="; Secure";if($.partitioned)Z+="; Partitioned";if($.sameSite!==void 0)switch($.sameSite){case"lax":Z+="; SameSite=Lax";break;case"strict":Z+="; SameSite=Strict";break;case"none":Z+="; SameSite=None";break}return Z}var W7=(Y)=>Object.values(Y.cookies).map((Z)=>`${Z.name}=${Z.valueEncoded}`).join("; ");var A7=(Y)=>Object.values(Y.cookies).map(qQ);function Z5(Y){let Z={},$=Y.length,J=0,Q=0;while(!0){if(Q===$)break;if(Q=Y.indexOf(";",J),Q===-1)Q=$;let X=Y.indexOf("=",J);if(X===-1)break;if(X>Q){J=Q+1;continue}let G=Y.substring(J,X++).trim();if(Z[G]===void 0){let K=Y.charCodeAt(X)===34?Y.substring(X+1,Q-1).trim():Y.substring(X,Q).trim();Z[G]=K.indexOf("%")!==-1?U7(K):K}J=Q+1}return Z}var U7=(Y)=>{try{return decodeURIComponent(Y)}catch(Z){return Y}};var c="~effect/http/HttpIncomingMessage";var s0=(Y,Z)=>{let $=iY(LZ(Y).annotate({options:Z}));return(J)=>U(J.json,$)},oZ=(Y,Z)=>{let $=q6.pipe(cY(Y),F7({options:Z}),iY);return(J)=>U(J.urlParamsBody,$)},N7=(Y,Z)=>{let $=f(Y);return(J)=>$(J.headers,Z)},rZ=j("effect/http/HttpIncomingMessage/MaxBodySize",{defaultValue:()=>{return}}),sZ=(Y,Z)=>{let $=Y.headers["content-type"]??"",J;if($.includes("application/json"))try{J=o(Y.json)}catch(X){}else if($.includes("text/")||$.includes("urlencoded"))try{J=o(Y.text)}catch(X){}let Q={...Z,headers:fY(Y.headers),remoteAddress:Y.remoteAddress};if(J!==void 0)Q.body=J;return Q};var zZ="~effect/http/HttpClientResponse",J5=(Y,Z)=>new L7(Y,Z),xQ=(Y,Z)=>{let $=iY(LZ(Y).annotate({options:Z}));return(J)=>U(J.json,(Q)=>$({status:J.status,headers:J.headers,body:Q}))},yQ=(Y,Z)=>{let $=iY(Y.annotate({options:Z}));return(J)=>$({status:J.status,headers:J.headers})},kQ=(Y)=>$5(L(Y,(Z)=>Z.stream)),mQ=O(2,(Y,Z)=>{let $=Y.status;if(Z[$])return Z[$](Y);else if($>=200&&$<300&&Z["2xx"])return Z["2xx"](Y);else if($>=300&&$<400&&Z["3xx"])return Z["3xx"](Y);else if($>=400&&$<500&&Z["4xx"])return Z["4xx"](Y);else if($>=500&&$<600&&Z["5xx"])return Z["5xx"](Y);return Z.orElse(Y)}),Q5=O(2,(Y,Z)=>_Z(()=>Z(Y.status)?F(Y):g(new x({reason:new kZ({response:Y,request:Y.request,description:"invalid status code"})})))),X5=(Y)=>Y.status>=200&&Y.status<300?F(Y):g(new x({reason:new kZ({response:Y,request:Y.request,description:"non 2xx status code"})}));class L7 extends RY{[c];[zZ];request;source;constructor(Y,Z){super();this.request=Y,this.source=Z,this[c]=c,this[zZ]=zZ}toJSON(){return sZ(this,{_id:"HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return C(this.source.headers)}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=e1(this.source.headers.getSetCookie())}get remoteAddress(){return H()}get stream(){return this.source.body?SY({evaluate:()=>this.source.body,onError:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}):tZ(new x({reason:new R0({request:this.request,response:this,description:"can not create stream from empty body"})}))}get json(){return U(this.text,(Y)=>GY({try:()=>Y===""?null:JSON.parse(Y),catch:(Z)=>new x({reason:new TY({request:this.request,response:this,cause:Z})})}))}textBody;get text(){return this.textBody??=d({try:()=>this.source.text(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>new x({reason:new TY({request:this.request,response:this,cause:Z})})}))}formDataBody;get formData(){return this.formDataBody??=d({try:()=>this.source.formData(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody??=d({try:()=>this.source.arrayBuffer(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}pipe(){return vY(this,arguments)}}var G1={};kY(G1,{withScope:()=>HX,withRateLimiter:()=>OX,withCookiesRef:()=>wX,transformResponse:()=>s,transform:()=>A5,tapRequest:()=>TX,tapError:()=>MX,tap:()=>LX,retryTransient:()=>BX,retry:()=>_X,put:()=>rQ,post:()=>aQ,patch:()=>oQ,options:()=>tQ,mapRequestInputEffect:()=>zX,mapRequestInput:()=>VX,mapRequestEffect:()=>KX,mapRequest:()=>F5,makeWith:()=>VY,make:()=>U5,layerMergedContext:()=>N5,isHttpClient:()=>r7,head:()=>nQ,get:()=>pQ,followRedirects:()=>EX,filterStatusOk:()=>XX,filterStatus:()=>QX,filterOrFail:()=>JX,filterOrElse:()=>$X,execute:()=>iQ,del:()=>sQ,catchTags:()=>ZX,catchTag:()=>YX,catch:()=>eQ,TracerPropagationEnabled:()=>e7,TracerDisabledWhen:()=>t7,SpanNameGenerator:()=>Y8,HttpClient:()=>vZ});var T7=(Y)=>wY({b3:`${Y.traceId}-${Y.spanId}-${Y.sampled?"1":"0"}${BY(Y.parent,{onNone:()=>"",onSome:(Z)=>`-${Z.spanId}`})}`,traceparent:`00-${Y.traceId}-${Y.spanId}-${Y.sampled?"01":"00"}`}),w7=(Y)=>{let Z=uQ(Y);if(r(Z))return Z;if(Z=hQ(Y),r(Z))return Z;return fQ(Y)},hQ=(Y)=>{if(!("b3"in Y))return H();let Z=Y.b3.split("-");if(Z.length<2)return H();return b(Y1({traceId:Z[0],spanId:Z[1],sampled:Z[2]?Z[2]==="1":!0}))},fQ=(Y)=>{if(!Y["x-b3-traceid"]||!Y["x-b3-spanid"])return H();return b(Y1({traceId:Y["x-b3-traceid"],spanId:Y["x-b3-spanid"],sampled:Y["x-b3-sampled"]?Y["x-b3-sampled"]==="1":!0}))},cQ=/^[0-9a-f]{32}$/i,dQ=/^[0-9a-f]{16}$/i,uQ=(Y)=>{if(!Y.traceparent)return H();let Z=Y.traceparent.split("-");if(Z.length!==4)return H();let[$,J,Q,X]=Z;switch($){case"00":{if(cQ.test(J)===!1||dQ.test(Q)===!1)return H();return b(Y1({traceId:J,spanId:Q,sampled:(parseInt(X,16)&1)===1}))}default:return H()}};var V5="~effect/http/HttpClient",r7=(Y)=>q(Y,V5),vZ=S("effect/HttpClient"),aY=(Y)=>(...Z)=>U(vZ.asEffect(),($)=>$[Y](...Z)),iQ=aY("execute"),pQ=aY("get"),nQ=aY("head"),aQ=aY("post"),oQ=aY("patch"),rQ=aY("put"),sQ=aY("del"),tQ=aY("options"),A5=O(2,(Y,Z)=>VY(U(($)=>Z(Y.postprocess(F($)),$)),Y.preprocess)),s=O(2,(Y,Z)=>VY(($)=>Z(Y.postprocess($)),Y.preprocess)),eQ=O(2,(Y,Z)=>s(Y,b7(Z)));var YX=O(3,(Y,Z,$)=>s(Y,X1(Z,$))),ZX=O(2,(Y,Z)=>s(Y,q7(Z))),$X=O(3,(Y,Z,$)=>s(Y,m7(Z,$))),JX=O(3,(Y,Z,$)=>s(Y,h7(Z,$))),QX=O(2,(Y,Z)=>s(Y,U(Q5(Z)))),XX=s(U(X5)),VY=(Y,Z)=>{let $=Object.create(GX);return $.preprocess=Z,$.postprocess=Y,$.execute=function(J){return Y(Z(J))},$},GX={[V5]:V5,pipe(){return vY(this,arguments)},..._Y,toJSON(){return{_id:"effect/HttpClient"}},...Object.fromEntries(n6.map(([Y,Z])=>[Z,function($,J){return this.execute(KY(Y)($,J))}]))},U5=(Y)=>VY((Z)=>U(Z,($)=>u((J)=>{let Q=Z8.get($),X=Q??new AbortController,G=uZ($.url,$.urlParams,XZ($.hash));if(iZ(G))return g(new x({reason:new v0({request:$,cause:G.failure})}));let K=G.success;if(J.getRef(R7)||J.getRef(t7)($)){let _=Y($,K,X.signal,J);if(Q)return _;return K5((B)=>jZ(B(_),{onSuccess(V){return Z1.register(V,X),F(new z5(V,X))},onFailure(V){if(G5(V))X.abort();return eZ(V)}}))}return l7(J.getRef(Y8)($),{kind:"client"},(_)=>{if(_.attribute("http.request.method",$.method),_.attribute("server.address",K.origin),K.port!=="")_.attribute("server.port",+K.port);_.attribute("url.full",K.toString()),_.attribute("url.path",K.pathname),_.attribute("url.scheme",K.protocol.slice(0,-1));let B=K.search.slice(1);if(B!=="")_.attribute("url.query",B);let V=J.getRef(cZ),D=YZ($.headers,V);for(let A in D)_.attribute(`http.request.header.${A}`,String(D[A]));return $=J.getRef(e7)?p0($,T7(_)):$,K5((A)=>A(Y($,K,X.signal,J)).pipe(i7(_,{captureStackTrace:!1}),jZ({onSuccess:(W)=>{_.attribute("http.response.status_code",W.status);let N=YZ(W.headers,V);for(let T in N)_.attribute(`http.response.header.${T}`,String(N[T]));if(Q)return F(W);return Z1.register(W,X),F(new z5(W,X))},onFailure(W){if(!Q&&G5(W))X.abort();return eZ(W)}})))})})),F),F5=O(2,(Y,Z)=>VY(Y.postprocess,($)=>L(Y.preprocess($),Z))),KX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>U(Y.preprocess($),Z))),VX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>Y.preprocess(Z($)))),zX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>U(Z($),Y.preprocess))),_X=O(2,(Y,Z)=>s(Y,D5(Z))),BX=O(2,(Y,Z)=>{let $=g7(Z),J=$?"errors-and-responses":Z.retryOn??"errors-and-responses",Q=$?Z:Z.schedule,X=Q&&C7(Q),G=$?void 0:Z.times;return s(Y,_5(J==="errors-only"?BZ:u7({schedule:X,times:G,while:$8}),J==="response-only"?BZ:D5({while:$||Z.while===void 0?E7:P7(E7,Z.while),schedule:Q,times:G})))}),OX=O(2,(Y,Z)=>{let $={initial:!0,limit:Z.limit,window:Y0(aZ(Z.window),gY(1))},J=new Map,Q=Z.key,X=typeof Q==="function"?Q:DY(Q),G=Z.tokens,K=typeof G==="function"?G:DY(G??1),z=(B)=>{let V=J.get(B);if(V!==void 0)return V;return J.set(B,$),$},_=Z.disableResponseInspection?void 0:(B,V,D,A)=>{let W=z(V),N=DX(W,B,D,A);if(N.limit!==W.limit||!B5(N.window,W.window))J.set(V,N)};return A5(Y,function B(V,D){let W=nY().getRef(J1),N=X(D),T=Math.max(K(D),1),E=z(N);function YY(I){if(Z.disableResponseInspection)return B(V,D);let p=s7(W,PZ(I.headers,"retry-after"));return p?U(k7(p),()=>B(V,D)):B(V,D)}return U(Z.limiter.consume({algorithm:Z.algorithm,onExceeded:"delay",key:N,limit:E.limit,window:E.window,tokens:T}),({delay:I})=>{let p=f7(V,{onSuccess(w){if(_?.(W,N,w.headers,T),w.status!==429)return F(w);return YY(w)},onFailure(w){if(PX(w))return _?.(W,N,w.reason.response.headers,T),YY(w.reason.response);return g(w)}});return v7(I)?p:y7(p,I)})})}),DX=(Y,Z,$,J)=>{let Q=WX(Y,$,J)??Y.limit,X=UX(Z,$)??Y.window;if(Q===Y.limit&&B5(X,Y.window))return Y;return{limit:Q,window:X,initial:!1}},WX=(Y,Z,$)=>{let J=PZ(Z,"ratelimit-limit","x-ratelimit-limit"),Q=J0(J);if(Q!==void 0&&Q>0)return Q;let X=AX(Z);if(X===void 0)return;return Y.initial?X+$:Math.max(X+$,Y.limit)},AX=(Y)=>{let Z=PZ(Y,"ratelimit-remaining","x-ratelimit-remaining"),$=J0(Z);return $!==void 0&&$>=0?$:void 0},UX=(Y,Z)=>{let $=s7(Y,PZ(Z,"retry-after"));if($!==void 0)return $;let J=FX(PZ(Z,"ratelimit-reset-after","x-ratelimit-reset-after"));if(J!==void 0)return J;return NX(Y,PZ(Z,"ratelimit-reset","x-ratelimit-reset"))},s7=(Y,Z)=>{if(Z===void 0)return;let $=J0(Z);if($!==void 0)return Y0(IZ($),gY(1));let J=Date.parse(Z);if(Number.isNaN(J))return;let Q=J-Y.currentTimeMillisUnsafe();if(Q<=0)return gY(1);return gY(Q)},FX=(Y)=>{let Z=J0(Y);if(Z===void 0||Z<=0)return;return Y0(IZ(Z),gY(1))},NX=(Y,Z)=>{let $=J0(Z);if($===void 0||$<=0)return;let J=Y.currentTimeMillisUnsafe();if($>1000000000000)return gY(Math.max($-J,1));if($>1e9)return gY(Math.max($*1000-J,1));return Y0(IZ($),gY(1))},J0=(Y)=>{if(Y===void 0)return;let Z=/-?\d+(?:\.\d+)?/.exec(Y);if(Z===null)return;let $=Number(Z[0]);return Number.isFinite($)?$:void 0},PZ=(Y,...Z)=>{for(let $=0;$<Z.length;$++){let J=Y[Z[$]];if(J!==void 0)return J}return},LX=O(2,(Y,Z)=>s(Y,Q1(Z))),MX=O(2,(Y,Z)=>s(Y,x7(Z))),TX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>Q1(Y.preprocess($),Z))),wX=O(2,(Y,Z)=>VY(($)=>Q1(Y.postprocess($),(J)=>o7(Z,(Q)=>Y5(Q,J.cookies))),($)=>U(Y.preprocess($),(J)=>L(a7(Z),(Q)=>o0(Q)?J:HZ(J,"cookie",W7(Q)))))),HX=(Y)=>A5(Y,(Z,$)=>{let J=new AbortController;return Z8.set($,J),$0(c7(()=>WY(()=>J.abort())),Z)}),EX=O((Y)=>r7(Y[0]),(Y,Z)=>VY(($)=>{let J=(Q,X)=>U(Y.postprocess(F(Q)),(G)=>G.status>=300&&G.status<400&&G.headers.location&&X<(Z??10)?J(EZ(Q,new URL(G.headers.location,G.request.url)),X+1):F(G));return U($,(Q)=>J(Q,0))},Y.preprocess)),t7=j("effect/http/HttpClient/TracerDisabledWhen",{defaultValue:()=>$1}),e7=j("effect/HttpClient/TracerPropagationEnabled",{defaultValue:I7}),Y8=j("effect/http/HttpClient/SpanNameGenerator",{defaultValue:()=>(Y)=>`http.client ${Y.method}`}),N5=(Y)=>pY(vZ)(ZY((Z)=>L(Y,($)=>s($,W5((J)=>j7(Z,J)))))),Z1=(()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){let Z=new FinalizationRegistry(($)=>{$.abort()});return{register($,J){Z.register($,J,$)},unregister($){Z.unregister($)}}}let Y=new Map;return{register(Z,$){Y.set(Z,setTimeout(()=>$.abort(),5000))},unregister(Z){let $=Y.get(Z);if($===void 0)return;clearTimeout($),Y.delete(Z)}}})(),Z8=new WeakMap;class z5{original;controller;constructor(Y,Z){this.original=Y,this.controller=Z}[zZ]=zZ;[c]=c;applyInterrupt(Y){return _Z(()=>{return Z1.unregister(this.original),d7(Y,()=>WY(()=>{this.controller.abort()}))})}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return p7(()=>{return Z1.unregister(this.original),n7(this.original.stream,WY(()=>{this.controller.abort()}))})}toJSON(){return this.original.toJSON()}[hY](){return this.original[hY]()}pipe(){return vY(this,arguments)}}var E7=(Y)=>S7(Y)||IX(Y),IX=(Y)=>P0(Y)&&(Y.reason._tag==="TransportError"||Y.reason._tag==="StatusCodeError"&&$8(Y.reason.response)),PX=(Y)=>P0(Y)&&Y.reason._tag==="StatusCodeError"&&Y.reason.response.status===429,$8=(Y)=>Y.status===408||Y.status===429||Y.status===500||Y.status===502||Y.status===503||Y.status===504;var X8={};kY(X8,{layer:()=>vX,RequestInit:()=>L5,Fetch:()=>Q8});var Q8=j("effect/http/FetchHttpClient/Fetch",{defaultValue:()=>globalThis.fetch});class L5 extends S()("effect/http/FetchHttpClient/RequestInit"){}var jX=U5((Y,Z,$,J)=>{let Q=J.getRef(Q8),X=J.context.mapUnsafe.get(L5.key)??{},G=X.headers?fZ(C(X.headers),Y.headers):Y.headers,K=(z)=>L(d({try:()=>Q(Z,{...X,method:Y.method,headers:G,body:z,duplex:Y.body._tag==="Stream"?"half":void 0,signal:$}),catch:(_)=>new x({reason:new j0({request:Y,cause:_})})}),(_)=>J5(Y,_));switch(Y.body._tag){case"Raw":case"Uint8Array":return K(Y.body.body);case"FormData":return K(Y.body.formData);case"Stream":return U(J8(Y.body.stream),K)}return K(void 0)}),vX=N5(F(jX));var qJ={};kY(qJ,{use:()=>SJ,toWebHandler:()=>H2,toHttpEffect:()=>A2,serve:()=>w2,schemaPathParams:()=>O2,schemaParams:()=>B2,schemaNoBody:()=>_2,schemaJson:()=>z2,route:()=>gJ,provideRequest:()=>T2,prefixRoute:()=>CJ,prefixPath:()=>T0,params:()=>RJ,middleware:()=>R1,make:()=>vJ,layer:()=>xZ,disableLogger:()=>M2,cors:()=>L2,addAll:()=>W2,add:()=>D2,RouterConfig:()=>v1,RouteContext:()=>WZ,HttpRouter:()=>LY});var G8=/\+/g,K8=function(){};K8.prototype=Object.create(null);function V8(Y){let Z=new K8;if(typeof Y!=="string")return Z;let $=Y.length,J="",Q="",X=-1,G=-1,K=!1,z=!1,_=!1,B=!1,V=!1,D=0;for(let A=0;A<$+1;A++)if(D=A!==$?Y.charCodeAt(A):38,D===38){if(V=G>X,!V)G=A;if(J=Y.slice(X+1,G),V||J.length>0){if(_)J=J.replace(G8," ");if(K)try{J=decodeURIComponent(J)||J}catch{}if(V){if(Q=Y.slice(G+1,A),B)Q=Q.replace(G8," ");if(z)try{Q=decodeURIComponent(Q)||Q}catch{}}let W=Z[J];if(W===void 0)Z[J]=Q;else if(W.pop)W.push(Q);else Z[J]=[W,Q]}Q="",X=A,G=A,K=!1,z=!1,_=!1,B=!1}else if(D===61)if(G<=X)G=A;else z=!0;else if(D===43)if(G>X)B=!0;else _=!0;else if(D===37)if(G>X)z=!0;else K=!0;return Z}var SX=/^https?:\/\/.*?\//,M5=/(\/:[^/()]*?)\?(\/?)/,O8=(Y={})=>new D8(Y);class D8{constructor(Y={}){this.options={ignoreTrailingSlash:!0,ignoreDuplicateSlashes:!0,caseSensitive:!1,maxParamLength:100,...Y}}options;routes=[];trees={};on(Y,Z,$){let J=Z.match(M5);if(J&&J.index!==void 0){gX(Z.length===J.index+J[0].length,"Optional Parameter needs to be the last parameter of the path");let X=Z.replace(M5,"$1$2"),G=Z.replace(M5,"$2");this.on(Y,X,$),this.on(Y,G,$);return}if(this.options.ignoreDuplicateSlashes)Z=z8(Z);if(this.options.ignoreTrailingSlash)Z=_8(Z);let Q=typeof Y==="string"?[Y]:Y;for(let X of Q)this._on(X,Z,$)}all(Y,Z){this.on(kX,Y,Z)}_on(Y,Z,$){if(this.trees[Y]===void 0)this.trees[Y]=new Q0("/");let J=Z;if(J==="*"&&this.trees[Y].prefix.length!==0){let z=this.trees[Y];this.trees[Y]=new Q0(""),this.trees[Y].staticChildren["/"]=z}let Q=this.trees[Y].prefix.length,X=this.trees[Y],G=[];for(let z=0;z<=J.length;z++){if(J.charCodeAt(z)===58&&J.charCodeAt(z+1)===58){z++;continue}let _=J.charCodeAt(z)===58&&J.charCodeAt(z+1)!==58,B=J.charCodeAt(z)===42;if(_||B||z===J.length&&z!==Q){let V=J.slice(Q,z);if(!this.options.caseSensitive)V=V.toLowerCase();V=V.split("::").join(":"),V=V.split("%").join("%25"),X=X.createStaticChild(V)}if(_){let V=!1,D=[],A=z+1;for(let W=A;;W++){let N=J.charCodeAt(W),T=N===40,E=N===45||N===46,YY=N===47||W===J.length;if(T||E||YY){let I=J.slice(A,W);if(G.push(I),V=V||T||E,T){let yY=bX(J,W),w0=J.slice(W,yY+1);D.push(qX(w0)),W=yY+1}else D.push("(.*?)");let p=W;for(;W<J.length;W++){let yY=J.charCodeAt(W);if(yY===47)break;if(yY===58)if(J.charCodeAt(W+1)===58)W++;else break}let w=J.slice(p,W);if(w)w=w.split("::").join(":"),w=w.split("%").join("%25"),D.push(xX(w));if(A=W+1,YY||J.charCodeAt(W)===47||W===J.length){let yY=V?"()"+w:w,w0=J.slice(z,W);J=J.slice(0,z+1)+yY+J.slice(W),z+=yY.length;let xJ=V?new RegExp("^"+D.join("")+"$"):void 0;X=X.createParametricChild(xJ,w,w0),Q=z+1;break}}}}else if(B){if(G.push("*"),X=X.createWildcardChild(),Q=z+1,z!==J.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.options.caseSensitive)J=J.toLowerCase();if(J==="*")J="/*";for(let z of this.routes)if(z.method===Y&&z.pattern===J)throw Error(`Method '${Y}' already declared for route '${J}'`);let K={method:Y,path:Z,pattern:J,params:G,handler:$};this.routes.push(K),X.addRoute(K)}has(Y,Z){let $=this.trees[Y];if($===void 0)return!1;let J=$.getStaticChild(Z);if(J===void 0)return!1;return J.isLeafNode}find(Y,Z){let $=this.trees[Y];if($===void 0)return;if(Z.charCodeAt(0)!==47)Z=Z.replace(SX,"/");if(this.options.ignoreDuplicateSlashes)Z=z8(Z);let J,Q,X;try{J=yX(Z),Z=J.path,Q=J.querystring,X=J.shouldDecodeParam}catch(D){return}if(this.options.ignoreTrailingSlash)Z=_8(Z);let G=Z;if(this.options.caseSensitive===!1)Z=Z.toLowerCase();let K=this.options.maxParamLength,z=$.prefix.length,_=[],B=Z.length,V=[];while(!0){if(z===B&&$.isLeafNode){let A=$.handlerStorage?.find();if(A!==void 0)return{handler:A.handler,params:A.createParams(_),searchParams:V8(Q)}}let D=$.getNextNode(Z,z,V,_.length);if(D===void 0){if(V.length===0)return;let A=V.pop();z=A.brotherPathIndex,_.splice(A.paramsCount),D=A.brotherNode}if($=D,$._tag==="StaticNode"){z+=$.prefix.length;continue}if($._tag==="WildcardNode"){let A=G.slice(z);if(X)A=B8(A);_.push(A),z=B;continue}if($._tag==="ParametricNode"){let A=G.indexOf("/",z);if(A===-1)A=B;let W=G.slice(z,A);if(X)W=B8(W);if($.regex!==void 0){let N=$.regex.exec(W);if(N===null)continue;for(let T=1;T<N.length;T++){let E=N[T];if(E.length>K)return;_.push(E)}}else{if(W.length>K)return;_.push(W)}z=A}}}}class W8{handlers=[];unconstrainedHandler;find(){return this.unconstrainedHandler}add(Y){let Z={params:Y.params,handler:Y.handler,createParams:CX(Y.params)};this.handlers.push(Z),this.unconstrainedHandler=this.handlers[0]}}class T5{isLeafNode=!1;routes;handlerStorage;addRoute(Y){if(this.routes===void 0)this.routes=[Y];else this.routes.push(Y);if(this.handlerStorage===void 0)this.handlerStorage=new W8;this.isLeafNode=!0,this.handlerStorage.add(Y)}}class w5 extends T5{staticChildren={};findStaticMatchingChild(Y,Z){let $=this.staticChildren[Y.charAt(Z)];if($===void 0||!$.matchPrefix(Y,Z))return;return $}getStaticChild(Y,Z=0){if(Y.length===Z)return this;let $=this.findStaticMatchingChild(Y,Z);if($===void 0)return;return $.getStaticChild(Y,Z+$.prefix.length)}createStaticChild(Y){if(Y.length===0)return this;let Z=this.staticChildren[Y.charAt(0)];if(Z){let J=1;for(;J<Z.prefix.length;J++)if(Y.charCodeAt(J)!==Z.prefix.charCodeAt(J)){Z=Z.split(this,J);break}return Z.createStaticChild(Y.slice(J))}let $=Y.charAt(0);return this.staticChildren[$]=new Q0(Y),this.staticChildren[$]}}class Q0 extends w5{_tag="StaticNode";constructor(Y){super();this.setPrefix(Y)}prefix;matchPrefix;parametricChildren=[];wildcardChild;setPrefix(Y){if(this.prefix=Y,Y.length===1)this.matchPrefix=(Z,$)=>!0;else{let Z=Y.length;this.matchPrefix=function($,J){for(let Q=1;Q<Z;Q++)if($.charCodeAt(J+Q)!==this.prefix.charCodeAt(Q))return!1;return!0}}}getParametricChild(Y){if(Y===void 0)return this.parametricChildren.find(($)=>$.isRegex===!1);let Z=Y.source;return this.parametricChildren.find(($)=>{if($.regex===void 0)return!1;return $.regex.source===Z})}createParametricChild(Y,Z,$){let J=this.getParametricChild(Y);if(J!==void 0)return J.nodePaths.add($),J;return J=new A8(Y,Z,$),this.parametricChildren.push(J),this.parametricChildren.sort((Q,X)=>{if(!Q.isRegex)return 1;if(!X.isRegex)return-1;if(Q.staticSuffix===void 0)return 1;if(X.staticSuffix===void 0)return-1;if(X.staticSuffix.endsWith(Q.staticSuffix))return 1;if(Q.staticSuffix.endsWith(X.staticSuffix))return-1;return 0}),J}createWildcardChild(){if(this.wildcardChild===void 0)this.wildcardChild=new U8;return this.wildcardChild}split(Y,Z){let $=this.prefix.slice(0,Z),J=this.prefix.slice(Z);this.setPrefix(J);let Q=new Q0($);return Q.staticChildren[J.charAt(0)]=this,Y.staticChildren[$.charAt(0)]=Q,Q}getNextNode(Y,Z,$,J){let Q=this.findStaticMatchingChild(Y,Z),X=0;if(Q===void 0){if(this.parametricChildren.length===0)return this.wildcardChild;Q=this.parametricChildren[0],X=1}if(this.wildcardChild!==void 0)$.push({paramsCount:J,brotherPathIndex:Z,brotherNode:this.wildcardChild});for(let G=this.parametricChildren.length-1;G>=X;G--)$.push({paramsCount:J,brotherPathIndex:Z,brotherNode:this.parametricChildren[G]});return Q}}class A8 extends w5{regex;staticSuffix;_tag="ParametricNode";constructor(Y,Z,$){super();this.regex=Y,this.staticSuffix=Z,this.isRegex=!!Y,this.nodePaths=new Set([$])}isRegex;nodePaths;getNextNode(Y,Z){return this.findStaticMatchingChild(Y,Z)}}class U8 extends T5{_tag="WildcardNode";getNextNode(Y,Z,$,J){return}}var gX=(Y,Z)=>{if(!Y)throw Error(Z)};function z8(Y){return Y.replace(/\/\/+/g,"/")}function _8(Y){if(Y.length>1&&Y.charCodeAt(Y.length-1)===47)return Y.slice(0,-1);return Y}function CX(Y){let Z=Y.length;return function($){let J={};for(let Q=0;Q<Z;Q++)J[Y[Q]]=$[Q];return J}}function bX(Y,Z){let $=1;while(Z<Y.length){if(Z++,Y[Z]==="\\"){Z++;continue}if(Y[Z]===")")$--;else if(Y[Z]==="(")$++;if(!$)return Z}throw TypeError('Invalid regexp expression in "'+Y+'"')}function qX(Y){if(Y.charCodeAt(1)===94)Y=Y.slice(0,1)+Y.slice(2);if(Y.charCodeAt(Y.length-2)===36)Y=Y.slice(0,Y.length-2)+Y.slice(Y.length-1);return Y}function xX(Y){return Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function F8(Y,Z){if(Y===50){if(Z===53)return"%";if(Z===51)return"#";if(Z===52)return"$";if(Z===54)return"&";if(Z===66)return"+";if(Z===98)return"+";if(Z===67)return",";if(Z===99)return",";if(Z===70)return"/";if(Z===102)return"/";return}if(Y===51){if(Z===65)return":";if(Z===97)return":";if(Z===66)return";";if(Z===98)return";";if(Z===68)return"=";if(Z===100)return"=";if(Z===70)return"?";if(Z===102)return"?";return}if(Y===52&&Z===48)return"@";return}function yX(Y){let Z=!1,$=!1,J="";for(let X=1;X<Y.length;X++){let G=Y.charCodeAt(X);if(G===37){let K=Y.charCodeAt(X+1),z=Y.charCodeAt(X+2);if(F8(K,z)===void 0)Z=!0;else{if($=!0,K===50&&z===53)Z=!0,Y=Y.slice(0,X+1)+"25"+Y.slice(X+1),X+=2;X+=2}}else if(G===63||G===59||G===35){J=Y.slice(X+1),Y=Y.slice(0,X);break}}return{path:Z?decodeURI(Y):Y,querystring:J,shouldDecodeParam:$}}function B8(Y){let Z=Y.indexOf("%");if(Z===-1)return Y;let $="",J=Z;for(let Q=Z;Q<Y.length;Q++)if(Y.charCodeAt(Q)===37){let X=Y.charCodeAt(Q+1),G=Y.charCodeAt(Q+2),K=F8(X,G);$+=Y.slice(J,Q)+K,J=Q+3}return Y.slice(0,Z)+$+Y.slice(J)}var kX=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];var N8=O8;var H5="~effect/http/HttpServerResponse",AY=(Y)=>q(Y,H5),t=(Y)=>UY({status:Y?.status??204,statusText:Y?.statusText,headers:Y?.headers?C(Y.headers):void 0,cookies:Y?.cookies});var N3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies??a0,body:lZ(Y,G0(Z,$))})},G0=(Y,Z)=>{if(Y?.contentType)return Y.contentType;else if(Y?.headers)return Z["content-type"]},L3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies??a0,body:uY(Y,G0(Z,$))})};var M3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:c0(Y,G0(Z,$))})},T3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:uY(f0(a(Y)),G0(Z,$)??"application/x-www-form-urlencoded")})};var j5=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:jY(Y,G0(Z,$),Z?.contentLength)})};var w3=O(3,(Y,Z,$)=>UY({...Y,headers:HY(Y.headers,Z,$)})),L8=O(2,(Y,Z)=>UY({...Y,headers:b0(Y.headers,Z)}));var H3=O((Y)=>AY(Y[0]),(Y,Z,$,J)=>L(D7(Y.cookies,Z,$,J).asEffect(),(Q)=>UY({...Y,cookies:Q})));var M8=O(2,(Y,Z)=>UY({...Y,body:Z}));var T8=(Y,Z)=>{let $=new globalThis.Headers(Y.headers);if(!o0(Y.cookies)){let Q=A7(Y.cookies);for(let X of Q)$.append("set-cookie",X)}if(Z?.withoutBody)return new Response(void 0,{status:Y.status,statusText:Y.statusText,headers:$});let J=Y.body;switch(J._tag){case"Empty":return new Response(void 0,{status:Y.status,statusText:Y.statusText,headers:$});case"Uint8Array":case"Raw":{if(J.body instanceof Response){for(let[Q,X]of $)J.body.headers.set(Q,X);return J.body}return new Response(J.body,{status:Y.status,statusText:Y.statusText,headers:$})}case"FormData":return new Response(J.formData,{status:Y.status,statusText:Y.statusText,headers:$});case"Stream":return new Response(wZ(J.stream,Z?.context??GZ()),{status:Y.status,statusText:Y.statusText,headers:$})}};var fX={...x0,[H5]:H5,[RZ]:!0,toJSON(){return{_id:"HttpServerResponse",status:this.status,statusText:this.statusText,headers:fY(this.headers),cookies:this.cookies.toJSON(),body:this.body.toJSON()}}},UY=(Y)=>{let Z=Object.create(fX);if(Z.status=Y.status,Z.statusText=Y.statusText,Z.cookies=Y.cookies??a0,Z.body=Y.body??QZ,Z.body._tag!=="Empty"&&(Z.body.contentType||Z.body.contentLength)){let $=wY({...Y.headers});if(Z.body.contentType)$["content-type"]=Z.body.contentType;if(Z.body.contentLength)$["content-length"]=Z.body.contentLength.toString();Z.headers=$}else Z.headers=Y.headers??n;return Z};var oY="~effect/http/HttpServerRespondable",E8=(Y)=>q(Y,oY),cX=t({status:400}),dX=t({status:404});var I8=(Y,Z)=>{if(AY(Y))return F(Y);else if(E8(Y))return K0(Y[oY](),()=>F(Z));else if(H8(Y))return F(cX);else if(w8(Y))return F(dX);return F(Z)},P8=(Y,Z)=>{if(AY(Y))return F(Y);else if(E8(Y))return K0(Y[oY](),()=>F(Z));return F(Z)};var j8="~effect/http/HttpServerError";class l extends P("HttpServerError"){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[j8]=j8;stack=`${this.name}: ${this.message}`;get request(){return this.reason.request}get response(){return"response"in this.reason?this.reason.response:void 0}[oY](){return this.reason[oY]()}get[RZ](){return this.reason[RZ]??!1}get message(){return this.reason.message}}class JY extends P("RequestParseError"){[oY](){return F(t({status:400}))}get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return g8(this._tag,this.description,this.methodAndUrl)}}class v5 extends P("RouteNotFound"){[oY](){return F(t({status:404}))}[RZ]=!0;get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return g8(this._tag,this.description,this.methodAndUrl)}}class _1 extends S()("effect/http/HttpServerError/ClientAbort"){static annotation=this.context(!0).pipe(gZ(S8,{name:"ClientAbort",stack:v8,parent:void 0}))}var g8=(Y,Z,$)=>{let J=`${Y} (${$})`;return Z?`${J}: ${Z}`:J},R5=(Y)=>{let Z,$=lX,J=[],Q=[],X=!1;for(let G=0;G<Y.reasons.length;G++){let K=Y.reasons[G];switch(K._tag){case"Fail":{$=I8(K.error,z1),J.push(K);break}case"Die":{if(AY(K.defect))Z=K.defect;else $=P8(K.defect,z1),J.push(K);break}case"Interrupt":{if(X=K.annotations.has(_1.key),J.length>0)break;Q.push(K);break}}}if(Z)return F([Z,V1(J)]);else if(Q.length>0&&J.length===0)J.push(...Q),$=X?iX:pX;return V0($,(G)=>{return J.push(R8(G)),[G,V1(J)]})},S5=(Y)=>{let Z,$=Y.reasons.filter((J)=>{if(J._tag==="Die"&&AY(J.defect))return Z=J.defect,!1;return!0});return[Z??z1,$.length>0?b(V1($)):H()]},z1=t({status:500}),lX=F(z1),iX=F(t({status:499})),pX=F(t({status:503})),C8=(Y)=>{if(Y._tag==="Success")return Y.value;return S5(Y.cause)[0]};var A0={};kY(A0,{upgradeChannel:()=>E4,toWebResult:()=>u5,toWeb:()=>u4,toURL:()=>W0,toClientRequest:()=>q4,searchParamsFromURL:()=>m$,schemaSearchParams:()=>j4,schemaHeaders:()=>P4,schemaCookies:()=>I4,schemaBodyUrlParams:()=>S4,schemaBodyMultipart:()=>g4,schemaBodyJson:()=>v4,schemaBodyFormJson:()=>C4,schemaBodyForm:()=>R4,fromWeb:()=>f5,fromClientRequest:()=>b4,TypeId:()=>OZ,ParsedSearchParams:()=>xY,MaxBodySize:()=>rZ,HttpServerRequest:()=>M});var B1="~effect/socket/Socket/SocketError",rX=(Y)=>q(Y,B1);class s8 extends tY("effect/socket/Socket/SocketReadError")({_tag:mY("SocketReadError"),cause:AZ}){message="An error occurred during Read"}class t8 extends tY("effect/socket/Socket/SocketWriteError")({_tag:mY("SocketWriteError"),cause:AZ}){message="An error occurred during Write"}class e8 extends tY("effect/socket/Socket/SocketOpenError")({_tag:mY("SocketOpenError"),kind:I0(["Unknown","Timeout"]),cause:AZ}){get message(){return this.kind==="Timeout"?'timeout waiting for "open"':"An error occurred during Open"}}class Y$ extends tY("effect/socket/Socket/SocketCloseError")({_tag:mY("SocketCloseError"),code:o8,closeReason:E0(IY)}){static filterClean(Y){return function(Z){return Z$.is(Z)&&Z.reason._tag==="SocketCloseError"&&Y(Z.reason.code)?PY(Z.reason):h(Z)}}get message(){if(this.closeReason)return`${this.code}: ${this.closeReason}`;return`${this.code}`}}var sX=k0([s8,t8,e8,Y$]);class Z$ extends r8(B1)("SocketError",{_tag:mY("SocketError"),reason:sX}){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[B1]=B1;static is(Y){return rX(Y)}message=this.reason.message}var tX=(Y,Z)=>D1(_0(function*($,J){let Q=yield*u8(),X=yield*y8(J),G=yield*x8(Y.writer,X),K,z=0,_=h8({while:()=>z<K.length,body:()=>G(K[z++]),step:b8});return yield*$.pipe(U((B)=>{if(B.length===1)return G(B[0]);return K=B,z=0,_}),d8({disableYield:!0}),f8(m8,(B)=>i8(Q,B)),c8(z0(X,O1)),g5(J)),yield*Y.runRaw((B)=>{l8(Q,Z(B))}).pipe(n8(Q),g5(J)),p8(Q)})),eX=(Y)=>{let Z=new TextEncoder;return tX(Y,($)=>typeof $==="string"?Z.encode($):$)};var $$=()=>(Y)=>eX(Y);var J$=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,Q$=/\\([\v\u0020-\u00ff])/gu,Z4=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,$4=/^[!#$%&'*+.^\w|~-]+$/u,W1={value:"",parameters:Object.create(null)};function A1(Y,Z=!1){if(typeof Y!=="string")return W1;let $=Y.indexOf(";"),J=$!==-1?Y.slice(0,$).trim():Y.trim();if((Z?$4:Z4).test(J)===!1)return W1;let X={value:J.toLowerCase(),parameters:Object.create(null)};if($===-1)return X;let G,K,z;J$.lastIndex=$;while(K=J$.exec(Y)){if(K.index!==$)return W1;if($+=K[0].length,G=K[1].toLowerCase(),z=K[2],z[0]==='"')z=z.slice(1,z.length-1),!Z&&Q$.test(z)&&(z=z.replace(Q$,"$1"));X.parameters[G]=z}if($!==Y.length)return W1;return X}var QY;(function(Y){Y[Y.key=0]="key",Y[Y.whitespace=1]="whitespace",Y[Y.value=2]="value"})(QY||(QY={}));var B0={_tag:"Continue"},Q4=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1],X4=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];function X$(){let Y=new TextDecoder,Z={state:QY.key,headers:Object.create(null),key:"",value:void 0,crlf:0,previousChunk:void 0,pairs:0,size:0};function $(X){return Z.state=QY.key,Z.headers=Object.create(null),Z.key="",Z.value=void 0,Z.crlf=0,Z.previousChunk=void 0,Z.pairs=0,Z.size=0,X}function J(X,G){let K=new Uint8Array(X.length+G.length);return K.set(X),K.set(G,X.length),K}function Q(X){return $({_tag:"Failure",reason:X,headers:Z.headers})}return function(G,K){let z=0,_;if(Z.previousChunk!==void 0){z=Z.previousChunk.length,_=z;let V=new Uint8Array(G.length+z);V.set(Z.previousChunk),V.set(G,z),Z.previousChunk=void 0,G=V}let B=G.length;Y:while(K<B){if(Z.state===QY.key){let V=K;for(;V<B;V++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[V]===58){if(Z.key+=Y.decode(G.subarray(K,V)).toLowerCase(),Z.key.length===0)return Q("InvalidHeaderName");if(G[V+1]===32&&G[V+2]!==32&&G[V+2]!==9)K=V+2,Z.state=QY.value,Z.size++;else if(G[V+1]!==32&&G[V+1]!==9)K=V+1,Z.state=QY.value;else K=V+1,Z.state=QY.whitespace;break}else if(Q4[G[V]]!==1)return Q("InvalidHeaderName")}if(V===B)return Z.key+=Y.decode(G.subarray(K,B)).toLowerCase(),B0}if(Z.state===QY.whitespace){for(;K<B;K++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[K]!==32&&G[K]!==9){Z.state=QY.value;break}}if(K===B)return B0}if(Z.state===QY.value){let V=K;if(_!==void 0)V=_,_=void 0;for(;V<B;V++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[V]===13||Z.crlf>0){let D=G[V];if(D===13&&Z.crlf===0)Z.crlf=1,V++,Z.size++,D=G[V];if(D===10&&Z.crlf===1)Z.crlf=2,V++,Z.size++,D=G[V];if(D===13&&Z.crlf===2)Z.crlf=3,V++,Z.size++,D=G[V];if(D===10&&Z.crlf===3)Z.crlf=4,V++,Z.size++;if(Z.crlf<4&&V>=B)return Z.previousChunk=G.subarray(K),B0;else if(Z.crlf>=2){Z.value=Z.value===void 0?G.subarray(K,V-Z.crlf):J(Z.value,G.subarray(K,V-Z.crlf));let A=Y.decode(Z.value);if(Z.headers[Z.key]===void 0)Z.headers[Z.key]=A;else if(typeof Z.headers[Z.key]==="string")Z.headers[Z.key]=[Z.headers[Z.key],A];else Z.headers[Z.key].push(A);if(K=V,Z.size--,Z.crlf!==4&&Z.pairs===100)return Q("TooManyHeaders");else if(Z.crlf===3)return Q("InvalidHeaderValue");else if(Z.crlf===4)return $({_tag:"Headers",headers:Z.headers,endPosition:K-z});Z.pairs++,Z.key="",Z.value=void 0,Z.crlf=0,Z.state=QY.key;continue Y}}else if(X4[G[V]]!==1)return Q("InvalidHeaderValue")}if(V===B)return Z.value=Z.value===void 0?G.subarray(K,B):J(Z.value,G.subarray(K,B)),B0}}if(K>B)Z.size+=B-K;return B0}}function K4(Y){let Z=new TextEncoder().encode(Y),$=Z.length,J={};for(let Q=0;Q<$;Q++){let X=Z[Q];if(J[X]===void 0)J[X]=[];J[X].push(Q)}return{needle:Z,needleLength:$,indexes:J,firstByte:Z[0],previousChunk:void 0,previousChunkLength:0,matchIndex:0}}function G$(Y,Z,$){let J=K4(Y);if($!==void 0)J.previousChunk=$,J.previousChunkLength=$.length;function Q(){if("Buffer"in globalThis&&!(("Bun"in globalThis)||("Deno"in globalThis)))return function(_,B,V){return Buffer.prototype.indexOf.call(_,B,V)};let z=new Uint8Array(256).fill(J.needle.length);for(let _=0,B=J.needle.length-1;_<B;++_)z[J.needle[_]]=B-_;return function(_,B,V){let D=_.length,A=V+J.needleLength-1;while(A<D){for(let W=J.needleLength-1,N=A;W>=0&&_[N]===B[W];W--,N--)if(W===0)return N;A+=z[_[A]]}return-1}}let X=Q();function G(z){let _=z.length;if(J.previousChunk!==void 0){let V=new Uint8Array(J.previousChunkLength+_);V.set(J.previousChunk),V.set(z,J.previousChunkLength),z=V,_=J.previousChunkLength+_,J.previousChunk=void 0}if(_<J.needleLength){J.previousChunk=z,J.previousChunkLength=_;return}let B=0;while(B<_){let V=X(z,J.needle,B);if(V>-1){if(V>B)Z(J.matchIndex,z.subarray(B,V));J.matchIndex+=1,B=V+J.needleLength;continue}else if(z[_-1]in J.indexes){let D=J.indexes[z[_-1]],A=-1;for(let W=0,N=D.length;W<N;W++){let T=D[W];if(z[_-1-T]===J.firstByte&&W>A)A=T}if(A===-1)if(B===0)Z(J.matchIndex,z);else Z(J.matchIndex,z.subarray(B));else{if(_-1-A>B)Z(J.matchIndex,z.subarray(B,_-1-A));J.previousChunk=z.subarray(_-1-A),J.previousChunkLength=A+1}}else if(B===0)Z(J.matchIndex,z);else Z(J.matchIndex,z.subarray(B));break}}function K(){if(J.previousChunk!==void 0&&J.previousChunk!==$)Z(J.matchIndex,J.previousChunk);J.previousChunk=$,J.previousChunkLength=$?.length??0,J.matchIndex=0}return{write:G,end:K}}var CY;(function(Y){Y[Y.headers=0]="headers",Y[Y.body=1]="body"})(CY||(CY={}));var z4={_tag:"InvalidDisposition"},_4={_tag:"EndNotReached"},B4={_tag:"ReachedLimit",limit:"MaxParts"},O4={_tag:"ReachedLimit",limit:"MaxTotalSize"},D4={_tag:"ReachedLimit",limit:"MaxPartSize"},K$={_tag:"ReachedLimit",limit:"MaxFieldSize"},W4=new TextEncoder().encode(`\r
2
+ import{FA as a7,GA as o7,mA as RZ}from"./chunk-phxrg7aw.js";import{$C as o6,$D as z7,$F as H1,$G as eZ,$H as OY,AD as q5,AG as N$,AK as D1,AM as E6,BD as A6,BG as m8,BI as _0,BK as L$,BM as k0,CD as wJ,CH as y7,CL as m6,CM as I0,DD as HJ,DG as g7,DH as k7,EI as F0,EK as C5,EO as H$,FG as C7,FH as m7,FK as M$,FM as cY,GD as U6,GH as h7,HI as l5,HM as mY,HO as K1,IB as q,IC as H,ID as F6,II as a$,IO as I5,JC as b,JH as $J,JM as k1,JO as p7,KB as P7,KC as y$,KH as jZ,KN as AZ,KO as tZ,LC as r,LF as p$,LH as f7,LO as k$,MB as S0,MC as BY,MD as S,MG as FY,MH as E5,NC as L1,ND as bY,NH as ZY,NI as V0,NO as SY,OD as e$,OF as L0,OH as J6,OI as bZ,PC as l1,PD as GZ,PG as h8,PO as $5,QD as gZ,QF as a5,RB as K6,RC as XZ,RF as x8,RG as d,RH as W5,SB as _6,SC as O6,SG as F,TD as zY,TG as _Z,TL as x1,UB as g0,UD as y,UF as y8,UG as WY,UL as F7,VC as PY,VG as e,VI as i0,VL as H8,WC as h,WD as j7,WF as z0,WI as g1,WN as I6,WO as X0,XF as YJ,XH as c7,XL as f,XN as w$,YC as a6,YD as j,YH as c8,YI as L6,YL as iY,ZB as B6,ZG as i,ZH as w1,ZI as M6,_B as hZ,_C as iZ,_D as aZ,_E as i$,_F as EJ,_G as g,_O as h5,aD as X7,aE as v7,aG as Z6,aH as BJ,aK as nY,bG as ZJ,bH as GY,bI as jJ,bM as E0,cG as M0,cI as d7,cP as XJ,dD as D6,dE as gY,dF as p5,dG as IJ,dH as u,dI as JJ,dP as n7,eC as V6,eE as IZ,eF as V1,eH as U,eI as K5,eJ as T6,fC as fY,fG as pY,fI as d8,fJ as q1,fP as E$,gE as _7,gG as $6,gH as $0,gI as u7,hC as k6,hE as Y0,hF as R8,hG as DZ,hH as Q1,hP as I$,iB as vY,iE as B5,iG as PJ,iO as tY,jG as _J,jH as n$,jI as l7,jO as r8,kB as O,kC as hY,kF as G5,kG as rY,kH as L,kO as LZ,lB as BZ,lG as sY,lI as i7,lP as P5,mI as g5,mK as u8,mM as IY,mP as wZ,nB as DY,nC as _Y,nD as G7,nM as o8,nP as J8,oB as I7,oC as RY,oD as K7,oF as w8,oH as b7,pB as $1,pE as T1,pF as A$,pG as n0,pH as X1,pK as l8,pP as O0,qB as v8,qF as U$,qG as P,qH as q7,qI as QJ,qK as i8,qP as dY,rB as b8,rC as x0,rD as V7,rE as Y1,rF as S7,rH as K0,sB as Y6,sD as z6,sE as R7,sG as J1,sH as f8,sP as OJ,tF as S8,tH as JZ,tI as n5,tK as p8,uM as T$,vB as _5,vD as y0,vH as x7,vK as n8,vM as w6,wF as F$,xD as b1,xF as x5,xH as D5,xI as o,xM as H6,yD as W6,yF as O1,yP as P$,zL as D0,zM as y1,zP as DJ}from"./chunk-snm5q21k.js";import{bQ as kY}from"./chunk-aztre27e.js";var mZ={};kY(mZ,{isHttpClientError:()=>P0,TransportError:()=>j0,StatusCodeError:()=>kZ,InvalidUrlError:()=>v0,HttpClientErrorSchema:()=>S1,HttpClientError:()=>x,EncodeError:()=>X6,EmptyBodyError:()=>R0,DecodeError:()=>TY});var H0="~effect/http/HttpClientError",P0=(Y)=>q(Y,H0);class x extends P("HttpClientError"){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[H0]=H0;get request(){return this.reason.request}get response(){return"response"in this.reason?this.reason.response:void 0}get message(){return this.reason.message}}var UZ=(Y)=>Y.endsWith("Error")?Y.slice(0,-5):Y,FZ=(Y,Z,$)=>Z?`${Y}: ${Z} (${$})`:`${Y} error (${$})`;class j0 extends P("TransportError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class X6 extends P("EncodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class v0 extends P("InvalidUrlError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return FZ(UZ(this._tag),this.description,this.methodAndUrl)}}class kZ extends P("StatusCodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class TY extends P("DecodeError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class R0 extends P("EmptyBodyError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let Y=`${this.response.status} ${this.methodAndUrl}`;return FZ(UZ(this._tag),this.description,Y)}}class S1 extends tY(H0)({_tag:mY("HttpError"),kind:I0(["EncodeError","DecodeError","TransportError","InvalidUrlError","StatusCodeError","EmptyBodyError"]),cause:E0(AZ)}){static fromHttpClientError(Y){return new S1({_tag:"HttpError",kind:Y.reason._tag,cause:Y.reason})}}var pZ={};kY(pZ,{updateUrl:()=>zQ,trace:()=>XQ,toWebResult:()=>Z7,toWeb:()=>vQ,toUrl:()=>o1,setUrlParams:()=>e6,setUrlParam:()=>_Q,setUrl:()=>EZ,setMethod:()=>r6,setHeaders:()=>p0,setHeader:()=>HZ,setHash:()=>Y7,setBody:()=>$Y,schemaBodyJson:()=>NQ,removeHash:()=>DQ,put:()=>ZQ,prependUrl:()=>a1,post:()=>eJ,patch:()=>YQ,options:()=>QQ,modify:()=>p1,makeWith:()=>R,make:()=>KY,isHttpClientRequest:()=>KZ,head:()=>JQ,get:()=>tJ,fromWeb:()=>EQ,empty:()=>i1,delete:()=>$Q,bodyUrlParams:()=>LQ,bodyUint8Array:()=>WQ,bodyText:()=>AQ,bodyStream:()=>wQ,bodyJsonUnsafe:()=>FQ,bodyJson:()=>UQ,bodyFormDataRecord:()=>TQ,bodyFormData:()=>MQ,bodyFile:()=>HQ,bearerToken:()=>KQ,basicAuth:()=>GQ,appendUrlParams:()=>OQ,appendUrlParam:()=>BQ,appendUrl:()=>VQ,acceptJson:()=>s6,accept:()=>n1});var G6=Symbol.for("~effect/http/Headers");var NZ=Object.create(null);Object.defineProperties(NZ,{[G6]:{value:G6},[V6]:{value(Y){return YZ(this,y(Y,cZ))}},toJSON:{value(){return fY(this)}},[g0]:{value(Y){return fJ(this,Y)}},[S0]:{value(){return K6(this)}},toString:{value:_Y.toString},[hY]:{value:_Y[hY]}});var C0=(Y)=>Object.assign(Object.create(NZ),Y),fJ=z6(hZ());var n=Object.create(NZ),C=(Y)=>{if(Y===void 0)return n;else if(Symbol.iterator in Y){let $=Object.create(NZ);for(let[J,Q]of Y)$[J.toLowerCase()]=Q;return $}let Z=Object.create(NZ);for(let[$,J]of Object.entries(Y))if(Array.isArray(J))Z[$.toLowerCase()]=J.join(", ");else if(J!==void 0)Z[$.toLowerCase()]=J;return Z},wY=(Y)=>Object.setPrototypeOf(Y,NZ);var HY=O(3,(Y,Z,$)=>{let J=C0(Y);return J[Z.toLowerCase()]=$,J}),b0=O(2,(Y,Z)=>C0({...Y,...C(Z)})),fZ=O(2,(Y,Z)=>{let $=C0(Y);return Object.assign($,Z),$}),q0=O(2,(Y,Z)=>{let $=C0(Y);return delete $[Z.toLowerCase()],$});var YZ=O(2,(Y,Z)=>{let $={...Y},J=(Q)=>{if(typeof Q==="string"){let X=Q.toLowerCase();if(X in Y)$[X]=g1(Y[X])}else for(let X in Y)if(Q.test(X))$[X]=g1(Y[X])};if(Array.isArray(Z))for(let Q=0;Q<Z.length;Q++)J(Z[Q]);else J(Z);return $}),cZ=j("effect/Headers/CurrentRedactedNames",{defaultValue:()=>["authorization","cookie","set-cookie","x-api-key"]});var C1="~effect/http/UrlParams",cJ=(Y)=>q(Y,C1),dJ={...x0,[C1]:C1,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:"UrlParams",params:Object.fromEntries(this.params)}},[g0](Y){return j6(this,Y)},[S0](){return _6(this.params.flat())}},ZZ=(Y)=>{let Z=Object.create(dJ);return Z.params=Y,Z},a=(Y)=>{let Z=P6(Y),$=[];for(let J=0;J<Z.length;J++)if(Array.isArray(Z[J][0])){let[Q,X]=Z[J];$.push([`${Q[0]}[${Q.slice(1).join("][")}]`,X])}else $.push(Z[J]);return ZZ($)},P6=(Y)=>{let Z=typeof Y[Symbol.iterator]==="function"?y0(Y):Object.entries(Y),$=[];for(let[J,Q]of Z)if(Array.isArray(Q)){for(let X=0;X<Q.length;X++)if(Q[X]!==void 0)$.push([J,String(Q[X])])}else if(typeof Q==="object"){let X=P6(Q);for(let[G,K]of X)$.push([[J,...typeof G==="string"?[G]:G],K])}else if(Q!==void 0)$.push([J,String(Q)]);return $},j6=B6((Y,Z)=>uJ(Y.params,Z.params)),uJ=F6(D6([hZ(),hZ()])),v6=x1(cJ,{typeConstructor:{_tag:"effect/http/UrlParams"},generation:{runtime:"UrlParams.UrlParamsSchema",Type:"UrlParams.UrlParams",Encoded:'typeof UrlParams.UrlParamsSchema["Encoded"]',importDeclaration:'import * as UrlParams from "effect/unstable/http/UrlParams"'},expected:"UrlParams",toEquivalence:()=>j6,toCodec:()=>k1()(y1(H6([IY,IY])),q1({decode:ZZ,encode:(Y)=>Y.params}))}),m0=ZZ([]);var lJ=O(2,(Y,Z)=>A6(Y.params,([$])=>$===Z).pipe(O6(([,$])=>$)));var R6=O(3,(Y,Z,$)=>ZZ(b1(U6(Y.params,([J])=>J!==Z),[Z,String($)]))),iJ=O(2,(Y,Z)=>ZZ(Z(Y.params))),S6=O(2,(Y,Z)=>{let $=a(Z),J=$.params,Q=new Set;for(let X=0;X<J.length;X++)Q.add(J[X][0]);for(let X=0;X<Y.params.length;X++){if(Q.has(Y.params[X][0]))continue;J.push(Y.params[X])}return $}),g6=O(3,(Y,Z,$)=>ZZ(b1(Y.params,[Z,String($)]))),C6=O(2,(Y,Z)=>iJ(Y,W6(a(Z).params)));class h0 extends P("UrlParamsError"){}var uZ=(Y,Z,$)=>{try{let J=new URL(Y,pJ());for(let Q=0;Q<Z.params.length;Q++){let[X,G]=Z.params[Q];if(G!==void 0)J.searchParams.append(X,G)}if($!==void 0)J.hash=$;return PY(J)}catch(J){return h(new h0({cause:J}))}},f0=(Y)=>new URLSearchParams(Y.params).toString(),pJ=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname;return},nJ=(Y)=>{let Z={};for(let[$,J]of Y.params){let Q=Z[$];if(Q===void 0)Z[$]=J;else if(typeof Q==="string")Z[$]=[Q,J];else Q.push(J)}return Z},aJ=nJ,b6=(Y)=>v6.pipe(cY(I6,T6({decode:(Z)=>BY(lJ(Z,Y),{onNone:()=>g(new L6([Y],new M6(void 0))),onSome:F}),encode:(Z)=>F(ZZ([[Y,Z]]))}))),q6=v6.pipe(cY(w6(IY,k0([IY,E6(IY)])),q1({decode:aJ,encode:a})));var m1="~effect/http/HttpBody";var x6="~effect/http/HttpBody/HttpBodyError";class f1 extends P("HttpBodyError"){[x6]=x6}class MZ{[m1];constructor(){this[m1]=m1}[hY](){return this.toJSON()}toString(){return k6(this,{ignoreToString:!0})}}class h6 extends MZ{_tag="Empty";toJSON(){return{_id:"effect/HttpBody",_tag:"Empty"}}}var QZ=new h6;class f6 extends MZ{_tag="Raw";body;contentType;contentLength;constructor(Y,Z,$){super();this.body=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Raw",body:this.body,contentType:this.contentType,contentLength:this.contentLength}}}var c1=(Y,Z)=>new f6(Y,Z?.contentType,Z?.contentLength);class c6 extends MZ{_tag="Uint8Array";body;contentType;contentLength;constructor(Y,Z,$){super();this.body=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}var lZ=(Y,Z)=>new c6(Y,Z??"application/octet-stream",Y.length),oJ=new TextEncoder,uY=(Y,Z)=>lZ(oJ.encode(Y),Z??"text/plain"),c0=(Y,Z)=>uY(JSON.stringify(Y),Z??"application/json"),d0=(Y,Z)=>GY({try:()=>uY(JSON.stringify(Y),Z??"application/json"),catch:($)=>new f1({reason:{_tag:"JsonError"},cause:$})}),d1=(Y,Z)=>{let $=m6(LZ(Y));return(J,Q)=>$(J,Z).pipe(JZ((X)=>new f1({reason:{_tag:"SchemaError",issue:X},cause:X})),U((X)=>d0(X,Q)))},d6=(Y,Z)=>uY(f0(Y),Z??"application/x-www-form-urlencoded");class u6 extends MZ{_tag="FormData";contentType=void 0;contentLength=void 0;formData;constructor(Y){super();this.formData=Y}toJSON(){return{_id:"effect/HttpBody",_tag:"FormData",formData:this.formData}}}var u0=(Y)=>new u6(Y),y6=(Y,Z,$)=>{if($==null)return;if(typeof $==="object"){Y.append(Z,$);return}Y.append(Z,String($))},l6=(Y)=>{let Z=new globalThis.FormData;for(let[$,J]of Object.entries(Y))if(Array.isArray(J))for(let Q of J)y6(Z,$,Q);else y6(Z,$,J);return u0(Z)};class i6 extends MZ{_tag="Stream";stream;contentType;contentLength;constructor(Y,Z,$){super();this.stream=Y,this.contentType=Z,this.contentLength=$}toJSON(){return{_id:"effect/HttpBody",_tag:"Stream",contentType:this.contentType,contentLength:this.contentLength}}}var jY=(Y,Z,$)=>new i6(Y,Z??"application/octet-stream",$),p6=(Y,Z)=>U(dY.asEffect(),($)=>L($.stat(Y),(J)=>jY($.stream(Y,Z),Z?.contentType,Number(J.size))));var TZ=(Y)=>Y!=="GET"&&Y!=="HEAD"&&Y!=="OPTIONS"&&Y!=="TRACE";var n6=[["GET","get"],["POST","post"],["PUT","put"],["DELETE","del"],["PATCH","patch"],["HEAD","head"],["OPTIONS","options"],["TRACE","trace"]];var u1="~effect/http/HttpClientRequest",KZ=(Y)=>q(Y,u1),sJ={[u1]:u1,..._Y,toJSON(){return{_id:"HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:fY(this.headers),body:this.body.toJSON()}},pipe(){return vY(this,arguments)}};function R(Y,Z,$,J,Q,X){let G=Object.create(sJ);return G.method=Y,G.url=Z,G.urlParams=$,G.hash=J,G.headers=Q,G.body=X,G}var i1=R("GET","",m0,H(),n,QZ),KY=(Y)=>(Z,$)=>p1(i1,{method:Y,url:Z,...$??void 0}),tJ=KY("GET"),eJ=KY("POST"),YQ=KY("PATCH"),ZQ=KY("PUT"),$Q=KY("DELETE");var JQ=KY("HEAD"),QQ=KY("OPTIONS"),XQ=KY("TRACE"),p1=O(2,(Y,Z)=>{let $=Y;if(Z.method)$=r6($,Z.method);if(Z.url)$=EZ($,Z.url);if(Z.headers)$=p0($,Z.headers);if(Z.urlParams)$=e6($,Z.urlParams);if(Z.hash)$=Y7($,Z.hash);if(Z.body)$=$Y($,Z.body);if(Z.accept)$=n1($,Z.accept);if(Z.acceptJson)$=s6($);return $}),r6=O(2,(Y,Z)=>R(Z,Y.url,Y.urlParams,Y.hash,Y.headers,Y.body)),HZ=O(3,(Y,Z,$)=>R(Y.method,Y.url,Y.urlParams,Y.hash,HY(Y.headers,Z,$),Y.body)),p0=O(2,(Y,Z)=>R(Y.method,Y.url,Y.urlParams,Y.hash,b0(Y.headers,Z),Y.body)),GQ=O(3,(Y,Z,$)=>HZ(Y,"Authorization",`Basic ${btoa(`${i0(Z)}:${i0($)}`)}`)),KQ=O(2,(Y,Z)=>HZ(Y,"Authorization",`Bearer ${i0(Z)}`)),n1=O(2,(Y,Z)=>HZ(Y,"Accept",Z)),s6=n1("application/json"),EZ=O(2,(Y,Z)=>{if(typeof Z==="string")return R(Y.method,Z,Y.urlParams,Y.hash,Y.headers,Y.body);let $=new URL(Z.toString()),J=a($.searchParams),Q=l1($.hash===""?void 0:$.hash.slice(1));return $.search="",$.hash="",R(Y.method,$.toString(),J,Q,Y.headers,Y.body)}),a1=O(2,(Y,Z)=>{if(Z==="")return Y;return R(Y.method,t6(Z,Y.url),Y.urlParams,Y.hash,Y.headers,Y.body)}),VQ=O(2,(Y,Z)=>{if(Z==="")return Y;return R(Y.method,t6(Y.url,Z),Y.urlParams,Y.hash,Y.headers,Y.body)}),t6=(Y,Z)=>{let $=Y.endsWith("/"),J=Z.startsWith("/");return $&&J?Y+Z.slice(1):!$&&!J?Y+"/"+Z:Y+Z},zQ=O(2,(Y,Z)=>R(Y.method,Z(Y.url),Y.urlParams,Y.hash,Y.headers,Y.body)),_Q=O(3,(Y,Z,$)=>R(Y.method,Y.url,R6(Y.urlParams,Z,$),Y.hash,Y.headers,Y.body)),e6=O(2,(Y,Z)=>R(Y.method,Y.url,S6(Y.urlParams,Z),Y.hash,Y.headers,Y.body)),BQ=O(3,(Y,Z,$)=>R(Y.method,Y.url,g6(Y.urlParams,Z,$),Y.hash,Y.headers,Y.body)),OQ=O(2,(Y,Z)=>R(Y.method,Y.url,C6(Y.urlParams,Z),Y.hash,Y.headers,Y.body)),Y7=O(2,(Y,Z)=>R(Y.method,Y.url,Y.urlParams,b(Z),Y.headers,Y.body)),DQ=(Y)=>R(Y.method,Y.url,Y.urlParams,H(),Y.headers,Y.body),$Y=O(2,(Y,Z)=>{let $=Y.headers;if(Z._tag==="Empty"||Z._tag==="FormData")$=q0(q0($,"Content-Type"),"Content-length");else{if(Z.contentType)$=HY($,"content-type",Z.contentType);if(Z.contentLength!==void 0)$=HY($,"content-length",Z.contentLength.toString())}return R(Y.method,Y.url,Y.urlParams,Y.hash,$,Z)}),WQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,lZ(Z,$))),AQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,uY(Z,$))),UQ=O(2,(Y,Z)=>L(d0(Z),($)=>$Y(Y,$))),FQ=O(2,(Y,Z)=>$Y(Y,c0(Z))),NQ=(Y,Z)=>{let $=d1(Y,Z);return O(2,(J,Q)=>L($(Q),(X)=>$Y(J,X)))},LQ=O(2,(Y,Z)=>$Y(Y,d6(a(Z)))),MQ=O(2,(Y,Z)=>$Y(Y,u0(Z))),TQ=O(2,(Y,Z)=>$Y(Y,l6(Z))),wQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>$Y(Y,jY(Z,$?.contentType,$?.contentLength))),HQ=O((Y)=>KZ(Y[0]),(Y,Z,$)=>L(p6(Z,$),(J)=>$Y(Y,J)));function o1(Y){let Z=uZ(Y.url,Y.urlParams,XZ(Y.hash));if(o6(Z))return b(Z.success);return H()}var EQ=(Y)=>{let Z=Y.method.toUpperCase();return p1(i1,{method:Z,url:new URL(Y.url),headers:Y.headers,body:IQ(Y,Z)})},IQ=(Y,Z)=>{if(!TZ(Z)||Y.body===null)return QZ;return c1(Y.body,{contentType:Y.headers.get("content-type")??void 0,contentLength:PQ(Y.headers.get("content-length"))})},PQ=(Y)=>{if(Y===null)return;let Z=Number.parseInt(Y,10);return Number.isNaN(Z)?void 0:Z},Z7=(Y,Z)=>{let $=uZ(Y.url,Y.urlParams,XZ(Y.hash));if(iZ($))return h($.failure);let J={method:Y.method,headers:Y.headers};if(Z?.signal)J.signal=Z.signal;if(TZ(Y.method))switch(Y.body._tag){case"Empty":break;case"Raw":{if(J.body=Y.body.body,jQ(Y.body.body))J.duplex="half";break}case"Uint8Array":{J.body=Y.body.body;break}case"FormData":{J.body=Y.body.formData;break}case"Stream":{J.body=wZ(Y.body.stream,Z?.context??GZ()),J.duplex="half";break}}return a6({try:()=>new Request($.success,J),catch:(Q)=>new h0({cause:Q})})},jQ=(Y)=>typeof ReadableStream<"u"&&Y instanceof ReadableStream,vQ=(Y,Z)=>ZY(($)=>Z7(Y,{context:$,signal:Z?.signal}).asEffect());var e0={};kY(e0,{stream:()=>kQ,schemaNoBody:()=>yQ,schemaJson:()=>xQ,schemaHeaders:()=>N7,schemaBodyUrlParams:()=>oZ,schemaBodyJson:()=>s0,matchStatus:()=>mQ,fromWeb:()=>J5,filterStatusOk:()=>X5,filterStatus:()=>Q5,TypeId:()=>zZ});var r1="~effect/http/Cookies",SQ=(Y)=>q(Y,r1);var $7="~effect/http/Cookies/Cookie";var J7="~effect/http/Cookies/CookieError";class B7 extends n0{}class VZ extends P("CookieError"){static fromReason(Y,Z){return new VZ({reason:new B7({_tag:Y,cause:Z})})}[J7]=J7;get message(){return this.reason._tag}}var gQ={[r1]:r1,..._Y,toJSON(){return{_id:"effect/Cookies",cookies:K7(this.cookies,(Y)=>Y.toJSON())}},pipe(){return vY(this,arguments)}},t1=(Y)=>{let Z=Object.create(gQ);return Z.cookies=Y,Z},O7=(Y)=>{let Z={};for(let $ of Y)Z[$.name]=$;return t1(Z)},e1=(Y)=>{let Z=typeof Y==="string"?[Y]:Y,$=[];for(let J of Z){let Q=CQ(J.trim());if(Q)$.push(Q)}return O7($)};function CQ(Y){let Z=Y.split(";").map((K)=>K.trim()).filter((K)=>K!=="");if(Z.length===0)return;let $=Z[0].indexOf("=");if($===-1)return;let J=Z[0].slice(0,$);if(!nZ.test(J))return;let Q=Z[0].slice($+1),X=U7(Q);if(Z.length===1)return Object.assign(Object.create(s1),{name:J,value:X,valueEncoded:Q});let G={};for(let K=1;K<Z.length;K++){let z=Z[K],_=z.indexOf("="),B=_===-1?z:z.slice(0,_).trim(),V=_===-1?void 0:z.slice(_+1).trim();switch(B.toLowerCase()){case"domain":{if(V===void 0)break;let D=V.trim().replace(/^\./,"");if(D)G.domain=D;break}case"expires":{if(V===void 0)break;let D=new Date(V);if(!isNaN(D.getTime()))G.expires=D;break}case"max-age":{if(V===void 0)break;let D=parseInt(V,10);if(!isNaN(D))G.maxAge=IZ(D);break}case"path":{if(V===void 0)break;if(V[0]==="/")G.path=V;break}case"priority":{if(V===void 0)break;switch(V.toLowerCase()){case"low":G.priority="low";break;case"medium":G.priority="medium";break;case"high":G.priority="high";break}break}case"httponly":{G.httpOnly=!0;break}case"secure":{G.secure=!0;break}case"partitioned":{G.partitioned=!0;break}case"samesite":{if(V===void 0)break;switch(V.toLowerCase()){case"lax":G.sameSite="lax";break;case"strict":G.sameSite="strict";break;case"none":G.sameSite="none";break}break}}}return Object.assign(Object.create(s1),{name:J,value:X,valueEncoded:Q,options:Object.keys(G).length>0?G:void 0})}var a0=O7([]),o0=(Y)=>G7(Y.cookies),nZ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,s1={[$7]:$7,..._Y,toJSON(){return{_id:"effect/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}};function bQ(Y,Z,$){if(!nZ.test(Y))return h(VZ.fromReason("InvalidCookieName"));let J=encodeURIComponent(Z);if(J&&!nZ.test(J))return h(VZ.fromReason("InvalidCookieValue"));if($!==void 0){if($.domain!==void 0&&!nZ.test($.domain))return h(VZ.fromReason("InvalidCookieDomain"));if($.path!==void 0&&!nZ.test($.path))return h(VZ.fromReason("InvalidCookiePath"));if($.maxAge!==void 0&&!z7(aZ($.maxAge)))return h(VZ.fromReason("CookieInfinityMaxAge"))}return PY(Object.assign(Object.create(s1),{name:Y,value:Z,valueEncoded:J,options:$}))}var Y5=O(2,(Y,Z)=>t1({...Y.cookies,...Z.cookies}));var D7=O((Y)=>SQ(Y[0]),(Y,Z,$,J)=>X7(bQ(Z,$,J),(Q)=>t1(V7(Y.cookies,Z,Q))));function qQ(Y){let Z=Y.name+"="+Y.valueEncoded;if(Y.options===void 0)return Z;let $=Y.options;if($.maxAge!==void 0){let J=_7(aZ($.maxAge));Z+="; Max-Age="+Math.trunc(J)}if($.domain!==void 0)Z+="; Domain="+$.domain;if($.path!==void 0)Z+="; Path="+$.path;if($.priority!==void 0)switch($.priority){case"low":Z+="; Priority=Low";break;case"medium":Z+="; Priority=Medium";break;case"high":Z+="; Priority=High";break}if($.expires!==void 0)Z+="; Expires="+$.expires.toUTCString();if($.httpOnly)Z+="; HttpOnly";if($.secure)Z+="; Secure";if($.partitioned)Z+="; Partitioned";if($.sameSite!==void 0)switch($.sameSite){case"lax":Z+="; SameSite=Lax";break;case"strict":Z+="; SameSite=Strict";break;case"none":Z+="; SameSite=None";break}return Z}var W7=(Y)=>Object.values(Y.cookies).map((Z)=>`${Z.name}=${Z.valueEncoded}`).join("; ");var A7=(Y)=>Object.values(Y.cookies).map(qQ);function Z5(Y){let Z={},$=Y.length,J=0,Q=0;while(!0){if(Q===$)break;if(Q=Y.indexOf(";",J),Q===-1)Q=$;let X=Y.indexOf("=",J);if(X===-1)break;if(X>Q){J=Q+1;continue}let G=Y.substring(J,X++).trim();if(Z[G]===void 0){let K=Y.charCodeAt(X)===34?Y.substring(X+1,Q-1).trim():Y.substring(X,Q).trim();Z[G]=K.indexOf("%")!==-1?U7(K):K}J=Q+1}return Z}var U7=(Y)=>{try{return decodeURIComponent(Y)}catch(Z){return Y}};var c="~effect/http/HttpIncomingMessage";var s0=(Y,Z)=>{let $=iY(LZ(Y).annotate({options:Z}));return(J)=>U(J.json,$)},oZ=(Y,Z)=>{let $=q6.pipe(cY(Y),F7({options:Z}),iY);return(J)=>U(J.urlParamsBody,$)},N7=(Y,Z)=>{let $=f(Y);return(J)=>$(J.headers,Z)},rZ=j("effect/http/HttpIncomingMessage/MaxBodySize",{defaultValue:()=>{return}}),sZ=(Y,Z)=>{let $=Y.headers["content-type"]??"",J;if($.includes("application/json"))try{J=o(Y.json)}catch(X){}else if($.includes("text/")||$.includes("urlencoded"))try{J=o(Y.text)}catch(X){}let Q={...Z,headers:fY(Y.headers),remoteAddress:Y.remoteAddress};if(J!==void 0)Q.body=J;return Q};var zZ="~effect/http/HttpClientResponse",J5=(Y,Z)=>new L7(Y,Z),xQ=(Y,Z)=>{let $=iY(LZ(Y).annotate({options:Z}));return(J)=>U(J.json,(Q)=>$({status:J.status,headers:J.headers,body:Q}))},yQ=(Y,Z)=>{let $=iY(Y.annotate({options:Z}));return(J)=>$({status:J.status,headers:J.headers})},kQ=(Y)=>$5(L(Y,(Z)=>Z.stream)),mQ=O(2,(Y,Z)=>{let $=Y.status;if(Z[$])return Z[$](Y);else if($>=200&&$<300&&Z["2xx"])return Z["2xx"](Y);else if($>=300&&$<400&&Z["3xx"])return Z["3xx"](Y);else if($>=400&&$<500&&Z["4xx"])return Z["4xx"](Y);else if($>=500&&$<600&&Z["5xx"])return Z["5xx"](Y);return Z.orElse(Y)}),Q5=O(2,(Y,Z)=>_Z(()=>Z(Y.status)?F(Y):g(new x({reason:new kZ({response:Y,request:Y.request,description:"invalid status code"})})))),X5=(Y)=>Y.status>=200&&Y.status<300?F(Y):g(new x({reason:new kZ({response:Y,request:Y.request,description:"non 2xx status code"})}));class L7 extends RY{[c];[zZ];request;source;constructor(Y,Z){super();this.request=Y,this.source=Z,this[c]=c,this[zZ]=zZ}toJSON(){return sZ(this,{_id:"HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return C(this.source.headers)}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=e1(this.source.headers.getSetCookie())}get remoteAddress(){return H()}get stream(){return this.source.body?SY({evaluate:()=>this.source.body,onError:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}):tZ(new x({reason:new R0({request:this.request,response:this,description:"can not create stream from empty body"})}))}get json(){return U(this.text,(Y)=>GY({try:()=>Y===""?null:JSON.parse(Y),catch:(Z)=>new x({reason:new TY({request:this.request,response:this,cause:Z})})}))}textBody;get text(){return this.textBody??=d({try:()=>this.source.text(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>new x({reason:new TY({request:this.request,response:this,cause:Z})})}))}formDataBody;get formData(){return this.formDataBody??=d({try:()=>this.source.formData(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody??=d({try:()=>this.source.arrayBuffer(),catch:(Y)=>new x({reason:new TY({request:this.request,response:this,cause:Y})})}).pipe(OY,o)}pipe(){return vY(this,arguments)}}var G1={};kY(G1,{withScope:()=>HX,withRateLimiter:()=>OX,withCookiesRef:()=>wX,transformResponse:()=>s,transform:()=>A5,tapRequest:()=>TX,tapError:()=>MX,tap:()=>LX,retryTransient:()=>BX,retry:()=>_X,put:()=>rQ,post:()=>aQ,patch:()=>oQ,options:()=>tQ,mapRequestInputEffect:()=>zX,mapRequestInput:()=>VX,mapRequestEffect:()=>KX,mapRequest:()=>F5,makeWith:()=>VY,make:()=>U5,layerMergedContext:()=>N5,isHttpClient:()=>r7,head:()=>nQ,get:()=>pQ,followRedirects:()=>EX,filterStatusOk:()=>XX,filterStatus:()=>QX,filterOrFail:()=>JX,filterOrElse:()=>$X,execute:()=>iQ,del:()=>sQ,catchTags:()=>ZX,catchTag:()=>YX,catch:()=>eQ,TracerPropagationEnabled:()=>e7,TracerDisabledWhen:()=>t7,SpanNameGenerator:()=>Y8,HttpClient:()=>vZ});var T7=(Y)=>wY({b3:`${Y.traceId}-${Y.spanId}-${Y.sampled?"1":"0"}${BY(Y.parent,{onNone:()=>"",onSome:(Z)=>`-${Z.spanId}`})}`,traceparent:`00-${Y.traceId}-${Y.spanId}-${Y.sampled?"01":"00"}`}),w7=(Y)=>{let Z=uQ(Y);if(r(Z))return Z;if(Z=hQ(Y),r(Z))return Z;return fQ(Y)},hQ=(Y)=>{if(!("b3"in Y))return H();let Z=Y.b3.split("-");if(Z.length<2)return H();return b(Y1({traceId:Z[0],spanId:Z[1],sampled:Z[2]?Z[2]==="1":!0}))},fQ=(Y)=>{if(!Y["x-b3-traceid"]||!Y["x-b3-spanid"])return H();return b(Y1({traceId:Y["x-b3-traceid"],spanId:Y["x-b3-spanid"],sampled:Y["x-b3-sampled"]?Y["x-b3-sampled"]==="1":!0}))},cQ=/^[0-9a-f]{32}$/i,dQ=/^[0-9a-f]{16}$/i,uQ=(Y)=>{if(!Y.traceparent)return H();let Z=Y.traceparent.split("-");if(Z.length!==4)return H();let[$,J,Q,X]=Z;switch($){case"00":{if(cQ.test(J)===!1||dQ.test(Q)===!1)return H();return b(Y1({traceId:J,spanId:Q,sampled:(parseInt(X,16)&1)===1}))}default:return H()}};var V5="~effect/http/HttpClient",r7=(Y)=>q(Y,V5),vZ=S("effect/HttpClient"),aY=(Y)=>(...Z)=>U(vZ.asEffect(),($)=>$[Y](...Z)),iQ=aY("execute"),pQ=aY("get"),nQ=aY("head"),aQ=aY("post"),oQ=aY("patch"),rQ=aY("put"),sQ=aY("del"),tQ=aY("options"),A5=O(2,(Y,Z)=>VY(U(($)=>Z(Y.postprocess(F($)),$)),Y.preprocess)),s=O(2,(Y,Z)=>VY(($)=>Z(Y.postprocess($)),Y.preprocess)),eQ=O(2,(Y,Z)=>s(Y,b7(Z)));var YX=O(3,(Y,Z,$)=>s(Y,X1(Z,$))),ZX=O(2,(Y,Z)=>s(Y,q7(Z))),$X=O(3,(Y,Z,$)=>s(Y,m7(Z,$))),JX=O(3,(Y,Z,$)=>s(Y,h7(Z,$))),QX=O(2,(Y,Z)=>s(Y,U(Q5(Z)))),XX=s(U(X5)),VY=(Y,Z)=>{let $=Object.create(GX);return $.preprocess=Z,$.postprocess=Y,$.execute=function(J){return Y(Z(J))},$},GX={[V5]:V5,pipe(){return vY(this,arguments)},..._Y,toJSON(){return{_id:"effect/HttpClient"}},...Object.fromEntries(n6.map(([Y,Z])=>[Z,function($,J){return this.execute(KY(Y)($,J))}]))},U5=(Y)=>VY((Z)=>U(Z,($)=>u((J)=>{let Q=Z8.get($),X=Q??new AbortController,G=uZ($.url,$.urlParams,XZ($.hash));if(iZ(G))return g(new x({reason:new v0({request:$,cause:G.failure})}));let K=G.success;if(J.getRef(R7)||J.getRef(t7)($)){let _=Y($,K,X.signal,J);if(Q)return _;return K5((B)=>jZ(B(_),{onSuccess(V){return Z1.register(V,X),F(new z5(V,X))},onFailure(V){if(G5(V))X.abort();return eZ(V)}}))}return l7(J.getRef(Y8)($),{kind:"client"},(_)=>{if(_.attribute("http.request.method",$.method),_.attribute("server.address",K.origin),K.port!=="")_.attribute("server.port",+K.port);_.attribute("url.full",K.toString()),_.attribute("url.path",K.pathname),_.attribute("url.scheme",K.protocol.slice(0,-1));let B=K.search.slice(1);if(B!=="")_.attribute("url.query",B);let V=J.getRef(cZ),D=YZ($.headers,V);for(let A in D)_.attribute(`http.request.header.${A}`,String(D[A]));return $=J.getRef(e7)?p0($,T7(_)):$,K5((A)=>A(Y($,K,X.signal,J)).pipe(i7(_,{captureStackTrace:!1}),jZ({onSuccess:(W)=>{_.attribute("http.response.status_code",W.status);let N=YZ(W.headers,V);for(let T in N)_.attribute(`http.response.header.${T}`,String(N[T]));if(Q)return F(W);return Z1.register(W,X),F(new z5(W,X))},onFailure(W){if(!Q&&G5(W))X.abort();return eZ(W)}})))})})),F),F5=O(2,(Y,Z)=>VY(Y.postprocess,($)=>L(Y.preprocess($),Z))),KX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>U(Y.preprocess($),Z))),VX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>Y.preprocess(Z($)))),zX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>U(Z($),Y.preprocess))),_X=O(2,(Y,Z)=>s(Y,D5(Z))),BX=O(2,(Y,Z)=>{let $=g7(Z),J=$?"errors-and-responses":Z.retryOn??"errors-and-responses",Q=$?Z:Z.schedule,X=Q&&C7(Q),G=$?void 0:Z.times;return s(Y,_5(J==="errors-only"?BZ:u7({schedule:X,times:G,while:$8}),J==="response-only"?BZ:D5({while:$||Z.while===void 0?E7:P7(E7,Z.while),schedule:Q,times:G})))}),OX=O(2,(Y,Z)=>{let $={initial:!0,limit:Z.limit,window:Y0(aZ(Z.window),gY(1))},J=new Map,Q=Z.key,X=typeof Q==="function"?Q:DY(Q),G=Z.tokens,K=typeof G==="function"?G:DY(G??1),z=(B)=>{let V=J.get(B);if(V!==void 0)return V;return J.set(B,$),$},_=Z.disableResponseInspection?void 0:(B,V,D,A)=>{let W=z(V),N=DX(W,B,D,A);if(N.limit!==W.limit||!B5(N.window,W.window))J.set(V,N)};return A5(Y,function B(V,D){let W=nY().getRef(J1),N=X(D),T=Math.max(K(D),1),E=z(N);function YY(I){if(Z.disableResponseInspection)return B(V,D);let p=s7(W,PZ(I.headers,"retry-after"));return p?U(k7(p),()=>B(V,D)):B(V,D)}return U(Z.limiter.consume({algorithm:Z.algorithm,onExceeded:"delay",key:N,limit:E.limit,window:E.window,tokens:T}),({delay:I})=>{let p=f7(V,{onSuccess(w){if(_?.(W,N,w.headers,T),w.status!==429)return F(w);return YY(w)},onFailure(w){if(PX(w))return _?.(W,N,w.reason.response.headers,T),YY(w.reason.response);return g(w)}});return v7(I)?p:y7(p,I)})})}),DX=(Y,Z,$,J)=>{let Q=WX(Y,$,J)??Y.limit,X=UX(Z,$)??Y.window;if(Q===Y.limit&&B5(X,Y.window))return Y;return{limit:Q,window:X,initial:!1}},WX=(Y,Z,$)=>{let J=PZ(Z,"ratelimit-limit","x-ratelimit-limit"),Q=J0(J);if(Q!==void 0&&Q>0)return Q;let X=AX(Z);if(X===void 0)return;return Y.initial?X+$:Math.max(X+$,Y.limit)},AX=(Y)=>{let Z=PZ(Y,"ratelimit-remaining","x-ratelimit-remaining"),$=J0(Z);return $!==void 0&&$>=0?$:void 0},UX=(Y,Z)=>{let $=s7(Y,PZ(Z,"retry-after"));if($!==void 0)return $;let J=FX(PZ(Z,"ratelimit-reset-after","x-ratelimit-reset-after"));if(J!==void 0)return J;return NX(Y,PZ(Z,"ratelimit-reset","x-ratelimit-reset"))},s7=(Y,Z)=>{if(Z===void 0)return;let $=J0(Z);if($!==void 0)return Y0(IZ($),gY(1));let J=Date.parse(Z);if(Number.isNaN(J))return;let Q=J-Y.currentTimeMillisUnsafe();if(Q<=0)return gY(1);return gY(Q)},FX=(Y)=>{let Z=J0(Y);if(Z===void 0||Z<=0)return;return Y0(IZ(Z),gY(1))},NX=(Y,Z)=>{let $=J0(Z);if($===void 0||$<=0)return;let J=Y.currentTimeMillisUnsafe();if($>1000000000000)return gY(Math.max($-J,1));if($>1e9)return gY(Math.max($*1000-J,1));return Y0(IZ($),gY(1))},J0=(Y)=>{if(Y===void 0)return;let Z=/-?\d+(?:\.\d+)?/.exec(Y);if(Z===null)return;let $=Number(Z[0]);return Number.isFinite($)?$:void 0},PZ=(Y,...Z)=>{for(let $=0;$<Z.length;$++){let J=Y[Z[$]];if(J!==void 0)return J}return},LX=O(2,(Y,Z)=>s(Y,Q1(Z))),MX=O(2,(Y,Z)=>s(Y,x7(Z))),TX=O(2,(Y,Z)=>VY(Y.postprocess,($)=>Q1(Y.preprocess($),Z))),wX=O(2,(Y,Z)=>VY(($)=>Q1(Y.postprocess($),(J)=>o7(Z,(Q)=>Y5(Q,J.cookies))),($)=>U(Y.preprocess($),(J)=>L(a7(Z),(Q)=>o0(Q)?J:HZ(J,"cookie",W7(Q)))))),HX=(Y)=>A5(Y,(Z,$)=>{let J=new AbortController;return Z8.set($,J),$0(c7(()=>WY(()=>J.abort())),Z)}),EX=O((Y)=>r7(Y[0]),(Y,Z)=>VY(($)=>{let J=(Q,X)=>U(Y.postprocess(F(Q)),(G)=>G.status>=300&&G.status<400&&G.headers.location&&X<(Z??10)?J(EZ(Q,new URL(G.headers.location,G.request.url)),X+1):F(G));return U($,(Q)=>J(Q,0))},Y.preprocess)),t7=j("effect/http/HttpClient/TracerDisabledWhen",{defaultValue:()=>$1}),e7=j("effect/HttpClient/TracerPropagationEnabled",{defaultValue:I7}),Y8=j("effect/http/HttpClient/SpanNameGenerator",{defaultValue:()=>(Y)=>`http.client ${Y.method}`}),N5=(Y)=>pY(vZ)(ZY((Z)=>L(Y,($)=>s($,W5((J)=>j7(Z,J)))))),Z1=(()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){let Z=new FinalizationRegistry(($)=>{$.abort()});return{register($,J){Z.register($,J,$)},unregister($){Z.unregister($)}}}let Y=new Map;return{register(Z,$){Y.set(Z,setTimeout(()=>$.abort(),5000))},unregister(Z){let $=Y.get(Z);if($===void 0)return;clearTimeout($),Y.delete(Z)}}})(),Z8=new WeakMap;class z5{original;controller;constructor(Y,Z){this.original=Y,this.controller=Z}[zZ]=zZ;[c]=c;applyInterrupt(Y){return _Z(()=>{return Z1.unregister(this.original),d7(Y,()=>WY(()=>{this.controller.abort()}))})}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return p7(()=>{return Z1.unregister(this.original),n7(this.original.stream,WY(()=>{this.controller.abort()}))})}toJSON(){return this.original.toJSON()}[hY](){return this.original[hY]()}pipe(){return vY(this,arguments)}}var E7=(Y)=>S7(Y)||IX(Y),IX=(Y)=>P0(Y)&&(Y.reason._tag==="TransportError"||Y.reason._tag==="StatusCodeError"&&$8(Y.reason.response)),PX=(Y)=>P0(Y)&&Y.reason._tag==="StatusCodeError"&&Y.reason.response.status===429,$8=(Y)=>Y.status===408||Y.status===429||Y.status===500||Y.status===502||Y.status===503||Y.status===504;var X8={};kY(X8,{layer:()=>vX,RequestInit:()=>L5,Fetch:()=>Q8});var Q8=j("effect/http/FetchHttpClient/Fetch",{defaultValue:()=>globalThis.fetch});class L5 extends S()("effect/http/FetchHttpClient/RequestInit"){}var jX=U5((Y,Z,$,J)=>{let Q=J.getRef(Q8),X=J.context.mapUnsafe.get(L5.key)??{},G=X.headers?fZ(C(X.headers),Y.headers):Y.headers,K=(z)=>L(d({try:()=>Q(Z,{...X,method:Y.method,headers:G,body:z,duplex:Y.body._tag==="Stream"?"half":void 0,signal:$}),catch:(_)=>new x({reason:new j0({request:Y,cause:_})})}),(_)=>J5(Y,_));switch(Y.body._tag){case"Raw":case"Uint8Array":return K(Y.body.body);case"FormData":return K(Y.body.formData);case"Stream":return U(J8(Y.body.stream),K)}return K(void 0)}),vX=N5(F(jX));var qJ={};kY(qJ,{use:()=>SJ,toWebHandler:()=>H2,toHttpEffect:()=>A2,serve:()=>w2,schemaPathParams:()=>O2,schemaParams:()=>B2,schemaNoBody:()=>_2,schemaJson:()=>z2,route:()=>gJ,provideRequest:()=>T2,prefixRoute:()=>CJ,prefixPath:()=>T0,params:()=>RJ,middleware:()=>R1,make:()=>vJ,layer:()=>xZ,disableLogger:()=>M2,cors:()=>L2,addAll:()=>W2,add:()=>D2,RouterConfig:()=>v1,RouteContext:()=>WZ,HttpRouter:()=>LY});var G8=/\+/g,K8=function(){};K8.prototype=Object.create(null);function V8(Y){let Z=new K8;if(typeof Y!=="string")return Z;let $=Y.length,J="",Q="",X=-1,G=-1,K=!1,z=!1,_=!1,B=!1,V=!1,D=0;for(let A=0;A<$+1;A++)if(D=A!==$?Y.charCodeAt(A):38,D===38){if(V=G>X,!V)G=A;if(J=Y.slice(X+1,G),V||J.length>0){if(_)J=J.replace(G8," ");if(K)try{J=decodeURIComponent(J)||J}catch{}if(V){if(Q=Y.slice(G+1,A),B)Q=Q.replace(G8," ");if(z)try{Q=decodeURIComponent(Q)||Q}catch{}}let W=Z[J];if(W===void 0)Z[J]=Q;else if(W.pop)W.push(Q);else Z[J]=[W,Q]}Q="",X=A,G=A,K=!1,z=!1,_=!1,B=!1}else if(D===61)if(G<=X)G=A;else z=!0;else if(D===43)if(G>X)B=!0;else _=!0;else if(D===37)if(G>X)z=!0;else K=!0;return Z}var SX=/^https?:\/\/.*?\//,M5=/(\/:[^/()]*?)\?(\/?)/,O8=(Y={})=>new D8(Y);class D8{constructor(Y={}){this.options={ignoreTrailingSlash:!0,ignoreDuplicateSlashes:!0,caseSensitive:!1,maxParamLength:100,...Y}}options;routes=[];trees={};on(Y,Z,$){let J=Z.match(M5);if(J&&J.index!==void 0){gX(Z.length===J.index+J[0].length,"Optional Parameter needs to be the last parameter of the path");let X=Z.replace(M5,"$1$2"),G=Z.replace(M5,"$2");this.on(Y,X,$),this.on(Y,G,$);return}if(this.options.ignoreDuplicateSlashes)Z=z8(Z);if(this.options.ignoreTrailingSlash)Z=_8(Z);let Q=typeof Y==="string"?[Y]:Y;for(let X of Q)this._on(X,Z,$)}all(Y,Z){this.on(kX,Y,Z)}_on(Y,Z,$){if(this.trees[Y]===void 0)this.trees[Y]=new Q0("/");let J=Z;if(J==="*"&&this.trees[Y].prefix.length!==0){let z=this.trees[Y];this.trees[Y]=new Q0(""),this.trees[Y].staticChildren["/"]=z}let Q=this.trees[Y].prefix.length,X=this.trees[Y],G=[];for(let z=0;z<=J.length;z++){if(J.charCodeAt(z)===58&&J.charCodeAt(z+1)===58){z++;continue}let _=J.charCodeAt(z)===58&&J.charCodeAt(z+1)!==58,B=J.charCodeAt(z)===42;if(_||B||z===J.length&&z!==Q){let V=J.slice(Q,z);if(!this.options.caseSensitive)V=V.toLowerCase();V=V.split("::").join(":"),V=V.split("%").join("%25"),X=X.createStaticChild(V)}if(_){let V=!1,D=[],A=z+1;for(let W=A;;W++){let N=J.charCodeAt(W),T=N===40,E=N===45||N===46,YY=N===47||W===J.length;if(T||E||YY){let I=J.slice(A,W);if(G.push(I),V=V||T||E,T){let yY=bX(J,W),w0=J.slice(W,yY+1);D.push(qX(w0)),W=yY+1}else D.push("(.*?)");let p=W;for(;W<J.length;W++){let yY=J.charCodeAt(W);if(yY===47)break;if(yY===58)if(J.charCodeAt(W+1)===58)W++;else break}let w=J.slice(p,W);if(w)w=w.split("::").join(":"),w=w.split("%").join("%25"),D.push(xX(w));if(A=W+1,YY||J.charCodeAt(W)===47||W===J.length){let yY=V?"()"+w:w,w0=J.slice(z,W);J=J.slice(0,z+1)+yY+J.slice(W),z+=yY.length;let xJ=V?new RegExp("^"+D.join("")+"$"):void 0;X=X.createParametricChild(xJ,w,w0),Q=z+1;break}}}}else if(B){if(G.push("*"),X=X.createWildcardChild(),Q=z+1,z!==J.length-1)throw Error("Wildcard must be the last character in the route")}}if(!this.options.caseSensitive)J=J.toLowerCase();if(J==="*")J="/*";for(let z of this.routes)if(z.method===Y&&z.pattern===J)throw Error(`Method '${Y}' already declared for route '${J}'`);let K={method:Y,path:Z,pattern:J,params:G,handler:$};this.routes.push(K),X.addRoute(K)}has(Y,Z){let $=this.trees[Y];if($===void 0)return!1;let J=$.getStaticChild(Z);if(J===void 0)return!1;return J.isLeafNode}find(Y,Z){let $=this.trees[Y];if($===void 0)return;if(Z.charCodeAt(0)!==47)Z=Z.replace(SX,"/");if(this.options.ignoreDuplicateSlashes)Z=z8(Z);let J,Q,X;try{J=yX(Z),Z=J.path,Q=J.querystring,X=J.shouldDecodeParam}catch(D){return}if(this.options.ignoreTrailingSlash)Z=_8(Z);let G=Z;if(this.options.caseSensitive===!1)Z=Z.toLowerCase();let K=this.options.maxParamLength,z=$.prefix.length,_=[],B=Z.length,V=[];while(!0){if(z===B&&$.isLeafNode){let A=$.handlerStorage?.find();if(A!==void 0)return{handler:A.handler,params:A.createParams(_),searchParams:V8(Q)}}let D=$.getNextNode(Z,z,V,_.length);if(D===void 0){if(V.length===0)return;let A=V.pop();z=A.brotherPathIndex,_.splice(A.paramsCount),D=A.brotherNode}if($=D,$._tag==="StaticNode"){z+=$.prefix.length;continue}if($._tag==="WildcardNode"){let A=G.slice(z);if(X)A=B8(A);_.push(A),z=B;continue}if($._tag==="ParametricNode"){let A=G.indexOf("/",z);if(A===-1)A=B;let W=G.slice(z,A);if(X)W=B8(W);if($.regex!==void 0){let N=$.regex.exec(W);if(N===null)continue;for(let T=1;T<N.length;T++){let E=N[T];if(E.length>K)return;_.push(E)}}else{if(W.length>K)return;_.push(W)}z=A}}}}class W8{handlers=[];unconstrainedHandler;find(){return this.unconstrainedHandler}add(Y){let Z={params:Y.params,handler:Y.handler,createParams:CX(Y.params)};this.handlers.push(Z),this.unconstrainedHandler=this.handlers[0]}}class T5{isLeafNode=!1;routes;handlerStorage;addRoute(Y){if(this.routes===void 0)this.routes=[Y];else this.routes.push(Y);if(this.handlerStorage===void 0)this.handlerStorage=new W8;this.isLeafNode=!0,this.handlerStorage.add(Y)}}class w5 extends T5{staticChildren={};findStaticMatchingChild(Y,Z){let $=this.staticChildren[Y.charAt(Z)];if($===void 0||!$.matchPrefix(Y,Z))return;return $}getStaticChild(Y,Z=0){if(Y.length===Z)return this;let $=this.findStaticMatchingChild(Y,Z);if($===void 0)return;return $.getStaticChild(Y,Z+$.prefix.length)}createStaticChild(Y){if(Y.length===0)return this;let Z=this.staticChildren[Y.charAt(0)];if(Z){let J=1;for(;J<Z.prefix.length;J++)if(Y.charCodeAt(J)!==Z.prefix.charCodeAt(J)){Z=Z.split(this,J);break}return Z.createStaticChild(Y.slice(J))}let $=Y.charAt(0);return this.staticChildren[$]=new Q0(Y),this.staticChildren[$]}}class Q0 extends w5{_tag="StaticNode";constructor(Y){super();this.setPrefix(Y)}prefix;matchPrefix;parametricChildren=[];wildcardChild;setPrefix(Y){if(this.prefix=Y,Y.length===1)this.matchPrefix=(Z,$)=>!0;else{let Z=Y.length;this.matchPrefix=function($,J){for(let Q=1;Q<Z;Q++)if($.charCodeAt(J+Q)!==this.prefix.charCodeAt(Q))return!1;return!0}}}getParametricChild(Y){if(Y===void 0)return this.parametricChildren.find(($)=>$.isRegex===!1);let Z=Y.source;return this.parametricChildren.find(($)=>{if($.regex===void 0)return!1;return $.regex.source===Z})}createParametricChild(Y,Z,$){let J=this.getParametricChild(Y);if(J!==void 0)return J.nodePaths.add($),J;return J=new A8(Y,Z,$),this.parametricChildren.push(J),this.parametricChildren.sort((Q,X)=>{if(!Q.isRegex)return 1;if(!X.isRegex)return-1;if(Q.staticSuffix===void 0)return 1;if(X.staticSuffix===void 0)return-1;if(X.staticSuffix.endsWith(Q.staticSuffix))return 1;if(Q.staticSuffix.endsWith(X.staticSuffix))return-1;return 0}),J}createWildcardChild(){if(this.wildcardChild===void 0)this.wildcardChild=new U8;return this.wildcardChild}split(Y,Z){let $=this.prefix.slice(0,Z),J=this.prefix.slice(Z);this.setPrefix(J);let Q=new Q0($);return Q.staticChildren[J.charAt(0)]=this,Y.staticChildren[$.charAt(0)]=Q,Q}getNextNode(Y,Z,$,J){let Q=this.findStaticMatchingChild(Y,Z),X=0;if(Q===void 0){if(this.parametricChildren.length===0)return this.wildcardChild;Q=this.parametricChildren[0],X=1}if(this.wildcardChild!==void 0)$.push({paramsCount:J,brotherPathIndex:Z,brotherNode:this.wildcardChild});for(let G=this.parametricChildren.length-1;G>=X;G--)$.push({paramsCount:J,brotherPathIndex:Z,brotherNode:this.parametricChildren[G]});return Q}}class A8 extends w5{regex;staticSuffix;_tag="ParametricNode";constructor(Y,Z,$){super();this.regex=Y,this.staticSuffix=Z,this.isRegex=!!Y,this.nodePaths=new Set([$])}isRegex;nodePaths;getNextNode(Y,Z){return this.findStaticMatchingChild(Y,Z)}}class U8 extends T5{_tag="WildcardNode";getNextNode(Y,Z,$,J){return}}var gX=(Y,Z)=>{if(!Y)throw Error(Z)};function z8(Y){return Y.replace(/\/\/+/g,"/")}function _8(Y){if(Y.length>1&&Y.charCodeAt(Y.length-1)===47)return Y.slice(0,-1);return Y}function CX(Y){let Z=Y.length;return function($){let J={};for(let Q=0;Q<Z;Q++)J[Y[Q]]=$[Q];return J}}function bX(Y,Z){let $=1;while(Z<Y.length){if(Z++,Y[Z]==="\\"){Z++;continue}if(Y[Z]===")")$--;else if(Y[Z]==="(")$++;if(!$)return Z}throw TypeError('Invalid regexp expression in "'+Y+'"')}function qX(Y){if(Y.charCodeAt(1)===94)Y=Y.slice(0,1)+Y.slice(2);if(Y.charCodeAt(Y.length-2)===36)Y=Y.slice(0,Y.length-2)+Y.slice(Y.length-1);return Y}function xX(Y){return Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function F8(Y,Z){if(Y===50){if(Z===53)return"%";if(Z===51)return"#";if(Z===52)return"$";if(Z===54)return"&";if(Z===66)return"+";if(Z===98)return"+";if(Z===67)return",";if(Z===99)return",";if(Z===70)return"/";if(Z===102)return"/";return}if(Y===51){if(Z===65)return":";if(Z===97)return":";if(Z===66)return";";if(Z===98)return";";if(Z===68)return"=";if(Z===100)return"=";if(Z===70)return"?";if(Z===102)return"?";return}if(Y===52&&Z===48)return"@";return}function yX(Y){let Z=!1,$=!1,J="";for(let X=1;X<Y.length;X++){let G=Y.charCodeAt(X);if(G===37){let K=Y.charCodeAt(X+1),z=Y.charCodeAt(X+2);if(F8(K,z)===void 0)Z=!0;else{if($=!0,K===50&&z===53)Z=!0,Y=Y.slice(0,X+1)+"25"+Y.slice(X+1),X+=2;X+=2}}else if(G===63||G===59||G===35){J=Y.slice(X+1),Y=Y.slice(0,X);break}}return{path:Z?decodeURI(Y):Y,querystring:J,shouldDecodeParam:$}}function B8(Y){let Z=Y.indexOf("%");if(Z===-1)return Y;let $="",J=Z;for(let Q=Z;Q<Y.length;Q++)if(Y.charCodeAt(Q)===37){let X=Y.charCodeAt(Q+1),G=Y.charCodeAt(Q+2),K=F8(X,G);$+=Y.slice(J,Q)+K,J=Q+3}return Y.slice(0,Z)+$+Y.slice(J)}var kX=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];var N8=O8;var H5="~effect/http/HttpServerResponse",AY=(Y)=>q(Y,H5),t=(Y)=>UY({status:Y?.status??204,statusText:Y?.statusText,headers:Y?.headers?C(Y.headers):void 0,cookies:Y?.cookies});var N3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies??a0,body:lZ(Y,G0(Z,$))})},G0=(Y,Z)=>{if(Y?.contentType)return Y.contentType;else if(Y?.headers)return Z["content-type"]},L3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies??a0,body:uY(Y,G0(Z,$))})};var M3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:c0(Y,G0(Z,$))})},T3=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:uY(f0(a(Y)),G0(Z,$)??"application/x-www-form-urlencoded")})};var j5=(Y,Z)=>{let $=Z?.headers?C(Z.headers):n;return UY({status:Z?.status??200,statusText:Z?.statusText,headers:$,cookies:Z?.cookies,body:jY(Y,G0(Z,$),Z?.contentLength)})};var w3=O(3,(Y,Z,$)=>UY({...Y,headers:HY(Y.headers,Z,$)})),L8=O(2,(Y,Z)=>UY({...Y,headers:b0(Y.headers,Z)}));var H3=O((Y)=>AY(Y[0]),(Y,Z,$,J)=>L(D7(Y.cookies,Z,$,J).asEffect(),(Q)=>UY({...Y,cookies:Q})));var M8=O(2,(Y,Z)=>UY({...Y,body:Z}));var T8=(Y,Z)=>{let $=new globalThis.Headers(Y.headers);if(!o0(Y.cookies)){let Q=A7(Y.cookies);for(let X of Q)$.append("set-cookie",X)}if(Z?.withoutBody)return new Response(void 0,{status:Y.status,statusText:Y.statusText,headers:$});let J=Y.body;switch(J._tag){case"Empty":return new Response(void 0,{status:Y.status,statusText:Y.statusText,headers:$});case"Uint8Array":case"Raw":{if(J.body instanceof Response){for(let[Q,X]of $)J.body.headers.set(Q,X);return J.body}return new Response(J.body,{status:Y.status,statusText:Y.statusText,headers:$})}case"FormData":return new Response(J.formData,{status:Y.status,statusText:Y.statusText,headers:$});case"Stream":return new Response(wZ(J.stream,Z?.context??GZ()),{status:Y.status,statusText:Y.statusText,headers:$})}};var fX={...x0,[H5]:H5,[RZ]:!0,toJSON(){return{_id:"HttpServerResponse",status:this.status,statusText:this.statusText,headers:fY(this.headers),cookies:this.cookies.toJSON(),body:this.body.toJSON()}}},UY=(Y)=>{let Z=Object.create(fX);if(Z.status=Y.status,Z.statusText=Y.statusText,Z.cookies=Y.cookies??a0,Z.body=Y.body??QZ,Z.body._tag!=="Empty"&&(Z.body.contentType||Z.body.contentLength)){let $=wY({...Y.headers});if(Z.body.contentType)$["content-type"]=Z.body.contentType;if(Z.body.contentLength)$["content-length"]=Z.body.contentLength.toString();Z.headers=$}else Z.headers=Y.headers??n;return Z};var oY="~effect/http/HttpServerRespondable",E8=(Y)=>q(Y,oY),cX=t({status:400}),dX=t({status:404});var I8=(Y,Z)=>{if(AY(Y))return F(Y);else if(E8(Y))return K0(Y[oY](),()=>F(Z));else if(H8(Y))return F(cX);else if(w8(Y))return F(dX);return F(Z)},P8=(Y,Z)=>{if(AY(Y))return F(Y);else if(E8(Y))return K0(Y[oY](),()=>F(Z));return F(Z)};var j8="~effect/http/HttpServerError";class l extends P("HttpServerError"){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[j8]=j8;stack=`${this.name}: ${this.message}`;get request(){return this.reason.request}get response(){return"response"in this.reason?this.reason.response:void 0}[oY](){return this.reason[oY]()}get[RZ](){return this.reason[RZ]??!1}get message(){return this.reason.message}}class JY extends P("RequestParseError"){[oY](){return F(t({status:400}))}get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return g8(this._tag,this.description,this.methodAndUrl)}}class v5 extends P("RouteNotFound"){[oY](){return F(t({status:404}))}[RZ]=!0;get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return g8(this._tag,this.description,this.methodAndUrl)}}class _1 extends S()("effect/http/HttpServerError/ClientAbort"){static annotation=this.context(!0).pipe(gZ(S8,{name:"ClientAbort",stack:v8,parent:void 0}))}var g8=(Y,Z,$)=>{let J=`${Y} (${$})`;return Z?`${J}: ${Z}`:J},R5=(Y)=>{let Z,$=lX,J=[],Q=[],X=!1;for(let G=0;G<Y.reasons.length;G++){let K=Y.reasons[G];switch(K._tag){case"Fail":{$=I8(K.error,z1),J.push(K);break}case"Die":{if(AY(K.defect))Z=K.defect;else $=P8(K.defect,z1),J.push(K);break}case"Interrupt":{if(X=K.annotations.has(_1.key),J.length>0)break;Q.push(K);break}}}if(Z)return F([Z,V1(J)]);else if(Q.length>0&&J.length===0)J.push(...Q),$=X?iX:pX;return V0($,(G)=>{return J.push(R8(G)),[G,V1(J)]})},S5=(Y)=>{let Z,$=Y.reasons.filter((J)=>{if(J._tag==="Die"&&AY(J.defect))return Z=J.defect,!1;return!0});return[Z??z1,$.length>0?b(V1($)):H()]},z1=t({status:500}),lX=F(z1),iX=F(t({status:499})),pX=F(t({status:503})),C8=(Y)=>{if(Y._tag==="Success")return Y.value;return S5(Y.cause)[0]};var A0={};kY(A0,{upgradeChannel:()=>E4,toWebResult:()=>u5,toWeb:()=>u4,toURL:()=>W0,toClientRequest:()=>q4,searchParamsFromURL:()=>m$,schemaSearchParams:()=>j4,schemaHeaders:()=>P4,schemaCookies:()=>I4,schemaBodyUrlParams:()=>S4,schemaBodyMultipart:()=>g4,schemaBodyJson:()=>v4,schemaBodyFormJson:()=>C4,schemaBodyForm:()=>R4,fromWeb:()=>f5,fromClientRequest:()=>b4,TypeId:()=>OZ,ParsedSearchParams:()=>xY,MaxBodySize:()=>rZ,HttpServerRequest:()=>M});var B1="~effect/socket/Socket/SocketError",rX=(Y)=>q(Y,B1);class s8 extends tY("effect/socket/Socket/SocketReadError")({_tag:mY("SocketReadError"),cause:AZ}){message="An error occurred during Read"}class t8 extends tY("effect/socket/Socket/SocketWriteError")({_tag:mY("SocketWriteError"),cause:AZ}){message="An error occurred during Write"}class e8 extends tY("effect/socket/Socket/SocketOpenError")({_tag:mY("SocketOpenError"),kind:I0(["Unknown","Timeout"]),cause:AZ}){get message(){return this.kind==="Timeout"?'timeout waiting for "open"':"An error occurred during Open"}}class Y$ extends tY("effect/socket/Socket/SocketCloseError")({_tag:mY("SocketCloseError"),code:o8,closeReason:E0(IY)}){static filterClean(Y){return function(Z){return Z$.is(Z)&&Z.reason._tag==="SocketCloseError"&&Y(Z.reason.code)?PY(Z.reason):h(Z)}}get message(){if(this.closeReason)return`${this.code}: ${this.closeReason}`;return`${this.code}`}}var sX=k0([s8,t8,e8,Y$]);class Z$ extends r8(B1)("SocketError",{_tag:mY("SocketError"),reason:sX}){constructor(Y){if("cause"in Y.reason)super({...Y,cause:Y.reason.cause});else super(Y)}[B1]=B1;static is(Y){return rX(Y)}message=this.reason.message}var tX=(Y,Z)=>D1(_0(function*($,J){let Q=yield*u8(),X=yield*y8(J),G=yield*x8(Y.writer,X),K,z=0,_=h8({while:()=>z<K.length,body:()=>G(K[z++]),step:b8});return yield*$.pipe(U((B)=>{if(B.length===1)return G(B[0]);return K=B,z=0,_}),d8({disableYield:!0}),f8(m8,(B)=>i8(Q,B)),c8(z0(X,O1)),g5(J)),yield*Y.runRaw((B)=>{l8(Q,Z(B))}).pipe(n8(Q),g5(J)),p8(Q)})),eX=(Y)=>{let Z=new TextEncoder;return tX(Y,($)=>typeof $==="string"?Z.encode($):$)};var $$=()=>(Y)=>eX(Y);var J$=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,Q$=/\\([\v\u0020-\u00ff])/gu,Z4=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,$4=/^[!#$%&'*+.^\w|~-]+$/u,W1={value:"",parameters:Object.create(null)};function A1(Y,Z=!1){if(typeof Y!=="string")return W1;let $=Y.indexOf(";"),J=$!==-1?Y.slice(0,$).trim():Y.trim();if((Z?$4:Z4).test(J)===!1)return W1;let X={value:J.toLowerCase(),parameters:Object.create(null)};if($===-1)return X;let G,K,z;J$.lastIndex=$;while(K=J$.exec(Y)){if(K.index!==$)return W1;if($+=K[0].length,G=K[1].toLowerCase(),z=K[2],z[0]==='"')z=z.slice(1,z.length-1),!Z&&Q$.test(z)&&(z=z.replace(Q$,"$1"));X.parameters[G]=z}if($!==Y.length)return W1;return X}var QY;(function(Y){Y[Y.key=0]="key",Y[Y.whitespace=1]="whitespace",Y[Y.value=2]="value"})(QY||(QY={}));var B0={_tag:"Continue"},Q4=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1],X4=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];function X$(){let Y=new TextDecoder,Z={state:QY.key,headers:Object.create(null),key:"",value:void 0,crlf:0,previousChunk:void 0,pairs:0,size:0};function $(X){return Z.state=QY.key,Z.headers=Object.create(null),Z.key="",Z.value=void 0,Z.crlf=0,Z.previousChunk=void 0,Z.pairs=0,Z.size=0,X}function J(X,G){let K=new Uint8Array(X.length+G.length);return K.set(X),K.set(G,X.length),K}function Q(X){return $({_tag:"Failure",reason:X,headers:Z.headers})}return function(G,K){let z=0,_;if(Z.previousChunk!==void 0){z=Z.previousChunk.length,_=z;let V=new Uint8Array(G.length+z);V.set(Z.previousChunk),V.set(G,z),Z.previousChunk=void 0,G=V}let B=G.length;Y:while(K<B){if(Z.state===QY.key){let V=K;for(;V<B;V++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[V]===58){if(Z.key+=Y.decode(G.subarray(K,V)).toLowerCase(),Z.key.length===0)return Q("InvalidHeaderName");if(G[V+1]===32&&G[V+2]!==32&&G[V+2]!==9)K=V+2,Z.state=QY.value,Z.size++;else if(G[V+1]!==32&&G[V+1]!==9)K=V+1,Z.state=QY.value;else K=V+1,Z.state=QY.whitespace;break}else if(Q4[G[V]]!==1)return Q("InvalidHeaderName")}if(V===B)return Z.key+=Y.decode(G.subarray(K,B)).toLowerCase(),B0}if(Z.state===QY.whitespace){for(;K<B;K++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[K]!==32&&G[K]!==9){Z.state=QY.value;break}}if(K===B)return B0}if(Z.state===QY.value){let V=K;if(_!==void 0)V=_,_=void 0;for(;V<B;V++){if(Z.size++>16384)return Q("HeaderTooLarge");if(G[V]===13||Z.crlf>0){let D=G[V];if(D===13&&Z.crlf===0)Z.crlf=1,V++,Z.size++,D=G[V];if(D===10&&Z.crlf===1)Z.crlf=2,V++,Z.size++,D=G[V];if(D===13&&Z.crlf===2)Z.crlf=3,V++,Z.size++,D=G[V];if(D===10&&Z.crlf===3)Z.crlf=4,V++,Z.size++;if(Z.crlf<4&&V>=B)return Z.previousChunk=G.subarray(K),B0;else if(Z.crlf>=2){Z.value=Z.value===void 0?G.subarray(K,V-Z.crlf):J(Z.value,G.subarray(K,V-Z.crlf));let A=Y.decode(Z.value);if(Z.headers[Z.key]===void 0)Z.headers[Z.key]=A;else if(typeof Z.headers[Z.key]==="string")Z.headers[Z.key]=[Z.headers[Z.key],A];else Z.headers[Z.key].push(A);if(K=V,Z.size--,Z.crlf!==4&&Z.pairs===100)return Q("TooManyHeaders");else if(Z.crlf===3)return Q("InvalidHeaderValue");else if(Z.crlf===4)return $({_tag:"Headers",headers:Z.headers,endPosition:K-z});Z.pairs++,Z.key="",Z.value=void 0,Z.crlf=0,Z.state=QY.key;continue Y}}else if(X4[G[V]]!==1)return Q("InvalidHeaderValue")}if(V===B)return Z.value=Z.value===void 0?G.subarray(K,B):J(Z.value,G.subarray(K,B)),B0}}if(K>B)Z.size+=B-K;return B0}}function K4(Y){let Z=new TextEncoder().encode(Y),$=Z.length,J={};for(let Q=0;Q<$;Q++){let X=Z[Q];if(J[X]===void 0)J[X]=[];J[X].push(Q)}return{needle:Z,needleLength:$,indexes:J,firstByte:Z[0],previousChunk:void 0,previousChunkLength:0,matchIndex:0}}function G$(Y,Z,$){let J=K4(Y);if($!==void 0)J.previousChunk=$,J.previousChunkLength=$.length;function Q(){if("Buffer"in globalThis&&!(("Bun"in globalThis)||("Deno"in globalThis)))return function(_,B,V){return Buffer.prototype.indexOf.call(_,B,V)};let z=new Uint8Array(256).fill(J.needle.length);for(let _=0,B=J.needle.length-1;_<B;++_)z[J.needle[_]]=B-_;return function(_,B,V){let D=_.length,A=V+J.needleLength-1;while(A<D){for(let W=J.needleLength-1,N=A;W>=0&&_[N]===B[W];W--,N--)if(W===0)return N;A+=z[_[A]]}return-1}}let X=Q();function G(z){let _=z.length;if(J.previousChunk!==void 0){let V=new Uint8Array(J.previousChunkLength+_);V.set(J.previousChunk),V.set(z,J.previousChunkLength),z=V,_=J.previousChunkLength+_,J.previousChunk=void 0}if(_<J.needleLength){J.previousChunk=z,J.previousChunkLength=_;return}let B=0;while(B<_){let V=X(z,J.needle,B);if(V>-1){if(V>B)Z(J.matchIndex,z.subarray(B,V));J.matchIndex+=1,B=V+J.needleLength;continue}else if(z[_-1]in J.indexes){let D=J.indexes[z[_-1]],A=-1;for(let W=0,N=D.length;W<N;W++){let T=D[W];if(z[_-1-T]===J.firstByte&&W>A)A=T}if(A===-1)if(B===0)Z(J.matchIndex,z);else Z(J.matchIndex,z.subarray(B));else{if(_-1-A>B)Z(J.matchIndex,z.subarray(B,_-1-A));J.previousChunk=z.subarray(_-1-A),J.previousChunkLength=A+1}}else if(B===0)Z(J.matchIndex,z);else Z(J.matchIndex,z.subarray(B));break}}function K(){if(J.previousChunk!==void 0&&J.previousChunk!==$)Z(J.matchIndex,J.previousChunk);J.previousChunk=$,J.previousChunkLength=$?.length??0,J.matchIndex=0}return{write:G,end:K}}var CY;(function(Y){Y[Y.headers=0]="headers",Y[Y.body=1]="body"})(CY||(CY={}));var z4={_tag:"InvalidDisposition"},_4={_tag:"EndNotReached"},B4={_tag:"ReachedLimit",limit:"MaxParts"},O4={_tag:"ReachedLimit",limit:"MaxTotalSize"},D4={_tag:"ReachedLimit",limit:"MaxPartSize"},K$={_tag:"ReachedLimit",limit:"MaxFieldSize"},W4=new TextEncoder().encode(`\r
3
3
  `);function b5(Y){return Y.filename!==void 0||Y.contentType==="application/octet-stream"}function A4(Y){return A1(Y["content-type"]).parameters.boundary}function U1(Y){}function z$({headers:Y,onFile:Z,onField:$,onError:J,onDone:Q,isFile:X=b5,maxParts:G=1/0,maxTotalSize:K=1/0,maxPartSize:z=1/0,maxFieldSize:_=1048576}){let B=A4(Y);if(B===void 0)return J({_tag:"InvalidBoundary"}),{write:U1,end(){}};let V={state:CY.headers,index:0,parts:0,onChunk:U1,info:void 0,headerSkip:0,partSize:0,totalSize:0,isFile:!1,fieldChunks:[],fieldSize:0};function D(){V.state=CY.body,V.isFile=!0,V.onChunk=U1}let A=X$(),W=G$(`\r
4
- --${B}`,function(N,T){if(N===0){D();return}else if(N!==V.index){if(V.index>0)if(V.isFile)V.onChunk(null),V.partSize=0;else{if(V.fieldChunks.length===1)$(V.info,V.fieldChunks[0]);else{let E=new Uint8Array(V.fieldSize),YY=0;for(let I=0;I<V.fieldChunks.length;I++){let p=V.fieldChunks[I];E.set(p,YY),YY+=p.length}$(V.info,E)}V.fieldSize=0,V.fieldChunks=[]}if(V.state=CY.headers,V.index=N,V.headerSkip=2,T[0]===45&&T[1]===45)return Q();if(V.parts++,V.parts>G)J(B4)}if((V.partSize+=T.length)>z)J(D4);if(V.state===CY.headers){let E=A(T,V.headerSkip);if(V.headerSkip=0,E._tag==="Continue")return;else if(E._tag==="Failure")return D(),J({_tag:"BadHeaders",error:E});let YY=A1(E.headers["content-type"]),I=A1(E.headers["content-disposition"],!0);if(I.value==="form-data"&&!("name"in I.parameters))return D(),J(z4);let p;if("filename*"in I.parameters){let w=I.parameters["filename*"].split("''");if(w.length===2)p=decodeURIComponent(w[1])}if(V.info={name:I.parameters.name??"",filename:p??I.parameters.filename,contentType:YY.value===""?I.parameters.filename!==void 0?"application/octet-stream":"text/plain":YY.value,contentTypeParameters:YY.parameters,contentDisposition:I.value,contentDispositionParameters:I.parameters,headers:E.headers},V.state=CY.body,V.isFile=X(V.info),V.isFile)V.onChunk=Z(V.info);if(E.endPosition<T.length)if(V.isFile)V.onChunk(T.subarray(E.endPosition));else{let w=T.subarray(E.endPosition);if((V.fieldSize+=w.length)>_)J(K$);V.fieldChunks.push(w)}}else if(V.isFile)V.onChunk(T);else{if((V.fieldSize+=T.length)>_)J(K$);V.fieldChunks.push(T)}},W4);return{write(N){if((V.totalSize+=N.length)>K)return J(O4);return W.write(N)},end(){if(W.end(),V.state===CY.body)J(_4);V.state=CY.headers,V.index=0,V.parts=0,V.onChunk=U1,V.info=void 0,V.totalSize=0,V.partSize=0,V.fieldChunks=[],V.fieldSize=0}}}var V$=new TextDecoder("utf-8");function U4(Y){if(Y==="utf-8"||Y==="utf8"||Y==="")return V$;try{return new TextDecoder(Y)}catch(Z){return V$}}function _$(Y,Z){return U4(Y.contentTypeParameters.charset??"utf-8").decode(Z)}var B$=z$,O$=b5,D$=_$;var NY="~effect/http/Multipart";var W$="~effect/http/Multipart/MultipartError";class j$ extends n0{}class k extends P("MultipartError"){static fromReason(Y,Z){return new k({reason:new j$({_tag:Y,cause:Z})})}[W$]=W$;get message(){return this.reason._tag}}var y5=(Y)=>f(Y),v$=(Y,Z)=>{let $=w$(Y);return O(2,(J,Q)=>L(f(T$({[Q]:$}))(J,Z),(X)=>X[Q]))},L4=(Y)=>u((Z)=>{let $=y(Z.context,x$);return F({headers:Y,maxParts:Z.getRef(C$),maxFieldSize:Number(Z.getRef(b$)),maxPartSize:D0(Z.getRef(q$),Number),maxTotalSize:D0(Z.getRef(rZ),Number),isFile:$.length===0?void 0:(J)=>!$.some((Q)=>J.contentType.includes(Q))&&O$(J)})}),k5=(Y)=>D1((Z)=>L(L4(Y),($)=>{let J=[],Q=H(),X=B$({...$,onField(K,z){J.push(new R$(K.name,K.contentType,D$(K,z)))},onFile(K){let z=[],_=!1,B=L$(F(_Z(function V(){if(!q5(z))return _?U$():U(G,V);let D=z;return z=[],F(D)})));return J.push(new S$(K,B)),function(V){if(V===null)_=!0;else z.push(V)}},onError(K){Q=b(x5(M4(K)))},onDone(){Q=b(x5(A$()))}}),G=Z.pipe(U((K)=>{for(let z=0;z<K.length;z++)X.write(K[z]);return e}),K0((K)=>{if(N$(K))X.end();else Q=b(F$(K));return e}));return G.pipe(U(function K(){if(!q5(J)){if(r(Q))return Q.value;return U(G,K)}let z=J;return J=[],F(z)}))}));function M4(Y){switch(Y._tag){case"ReachedLimit":switch(Y.limit){case"MaxParts":return k.fromReason("TooManyParts",Y);case"MaxFieldSize":return k.fromReason("FieldTooLarge",Y);case"MaxPartSize":return k.fromReason("FileTooLarge",Y);case"MaxTotalSize":return k.fromReason("BodyTooLarge",Y)}default:return k.fromReason("Parse",Y)}}class F1 extends RY{[NY];constructor(){super();this[NY]=NY}}class R$ extends F1{_tag="Field";key;contentType;value;constructor(Y,Z,$){super();this.key=Y,this.contentType=Z,this.value=$}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"Field",key:this.key,contentType:this.contentType,value:this.value}}}class S$ extends F1{_tag="File";key;name;contentType;content;contentEffect;constructor(Y,Z){super();this.key=Y.name,this.name=Y.filename??Y.name,this.contentType=Y.contentType,this.content=H$(Z),this.contentEffect=Z.pipe(w4,JZ(($)=>k.fromReason("InternalError",$)))}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"File",key:this.key,name:this.name,contentType:this.contentType}}}var T4=(Y,Z)=>U(dY.asEffect(),($)=>JZ(E$(Z.content,$.sink(Y)),(J)=>k.fromReason("InternalError",J))),w4=(Y)=>M$(Y,DY(new Uint8Array(0)),(Z,$)=>{let J=$.reduce((G,K)=>G+K.length,Z.length),Q=new Uint8Array(J);Q.set(Z,0);let X=Z.length;for(let G of $)Q.set(G,X),X+=G.length;return Q}),m5=(Y,Z=T4)=>i(function*(){let $=yield*dY,J=yield*P$,Q=yield*$.makeTempDirectoryScoped(),X=Object.create(null);return yield*I$(Y,(G)=>{if(G._tag==="Field"){if(!(G.key in X))X[G.key]=G.value;else if(typeof X[G.key]==="string")X[G.key]=[X[G.key],G.value];else X[G.key].push(G.value);return e}else if(G.name==="")return e;let K=G,z=J.join(Q,J.basename(K.name).slice(-128)),_=new g$(K.key,K.name,K.contentType,z);if(Array.isArray(X[G.key]))X[G.key].push(_);else X[G.key]=[_];return Z(z,K)}),X}).pipe(X1("PlatformError",($)=>g(k.fromReason("InternalError",$))));class g$ extends F1{_tag="PersistedFile";key;name;contentType;path;constructor(Y,Z,$,J){super();this.key=Y,this.name=Z,this.contentType=$,this.path=J}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"PersistedFile",key:this.key,name:this.name,contentType:this.contentType,path:this.path}}}var c3=(Y)=>{let Z=new Map;if(Y.maxParts!==void 0)Z.set(C$.key,Y.maxParts);if(Y.maxFieldSize!==void 0)Z.set(b$.key,O0(Y.maxFieldSize));if(Y.maxFileSize!==void 0)Z.set(q$.key,D0(Y.maxFileSize,O0));if(Y.maxTotalSize!==void 0)Z.set(rZ.key,D0(Y.maxTotalSize,O0));if(Y.fieldMimeTypes!==void 0)Z.set(x$.key,Y.fieldMimeTypes);return bY(Z)},C$=j("effect/http/Multipart/MaxParts",{defaultValue:()=>{return}}),b$=j("effect/http/Multipart/MaxFieldSize",{defaultValue:DY(O0(10485760))}),q$=j("effect/http/Multipart/MaxFileSize",{defaultValue:()=>{return}}),x$=j("effect/http/Multipart/FieldMimeTypes",{defaultValue:DY(["application/json"])});var OZ="~effect/http/HttpServerRequest",M=S("effect/http/HttpServerRequest");class xY extends S()("effect/http/ParsedSearchParams"){}var m$=(Y)=>{let Z={};for(let[$,J]of Y.searchParams.entries()){let Q=Z[$];if(Q!==void 0)if(Array.isArray(Q))Q.push(J);else Z[$]=[Q,J];else Z[$]=J}return Z},E4=()=>M.asEffect().pipe(U((Y)=>Y.upgrade),L($$()),C5),I4=(Y,Z)=>{let $=f(Y);return U(M.asEffect(),(J)=>$(J.cookies,Z))},P4=(Y,Z)=>{let $=f(Y);return U(M.asEffect(),(J)=>$(J.headers,Z))},j4=(Y,Z)=>{let $=f(Y);return U(xY.asEffect(),(J)=>$(J,Z))},v4=(Y,Z)=>{let $=s0(Y,Z);return U(M.asEffect(),$)},h$=(Y)=>Y.headers["content-type"]?.toLowerCase().includes("multipart/form-data")===!0||k4(Y)!==void 0,R4=(Y,Z)=>{let $=y5(Y),J=oZ(Y,Z);return U(M.asEffect(),(Q)=>{if(h$(Q))return U(Q.multipart,(X)=>$(X,Z));return J(Q)})},S4=(Y,Z)=>{let $=oZ(Y,Z);return U(M.asEffect(),$)},g4=(Y,Z)=>{let $=y5(Y);return M.asEffect().pipe(U((J)=>J.multipart),U((J)=>$(J,Z)))},C4=(Y,Z)=>{let $=v$(Y,Z);return(J)=>{let Q=b6(J).pipe(cY(Y),iY);return U(M.asEffect(),(X)=>{if(h$(X))return U(JZ(X.multipart,(G)=>new l({reason:new JY({request:X,cause:G})})),$(J));return U(X.urlParamsBody,(G)=>Q(G,Z))})}},b4=(Y)=>{let Z=BY(o1(Y),{onNone:()=>Y.url,onSome:($)=>$.toString()});return new d5(Y,Z)},f5=(Y)=>new c5(Y,f$(Y.url)),q4=(Y)=>EZ(R(Y.method,"",m0,H(),Y.headers,x4(Y)),L1(W0(Y),()=>Y.url)),x4=(Y)=>TZ(Y.method)?jY(Y.stream,Y.headers["content-type"],y4(Y.headers["content-length"])):QZ,y4=(Y)=>{if(Y===void 0)return;let Z=Number.parseInt(Y,10);return Number.isNaN(Z)?void 0:Z},f$=(Y)=>{if(Y[0]==="/")return Y;let Z=Y.indexOf("/",Y.indexOf("//")+2);return Z===-1?"/":Y.slice(Z)};class c5 extends RY{[OZ];[c];source;url;headersOverride;remoteAddressOverride;constructor(Y,Z,$,J){super();this[OZ]=OZ,this[c]=c,this.source=Y,this.url=Z,this.headersOverride=$,this.remoteAddressOverride=J}toJSON(){return sZ(this,{_id:"HttpServerRequest",method:this.method,url:this.originalUrl})}modify(Y){return new c5(this.source,Y.url??this.url,Y.headers??this.headersOverride,"remoteAddress"in Y?Y.remoteAddress:this.remoteAddressOverride)}get method(){return this.source.method.toUpperCase()}get originalUrl(){return this.source.url}get remoteAddress(){return this.remoteAddressOverride??H()}get headers(){return this.headersOverride??=C(this.source.headers),this.headersOverride}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=Z5(this.headers.cookie??"")}get stream(){return this.source.body?SY({evaluate:()=>this.source.body,onError:(Y)=>new l({reason:new JY({request:this,cause:Y})})}):tZ(new l({reason:new JY({request:this,description:"can not create stream from empty body"})}))}textEffect;get text(){if(this.textEffect)return this.textEffect;return this.textEffect=o(OY(d({try:()=>this.source.text(),catch:(Y)=>new l({reason:new JY({request:this,cause:Y})})}))),this.textEffect}get json(){return U(this.text,(Y)=>GY({try:()=>JSON.parse(Y),catch:(Z)=>new l({reason:new JY({request:this,cause:Z})})}))}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>new l({reason:new JY({request:this,cause:Z})})}))}multipartEffect;get multipart(){if(this.multipartEffect)return this.multipartEffect;return this.multipartEffect=o(OY(m5(this.multipartStream))),this.multipartEffect}get multipartStream(){return h5(X0(this.stream,(Y)=>k.fromReason("InternalError",Y)),k5(this.headers))}arrayBufferEffect;get arrayBuffer(){if(this.arrayBufferEffect)return this.arrayBufferEffect;return this.arrayBufferEffect=o(OY(d({try:()=>this.source.arrayBuffer(),catch:(Y)=>new l({reason:new JY({request:this,cause:Y})})}))),this.arrayBufferEffect}get upgrade(){return g(new l({reason:new JY({request:this,description:"Not an upgradeable ServerRequest"})}))}}class d5 extends RY{[OZ];[c];source;originalUrl;headersOverride;remoteAddressOverride;urlOverride;constructor(Y,Z,$,J,Q){super();this[OZ]=OZ,this[c]=c,this.source=Y,this.originalUrl=Z,this.urlOverride=$,this.headersOverride=J,this.remoteAddressOverride=Q}toJSON(){return sZ(this,{_id:"HttpServerRequest",method:this.method,url:this.originalUrl})}modify(Y){return new d5(this.source,this.originalUrl,Y.url??this.url,Y.headers??this.headersOverride,"remoteAddress"in Y?Y.remoteAddress:this.remoteAddressOverride)}get method(){return this.source.method}get url(){return this.urlOverride??f$(this.originalUrl)}get remoteAddress(){return this.remoteAddressOverride??H()}get headers(){return this.headersOverride??=this.source.headers}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=Z5(this.headers.cookie??"")}get stream(){let Y=this.source.body;switch(Y._tag){case"Empty":return K1;case"Uint8Array":return I5(Y.body);case"Stream":return X0(Y.stream,(Z)=>qY(this,void 0,Z));case"FormData":return N1(this,new Response(Y.formData).body);case"Raw":return m4(this,Y.body)}}bytesEffect;get bytes(){if(this.bytesEffect)return this.bytesEffect;let Y=this.source.body,Z;switch(Y._tag){case"Empty":{Z=F(new Uint8Array(0));break}case"Uint8Array":{Z=F(Y.body);break}case"FormData":{Z=c$(this,Y.formData);break}case"Stream":{Z=P5(this.stream);break}case"Raw":{Z=h4(this,Y.body);break}}return this.bytesEffect=o(OY(Z)),this.bytesEffect}get text(){return L(this.bytes,(Y)=>d4.decode(Y))}get json(){return U(this.text,(Y)=>GY({try:()=>Y===""?null:JSON.parse(Y),catch:(Z)=>qY(this,void 0,Z)}))}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>qY(this,void 0,Z)}))}multipartEffect;get multipart(){if(this.multipartEffect)return this.multipartEffect;return this.multipartEffect=o(OY(m5(this.multipartStream))),this.multipartEffect}get multipartStream(){let Y=this.source.body._tag==="FormData"&&this.source.body.formData;if(Y)return k$(f4(Y));return h5(X0(this.stream,(Z)=>k.fromReason("InternalError",Z)),k5(this.headers))}get arrayBuffer(){return L(this.bytes,(Y)=>Y.slice().buffer)}get upgrade(){return g(qY(this,"Not an upgradeable ServerRequest"))}}var k4=(Y)=>{if(!KZ(Y.source))return;let Z=Y.source.body;if(Z._tag==="FormData")return Z.formData;if(Z._tag==="Raw"&&l$(Z.body))return Z.body;return},m4=(Y,Z)=>{if(Z instanceof Request)return N1(Y,Z.body);if(l$(Z))return N1(Y,new Response(Z).body);if(c4(Z))return N1(Y,Z);return tZ(qY(Y,"Unsupported body type"))},h4=(Y,Z)=>{if(Z instanceof Blob)return c$(Y,Z);if(Z instanceof Request)return d({try:()=>Z.arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>qY(Y,void 0,$)});return g(qY(Y,"Unsupported body type"))},c$=(Y,Z)=>d({try:()=>new Response(Z).arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>qY(Y,void 0,$)}),N1=(Y,Z)=>Z?SY({evaluate:()=>Z,onError:($)=>qY(Y,void 0,$)}):K1,qY=(Y,Z,$)=>new l({reason:new JY({request:Y,...Z===void 0?void 0:{description:Z},...$===void 0?void 0:{cause:$}})}),f4=(Y)=>{let Z=[];for(let[$,J]of Y.entries())Z.push(typeof J==="string"?new d$($,J):new u$($,J));return Z};class d$ extends RY{[NY];_tag="Field";contentType="text/plain";key;value;constructor(Y,Z){super();this[NY]=NY,this.key=Y,this.value=Z}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"Field",key:this.key,contentType:this.contentType,value:this.value}}}class u$ extends RY{[NY];_tag="File";key;name;contentType;content;contentEffect;constructor(Y,Z){super();this[NY]=NY,this.key=Y,this.name=Z.name,this.contentType=Z.type,this.content=SY({evaluate:()=>Z.stream(),onError:($)=>k.fromReason("InternalError",$)}),this.contentEffect=d({try:()=>Z.arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>k.fromReason("InternalError",$)})}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"File",key:this.key,name:this.name,contentType:this.contentType}}}var c4=(Y)=>typeof ReadableStream<"u"&&Y instanceof ReadableStream,l$=(Y)=>typeof FormData<"u"&&Y instanceof FormData,d4=new TextDecoder,W0=(Y)=>{let Z=Y.headers.host??"localhost",$=Y.headers["x-forwarded-proto"]==="https"?"https":"http";try{return b(new URL(Y.url,`${$}://${Z}`))}catch{return H()}},u5=(Y,Z)=>{if(Y.source instanceof Request)return PY(Y.source);let $=W0(Y);if(y$($))return h(new JY({request:Y,description:"Invalid URL"}));let J={method:Y.method,headers:Y.headers};if(Z?.signal)J.signal=Z.signal;if(TZ(Y.method))J.body=wZ(Y.stream,Z?.context??GZ()),J.duplex="half";return PY(new Request($.value,J))},u4=(Y,Z)=>ZY(($)=>u5(Y,{context:$,signal:Z?.signal}).asEffect());var U0=new WeakMap,M1=(Y,Z)=>{let $=U0.get(Y.source),J=$?(Q,X)=>U($(Q,X),(G)=>Z(Q,G)):Z;U0.set(Y.source,J)};var o$=(Y)=>Y,r$=new WeakSet,l4=(Y)=>{let Z=Y.indexOf("?"),$=Y.indexOf("#");if(Z===-1)return $===-1?Y:Y.slice(0,$);if($===-1)return Y.slice(0,Z);return Y.slice(0,Math.min(Z,$))},s$=(Y)=>u((Z)=>{let $=zY(Z.context,M);return r$.add($.source),Y}),i4=j("effect/http/HttpMiddleware/TracerDisabledWhen",{defaultValue:()=>$1});var p4=j("@effect/platform/HttpMiddleware/SpanNameGenerator",{defaultValue:()=>(Y)=>`http.server ${Y.method}`}),N0=o$((Y)=>{let Z=0;return u(($)=>{let J=zY($.context,M),Q=l4(J.url);return a$(U(n$(Y),(X)=>{if(r$.has(J.source))return X;else if(X._tag==="Failure"){let[G,K]=S5(X.cause);return $0(l5(F0(L1(K,()=>"Sent HTTP Response")),{"http.method":J.method,"http.url":Q,"http.status":G.status}),X)}return $0(l5(F0("Sent HTTP response"),{"http.method":J.method,"http.url":Q,"http.status":X.value.status}),X)}),`http.span.${++Z}`)})}),i5=o$((Y)=>u((Z)=>{let $=zY(Z.context,M);if(!Z.getRef(p$)||Z.getRef(i4)($))return Y;let Q=Z.getRef(p4),X=i$(Z,Q($),{parent:XZ(w7($.headers)),kind:"server"}),G=Z.context;return Z.setContext(gZ(Z.context,T1,X)),w1(Y,(K)=>{Z.setContext(G);let z=Z.getRef(J1).currentTimeNanosUnsafe();Z.currentDispatcher.scheduleTask(()=>{let _=W0($);if(r(_)&&(_.value.username!==""||_.value.password!==""))_.value.username="REDACTED",_.value.password="REDACTED";let B=Z.getRef(cZ),V=YZ($.headers,B);if(X.attribute("http.request.method",$.method),r(_)){if(X.attribute("url.full",_.value.toString()),X.attribute("url.path",_.value.pathname),_.value.search.slice(1)!=="")X.attribute("url.query",_.value.search.slice(1));X.attribute("url.scheme",_.value.protocol.slice(0,-1))}if($.headers["user-agent"]!==void 0)X.attribute("user_agent.original",$.headers["user-agent"]);for(let W in V)X.attribute(`http.request.header.${W}`,String(V[W]));if(r($.remoteAddress))X.attribute("client.address",$.remoteAddress.value);let D=C8(K);X.attribute("http.response.status_code",D.status);let A=YZ(D.headers,B);for(let W in A)X.attribute(`http.response.header.${W}`,String(A[W]));X.end(z,K)},0);return},!0)}));var t$=(Y)=>{let Z={allowedOrigins:Y?.allowedOrigins??[],allowedMethods:Y?.allowedMethods??["GET","HEAD","PUT","PATCH","POST","DELETE"],allowedHeaders:Y?.allowedHeaders??[],exposedHeaders:Y?.exposedHeaders??[],credentials:Y?.credentials??!1,maxAge:Y?.maxAge},$=typeof Z.allowedOrigins==="function"?Z.allowedOrigins:(D)=>Z.allowedOrigins.includes(D),J=typeof Z.allowedOrigins==="function"||Z.allowedOrigins.length>1?(D)=>{if(!$(D))return;return{"access-control-allow-origin":D,vary:"Origin"}}:Z.allowedOrigins.length===0?DY({"access-control-allow-origin":"*"}):DY({"access-control-allow-origin":Z.allowedOrigins[0],vary:"Origin"}),Q=Z.allowedMethods.length>0?{"access-control-allow-methods":Z.allowedMethods.join(", ")}:void 0,X=Z.credentials?{"access-control-allow-credentials":"true"}:void 0,G=(D)=>{if(Z.allowedHeaders.length===0&&D)return{vary:"Access-Control-Request-Headers","access-control-allow-headers":D};if(Z.allowedHeaders)return{"access-control-allow-headers":Z.allowedHeaders.join(",")};return},K=Z.exposedHeaders.length>0?{"access-control-expose-headers":Z.exposedHeaders.join(",")}:void 0,z=Z.maxAge?{"access-control-max-age":Z.maxAge.toString()}:void 0,_=(D)=>{let A=D.headers.origin;return wY({...J(A),...X,...K})},B=(D)=>{let A=D.headers.origin,W=D.headers["access-control-request-headers"];return wY({...J(A),...X,...K,...Q,...G(W),...z})},V=(D,A)=>F(L8(A,_(D)));return(D)=>u((A)=>{let W=zY(A.context,M);if(W.method==="OPTIONS")return F(t({status:204,headers:B(W)}));return M1(W,V),D})};var a4=(Y,Z,$)=>{let Q=jZ(Y,{onSuccess:(G)=>{let K=nY(),z=zY(K.context,M),_=U0.get(z.source);if(_===void 0)return z[CZ]=!0,V0(Z(z,G),()=>G);return bZ(_(z,G),(B)=>{return z[CZ]=!0,V0(Z(z,B),()=>G)})},onFailure:(G)=>bZ(R5(G),([K,z])=>{let _=nY();p5(_,z);let B=zY(_.context,M),V=U0.get(B.source),D=z.reasons.length===0?F(K):eZ(z);if(V===void 0)return B[CZ]=!0,bZ(Z(B,K),()=>D);return bZ(bZ(V(B,K),(A)=>{return B[CZ]=!0,Z(B,A)}),()=>D)})}),X=$===void 0?i5(Q):jZ(i5($(Q)),{onFailure(G){let K=nY();p5(K,G);let z=zY(K.context,M);if(CZ in z)return e;return $J(R5(G),{onFailure(_){return Z(z,t({status:500}))},onSuccess([_]){return Z(z,_)}})},onSuccess(G){let K=nY(),z=zY(K.context,M);return CZ in z?e:Z(z,G)}});return JJ(s4(X))},CZ=Symbol.for("effect/http/HttpEffect/handled"),o4=(Y)=>{Y[GJ]=!0},r4=(Y)=>{if(Y.body._tag!=="Stream")return Y;let Z=nY(),$=zY(Z.context,L0);return o4($),M8(Y,jY(XJ(Y.body.stream,(J)=>z0($,J)),Y.body.contentType,Y.body.contentLength))},GJ=Symbol.for("effect/http/HttpEffect/scopeEjected"),s4=(Y)=>u((Z)=>{let $=a5(),J=Z.context;return Z.setContext(gZ(Z.context,L0,$)),w1(Y,(Q)=>{if(Z.setContext(J),GJ in $)return;return YJ($,Q)},!0)}),z9=(Y)=>M.use((Z)=>{return M1(Z,Y),e});var t4=(Y)=>(Z,$)=>{let J=Symbol.for("@effect/platform/HttpApp/resolve"),Q=a4(Z,(X,G)=>{return G=r4(G),X[J](T8(G,{withoutBody:X.method==="HEAD",context:Y})),e},$);return(X,G)=>new Promise((K)=>{let z=new Map(Y.mapUnsafe);if(e$(G))for(let[V,D]of G.mapUnsafe)z.set(V,D);let _=f5(X);z.set(M.key,_),_[J]=K;let B=QJ(bY(z))(Q);X.signal?.addEventListener("abort",()=>{B.interruptUnsafe(void 0,_1.annotation)},{once:!0})})};var KJ=(Y,Z)=>{let $=a5(),J=()=>n5(z0($,O1)),Q,X;function G(K,z){if(Q)return Q(K,z);return X??=n5(i(function*(){let _=yield*Z.memoMap?H1(Y,Z.memoMap,$):ZJ(Y,$);return Q=t4(_)(yield*Z.toHandler(_),Z.middleware)})),X.then((_)=>_(K,z))}return{dispose:J,handler:G}};var t5={};kY(t5,{withLogAddress:()=>s5,serveEffect:()=>X2,serve:()=>P1,makeTestClient:()=>FJ,make:()=>Q2,logAddress:()=>UJ,layerTestClient:()=>G2,layerServices:()=>K2,formatAddress:()=>WJ,addressFormattedWith:()=>AJ,HttpServer:()=>qZ});var o5=(Y)=>{switch(Y._tag){case"Weak":return`W/"${Y.value}"`;case"Strong":return`"${Y.value}"`}};class E1 extends S()("effect/http/Etag/Generator"){}var Y2=(Y)=>{let Z=BY(Y.mtime,{onNone:()=>"0",onSome:($)=>$.getTime().toString(16)});return`${Y.size.toString(16)}-${Z}`},Z2=(Y)=>{return`${Y.size.toString(16)}-${Y.lastModified.toString(16)}`};var I1=M0(E1)({fromFileInfo(Y){return WY(()=>({_tag:"Weak",value:Y2(Y)}))},fromFileWeb(Y){return WY(()=>({_tag:"Weak",value:Z2(Y)}))}});class r5 extends S()("effect/http/HttpPlatform"){}var $2=_0(function*(Y){let Z=yield*dY,$=yield*E1;return r5.of({fileResponse:_0(function*(J,Q){let X=yield*Z.stat(J),G=yield*$.fromFileInfo(X),K=Number(Q?.offset??0),z=Q?.bytesToRead!==void 0?K+Number(Q.bytesToRead):void 0,_=HY(Q?.headers?C(Q.headers):n,"etag",o5(G));if(r(X.mtime))_["last-modified"]=X.mtime.value.toUTCString();let B=z!==void 0?z-K:Number(X.size)-K;return Y.fileResponse(J,Q?.status??200,Q?.statusText,_,K,z,B)}),fileWebResponse(J,Q){return L($.fromFileWeb(J),(X)=>{let G=fZ(Q?.headers?C(Q.headers):n,wY({etag:o5(X),"last-modified":new Date(J.lastModified).toUTCString()}));return Y.fileWebResponse(J,Q?.status??200,Q?.statusText,G,Q)})}})}),zJ=pY(r5)(U(dY.asEffect(),(Y)=>$2({fileResponse(Z,$,J,Q,X,G,K){return j5(Y.stream(Z,{offset:X,bytesToRead:G!==void 0?G-X:void 0}),{contentLength:K,headers:Q,status:$,statusText:J})},fileWebResponse(Z,$,J,Q,X){return j5(SY({evaluate:()=>Z.stream(),onError:BZ}),{headers:Q,status:$,statusText:J})}}))).pipe(rY(I1));class qZ extends S()("effect/http/HttpServer"){}var Q2=(Y)=>Y,P1=O((Y)=>FY(Y[0]),(Y,Z)=>DZ(qZ.use(($)=>$.serve(Y,Z)))),X2=O((Y)=>FY(Y[0]),(Y,Z)=>qZ.use(($)=>$.serve(Y,Z))),WJ=(Y)=>{switch(Y._tag){case"UnixAddress":return`unix://${Y.path}`;case"TcpAddress":return`http://${Y.hostname}:${Y.port}`}},AJ=(Y)=>U(qZ.asEffect(),(Z)=>Y(WJ(Z.address))),UJ=AJ((Y)=>F0(`Listening on ${Y}`)),s5=(Y)=>DZ(UJ).pipe(sY(Y)),FJ=i(function*(){let Y=yield*qZ,Z=yield*vZ,$=Y.address;if($._tag==="UnixAddress")return yield*BJ(Error("HttpServer.layerTestClient: UnixAddress not supported"));let Q=`http://${$.hostname==="0.0.0.0"?"127.0.0.1":$.hostname}:${$.port}`;return F5(Z,a1(Q))}),G2=pY(vZ)(FJ),K2=_J(zJ,DJ,I1).pipe(sY(OJ({})));var NJ="~effect/http/HttpRouter",LY=S("effect/http/HttpRouter"),vJ=i(function*(){let Y=N8(yield*v1),Z=new Set,$=(J)=>ZY((Q)=>{let X=bJ(Q),G=(K)=>{for(let z=0;z<X.length;z++)K=X[z](K);return K};for(let K=0;K<J.length;K++){let z=X.length===0?J[K]:j1({...J[K],handler:G(J[K].handler)});if(z.method==="*")if(z.path.endsWith("/*"))Y.all(z.path,z),Y.all(z.path.slice(0,-2),z);else Y.all(z.path,z);else if(z.path.endsWith("/*"))Y.on(z.method,z.path,z),Y.on(z.method,z.path.slice(0,-2),z);else Y.on(z.method,z.path,z)}return e});return LY.of({[NJ]:NJ,prefixed(J){return LY.of({...this,prefixed:(Q)=>this.prefixed(T0(J,Q)),addAll:(Q)=>$(Q.map(CJ(J))),add:(Q,X,G,K)=>$([j1({method:Q,path:T0(X,J),handler:AY(G)?F(G):FY(G)?G:U(M.asEffect(),G),uninterruptible:K?.uninterruptible??!1,prefix:J})])})},addAll:$,add:(J,Q,X,G)=>$([gJ(J,Q,X,G)]),addGlobalMiddleware:(J)=>WY(()=>{Z.add(J)}),asHttpEffect(){let J=u((Q)=>{let X=new Map(Q.context.mapUnsafe),G=X.get(M.key),K=Y.find(G.method,G.url);if(K===void 0&&G.method==="HEAD")K=Y.find("GET",G.url);if(K===void 0)return g(new l({reason:new v5({request:G})}));let z=K.handler;if(r(z.prefix))X.set(M.key,V2(G,z.prefix.value));X.set(xY.key,K.searchParams),X.set(WZ.key,{route:z,params:K.params});let _=X.get(T1.key);if(_&&_._tag==="Span")_.attribute("http.route",z.path);return J6(z.uninterruptible?z.handler:jJ(z.handler),bY(X))});if(Z.size===0)return J;for(let Q of wJ(Z))J=Q(J);return J}})});function V2(Y,Z){let $=Z.length;return Y.modify({url:Y.url.length<=$?"/":Y.url.slice($)})}var v1=j("effect/http/HttpRouter/RouterConfig",{defaultValue:()=>({})});class WZ extends S()("effect/http/HttpRouter/RouteContext"){}var RJ=L(WZ.asEffect(),(Y)=>Y.params),z2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,M),X=y(J,xY),G=y(J,WZ);return U(Q.json,(K)=>$({method:Q.method,url:Q.url,headers:Q.headers,cookies:Q.cookies,pathParams:G.params,searchParams:X,body:K},Z))})},_2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,M),X=y(J,xY),G=y(J,WZ);return $({method:Q.method,url:Q.url,headers:Q.headers,cookies:Q.cookies,pathParams:G.params,searchParams:X},Z)})},B2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,xY),X=y(J,WZ);return $({...Q,...X.params},Z)})},O2=(Y,Z)=>{let $=f(Y);return U(RJ,(J)=>$(J,Z))},SJ=(Y)=>DZ(U(LY.asEffect(),Y)),D2=(Y,Z,$,J)=>SJ((Q)=>Q.add(Y,Z,$,J)),W2=(Y,Z)=>DZ(i(function*(){let $=FY(Y)?yield*Y:Y,J=yield*LY;if(Z?.prefix)J=J.prefixed(Z.prefix);yield*J.addAll($)})),xZ=pY(LY)(vJ),A2=(Y)=>i(function*(){let Z=yield*Z6(sY(Y,xZ));return y(Z,LY).asHttpEffect()}),LJ="~effect/http/HttpRouter/Route",j1=(Y)=>({...Y,uninterruptible:Y.uninterruptible??!1,prefix:typeof Y.prefix==="string"?b(Y.prefix):Y.prefix??H(),[LJ]:LJ}),gJ=(Y,Z,$,J)=>j1({...J,method:Y,path:Z,handler:AY($)?F($):FY($)?$:U(M.asEffect(),$),uninterruptible:J?.uninterruptible??!1}),U2=(Y)=>Y.endsWith("/")?Y.slice(0,-1):Y,T0=O(2,(Y,Z)=>{if(Z=U2(Z),Y==="*")return`${Z}/*`;else if(Y==="/")return Z;return Z+Y}),CJ=O(2,(Y,Z)=>j1({...Y,path:T0(Y.path,Z),prefix:BY(Y.prefix,{onNone:()=>Z,onSome:($)=>T0($,Z)})})),F2="~effect/http/HttpRouter/Middleware",R1=function(){if(arguments.length===0)return MJ;return MJ(arguments[0],arguments[1])},MJ=(Y,Z)=>Z?.global?DZ(i(function*(){let $=yield*LY,J=FY(Y)?yield*Y:Y;yield*$.addGlobalMiddleware(J)})):new Q6(FY(Y)?$6(L(Y,($)=>bY(new Map([[e5,$]])))):IJ(bY(new Map([[e5,Y]])))),N2=0,e5="effect/http/HttpRouter/MiddlewareFn";class Q6{[F2]={};layerFn;dependencies;constructor(Y,Z){this.layerFn=Y,this.dependencies=Z;let $=`effect/http/HttpRouter/Middleware-${++N2}`;this.layer=$6(i({self:this},function*(){let J=yield*E5(),Q=[J.mapUnsafe.get(e5)];if(this.dependencies){let X=yield*EJ,G=y(J,L0),K=yield*H1(this.dependencies,X,G);Q.push(...bJ(K))}return bY(new Map([[$,Q]]))})).pipe(rY(this.layerFn))}layer;combine(Y){return new Q6(this.layerFn,this.dependencies?sY(this.dependencies,Y.layer):Y.layer)}}var TJ=new WeakMap,bJ=(Y)=>{let Z=TJ.get(Y);if(Z)return Z;let $=HJ(),J=0;for(let[Q,X]of Y.mapUnsafe)if(Q.startsWith("effect/http/HttpRouter/Middleware-")){if($.push(X),X.length>J)J=X.length}if($.length===0)Z=[];else{let Q=new Set;for(let X=J-1;X>=0;X--)for(let G of $)if(X<G.length)Q.add(G[X]);Z=y0(Q).reverse()}return TJ.set(Y,Z),Z},L2=(Y)=>R1(t$(Y),{global:!0}),M2=R1(s$).layer,T2=(Y)=>(Z)=>rY(Z,R1()(i(function*(){let $=yield*Z6(Y);return(J)=>J6(J,$)})).layer),w2=(Y,Z)=>{let $=Z?.middleware;if(Z?.disableLogger!==!0)$=$?Y6($,N0):N0;let J=Z?.routerConfig?rY(xZ,M0(v1)(Z.routerConfig)):xZ;return i(function*(){let X=(yield*LY).asHttpEffect();return $?P1(X,$):P1(X)}).pipe(PJ,sY(Y),rY(J),Z?.disableListenLog?BZ:s5)},H2=(Y,Z)=>{let $=Z?.middleware;if(Z?.disableLogger!==!0)$=$?Y6($,N0):N0;let J=Z?.routerConfig?rY(xZ,M0(v1)(Z.routerConfig)):xZ;return KJ(sY(Y,J),{toHandler:(Q)=>F(y(Q,LY).asHttpEffect()),middleware:$,memoMap:Z?.memoMap})};export{C as uq,wY as vq,fZ as wq,P0 as xq,mZ as yq,nJ as zq,lZ as Aq,c0 as Bq,TZ as Cq,eJ as Dq,$Y as Eq,pZ as Fq,e0 as Gq,vZ as Hq,s as Iq,XX as Jq,BX as Kq,e7 as Lq,G1 as Mq,X8 as Nq,AY as Oq,t as Pq,N3 as Qq,L3 as Rq,M3 as Sq,T3 as Tq,w3 as Uq,H3 as Vq,oY as Wq,c3 as Xq,M as Yq,xY as Zq,I4 as _q,P4 as $q,j4 as ar,A0 as br,z9 as cr,t5 as dr,WZ as er,SJ as fr,gJ as gr,T0 as hr,qJ as ir};
4
+ --${B}`,function(N,T){if(N===0){D();return}else if(N!==V.index){if(V.index>0)if(V.isFile)V.onChunk(null),V.partSize=0;else{if(V.fieldChunks.length===1)$(V.info,V.fieldChunks[0]);else{let E=new Uint8Array(V.fieldSize),YY=0;for(let I=0;I<V.fieldChunks.length;I++){let p=V.fieldChunks[I];E.set(p,YY),YY+=p.length}$(V.info,E)}V.fieldSize=0,V.fieldChunks=[]}if(V.state=CY.headers,V.index=N,V.headerSkip=2,T[0]===45&&T[1]===45)return Q();if(V.parts++,V.parts>G)J(B4)}if((V.partSize+=T.length)>z)J(D4);if(V.state===CY.headers){let E=A(T,V.headerSkip);if(V.headerSkip=0,E._tag==="Continue")return;else if(E._tag==="Failure")return D(),J({_tag:"BadHeaders",error:E});let YY=A1(E.headers["content-type"]),I=A1(E.headers["content-disposition"],!0);if(I.value==="form-data"&&!("name"in I.parameters))return D(),J(z4);let p;if("filename*"in I.parameters){let w=I.parameters["filename*"].split("''");if(w.length===2)p=decodeURIComponent(w[1])}if(V.info={name:I.parameters.name??"",filename:p??I.parameters.filename,contentType:YY.value===""?I.parameters.filename!==void 0?"application/octet-stream":"text/plain":YY.value,contentTypeParameters:YY.parameters,contentDisposition:I.value,contentDispositionParameters:I.parameters,headers:E.headers},V.state=CY.body,V.isFile=X(V.info),V.isFile)V.onChunk=Z(V.info);if(E.endPosition<T.length)if(V.isFile)V.onChunk(T.subarray(E.endPosition));else{let w=T.subarray(E.endPosition);if((V.fieldSize+=w.length)>_)J(K$);V.fieldChunks.push(w)}}else if(V.isFile)V.onChunk(T);else{if((V.fieldSize+=T.length)>_)J(K$);V.fieldChunks.push(T)}},W4);return{write(N){if((V.totalSize+=N.length)>K)return J(O4);return W.write(N)},end(){if(W.end(),V.state===CY.body)J(_4);V.state=CY.headers,V.index=0,V.parts=0,V.onChunk=U1,V.info=void 0,V.totalSize=0,V.partSize=0,V.fieldChunks=[],V.fieldSize=0}}}var V$=new TextDecoder("utf-8");function U4(Y){if(Y==="utf-8"||Y==="utf8"||Y==="")return V$;try{return new TextDecoder(Y)}catch(Z){return V$}}function _$(Y,Z){return U4(Y.contentTypeParameters.charset??"utf-8").decode(Z)}var B$=z$,O$=b5,D$=_$;var NY="~effect/http/Multipart";var W$="~effect/http/Multipart/MultipartError";class j$ extends n0{}class k extends P("MultipartError"){static fromReason(Y,Z){return new k({reason:new j$({_tag:Y,cause:Z})})}[W$]=W$;get message(){return this.reason._tag}}var y5=(Y)=>f(Y),v$=(Y,Z)=>{let $=w$(Y);return O(2,(J,Q)=>L(f(T$({[Q]:$}))(J,Z),(X)=>X[Q]))},L4=(Y)=>u((Z)=>{let $=y(Z.context,x$);return F({headers:Y,maxParts:Z.getRef(C$),maxFieldSize:Number(Z.getRef(b$)),maxPartSize:D0(Z.getRef(q$),Number),maxTotalSize:D0(Z.getRef(rZ),Number),isFile:$.length===0?void 0:(J)=>!$.some((Q)=>J.contentType.includes(Q))&&O$(J)})}),k5=(Y)=>D1((Z)=>L(L4(Y),($)=>{let J=[],Q=H(),X=B$({...$,onField(K,z){J.push(new R$(K.name,K.contentType,D$(K,z)))},onFile(K){let z=[],_=!1,B=L$(F(_Z(function V(){if(!q5(z))return _?U$():U(G,V);let D=z;return z=[],F(D)})));return J.push(new S$(K,B)),function(V){if(V===null)_=!0;else z.push(V)}},onError(K){Q=b(x5(M4(K)))},onDone(){Q=b(x5(A$()))}}),G=Z.pipe(U((K)=>{for(let z=0;z<K.length;z++)X.write(K[z]);return e}),K0((K)=>{if(N$(K))X.end();else Q=b(F$(K));return e}));return G.pipe(U(function K(){if(!q5(J)){if(r(Q))return Q.value;return U(G,K)}let z=J;return J=[],F(z)}))}));function M4(Y){switch(Y._tag){case"ReachedLimit":switch(Y.limit){case"MaxParts":return k.fromReason("TooManyParts",Y);case"MaxFieldSize":return k.fromReason("FieldTooLarge",Y);case"MaxPartSize":return k.fromReason("FileTooLarge",Y);case"MaxTotalSize":return k.fromReason("BodyTooLarge",Y)}default:return k.fromReason("Parse",Y)}}class F1 extends RY{[NY];constructor(){super();this[NY]=NY}}class R$ extends F1{_tag="Field";key;contentType;value;constructor(Y,Z,$){super();this.key=Y,this.contentType=Z,this.value=$}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"Field",key:this.key,contentType:this.contentType,value:this.value}}}class S$ extends F1{_tag="File";key;name;contentType;content;contentEffect;constructor(Y,Z){super();this.key=Y.name,this.name=Y.filename??Y.name,this.contentType=Y.contentType,this.content=H$(Z),this.contentEffect=Z.pipe(w4,JZ(($)=>k.fromReason("InternalError",$)))}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"File",key:this.key,name:this.name,contentType:this.contentType}}}var T4=(Y,Z)=>U(dY.asEffect(),($)=>JZ(E$(Z.content,$.sink(Y)),(J)=>k.fromReason("InternalError",J))),w4=(Y)=>M$(Y,DY(new Uint8Array(0)),(Z,$)=>{let J=$.reduce((G,K)=>G+K.length,Z.length),Q=new Uint8Array(J);Q.set(Z,0);let X=Z.length;for(let G of $)Q.set(G,X),X+=G.length;return Q}),m5=(Y,Z=T4)=>i(function*(){let $=yield*dY,J=yield*P$,Q=yield*$.makeTempDirectoryScoped(),X=Object.create(null);return yield*I$(Y,(G)=>{if(G._tag==="Field"){if(!(G.key in X))X[G.key]=G.value;else if(typeof X[G.key]==="string")X[G.key]=[X[G.key],G.value];else X[G.key].push(G.value);return e}else if(G.name==="")return e;let K=G,z=J.join(Q,J.basename(K.name).slice(-128)),_=new g$(K.key,K.name,K.contentType,z);if(Array.isArray(X[G.key]))X[G.key].push(_);else X[G.key]=[_];return Z(z,K)}),X}).pipe(X1("PlatformError",($)=>g(k.fromReason("InternalError",$))));class g$ extends F1{_tag="PersistedFile";key;name;contentType;path;constructor(Y,Z,$,J){super();this.key=Y,this.name=Z,this.contentType=$,this.path=J}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"PersistedFile",key:this.key,name:this.name,contentType:this.contentType,path:this.path}}}var c3=(Y)=>{let Z=new Map;if(Y.maxParts!==void 0)Z.set(C$.key,Y.maxParts);if(Y.maxFieldSize!==void 0)Z.set(b$.key,O0(Y.maxFieldSize));if(Y.maxFileSize!==void 0)Z.set(q$.key,D0(Y.maxFileSize,O0));if(Y.maxTotalSize!==void 0)Z.set(rZ.key,D0(Y.maxTotalSize,O0));if(Y.fieldMimeTypes!==void 0)Z.set(x$.key,Y.fieldMimeTypes);return bY(Z)},C$=j("effect/http/Multipart/MaxParts",{defaultValue:()=>{return}}),b$=j("effect/http/Multipart/MaxFieldSize",{defaultValue:DY(O0(10485760))}),q$=j("effect/http/Multipart/MaxFileSize",{defaultValue:()=>{return}}),x$=j("effect/http/Multipart/FieldMimeTypes",{defaultValue:DY(["application/json"])});var OZ="~effect/http/HttpServerRequest",M=S("effect/http/HttpServerRequest");class xY extends S()("effect/http/ParsedSearchParams"){}var m$=(Y)=>{let Z={};for(let[$,J]of Y.searchParams.entries()){let Q=Z[$];if(Q!==void 0)if(Array.isArray(Q))Q.push(J);else Z[$]=[Q,J];else Z[$]=J}return Z},E4=()=>M.asEffect().pipe(U((Y)=>Y.upgrade),L($$()),C5),I4=(Y,Z)=>{let $=f(Y);return U(M.asEffect(),(J)=>$(J.cookies,Z))},P4=(Y,Z)=>{let $=f(Y);return U(M.asEffect(),(J)=>$(J.headers,Z))},j4=(Y,Z)=>{let $=f(Y);return U(xY.asEffect(),(J)=>$(J,Z))},v4=(Y,Z)=>{let $=s0(Y,Z);return U(M.asEffect(),$)},h$=(Y)=>Y.headers["content-type"]?.toLowerCase().includes("multipart/form-data")===!0||k4(Y)!==void 0,R4=(Y,Z)=>{let $=y5(Y),J=oZ(Y,Z);return U(M.asEffect(),(Q)=>{if(h$(Q))return U(Q.multipart,(X)=>$(X,Z));return J(Q)})},S4=(Y,Z)=>{let $=oZ(Y,Z);return U(M.asEffect(),$)},g4=(Y,Z)=>{let $=y5(Y);return M.asEffect().pipe(U((J)=>J.multipart),U((J)=>$(J,Z)))},C4=(Y,Z)=>{let $=v$(Y,Z);return(J)=>{let Q=b6(J).pipe(cY(Y),iY);return U(M.asEffect(),(X)=>{if(h$(X))return U(JZ(X.multipart,(G)=>new l({reason:new JY({request:X,cause:G})})),$(J));return U(X.urlParamsBody,(G)=>Q(G,Z))})}},b4=(Y)=>{let Z=BY(o1(Y),{onNone:()=>Y.url,onSome:($)=>$.toString()});return new d5(Y,Z)},f5=(Y)=>new c5(Y,f$(Y.url)),q4=(Y)=>EZ(R(Y.method,"",m0,H(),Y.headers,x4(Y)),L1(W0(Y),()=>Y.url)),x4=(Y)=>TZ(Y.method)?jY(Y.stream,Y.headers["content-type"],y4(Y.headers["content-length"])):QZ,y4=(Y)=>{if(Y===void 0)return;let Z=Number.parseInt(Y,10);return Number.isNaN(Z)?void 0:Z},f$=(Y)=>{if(Y[0]==="/")return Y;let Z=Y.indexOf("/",Y.indexOf("//")+2);return Z===-1?"/":Y.slice(Z)};class c5 extends RY{[OZ];[c];source;url;headersOverride;remoteAddressOverride;constructor(Y,Z,$,J){super();this[OZ]=OZ,this[c]=c,this.source=Y,this.url=Z,this.headersOverride=$,this.remoteAddressOverride=J}toJSON(){return sZ(this,{_id:"HttpServerRequest",method:this.method,url:this.originalUrl})}modify(Y){return new c5(this.source,Y.url??this.url,Y.headers??this.headersOverride,"remoteAddress"in Y?Y.remoteAddress:this.remoteAddressOverride)}get method(){return this.source.method.toUpperCase()}get originalUrl(){return this.source.url}get remoteAddress(){return this.remoteAddressOverride??H()}get headers(){return this.headersOverride??=C(this.source.headers),this.headersOverride}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=Z5(this.headers.cookie??"")}get stream(){return this.source.body?SY({evaluate:()=>this.source.body,onError:(Y)=>new l({reason:new JY({request:this,cause:Y})})}):tZ(new l({reason:new JY({request:this,description:"can not create stream from empty body"})}))}textEffect;get text(){if(this.textEffect)return this.textEffect;return this.textEffect=o(OY(d({try:()=>this.source.text(),catch:(Y)=>new l({reason:new JY({request:this,cause:Y})})}))),this.textEffect}get json(){return U(this.text,(Y)=>GY({try:()=>JSON.parse(Y),catch:(Z)=>new l({reason:new JY({request:this,cause:Z})})}))}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>new l({reason:new JY({request:this,cause:Z})})}))}multipartEffect;get multipart(){if(this.multipartEffect)return this.multipartEffect;return this.multipartEffect=o(OY(m5(this.multipartStream))),this.multipartEffect}get multipartStream(){return h5(X0(this.stream,(Y)=>k.fromReason("InternalError",Y)),k5(this.headers))}arrayBufferEffect;get arrayBuffer(){if(this.arrayBufferEffect)return this.arrayBufferEffect;return this.arrayBufferEffect=o(OY(d({try:()=>this.source.arrayBuffer(),catch:(Y)=>new l({reason:new JY({request:this,cause:Y})})}))),this.arrayBufferEffect}get upgrade(){return g(new l({reason:new JY({request:this,description:"Not an upgradeable ServerRequest"})}))}}class d5 extends RY{[OZ];[c];source;originalUrl;headersOverride;remoteAddressOverride;urlOverride;constructor(Y,Z,$,J,Q){super();this[OZ]=OZ,this[c]=c,this.source=Y,this.originalUrl=Z,this.urlOverride=$,this.headersOverride=J,this.remoteAddressOverride=Q}toJSON(){return sZ(this,{_id:"HttpServerRequest",method:this.method,url:this.originalUrl})}modify(Y){return new d5(this.source,this.originalUrl,Y.url??this.url,Y.headers??this.headersOverride,"remoteAddress"in Y?Y.remoteAddress:this.remoteAddressOverride)}get method(){return this.source.method}get url(){return this.urlOverride??f$(this.originalUrl)}get remoteAddress(){return this.remoteAddressOverride??H()}get headers(){return this.headersOverride??=this.source.headers}cachedCookies;get cookies(){if(this.cachedCookies)return this.cachedCookies;return this.cachedCookies=Z5(this.headers.cookie??"")}get stream(){let Y=this.source.body;switch(Y._tag){case"Empty":return K1;case"Uint8Array":return I5(Y.body);case"Stream":return X0(Y.stream,(Z)=>qY(this,void 0,Z));case"FormData":return N1(this,new Response(Y.formData).body);case"Raw":return m4(this,Y.body)}}bytesEffect;get bytes(){if(this.bytesEffect)return this.bytesEffect;let Y=this.source.body,Z;switch(Y._tag){case"Empty":{Z=F(new Uint8Array(0));break}case"Uint8Array":{Z=F(Y.body);break}case"FormData":{Z=c$(this,Y.formData);break}case"Stream":{Z=P5(this.stream);break}case"Raw":{Z=h4(this,Y.body);break}}return this.bytesEffect=o(OY(Z)),this.bytesEffect}get text(){return L(this.bytes,(Y)=>d4.decode(Y))}get json(){return U(this.text,(Y)=>GY({try:()=>Y===""?null:JSON.parse(Y),catch:(Z)=>qY(this,void 0,Z)}))}get urlParamsBody(){return U(this.text,(Y)=>GY({try:()=>a(new URLSearchParams(Y)),catch:(Z)=>qY(this,void 0,Z)}))}multipartEffect;get multipart(){if(this.multipartEffect)return this.multipartEffect;return this.multipartEffect=o(OY(m5(this.multipartStream))),this.multipartEffect}get multipartStream(){let Y=this.source.body._tag==="FormData"&&this.source.body.formData;if(Y)return k$(f4(Y));return h5(X0(this.stream,(Z)=>k.fromReason("InternalError",Z)),k5(this.headers))}get arrayBuffer(){return L(this.bytes,(Y)=>Y.slice().buffer)}get upgrade(){return g(qY(this,"Not an upgradeable ServerRequest"))}}var k4=(Y)=>{if(!KZ(Y.source))return;let Z=Y.source.body;if(Z._tag==="FormData")return Z.formData;if(Z._tag==="Raw"&&l$(Z.body))return Z.body;return},m4=(Y,Z)=>{if(Z instanceof Request)return N1(Y,Z.body);if(l$(Z))return N1(Y,new Response(Z).body);if(c4(Z))return N1(Y,Z);return tZ(qY(Y,"Unsupported body type"))},h4=(Y,Z)=>{if(Z instanceof Blob)return c$(Y,Z);if(Z instanceof Request)return d({try:()=>Z.arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>qY(Y,void 0,$)});return g(qY(Y,"Unsupported body type"))},c$=(Y,Z)=>d({try:()=>new Response(Z).arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>qY(Y,void 0,$)}),N1=(Y,Z)=>Z?SY({evaluate:()=>Z,onError:($)=>qY(Y,void 0,$)}):K1,qY=(Y,Z,$)=>new l({reason:new JY({request:Y,...Z===void 0?void 0:{description:Z},...$===void 0?void 0:{cause:$}})}),f4=(Y)=>{let Z=[];for(let[$,J]of Y.entries())Z.push(typeof J==="string"?new d$($,J):new u$($,J));return Z};class d$ extends RY{[NY];_tag="Field";contentType="text/plain";key;value;constructor(Y,Z){super();this[NY]=NY,this.key=Y,this.value=Z}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"Field",key:this.key,contentType:this.contentType,value:this.value}}}class u$ extends RY{[NY];_tag="File";key;name;contentType;content;contentEffect;constructor(Y,Z){super();this[NY]=NY,this.key=Y,this.name=Z.name,this.contentType=Z.type,this.content=SY({evaluate:()=>Z.stream(),onError:($)=>k.fromReason("InternalError",$)}),this.contentEffect=d({try:()=>Z.arrayBuffer().then(($)=>new Uint8Array($)),catch:($)=>k.fromReason("InternalError",$)})}toJSON(){return{_id:"@effect/platform/Multipart/Part",_tag:"File",key:this.key,name:this.name,contentType:this.contentType}}}var c4=(Y)=>typeof ReadableStream<"u"&&Y instanceof ReadableStream,l$=(Y)=>typeof FormData<"u"&&Y instanceof FormData,d4=new TextDecoder,W0=(Y)=>{let Z=Y.headers.host??"localhost",$=Y.headers["x-forwarded-proto"]==="https"?"https":"http";try{return b(new URL(Y.url,`${$}://${Z}`))}catch{return H()}},u5=(Y,Z)=>{if(Y.source instanceof Request)return PY(Y.source);let $=W0(Y);if(y$($))return h(new JY({request:Y,description:"Invalid URL"}));let J={method:Y.method,headers:Y.headers};if(Z?.signal)J.signal=Z.signal;if(TZ(Y.method))J.body=wZ(Y.stream,Z?.context??GZ()),J.duplex="half";return PY(new Request($.value,J))},u4=(Y,Z)=>ZY(($)=>u5(Y,{context:$,signal:Z?.signal}).asEffect());var U0=new WeakMap,M1=(Y,Z)=>{let $=U0.get(Y.source),J=$?(Q,X)=>U($(Q,X),(G)=>Z(Q,G)):Z;U0.set(Y.source,J)};var o$=(Y)=>Y,r$=new WeakSet,l4=(Y)=>{let Z=Y.indexOf("?"),$=Y.indexOf("#");if(Z===-1)return $===-1?Y:Y.slice(0,$);if($===-1)return Y.slice(0,Z);return Y.slice(0,Math.min(Z,$))},s$=(Y)=>u((Z)=>{let $=zY(Z.context,M);return r$.add($.source),Y}),i4=j("effect/http/HttpMiddleware/TracerDisabledWhen",{defaultValue:()=>$1});var p4=j("@effect/platform/HttpMiddleware/SpanNameGenerator",{defaultValue:()=>(Y)=>`http.server ${Y.method}`}),N0=o$((Y)=>{let Z=0;return u(($)=>{let J=zY($.context,M),Q=l4(J.url);return a$(U(n$(Y),(X)=>{if(r$.has(J.source))return X;else if(X._tag==="Failure"){let[G,K]=S5(X.cause);return $0(l5(F0(L1(K,()=>"Sent HTTP Response")),{"http.method":J.method,"http.url":Q,"http.status":G.status}),X)}return $0(l5(F0("Sent HTTP response"),{"http.method":J.method,"http.url":Q,"http.status":X.value.status}),X)}),`http.span.${++Z}`)})}),i5=o$((Y)=>u((Z)=>{let $=zY(Z.context,M);if(!Z.getRef(p$)||Z.getRef(i4)($))return Y;let Q=Z.getRef(p4),X=i$(Z,Q($),{parent:XZ(w7($.headers)),kind:"server"}),G=Z.context;return Z.setContext(gZ(Z.context,T1,X)),w1(Y,(K)=>{Z.setContext(G);let z=Z.getRef(J1).currentTimeNanosUnsafe();Z.currentDispatcher.scheduleTask(()=>{let _=W0($);if(r(_)&&(_.value.username!==""||_.value.password!==""))_.value.username="REDACTED",_.value.password="REDACTED";let B=Z.getRef(cZ),V=YZ($.headers,B);if(X.attribute("http.request.method",$.method),r(_)){if(X.attribute("url.full",_.value.toString()),X.attribute("url.path",_.value.pathname),_.value.search.slice(1)!=="")X.attribute("url.query",_.value.search.slice(1));X.attribute("url.scheme",_.value.protocol.slice(0,-1))}if($.headers["user-agent"]!==void 0)X.attribute("user_agent.original",$.headers["user-agent"]);for(let W in V)X.attribute(`http.request.header.${W}`,String(V[W]));if(r($.remoteAddress))X.attribute("client.address",$.remoteAddress.value);let D=C8(K);X.attribute("http.response.status_code",D.status);let A=YZ(D.headers,B);for(let W in A)X.attribute(`http.response.header.${W}`,String(A[W]));X.end(z,K)},0);return},!0)}));var t$=(Y)=>{let Z={allowedOrigins:Y?.allowedOrigins??[],allowedMethods:Y?.allowedMethods??["GET","HEAD","PUT","PATCH","POST","DELETE"],allowedHeaders:Y?.allowedHeaders??[],exposedHeaders:Y?.exposedHeaders??[],credentials:Y?.credentials??!1,maxAge:Y?.maxAge},$=typeof Z.allowedOrigins==="function"?Z.allowedOrigins:(D)=>Z.allowedOrigins.includes(D),J=typeof Z.allowedOrigins==="function"||Z.allowedOrigins.length>1?(D)=>{if(!$(D))return;return{"access-control-allow-origin":D,vary:"Origin"}}:Z.allowedOrigins.length===0?DY({"access-control-allow-origin":"*"}):DY({"access-control-allow-origin":Z.allowedOrigins[0],vary:"Origin"}),Q=Z.allowedMethods.length>0?{"access-control-allow-methods":Z.allowedMethods.join(", ")}:void 0,X=Z.credentials?{"access-control-allow-credentials":"true"}:void 0,G=(D)=>{if(Z.allowedHeaders.length===0&&D)return{vary:"Access-Control-Request-Headers","access-control-allow-headers":D};if(Z.allowedHeaders)return{"access-control-allow-headers":Z.allowedHeaders.join(",")};return},K=Z.exposedHeaders.length>0?{"access-control-expose-headers":Z.exposedHeaders.join(",")}:void 0,z=Z.maxAge?{"access-control-max-age":Z.maxAge.toString()}:void 0,_=(D)=>{let A=D.headers.origin;return wY({...J(A),...X,...K})},B=(D)=>{let A=D.headers.origin,W=D.headers["access-control-request-headers"];return wY({...J(A),...X,...K,...Q,...G(W),...z})},V=(D,A)=>F(L8(A,_(D)));return(D)=>u((A)=>{let W=zY(A.context,M);if(W.method==="OPTIONS")return F(t({status:204,headers:B(W)}));return M1(W,V),D})};var a4=(Y,Z,$)=>{let Q=jZ(Y,{onSuccess:(G)=>{let K=nY(),z=zY(K.context,M),_=U0.get(z.source);if(_===void 0)return z[CZ]=!0,V0(Z(z,G),()=>G);return bZ(_(z,G),(B)=>{return z[CZ]=!0,V0(Z(z,B),()=>G)})},onFailure:(G)=>bZ(R5(G),([K,z])=>{let _=nY();p5(_,z);let B=zY(_.context,M),V=U0.get(B.source),D=z.reasons.length===0?F(K):eZ(z);if(V===void 0)return B[CZ]=!0,bZ(Z(B,K),()=>D);return bZ(bZ(V(B,K),(A)=>{return B[CZ]=!0,Z(B,A)}),()=>D)})}),X=$===void 0?i5(Q):jZ(i5($(Q)),{onFailure(G){let K=nY();p5(K,G);let z=zY(K.context,M);if(CZ in z)return e;return $J(R5(G),{onFailure(_){return Z(z,t({status:500}))},onSuccess([_]){return Z(z,_)}})},onSuccess(G){let K=nY(),z=zY(K.context,M);return CZ in z?e:Z(z,G)}});return JJ(s4(X))},CZ=Symbol.for("effect/http/HttpEffect/handled"),o4=(Y)=>{Y[GJ]=!0},r4=(Y)=>{if(Y.body._tag!=="Stream")return Y;let Z=nY(),$=zY(Z.context,L0);return o4($),M8(Y,jY(XJ(Y.body.stream,(J)=>z0($,J)),Y.body.contentType,Y.body.contentLength))},GJ=Symbol.for("effect/http/HttpEffect/scopeEjected"),s4=(Y)=>u((Z)=>{let $=a5(),J=Z.context;return Z.setContext(gZ(Z.context,L0,$)),w1(Y,(Q)=>{if(Z.setContext(J),GJ in $)return;return YJ($,Q)},!0)}),z9=(Y)=>M.use((Z)=>{return M1(Z,Y),e});var t4=(Y)=>(Z,$)=>{let J=Symbol.for("@effect/platform/HttpApp/resolve"),Q=a4(Z,(X,G)=>{return G=r4(G),X[J](T8(G,{withoutBody:X.method==="HEAD",context:Y})),e},$);return(X,G)=>new Promise((K)=>{let z=new Map(Y.mapUnsafe);if(e$(G))for(let[V,D]of G.mapUnsafe)z.set(V,D);let _=f5(X);z.set(M.key,_),_[J]=K;let B=QJ(bY(z))(Q);X.signal?.addEventListener("abort",()=>{B.interruptUnsafe(void 0,_1.annotation)},{once:!0})})};var KJ=(Y,Z)=>{let $=a5(),J=()=>n5(z0($,O1)),Q,X;function G(K,z){if(Q)return Q(K,z);return X??=n5(i(function*(){let _=yield*Z.memoMap?H1(Y,Z.memoMap,$):ZJ(Y,$);return Q=t4(_)(yield*Z.toHandler(_),Z.middleware)})),X.then((_)=>_(K,z))}return{dispose:J,handler:G}};var t5={};kY(t5,{withLogAddress:()=>s5,serveEffect:()=>X2,serve:()=>P1,makeTestClient:()=>FJ,make:()=>Q2,logAddress:()=>UJ,layerTestClient:()=>G2,layerServices:()=>K2,formatAddress:()=>WJ,addressFormattedWith:()=>AJ,HttpServer:()=>qZ});var o5=(Y)=>{switch(Y._tag){case"Weak":return`W/"${Y.value}"`;case"Strong":return`"${Y.value}"`}};class E1 extends S()("effect/http/Etag/Generator"){}var Y2=(Y)=>{let Z=BY(Y.mtime,{onNone:()=>"0",onSome:($)=>$.getTime().toString(16)});return`${Y.size.toString(16)}-${Z}`},Z2=(Y)=>{return`${Y.size.toString(16)}-${Y.lastModified.toString(16)}`};var I1=M0(E1)({fromFileInfo(Y){return WY(()=>({_tag:"Weak",value:Y2(Y)}))},fromFileWeb(Y){return WY(()=>({_tag:"Weak",value:Z2(Y)}))}});class r5 extends S()("effect/http/HttpPlatform"){}var $2=_0(function*(Y){let Z=yield*dY,$=yield*E1;return r5.of({fileResponse:_0(function*(J,Q){let X=yield*Z.stat(J),G=yield*$.fromFileInfo(X),K=Number(Q?.offset??0),z=Q?.bytesToRead!==void 0?K+Number(Q.bytesToRead):void 0,_=HY(Q?.headers?C(Q.headers):n,"etag",o5(G));if(r(X.mtime))_["last-modified"]=X.mtime.value.toUTCString();let B=z!==void 0?z-K:Number(X.size)-K;return Y.fileResponse(J,Q?.status??200,Q?.statusText,_,K,z,B)}),fileWebResponse(J,Q){return L($.fromFileWeb(J),(X)=>{let G=fZ(Q?.headers?C(Q.headers):n,wY({etag:o5(X),"last-modified":new Date(J.lastModified).toUTCString()}));return Y.fileWebResponse(J,Q?.status??200,Q?.statusText,G,Q)})}})}),zJ=pY(r5)(U(dY.asEffect(),(Y)=>$2({fileResponse(Z,$,J,Q,X,G,K){return j5(Y.stream(Z,{offset:X,bytesToRead:G!==void 0?G-X:void 0}),{contentLength:K,headers:Q,status:$,statusText:J})},fileWebResponse(Z,$,J,Q,X){return j5(SY({evaluate:()=>Z.stream(),onError:BZ}),{headers:Q,status:$,statusText:J})}}))).pipe(rY(I1));class qZ extends S()("effect/http/HttpServer"){}var Q2=(Y)=>Y,P1=O((Y)=>FY(Y[0]),(Y,Z)=>DZ(qZ.use(($)=>$.serve(Y,Z)))),X2=O((Y)=>FY(Y[0]),(Y,Z)=>qZ.use(($)=>$.serve(Y,Z))),WJ=(Y)=>{switch(Y._tag){case"UnixAddress":return`unix://${Y.path}`;case"TcpAddress":return`http://${Y.hostname}:${Y.port}`}},AJ=(Y)=>U(qZ.asEffect(),(Z)=>Y(WJ(Z.address))),UJ=AJ((Y)=>F0(`Listening on ${Y}`)),s5=(Y)=>DZ(UJ).pipe(sY(Y)),FJ=i(function*(){let Y=yield*qZ,Z=yield*vZ,$=Y.address;if($._tag==="UnixAddress")return yield*BJ(Error("HttpServer.layerTestClient: UnixAddress not supported"));let Q=`http://${$.hostname==="0.0.0.0"?"127.0.0.1":$.hostname}:${$.port}`;return F5(Z,a1(Q))}),G2=pY(vZ)(FJ),K2=_J(zJ,DJ,I1).pipe(sY(OJ({})));var NJ="~effect/http/HttpRouter",LY=S("effect/http/HttpRouter"),vJ=i(function*(){let Y=N8(yield*v1),Z=new Set,$=(J)=>ZY((Q)=>{let X=bJ(Q),G=(K)=>{for(let z=0;z<X.length;z++)K=X[z](K);return K};for(let K=0;K<J.length;K++){let z=X.length===0?J[K]:j1({...J[K],handler:G(J[K].handler)});if(z.method==="*")if(z.path.endsWith("/*"))Y.all(z.path,z),Y.all(z.path.slice(0,-2),z);else Y.all(z.path,z);else if(z.path.endsWith("/*"))Y.on(z.method,z.path,z),Y.on(z.method,z.path.slice(0,-2),z);else Y.on(z.method,z.path,z)}return e});return LY.of({[NJ]:NJ,prefixed(J){return LY.of({...this,prefixed:(Q)=>this.prefixed(T0(J,Q)),addAll:(Q)=>$(Q.map(CJ(J))),add:(Q,X,G,K)=>$([j1({method:Q,path:T0(X,J),handler:AY(G)?F(G):FY(G)?G:U(M.asEffect(),G),uninterruptible:K?.uninterruptible??!1,prefix:J})])})},addAll:$,add:(J,Q,X,G)=>$([gJ(J,Q,X,G)]),addGlobalMiddleware:(J)=>WY(()=>{Z.add(J)}),asHttpEffect(){let J=u((Q)=>{let X=new Map(Q.context.mapUnsafe),G=X.get(M.key),K=Y.find(G.method,G.url);if(K===void 0&&G.method==="HEAD")K=Y.find("GET",G.url);if(K===void 0)return g(new l({reason:new v5({request:G})}));let z=K.handler;if(r(z.prefix))X.set(M.key,V2(G,z.prefix.value));X.set(xY.key,K.searchParams),X.set(WZ.key,{route:z,params:K.params});let _=X.get(T1.key);if(_&&_._tag==="Span")_.attribute("http.route",z.path);return J6(z.uninterruptible?z.handler:jJ(z.handler),bY(X))});if(Z.size===0)return J;for(let Q of wJ(Z))J=Q(J);return J}})});function V2(Y,Z){let $=Z.length;return Y.modify({url:Y.url.length<=$?"/":Y.url.slice($)})}var v1=j("effect/http/HttpRouter/RouterConfig",{defaultValue:()=>({})});class WZ extends S()("effect/http/HttpRouter/RouteContext"){}var RJ=L(WZ.asEffect(),(Y)=>Y.params),z2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,M),X=y(J,xY),G=y(J,WZ);return U(Q.json,(K)=>$({method:Q.method,url:Q.url,headers:Q.headers,cookies:Q.cookies,pathParams:G.params,searchParams:X,body:K},Z))})},_2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,M),X=y(J,xY),G=y(J,WZ);return $({method:Q.method,url:Q.url,headers:Q.headers,cookies:Q.cookies,pathParams:G.params,searchParams:X},Z)})},B2=(Y,Z)=>{let $=f(Y);return ZY((J)=>{let Q=y(J,xY),X=y(J,WZ);return $({...Q,...X.params},Z)})},O2=(Y,Z)=>{let $=f(Y);return U(RJ,(J)=>$(J,Z))},SJ=(Y)=>DZ(U(LY.asEffect(),Y)),D2=(Y,Z,$,J)=>SJ((Q)=>Q.add(Y,Z,$,J)),W2=(Y,Z)=>DZ(i(function*(){let $=FY(Y)?yield*Y:Y,J=yield*LY;if(Z?.prefix)J=J.prefixed(Z.prefix);yield*J.addAll($)})),xZ=pY(LY)(vJ),A2=(Y)=>i(function*(){let Z=yield*Z6(sY(Y,xZ));return y(Z,LY).asHttpEffect()}),LJ="~effect/http/HttpRouter/Route",j1=(Y)=>({...Y,uninterruptible:Y.uninterruptible??!1,prefix:typeof Y.prefix==="string"?b(Y.prefix):Y.prefix??H(),[LJ]:LJ}),gJ=(Y,Z,$,J)=>j1({...J,method:Y,path:Z,handler:AY($)?F($):FY($)?$:U(M.asEffect(),$),uninterruptible:J?.uninterruptible??!1}),U2=(Y)=>Y.endsWith("/")?Y.slice(0,-1):Y,T0=O(2,(Y,Z)=>{if(Z=U2(Z),Y==="*")return`${Z}/*`;else if(Y==="/")return Z;return Z+Y}),CJ=O(2,(Y,Z)=>j1({...Y,path:T0(Y.path,Z),prefix:BY(Y.prefix,{onNone:()=>Z,onSome:($)=>T0($,Z)})})),F2="~effect/http/HttpRouter/Middleware",R1=function(){if(arguments.length===0)return MJ;return MJ(arguments[0],arguments[1])},MJ=(Y,Z)=>Z?.global?DZ(i(function*(){let $=yield*LY,J=FY(Y)?yield*Y:Y;yield*$.addGlobalMiddleware(J)})):new Q6(FY(Y)?$6(L(Y,($)=>bY(new Map([[e5,$]])))):IJ(bY(new Map([[e5,Y]])))),N2=0,e5="effect/http/HttpRouter/MiddlewareFn";class Q6{[F2]={};layerFn;dependencies;constructor(Y,Z){this.layerFn=Y,this.dependencies=Z;let $=`effect/http/HttpRouter/Middleware-${++N2}`;this.layer=$6(i({self:this},function*(){let J=yield*E5(),Q=[J.mapUnsafe.get(e5)];if(this.dependencies){let X=yield*EJ,G=y(J,L0),K=yield*H1(this.dependencies,X,G);Q.push(...bJ(K))}return bY(new Map([[$,Q]]))})).pipe(rY(this.layerFn))}layer;combine(Y){return new Q6(this.layerFn,this.dependencies?sY(this.dependencies,Y.layer):Y.layer)}}var TJ=new WeakMap,bJ=(Y)=>{let Z=TJ.get(Y);if(Z)return Z;let $=HJ(),J=0;for(let[Q,X]of Y.mapUnsafe)if(Q.startsWith("effect/http/HttpRouter/Middleware-")){if($.push(X),X.length>J)J=X.length}if($.length===0)Z=[];else{let Q=new Set;for(let X=J-1;X>=0;X--)for(let G of $)if(X<G.length)Q.add(G[X]);Z=y0(Q).reverse()}return TJ.set(Y,Z),Z},L2=(Y)=>R1(t$(Y),{global:!0}),M2=R1(s$).layer,T2=(Y)=>(Z)=>rY(Z,R1()(i(function*(){let $=yield*Z6(Y);return(J)=>J6(J,$)})).layer),w2=(Y,Z)=>{let $=Z?.middleware;if(Z?.disableLogger!==!0)$=$?Y6($,N0):N0;let J=Z?.routerConfig?rY(xZ,M0(v1)(Z.routerConfig)):xZ;return i(function*(){let X=(yield*LY).asHttpEffect();return $?P1(X,$):P1(X)}).pipe(PJ,sY(Y),rY(J),Z?.disableListenLog?BZ:s5)},H2=(Y,Z)=>{let $=Z?.middleware;if(Z?.disableLogger!==!0)$=$?Y6($,N0):N0;let J=Z?.routerConfig?rY(xZ,M0(v1)(Z.routerConfig)):xZ;return KJ(sY(Y,J),{toHandler:(Q)=>F(y(Q,LY).asHttpEffect()),middleware:$,memoMap:Z?.memoMap})};export{C as qs,wY as rs,fZ as ss,P0 as ts,mZ as us,nJ as vs,lZ as ws,c0 as xs,TZ as ys,eJ as zs,$Y as As,pZ as Bs,e0 as Cs,vZ as Ds,s as Es,XX as Fs,BX as Gs,e7 as Hs,G1 as Is,X8 as Js,AY as Ks,t as Ls,N3 as Ms,L3 as Ns,M3 as Os,T3 as Ps,w3 as Qs,H3 as Rs,oY as Ss,c3 as Ts,M as Us,xY as Vs,I4 as Ws,P4 as Xs,j4 as Ys,A0 as Zs,z9 as _s,t5 as $s,WZ as at,SJ as bt,gJ as ct,T0 as dt,qJ as et};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-aztre27e.js";var a="./highlights-x6tmsnaa.scm";export{a as default};