@qitqode/qitqode-android-arm64 0.2.6 → 0.2.7

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 (410) hide show
  1. package/bundle/{chunk-ztyy3ga3.js → chunk-01e3v1xz.js} +2 -2
  2. package/bundle/{chunk-p54bzjtv.js → chunk-060wbpz4.js} +1 -1
  3. package/bundle/{chunk-ypdt9mmr.js → chunk-0am156m5.js} +2 -2
  4. package/bundle/{chunk-gjd3wf8b.js → chunk-0bgssfvq.js} +1 -1
  5. package/bundle/{chunk-dnnkq5y4.js → chunk-0crgymtr.js} +2 -2
  6. package/bundle/chunk-0dzpjk7x.js +2 -0
  7. package/bundle/{chunk-bwbqkfv0.js → chunk-0ffmwhw7.js} +1 -1
  8. package/bundle/{chunk-h62chdmw.js → chunk-0g0jpw0z.js} +1 -1
  9. package/bundle/{chunk-mn9end71.js → chunk-0ggvqmnm.js} +1 -1
  10. package/bundle/{chunk-y7hgevfv.js → chunk-0gsw04hw.js} +2 -2
  11. package/bundle/{chunk-tkrwcjkr.js → chunk-0qpqd7nz.js} +2 -2
  12. package/bundle/{chunk-nty5z2cj.js → chunk-0tqmm8b8.js} +1 -1
  13. package/bundle/chunk-12fwmmcp.js +2 -0
  14. package/bundle/{chunk-8yvx3pgy.js → chunk-14d301ze.js} +1 -1
  15. package/bundle/{chunk-ngfxxfem.js → chunk-16srrzjr.js} +1 -1
  16. package/bundle/{chunk-45a4n21f.js → chunk-19pspc1p.js} +1 -1
  17. package/bundle/chunk-1a95ysv3.js +2 -0
  18. package/bundle/chunk-1akh8pk2.js +2 -0
  19. package/bundle/{chunk-5tky3csh.js → chunk-1ay97v74.js} +1 -1
  20. package/bundle/{chunk-6ar91jvd.js → chunk-1c0yp2gv.js} +1 -1
  21. package/bundle/{chunk-2md6sx8d.js → chunk-1rgt2vmt.js} +1 -1
  22. package/bundle/{chunk-3kpse7zy.js → chunk-1vpx7szf.js} +1 -1
  23. package/bundle/chunk-22qetqnp.js +2 -0
  24. package/bundle/{chunk-tm34qp8j.js → chunk-2bjfz4fb.js} +1 -1
  25. package/bundle/{chunk-a7rp46yt.js → chunk-2c26kxp4.js} +5 -5
  26. package/bundle/{chunk-xe69cnsk.js → chunk-2c41dncf.js} +1 -1
  27. package/bundle/{chunk-fyhqp4pb.js → chunk-2cjfezfr.js} +1 -1
  28. package/bundle/chunk-2d2a92kj.js +2 -0
  29. package/bundle/{chunk-m5dm7a1t.js → chunk-2pex3ak9.js} +1 -1
  30. package/bundle/chunk-2qrvkef8.js +2 -0
  31. package/bundle/chunk-2tppw8j9.js +2 -0
  32. package/bundle/chunk-2y87m7pe.js +2 -0
  33. package/bundle/{chunk-sfw5qddj.js → chunk-33jcxsbe.js} +1 -1
  34. package/bundle/{chunk-d0x5pbkm.js → chunk-3623jvcm.js} +1 -1
  35. package/bundle/{chunk-953pqp3w.js → chunk-368jx5dp.js} +1 -1
  36. package/bundle/chunk-3ft1dn9j.js +2 -0
  37. package/bundle/{chunk-rn83r0js.js → chunk-3k7016c2.js} +1 -1
  38. package/bundle/chunk-3rgct4bd.js +11 -0
  39. package/bundle/{chunk-68v3b6ns.js → chunk-3xdmxm5t.js} +2 -2
  40. package/bundle/{chunk-xwdxgg16.js → chunk-42q8vj0w.js} +1 -1
  41. package/bundle/{chunk-yhj01dz9.js → chunk-438faz6b.js} +2 -2
  42. package/bundle/chunk-4656qm05.js +2 -0
  43. package/bundle/chunk-46knch5z.js +2 -0
  44. package/bundle/{chunk-n23d0q00.js → chunk-4bewbvvr.js} +1 -1
  45. package/bundle/{chunk-pmg53fdd.js → chunk-4byvnx78.js} +1 -1
  46. package/bundle/chunk-4ftjx7ss.js +2 -0
  47. package/bundle/{chunk-jqk3v8d6.js → chunk-4fvbexr8.js} +1 -1
  48. package/bundle/{chunk-k1nh5sd2.js → chunk-4fy08jcj.js} +1 -1
  49. package/bundle/{chunk-0smnwqk6.js → chunk-4j76bf4j.js} +2 -2
  50. package/bundle/{chunk-5nrc5rhh.js → chunk-4jpab7ag.js} +1 -1
  51. package/bundle/{chunk-43ttzy29.js → chunk-4ngmjk8j.js} +2 -2
  52. package/bundle/{chunk-vnrjk2be.js → chunk-4rpgwgx9.js} +1 -1
  53. package/bundle/chunk-4sgy87h5.js +2 -0
  54. package/bundle/{chunk-65bmsp2t.js → chunk-4vzjdmts.js} +1 -1
  55. package/bundle/{chunk-zc0cdvcv.js → chunk-4zhrg3rv.js} +2 -2
  56. package/bundle/{chunk-5pzs51sp.js → chunk-52rdms56.js} +1 -1
  57. package/bundle/chunk-54hktc8h.js +2 -0
  58. package/bundle/{chunk-smznrv7k.js → chunk-55way0em.js} +1 -1
  59. package/bundle/{chunk-k4gsktts.js → chunk-59kk0mce.js} +1 -1
  60. package/bundle/chunk-59m55866.js +2 -0
  61. package/bundle/{chunk-q3h42a94.js → chunk-5b3v1x2c.js} +2 -2
  62. package/bundle/chunk-5js5nw7r.js +2 -0
  63. package/bundle/{chunk-f3zmdfqa.js → chunk-5nhwqg7c.js} +1 -1
  64. package/bundle/{chunk-tzb26ntq.js → chunk-5r05d901.js} +3 -3
  65. package/bundle/{chunk-avefgbjg.js → chunk-5zh91zk2.js} +2 -2
  66. package/bundle/chunk-61jn7908.js +2 -0
  67. package/bundle/chunk-61txdqz1.js +2 -0
  68. package/bundle/chunk-668g9wkg.js +2 -0
  69. package/bundle/chunk-6frhjpmt.js +2 -0
  70. package/bundle/{chunk-920z7g7j.js → chunk-6gqs1k7m.js} +1 -1
  71. package/bundle/chunk-6k14c8x1.js +5 -0
  72. package/bundle/{chunk-g42krp0z.js → chunk-6nxebcf8.js} +1 -1
  73. package/bundle/chunk-6r1jpj0h.js +2 -0
  74. package/bundle/{chunk-7bcm7gg1.js → chunk-6r48fje7.js} +1 -1
  75. package/bundle/{chunk-bqn6bqws.js → chunk-6ychs4wx.js} +1 -1
  76. package/bundle/{chunk-21rq4592.js → chunk-705xnxbc.js} +2 -2
  77. package/bundle/chunk-73fn4dqd.js +2 -0
  78. package/bundle/{chunk-q3nvzhyh.js → chunk-73xryfgn.js} +2 -2
  79. package/bundle/{chunk-q9tgdghx.js → chunk-76h0f86f.js} +1 -1
  80. package/bundle/{chunk-d51908mv.js → chunk-77h8tytk.js} +1 -1
  81. package/bundle/chunk-78j2c2je.js +2 -0
  82. package/bundle/chunk-78jt24ht.js +2 -0
  83. package/bundle/chunk-7j2vpavd.js +2 -0
  84. package/bundle/chunk-7nkxgm72.js +2 -0
  85. package/bundle/{chunk-f31yvp20.js → chunk-7p6mxch0.js} +1 -1
  86. package/bundle/{chunk-mhhtf0v3.js → chunk-7sq5dyv1.js} +1 -1
  87. package/bundle/{chunk-804vmbcd.js → chunk-7x2q1w0f.js} +1 -1
  88. package/bundle/{chunk-ac7482n2.js → chunk-7z96r2px.js} +2 -2
  89. package/bundle/chunk-84pjdenq.js +2 -0
  90. package/bundle/chunk-859pkecc.js +2 -0
  91. package/bundle/{chunk-y0527cg0.js → chunk-8hmt3avx.js} +1 -1
  92. package/bundle/{chunk-cng61dby.js → chunk-8jvfqh3b.js} +1 -1
  93. package/bundle/{chunk-8wwdrwf2.js → chunk-8p0t8qah.js} +1 -1
  94. package/bundle/chunk-8p249svd.js +2 -0
  95. package/bundle/{chunk-z1932c3f.js → chunk-8rfqv5he.js} +1 -1
  96. package/bundle/chunk-8rqbx4jw.js +2 -0
  97. package/bundle/chunk-8s3krfsm.js +2 -0
  98. package/bundle/{chunk-pb30kkbs.js → chunk-93pmbdz7.js} +6 -6
  99. package/bundle/{chunk-vcygx6hs.js → chunk-95am490c.js} +2 -2
  100. package/bundle/{chunk-k3dacdp5.js → chunk-9a6p1gdn.js} +8 -8
  101. package/bundle/chunk-9aafddkw.js +3 -0
  102. package/bundle/{chunk-0xrb12s8.js → chunk-9g9katgy.js} +2 -2
  103. package/bundle/{chunk-24rkf2gk.js → chunk-9qzwmt76.js} +1 -1
  104. package/bundle/chunk-9sv53kb4.js +2 -0
  105. package/bundle/chunk-9wbe0dkx.js +2 -0
  106. package/bundle/{chunk-bne5w117.js → chunk-9xxnwb33.js} +4 -4
  107. package/bundle/{chunk-fjbv3jht.js → chunk-a610qd3x.js} +1 -1
  108. package/bundle/{chunk-5c2438af.js → chunk-a76w2jwm.js} +1 -1
  109. package/bundle/{chunk-at22twxx.js → chunk-aa2n02qk.js} +2 -2
  110. package/bundle/{chunk-4pshnq6g.js → chunk-abv0fskc.js} +1 -1
  111. package/bundle/{chunk-7g66qc1v.js → chunk-acd72413.js} +2 -2
  112. package/bundle/{chunk-wkg3c643.js → chunk-ae7b11np.js} +2 -2
  113. package/bundle/{chunk-gy21fw82.js → chunk-agqss9ga.js} +2 -2
  114. package/bundle/chunk-aj5z8qd5.js +2 -0
  115. package/bundle/{chunk-8e4s6nc2.js → chunk-ajp53ksp.js} +1 -1
  116. package/bundle/{chunk-j164q40b.js → chunk-amp6mvbp.js} +2 -2
  117. package/bundle/{chunk-97q2t1yz.js → chunk-aqcpk2vg.js} +1 -1
  118. package/bundle/chunk-b0c2mvc0.js +2 -0
  119. package/bundle/{chunk-kth84vdn.js → chunk-b6eypnbj.js} +1 -1
  120. package/bundle/chunk-b79z8f94.js +2 -0
  121. package/bundle/chunk-bbwcsdy9.js +2 -0
  122. package/bundle/chunk-bbzjdbb9.js +2 -0
  123. package/bundle/{chunk-6evh2ke8.js → chunk-bd505nsd.js} +1 -1
  124. package/bundle/{chunk-p4027t94.js → chunk-bd84t3fb.js} +1 -1
  125. package/bundle/chunk-bh4s1yct.js +2 -0
  126. package/bundle/{chunk-rrv0n73b.js → chunk-bk7f59fn.js} +1 -1
  127. package/bundle/{chunk-venprxdp.js → chunk-bn71wqqf.js} +1 -1
  128. package/bundle/{chunk-j9h1sp4g.js → chunk-c3szabpf.js} +2 -2
  129. package/bundle/{chunk-z6sbjvtv.js → chunk-c6cajbyj.js} +1 -1
  130. package/bundle/{chunk-p6crzjtf.js → chunk-c8prg3jx.js} +2 -2
  131. package/bundle/chunk-crqcppwq.js +2 -0
  132. package/bundle/{chunk-t239rvej.js → chunk-cth373se.js} +2 -2
  133. package/bundle/chunk-d09zpgj1.js +2 -0
  134. package/bundle/{chunk-t5r3w9e1.js → chunk-d1tb1jd0.js} +1 -1
  135. package/bundle/{chunk-mmjgf680.js → chunk-dbpkq7ba.js} +2 -2
  136. package/bundle/{chunk-pe2xdkez.js → chunk-dd4qnh8s.js} +2 -2
  137. package/bundle/{chunk-p169ee92.js → chunk-defj5zs6.js} +1 -1
  138. package/bundle/chunk-dexcptaz.js +3 -0
  139. package/bundle/chunk-dgqkak21.js +2 -0
  140. package/bundle/{chunk-jww55nk9.js → chunk-dgva3y5v.js} +1 -1
  141. package/bundle/chunk-dhgvh7c3.js +2 -0
  142. package/bundle/{chunk-mhtxp66q.js → chunk-djqxbnwc.js} +2 -2
  143. package/bundle/chunk-dmd101ja.js +2 -0
  144. package/bundle/{chunk-vygkwwjd.js → chunk-drnj1a14.js} +2 -2
  145. package/bundle/{chunk-g3wvtyw3.js → chunk-dt1wwt7m.js} +1 -1
  146. package/bundle/{chunk-cz5vta94.js → chunk-dw70wds9.js} +1 -1
  147. package/bundle/{chunk-xdd3553a.js → chunk-dw7yrk1g.js} +1 -1
  148. package/bundle/chunk-dwb39jdf.js +2 -0
  149. package/bundle/chunk-dx4zxex7.js +2 -0
  150. package/bundle/{chunk-ph8hn1wt.js → chunk-dy2k5rdx.js} +2 -2
  151. package/bundle/{chunk-wwdpw27v.js → chunk-dz3bec8g.js} +1 -1
  152. package/bundle/{chunk-t0761rhq.js → chunk-e0zb6sw6.js} +2 -2
  153. package/bundle/chunk-e2pqvscp.js +2 -0
  154. package/bundle/{chunk-vsz4s6zt.js → chunk-e4g4mvak.js} +1 -1
  155. package/bundle/{chunk-fhqfqd5v.js → chunk-eeq0krp7.js} +2 -2
  156. package/bundle/chunk-efe6kj3d.js +2 -0
  157. package/bundle/{chunk-qp1n7kwe.js → chunk-egkhynj5.js} +1 -1
  158. package/bundle/chunk-emac0dss.js +2 -0
  159. package/bundle/chunk-encfnt6w.js +2 -0
  160. package/bundle/{chunk-y29ejqg2.js → chunk-etv6c77a.js} +1 -1
  161. package/bundle/{chunk-32j0q58h.js → chunk-eyr5ymt8.js} +1 -1
  162. package/bundle/{chunk-r9w0thdk.js → chunk-f2pv705d.js} +1 -1
  163. package/bundle/{chunk-5w76kdjr.js → chunk-f4mnp6xd.js} +1 -1
  164. package/bundle/{chunk-xdteq9bd.js → chunk-f84hw65n.js} +1 -1
  165. package/bundle/chunk-fg2nyz2x.js +2 -0
  166. package/bundle/chunk-ga6wc979.js +2 -0
  167. package/bundle/{chunk-hqbbs9dm.js → chunk-gbxf6e5d.js} +3 -3
  168. package/bundle/chunk-gdew7bwm.js +2 -0
  169. package/bundle/{chunk-w9gzfsy7.js → chunk-gdj7mqrd.js} +2 -2
  170. package/bundle/chunk-ge19ff9d.js +2 -0
  171. package/bundle/{chunk-bzebyyfr.js → chunk-ghap1n1m.js} +4 -4
  172. package/bundle/chunk-gt0q07xq.js +2 -0
  173. package/bundle/{chunk-7mppvhv9.js → chunk-gwrnxcdn.js} +2 -2
  174. package/bundle/{chunk-e8p92vz4.js → chunk-gww0skmn.js} +2 -2
  175. package/bundle/chunk-h4dnjfr2.js +2 -0
  176. package/bundle/{chunk-has2rz35.js → chunk-h7658zxy.js} +1 -1
  177. package/bundle/chunk-h8fx619t.js +2 -0
  178. package/bundle/{chunk-313zqzc1.js → chunk-hfefq104.js} +1 -1
  179. package/bundle/{chunk-ff548b0j.js → chunk-hhk2sp5n.js} +2 -2
  180. package/bundle/{chunk-47k5jy1p.js → chunk-hqjc4wgg.js} +2 -2
  181. package/bundle/{chunk-48r70n4s.js → chunk-hrtze4c5.js} +1 -1
  182. package/bundle/{chunk-r5zy4za0.js → chunk-hwsqqkrv.js} +2 -2
  183. package/bundle/{chunk-ehb4hd9c.js → chunk-j6xmgn63.js} +1 -1
  184. package/bundle/chunk-jnvb3s7f.js +2 -0
  185. package/bundle/chunk-jrq2xw6e.js +2 -0
  186. package/bundle/chunk-jwckmhjm.js +2 -0
  187. package/bundle/{chunk-99s035f0.js → chunk-jxkrhrp0.js} +2 -2
  188. package/bundle/chunk-jz27ypm5.js +2 -0
  189. package/bundle/chunk-jzrs878d.js +2 -0
  190. package/bundle/chunk-jzx700tb.js +2 -0
  191. package/bundle/chunk-k1x8469r.js +3 -0
  192. package/bundle/{chunk-bkct64rs.js → chunk-k3g28tbw.js} +1 -1
  193. package/bundle/{chunk-wy3a4cab.js → chunk-k6zwfstj.js} +1 -1
  194. package/bundle/{chunk-0qd3567w.js → chunk-kfj37631.js} +1 -1
  195. package/bundle/{chunk-khzzmyk2.js → chunk-kmzpeq8k.js} +1 -1
  196. package/bundle/{chunk-bd21p9zz.js → chunk-kre93a89.js} +2 -2
  197. package/bundle/{chunk-j8fcfhr2.js → chunk-kry4vcrf.js} +2 -2
  198. package/bundle/chunk-ktp2b4t4.js +2 -0
  199. package/bundle/chunk-m483jvn8.js +2 -0
  200. package/bundle/chunk-makecdh6.js +8 -0
  201. package/bundle/{chunk-tr6rdr6h.js → chunk-mbbxedsq.js} +2 -2
  202. package/bundle/chunk-menbcmkq.js +2 -0
  203. package/bundle/{chunk-hwrrrbqd.js → chunk-mghnkwp8.js} +1 -1
  204. package/bundle/{chunk-pr7z5dj8.js → chunk-mhxyv9c8.js} +1 -1
  205. package/bundle/{chunk-k5q9px67.js → chunk-mjrqhbp2.js} +1 -1
  206. package/bundle/{chunk-9zm6r55d.js → chunk-msh249db.js} +2 -2
  207. package/bundle/{chunk-nmzrrqgb.js → chunk-n0g4983e.js} +1 -1
  208. package/bundle/{chunk-dnsh1v42.js → chunk-n4qxj391.js} +2 -2
  209. package/bundle/{chunk-ptqk1j2r.js → chunk-n5p7cn4w.js} +1 -1
  210. package/bundle/{chunk-5zkj5xv9.js → chunk-n9twhc5d.js} +2 -2
  211. package/bundle/{chunk-p5be5ddp.js → chunk-na1wr2qf.js} +1 -1
  212. package/bundle/{chunk-4agaj51z.js → chunk-nbckdba0.js} +1 -1
  213. package/bundle/{chunk-ezrqhqkp.js → chunk-nftbj8g9.js} +1 -1
  214. package/bundle/{chunk-d7nsd979.js → chunk-nfzpegqx.js} +1 -1
  215. package/bundle/chunk-np8h66t0.js +2 -0
  216. package/bundle/{chunk-v6v9xn81.js → chunk-npzx3yd5.js} +1 -1
  217. package/bundle/chunk-nr2j8ytn.js +3 -0
  218. package/bundle/{chunk-w46g7kdq.js → chunk-nrk29616.js} +2 -2
  219. package/bundle/{chunk-fsqses4g.js → chunk-ns8xnkjb.js} +2 -2
  220. package/bundle/{chunk-7vmx8bg9.js → chunk-ntpn0w9m.js} +2 -2
  221. package/bundle/chunk-nwwmns3w.js +2 -0
  222. package/bundle/{chunk-ksme3gj1.js → chunk-p40z6510.js} +1 -1
  223. package/bundle/{chunk-3ktzxj69.js → chunk-p847g35y.js} +1 -1
  224. package/bundle/{chunk-vf492zs6.js → chunk-p8ak162p.js} +1 -1
  225. package/bundle/chunk-pe5dpzec.js +2 -0
  226. package/bundle/{chunk-bbng1cea.js → chunk-pf3nqf00.js} +1 -1
  227. package/bundle/{chunk-9hz56z6a.js → chunk-ppy0jy6j.js} +1 -1
  228. package/bundle/{chunk-et3804wr.js → chunk-prbxhnza.js} +1 -1
  229. package/bundle/{chunk-nrat6ncm.js → chunk-ptwex14s.js} +1 -1
  230. package/bundle/{chunk-qey1efpx.js → chunk-q3pt4p9f.js} +1 -1
  231. package/bundle/{chunk-pt0xphq9.js → chunk-q6mcnq9p.js} +1 -1
  232. package/bundle/{chunk-kengqzja.js → chunk-q6p92zyn.js} +2 -2
  233. package/bundle/{chunk-ycvwpmd9.js → chunk-q87fw8dk.js} +2 -2
  234. package/bundle/chunk-q8f6a074.js +2 -0
  235. package/bundle/{chunk-cj7r8w1e.js → chunk-qbrj9wzd.js} +1 -1
  236. package/bundle/{chunk-j0bwa5dk.js → chunk-qdvnscxm.js} +2 -2
  237. package/bundle/{chunk-d6jhs818.js → chunk-qp3hxqg5.js} +2 -2
  238. package/bundle/{chunk-jg1ccs3j.js → chunk-qph2c2v7.js} +1 -1
  239. package/bundle/{chunk-3vvd7j14.js → chunk-qprbef09.js} +1 -1
  240. package/bundle/chunk-qqaevt32.js +2 -0
  241. package/bundle/chunk-qzpvz708.js +2 -0
  242. package/bundle/{chunk-cbnkx933.js → chunk-r4kg0z96.js} +2 -2
  243. package/bundle/{chunk-faee8zgc.js → chunk-r73e8gsp.js} +1 -1
  244. package/bundle/chunk-reyjr2e0.js +2 -0
  245. package/bundle/{chunk-dxdggn90.js → chunk-rfzra502.js} +1 -1
  246. package/bundle/{chunk-tg226j37.js → chunk-rhrcgvb8.js} +1 -1
  247. package/bundle/{chunk-wyj8cpx5.js → chunk-rk0fnvp5.js} +1 -1
  248. package/bundle/{chunk-t8c4cs6z.js → chunk-rqedtjz9.js} +1 -1
  249. package/bundle/{chunk-eg3syjtv.js → chunk-s06t769q.js} +2 -2
  250. package/bundle/{chunk-m80v76m9.js → chunk-skxg3s8z.js} +1 -1
  251. package/bundle/{chunk-7x6yrtzn.js → chunk-spzd8rev.js} +1 -1
  252. package/bundle/chunk-t178njgb.js +2 -0
  253. package/bundle/{chunk-3jf3jhrs.js → chunk-t4b2fm7z.js} +1 -1
  254. package/bundle/{chunk-55fcmswd.js → chunk-t8sy5sgx.js} +2 -2
  255. package/bundle/{chunk-s4vx9x1v.js → chunk-t9qyzzsz.js} +1 -1
  256. package/bundle/{chunk-6scf311w.js → chunk-tc9xbn1t.js} +1 -1
  257. package/bundle/{chunk-qnvsqnz5.js → chunk-tezrgfc6.js} +2 -2
  258. package/bundle/chunk-tjpev5t6.js +2 -0
  259. package/bundle/{chunk-vkaa7k3e.js → chunk-tkzctbxq.js} +2 -2
  260. package/bundle/{chunk-xy0gnpen.js → chunk-ts2k13g0.js} +1 -1
  261. package/bundle/{chunk-gszvgz76.js → chunk-twd6r7nf.js} +2 -2
  262. package/bundle/{chunk-qxcyz5hc.js → chunk-twfvrafb.js} +2 -2
  263. package/bundle/{chunk-70q8qcb2.js → chunk-twvmjsxf.js} +1 -1
  264. package/bundle/{chunk-ggxzf22k.js → chunk-tz3s8dvy.js} +1 -1
  265. package/bundle/chunk-tzq7wjgv.js +3 -0
  266. package/bundle/{chunk-n78f8hfk.js → chunk-v0c3k797.js} +1 -1
  267. package/bundle/chunk-v1s16wwd.js +2 -0
  268. package/bundle/{chunk-fr34mnyg.js → chunk-v3nmnm57.js} +2 -2
  269. package/bundle/chunk-v6b29nx4.js +2 -0
  270. package/bundle/chunk-v6rgd1j5.js +2 -0
  271. package/bundle/chunk-v9dnetq8.js +2 -0
  272. package/bundle/{chunk-450fef7h.js → chunk-v9w88wpy.js} +2 -2
  273. package/bundle/{chunk-7hvf9dgx.js → chunk-va2qfh0x.js} +1 -1
  274. package/bundle/chunk-vd5mpvcc.js +2 -0
  275. package/bundle/{chunk-w4synhfg.js → chunk-vfb72vdy.js} +1 -1
  276. package/bundle/{chunk-3cr2p4mp.js → chunk-vhzx5bxd.js} +1 -1
  277. package/bundle/{chunk-cmb62jkt.js → chunk-vjn54xj5.js} +2 -2
  278. package/bundle/{chunk-ybane1en.js → chunk-vp3yf46q.js} +1 -1
  279. package/bundle/{chunk-p4b0s5td.js → chunk-vzrc2fmt.js} +1 -1
  280. package/bundle/{chunk-ejqzcdcx.js → chunk-w3zhy5vq.js} +1 -1
  281. package/bundle/{chunk-hjt94wce.js → chunk-w43kmnm9.js} +641 -635
  282. package/bundle/{chunk-w4brava0.js → chunk-wb1d3mqw.js} +1 -1
  283. package/bundle/{chunk-6m9jb0s9.js → chunk-wd8hbven.js} +2 -2
  284. package/bundle/{chunk-vshycswk.js → chunk-wgt1tqw9.js} +1 -1
  285. package/bundle/{chunk-0428v6mw.js → chunk-whw18cn9.js} +1 -1
  286. package/bundle/{chunk-pxm4qvqk.js → chunk-wjz42325.js} +2 -2
  287. package/bundle/{chunk-y67kaj0b.js → chunk-wvb17w0z.js} +1 -1
  288. package/bundle/chunk-wwct4z7j.js +2 -0
  289. package/bundle/{chunk-55ykn8nz.js → chunk-x55h5qdc.js} +4 -4
  290. package/bundle/{chunk-05ck7acg.js → chunk-x80d0zh7.js} +1 -1
  291. package/bundle/{chunk-mjjaezwq.js → chunk-x9fyt3vx.js} +2 -2
  292. package/bundle/{chunk-g22e4gw7.js → chunk-xb3sxa6f.js} +1 -1
  293. package/bundle/{chunk-yz25607t.js → chunk-xcxqt8ag.js} +1 -1
  294. package/bundle/{chunk-c36p881g.js → chunk-xhh70g8j.js} +3 -3
  295. package/bundle/chunk-xr9wz961.js +2 -0
  296. package/bundle/{chunk-0cnwsf8p.js → chunk-y0h3jfkj.js} +1 -1
  297. package/bundle/{chunk-m7ganre7.js → chunk-y2t5pmqw.js} +1 -1
  298. package/bundle/{chunk-qkvqvgcx.js → chunk-y5q9v80n.js} +1 -1
  299. package/bundle/{chunk-5asx1706.js → chunk-yd94wz5v.js} +2 -2
  300. package/bundle/{chunk-5df5aja0.js → chunk-yjqww6ag.js} +2 -2
  301. package/bundle/{chunk-2drzgtv3.js → chunk-yxttz5z5.js} +2 -2
  302. package/bundle/{chunk-da6kggv7.js → chunk-yy7r3t3w.js} +2 -2
  303. package/bundle/{chunk-5pwv2p3s.js → chunk-yzpc5kj2.js} +1 -1
  304. package/bundle/{chunk-73r8bjjz.js → chunk-z6kcnpsj.js} +2 -2
  305. package/bundle/{chunk-nj1ntakd.js → chunk-z744mz4w.js} +2 -2
  306. package/bundle/{chunk-39z96pc6.js → chunk-z7kswv9r.js} +3 -3
  307. package/bundle/chunk-zfegnt1e.js +2 -0
  308. package/bundle/chunk-zg7kesbp.js +2 -0
  309. package/bundle/{chunk-jnrnncqc.js → chunk-znmbfx70.js} +1 -1
  310. package/bundle/{chunk-24ygjbpf.js → chunk-zp5sr5nx.js} +2 -2
  311. package/bundle/{chunk-ha1w0xzh.js → chunk-zrhw1szj.js} +1 -1
  312. package/bundle/chunk-zy06fe4r.js +2 -0
  313. package/bundle/index.js +3 -3
  314. package/bundle/parser.worker.js +2 -2
  315. package/bundle/worker.js +1 -1
  316. package/package.json +1 -1
  317. package/bundle/chunk-0ppnq3a4.js +0 -2
  318. package/bundle/chunk-0te0vcdn.js +0 -2
  319. package/bundle/chunk-11h06z17.js +0 -2
  320. package/bundle/chunk-28yv4fqe.js +0 -2
  321. package/bundle/chunk-34a52hyr.js +0 -2
  322. package/bundle/chunk-3d73kfea.js +0 -2
  323. package/bundle/chunk-3n3gb3vd.js +0 -2
  324. package/bundle/chunk-3sq60y9f.js +0 -2
  325. package/bundle/chunk-49mbnqvc.js +0 -2
  326. package/bundle/chunk-4fr6kae9.js +0 -2
  327. package/bundle/chunk-516w1nc4.js +0 -2
  328. package/bundle/chunk-535nm66j.js +0 -2
  329. package/bundle/chunk-5kpxpm8e.js +0 -2
  330. package/bundle/chunk-5nm5s0h2.js +0 -2
  331. package/bundle/chunk-5ysbwr4x.js +0 -3
  332. package/bundle/chunk-6dvmyeg7.js +0 -2
  333. package/bundle/chunk-6ex981t8.js +0 -2
  334. package/bundle/chunk-6gpf2bjs.js +0 -2
  335. package/bundle/chunk-6jeg2r5j.js +0 -2
  336. package/bundle/chunk-6nry7tah.js +0 -2
  337. package/bundle/chunk-7bgzcpdw.js +0 -2
  338. package/bundle/chunk-7kjvcbwa.js +0 -2
  339. package/bundle/chunk-7x30x94y.js +0 -2
  340. package/bundle/chunk-86hsh44c.js +0 -3
  341. package/bundle/chunk-8jma2btf.js +0 -2
  342. package/bundle/chunk-8sbb95a4.js +0 -2
  343. package/bundle/chunk-93e0w75z.js +0 -2
  344. package/bundle/chunk-97gp818s.js +0 -2
  345. package/bundle/chunk-9epf2zbh.js +0 -2
  346. package/bundle/chunk-agv04nt7.js +0 -2
  347. package/bundle/chunk-be7smmar.js +0 -2
  348. package/bundle/chunk-bg1t0kke.js +0 -2
  349. package/bundle/chunk-bryx5cx9.js +0 -2
  350. package/bundle/chunk-c13rrw41.js +0 -2
  351. package/bundle/chunk-c2kkv619.js +0 -2
  352. package/bundle/chunk-c3zge8cg.js +0 -3
  353. package/bundle/chunk-c5xj1y5v.js +0 -2
  354. package/bundle/chunk-cfhfc86j.js +0 -8
  355. package/bundle/chunk-ckpm4dvv.js +0 -2
  356. package/bundle/chunk-cqkaamvn.js +0 -2
  357. package/bundle/chunk-ct8twng1.js +0 -2
  358. package/bundle/chunk-d38y7bvh.js +0 -2
  359. package/bundle/chunk-d6hxsfm6.js +0 -2
  360. package/bundle/chunk-descb9jz.js +0 -2
  361. package/bundle/chunk-dvr2b9r1.js +0 -2
  362. package/bundle/chunk-ea5fktnn.js +0 -2
  363. package/bundle/chunk-f0t7rryn.js +0 -3
  364. package/bundle/chunk-f4mf6tpp.js +0 -2
  365. package/bundle/chunk-f97k17t8.js +0 -2
  366. package/bundle/chunk-g4ehhdzp.js +0 -2
  367. package/bundle/chunk-gd6qpdjw.js +0 -2
  368. package/bundle/chunk-gdn91t9j.js +0 -2
  369. package/bundle/chunk-gehn9fd9.js +0 -2
  370. package/bundle/chunk-h9wh48d0.js +0 -5
  371. package/bundle/chunk-hhax4mxw.js +0 -2
  372. package/bundle/chunk-hjb1etf8.js +0 -2
  373. package/bundle/chunk-jvkzdap1.js +0 -2
  374. package/bundle/chunk-kg8fcv91.js +0 -2
  375. package/bundle/chunk-kgptyf7n.js +0 -3
  376. package/bundle/chunk-kjjjrjnb.js +0 -2
  377. package/bundle/chunk-ky88ba80.js +0 -2
  378. package/bundle/chunk-m5cfmhwh.js +0 -2
  379. package/bundle/chunk-m7qxxbns.js +0 -2
  380. package/bundle/chunk-mh19kwzw.js +0 -10
  381. package/bundle/chunk-n8wg5h5p.js +0 -2
  382. package/bundle/chunk-nvs0d8jg.js +0 -2
  383. package/bundle/chunk-p6hcj3kv.js +0 -2
  384. package/bundle/chunk-pexmns0j.js +0 -2
  385. package/bundle/chunk-pt603np4.js +0 -2
  386. package/bundle/chunk-pz1avwyt.js +0 -2
  387. package/bundle/chunk-qk5bfcv8.js +0 -2
  388. package/bundle/chunk-qr06byhp.js +0 -2
  389. package/bundle/chunk-r7sq3maz.js +0 -2
  390. package/bundle/chunk-rcrjbhaz.js +0 -2
  391. package/bundle/chunk-rmgs9nmj.js +0 -2
  392. package/bundle/chunk-rytavefg.js +0 -2
  393. package/bundle/chunk-sh9vjnsh.js +0 -2
  394. package/bundle/chunk-st0c5wwc.js +0 -2
  395. package/bundle/chunk-teb3k2sf.js +0 -2
  396. package/bundle/chunk-ts798jvf.js +0 -2
  397. package/bundle/chunk-tx5aj02v.js +0 -2
  398. package/bundle/chunk-v1t51rrq.js +0 -2
  399. package/bundle/chunk-vdrz2t9c.js +0 -2
  400. package/bundle/chunk-vh9ptqn0.js +0 -2
  401. package/bundle/chunk-vj4x8hvz.js +0 -2
  402. package/bundle/chunk-w72rctxz.js +0 -2
  403. package/bundle/chunk-wbw9zv3h.js +0 -2
  404. package/bundle/chunk-x6mw98c2.js +0 -2
  405. package/bundle/chunk-y6p57wgh.js +0 -2
  406. package/bundle/chunk-y6xs8v17.js +0 -2
  407. package/bundle/chunk-z3xsfpc6.js +0 -2
  408. package/bundle/chunk-zkm3yyyf.js +0 -2
  409. package/bundle/chunk-zn5pw733.js +0 -2
  410. package/bundle/chunk-zxwvnmea.js +0 -2
@@ -0,0 +1,11 @@
1
+ // @bun
2
+ var J=Symbol.for("drizzle:entityKind"),d2=Symbol.for("drizzle:hasOwnEntityKind");function D(X,Y){if(!X||typeof X!=="object")return!1;if(X instanceof Y)return!0;if(!Object.prototype.hasOwnProperty.call(Y,J))throw Error(`Class "${Y.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let Z=Object.getPrototypeOf(X)?.constructor;if(Z)while(Z){if(J in Z&&Z[J]===Y[J])return!0;Z=Object.getPrototypeOf(Z)}return!1}var S1=Symbol.for("drizzle:OriginalColumn");var R=class{static[J]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;length;isLengthExact;isAlias;config;table;onInit(){}constructor(X,Y){this.config=Y,this.onInit(),this.table=X,this.name=Y.name,this.isAlias=!1,this.keyAsName=Y.keyAsName,this.notNull=Y.notNull,this.default=Y.default,this.defaultFn=Y.defaultFn,this.onUpdateFn=Y.onUpdateFn,this.hasDefault=Y.hasDefault,this.primary=Y.primaryKey,this.isUnique=Y.isUnique,this.uniqueName=Y.uniqueName,this.uniqueType=Y.uniqueType,this.dataType=Y.dataType,this.columnType=Y.columnType,this.generated=Y.generated,this.generatedIdentity=Y.generatedIdentity,this.length=Y.length,this.isLengthExact=Y.isLengthExact}mapFromDriverValue(X){return X}mapToDriverValue(X){return X}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}[S1](){return this}};function r2(X){return X.table}var s=Symbol.for("drizzle:Name");var G1=Symbol.for("drizzle:Schema"),t=Symbol.for("drizzle:Columns"),JY=Symbol.for("drizzle:ExtraConfigColumns"),U1=Symbol.for("drizzle:OriginalName"),LX=Symbol.for("drizzle:BaseName"),_1=Symbol.for("drizzle:IsAlias"),HY=Symbol.for("drizzle:ExtraConfigBuilder"),_Y=Symbol.for("drizzle:IsDrizzleTable"),A=class{static[J]="Table";static Symbol={Name:s,Schema:G1,OriginalName:U1,Columns:t,ExtraConfigColumns:JY,BaseName:LX,IsAlias:_1,ExtraConfigBuilder:HY};[s];[U1];[G1];[t];[JY];[LX];[_1]=!1;[_Y]=!0;[HY]=void 0;constructor(X,Y,Z){this[s]=this[U1]=X,this[G1]=Y,this[LX]=Z}};function l2(X){return typeof X==="object"&&X!==null&&_Y in X}function z1(X){return X[s]}function A1(X){return`${X[G1]??"public"}.${X[s]}`}var q=class{static[J]="Subquery";constructor(X,Y,Z,$=!1,G=[]){this._={brand:"Subquery",sql:X,selectedFields:Y,alias:Z,isWith:$,usedTables:G}}},JX=class extends q{static[J]="WithSubquery"};function zY(X,...Y){return X(...Y)}var EY={startActiveSpan(X,Y){return Y()}};var w=Symbol.for("drizzle:ViewBaseConfig");var J0=class{static[J]="FakePrimitiveParam"};function E1(X){return X!==null&&X!==void 0&&typeof X.getSQL==="function"}function H0(X){let Y={sql:"",params:[]};for(let Z of X)if(Y.sql+=Z.sql,Y.params.push(...Z.params),Z.typings?.length){if(!Y.typings)Y.typings=[];Y.typings.push(...Z.typings)}return Y}var b=class{static[J]="StringChunk";value;constructor(X){this.value=Array.isArray(X)?X:[X]}getSQL(){return new x([this])}},x=class X{static[J]="SQL";decoder=q1;shouldInlineParams=!1;usedTables=[];constructor(Y){this.queryChunks=Y;for(let Z of Y)if(D(Z,A)){let $=Z[A.Symbol.Schema];this.usedTables.push($===void 0?Z[A.Symbol.Name]:$+"."+Z[A.Symbol.Name])}}append(Y){return this.queryChunks.push(...Y.queryChunks),this}toQuery(Y){return EY.startActiveSpan("drizzle.buildSQL",(Z)=>{let $=this.buildQueryFromSourceParams(this.queryChunks,Y);return Z?.setAttributes({"drizzle.query.text":$.sql,"drizzle.query.params":JSON.stringify($.params)}),$})}buildQueryFromSourceParams(Y,Z){let $=Object.assign({},Z,{inlineParams:Z.inlineParams||this.shouldInlineParams,paramStartIndex:Z.paramStartIndex||{value:0}}),{casing:G,escapeName:H,escapeParam:_,prepareTyping:z,inlineParams:O,paramStartIndex:E,invokeSource:U}=$;return H0(Y.map((F)=>{if(D(F,b))return{sql:F.value.join(""),params:[]};if(D(F,C1))return{sql:H(F.value),params:[]};if(F===void 0)return{sql:"",params:[]};if(Array.isArray(F)){let M=[new b("(")];for(let[V,P]of F.entries())if(M.push(P),V<F.length-1)M.push(new b(", "));return M.push(new b(")")),this.buildQueryFromSourceParams(M,$)}if(D(F,X))return this.buildQueryFromSourceParams(F.queryChunks,{...$,inlineParams:O||F.shouldInlineParams});if(D(F,A)){let M=F[A.Symbol.Schema],V=F[A.Symbol.Name];if(U==="mssql-view-with-schemabinding")return{sql:(M===void 0?H("dbo"):H(M))+"."+H(V),params:[]};return{sql:M===void 0||F[_1]?H(V):H(M)+"."+H(V),params:[]}}if(D(F,R)){let M=G.getColumnCasing(F);if(Z.invokeSource==="indexes")return{sql:H(M),params:[]};let V=U==="mssql-check"?void 0:F.table[A.Symbol.Schema];return{sql:F.isAlias?H(F.name):F.table[_1]||V===void 0?H(F.table[A.Symbol.Name])+"."+H(M):H(V)+"."+H(F.table[A.Symbol.Name])+"."+H(M),params:[]}}if(D(F,y)){let M=F[w].schema,V=F[w].name;return{sql:M===void 0||F[w].isAlias?H(V):H(M)+"."+H(V),params:[]}}if(D(F,c)){if(D(F.value,l))return{sql:_(E.value++,F),params:[F],typings:["none"]};let M=F.value===null?null:F.encoder.mapToDriverValue(F.value);if(D(M,X))return this.buildQueryFromSourceParams([M],$);if(O)return{sql:this.mapInlineParam(M,$),params:[]};let V=["none"];if(z)V=[z(F.encoder)];return{sql:_(E.value++,M),params:[M],typings:V}}if(D(F,l))return{sql:_(E.value++,F),params:[F],typings:["none"]};if(D(F,X.Aliased)&&F.fieldAlias!==void 0)return{sql:(F.origin!==void 0?H(F.origin)+".":"")+H(F.fieldAlias),params:[]};if(D(F,q)){if(F._.isWith)return{sql:H(F._.alias),params:[]};return this.buildQueryFromSourceParams([new b("("),F._.sql,new b(") "),new C1(F._.alias)],$)}if(typeof F==="function"&&"enumName"in F){if("schema"in F&&F.schema)return{sql:H(F.schema)+"."+H(F.enumName),params:[]};return{sql:H(F.enumName),params:[]}}if(E1(F)){if(F.shouldOmitSQLParens?.())return this.buildQueryFromSourceParams([F.getSQL()],$);return this.buildQueryFromSourceParams([new b("("),F.getSQL(),new b(")")],$)}if(O)return{sql:this.mapInlineParam(F,$),params:[]};return{sql:_(E.value++,F),params:[F],typings:["none"]}}))}mapInlineParam(Y,{escapeString:Z}){if(Y===null)return"null";if(typeof Y==="number"||typeof Y==="boolean"||typeof Y==="bigint")return Y.toString();if(typeof Y==="string")return Z(Y);if(typeof Y==="object"){let $=Y.toString();if($==="[object Object]")return Z(JSON.stringify(Y));return Z($)}throw Error("Unexpected param value: "+Y)}getSQL(){return this}as(Y){if(Y===void 0)return this;return new X.Aliased(this,Y)}mapWith(Y){return this.decoder=typeof Y==="function"?{mapFromDriverValue:Y}:Y,this}inlineParams(){return this.shouldInlineParams=!0,this}if(Y){return Y?this:void 0}},C1=class{static[J]="Name";brand;constructor(X){this.value=X}getSQL(){return new x([this])}};function _0(X){return new C1(X)}function BX(X){return typeof X==="object"&&X!==null&&"mapToDriverValue"in X&&typeof X.mapToDriverValue==="function"}var q1={mapFromDriverValue:(X)=>X},jX={mapToDriverValue:(X)=>X},z0={...q1,...jX},c=class{static[J]="Param";brand;constructor(X,Y=jX){this.value=X,this.encoder=Y}getSQL(){return new x([this])}};function E0(X,Y){return new c(X,Y)}function W(X,...Y){let Z=[];if(Y.length>0||X.length>0&&X[0]!=="")Z.push(new b(X[0]));for(let[$,G]of Y.entries())Z.push(G,new b(X[$+1]));return new x(Z)}(function(X){function Y(){return new x([])}X.empty=Y;function Z(O){return new x(O)}X.fromList=Z;function $(O){return new x([new b(O)])}X.raw=$;function G(O,E){let U=[];for(let[F,M]of O.entries()){if(F>0&&E!==void 0)U.push(E);U.push(M)}return new x(U)}X.join=G;function H(O){return new C1(O)}X.identifier=H;function _(O){return new l(O)}X.placeholder=_;function z(O,E){return new c(O,E)}X.param=z})(W||(W={}));(function(X){class Y{static[J]="SQL.Aliased";isSelectionField=!1;origin;constructor(Z,$){this.sql=Z,this.fieldAlias=$}getSQL(){return this.sql}clone(){return new Y(this.sql,this.fieldAlias)}}X.Aliased=Y})(x||(x={}));var l=class{static[J]="Placeholder";constructor(X){this.name=X}getSQL(){return new x([this])}};function D0(X){return new l(X)}function D1(X,Y){return X.map((Z)=>{if(D(Z,l)){if(!(Z.name in Y))throw Error(`No value for placeholder "${Z.name}" was provided`);return Y[Z.name]}if(D(Z,c)&&D(Z.value,l)){if(!(Z.value.name in Y))throw Error(`No value for placeholder "${Z.value.name}" was provided`);return Z.encoder.mapToDriverValue(Y[Z.value.name])}return Z})}var DY=Symbol.for("drizzle:IsDrizzleView"),y=class{static[J]="View";[w];[DY]=!0;get[s](){return this[w].name}get[G1](){return this[w].schema}get[_1](){return this[w].isAlias}get[U1](){return this[w].originalName}get[t](){return this[w].selectedFields}constructor({name:X,schema:Y,selectedFields:Z,query:$}){this[w]={name:X,originalName:X,schema:Y,selectedFields:Z,query:$,isExisting:!$,isAlias:!1}}};function O0(X){return typeof X==="object"&&X!==null&&DY in X}function F0(X){return X[w].name}R.prototype.getSQL=function(){return new x([this])};q.prototype.getSQL=function(){return new x([this])};function TX(X,Y,Z){let $={},G=X.reduce((H,{path:_,field:z},O)=>{let E;if(D(z,R))E=z;else if(D(z,x))E=z.decoder;else if(D(z,q))E=z._.sql.decoder;else E=z.sql.decoder;let U=H;for(let[F,M]of _.entries())if(F<_.length-1){if(!(M in U))U[M]={};U=U[M]}else{let V=Y[O],P=U[M]=V===null?null:E.mapFromDriverValue(V);if(Z&&D(z,R)&&_.length===2){let L=_[0];if(!(L in $))$[L]=P===null?z1(z.table):!1;else if(typeof $[L]==="string"&&$[L]!==z1(z.table))$[L]=!1}}return H},{});if(Z&&Object.keys($).length>0){for(let[H,_]of Object.entries($))if(typeof _==="string"&&!Z[_])G[H]=null}return G}function i(X,Y){return Object.entries(X).reduce((Z,[$,G])=>{if(typeof $!=="string")return Z;let H=Y?[...Y,$]:[$];if(D(G,R)||D(G,x)||D(G,x.Aliased)||D(G,q))Z.push({path:H,field:G});else if(D(G,A))Z.push(...i(G[A.Symbol.Columns],H));else Z.push(...i(G,H));return Z},[])}function v1(X,Y){let Z=Object.keys(X),$=Object.keys(Y);if(Z.length!==$.length)return!1;for(let[G,H]of Z.entries())if(H!==$[G])return!1;return!0}function HX(X,Y){let Z=Object.entries(Y).filter(([,$])=>$!==void 0).map(([$,G])=>{if(D(G,x)||D(G,R))return[$,G];else return[$,new c(G,X[A.Symbol.Columns][$])]});if(Z.length===0)throw Error("No values to set");return Object.fromEntries(Z)}function OY(X,Y){for(let Z of Y)for(let $ of Object.getOwnPropertyNames(Z.prototype)){if($==="constructor")continue;Object.defineProperty(X.prototype,$,Object.getOwnPropertyDescriptor(Z.prototype,$)||Object.create(null))}}function FY(X){return X[A.Symbol.Columns]}function L3(X){return X[w].selectedFields}function B3(X){return D(X,A)?X[A.Symbol.Columns]:D(X,y)?X[w].selectedFields:X._.selectedFields}function h1(X){return D(X,q)?X._.alias:D(X,y)?X[w].name:D(X,x)?void 0:X[A.Symbol.IsAlias]?X[A.Symbol.Name]:X[A.Symbol.BaseName]}function k(X,Y){return{name:typeof X==="string"&&X.length>0?X:"",config:typeof X==="object"?X:Y}}function j3(X){if(typeof X!=="object"||X===null)return!1;if(X.constructor.name!=="Object")return!1;if("logger"in X){let Y=typeof X.logger;if(Y!=="boolean"&&(Y!=="object"||typeof X.logger.logQuery!=="function")&&Y!=="undefined")return!1;return!0}if("schema"in X){let Y=typeof X.schema;if(Y!=="object"&&Y!=="undefined")return!1;return!0}if("relations"in X){let Y=typeof X.relations;if(Y!=="object"&&Y!=="undefined")return!1;return!0}if("casing"in X){let Y=typeof X.casing;if(Y!=="string"&&Y!=="undefined")return!1;return!0}if("mode"in X){if(X.mode!=="default"||X.mode!=="planetscale"||X.mode!==void 0)return!1;return!0}if("connection"in X){let Y=typeof X.connection;if(Y!=="string"&&Y!=="object"&&Y!=="undefined")return!1;return!0}if("client"in X){let Y=typeof X.client;if(Y!=="object"&&Y!=="function"&&Y!=="undefined")return!1;return!0}if(Object.keys(X).length===0)return!0;return!1}var SX=typeof TextDecoder>"u"?null:new TextDecoder;function T3(X){throw Error("Didn't expect to get here")}function S3(X){return(typeof X==="object"&&X!==null||typeof X==="function")&&"enumValues"in X&&Array.isArray(X.enumValues)&&X.enumValues.length>0}var C3={INT8_MIN:-128,INT8_MAX:127,INT8_UNSIGNED_MAX:255,INT16_MIN:-32768,INT16_MAX:32767,INT16_UNSIGNED_MAX:65535,INT24_MIN:-8388608,INT24_MAX:8388607,INT24_UNSIGNED_MAX:16777215,INT32_MIN:-2147483648,INT32_MAX:2147483647,INT32_UNSIGNED_MAX:4294967295,INT48_MIN:-140737488355328,INT48_MAX:140737488355327,INT48_UNSIGNED_MAX:281474976710655,INT64_MIN:-9223372036854775808n,INT64_MAX:9223372036854775807n,INT64_UNSIGNED_MAX:18446744073709551615n};var U0=class{static[J]="ConsoleLogWriter";write(X){console.log(X)}},UY=class{static[J]="DefaultLogger";writer;constructor(X){this.writer=X?.writer??new U0}logQuery(X,Y){let Z=Y.map((G)=>{try{return JSON.stringify(G)}catch{return String(G)}}),$=Z.length?` -- params: [${Z.join(", ")}]`:"";this.writer.write(`Query: ${X}${$}`)}},AY=class{static[J]="NoopLogger";logQuery(){}};function d3(X){let[Y,Z]=X.dataType.split(" ");return{type:Y,constraint:Z}}var VY=class{static[J]="ColumnBuilder";config;constructor(X,Y,Z){this.config={name:X,keyAsName:X==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:Y,columnType:Z,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(X){return this.config.default=X,this.config.hasDefault=!0,this}$defaultFn(X){return this.config.defaultFn=X,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(X){return this.config.onUpdateFn=X,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(X){if(this.config.name!=="")return;this.config.name=X}};var _X=class{static[J]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor(X,Y){if(this.reference=()=>{let{name:Z,columns:$,foreignColumns:G}=X();return{name:Z,columns:$,foreignTable:G[0].table,foreignColumns:G}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate(X){return this._onUpdate=X,this}onDelete(X){return this._onDelete=X,this}build(X){return new IY(X,this)}},IY=class{static[J]="SQLiteForeignKey";reference;onUpdate;onDelete;constructor(X,Y){this.table=X,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}getName(){let{name:X,columns:Y,foreignColumns:Z}=this.reference(),$=Y.map((_)=>_.name),G=Z.map((_)=>_.name),H=[this.table[s],...$,Z[0].table[s],...G];return X??`${H.join("_")}_fk`}isNameExplicit(){return!!this.reference().name}};function A0(X){function Y(){if(typeof X==="function"){let{name:Z,columns:$,foreignColumns:G}=X();return{name:Z,columns:$,foreignColumns:G}}return X}return new _X(Y)}var g=class extends VY{static[J]="SQLiteColumnBuilder";foreignKeyConfigs=[];references(X,Y={}){return this.foreignKeyConfigs.push({ref:X,actions:Y}),this}unique(X){return this.config.isUnique=!0,this.config.uniqueName=X,this}generatedAlwaysAs(X,Y){return this.config.generated={as:X,type:"always",mode:Y?.mode??"virtual"},this}buildForeignKeys(X,Y){return this.foreignKeyConfigs.map(({ref:Z,actions:$})=>{return((G,H)=>{let _=new _X(()=>{let z=G();return{columns:[X],foreignColumns:[z]}});if(H.onUpdate)_.onUpdate(H.onUpdate);if(H.onDelete)_.onDelete(H.onDelete);return _.build(Y)})(Z,$)})}},v=class extends R{static[J]="SQLiteColumn";table;constructor(X,Y){super(X,Y);this.table=X}};var zX=class extends g{static[J]="SQLiteBaseIntegerBuilder";constructor(X,Y,Z){super(X,Y,Z);this.config.autoIncrement=!1}primaryKey(X){if(X?.autoIncrement)this.config.autoIncrement=!0;return this.config.hasDefault=!0,super.primaryKey()}},EX=class extends v{static[J]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}},MY=class extends zX{static[J]="SQLiteIntegerBuilder";constructor(X){super(X,"number int53","SQLiteInteger")}build(X){return new xY(X,this.config)}},xY=class extends EX{static[J]="SQLiteInteger"},KY=class extends zX{static[J]="SQLiteTimestampBuilder";constructor(X,Y){super(X,"object date","SQLiteTimestamp");this.config.mode=Y}defaultNow(){return this.default(W`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build(X){return new kY(X,this.config)}},kY=class extends EX{static[J]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue(X){if(typeof X==="string")return new Date(X.replaceAll('"',""));if(this.config.mode==="timestamp")return new Date(X*1000);return new Date(X)}mapToDriverValue(X){if(typeof X==="number")return X;let Y=X.getTime();if(this.config.mode==="timestamp")return Math.floor(Y/1000);return Y}},NY=class extends zX{static[J]="SQLiteBooleanBuilder";constructor(X,Y){super(X,"boolean","SQLiteBoolean");this.config.mode=Y}build(X){return new RY(X,this.config)}},RY=class extends EX{static[J]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue(X){return Number(X)===1}mapToDriverValue(X){return X?1:0}};function CX(X,Y){let{name:Z,config:$}=k(X,Y);if($?.mode==="timestamp"||$?.mode==="timestamp_ms")return new KY(Z,$.mode);if($?.mode==="boolean")return new NY(Z,$.mode);return new MY(Z)}var wY=class extends g{static[J]="SQLiteTextBuilder";constructor(X,Y){super(X,Y.enum?.length?"string enum":"string","SQLiteText");this.config.enumValues=Y.enum,this.config.length=Y.length}build(X){return new QY(X,this.config)}},QY=class extends v{static[J]="SQLiteText";enumValues=this.config.enumValues;constructor(X,Y){super(X,Y)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}},PY=class extends g{static[J]="SQLiteTextJsonBuilder";constructor(X){super(X,"object json","SQLiteTextJson")}build(X){return new LY(X,this.config)}},LY=class extends v{static[J]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue(X){return JSON.parse(X)}mapToDriverValue(X){return JSON.stringify(X)}};function qX(X,Y={}){let{name:Z,config:$}=k(X,Y);if($.mode==="json")return new PY(Z);return new wY(Z,$)}var BY=class{static[J]="SQLiteIndexBuilderOn";constructor(X,Y){this.name=X,this.unique=Y}on(...X){return new jY(this.name,X,this.unique)}},jY=class{static[J]="SQLiteIndexBuilder";config;constructor(X,Y,Z){this.config={name:X,columns:Y,unique:Z,where:void 0}}where(X){return this.config.where=X,this}build(X){return new TY(this.config,X)}},TY=class{static[J]="SQLiteIndex";config;isNameExplicit;constructor(X,Y){this.config={...X,table:Y},this.isNameExplicit=!!X.name}};function V0(X){return new BY(X,!1)}function SY(X){let Y="";for(let Z=0;Z<X.length;Z+=2){let $=X.slice(Z,Z+2),G=Number.parseInt($,16);Y+=String.fromCodePoint(G)}return Y}var I0=class extends g{static[J]="SQLiteBigIntBuilder";constructor(X){super(X,"bigint int64","SQLiteBigInt")}build(X){return new M0(X,this.config)}},M0=class extends v{static[J]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue(X){if(typeof X==="string")return BigInt(SY(X));if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer(X)?X:X instanceof ArrayBuffer?Buffer.from(X):X.buffer?Buffer.from(X.buffer,X.byteOffset,X.byteLength):Buffer.from(X);return BigInt(Y.toString("utf8"))}return BigInt(SX.decode(X))}mapToDriverValue(X){return Buffer.from(X.toString())}},x0=class extends g{static[J]="SQLiteBlobJsonBuilder";constructor(X){super(X,"object json","SQLiteBlobJson")}build(X){return new K0(X,this.config)}},K0=class extends v{static[J]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue(X){if(typeof X==="string")return JSON.parse(SY(X));if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer(X)?X:X instanceof ArrayBuffer?Buffer.from(X):X.buffer?Buffer.from(X.buffer,X.byteOffset,X.byteLength):Buffer.from(X);return JSON.parse(Y.toString("utf8"))}return JSON.parse(SX.decode(X))}mapToDriverValue(X){return Buffer.from(JSON.stringify(X))}},k0=class extends g{static[J]="SQLiteBlobBufferBuilder";constructor(X){super(X,"object buffer","SQLiteBlobBuffer")}build(X){return new N0(X,this.config)}},N0=class extends v{static[J]="SQLiteBlobBuffer";mapFromDriverValue(X){if(Buffer.isBuffer(X))return X;if(typeof X==="string")return Buffer.from(X,"hex");return Buffer.from(X)}getSQLType(){return"blob"}};function CY(X,Y){let{name:Z,config:$}=k(X,Y);if($?.mode==="json")return new x0(Z);if($?.mode==="bigint")return new I0(Z);return new k0(Z)}var R0=class extends g{static[J]="SQLiteCustomColumnBuilder";constructor(X,Y,Z){super(X,"custom","SQLiteCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=Z}build(X){return new w0(X,this.config)}},w0=class extends v{static[J]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;mapJson;forJsonSelect;constructor(X,Y){super(X,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver,this.mapJson=Y.customTypeParams.fromJson,this.forJsonSelect=Y.customTypeParams.forJsonSelect}getSQLType(){return this.sqlName}mapFromDriverValue(X){return typeof this.mapFrom==="function"?this.mapFrom(X):X}mapFromJsonValue(X){return typeof this.mapJson==="function"?this.mapJson(X):this.mapFromDriverValue(X)}jsonSelectIdentifier(X,Y){if(typeof this.forJsonSelect==="function")return this.forJsonSelect(X,Y);let Z=this.getSQLType().toLowerCase(),$=Z.indexOf("(");switch($+1?Z.slice(0,$):Z){case"numeric":case"decimal":case"bigint":return Y`cast(${X} as text)`;case"blob":return Y`hex(${X})`;default:return X}}mapToDriverValue(X){return typeof this.mapTo==="function"?this.mapTo(X):X}};function qY(X){return(Y,Z)=>{let{name:$,config:G}=k(Y,Z);return new R0($,G,X)}}var Q0=class extends g{static[J]="SQLiteNumericBuilder";constructor(X){super(X,"string numeric","SQLiteNumeric")}build(X){return new P0(X,this.config)}},P0=class extends v{static[J]="SQLiteNumeric";mapFromDriverValue(X){if(typeof X==="string")return X;return String(X)}getSQLType(){return"numeric"}},L0=class extends g{static[J]="SQLiteNumericNumberBuilder";constructor(X){super(X,"number","SQLiteNumericNumber")}build(X){return new B0(X,this.config)}},B0=class extends v{static[J]="SQLiteNumericNumber";mapFromDriverValue(X){if(typeof X==="number")return X;return Number(X)}mapToDriverValue=String;getSQLType(){return"numeric"}},j0=class extends g{static[J]="SQLiteNumericBigIntBuilder";constructor(X){super(X,"bigint int64","SQLiteNumericBigInt")}build(X){return new T0(X,this.config)}},T0=class extends v{static[J]="SQLiteNumericBigInt";mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return"numeric"}};function vY(X,Y){let{name:Z,config:$}=k(X,Y),G=$?.mode;return G==="number"?new L0(Z):G==="bigint"?new j0(Z):new Q0(Z)}var S0=class extends g{static[J]="SQLiteRealBuilder";constructor(X){super(X,"number double","SQLiteReal")}build(X){return new C0(X,this.config)}},C0=class extends v{static[J]="SQLiteReal";getSQLType(){return"real"}};function hY(X){return new S0(X??"")}function pY(){return{blob:CY,customType:qY,integer:CX,numeric:vY,real:hY,text:qX}}var DX=Symbol.for("drizzle:SQLiteInlineForeignKeys"),f=class extends A{static[J]="SQLiteTable";static Symbol=Object.assign({},A.Symbol,{InlineForeignKeys:DX});[A.Symbol.Columns];[DX]=[];[A.Symbol.ExtraConfigBuilder]=void 0};function q0(X,Y,Z,$,G=X){let H=new f(X,$,G),_=typeof Y==="function"?Y(pY()):Y,z=Object.fromEntries(Object.entries(_).map(([E,U])=>{let F=U;F.setName(E);let M=F.build(H);return H[DX].push(...F.buildForeignKeys(M,H)),[E,M]})),O=Object.assign(H,z);if(O[A.Symbol.Columns]=z,O[A.Symbol.ExtraConfigColumns]=z,Z)O[f.Symbol.ExtraConfigBuilder]=Z;return O}var v0=(X,Y,Z)=>{return q0(X,Y,Z)};function h0(...X){if(X[0].columns)return new vX(X[0].columns,X[0].name);return new vX(X)}var vX=class{static[J]="SQLitePrimaryKeyBuilder";columns;name;constructor(X,Y){this.columns=X,this.name=Y}build(X){return new yY(X,this.columns,this.name)}},yY=class{static[J]="SQLitePrimaryKey";columns;name;isNameExplicit;constructor(X,Y,Z){this.table=X,this.columns=Y,this.name=Z,this.isNameExplicit=!!Z}getName(){return this.name??`${this.table[f.Symbol.Name]}_${this.columns.map((X)=>X.name).join("_")}_pk`}};function p(X,Y){if(BX(Y)&&!E1(X)&&!D(X,c)&&!D(X,l)&&!D(X,R)&&!D(X,A)&&!D(X,y))return new c(X,Y);return X}var a=(X,Y)=>{return W`${X} = ${p(Y,X)}`},p1=(X,Y)=>{return W`${X} <> ${p(Y,X)}`};function u(...X){let Y=X.filter((Z)=>Z!==void 0);if(Y.length===0)return;if(Y.length===1)return new x(Y);return new x([new b("("),W.join(Y,new b(" and ")),new b(")")])}function V1(...X){let Y=X.filter((Z)=>Z!==void 0);if(Y.length===0)return;if(Y.length===1)return new x(Y);return new x([new b("("),W.join(Y,new b(" or ")),new b(")")])}function I1(X){return W`not ${X}`}var y1=(X,Y)=>{return W`${X} > ${p(Y,X)}`},f1=(X,Y)=>{return W`${X} >= ${p(Y,X)}`},b1=(X,Y)=>{return W`${X} < ${p(Y,X)}`},d1=(X,Y)=>{return W`${X} <= ${p(Y,X)}`};function g1(X,Y){if(Array.isArray(Y)){if(Y.length===0)return W`false`;return W`${X} in ${Y.map((Z)=>p(Z,X))}`}return W`${X} in ${p(Y,X)}`}function m1(X,Y){if(Array.isArray(Y)){if(Y.length===0)return W`true`;return W`${X} not in ${Y.map((Z)=>p(Z,X))}`}return W`${X} not in ${p(Y,X)}`}function c1(X){return W`(${X} is null)`}function u1(X){return W`(${X} is not null)`}function N1(X){return W`exists ${X}`}function R1(X){return W`not exists ${X}`}function r1(X,Y,Z){return W`${X} between ${p(Y,X)} and ${p(Z,X)}`}function o1(X,Y,Z){return W`${X} not between ${p(Y,X)} and ${p(Z,X)}`}function s1(X,Y){return W`${X} like ${Y}`}function t1(X,Y){return W`${X} not like ${Y}`}function n1(X,Y){return W`${X} ilike ${Y}`}function i1(X,Y){return W`${X} not ilike ${Y}`}function hX(X,Y){if(Array.isArray(Y)){if(Y.length===0)throw Error("arrayContains requires at least one value");let Z=p(Y,X);return W`${X} @> ${W`${Array.isArray(Z)?new c(Z):Z}`}`}return W`${X} @> ${p(Y,X)}`}function pX(X,Y){if(Array.isArray(Y)){if(Y.length===0)throw Error("arrayContained requires at least one value");let Z=p(Y,X);return W`${X} <@ ${W`${Array.isArray(Z)?new c(Z):Z}`}`}return W`${X} <@ ${p(Y,X)}`}function yX(X,Y){if(Array.isArray(Y)){if(Y.length===0)throw Error("arrayOverlaps requires at least one value");let Z=p(Y,X);return W`${X} && ${W`${Array.isArray(Z)?new c(Z):Z}`}`}return W`${X} && ${p(Y,X)}`}function M1(X){return W`${X} asc`}function l1(X){return W`${X} desc`}function fY(X,Y,Z){for(let $=Y;$<X.length;$++){let G=X[$];if(G==="\\"){$++;continue}if(G==='"')return[X.slice(Y,$).replace(/\\/g,""),$+1];if(Z)continue;if(G===","||G==="}")return[X.slice(Y,$).replace(/\\/g,""),$]}return[X.slice(Y).replace(/\\/g,""),X.length]}function bY(X,Y=0){let Z=[],$=Y,G=!1;while($<X.length){let H=X[$];if(H===","){if(G||$===Y)Z.push("");G=!0,$++;continue}if(G=!1,H==="\\"){$+=2;continue}if(H==='"'){let[O,E]=fY(X,$+1,!0);Z.push(O),$=E;continue}if(H==="}")return[Z,$+1];if(H==="{"){let[O,E]=bY(X,$+1);Z.push(O),$=E;continue}let[_,z]=fY(X,$,!1);Z.push(_),$=z}return[Z,$]}function OX(X){let[Y]=bY(X,1);return Y}function fX(X){return`{${X.map((Y)=>{if(Array.isArray(Y))return fX(Y);if(typeof Y==="string")return`"${Y.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`;return`${Y}`}).join(",")}}`}var dY=class{static[J]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(X,Y){if(this.reference=()=>{let{name:Z,columns:$,foreignColumns:G}=X();return{name:Z,columns:$,foreignTable:G[0].table,foreignColumns:G}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate(X){return this._onUpdate=X===void 0?"no action":X,this}onDelete(X){return this._onDelete=X===void 0?"no action":X,this}build(X){return new p0(X,this)}},p0=class{static[J]="PgForeignKey";reference;onUpdate;onDelete;name;constructor(X,Y){this.table=X,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}getName(){let{name:X,columns:Y,foreignColumns:Z}=this.reference(),$=Y.map((_)=>_.name),G=Z.map((_)=>_.name),H=[this.table[s],...$,Z[0].table[s],...G];return X??`${H.join("_")}_fk`}isNameExplicit(){return!!this.reference().name}};var K=class{static[J]="PgColumnBuilder";foreignKeyConfigs=[];config;constructor(X,Y,Z){this.config={name:X,keyAsName:X==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:Y,columnType:Z,generated:void 0,defaultFn:void 0,onUpdateFn:void 0,generatedIdentity:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(X){return this.config.default=X,this.config.hasDefault=!0,this}$defaultFn(X){return this.config.defaultFn=X,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(X){return this.config.onUpdateFn=X,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(X){if(this.config.name!=="")return;this.config.name=X}array(X){let Y=X??"[]";return this.config.dimensions=Y.length/2,this}references(X,Y={}){return this.foreignKeyConfigs.push({ref:X,config:Y}),this}unique(X,Y){return this.config.isUnique=!0,this.config.uniqueName=X,this.config.uniqueType=Y?.nulls,this}generatedAlwaysAs(X){return this.config.generated={as:X,type:"always",mode:"stored"},this}buildForeignKeys(X,Y){return this.foreignKeyConfigs.map(({ref:Z,config:$})=>{return zY((G,H)=>{let _=new dY(()=>{let z=G();return{name:H.name,columns:[X],foreignColumns:[z]}});if(H.onUpdate)_.onUpdate(H.onUpdate);if(H.onDelete)_.onDelete(H.onDelete);return _.build(Y)},Z,$)})}buildExtraConfigColumn(X){return new y0(X,{...this.config,dimensions:this.config.dimensions??0})}},I=class extends R{static[J]="PgColumn";table;dimensions;constructor(X,Y){super(X,Y);if(this.table=X,this.dimensions=Y.dimensions??0,this.dimensions){let Z=this.mapFromDriverValue.bind(this),$=this.mapToDriverValue.bind(this);this.mapFromDriverValue=(G)=>{if(G===null)return G;let H=typeof G==="string"?OX(G):G;return this.mapArrayElements(H,Z,this.dimensions)},this.mapToDriverValue=(G)=>{if(G===null)return G;return fX(this.mapArrayElements(G,$,this.dimensions))}}}mapArrayElements(X,Y,Z){if(Z>0&&Array.isArray(X))return X.map(($)=>$===null?null:this.mapArrayElements($,Y,Z-1));return Y(X)}},y0=class extends I{static[J]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(X){return this.indexConfig.opClass=X,this}};var O1=class extends K{static[J]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(X){if(X){let{name:Y,...Z}=X;this.config.generatedIdentity={type:"always",sequenceName:Y,sequenceOptions:Z}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(X){if(X){let{name:Y,...Z}=X;this.config.generatedIdentity={type:"byDefault",sequenceName:Y,sequenceOptions:Z}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var f0=class extends O1{static[J]="PgBigInt53Builder";constructor(X){super(X,"number int53","PgBigInt53")}build(X){return new b0(X,this.config)}},b0=class extends I{static[J]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(X){if(typeof X==="number")return X;return Number(X)}},d0=class extends O1{static[J]="PgBigInt64Builder";constructor(X){super(X,"bigint int64","PgBigInt64")}build(X){return new g0(X,this.config)}},g0=class extends I{static[J]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(X){return BigInt(X)}},m0=class extends O1{static[J]="PgBigIntStringBuilder";constructor(X){super(X,"string int64","PgBigIntString")}build(X){return new c0(X,this.config)}},c0=class extends I{static[J]="PgBigIntString";getSQLType(){return"bigint"}mapFromDriverValue(X){if(typeof X==="string")return X;return String(X)}};function gY(X,Y){let{name:Z,config:$}=k(X,Y);if($.mode==="number")return new f0(Z);if($.mode==="string")return new m0(Z);return new d0(Z)}var u0=class extends K{static[J]="PgBigSerial53Builder";constructor(X){super(X,"number int53","PgBigSerial53");this.config.hasDefault=!0,this.config.notNull=!0}build(X){return new r0(X,this.config)}},r0=class extends I{static[J]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(X){if(typeof X==="number")return X;return Number(X)}},o0=class extends K{static[J]="PgBigSerial64Builder";constructor(X){super(X,"bigint int64","PgBigSerial64");this.config.hasDefault=!0,this.config.notNull=!0}build(X){return new s0(X,this.config)}},s0=class extends I{static[J]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(X){return BigInt(X)}};function mY(X,Y){let{name:Z,config:$}=k(X,Y);if($.mode==="number")return new u0(Z);return new o0(Z)}var t0=class extends K{static[J]="PgBooleanBuilder";constructor(X){super(X,"boolean","PgBoolean")}build(X){return new n0(X,this.config)}},n0=class extends I{static[J]="PgBoolean";getSQLType(){return"boolean"}};function cY(X){return new t0(X??"")}var i0=class extends K{static[J]="PgCharBuilder";constructor(X,Y){super(X,Y.enum?.length?"string enum":"string","PgChar");this.config.length=Y.length??1,this.config.setLength=Y.length!==void 0,this.config.enumValues=Y.enum}build(X){return new l0(X,this.config)}},l0=class extends I{static[J]="PgChar";enumValues;setLength;constructor(X,Y){super(X,Y);this.enumValues=Y.enumValues,this.setLength=Y.setLength}getSQLType(){return this.setLength?`char(${this.length})`:"char"}};function uY(X,Y={}){let{name:Z,config:$}=k(X,Y);return new i0(Z,$)}var a0=class extends K{static[J]="PgCidrBuilder";constructor(X){super(X,"string cidr","PgCidr")}build(X){return new e0(X,this.config)}},e0=class extends I{static[J]="PgCidr";getSQLType(){return"cidr"}};function rY(X){return new a0(X??"")}var X8=class extends K{static[J]="PgCustomColumnBuilder";constructor(X,Y,Z){super(X,"custom","PgCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=Z}build(X){return new Y8(X,this.config)}},Y8=class extends I{static[J]="PgCustomColumn";sqlName;mapTo;mapFrom;mapJson;forJsonSelect;constructor(X,Y){super(X,Y);if(this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver,this.mapJson=Y.customTypeParams.fromJson,this.forJsonSelect=Y.customTypeParams.forJsonSelect,this.dimensions){let Z=($)=>{if(typeof this.mapJson==="function")return this.mapJson($);if(typeof this.mapFrom==="function")return this.mapFrom($);return $};this.mapFromJsonValue=($)=>{if($===null)return $;let G=typeof $==="string"?OX($):$;return this.mapJsonArrayElements(G,Z,this.dimensions)}}}mapJsonArrayElements(X,Y,Z){if(Z>0&&Array.isArray(X))return X.map(($)=>$===null?null:this.mapJsonArrayElements($,Y,Z-1));return Y(X)}getSQLType(){return this.sqlName}mapFromDriverValue(X){return typeof this.mapFrom==="function"?this.mapFrom(X):X}mapFromJsonValue(X){return typeof this.mapJson==="function"?this.mapJson(X):this.mapFromDriverValue(X)}jsonSelectIdentifier(X,Y,Z){if(typeof this.forJsonSelect==="function")return this.forJsonSelect(X,Y,Z);let $=this.getSQLType().toLowerCase(),G=$.indexOf("(");switch(G+1?$.slice(0,G):$){case"bytea":case"geometry":case"timestamp":case"numeric":case"bigint":{let H="[]".repeat(Z??0);return Y`${X}::text${Y.raw(H).if(Z)}`}default:return X}}mapToDriverValue(X){return typeof this.mapTo==="function"?this.mapTo(X):X}};function oY(X){return(Y,Z)=>{let{name:$,config:G}=k(Y,Z);return new X8($,G,X)}}var F1=class extends K{static[J]="PgDateColumnBaseBuilder";defaultNow(){return this.default(W`now()`)}};var Z8=class extends F1{static[J]="PgDateBuilder";constructor(X){super(X,"object date","PgDate")}build(X){return new $8(X,this.config)}},$8=class extends I{static[J]="PgDate";getSQLType(){return"date"}mapFromDriverValue(X){if(typeof X==="string")return new Date(X);return X}mapToDriverValue(X){if(typeof X==="string")return X;return X.toISOString()}},G8=class extends F1{static[J]="PgDateStringBuilder";constructor(X){super(X,"string date","PgDateString")}build(X){return new W8(X,this.config)}},W8=class extends I{static[J]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(X){if(typeof X==="string")return X;return X.toISOString().slice(0,-14)}mapToDriverValue(X){if(typeof X==="string")return X;return X.toISOString()}};function sY(X,Y){let{name:Z,config:$}=k(X,Y);if($?.mode==="date")return new Z8(Z);return new G8(Z)}var J8=class extends K{static[J]="PgDoublePrecisionBuilder";constructor(X){super(X,"number double","PgDoublePrecision")}build(X){return new H8(X,this.config)}},H8=class extends I{static[J]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(X){if(typeof X==="string")return Number.parseFloat(X);return X}};function tY(X){return new J8(X??"")}var _8=class extends K{static[J]="PgInetBuilder";constructor(X){super(X,"string inet","PgInet")}build(X){return new z8(X,this.config)}},z8=class extends I{static[J]="PgInet";getSQLType(){return"inet"}};function nY(X){return new _8(X??"")}var E8=class extends O1{static[J]="PgIntegerBuilder";constructor(X){super(X,"number int32","PgInteger")}build(X){return new D8(X,this.config)}},D8=class extends I{static[J]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(X){if(typeof X==="string")return Number.parseInt(X);return X}};function iY(X){return new E8(X??"")}var O8=class extends K{static[J]="PgIntervalBuilder";constructor(X,Y){super(X,"string interval","PgInterval");this.config.intervalConfig=Y}build(X){return new F8(X,this.config)}},F8=class extends I{static[J]="PgInterval";fields;precision;constructor(X,Y){super(X,Y);this.fields=Y.intervalConfig.fields,this.precision=Y.intervalConfig.precision}getSQLType(){return`interval${this.fields?` ${this.fields}`:""}${this.precision?`(${this.precision})`:""}`}};function lY(X,Y={}){let{name:Z,config:$}=k(X,Y);return new O8(Z,$)}var U8=class extends K{static[J]="PgJsonBuilder";constructor(X){super(X,"object json","PgJson")}build(X){return new A8(X,this.config)}},A8=class extends I{static[J]="PgJson";constructor(X,Y){super(X,Y)}getSQLType(){return"json"}mapToDriverValue(X){return JSON.stringify(X)}mapFromDriverValue(X){if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X}};function aY(X){return new U8(X??"")}var V8=class extends K{static[J]="PgJsonbBuilder";constructor(X){super(X,"object json","PgJsonb")}build(X){return new I8(X,this.config)}},I8=class extends I{static[J]="PgJsonb";constructor(X,Y){super(X,Y)}getSQLType(){return"jsonb"}mapToDriverValue(X){return JSON.stringify(X)}mapFromDriverValue(X){if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X}};function eY(X){return new V8(X??"")}var M8=class extends K{static[J]="PgLineBuilder";constructor(X){super(X,"array line","PgLine")}build(X){return new x8(X,this.config)}},x8=class extends I{static[J]="PgLine";mode="tuple";getSQLType(){return"line"}mapFromDriverValue(X){let[Y,Z,$]=X.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(Z),Number.parseFloat($)]}mapToDriverValue(X){return`{${X[0]},${X[1]},${X[2]}}`}},K8=class extends K{static[J]="PgLineABCBuilder";constructor(X){super(X,"object line","PgLineABC")}build(X){return new k8(X,this.config)}},k8=class extends I{static[J]="PgLineABC";mode="abc";getSQLType(){return"line"}mapFromDriverValue(X){let[Y,Z,$]=X.slice(1,-1).split(",");return{a:Number.parseFloat(Y),b:Number.parseFloat(Z),c:Number.parseFloat($)}}mapToDriverValue(X){return`{${X.a},${X.b},${X.c}}`}};function XZ(X,Y){let{name:Z,config:$}=k(X,Y);if(!$?.mode||$.mode==="tuple")return new M8(Z);return new K8(Z)}var N8=class extends K{static[J]="PgMacaddrBuilder";constructor(X){super(X,"string macaddr","PgMacaddr")}build(X){return new R8(X,this.config)}},R8=class extends I{static[J]="PgMacaddr";getSQLType(){return"macaddr"}};function YZ(X){return new N8(X??"")}var w8=class extends K{static[J]="PgMacaddr8Builder";constructor(X){super(X,"string macaddr8","PgMacaddr8")}build(X){return new Q8(X,this.config)}},Q8=class extends I{static[J]="PgMacaddr8";getSQLType(){return"macaddr8"}};function ZZ(X){return new w8(X??"")}var P8=class extends K{static[J]="PgNumericBuilder";constructor(X,Y,Z){super(X,"string numeric","PgNumeric");this.config.precision=Y,this.config.scale=Z}build(X){return new L8(X,this.config)}},L8=class extends I{static[J]="PgNumeric";precision;scale;constructor(X,Y){super(X,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue(X){if(typeof X==="string")return X;return String(X)}getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}},B8=class extends K{static[J]="PgNumericNumberBuilder";constructor(X,Y,Z){super(X,"number","PgNumericNumber");this.config.precision=Y,this.config.scale=Z}build(X){return new j8(X,this.config)}},j8=class extends I{static[J]="PgNumericNumber";precision;scale;constructor(X,Y){super(X,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue(X){if(typeof X==="number")return X;return Number(X)}mapToDriverValue(X){return String(X)}getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}},T8=class extends K{static[J]="PgNumericBigIntBuilder";constructor(X,Y,Z){super(X,"bigint int64","PgNumericBigInt");this.config.precision=Y,this.config.scale=Z}build(X){return new S8(X,this.config)}},S8=class extends I{static[J]="PgNumericBigInt";precision;scale;constructor(X,Y){super(X,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue(X){return BigInt(X)}mapToDriverValue(X){return String(X)}getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}};function $Z(X,Y){let{name:Z,config:$}=k(X,Y),G=$?.mode;return G==="number"?new B8(Z,$?.precision,$?.scale):G==="bigint"?new T8(Z,$?.precision,$?.scale):new P8(Z,$?.precision,$?.scale)}var C8=class extends K{static[J]="PgPointTupleBuilder";constructor(X){super(X,"array point","PgPointTuple")}build(X){return new q8(X,this.config)}},q8=class extends I{static[J]="PgPointTuple";mode="tuple";getSQLType(){return"point"}mapFromDriverValue(X){if(typeof X==="string"){let[Y,Z]=X.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(Z)]}return[X.x,X.y]}mapToDriverValue(X){return`(${X[0]},${X[1]})`}},v8=class extends K{static[J]="PgPointObjectBuilder";constructor(X){super(X,"object point","PgPointObject")}build(X){return new h8(X,this.config)}},h8=class extends I{static[J]="PgPointObject";mode="xy";getSQLType(){return"point"}mapFromDriverValue(X){if(typeof X==="string"){let[Y,Z]=X.slice(1,-1).split(",");return{x:Number.parseFloat(Y),y:Number.parseFloat(Z)}}return X}mapToDriverValue(X){return`(${X.x},${X.y})`}};function GZ(X,Y){let{name:Z,config:$}=k(X,Y);if(!$?.mode||$.mode==="tuple")return new C8(Z);return new v8(Z)}function p8(X){let Y=[];for(let Z=0;Z<X.length;Z+=2)Y.push(Number.parseInt(X.slice(Z,Z+2),16));return new Uint8Array(Y)}function WZ(X,Y){let $=new DataView(new ArrayBuffer(8));for(let G=0;G<8;G++)$.setUint8(G,X[Y+G]);return $.getFloat64(0,!0)}function bX(X){let Y=p8(X),Z=0,$=Y[Z];Z+=1;let G=new DataView(Y.buffer),H=G.getUint32(Z,$===1);Z+=4;let _;if(H&536870912)_=G.getUint32(Z,$===1),Z+=4;if((H&65535)===1){let z=WZ(Y,Z);Z+=8;let O=WZ(Y,Z);return Z+=8,{srid:_,point:[z,O]}}throw Error("Unsupported geometry type")}var y8=class extends K{static[J]="PgGeometryBuilder";constructor(X,Y){super(X,"array geometry","PgGeometry");this.config.srid=Y}build(X){return new f8(X,this.config)}},f8=class extends I{static[J]="PgGeometry";srid=this.config.srid;mode="tuple";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(X){if(typeof X!=="string")return X;return bX(X).point}mapToDriverValue(X){return`point(${X[0]} ${X[1]})`}},b8=class extends K{static[J]="PgGeometryObjectBuilder";constructor(X,Y){super(X,"object geometry","PgGeometryObject");this.config.srid=Y}build(X){return new d8(X,this.config)}},d8=class extends I{static[J]="PgGeometryObject";srid=this.config.srid;mode="object";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(X){let Y=bX(X);return{x:Y.point[0],y:Y.point[1]}}mapToDriverValue(X){return`point(${X.x} ${X.y})`}};function JZ(X,Y){let{name:Z,config:$}=k(X,Y);if(!$?.mode||$.mode==="tuple")return new y8(Z,$?.srid);return new b8(Z,$?.srid)}var g8=class extends K{static[J]="PgRealBuilder";constructor(X,Y){super(X,"number float","PgReal");this.config.length=Y}build(X){return new m8(X,this.config)}},m8=class extends I{static[J]="PgReal";constructor(X,Y){super(X,Y)}getSQLType(){return"real"}mapFromDriverValue(X){if(typeof X==="string")return Number.parseFloat(X);return X}};function HZ(X){return new g8(X??"")}var c8=class extends K{static[J]="PgSerialBuilder";constructor(X){super(X,"number int32","PgSerial");this.config.hasDefault=!0,this.config.notNull=!0}build(X){return new u8(X,this.config)}},u8=class extends I{static[J]="PgSerial";getSQLType(){return"serial"}};function _Z(X){return new c8(X??"")}var r8=class extends O1{static[J]="PgSmallIntBuilder";constructor(X){super(X,"number int16","PgSmallInt")}build(X){return new o8(X,this.config)}},o8=class extends I{static[J]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue(X){if(typeof X==="string")return Number(X);return X}};function zZ(X){return new r8(X??"")}var s8=class extends K{static[J]="PgSmallSerialBuilder";constructor(X){super(X,"number int16","PgSmallSerial");this.config.hasDefault=!0,this.config.notNull=!0}build(X){return new t8(X,this.config)}},t8=class extends I{static[J]="PgSmallSerial";getSQLType(){return"smallserial"}};function EZ(X){return new s8(X??"")}var n8=class extends K{static[J]="PgTextBuilder";constructor(X,Y){super(X,Y.enum?.length?"string enum":"string","PgText");this.config.enumValues=Y.enum}build(X){return new i8(X,this.config,this.config.enumValues)}},i8=class extends I{static[J]="PgText";enumValues;constructor(X,Y,Z){super(X,Y);this.enumValues=Z}getSQLType(){return"text"}};function DZ(X,Y={}){let{name:Z,config:$}=k(X,Y);return new n8(Z,$)}var l8=class extends F1{static[J]="PgTimeBuilder";constructor(X,Y,Z){super(X,"string time","PgTime");this.withTimezone=Y,this.precision=Z,this.config.withTimezone=Y,this.config.precision=Z}build(X){return new a8(X,this.config)}},a8=class extends I{static[J]="PgTime";withTimezone;precision;constructor(X,Y){super(X,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function OZ(X,Y={}){let{name:Z,config:$}=k(X,Y);return new l8(Z,$.withTimezone??!1,$.precision)}var e8=class extends F1{static[J]="PgTimestampBuilder";constructor(X,Y,Z){super(X,"object date","PgTimestamp");this.config.withTimezone=Y,this.config.precision=Z}build(X){return new X2(X,this.config)}},X2=class extends I{static[J]="PgTimestamp";withTimezone;precision;constructor(X,Y){super(X,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(X){if(typeof X==="string")return new Date(this.withTimezone?X:X+"+0000");return X}mapToDriverValue(X){if(typeof X==="string")return X;return X.toISOString()}},Y2=class extends F1{static[J]="PgTimestampStringBuilder";constructor(X,Y,Z){super(X,"string timestamp","PgTimestampString");this.config.withTimezone=Y,this.config.precision=Z}build(X){return new Z2(X,this.config)}},Z2=class extends I{static[J]="PgTimestampString";withTimezone;precision;constructor(X,Y){super(X,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(X){if(typeof X==="string")return X;let Y=X.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone)return`${Y}+00`;return Y}mapToDriverValue(X){if(typeof X==="string")return X;return X.toISOString()}};function FZ(X,Y={}){let{name:Z,config:$}=k(X,Y);if($?.mode==="string")return new Y2(Z,$.withTimezone??!1,$.precision);return new e8(Z,$?.withTimezone??!1,$?.precision)}var $2=class extends K{static[J]="PgUUIDBuilder";constructor(X){super(X,"string uuid","PgUUID")}defaultRandom(){return this.default(W`gen_random_uuid()`)}build(X){return new G2(X,this.config)}},G2=class extends I{static[J]="PgUUID";getSQLType(){return"uuid"}};function UZ(X){return new $2(X??"")}var W2=class extends K{static[J]="PgVarcharBuilder";constructor(X,Y){super(X,Y.enum?.length?"string enum":"string","PgVarchar");this.config.length=Y.length,this.config.enumValues=Y.enum}build(X){return new J2(X,this.config)}},J2=class extends I{static[J]="PgVarchar";enumValues;constructor(X,Y){super(X,Y);this.enumValues=Y.enumValues}getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function AZ(X,Y={}){let{name:Z,config:$}=k(X,Y);return new W2(Z,$)}var H2=class extends K{static[J]="PgBinaryVectorBuilder";constructor(X,Y){super(X,"string binary","PgBinaryVector");this.config.length=Y.dimensions,this.config.isLengthExact=!0}build(X){return new _2(X,this.config)}},_2=class extends I{static[J]="PgBinaryVector";getSQLType(){return`bit(${this.length})`}};function VZ(X,Y){let{name:Z,config:$}=k(X,Y);return new H2(Z,$)}var z2=class extends K{static[J]="PgHalfVectorBuilder";constructor(X,Y){super(X,"array halfvector","PgHalfVector");this.config.length=Y.dimensions,this.config.isLengthExact=!0}build(X){return new E2(X,this.config)}},E2=class extends I{static[J]="PgHalfVector";getSQLType(){return`halfvec(${this.length})`}mapToDriverValue(X){return JSON.stringify(X)}mapFromDriverValue(X){return X.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}};function IZ(X,Y){let{name:Z,config:$}=k(X,Y);return new z2(Z,$)}var D2=class extends K{static[J]="PgSparseVectorBuilder";constructor(X,Y){super(X,"string sparsevec","PgSparseVector");this.config.vectorDimensions=Y.dimensions}build(X){return new O2(X,this.config)}},O2=class extends I{static[J]="PgSparseVector";vectorDimensions=this.config.vectorDimensions;getSQLType(){return`sparsevec(${this.vectorDimensions})`}};function MZ(X,Y){let{name:Z,config:$}=k(X,Y);return new D2(Z,$)}var F2=class extends K{static[J]="PgVectorBuilder";constructor(X,Y){super(X,"array vector","PgVector");this.config.length=Y.dimensions,this.config.isLengthExact=!0}build(X){return new U2(X,this.config)}},U2=class extends I{static[J]="PgVector";getSQLType(){return`vector(${this.length})`}mapToDriverValue(X){return JSON.stringify(X)}mapFromDriverValue(X){return X.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}};function xZ(X,Y){let{name:Z,config:$}=k(X,Y);return new F2(Z,$)}function KZ(){return{bigint:gY,bigserial:mY,boolean:cY,char:uY,cidr:rY,customType:oY,date:sY,doublePrecision:tY,inet:nY,integer:iY,interval:lY,json:aY,jsonb:eY,line:XZ,macaddr:YZ,macaddr8:ZZ,numeric:$Z,point:GZ,geometry:JZ,real:HZ,serial:_Z,smallint:zZ,smallserial:EZ,text:DZ,time:OZ,timestamp:FZ,uuid:UZ,varchar:AZ,bit:VZ,halfvec:IZ,sparsevec:MZ,vector:xZ}}var dX=Symbol.for("drizzle:PgInlineForeignKeys"),gX=Symbol.for("drizzle:EnableRLS"),a1=class extends A{static[J]="PgTable";static Symbol=Object.assign({},A.Symbol,{InlineForeignKeys:dX,EnableRLS:gX});[dX]=[];[gX]=!1;[A.Symbol.ExtraConfigBuilder]=void 0;[A.Symbol.ExtraConfigColumns]={}};function kZ(X,Y,Z,$,G=X){let H=new a1(X,$,G),_=typeof Y==="function"?Y(KZ()):Y,z=Object.fromEntries(Object.entries(_).map(([U,F])=>{let M=F;M.setName(U);let V=M.build(H);return H[dX].push(...M.buildForeignKeys(V,H)),[U,V]})),O=Object.fromEntries(Object.entries(_).map(([U,F])=>{let M=F;return M.setName(U),[U,M.buildExtraConfigColumn(H)]})),E=Object.assign(H,z);if(E[A.Symbol.Columns]=z,E[A.Symbol.ExtraConfigColumns]=O,Z)E[a1.Symbol.ExtraConfigBuilder]=Z;return Object.assign(E,{enableRLS:()=>{return E[a1.Symbol.EnableRLS]=!0,E}})}var A2=(X,Y,Z)=>{return kZ(X,Y,Z,void 0)},V2=(X,Y,Z)=>{let $=kZ(X,Y,Z,void 0);return $[gX]=!0,$},PG=Object.assign(A2,{withRLS:V2});var NZ=class{static[J]="PgPrimaryKeyBuilder";columns;name;constructor(X,Y){this.columns=X,this.name=Y}build(X){return new I2(X,this.columns,this.name)}},I2=class{static[J]="PgPrimaryKey";columns;name;isNameExplicit;constructor(X,Y,Z){this.table=X,this.columns=Y,this.name=Z,this.isNameExplicit=!!Z}getName(){return this.name??`${this.table[a1.Symbol.Name]}_${this.columns.map((X)=>X.name).join("_")}_pk`}};var RZ=class{static[J]="Relation";referencedTableName;fieldName;constructor(X,Y,Z){this.sourceTable=X,this.referencedTable=Y,this.relationName=Z,this.referencedTableName=Y[A.Symbol.Name]}},M2=class{static[J]="Relations";constructor(X,Y){this.table=X,this.config=Y}},w1=class X extends RZ{static[J]="One";constructor(Y,Z,$,G){super(Y,Z,$?.relationName);this.config=$,this.isNullable=G}withFieldName(Y){let Z=new X(this.sourceTable,this.referencedTable,this.config,this.isNullable);return Z.fieldName=Y,Z}},mX=class X extends RZ{static[J]="Many";constructor(Y,Z,$){super(Y,Z,$?.relationName);this.config=$}withFieldName(Y){let Z=new X(this.sourceTable,this.referencedTable,this.config);return Z.fieldName=Y,Z}};function wZ(){return{and:u,between:r1,eq:a,exists:N1,gt:y1,gte:f1,ilike:n1,inArray:g1,isNull:c1,isNotNull:u1,like:s1,lt:b1,lte:d1,ne:p1,not:I1,notBetween:o1,notExists:R1,notLike:t1,notIlike:i1,notInArray:m1,or:V1,sql:W}}function QZ(){return{sql:W,asc:M1,desc:l1}}function PZ(X,Y){if(Object.keys(X).length===1&&"default"in X&&!D(X.default,A))X=X.default;let Z={},$={},G={};for(let[H,_]of Object.entries(X))if(D(_,A)){let z=A1(_),O=$[z];Z[z]=H,G[H]={tsName:H,dbName:_[A.Symbol.Name],schema:_[A.Symbol.Schema],columns:_[A.Symbol.Columns],relations:O?.relations??{},primaryKey:O?.primaryKey??[]};for(let U of Object.values(_[A.Symbol.Columns]))if(U.primary)G[H].primaryKey.push(U);let E=_[A.Symbol.ExtraConfigBuilder]?.(_[A.Symbol.ExtraConfigColumns]);if(E){for(let U of Object.values(E))if(D(U,NZ))G[H].primaryKey.push(...U.columns)}}else if(D(_,M2)){let z=A1(_.table),O=Z[z],E=_.config(Y(_.table));for(let[U,F]of Object.entries(E))if(O){let M=G[O];M.relations[U]=F}else{if(!(z in $))$[z]={relations:{}};$[z].relations[U]=F}}return{tables:G,tableNamesMap:Z}}function x2(X){return function(Z,$){return new w1(X,Z,$,$?.fields.reduce((G,H)=>G&&H.notNull,!0)??!1)}}function K2(X){return function(Z,$){return new mX(X,Z,$)}}function LZ(X,Y,Z){if(D(Z,w1)&&Z.config)return{fields:Z.config.fields,references:Z.config.references};let $=Y[A1(Z.referencedTable)];if(!$)throw Error(`Table "${Z.referencedTable[A.Symbol.Name]}" not found in schema`);let G=X[$];if(!G)throw Error(`Table "${$}" not found in schema`);let H=Z.sourceTable,_=Y[A1(H)];if(!_)throw Error(`Table "${H[A.Symbol.Name]}" not found in schema`);let z=[];for(let O of Object.values(G.relations))if(Z.relationName&&Z!==O&&O.relationName===Z.relationName||!Z.relationName&&O.referencedTable===Z.sourceTable)z.push(O);if(z.length>1)throw Z.relationName?Error(`There are multiple relations with name "${Z.relationName}" in table "${$}"`):Error(`There are multiple relations between "${$}" and "${Z.sourceTable[A.Symbol.Name]}". Please specify relation name`);if(z[0]&&D(z[0],w1)&&z[0].config)return{fields:z[0].config.references,references:z[0].config.fields};throw Error(`There is not enough information to infer relation "${_}.${Z.fieldName}"`)}function BZ(X){return{one:x2(X),many:K2(X)}}function FX(X,Y,Z,$,G=(H)=>H){let H={};for(let[_,z]of $.entries())if(z.isJson){let O=Y.relations[z.tsKey],E=Z[_],U=typeof E==="string"?JSON.parse(E):E;H[z.tsKey]=D(O,w1)?U&&FX(X,X[z.relationTableTsKey],U,z.selection,G):U.map((F)=>FX(X,X[z.relationTableTsKey],F,z.selection,G))}else{let O=G(Z[_]),E=z.field,U;if(D(E,R))U=E;else if(D(E,x))U=E.decoder;else U=E.sql.decoder;H[z.tsKey]=O===null?null:U.mapFromDriverValue(O)}return H}var r=class{static[J]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(X){return this.then(void 0,X)}finally(X){return this.then((Y)=>{return X?.(),Y},(Y)=>{throw X?.(),Y})}then(X,Y){return this.execute().then(X,Y)}};var TZ=class{static[J]="SQLiteAsyncRelationalQueryBuilder";constructor(X,Y,Z,$,G,H,_,z){this.mode=X,this.fullSchema=Y,this.schema=Z,this.tableNamesMap=$,this.table=G,this.tableConfig=H,this.dialect=_,this.session=z}findMany(X){return this.mode==="sync"?new jZ(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,X?X:{},"many"):new uX(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,X?X:{},"many")}findFirst(X){return this.mode==="sync"?new jZ(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,X?{...X,limit:1}:{limit:1},"first"):new uX(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,X?{...X,limit:1}:{limit:1},"first")}},uX=class extends r{static[J]="SQLiteAsyncRelationalQuery";mode;constructor(X,Y,Z,$,G,H,_,z,O){super();this.fullSchema=X,this.schema=Y,this.tableNamesMap=Z,this.table=$,this.tableConfig=G,this.dialect=H,this.session=_,this.config=z,this.mode=O}getSQL(){return this.dialect._buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}).sql}_prepare(X=!1){let{query:Y,builtQuery:Z}=this._toSQL();return this.session[X?"prepareOneTimeQuery":"prepareQuery"](Z,void 0,this.mode==="first"?"get":"all",!0,($,G)=>{let H=$.map((_)=>FX(this.schema,this.tableConfig,_,Y.selection,G));if(this.mode==="first")return H[0];return H})}prepare(){return this._prepare(!1)}_toSQL(){let X=this.dialect._buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName});return{query:X,builtQuery:this.dialect.sqlToQuery(X.sql)}}toSQL(){return this._toSQL().builtQuery}executeRaw(){if(this.mode==="first")return this._prepare(!1).get();return this._prepare(!1).all()}async execute(){return this.executeRaw()}},jZ=class extends uX{static[J]="SQLiteSyncRelationalQuery";sync(){return this.executeRaw()}};var SZ=class X extends x{sql;static[J]="SQLiteCountBuilderAsync";[Symbol.toStringTag]="SQLiteCountBuilderAsync";session;static buildEmbeddedCount(Y,Z){return W`(select count(*) from ${Y}${W.raw(" where ").if(Z)}${Z})`}static buildCount(Y,Z){return W`select count(*) from ${Y}${W.raw(" where ").if(Z)}${Z}`}constructor(Y){super(X.buildEmbeddedCount(Y.source,Y.filters).queryChunks);this.params=Y,this.session=Y.session,this.sql=X.buildCount(Y.source,Y.filters)}then(Y,Z){return Promise.resolve(this.session.count(this.sql)).then(Y,Z)}catch(Y){return this.then(void 0,Y)}finally(Y){return this.then((Z)=>{return Y?.(),Z},(Z)=>{throw Y?.(),Z})}};var Q1=class{static[J]="ColumnTableAliasProxyHandler";constructor(X,Y){this.table=X,this.ignoreColumnAlias=Y}get(X,Y){if(Y==="table")return this.table;if(Y==="isAlias"&&this.ignoreColumnAlias)return!1;return X[Y]}},CZ=class{static[J]="ViewSelectionAliasProxyHandler";constructor(X,Y,Z){this.view=X,this.selection=Y,this.ignoreColumnAlias=Z}get(X,Y){let Z=X[Y];if(D(Z,R))return new Proxy(Z,new Q1(this.view,this.ignoreColumnAlias));if(D(Z,q)||D(Z,x)||D(Z,x.Aliased)||E1(Z)||typeof Z!=="object"||Z===null)return Z;return new Proxy(Z,this)}},UX=class{static[J]="TableAliasProxyHandler";constructor(X,Y,Z){this.alias=X,this.replaceOriginalName=Y,this.ignoreColumnAlias=Z}get(X,Y){if(Y===A.Symbol.IsAlias)return!0;if(Y===A.Symbol.Name)return this.alias;if(this.replaceOriginalName&&Y===A.Symbol.OriginalName)return this.alias;if(Y===w)return{...X[w],name:this.alias,isAlias:!0,selectedFields:new Proxy(X[w].selectedFields,new CZ(new Proxy(X,this),X[w].selectedFields,this.ignoreColumnAlias))};if(Y===A.Symbol.Columns){let $=X[A.Symbol.Columns];if(!$)return $;if(D(X,y))return new Proxy(X[A.Symbol.Columns],new CZ(new Proxy(X,this),X[A.Symbol.Columns],this.ignoreColumnAlias));let G={};return Object.keys($).map((H)=>{G[H]=new Proxy($[H],new Q1(new Proxy(X,this),this.ignoreColumnAlias))}),G}let Z=X[Y];if(D(Z,R))return new Proxy(Z,new Q1(new Proxy(X,this),this.ignoreColumnAlias));return Z}},k2=class{static[J]="ColumnAliasProxyHandler";constructor(X){this.alias=X}get(X,Y){if(Y==="isAlias")return!0;if(Y==="name")return this.alias;if(Y==="keyAsName")return!1;if(Y===S1)return()=>X;return X[Y]}},N2=class{static[J]="RelationTableAliasProxyHandler";constructor(X){this.alias=X}get(X,Y){if(Y==="sourceTable")return e(X.sourceTable,this.alias);return X[Y]}};function e(X,Y){return new Proxy(X,new UX(Y,!1,!1))}function R2(X,Y){return new Proxy(X,new k2(Y))}function _W(X,Y){return new Proxy(X,new N2(Y))}function Z1(X,Y){return new Proxy(X,new Q1(new Proxy(X.table,new UX(Y,!1,!1)),!1))}function rX(X,Y){return new x.Aliased(e1(X.sql,Y),X.fieldAlias)}function e1(X,Y){return W.join(X.queryChunks.map((Z)=>{if(D(Z,R))return Z1(Z,Y);if(D(Z,x))return e1(Z,Y);if(D(Z,x.Aliased))return rX(Z,Y);return Z}))}R.prototype.as=function(X){return R2(this,X)};function XX(X){return X[S1]()}var W1=class extends Error{static[J]="DrizzleError";constructor({message:X,cause:Y}){super(X);this.name="DrizzleError",this.cause=Y}},x1=class X extends Error{static[J]="DrizzleQueryError";constructor(Y,Z,$){super(`Failed query: ${Y}
3
+ params: ${Z}`);if(this.query=Y,this.params=Z,this.cause=$,Error.captureStackTrace(this,X),$)this.cause=$}},qZ=class extends W1{static[J]="TransactionRollbackError";constructor(){super({message:"Rollback"})}};function vZ(X,Y){for(let Z of Object.values(X))for(let[$,G]of Object.entries(Z.relations)){if(!D(G,P1))continue;G.sourceTable=Z.table,G.fieldName=$}for(let[Z,$]of Object.entries(X))for(let[G,H]of Object.entries($.relations)){if(!D(H,P1))continue;let _,{targetTableName:z,alias:O,sourceColumns:E,targetColumns:U,throughTable:F,sourceTable:M,through:V,where:P,sourceColumnTableNames:L,targetColumnTableNames:j}=H,B=`relations -> ${$.name}: { ${G}: r.${D(H,IX)?"one":"many"}.${z}(...) }`;if(G in $.table[t])throw Error(`${B}: relation name collides with column "${G}" of table "${$.name}"`);if(typeof O==="string"&&!O)throw Error(`${B}: "alias" cannot be an empty string - omit it if you don't need it`);if(E?.length===0)throw Error(`${B}: "from" cannot be empty`);if(U?.length===0)throw Error(`${B}: "to" cannot be empty`);if(E&&U){if(E.length!==U.length&&!F)throw Error(`${B}: "from" and "to" fields without "through" must have the same length`);for(let S of L)if(S!==Z)throw Error(`${B}: all "from" columns must belong to table "${Z}", found column of table "${S}"`);for(let S of j)if(S!==z)throw Error(`${B}: all "to" columns must belong to table "${z}", found column of table "${S}"`);if(V){if(V.source.length!==E.length||V.target.length!==U.length)throw Error(`${B}: ".through(column)" must be used either on all columns in "from" and "to" or not defined on any of them`);for(let S of V.source)if(Y[S._.tableName]!==F)throw Error(`${B}: ".through(column)" must be used on the same table by all columns of the relation`);for(let S of V.target)if(Y[S._.tableName]!==F)throw Error(`${B}: ".through(column)" must be used on the same table by all columns of the relation`)}continue}if(E||U)throw Error(`${B}: relation must have either both "from" and "to" defined, or none of them`);let N=X[z];if(!N)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and no reverse relations of table "${z}" were found"`);if(O){let S=Object.values(N.relations).filter((C)=>D(C,P1)&&C.alias===O&&C!==H);if(S.length>1)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and multiple relations with alias "${O}" found in table "${z}": ${S.map((C)=>`"${C.fieldName}"`).join(", ")}`);if(_=S[0],!_)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and there is no reverse relation of table "${z}" with alias "${O}"`)}else{let S=Object.values(N.relations).filter((C)=>D(C,P1)&&C.targetTable===M&&!C.alias&&C!==H);if(S.length>1)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and multiple relations between "${z}" and "${Z}" were found.
4
+ Hint: you can specify "alias" on both sides of the relation with the same value`);if(_=S[0],!_)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and no reverse relation of table "${z}" with target table "${Z}" was found`)}if(!_.sourceColumns||!_.targetColumns)throw Error(`${B}: not enough data provided to build the relation - "from"/"to" are not defined, and reverse relation "${z}.${_.fieldName}" does not have "from"/"to" defined`);H.sourceColumns=_.targetColumns,H.targetColumns=_.sourceColumns,H.through=_.through?{source:_.through.target,target:_.through.source}:void 0,H.throughTable=_.throughTable,H.isReversed=!P,H.where=P??_.where}return X}function w2(X,Y){let Z={};for(let[$,G]of Object.entries(X))Z[$]={table:G,name:$,relations:Y[$]??{}};return vZ(Z,X)}function Q2(X,Y){let Z={};for(let[$,G]of Object.entries(Y)){if(!G||!X[$])continue;Z[$]={table:X[$],name:$,relations:G}}return vZ(Z,X)}var P1=class{static[J]="RelationV2";fieldName;sourceColumns;targetColumns;alias;where;sourceTable;targetTable;through;throughTable;isReversed;sourceColumnTableNames=[];targetColumnTableNames=[];constructor(X,Y){this.targetTableName=Y,this.targetTable=X}},IX=class extends P1{static[J]="OneV2";relationType="one";optional;constructor(X,Y,Z,$){super(Y,Z);if(this.alias=$?.alias,this.where=$?.where,$?.from)this.sourceColumns=(Array.isArray($.from)?$.from:[$.from]).map((G)=>{return this.throughTable??=G._.through?X[G._.through._.tableName]:void 0,this.sourceColumnTableNames.push(G._.tableName),G._.column});if($?.to)this.targetColumns=(Array.isArray($.to)?$.to:[$.to]).map((G)=>{return this.throughTable??=G._.through?X[G._.through._.tableName]:void 0,this.targetColumnTableNames.push(G._.tableName),G._.column});if(this.throughTable)this.through={source:(Array.isArray($?.from)?$.from:($?.from)?[$.from]:[]).map((G)=>G._.through),target:(Array.isArray($?.to)?$.to:($?.to)?[$.to]:[]).map((G)=>G._.through)};this.optional=$?.optional??!0}},P2=class extends P1{static[J]="ManyV2";relationType="many";constructor(X,Y,Z,$){super(Y,Z);if(this.config=$,this.alias=$?.alias,this.where=$?.where,$?.from)this.sourceColumns=(Array.isArray($.from)?$.from:[$.from]).map((G)=>{return this.throughTable??=G._.through?X[G._.through._.tableName]:void 0,this.sourceColumnTableNames.push(G._.tableName),G._.column});if($?.to)this.targetColumns=(Array.isArray($.to)?$.to:[$.to]).map((G)=>{return this.throughTable??=G._.through?X[G._.through._.tableName]:void 0,this.targetColumnTableNames.push(G._.tableName),G._.column});if(this.throughTable)this.through={source:(Array.isArray($?.from)?$.from:($?.from)?[$.from]:[]).map((G)=>G._.through),target:(Array.isArray($?.to)?$.to:($?.to)?[$.to]:[]).map((G)=>G._.through)}}},L2=class{static[J]="AggregatedField";table;onTable(X){return this.table=X,this}},B2=class extends L2{static[J]="AggregatedFieldCount";query;getSQL(){if(!this.query){if(!this.table)throw Error("Table must be set before building aggregate field");this.query=W`select count(*) as ${W.identifier("r")} from ${K1(this.table)}`.mapWith(Number)}return this.query}},L1={and:u,between:r1,eq:a,exists:N1,gt:y1,gte:f1,ilike:n1,inArray:g1,arrayContains:hX,arrayContained:pX,arrayOverlaps:yX,isNull:c1,isNotNull:u1,like:s1,lt:b1,lte:d1,ne:p1,not:I1,notBetween:o1,notExists:R1,notLike:t1,notIlike:i1,notInArray:m1,or:V1,sql:W},hZ={sql:W,asc:M1,desc:l1};function LW(){return hZ}function VX(X,Y,Z=(_)=>_,$=!1,G=!1,H){for(let _ of Y){if(_.selection){let U=`${H?`${H}.`:""}${_.key}`;if(X[_.key]===null)continue;if($){if(X[_.key]=JSON.parse(X[_.key]),X[_.key]===null)continue}if(G&&typeof X[_.key]==="string")X[_.key]=JSON.parse(X[_.key]);if(_.isArray){for(let F of X[_.key])VX(F,_.selection,Z,!1,G,U);continue}VX(X[_.key],_.selection,Z,!1,G,U);continue}let z=_.field,O=Z(X[_.key]);if(O===null)continue;let E;if(D(z,R))E=z;else if(D(z,x))E=z.decoder;else if(D(z,x.Aliased))E=z.sql.decoder;else if(D(z,A)||D(z,y))E=q1;else E=z.getSQL().decoder;X[_.key]="mapFromJsonValue"in E?E.mapFromJsonValue(O):E.mapFromDriverValue(O)}return X}var j2=class{static[J]="RelationsBuilderTable";_;constructor(X,Y){this._={name:Y,table:X}}},T2=class{static[J]="RelationsBuilderColumn";_;constructor(X,Y,Z){this._={tableName:Y,column:X,key:Z}}through(X){return new S2(this._.column,this._.tableName,this._.key,X)}},S2=class{static[J]="RelationsBuilderColumn";_;constructor(X,Y,Z,$){this._={tableName:Y,column:X,through:$,key:Z}}},C2=class{static[J]="RelationsHelperStatic";_;constructor(X){this._={tables:X};let Y={},Z={};for(let[$,G]of Object.entries(X))Y[$]=(H)=>{return new IX(X,G,$,H)},Z[$]=(H)=>{return new P2(X,G,$,H)};this.one=Y,this.many=Z}one;many;aggs={count(){return new B2}}};function pZ(X){let Y=new C2(X),Z=Object.entries(X).reduce(($,[G,H])=>{let _=new j2(H,G),z=Object.entries(H[t]).reduce((O,[E,U])=>{return O[E]=new T2(U,G,E),O},{});return $[G]=Object.assign(_,z),$},{});return Object.assign(Y,Z)}function yZ(X){return Object.fromEntries(Object.entries(X).filter(([Y,Z])=>D(Z,A)||D(Z,y)))}function BW(X,Y){let Z=yZ(X);return w2(Z,Y?Y(pZ(Z)):{})}function jW(X,Y){let Z=yZ(X);return Q2(Z,Y?Y(pZ(Z)):Object.fromEntries(Object.keys(Z).map(($)=>[$,{}])))}function fZ(X,Y){let Z=X[t][Y];return Z?D(Z,R)?Z:D(Z,x.Aliased)?W`${X}.${W.identifier(Z.fieldAlias)}`:W`${X}.${W.identifier(Y)}`:W`${X}.${W.identifier(Y)}`}function AX(X,Y){if(typeof Y!=="object"||D(Y,l))return a(X,Y);let Z=Object.entries(Y);if(!Z.length)return;let $=[];for(let[G,H]of Z){if(H===void 0)continue;switch(G){case"NOT":{let _=AX(X,H);if(!_)continue;$.push(I1(_));continue}case"OR":if(!H.length)continue;$.push(V1(...H.map((_)=>AX(X,_))));continue;case"AND":if(!H.length)continue;$.push(u(...H.map((_)=>AX(X,_))));continue;case"isNotNull":case"isNull":if(!H)continue;$.push(L1[G](X));continue;case"in":$.push(L1.inArray(X,H));continue;case"notIn":$.push(L1.notInArray(X,H));continue;default:$.push(L1[G](X,H));continue}}if(!$.length)return;return u(...$)}function J1(X,Y,Z={},$={},G,H=0){let _=Object.entries(Y);if(!_.length)return;let z=[];for(let[O,E]of _){if(E===void 0)continue;switch(O){case"RAW":{let U=typeof E==="function"?E(X,L1):E.getSQL();z.push(U);continue}case"OR":if(!E?.length)continue;z.push(V1(...E.map((U)=>J1(X,U,Z,$,G,H))));continue;case"AND":if(!E?.length)continue;z.push(u(...E.map((U)=>J1(X,U,Z,$,G,H))));continue;case"NOT":{if(E===void 0)continue;let U=J1(X,E,Z,$,G,H);if(!U)continue;z.push(I1(U));continue}default:{if(X[t][O]){let N=AX(fZ(X,O),E);if(N)z.push(N);continue}let U=Z[O];if(!U)throw new W1({message:`Unknown relational filter field: "${O}"`});let F=e(U.targetTable,`f${H}`),M=U.throughTable?e(U.throughTable,`ft${H}`):void 0,V=$[U.targetTableName],{filter:P,joinCondition:L}=oX(G,U,X,F,M),j=u(P,typeof E==="boolean"?void 0:J1(F,E,V.relations,$,G,H+1)),B=M?W`(select * from ${K1(F)} inner join ${K1(M)} on ${L}${W` where ${j}`.if(j)} limit 1)`:W`(select * from ${K1(F)}${W` where ${j}`.if(j)} limit 1)`;if(j)z.push((E?N1:R1)(B))}}}return u(...z)}function bZ(X,Y){if(typeof Y==="function"){let $=Y(X,hZ);return D($,x)?$:Array.isArray($)?$.length?W.join($.map((G)=>D(G,x)?G:M1(G)),W`, `):void 0:D($,R)?M1($):void 0}let Z=Object.entries(Y).filter(([$,G])=>G);if(!Z.length)return;return W.join(Z.map(([$,G])=>(G==="asc"?M1:l1)(fZ(X,$))),W`, `)}function dZ(X,Y){let Z=[],$=[];for(let[G,H]of Object.entries(Y)){if(!H)continue;let _=typeof H==="function"?H(X,{sql:L1.sql}):H,z=W`(${_.getSQL()}) as ${W.identifier(G)}`;z.decoder=_.getSQL().decoder,Z.push(z),$.push({key:G,field:z})}return{sql:Z.length?W.join(Z,W`, `):void 0,selection:$}}function oX(X,Y,Z,$,G){if(Y.through){let H=Y.sourceColumns.map((z,O)=>{let E=Y.through.source[O];return a(W`${Z}.${W.identifier(X.getColumnCasing(z))}`,W`${G}.${W.identifier(D(E._.column,R)?X.getColumnCasing(E._.column):E._.key)}`)}),_=Y.targetColumns.map((z,O)=>{let E=Y.through.target[O];return a(W`${G}.${W.identifier(D(E._.column,R)?X.getColumnCasing(E._.column):E._.key)}`,W`${$}.${W.identifier(X.getColumnCasing(z))}`)});return{filter:u(Y.where?J1(Y.isReversed?Z:$,Y.where):void 0,...H),joinCondition:u(..._)}}return{filter:u(...Y.sourceColumns.map((H,_)=>{let z=Y.targetColumns[_];return a(W`${Z}.${W.identifier(X.getColumnCasing(H))}`,W`${$}.${W.identifier(X.getColumnCasing(z))}`)}),Y.where?J1(Y.isReversed?Z:$,Y.where):void 0)}}function K1(X){return W`${X[_1]?W`${W`${W.identifier(X[G1]??"")}.`.if(X[G1])}${W.identifier(X[U1])} as ${X}`:X}`}var mZ=class{static[J]="SQLiteAsyncRelationalQueryBuilderV2";constructor(X,Y,Z,$,G,H,_,z){this.mode=X,this.schema=Y,this.table=Z,this.tableConfig=$,this.dialect=G,this.session=H,this.rowMode=_,this.forbidJsonb=z}findMany(X){return this.mode==="sync"?new gZ(this.schema,this.table,this.tableConfig,this.dialect,this.session,X??!0,"many",this.rowMode,this.forbidJsonb):new sX(this.schema,this.table,this.tableConfig,this.dialect,this.session,X??!0,"many",this.rowMode,this.forbidJsonb)}findFirst(X){return this.mode==="sync"?new gZ(this.schema,this.table,this.tableConfig,this.dialect,this.session,X??!0,"first",this.rowMode,this.forbidJsonb):new sX(this.schema,this.table,this.tableConfig,this.dialect,this.session,X??!0,"first",this.rowMode,this.forbidJsonb)}},sX=class extends r{static[J]="SQLiteAsyncRelationalQueryV2";mode;table;constructor(X,Y,Z,$,G,H,_,z,O){super();this.schema=X,this.tableConfig=Z,this.dialect=$,this.session=G,this.config=H,this.rowMode=z,this.forbidJsonb=O,this.mode=_,this.table=Y}getSQL(){return this.dialect.buildRelationalQuery({schema:this.schema,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,mode:this.mode,jsonb:this.forbidJsonb?W`json`:W`jsonb`}).sql}_prepare(X=!0){let{query:Y,builtQuery:Z}=this._toSQL();return this.session[X?"prepareOneTimeRelationalQuery":"prepareRelationalQuery"](Z,void 0,this.mode==="first"?"get":"all",($,G)=>{let H=$.map((_)=>VX(_,Y.selection,G,!this.rowMode));if(this.mode==="first")return H[0];return H})}prepare(){return this._prepare(!1)}_getQuery(){let X=this.forbidJsonb?W`json`:W`jsonb`,Y=this.dialect.buildRelationalQuery({schema:this.schema,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,mode:this.mode,isNested:this.rowMode,jsonb:X});if(this.rowMode)Y.sql=W`select json_object(${W.join(Y.selection.map((Z)=>{return W`${W.raw(this.dialect.escapeString(Z.key))}, ${Z.selection?W`${X}(${W.identifier(Z.key)})`:W.identifier(Z.key)}`}),W`, `)}) as ${W.identifier("r")} from (${Y.sql}) as ${W.identifier("t")}`;return Y}_toSQL(){let X=this._getQuery();return{query:X,builtQuery:this.dialect.sqlToQuery(X.sql)}}toSQL(){return this._toSQL().builtQuery}executeRaw(){if(this.mode==="first")return this._prepare().get();return this._prepare().all()}async execute(){return this.executeRaw()}},gZ=class extends sX{static[J]="SQLiteSyncRelationalQueryV2";sync(){return this.executeRaw()}};var YX=class extends r{static[J]="SQLiteRaw";config;constructor(X,Y,Z,$,G){super();this.execute=X,this.getSQL=Y,this.dialect=$,this.mapBatchResult=G,this.config={action:Z}}getQuery(){return{...this.dialect.sqlToQuery(this.getSQL()),method:this.config.action}}mapResult(X,Y){return Y?this.mapBatchResult(X):X}_prepare(){return this}isResponseInArrayMode(){return!1}};var m=class X{static[J]="SelectionProxyHandler";config;constructor(Y){this.config={...Y}}get(Y,Z){if(Z==="_")return{...Y._,selectedFields:new Proxy(Y._.selectedFields,this)};if(Z===w)return{...Y[w],selectedFields:new Proxy(Y[w].selectedFields,this)};if(typeof Z==="symbol")return Y[Z];let $=(D(Y,q)?Y._.selectedFields:D(Y,y)?Y[w].selectedFields:Y)[Z];if(D($,x.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!$.isSelectionField)return $.sql;let G=$.clone();return G.isSelectionField=!0,G.origin=this.config.alias,G}if(D($,x)){if(this.config.sqlBehavior==="sql")return $;throw Error(`You tried to reference "${Z}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}if(D($,R)){if(this.config.alias)return new Proxy($,new Q1(new Proxy($.table,new UX(this.config.alias,this.config.replaceOriginalName??!1,!0)),!0));return $}if(typeof $!=="object"||$===null)return $;return new Proxy($,new X(this.config))}};function X1(X){if(D(X,f))return[`${X[A.Symbol.BaseName]}`];if(D(X,q))return X._.usedTables??[];if(D(X,x))return X.usedTables??[];return[]}var MX=class extends r{static[J]="SQLiteDelete";config;constructor(X,Y,Z,$){super();this.table=X,this.session=Y,this.dialect=Z,this.config={table:X,withList:$}}where(X){return this.config.where=X,this}orderBy(...X){if(typeof X[0]==="function"){let Y=X[0](new Proxy(this.config.table[A.Symbol.Columns],new m({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),Z=Array.isArray(Y)?Y:[Y];this.config.orderBy=Z}else{let Y=X;this.config.orderBy=Y}return this}limit(X){return this.config.limit=X,this}returning(X=this.table[f.Symbol.Columns]){return this.config.returning=i(X),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:X,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare(X=!0){return this.session[X?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"delete",tables:X1(this.config.table)})}prepare(){return this._prepare(!1)}run=(X)=>{return this._prepare().run(X)};all=(X)=>{return this._prepare().all(X)};get=(X)=>{return this._prepare().get(X)};values=(X)=>{return this._prepare().values(X)};async execute(X){return this._prepare().execute(X)}$dynamic(){return this}};var B1=class extends y{static[J]="SQLiteViewBase"};var cZ=class{static[J]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}};var Y1=class{static[J]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor(X){this.fields=X.fields,this.session=X.session,this.dialect=X.dialect,this.withList=X.withList,this.distinct=X.distinct}from(X){let Y=!!this.fields,Z;if(this.fields)Z=this.fields;else if(D(X,q))Z=Object.fromEntries(Object.keys(X._.selectedFields).map(($)=>[$,X[$]]));else if(D(X,B1))Z=X[w].selectedFields;else if(D(X,x))Z={};else Z=FY(X);return new tX({table:X,fields:Z,isPartialSelect:Y,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct})}},uZ=class extends cZ{static[J]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:X,fields:Y,isPartialSelect:Z,session:$,dialect:G,withList:H,distinct:_}){super();this.config={withList:H,table:X,fields:{...Y},distinct:_,setOperators:[]},this.isPartialSelect=Z,this.session=$,this.dialect=G,this._={selectedFields:Y,config:this.config},this.tableName=h1(X),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let z of X1(X))this.usedTables.add(z)}getUsedTables(){return[...this.usedTables]}createJoin(X){return(Y,Z)=>{let $=this.tableName,G=h1(Y);for(let H of X1(Y))this.usedTables.add(H);if(typeof G==="string"&&this.config.joins?.some((H)=>H.alias===G))throw Error(`Alias "${G}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof $==="string")this.config.fields={[$]:this.config.fields};if(typeof G==="string"&&!D(Y,x)){let H=D(Y,q)?Y._.selectedFields:D(Y,y)?Y[w].selectedFields:Y[A.Symbol.Columns];this.config.fields[G]=H}}if(typeof Z==="function")Z=Z(new Proxy(this.config.fields,new m({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];if(this.config.joins.push({on:Z,table:Y,joinType:X,alias:G}),typeof G==="string")switch(X){case"left":this.joinsNotNullableMap[G]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([H])=>[H,!1])),this.joinsNotNullableMap[G]=!0;break;case"cross":case"inner":this.joinsNotNullableMap[G]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([H])=>[H,!1])),this.joinsNotNullableMap[G]=!1;break}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");crossJoin=this.createJoin("cross");createSetOperator(X,Y){return(Z)=>{let $=typeof Z==="function"?Z(q2()):Z;if(!v1(this.getSelectedFields(),$.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:X,isAll:Y,rightSelect:$}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators(X){return this.config.setOperators.push(...X),this}where(X){if(typeof X==="function")X=X(new Proxy(this.config.fields,new m({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=X,this}having(X){if(typeof X==="function")X=X(new Proxy(this.config.fields,new m({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=X,this}groupBy(...X){if(typeof X[0]==="function"){let Y=X[0](new Proxy(this.config.fields,new m({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=X;return this}orderBy(...X){if(typeof X[0]==="function"){let Y=X[0](new Proxy(this.config.fields,new m({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),Z=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Z;else this.config.orderBy=Z}else{let Y=X;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit(X){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=X;else this.config.limit=X;return this}offset(X){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=X;else this.config.offset=X;return this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:X,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as(X){let Y=[];if(Y.push(...X1(this.config.table)),this.config.joins)for(let Z of this.config.joins)Y.push(...X1(Z.table));return new Proxy(new q(this.getSQL(),this.config.fields,X,!1,[...new Set(Y)]),new m({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new m({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}},tX=class extends uZ{static[J]="SQLiteSelect";_prepare(X=!0){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let Y=i(this.config.fields),Z=this.session[X?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),Y,"all",!0,void 0,{type:"select",tables:[...this.usedTables]},this.cacheConfig);return Z.joinsNotNullableMap=this.joinsNotNullableMap,Z}$withCache(X){return this.cacheConfig=X===void 0?{config:{},enabled:!0,autoInvalidate:!0}:X===!1?{enabled:!1}:{enabled:!0,autoInvalidate:!0,...X},this}prepare(){return this._prepare(!1)}run=(X)=>{return this._prepare().run(X)};all=(X)=>{return this._prepare().all(X)};get=(X)=>{return this._prepare().get(X)};values=(X)=>{return this._prepare().values(X)};async execute(){return this.all()}};OY(tX,[r]);function xX(X,Y){return(Z,$,...G)=>{let H=[$,...G].map((_)=>({type:X,isAll:Y,rightSelect:_}));for(let _ of H)if(!v1(Z.getSelectedFields(),_.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return Z.addSetOperators(H)}}var q2=()=>({union:rZ,unionAll:oZ,intersect:sZ,except:tZ}),rZ=xX("union",!1),oZ=xX("union",!0),sZ=xX("intersect",!1),tZ=xX("except",!1);function mJ(X){let Y=parseInt(X.slice(0,4),10),Z=parseInt(X.slice(4,6),10)-1,$=parseInt(X.slice(6,8),10),G=parseInt(X.slice(8,10),10),H=parseInt(X.slice(10,12),10),_=parseInt(X.slice(12,14),10);return Date.UTC(Y,Z,$,G,H,_)}function nZ(X){let{localMigrations:Y,dbMigrations:Z}=X,$=new Set(Z.map((G)=>G.name).filter((G)=>G!==null));return Y.filter((G)=>!G.name||!$.has(G.name))}var iZ=1;function v2(X){if(X.includes("name"))return 1;return 0}function nX(X,Y,Z=()=>[]){let $=X.all(Y);if($.length===0)return[];if(Array.isArray($[0]))return $.map((G)=>Z(G));return $}function lZ(X,Y,Z){if(nX(Y,W`SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ${X}`,(G)=>({"1":G[0]})).length===0)return{newDb:!0};let $=v2(nX(Y,W`SELECT name as column_name FROM pragma_table_info(${X})`,(G)=>({column_name:G[0]})).map((G)=>G.column_name));for(let G=$;G<iZ;G++){let H=h2[G];if(!H)throw Error(`No upgrade path from migration table version ${G} to ${G+1}`);H(X,Y,Z)}return{prevVersion:$,currentVersion:iZ}}var h2={0:(X,Y,Z)=>{let $=W`${W.identifier(X)}`,G=nX(Y,W`SELECT id, hash, created_at FROM ${$} ORDER BY id ASC`,(E)=>({id:E[0],hash:E[1],created_at:E[2]}));Z.sort((E,U)=>E.folderMillis!==U.folderMillis?E.folderMillis-U.folderMillis:(E.name??"").localeCompare(U.name??""));let H=new Map,_=new Map;for(let E of Z){if(!H.has(E.folderMillis))H.set(E.folderMillis,[]);H.get(E.folderMillis).push(E),_.set(E.hash,E)}let z=[],O=[];for(let E of G){let U=String(E.created_at),F=Number(U.substring(0,U.length-3)+"000"),M=H.get(F),V,P=null;if(M&&M.length===1)V=M[0],P="millis";else if(M&&M.length>1){if(V=M.find((L)=>L.hash&&E.hash&&L.hash===E.hash),V)P="hash"}else if(V=_.get(E.hash),V)P="hash";if(V)z.push({id:E.id,name:V.name,hash:E.hash,created_at:U,matchedBy:E.id?"id":P});else O.push(E)}if(O.length>0)throw Error(`While upgrading your database migrations table we found ${O.length} (${O.map((E)=>`[id: ${E.id}, created_at: ${E.created_at}]`).join(", ")}) migrations in the database that do not match any local migration. This means that some migrations were applied to the database but are missing from the local environment`);Y.transaction((E)=>{E.run(W`ALTER TABLE ${$} ADD COLUMN ${W.identifier("name")} text`),E.run(W`ALTER TABLE ${$} ADD COLUMN ${W.identifier("applied_at")} TEXT`);for(let U of z){let F=W`UPDATE ${$} SET ${W.identifier("name")} = ${U.name}, ${W.identifier("applied_at")} = NULL WHERE`;if(U.id)F.append(W` ${W.identifier("id")} = ${U.id}`);else if(U.matchedBy==="millis")F.append(W` ${W.identifier("created_at")} = ${U.created_at}`);else F.append(W` ${W.identifier("hash")} = ${U.hash}`);E.run(F)}})}};function p2(X){return(X.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map((Y)=>Y.toLowerCase()).join("_")}function y2(X){return(X.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((Y,Z,$)=>{return Y+($===0?Z.toLowerCase():`${Z[0].toUpperCase()}${Z.slice(1)}`)},"")}function f2(X){return X}var aZ=class{static[J]="CasingCache";cache={};cachedTables={};convert;constructor(X){this.convert=X==="snake_case"?p2:X==="camelCase"?y2:f2}getColumnCasing(X){if(!X.keyAsName)return X.name;let Y=`${X.table[A.Symbol.Schema]??"public"}.${X.table[A.Symbol.OriginalName]}.${X.name}`;if(!this.cache[Y])this.cacheTable(X.table);return this.cache[Y]}cacheTable(X){let Y=`${X[A.Symbol.Schema]??"public"}.${X[A.Symbol.OriginalName]}`;if(!this.cachedTables[Y]){for(let Z of Object.values(X[A.Symbol.Columns])){if(!D(Z,R))continue;let $=`${Y}.${Z.name}`;this.cache[$]=this.convert(Z.name)}this.cachedTables[Y]=!0}}clearCache(){this.cache={},this.cachedTables={}}};var KX=class{static[J]="SQLiteDialect";casing;constructor(X){this.casing=new aZ(X?.casing)}escapeName(X){return`"${X}"`}escapeParam(X){return"?"}escapeString(X){return`'${X.replace(/'/g,"''")}'`}buildWithCTE(X){if(!X?.length)return;let Y=[W`with `];for(let[Z,$]of X.entries())if(Y.push(W`${W.identifier($._.alias)} as (${$._.sql})`),Z<X.length-1)Y.push(W`, `);return Y.push(W` `),W.join(Y)}buildDeleteQuery({table:X,where:Y,returning:Z,withList:$,limit:G,orderBy:H}){let _=this.buildWithCTE($),z=Z?W` returning ${this.buildSelection(Z,{isSingleTable:!0})}`:void 0;return W`${_}delete from ${X}${Y?W` where ${Y}`:void 0}${z}${this.buildOrderBy(H)}${this.buildLimit(G)}`}buildUpdateSet(X,Y){let Z=X[A.Symbol.Columns],$=Object.keys(Z).filter((H)=>Y[H]!==void 0||Z[H]?.onUpdateFn!==void 0),G=$.length;return W.join($.flatMap((H,_)=>{let z=Z[H],O=z.onUpdateFn?.(),E=Y[H]??(D(O,x)?O:W.param(O,z)),U=W`${W.identifier(this.casing.getColumnCasing(z))} = ${E}`;if(_<G-1)return[U,W.raw(", ")];return[U]}))}buildUpdateQuery({table:X,set:Y,where:Z,returning:$,withList:G,joins:H,from:_,limit:z,orderBy:O}){let E=this.buildWithCTE(G),U=this.buildUpdateSet(X,Y),F=_&&W.join([W.raw(" from "),this.buildFromTable(_)]),M=this.buildJoins(H),V=$?W` returning ${this.buildSelection($,{isSingleTable:!0})}`:void 0;return W`${E}update ${X} set ${U}${F}${M}${Z?W` where ${Z}`:void 0}${V}${this.buildOrderBy(O)}${this.buildLimit(z)}`}buildSelection(X,{isSingleTable:Y=!1}={}){let Z=X.length,$=X.flatMap(({field:G},H)=>{let _=[];if(D(G,x.Aliased)&&G.isSelectionField){if(!Y&&G.origin!==void 0)_.push(W.identifier(G.origin),W.raw("."));_.push(W.identifier(G.fieldAlias))}else if(D(G,x.Aliased)||D(G,x)){let z=D(G,x.Aliased)?G.sql:G;if(Y){let O=new x(z.queryChunks.map((E)=>{if(D(E,R))return W.identifier(this.casing.getColumnCasing(E));return E}));_.push(z.shouldInlineParams?O.inlineParams():O)}else _.push(z);if(D(G,x.Aliased))_.push(W` as ${W.identifier(G.fieldAlias)}`)}else if(D(G,R))if(G.columnType==="SQLiteNumericBigInt")if(Y)_.push(G.isAlias?W`cast(${W.identifier(this.casing.getColumnCasing(XX(G)))} as text) as ${G}`:W`cast(${W.identifier(this.casing.getColumnCasing(G))} as text)`);else _.push(G.isAlias?W`cast(${XX(G)} as text) as ${G}`:W`cast(${G} as text)`);else if(Y)_.push(G.isAlias?W`${W.identifier(this.casing.getColumnCasing(XX(G)))} as ${G}`:W.identifier(this.casing.getColumnCasing(G)));else _.push(G.isAlias?W`${XX(G)} as ${G}`:G);else if(D(G,q)){let z=Object.entries(G._.selectedFields);if(z.length===1){let O=z[0][1],E=D(O,x)?O.decoder:D(O,R)?{mapFromDriverValue:(U)=>O.mapFromDriverValue(U)}:O.sql.decoder;if(E)G._.sql.decoder=E}_.push(G)}if(H<Z-1)_.push(W`, `);return _});return W.join($)}buildJoins(X){if(!X||X.length===0)return;let Y=[];if(X)for(let[Z,$]of X.entries()){if(Z===0)Y.push(W` `);let G=$.table,H=$.on?W` on ${$.on}`:void 0;if(D(G,f)){let _=G[f.Symbol.Name],z=G[f.Symbol.Schema],O=G[f.Symbol.OriginalName],E=_===O?void 0:$.alias;Y.push(W`${W.raw($.joinType)} join ${z?W`${W.identifier(z)}.`:void 0}${W.identifier(O)}${E&&W` ${W.identifier(E)}`}${H}`)}else Y.push(W`${W.raw($.joinType)} join ${G}${H}`);if(Z<X.length-1)Y.push(W` `)}return W.join(Y)}buildLimit(X){return typeof X==="object"||typeof X==="number"&&X>=0?W` limit ${X}`:void 0}buildOrderBy(X){let Y=[];if(X){for(let[Z,$]of X.entries())if(Y.push($),Z<X.length-1)Y.push(W`, `)}return Y.length>0?W` order by ${W.join(Y)}`:void 0}buildFromTable(X){if(D(X,A)&&X[A.Symbol.IsAlias])return W`${W`${W.identifier(X[A.Symbol.Schema]??"")}.`.if(X[A.Symbol.Schema])}${W.identifier(X[A.Symbol.OriginalName])} ${W.identifier(X[A.Symbol.Name])}`;if(D(X,y)&&X[w].isAlias){let Y=W`${W.identifier(X[w].originalName)}`;if(X[w].schema)Y=W`${W.identifier(X[w].schema)}.${Y}`;return W`${Y} ${W.identifier(X[w].name)}`}return X}buildSelectQuery({withList:X,fields:Y,fieldsFlat:Z,where:$,having:G,table:H,joins:_,orderBy:z,groupBy:O,limit:E,offset:U,distinct:F,setOperators:M}){let V=Z??i(Y);for(let h of V)if(D(h.field,R)&&z1(h.field.table)!==(D(H,q)?H._.alias:D(H,B1)?H[w].name:D(H,x)?void 0:z1(H))&&!((o)=>_?.some(({alias:n})=>n===(o[A.Symbol.IsAlias]?z1(o):o[A.Symbol.BaseName])))(h.field.table)){let o=z1(h.field.table);throw Error(`Your "${h.path.join("->")}" field references a column "${o}"."${h.field.name}", but the table "${o}" is not part of the query! Did you forget to join it?`)}let P=!_||_.length===0,L=this.buildWithCTE(X),j=F?W` distinct`:void 0,B=this.buildSelection(V,{isSingleTable:P}),N=this.buildFromTable(H),S=this.buildJoins(_),C=$?W` where ${$}`:void 0,d=G?W` having ${G}`:void 0,Q=[];if(O){for(let[h,o]of O.entries())if(Q.push(o),h<O.length-1)Q.push(W`, `)}let T=W`${L}select${j} ${B} from ${N}${S}${C}${Q.length>0?W` group by ${W.join(Q)}`:void 0}${d}${this.buildOrderBy(z)}${this.buildLimit(E)}${U?W` offset ${U}`:void 0}`;if(M.length>0)return this.buildSetOperations(T,M);return T}buildSetOperations(X,Y){let[Z,...$]=Y;if(!Z)throw Error("Cannot pass undefined values to any set operator");if($.length===0)return this.buildSetOperationQuery({leftSelect:X,setOperator:Z});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:X,setOperator:Z}),$)}buildSetOperationQuery({leftSelect:X,setOperator:{type:Y,isAll:Z,rightSelect:$,limit:G,orderBy:H,offset:_}}){let z=W`${X.getSQL()} `,O=W`${$.getSQL()}`,E;if(H&&H.length>0){let V=[];for(let P of H)if(D(P,v))V.push(W.identifier(P.name));else if(D(P,x)){for(let L=0;L<P.queryChunks.length;L++){let j=P.queryChunks[L];if(D(j,v))P.queryChunks[L]=W.identifier(this.casing.getColumnCasing(j))}V.push(W`${P}`)}else V.push(W`${P}`);E=W` order by ${W.join(V,W`, `)}`}let U=typeof G==="object"||typeof G==="number"&&G>=0?W` limit ${G}`:void 0,F=W.raw(`${Y} ${Z?"all ":""}`),M=_?W` offset ${_}`:void 0;return W`${z}${F}${O}${E}${U}${M}`}buildInsertQuery({table:X,values:Y,onConflict:Z,returning:$,withList:G,select:H}){let _=[],z=X[A.Symbol.Columns],O=Object.entries(z).filter(([V,P])=>!P.shouldDisableInsert()),E=O.map(([,V])=>W.identifier(this.casing.getColumnCasing(V)));if(H){let V=Y;if(D(V,x))_.push(V);else _.push(V.getSQL())}else{let V=Y;_.push(W.raw("values "));for(let[P,L]of V.entries()){let j=[];for(let[B,N]of O){let S=L[B];if(S===void 0||D(S,c)&&S.value===void 0){let C;if(N.default!==null&&N.default!==void 0)C=D(N.default,x)?N.default:W.param(N.default,N);else if(N.defaultFn!==void 0){let d=N.defaultFn();C=D(d,x)?d:W.param(d,N)}else if(!N.default&&N.onUpdateFn!==void 0){let d=N.onUpdateFn();C=D(d,x)?d:W.param(d,N)}else C=W`null`;j.push(C)}else j.push(S)}if(_.push(j),P<V.length-1)_.push(W`, `)}}let U=this.buildWithCTE(G),F=W.join(_),M=$?W` returning ${this.buildSelection($,{isSingleTable:!0})}`:void 0;return W`${U}insert into ${X} ${E} ${F}${Z?.length?W.join(Z):void 0}${M}`}sqlToQuery(X,Y){return X.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:Y})}_buildRelationalQuery({fullSchema:X,schema:Y,tableNamesMap:Z,table:$,tableConfig:G,queryConfig:H,tableAlias:_,nestedQueryRelation:z,joinOn:O}){let E=[],U,F,M=[],V,P=[];if(H===!0)E=Object.entries(G.columns).map(([j,B])=>({dbKey:B.name,tsKey:j,field:Z1(B,_),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let j=Object.fromEntries(Object.entries(G.columns).map(([Q,T])=>[Q,Z1(T,_)]));if(H.where){let Q=typeof H.where==="function"?H.where(j,wZ()):H.where;V=Q&&e1(Q,_)}let B=[],N=[];if(H.columns){let Q=!1;for(let[T,h]of Object.entries(H.columns)){if(h===void 0)continue;if(T in G.columns){if(!Q&&h===!0)Q=!0;N.push(T)}}if(N.length>0)N=Q?N.filter((T)=>H.columns?.[T]===!0):Object.keys(G.columns).filter((T)=>!N.includes(T))}else N=Object.keys(G.columns);for(let Q of N){let T=G.columns[Q];B.push({tsKey:Q,value:T})}let S=[];if(H.with)S=Object.entries(H.with).filter((Q)=>!!Q[1]).map(([Q,T])=>({tsKey:Q,queryConfig:T,relation:G.relations[Q]}));let C;if(H.extras){C=typeof H.extras==="function"?H.extras(j,{sql:W}):H.extras;for(let[Q,T]of Object.entries(C))B.push({tsKey:Q,value:rX(T,_)})}for(let{tsKey:Q,value:T}of B)E.push({dbKey:D(T,x.Aliased)?T.fieldAlias:G.columns[Q].name,tsKey:Q,field:D(T,R)?Z1(T,_):T,relationTableTsKey:void 0,isJson:!1,selection:[]});let d=typeof H.orderBy==="function"?H.orderBy(j,QZ()):H.orderBy??[];if(!Array.isArray(d))d=[d];M=d.map((Q)=>{if(D(Q,R))return Z1(Q,_);return e1(Q,_)}),U=H.limit,F=H.offset;for(let{tsKey:Q,queryConfig:T,relation:h}of S){let o=LZ(Y,Z,h),n=Z[A1(h.referencedTable)],H1=`${_}_${Q}`,$1=u(...o.fields.map((T1,PX)=>a(Z1(o.references[PX],H1),Z1(T1,_)))),k1=this._buildRelationalQuery({fullSchema:X,schema:Y,tableNamesMap:Z,table:X[n],tableConfig:Y[n],queryConfig:D(h,w1)?T===!0?{limit:1}:{...T,limit:1}:T,tableAlias:H1,joinOn:$1,nestedQueryRelation:h}),j1=W`(${k1.sql})`.as(Q);E.push({dbKey:Q,tsKey:Q,field:j1,relationTableTsKey:n,isJson:!0,selection:k1.selection})}}if(E.length===0)throw new W1({message:`No fields selected for table "${G.tsName}" ("${_}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});let L;if(V=u(O,V),z){let j=W`json_array(${W.join(E.map(({field:N})=>D(N,v)?W.identifier(this.casing.getColumnCasing(N)):D(N,x.Aliased)?N.sql:N),W`, `)})`;if(D(z,mX))j=W`coalesce(json_group_array(${j}), json_array())`;let B=[{dbKey:"data",tsKey:"data",field:j.as("data"),isJson:!0,relationTableTsKey:G.tsName,selection:E}];if(U!==void 0||F!==void 0||M.length>0)L=this.buildSelectQuery({table:e($,_),fields:{},fieldsFlat:[{path:[],field:W.raw("*")}],where:V,limit:U,offset:F,orderBy:M,setOperators:[]}),V=void 0,U=void 0,F=void 0,M=void 0;else L=e($,_);L=this.buildSelectQuery({table:D(L,f)?L:new q(L,{},_),fields:{},fieldsFlat:B.map(({field:N})=>({path:[],field:D(N,R)?Z1(N,_):N})),joins:P,where:V,limit:U,offset:F,orderBy:M,setOperators:[]})}else L=this.buildSelectQuery({table:e($,_),fields:{},fieldsFlat:E.map(({field:j})=>({path:[],field:D(j,R)?Z1(j,_):j})),joins:P,where:V,limit:U,offset:F,orderBy:M,setOperators:[]});return{tableTsKey:G.tsName,sql:L,selection:E}}nestedSelectionerror(){throw new W1({message:"Views with nested selections are not supported by the relational query builder"})}buildRqbColumn(X,Y,Z){if(D(Y,R)){let $=W`${X}.${W.identifier(this.casing.getColumnCasing(Y))}`;switch(Y.columnType){case"SQLiteBigInt":case"SQLiteBlobJson":case"SQLiteBlobBuffer":return W`hex(${$}) as ${W.identifier(Z)}`;case"SQLiteNumeric":case"SQLiteNumericNumber":case"SQLiteNumericBigInt":return W`cast(${$} as text) as ${W.identifier(Z)}`;case"SQLiteCustomColumn":return W`${Y.jsonSelectIdentifier($,W)} as ${W.identifier(Z)}`;default:return W`${$} as ${W.identifier(Z)}`}}return W`${X}.${D(Y,x.Aliased)?W.identifier(Y.fieldAlias):E1(Y)?W.identifier(Z):this.nestedSelectionerror()} as ${W.identifier(Z)}`}unwrapAllColumns=(X,Y)=>{return W.join(Object.entries(X[t]).map(([Z,$])=>{return Y.push({key:Z,field:$}),this.buildRqbColumn(X,$,Z)}),W`, `)};getSelectedTableColumns=(X,Y)=>{let Z=[],$=X[t],G=Object.entries(Y),H;for(let[_,z]of G){if(z===void 0)continue;if(H=H||z,z){let O=$[_];Z.push({column:O,tsName:_})}}if(H===!1)for(let[_,z]of Object.entries($)){if(Y[_]===!1)continue;Z.push({column:z,tsName:_})}return Z};buildColumns=(X,Y,Z)=>Z?.columns?(()=>{let $=[],G=this.getSelectedTableColumns(X,Z?.columns);for(let{column:H,tsName:_}of G)$.push(this.buildRqbColumn(X,H,_)),Y.push({key:_,field:H});return $.length?W.join($,W`, `):void 0})():this.unwrapAllColumns(X,Y);buildRelationalQuery({schema:X,table:Y,tableConfig:Z,queryConfig:$,relationWhere:G,mode:H,isNested:_,errorPath:z,depth:O,throughJoin:E,jsonb:U}){let F=[],M=H==="first",V=$===!0?void 0:$,P=z??"",L=O??0;if(!L)Y=e(Y,`d${L}`);let j=M?1:V?.limit,B=V?.offset,N=this.buildColumns(Y,F,V),S=V?.where&&G?u(J1(Y,V.where,Z.relations,X,this.casing),G):V?.where?J1(Y,V.where,Z.relations,X,this.casing):G,C=V?.orderBy?bZ(Y,V.orderBy):void 0,d=V?.extras?dZ(Y,V.extras):void 0;if(d)F.push(...d.selection);let Q=V?(()=>{let{with:h}=V;if(!h)return;let o=Object.entries(h).filter(([n,H1])=>H1);if(!o.length)return;return W.join(o.map(([n,H1])=>{let $1=Z.relations[n],k1=D($1,IX),j1=e($1.targetTable,`d${L+1}`),T1=$1.throughTable?e($1.throughTable,`tr${L}`):void 0,{filter:PX,joinCondition:G0}=oX(this.casing,$1,Y,j1,T1),W0=T1?W` inner join ${K1(T1)} on ${G0}`:void 0,GX=this.buildRelationalQuery({table:j1,mode:k1?"first":"many",schema:X,queryConfig:H1,tableConfig:X[$1.targetTableName],relationWhere:PX,isNested:!0,errorPath:`${P.length?`${P}.`:""}${n}`,depth:L+1,throughJoin:W0,jsonb:U});F.push({field:j1,key:n,selection:GX.selection,isArray:!k1,isOptional:($1.optional??!1)||H1!==!0&&!!H1.where});let GY=W.join(GX.selection.map((WX)=>{return W`${W.raw(this.escapeString(WX.key))}, ${WX.selection?W`${U}(${W.identifier(WX.key)})`:W.identifier(WX.key)}`}),W`, `),WY=_?U:W`json`;return k1?W`(select ${WY}_object(${GY}) as ${W.identifier("r")} from (${GX.sql}) as ${W.identifier("t")}) as ${W.identifier(n)}`:W`coalesce((select ${WY}_group_array(json_object(${GY})) as ${W.identifier("r")} from (${GX.sql}) as ${W.identifier("t")}), ${U}_array()) as ${W.identifier(n)}`}),W`, `)})():void 0,T=[N,d?.sql,Q].filter((h)=>h!==void 0);if(!T.length)throw new W1({message:`No fields selected for table "${Z.name}"${P?` ("${P}")`:""}`});return{sql:W`select ${W.join(T,W`, `)} from ${K1(Y)}${E}${W` where ${S}`.if(S)}${W` order by ${C}`.if(C)}${W` limit ${j}`.if(j!==void 0)}${W` offset ${B}`.if(B!==void 0)}`,selection:F}}},kX=class extends KX{static[J]="SQLiteSyncDialect";migrate(X,Y,Z){let $=Z===void 0?"__drizzle_migrations":typeof Z==="string"?"__drizzle_migrations":Z.migrationsTable??"__drizzle_migrations",{newDb:G}=lZ($,Y,X);if(G){let z=W`
5
+ CREATE TABLE IF NOT EXISTS ${W.identifier($)} (
6
+ id INTEGER PRIMARY KEY,
7
+ hash text NOT NULL,
8
+ created_at numeric,
9
+ name text,
10
+ applied_at TEXT
11
+ )`;Y.run(z)}let H=Y.all(W`SELECT id, hash, created_at, name FROM ${W.identifier($)}`);if(typeof Z==="object"&&Z.init){if(H.length)return{exitCode:"databaseMigrations"};if(X.length>1)return{exitCode:"localMigrations"};let[z]=X;if(!z)return;Y.run(W`insert into ${W.identifier($)} ("hash", "created_at", "name", "applied_at") values(${z.hash}, ${z.folderMillis}, ${z.name}, ${new Date().toISOString()})`);return}let _=nZ({localMigrations:X,dbMigrations:H});Y.run(W`BEGIN`);try{for(let z of _){for(let O of z.sql)Y.run(W.raw(O));Y.run(W`INSERT INTO ${W.identifier($)} ("hash", "created_at", "name", "applied_at") values(${z.hash}, ${z.folderMillis}, ${z.name}, ${new Date().toISOString()})`)}Y.run(W`COMMIT`)}catch(z){throw Y.run(W`ROLLBACK`),z}}};var ZX=class{static[J]="SQLiteQueryBuilder";dialect;dialectConfig;constructor(X){this.dialect=D(X,KX)?X:void 0,this.dialectConfig=D(X,KX)?void 0:X}$with=(X,Y)=>{let Z=this;return{as:(G)=>{if(typeof G==="function")G=G(Z);return new Proxy(new JX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new m({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...X){let Y=this;function Z(G){return new Y1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X})}function $(G){return new Y1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X,distinct:!0})}return{select:Z,selectDistinct:$}}select(X){return new Y1({fields:X??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(X){return new Y1({fields:X??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new kX(this.dialectConfig);return this.dialect}};var NX=class{static[J]="SQLiteInsertBuilder";constructor(X,Y,Z,$){this.table=X,this.session=Y,this.dialect=Z,this.withList=$}values(X){if(X=Array.isArray(X)?X:[X],X.length===0)throw Error("values() must be called with at least one value");let Y=X.map((Z)=>{let $={},G=this.table[A.Symbol.Columns];for(let H of Object.keys(Z)){let _=Z[H];$[H]=D(_,x)?_:new c(_,G[H])}return $});return new iX(this.table,Y,this.session,this.dialect,this.withList)}select(X){let Y=typeof X==="function"?X(new ZX):X;if(!D(Y,x)&&!v1(this.table[t],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new iX(this.table,Y,this.session,this.dialect,this.withList,!0)}},iX=class extends r{static[J]="SQLiteInsert";config;constructor(X,Y,Z,$,G,H){super();this.session=Z,this.dialect=$,this.config={table:X,values:Y,withList:G,select:H}}returning(X=this.config.table[f.Symbol.Columns]){return this.config.returning=i(X),this}onConflictDoNothing(X={}){if(!this.config.onConflict)this.config.onConflict=[];if(X.target===void 0)this.config.onConflict.push(W` on conflict do nothing`);else{let Y=Array.isArray(X.target)?W`${X.target}`:W`${[X.target]}`,Z=X.where?W` where ${X.where}`:W``;this.config.onConflict.push(W` on conflict ${Y} do nothing${Z}`)}return this}onConflictDoUpdate(X){if(X.where&&(X.targetWhere||X.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');if(!this.config.onConflict)this.config.onConflict=[];let Y=X.where?W` where ${X.where}`:void 0,Z=X.targetWhere?W` where ${X.targetWhere}`:void 0,$=X.setWhere?W` where ${X.setWhere}`:void 0,G=Array.isArray(X.target)?W`${X.target}`:W`${[X.target]}`,H=this.dialect.buildUpdateSet(this.config.table,HX(this.config.table,X.set));return this.config.onConflict.push(W` on conflict ${G}${Z} do update set ${H}${Y}${$}`),this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:X,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare(X=!0){return this.session[X?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:X1(this.config.table)})}prepare(){return this._prepare(!1)}run=(X)=>{return this._prepare().run(X)};all=(X)=>{return this._prepare().all(X)};get=(X)=>{return this._prepare().get(X)};values=(X)=>{return this._prepare().values(X)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}};var RX=class{static[J]="SQLiteUpdateBuilder";constructor(X,Y,Z,$){this.table=X,this.session=Y,this.dialect=Z,this.withList=$}set(X){return new eZ(this.table,HX(this.table,X),this.session,this.dialect,this.withList)}},eZ=class extends r{static[J]="SQLiteUpdate";config;constructor(X,Y,Z,$,G){super();this.session=Z,this.dialect=$,this.config={set:Y,table:X,withList:G,joins:[]}}from(X){return this.config.from=X,this}createJoin(X){return(Y,Z)=>{let $=h1(Y);if(typeof $==="string"&&this.config.joins.some((G)=>G.alias===$))throw Error(`Alias "${$}" is already used in this query`);if(typeof Z==="function"){let G=this.config.from?D(Y,f)?Y[A.Symbol.Columns]:D(Y,q)?Y._.selectedFields:D(Y,B1)?Y[w].selectedFields:void 0:void 0;Z=Z(new Proxy(this.config.table[A.Symbol.Columns],new m({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),G&&new Proxy(G,new m({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}return this.config.joins.push({on:Z,table:Y,joinType:X,alias:$}),this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where(X){return this.config.where=X,this}orderBy(...X){if(typeof X[0]==="function"){let Y=X[0](new Proxy(this.config.table[A.Symbol.Columns],new m({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),Z=Array.isArray(Y)?Y:[Y];this.config.orderBy=Z}else{let Y=X;this.config.orderBy=Y}return this}limit(X){return this.config.limit=X,this}returning(X=this.config.table[f.Symbol.Columns]){return this.config.returning=i(X),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:X,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare(X=!0){return this.session[X?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:X1(this.config.table)})}prepare(){return this._prepare(!1)}run=(X)=>{return this._prepare().run(X)};all=(X)=>{return this._prepare().all(X)};get=(X)=>{return this._prepare().get(X)};values=(X)=>{return this._prepare().values(X)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}};var wX=class{static[J]="BaseSQLiteDatabase";_query;query;constructor(X,Y,Z,$,G,H,_){this.resultKind=X,this.dialect=Y,this.session=Z,this.rowModeRQB=H,this.forbidJsonb=_,this._=G?{schema:G.schema,fullSchema:G.fullSchema,tableNamesMap:G.tableNamesMap,relations:$}:{schema:void 0,fullSchema:{},tableNamesMap:{},relations:$},this._query={};let z=this._query;if(this._.schema)for(let[O,E]of Object.entries(this._.schema))z[O]=new TZ(X,G.fullSchema,this._.schema,this._.tableNamesMap,G.fullSchema[O],E,Y,Z);this.query={};for(let[O,E]of Object.entries($))this.query[O]=new mZ(X,$,$[E.name].table,E,Y,Z,H,_);this.$cache={invalidate:async(O)=>{}}}$with=(X,Y)=>{let Z=this;return{as:(G)=>{if(typeof G==="function")G=G(new ZX(Z.dialect));return new Proxy(new JX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new m({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count(X,Y){return new SZ({source:X,filters:Y,session:this.session})}with(...X){let Y=this;function Z(z){return new Y1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X})}function $(z){return new Y1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X,distinct:!0})}function G(z){return new RX(z,Y.session,Y.dialect,X)}function H(z){return new NX(z,Y.session,Y.dialect,X)}function _(z){return new MX(z,Y.session,Y.dialect,X)}return{select:Z,selectDistinct:$,update:G,insert:H,delete:_}}select(X){return new Y1({fields:X??void 0,session:this.session,dialect:this.dialect})}selectDistinct(X){return new Y1({fields:X??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update(X){return new RX(X,this.session,this.dialect)}$cache;insert(X){return new NX(X,this.session,this.dialect)}delete(X){return new MX(X,this.session,this.dialect)}run(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new YX(async()=>this.session.run(Y),()=>Y,"run",this.dialect,this.session.extractRawRunValueFromBatchResult.bind(this.session));return this.session.run(Y)}all(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new YX(async()=>this.session.all(Y),()=>Y,"all",this.dialect,this.session.extractRawAllValueFromBatchResult.bind(this.session));return this.session.all(Y)}get(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new YX(async()=>this.session.get(Y),()=>Y,"get",this.dialect,this.session.extractRawGetValueFromBatchResult.bind(this.session));return this.session.get(Y)}values(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new YX(async()=>this.session.values(Y),()=>Y,"values",this.dialect,this.session.extractRawValuesValueFromBatchResult.bind(this.session));return this.session.values(Y)}transaction(X,Y){return this.session.transaction(X,Y)}};var b2=class{static[J]="Cache"},X0=class extends b2{static[J]="NoopCache";strategy(){return"all"}async get(X){}async put(X,Y,Z,$){}async onMutate(X){}};async function lX(X,Y){let Z=`${X}-${JSON.stringify(Y,(H,_)=>typeof _==="bigint"?`${_}n`:_)}`,$=new TextEncoder().encode(Z),G=await crypto.subtle.digest("SHA-256",$);return[...new Uint8Array(G)].map((H)=>H.toString(16).padStart(2,"0")).join("")}var Y0=class extends r{static[J]="ExecuteResultSync";constructor(X){super();this.resultCb=X}async execute(){return this.resultCb()}sync(){return this.resultCb()}},aX=class{static[J]="PreparedQuery";joinsNotNullableMap;constructor(X,Y,Z,$,G,H){if(this.mode=X,this.executeMethod=Y,this.query=Z,this.cache=$,this.queryMetadata=G,this.cacheConfig=H,$&&$.strategy()==="all"&&H===void 0)this.cacheConfig={enabled:!0,autoInvalidate:!0};if(!this.cacheConfig?.enabled)this.cacheConfig=void 0}async queryWithCache(X,Y,Z){if(this.cache===void 0||D(this.cache,X0)||this.queryMetadata===void 0)try{return await Z()}catch($){throw new x1(X,Y,$)}if(this.cacheConfig&&!this.cacheConfig.enabled)try{return await Z()}catch($){throw new x1(X,Y,$)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[$]=await Promise.all([Z(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return $}catch($){throw new x1(X,Y,$)}if(!this.cacheConfig)try{return await Z()}catch($){throw new x1(X,Y,$)}if(this.queryMetadata.type==="select"){let $=await this.cache.get(this.cacheConfig.tag??await lX(X,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if($===void 0){let G;try{G=await Z()}catch(H){throw new x1(X,Y,H)}return await this.cache.put(this.cacheConfig.tag??await lX(X,Y),G,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),G}return $}try{return await Z()}catch($){throw new x1(X,Y,$)}}getQuery(){return this.query}mapRunResult(X,Y){return X}mapAllResult(X,Y){throw Error("Not implemented")}mapGetResult(X,Y){throw Error("Not implemented")}execute(X){if(this.mode==="async")return this[this.executeMethod](X);return new Y0(()=>this[this.executeMethod](X))}mapResult(X,Y){switch(this.executeMethod){case"run":return this.mapRunResult(X,Y);case"all":return this.mapAllResult(X,Y);case"get":return this.mapGetResult(X,Y)}}},eX=class{static[J]="SQLiteSession";constructor(X){this.dialect=X}prepareOneTimeQuery(X,Y,Z,$,G,H,_){return this.prepareQuery(X,Y,Z,$,G,H,_)}prepareOneTimeRelationalQuery(X,Y,Z,$){return this.prepareRelationalQuery(X,Y,Z,$)}run(X){let Y=this.dialect.sqlToQuery(X);try{return this.prepareOneTimeQuery(Y,void 0,"run",!1).run()}catch(Z){throw new W1({cause:Z,message:`Failed to run the query '${Y.sql}'`})}}extractRawRunValueFromBatchResult(X){return X}all(X){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(X),void 0,"run",!1).all()}extractRawAllValueFromBatchResult(X){throw Error("Not implemented")}get(X){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(X),void 0,"run",!1).get()}extractRawGetValueFromBatchResult(X){throw Error("Not implemented")}values(X){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(X),void 0,"run",!1).values()}async count(X){return(await this.values(X))[0][0]}extractRawValuesValueFromBatchResult(X){throw Error("Not implemented")}},XY=class extends wX{static[J]="SQLiteTransaction";constructor(X,Y,Z,$,G,H=0,_,z){super(X,Y,Z,$,G,_,z);this.relations=$,this.schema=G,this.nestedIndex=H}rollback(){throw new qZ}};var ZY=class extends eX{static[J]="SQLiteBunSession";logger;constructor(X,Y,Z,$,G={}){super(Y);this.client=X,this.relations=Z,this.schema=$,this.logger=G.logger??new AY}exec(X){this.client.exec(X)}prepareQuery(X,Y,Z,$,G){return new YY(this.client.prepare(X.sql),X,this.logger,Y,Z,$,G)}prepareRelationalQuery(X,Y,Z,$){return new YY(this.client.prepare(X.sql),X,this.logger,Y,Z,!1,$,!0)}transaction(X,Y={}){let Z=new Z0("sync",this.dialect,this,this.relations,this.schema),$;return this.client.transaction(()=>{$=X(Z)})[Y.behavior??"deferred"](),$}},Z0=class X extends XY{static[J]="SQLiteBunTransaction";transaction(Y){let Z=`sp${this.nestedIndex}`,$=new X("sync",this.dialect,this.session,this.relations,this.schema,this.nestedIndex+1);this.session.run(W.raw(`savepoint ${Z}`));try{let G=Y($);return this.session.run(W.raw(`release savepoint ${Z}`)),G}catch(G){throw this.session.run(W.raw(`rollback to savepoint ${Z}`)),G}}},YY=class extends aX{static[J]="SQLiteBunPreparedQuery";constructor(X,Y,Z,$,G,H,_,z){super("sync",G,Y);this.stmt=X,this.logger=Z,this.fields=$,this._isResponseInArrayMode=H,this.customResultMapper=_,this.isRqbV2Query=z}run(X){let Y=D1(this.query.params,X??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.run(...Y)}all(X){if(this.isRqbV2Query)return this.allRqbV2(X);let{fields:Y,query:Z,logger:$,joinsNotNullableMap:G,stmt:H,customResultMapper:_}=this;if(!Y&&!_){let O=D1(Z.params,X??{});return $.logQuery(Z.sql,O),H.all(...O)}let z=this.values(X);if(_)return _(z);return z.map((O)=>TX(Y,O,G))}get(X){if(this.isRqbV2Query)return this.getRqbV2(X);let Y=D1(this.query.params,X??{});this.logger.logQuery(this.query.sql,Y);let{fields:Z,joinsNotNullableMap:$,customResultMapper:G}=this;if(!Z&&!G){let _=this.stmt.get(...Y);if(!_)return;return _}let H=this.stmt.values(...Y)[0];if(!H)return;if(G)return G([H]);return TX(Z,H,$)}allRqbV2(X){let{query:Y,logger:Z,stmt:$,customResultMapper:G}=this,H=D1(Y.params,X??{});return Z.logQuery(Y.sql,H),G($.all(...H))}getRqbV2(X){let Y=D1(this.query.params,X??{});this.logger.logQuery(this.query.sql,Y);let{stmt:Z,customResultMapper:$}=this,G=Z.get(...Y);if(!G)return;return $([G])}values(X){let Y=D1(this.query.params,X??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.values(...Y)}isResponseInArrayMode(){return this._isResponseInArrayMode}};import{Database as QX}from"bun:sqlite";var $0=class extends wX{static[J]="SQLiteBunDatabase"};function $X(X,Y={}){let Z=new kX({casing:Y.casing}),$;if(Y.logger===!0)$=new UY;else if(Y.logger!==!1)$=Y.logger;let G;if(Y.schema){let z=PZ(Y.schema,BZ);G={fullSchema:Y.schema,schema:z.tables,tableNamesMap:z.tableNamesMap}}let H=Y.relations??{},_=new $0("sync",Z,new ZY(X,Z,H,G,{logger:$}),H,G);return _.$client=X,_}function $Y(...X){if(X[0]===void 0||typeof X[0]==="string")return $X(X[0]===void 0?new QX:new QX(X[0]),X[1]);let{connection:Y,client:Z,...$}=X[0];if(Z)return $X(Z,$);if(typeof Y==="object"){let{source:G,...H}=Y;return $X(new QX(G,Object.values(H).filter((_)=>_!==void 0).length?H:void 0),$)}return $X(new QX(Y),$)}(function(X){function Y(Z){return $X({},Z)}X.mock=Y})($Y||($Y={}));export{J as $l,d2 as am,D as bm,R as cm,r2 as dm,d3 as em,VY as fm,A0 as gm,G1 as hm,t as im,JY as jm,U1 as km,LX as lm,_1 as mm,HY as nm,A as om,l2 as pm,z1 as qm,A1 as rm,q as sm,JX as tm,w as um,J0 as vm,E1 as wm,b as xm,x as ym,C1 as zm,_0 as Am,BX as Bm,q1 as Cm,jX as Dm,z0 as Em,c as Fm,E0 as Gm,W as Hm,l as Im,D0 as Jm,D1 as Km,y as Lm,O0 as Mm,F0 as Nm,TX as Om,i as Pm,v1 as Qm,HX as Rm,OY as Sm,FY as Tm,L3 as Um,B3 as Vm,h1 as Wm,k as Xm,j3 as Ym,SX as Zm,T3 as _m,S3 as $m,C3 as an,CX as bn,qX as cn,V0 as dn,v0 as en,h0 as fn,p as gn,a as hn,p1 as in,u as jn,V1 as kn,I1 as ln,y1 as mn,f1 as nn,b1 as on,d1 as pn,g1 as qn,m1 as rn,c1 as sn,u1 as tn,N1 as un,R1 as vn,r1 as wn,o1 as xn,s1 as yn,t1 as zn,n1 as An,i1 as Bn,hX as Cn,pX as Dn,yX as En,M1 as Fn,l1 as Gn,r as Hn,Q1 as In,CZ as Jn,UX as Kn,k2 as Ln,N2 as Mn,e as Nn,R2 as On,_W as Pn,Z1 as Qn,rX as Rn,e1 as Sn,XX as Tn,W1 as Un,x1 as Vn,qZ as Wn,vZ as Xn,w2 as Yn,Q2 as Zn,P1 as _n,IX as $n,P2 as ao,L2 as bo,B2 as co,L1 as do,hZ as eo,LW as fo,VX as go,j2 as ho,T2 as io,S2 as jo,C2 as ko,pZ as lo,yZ as mo,BW as no,jW as oo,fZ as po,J1 as qo,bZ as ro,dZ as so,oX as to,K1 as uo,mJ as vo,U0 as wo,UY as xo,AY as yo,ZY as zo,Z0 as Ao,YY as Bo,$0 as Co,$Y as Do};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ne as ee}from"./chunk-j0bwa5dk.js";import{tO as Z,wO as L}from"./chunk-r9w0thdk.js";var Te=Z((le)=>{var $=ee(),R=L("https"),Q=L("stream"),N=L("http2");function D(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let o=Error(String(t));return o.name="AbortError",o}let n=Error("Request aborted");return n.name="AbortError",n}var te=["ECONNRESET","EPIPE","ETIMEDOUT"],V=(e)=>{let t={};for(let n in e){let o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},F=1000,oe=(e,t,n=0)=>{if(!n)return-1;let o=(s)=>{let r=d.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-s),c=(u)=>{if(u?.connecting)u.on("connect",()=>{d.clearTimeout(r)});else d.clearTimeout(r)};if(e.socket)c(e.socket);else e.on("socket",c)};if(n<2000)return o(0),0;return d.setTimeout(o.bind(null,F),F)},ne=(e,t,n=0,o,s)=>{if(n)return d.setTimeout(()=>{let r=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){let c=Object.assign(Error(r),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else r+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(r)},n);return-1},se=3000,re=(e,{keepAlive:t,keepAliveMsecs:n},o=se)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,n||0);else e.on("socket",(r)=>{r.setKeepAlive(t,n||0)})};if(o===0)return s(),0;return d.setTimeout(s,o)},W=3000,ie=(e,t,n=0)=>{let o=(s)=>{let r=n-s,c=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(r,c),e.on("close",()=>e.socket?.removeListener("timeout",c));else e.setTimeout(r,c)};if(0<n&&n<6000)return o(0),0;return d.setTimeout(o.bind(null,n===0?0:W),W)},j=6000;async function K(e,t,n=j,o=!1){let s=t.headers,r=s?s.Expect||s.expect:void 0,c=-1,u=!0;if(!o&&r==="100-continue")u=await Promise.race([new Promise((f)=>{c=Number(d.setTimeout(()=>f(!0),Math.max(j,n)))}),new Promise((f)=>{e.on("continue",()=>{d.clearTimeout(c),f(!0)}),e.on("response",()=>{d.clearTimeout(c),f(!1)}),e.on("error",()=>{d.clearTimeout(c),f(!1)})})]);if(u)ce(e,t.body)}function ce(e,t){if(t instanceof Q.Readable){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==="string"){if(n&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var ae=0,_=void 0,q=void 0;class H{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new H(e)}static checkSocketUsage(e,t,n=console){let{sockets:o,requests:s,maxSockets:r}=e;if(typeof r!=="number"||r===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(o&&s)for(let u in o){let f=o[u]?.length??0,l=s[u]?.length??0;if(f>=r&&l>=2*r)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${l} additional requests are enqueued.
2
+ import{Oe as ee}from"./chunk-qdvnscxm.js";import{TP as Z,WP as L}from"./chunk-f2pv705d.js";var Te=Z((le)=>{var $=ee(),R=L("https"),Q=L("stream"),N=L("http2");function D(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let o=Error(String(t));return o.name="AbortError",o}let n=Error("Request aborted");return n.name="AbortError",n}var te=["ECONNRESET","EPIPE","ETIMEDOUT"],V=(e)=>{let t={};for(let n in e){let o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},F=1000,oe=(e,t,n=0)=>{if(!n)return-1;let o=(s)=>{let r=d.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-s),c=(u)=>{if(u?.connecting)u.on("connect",()=>{d.clearTimeout(r)});else d.clearTimeout(r)};if(e.socket)c(e.socket);else e.on("socket",c)};if(n<2000)return o(0),0;return d.setTimeout(o.bind(null,F),F)},ne=(e,t,n=0,o,s)=>{if(n)return d.setTimeout(()=>{let r=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){let c=Object.assign(Error(r),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else r+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(r)},n);return-1},se=3000,re=(e,{keepAlive:t,keepAliveMsecs:n},o=se)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,n||0);else e.on("socket",(r)=>{r.setKeepAlive(t,n||0)})};if(o===0)return s(),0;return d.setTimeout(s,o)},W=3000,ie=(e,t,n=0)=>{let o=(s)=>{let r=n-s,c=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(r,c),e.on("close",()=>e.socket?.removeListener("timeout",c));else e.setTimeout(r,c)};if(0<n&&n<6000)return o(0),0;return d.setTimeout(o.bind(null,n===0?0:W),W)},j=6000;async function K(e,t,n=j,o=!1){let s=t.headers,r=s?s.Expect||s.expect:void 0,c=-1,u=!0;if(!o&&r==="100-continue")u=await Promise.race([new Promise((f)=>{c=Number(d.setTimeout(()=>f(!0),Math.max(j,n)))}),new Promise((f)=>{e.on("continue",()=>{d.clearTimeout(c),f(!0)}),e.on("response",()=>{d.clearTimeout(c),f(!1)}),e.on("error",()=>{d.clearTimeout(c),f(!1)})})]);if(u)ce(e,t.body)}function ce(e,t){if(t instanceof Q.Readable){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==="string"){if(n&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var ae=0,_=void 0,q=void 0;class H{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new H(e)}static checkSocketUsage(e,t,n=console){let{sockets:o,requests:s,maxSockets:r}=e;if(typeof r!=="number"||r===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(o&&s)for(let u in o){let f=o[u]?.length??0,l=s[u]?.length??0;if(f>=r&&l>=2*r)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${l} additional requests are enqueued.
3
3
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
4
  or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(this.resolveDefaultConfig(o))}).catch(n);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config)this.config=await this.configProvider;let o=this.config,s=e.protocol==="https:";if(!s&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((r,c)=>{let u=void 0,f=-1,l=-1,m=-1,p=-1,b=-1,T=()=>{d.clearTimeout(f),d.clearTimeout(l),d.clearTimeout(m),d.clearTimeout(p),d.clearTimeout(b)},O=async(i)=>{await u,T(),r(i)},y=async(i)=>{await u,T(),c(i)};if(t?.aborted){let i=D(t);y(i);return}let x=e.headers,U=x?(x.Expect??x.expect)==="100-continue":!1,C=s?o.httpsAgent:o.httpAgent;if(U&&!this.externalAgent)C=new(s?R.Agent:_)({keepAlive:!1,maxSockets:1/0});f=d.setTimeout(()=>{this.socketWarningTimestamp=H.checkSocketUsage(C,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2000)+(o.connectionTimeout??1000));let P=e.query?$.buildQueryString(e.query):"",S=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",a=e.password??"";S=`${i}:${a}`}let v=e.path;if(P)v+=`?${P}`;if(e.fragment)v+=`#${e.fragment}`;let E=e.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=e.hostname.slice(1,-1);else E=e.hostname;let A={headers:e.headers,host:E,method:e.method,path:v,port:e.port,agent:C,auth:S},h=(s?R.request:q)(A,(i)=>{let a=new $.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:V(i.headers),body:i});O({response:a})});if(h.on("error",(i)=>{if(te.includes(i.code))y(Object.assign(i,{name:"TimeoutError"}));else y(i)}),t){let i=()=>{h.destroy();let a=D(t);y(a)};if(typeof t.addEventListener==="function"){let a=t;a.addEventListener("abort",i,{once:!0}),h.once("close",()=>a.removeEventListener("abort",i))}else t.onabort=i}let k=n??o.requestTimeout;l=oe(h,y,o.connectionTimeout),m=ne(h,y,k,o.throwOnRequestTimeout,o.logger??console),p=ie(h,y,o.socketTimeout);let w=A.agent;if(typeof w==="object"&&"keepAlive"in w)b=re(h,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});u=K(h,e,k,this.externalAgent).catch((i)=>{return T(),c(i)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:s,httpAgent:r,httpsAgent:c,throwOnRequestTimeout:u,logger:f}=e||{},l=!0,m=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:o,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let p=await import("http"),{Agent:b,request:T}=p.default??p;if(q=T,_=b,r instanceof _||typeof r?.destroy==="function")return this.externalAgent=!0,r;return new _({keepAlive:!0,maxSockets:50,...r})},httpsAgent:(()=>{if(c instanceof R.Agent||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new R.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:f}}}var ue=new Uint16Array(1);class I{id=ue[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.destroy()}useCount(){return this.refs}}class J{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new I(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class G{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let n=this.getUrlString(e),o=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let f=o.poll();if(f)return f.retain(),f}let s=new I(this.connect(n)),r=s.deref();if(this.config.maxConcurrency)r.settings({maxConcurrentStreams:this.config.maxConcurrency},(f)=>{if(f)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let c=()=>{this.removeFromPoolAndClose(n,s)},u=()=>{this.removeFromPoolAndCheckedDestroy(n,s)};if(r.on("goaway",c),r.on("error",u),r.on("frameError",u),r.on("close",u),t.requestTimeout)r.setTimeout(t.requestTimeout,u);return o.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),o=new I(this.connect(n)),s=o.deref();s.settings({maxConcurrentStreams:1});let r=()=>{o.destroy()};if(s.on("error",r),s.on("frameError",r),s.on("close",r),t.requestTimeout)s.setTimeout(t.requestTimeout,r);return o.retain(),o}destroy(){for(let[e,t]of this.connectionPools){for(let n of[...t])n.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,n]of this.connectionPools){let o=[];for(let s of n)o.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:o}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new J;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?N.connect(e):N.connect(e,this.connectOptions)}}var{constants:z}=N;class B{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new G({});static create(e){if(typeof e?.handle==="function")return e;return new B(e)}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(o||{})}).catch(n);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:o}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:f,maxConcurrentStreams:l,nodeHttp2ConnectOptions:m}=this.config;if(this.connectionManager.setDisableConcurrentStreams(f??!1),l)this.connectionManager.setMaxConcurrentStreams(l);if(m)this.connectionManager.setNodeHttp2ConnectOptions(m)}let{requestTimeout:s,disableConcurrentStreams:r}=this.config,c=r||o,u=n??s;return new Promise((f,l)=>{let m=!1,p=void 0,b=async(a)=>{await p,f(a)},T=async(a)=>{await p,l(a)};if(t?.aborted){m=!0;let a=D(t);T(a);return}let{hostname:O,method:y,port:x,protocol:U,query:C}=e,P="";if(e.username!=null||e.password!=null){let a=e.username??"",g=e.password??"";P=`${a}:${g}@`}let S=`${U}//${P}${O}${x?`:${x}`:""}`,v={destination:new URL(S)},E={requestTimeout:this.config?.sessionTimeout,isEventStream:o},A=c?this.connectionManager.createIsolatedSession(v,E):this.connectionManager.lease(v,E),M=A.deref(),h=(a)=>{if(c)A.destroy();m=!0,T(a)},k=C?$.buildQueryString(C):"",w=e.path;if(k)w+=`?${k}`;if(e.fragment)w+=`#${e.fragment}`;let i=M.request({...e.headers,[z.HTTP2_HEADER_PATH]:w,[z.HTTP2_HEADER_METHOD]:y});if(u)i.setTimeout(u,()=>{i.close();let a=Error(`Stream timed out because of no activity for ${u} ms`);a.name="TimeoutError",h(a)});if(t){let a=()=>{i.close();let g=D(t);h(g)};if(typeof t.addEventListener==="function"){let g=t;g.addEventListener("abort",a,{once:!0}),i.once("close",()=>g.removeEventListener("abort",a))}else t.onabort=a}i.on("frameError",(a,g,Y)=>{h(Error(`Frame type id ${a} in stream id ${Y} has failed with code ${g}.`))}),i.on("error",h),i.on("aborted",()=>{h(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${i.rstCode}.`))}),i.on("response",(a)=>{let g=new $.HttpResponse({statusCode:a[":status"]??-1,headers:V(a),body:i});if(m=!0,b({response:g}),c)M.close()}),i.on("close",()=>{if(c)A.destroy();else this.connectionManager.release(v,A);if(!m)h(Error("Unexpected error: http2 request did not get a response"))}),p=K(i,e,u)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}class X extends Q.Writable{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e),n()}}var fe=(e)=>{if(de(e))return he(e);return new Promise((t,n)=>{let o=new X;e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.bufferedBytes));t(s)})})},de=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function he(e){let t=[],n=e.getReader(),o=!1,s=0;while(!o){let{done:u,value:f}=await n.read();if(f)t.push(f),s+=f.length;o=u}let r=new Uint8Array(s),c=0;for(let u of t)r.set(u,c),c+=u.length;return r}le.DEFAULT_REQUEST_TIMEOUT=ae;le.NodeHttp2Handler=B;le.NodeHttpHandler=H;le.streamCollector=fe});
5
- export{Te as Je};
5
+ export{Te as Ke};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Pd as y}from"./chunk-da6kggv7.js";import{ae as L}from"./chunk-5w76kdjr.js";import{Bh as w,_g as N}from"./chunk-hjt94wce.js";import"./chunk-w46g7kdq.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-6m9jb0s9.js";import"./chunk-vygkwwjd.js";import{Vk as q,cl as v}from"./chunk-k3dacdp5.js";import"./chunk-99s035f0.js";import{Dl as k,Nl as O,vl as V,wl as A,xl as E}from"./chunk-h9wh48d0.js";import"./chunk-tzb26ntq.js";import"./chunk-mh19kwzw.js";import"./chunk-q3h42a94.js";import"./chunk-hqbbs9dm.js";import"./chunk-9zm6r55d.js";import"./chunk-vcygx6hs.js";import"./chunk-khzzmyk2.js";import"./chunk-y7hgevfv.js";import"./chunk-47k5jy1p.js";import"./chunk-cfhfc86j.js";import"./chunk-ph8hn1wt.js";import"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import"./chunk-dnnkq5y4.js";import"./chunk-t239rvej.js";import"./chunk-yz25607t.js";import"./chunk-7hvf9dgx.js";import"./chunk-wkg3c643.js";import"./chunk-fhqfqd5v.js";import"./chunk-q3nvzhyh.js";import"./chunk-5df5aja0.js";import"./chunk-73r8bjjz.js";import"./chunk-xy0gnpen.js";import"./chunk-ztyy3ga3.js";import"./chunk-mmjgf680.js";import"./chunk-nj1ntakd.js";import"./chunk-cmb62jkt.js";import"./chunk-tkrwcjkr.js";import"./chunk-vdrz2t9c.js";import"./chunk-fr34mnyg.js";import"./chunk-r5zy4za0.js";import"./chunk-tr6rdr6h.js";import{ft as P}from"./chunk-at22twxx.js";import"./chunk-kgptyf7n.js";import"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-55fcmswd.js";import"./chunk-qnvsqnz5.js";import"./chunk-pxm4qvqk.js";import"./chunk-j8fcfhr2.js";import"./chunk-r9w0thdk.js";import{EOL as X}from"os";function U(C){let G=C.match(/^https?:\/\/[^/]+\/share\/([a-zA-Z0-9_-]+)$/);return G?G[1]:null}function M(C,G){try{return new URL(C).origin===new URL(G).origin}catch{return!1}}function S(C){let G=C.find((z)=>z.type==="session");if(!G)return null;let Z=new Map,Q=new Map;for(let z of C)if(z.type==="message")Z.set(z.data.id,z.data);else if(z.type==="part"){if(!Q.has(z.data.messageID))Q.set(z.data.messageID,[]);Q.get(z.data.messageID).push(z.data)}if(Z.size===0)return null;return{info:G.data,messages:Array.from(Z.values()).map((z)=>({info:z,parts:Q.get(z.id)??[]}))}}var m=L({command:"import <file>",describe:"import session data from JSON file or URL",builder:(C)=>{return C.positional("file",{describe:"path to JSON file or share URL",type:"string",demandOption:!0})},handler:async(C)=>{await y(process.cwd(),async()=>{let G;if(C.file.startsWith("http://")||C.file.startsWith("https://")){let J=U(C.file);if(!J){let Y=await w.runPromise(N.Service.use((R)=>R.url()));process.stdout.write(`Invalid URL format. Expected: ${Y}/share/<slug>`),process.stdout.write(X);return}let _=new URL(C.file).origin,$=await w.runPromise(N.Service.use((Y)=>Y.request())),j=M(C.file,$.baseUrl)?$.headers:{},W=$.api.data(J),K=await fetch(`${_}${W}`,{headers:j});if(!K.ok&&W!==`/api/share/${J}/data`)K=await fetch(`${_}/api/share/${J}/data`,{headers:j});if(!K.ok){process.stdout.write(`Failed to fetch share data: ${K.statusText}`),process.stdout.write(X);return}let H=await K.json(),B=S(H);if(!B){process.stdout.write(`Share not found or empty: ${J}`),process.stdout.write(X);return}G=B}else if(G=await P.readJson(C.file).catch(()=>{return}),!G){process.stdout.write(`File not found: ${C.file}`),process.stdout.write(X);return}if(!G){process.stdout.write("Failed to read session data"),process.stdout.write(X);return}let Q=v.Info.parse({...G.info,projectID:O.project.id}),z=v.toRow(Q);k.use((J)=>J.insert(V).values(z).onConflictDoUpdate({target:V.id,set:{project_id:z.project_id}}).run());for(let J of G.messages){let F=q.Info.parse(J.info),{id:_,sessionID:$,...j}=F;k.use((W)=>W.insert(A).values({id:_,session_id:z.id,time_created:F.time?.created??Date.now(),data:j}).onConflictDoNothing().run());for(let W of J.parts){let K=q.Part.parse(W),{id:H,sessionID:B,messageID:Y,...R}=K;k.use((T)=>T.insert(E).values({id:H,message_id:Y,session_id:z.id,data:R}).onConflictDoNothing().run())}}process.stdout.write(`Imported session: ${G.info.id}`),process.stdout.write(X)})}});export{S as transformShareData,M as shouldAttachShareAuthHeaders,U as parseShareUrl,m as ImportCommand};
2
+ import{Qd as y}from"./chunk-yy7r3t3w.js";import{be as L}from"./chunk-f4mnp6xd.js";import{$g as N,Ch as w}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Wk as q,dl as v}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import{El as k,Ol as O,wl as V,xl as A,yl as E}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import{Fu as P}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import"./chunk-f2pv705d.js";import{EOL as X}from"os";function U(C){let G=C.match(/^https?:\/\/[^/]+\/share\/([a-zA-Z0-9_-]+)$/);return G?G[1]:null}function M(C,G){try{return new URL(C).origin===new URL(G).origin}catch{return!1}}function S(C){let G=C.find((z)=>z.type==="session");if(!G)return null;let Z=new Map,Q=new Map;for(let z of C)if(z.type==="message")Z.set(z.data.id,z.data);else if(z.type==="part"){if(!Q.has(z.data.messageID))Q.set(z.data.messageID,[]);Q.get(z.data.messageID).push(z.data)}if(Z.size===0)return null;return{info:G.data,messages:Array.from(Z.values()).map((z)=>({info:z,parts:Q.get(z.id)??[]}))}}var m=L({command:"import <file>",describe:"import session data from JSON file or URL",builder:(C)=>{return C.positional("file",{describe:"path to JSON file or share URL",type:"string",demandOption:!0})},handler:async(C)=>{await y(process.cwd(),async()=>{let G;if(C.file.startsWith("http://")||C.file.startsWith("https://")){let J=U(C.file);if(!J){let Y=await w.runPromise(N.Service.use((R)=>R.url()));process.stdout.write(`Invalid URL format. Expected: ${Y}/share/<slug>`),process.stdout.write(X);return}let _=new URL(C.file).origin,$=await w.runPromise(N.Service.use((Y)=>Y.request())),j=M(C.file,$.baseUrl)?$.headers:{},W=$.api.data(J),K=await fetch(`${_}${W}`,{headers:j});if(!K.ok&&W!==`/api/share/${J}/data`)K=await fetch(`${_}/api/share/${J}/data`,{headers:j});if(!K.ok){process.stdout.write(`Failed to fetch share data: ${K.statusText}`),process.stdout.write(X);return}let H=await K.json(),B=S(H);if(!B){process.stdout.write(`Share not found or empty: ${J}`),process.stdout.write(X);return}G=B}else if(G=await P.readJson(C.file).catch(()=>{return}),!G){process.stdout.write(`File not found: ${C.file}`),process.stdout.write(X);return}if(!G){process.stdout.write("Failed to read session data"),process.stdout.write(X);return}let Q=v.Info.parse({...G.info,projectID:O.project.id}),z=v.toRow(Q);k.use((J)=>J.insert(V).values(z).onConflictDoUpdate({target:V.id,set:{project_id:z.project_id}}).run());for(let J of G.messages){let F=q.Info.parse(J.info),{id:_,sessionID:$,...j}=F;k.use((W)=>W.insert(A).values({id:_,session_id:z.id,time_created:F.time?.created??Date.now(),data:j}).onConflictDoNothing().run());for(let W of J.parts){let K=q.Part.parse(W),{id:H,sessionID:B,messageID:Y,...R}=K;k.use((T)=>T.insert(E).values({id:H,message_id:Y,session_id:z.id,data:R}).onConflictDoNothing().run())}}process.stdout.write(`Imported session: ${G.info.id}`),process.stdout.write(X)})}});export{S as transformShareData,M as shouldAttachShareAuthHeaders,U as parseShareUrl,m as ImportCommand};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{tO as e,wO as d}from"./chunk-r9w0thdk.js";var jq=e((j)=>{var E=j&&j.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(j,"__esModule",{value:!0});j.Minipass=j.isWritable=j.isReadable=j.isStream=void 0;var T=typeof process==="object"&&process?process:{stdout:null,stderr:null},O=d("events"),s=E(d("stream")),qq=d("string_decoder"),zq=(q)=>!!q&&typeof q==="object"&&(q instanceof r||q instanceof s.default||(0,j.isReadable)(q)||(0,j.isWritable)(q));j.isStream=zq;var Qq=(q)=>!!q&&typeof q==="object"&&q instanceof O.EventEmitter&&typeof q.pipe==="function"&&q.pipe!==s.default.Writable.prototype.pipe;j.isReadable=Qq;var Xq=(q)=>!!q&&typeof q==="object"&&q instanceof O.EventEmitter&&typeof q.write==="function"&&typeof q.end==="function";j.isWritable=Xq;var f=Symbol("EOF"),l=Symbol("maybeEmitEnd"),H=Symbol("emittedEnd"),M=Symbol("emittingEnd"),_=Symbol("emittedError"),i=Symbol("closed"),c=Symbol("read"),v=Symbol("flush"),t=Symbol("flushChunk"),x=Symbol("encoding"),Y=Symbol("decoder"),Z=Symbol("flowing"),G=Symbol("paused"),P=Symbol("resume"),$=Symbol("buffer"),y=Symbol("pipes"),V=Symbol("bufferLength"),u=Symbol("bufferPush"),A=Symbol("bufferShift"),w=Symbol("objectMode"),X=Symbol("destroyed"),p=Symbol("error"),S=Symbol("emitData"),o=Symbol("emitEnd"),I=Symbol("emitEnd2"),W=Symbol("async"),N=Symbol("abort"),a=Symbol("aborted"),L=Symbol("signal"),g=Symbol("dataListeners"),m=Symbol("discarded"),C=(q)=>Promise.resolve().then(q),Zq=(q)=>q(),$q=(q)=>q==="end"||q==="finish"||q==="prefinish",Vq=(q)=>q instanceof ArrayBuffer||!!q&&typeof q==="object"&&q.constructor&&q.constructor.name==="ArrayBuffer"&&q.byteLength>=0,Kq=(q)=>!Buffer.isBuffer(q)&&ArrayBuffer.isView(q);class F{src;dest;opts;ondrain;constructor(q,z,Q){this.src=q,this.dest=z,this.opts=Q,this.ondrain=()=>q[P](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(q){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class D extends F{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(q,z,Q){super(q,z,Q);this.proxyErrors=(K)=>this.dest.emit("error",K),q.on("error",this.proxyErrors)}}var wq=(q)=>!!q.objectMode,yq=(q)=>!q.objectMode&&!!q.encoding&&q.encoding!=="buffer";class r extends O.EventEmitter{[Z]=!1;[G]=!1;[y]=[];[$]=[];[w];[x];[W];[Y];[f]=!1;[H]=!1;[M]=!1;[i]=!1;[_]=null;[V]=0;[X]=!1;[L];[a]=!1;[g]=0;[m]=!1;writable=!0;readable=!0;constructor(...q){let z=q[0]||{};super();if(z.objectMode&&typeof z.encoding==="string")throw TypeError("Encoding and objectMode may not be used together");if(wq(z))this[w]=!0,this[x]=null;else if(yq(z))this[x]=z.encoding,this[w]=!1;else this[w]=!1,this[x]=null;if(this[W]=!!z.async,this[Y]=this[x]?new qq.StringDecoder(this[x]):null,z&&z.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[$]});if(z&&z.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[y]});let{signal:Q}=z;if(Q)if(this[L]=Q,Q.aborted)this[N]();else Q.addEventListener("abort",()=>this[N]())}get bufferLength(){return this[V]}get encoding(){return this[x]}set encoding(q){throw Error("Encoding must be set at instantiation time")}setEncoding(q){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[w]}set objectMode(q){throw Error("objectMode must be set at instantiation time")}get["async"](){return this[W]}set["async"](q){this[W]=this[W]||!!q}[N](){this[a]=!0,this.emit("abort",this[L]?.reason),this.destroy(this[L]?.reason)}get aborted(){return this[a]}set aborted(q){}write(q,z,Q){if(this[a])return!1;if(this[f])throw Error("write after end");if(this[X])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof z==="function")Q=z,z="utf8";if(!z)z="utf8";let K=this[W]?C:Zq;if(!this[w]&&!Buffer.isBuffer(q)){if(Kq(q))q=Buffer.from(q.buffer,q.byteOffset,q.byteLength);else if(Vq(q))q=Buffer.from(q);else if(typeof q!=="string")throw Error("Non-contiguous data written to non-objectMode stream")}if(this[w]){if(this[Z]&&this[V]!==0)this[v](!0);if(this[Z])this.emit("data",q);else this[u](q);if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}if(!q.length){if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}if(typeof q==="string"&&!(z===this[x]&&!this[Y]?.lastNeed))q=Buffer.from(q,z);if(Buffer.isBuffer(q)&&this[x])q=this[Y].write(q);if(this[Z]&&this[V]!==0)this[v](!0);if(this[Z])this.emit("data",q);else this[u](q);if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}read(q){if(this[X])return null;if(this[m]=!1,this[V]===0||q===0||q&&q>this[V])return this[l](),null;if(this[w])q=null;if(this[$].length>1&&!this[w])this[$]=[this[x]?this[$].join(""):Buffer.concat(this[$],this[V])];let z=this[c](q||null,this[$][0]);return this[l](),z}[c](q,z){if(this[w])this[A]();else{let Q=z;if(q===Q.length||q===null)this[A]();else if(typeof Q==="string")this[$][0]=Q.slice(q),z=Q.slice(0,q),this[V]-=q;else this[$][0]=Q.subarray(q),z=Q.subarray(0,q),this[V]-=q}if(this.emit("data",z),!this[$].length&&!this[f])this.emit("drain");return z}end(q,z,Q){if(typeof q==="function")Q=q,q=void 0;if(typeof z==="function")Q=z,z="utf8";if(q!==void 0)this.write(q,z);if(Q)this.once("end",Q);if(this[f]=!0,this.writable=!1,this[Z]||!this[G])this[l]();return this}[P](){if(this[X])return;if(!this[g]&&!this[y].length)this[m]=!0;if(this[G]=!1,this[Z]=!0,this.emit("resume"),this[$].length)this[v]();else if(this[f])this[l]();else this.emit("drain")}resume(){return this[P]()}pause(){this[Z]=!1,this[G]=!0,this[m]=!1}get destroyed(){return this[X]}get flowing(){return this[Z]}get paused(){return this[G]}[u](q){if(this[w])this[V]+=1;else this[V]+=q.length;this[$].push(q)}[A](){if(this[w])this[V]-=1;else this[V]-=this[$][0].length;return this[$].shift()}[v](q=!1){do;while(this[t](this[A]())&&this[$].length);if(!q&&!this[$].length&&!this[f])this.emit("drain")}[t](q){return this.emit("data",q),this[Z]}pipe(q,z){if(this[X])return q;this[m]=!1;let Q=this[H];if(z=z||{},q===T.stdout||q===T.stderr)z.end=!1;else z.end=z.end!==!1;if(z.proxyErrors=!!z.proxyErrors,Q){if(z.end)q.end()}else if(this[y].push(!z.proxyErrors?new F(this,q,z):new D(this,q,z)),this[W])C(()=>this[P]());else this[P]();return q}unpipe(q){let z=this[y].find((Q)=>Q.dest===q);if(z){if(this[y].length===1){if(this[Z]&&this[g]===0)this[Z]=!1;this[y]=[]}else this[y].splice(this[y].indexOf(z),1);z.unpipe()}}addListener(q,z){return this.on(q,z)}on(q,z){let Q=super.on(q,z);if(q==="data"){if(this[m]=!1,this[g]++,!this[y].length&&!this[Z])this[P]()}else if(q==="readable"&&this[V]!==0)super.emit("readable");else if($q(q)&&this[H])super.emit(q),this.removeAllListeners(q);else if(q==="error"&&this[_]){let K=z;if(this[W])C(()=>K.call(this,this[_]));else K.call(this,this[_])}return Q}removeListener(q,z){return this.off(q,z)}off(q,z){let Q=super.off(q,z);if(q==="data"){if(this[g]=this.listeners("data").length,this[g]===0&&!this[m]&&!this[y].length)this[Z]=!1}return Q}removeAllListeners(q){let z=super.removeAllListeners(q);if(q==="data"||q===void 0){if(this[g]=0,!this[m]&&!this[y].length)this[Z]=!1}return z}get emittedEnd(){return this[H]}[l](){if(!this[M]&&!this[H]&&!this[X]&&this[$].length===0&&this[f]){if(this[M]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[i])this.emit("close");this[M]=!1}}emit(q,...z){let Q=z[0];if(q!=="error"&&q!=="close"&&q!==X&&this[X])return!1;else if(q==="data")return!this[w]&&!Q?!1:this[W]?(C(()=>this[S](Q)),!0):this[S](Q);else if(q==="end")return this[o]();else if(q==="close"){if(this[i]=!0,!this[H]&&!this[X])return!1;let J=super.emit("close");return this.removeAllListeners("close"),J}else if(q==="error"){this[_]=Q,super.emit(p,Q);let J=!this[L]||this.listeners("error").length?super.emit("error",Q):!1;return this[l](),J}else if(q==="resume"){let J=super.emit("resume");return this[l](),J}else if(q==="finish"||q==="prefinish"){let J=super.emit(q);return this.removeAllListeners(q),J}let K=super.emit(q,...z);return this[l](),K}[S](q){for(let Q of this[y])if(Q.dest.write(q)===!1)this.pause();let z=this[m]?!1:super.emit("data",q);return this[l](),z}[o](){if(this[H])return!1;return this[H]=!0,this.readable=!1,this[W]?(C(()=>this[I]()),!0):this[I]()}[I](){if(this[Y]){let z=this[Y].end();if(z){for(let Q of this[y])Q.dest.write(z);if(!this[m])super.emit("data",z)}}for(let z of this[y])z.end();let q=super.emit("end");return this.removeAllListeners("end"),q}async collect(){let q=Object.assign([],{dataLength:0});if(!this[w])q.dataLength=0;let z=this.promise();return this.on("data",(Q)=>{if(q.push(Q),!this[w])q.dataLength+=Q.length}),await z,q}async concat(){if(this[w])throw Error("cannot concat in objectMode");let q=await this.collect();return this[x]?q.join(""):Buffer.concat(q,q.dataLength)}async promise(){return new Promise((q,z)=>{this.on(X,()=>z(Error("stream destroyed"))),this.on("error",(Q)=>z(Q)),this.on("end",()=>q())})}[Symbol.asyncIterator](){this[m]=!1;let q=!1,z=async()=>{return this.pause(),q=!0,{value:void 0,done:!0}};return{next:()=>{if(q)return z();let K=this.read();if(K!==null)return Promise.resolve({done:!1,value:K});if(this[f])return z();let J,R,U=(b)=>{this.off("data",B),this.off("end",h),this.off(X,k),z(),R(b)},B=(b)=>{this.off("error",U),this.off("end",h),this.off(X,k),this.pause(),J({value:b,done:!!this[f]})},h=()=>{this.off("error",U),this.off("data",B),this.off(X,k),z(),J({done:!0,value:void 0})},k=()=>U(Error("stream destroyed"));return new Promise((b,n)=>{R=n,J=b,this.once(X,k),this.once("error",U),this.once("end",h),this.once("data",B)})},throw:z,return:z,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[m]=!1;let q=!1,z=()=>{return this.pause(),this.off(p,z),this.off(X,z),this.off("end",z),q=!0,{done:!0,value:void 0}},Q=()=>{if(q)return z();let K=this.read();return K===null?z():{done:!1,value:K}};return this.once("end",z),this.once(p,z),this.once(X,z),{next:Q,throw:z,return:z,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(q){if(this[X]){if(q)this.emit("error",q);else this.emit(X);return this}this[X]=!0,this[m]=!0,this[$].length=0,this[V]=0;let z=this;if(typeof z.close==="function"&&!this[i])z.close();if(q)this.emit("error",q);else this.emit(X);return this}static get isStream(){return j.isStream}}j.Minipass=r});
3
- export{jq as Pf};
2
+ import{TP as e,WP as d}from"./chunk-f2pv705d.js";var jq=e((j)=>{var E=j&&j.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(j,"__esModule",{value:!0});j.Minipass=j.isWritable=j.isReadable=j.isStream=void 0;var T=typeof process==="object"&&process?process:{stdout:null,stderr:null},O=d("events"),s=E(d("stream")),qq=d("string_decoder"),zq=(q)=>!!q&&typeof q==="object"&&(q instanceof r||q instanceof s.default||(0,j.isReadable)(q)||(0,j.isWritable)(q));j.isStream=zq;var Qq=(q)=>!!q&&typeof q==="object"&&q instanceof O.EventEmitter&&typeof q.pipe==="function"&&q.pipe!==s.default.Writable.prototype.pipe;j.isReadable=Qq;var Xq=(q)=>!!q&&typeof q==="object"&&q instanceof O.EventEmitter&&typeof q.write==="function"&&typeof q.end==="function";j.isWritable=Xq;var f=Symbol("EOF"),l=Symbol("maybeEmitEnd"),H=Symbol("emittedEnd"),M=Symbol("emittingEnd"),_=Symbol("emittedError"),i=Symbol("closed"),c=Symbol("read"),v=Symbol("flush"),t=Symbol("flushChunk"),x=Symbol("encoding"),Y=Symbol("decoder"),Z=Symbol("flowing"),G=Symbol("paused"),P=Symbol("resume"),$=Symbol("buffer"),y=Symbol("pipes"),V=Symbol("bufferLength"),u=Symbol("bufferPush"),A=Symbol("bufferShift"),w=Symbol("objectMode"),X=Symbol("destroyed"),p=Symbol("error"),S=Symbol("emitData"),o=Symbol("emitEnd"),I=Symbol("emitEnd2"),W=Symbol("async"),N=Symbol("abort"),a=Symbol("aborted"),L=Symbol("signal"),g=Symbol("dataListeners"),m=Symbol("discarded"),C=(q)=>Promise.resolve().then(q),Zq=(q)=>q(),$q=(q)=>q==="end"||q==="finish"||q==="prefinish",Vq=(q)=>q instanceof ArrayBuffer||!!q&&typeof q==="object"&&q.constructor&&q.constructor.name==="ArrayBuffer"&&q.byteLength>=0,Kq=(q)=>!Buffer.isBuffer(q)&&ArrayBuffer.isView(q);class F{src;dest;opts;ondrain;constructor(q,z,Q){this.src=q,this.dest=z,this.opts=Q,this.ondrain=()=>q[P](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(q){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class D extends F{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(q,z,Q){super(q,z,Q);this.proxyErrors=(K)=>this.dest.emit("error",K),q.on("error",this.proxyErrors)}}var wq=(q)=>!!q.objectMode,yq=(q)=>!q.objectMode&&!!q.encoding&&q.encoding!=="buffer";class r extends O.EventEmitter{[Z]=!1;[G]=!1;[y]=[];[$]=[];[w];[x];[W];[Y];[f]=!1;[H]=!1;[M]=!1;[i]=!1;[_]=null;[V]=0;[X]=!1;[L];[a]=!1;[g]=0;[m]=!1;writable=!0;readable=!0;constructor(...q){let z=q[0]||{};super();if(z.objectMode&&typeof z.encoding==="string")throw TypeError("Encoding and objectMode may not be used together");if(wq(z))this[w]=!0,this[x]=null;else if(yq(z))this[x]=z.encoding,this[w]=!1;else this[w]=!1,this[x]=null;if(this[W]=!!z.async,this[Y]=this[x]?new qq.StringDecoder(this[x]):null,z&&z.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[$]});if(z&&z.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[y]});let{signal:Q}=z;if(Q)if(this[L]=Q,Q.aborted)this[N]();else Q.addEventListener("abort",()=>this[N]())}get bufferLength(){return this[V]}get encoding(){return this[x]}set encoding(q){throw Error("Encoding must be set at instantiation time")}setEncoding(q){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[w]}set objectMode(q){throw Error("objectMode must be set at instantiation time")}get["async"](){return this[W]}set["async"](q){this[W]=this[W]||!!q}[N](){this[a]=!0,this.emit("abort",this[L]?.reason),this.destroy(this[L]?.reason)}get aborted(){return this[a]}set aborted(q){}write(q,z,Q){if(this[a])return!1;if(this[f])throw Error("write after end");if(this[X])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof z==="function")Q=z,z="utf8";if(!z)z="utf8";let K=this[W]?C:Zq;if(!this[w]&&!Buffer.isBuffer(q)){if(Kq(q))q=Buffer.from(q.buffer,q.byteOffset,q.byteLength);else if(Vq(q))q=Buffer.from(q);else if(typeof q!=="string")throw Error("Non-contiguous data written to non-objectMode stream")}if(this[w]){if(this[Z]&&this[V]!==0)this[v](!0);if(this[Z])this.emit("data",q);else this[u](q);if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}if(!q.length){if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}if(typeof q==="string"&&!(z===this[x]&&!this[Y]?.lastNeed))q=Buffer.from(q,z);if(Buffer.isBuffer(q)&&this[x])q=this[Y].write(q);if(this[Z]&&this[V]!==0)this[v](!0);if(this[Z])this.emit("data",q);else this[u](q);if(this[V]!==0)this.emit("readable");if(Q)K(Q);return this[Z]}read(q){if(this[X])return null;if(this[m]=!1,this[V]===0||q===0||q&&q>this[V])return this[l](),null;if(this[w])q=null;if(this[$].length>1&&!this[w])this[$]=[this[x]?this[$].join(""):Buffer.concat(this[$],this[V])];let z=this[c](q||null,this[$][0]);return this[l](),z}[c](q,z){if(this[w])this[A]();else{let Q=z;if(q===Q.length||q===null)this[A]();else if(typeof Q==="string")this[$][0]=Q.slice(q),z=Q.slice(0,q),this[V]-=q;else this[$][0]=Q.subarray(q),z=Q.subarray(0,q),this[V]-=q}if(this.emit("data",z),!this[$].length&&!this[f])this.emit("drain");return z}end(q,z,Q){if(typeof q==="function")Q=q,q=void 0;if(typeof z==="function")Q=z,z="utf8";if(q!==void 0)this.write(q,z);if(Q)this.once("end",Q);if(this[f]=!0,this.writable=!1,this[Z]||!this[G])this[l]();return this}[P](){if(this[X])return;if(!this[g]&&!this[y].length)this[m]=!0;if(this[G]=!1,this[Z]=!0,this.emit("resume"),this[$].length)this[v]();else if(this[f])this[l]();else this.emit("drain")}resume(){return this[P]()}pause(){this[Z]=!1,this[G]=!0,this[m]=!1}get destroyed(){return this[X]}get flowing(){return this[Z]}get paused(){return this[G]}[u](q){if(this[w])this[V]+=1;else this[V]+=q.length;this[$].push(q)}[A](){if(this[w])this[V]-=1;else this[V]-=this[$][0].length;return this[$].shift()}[v](q=!1){do;while(this[t](this[A]())&&this[$].length);if(!q&&!this[$].length&&!this[f])this.emit("drain")}[t](q){return this.emit("data",q),this[Z]}pipe(q,z){if(this[X])return q;this[m]=!1;let Q=this[H];if(z=z||{},q===T.stdout||q===T.stderr)z.end=!1;else z.end=z.end!==!1;if(z.proxyErrors=!!z.proxyErrors,Q){if(z.end)q.end()}else if(this[y].push(!z.proxyErrors?new F(this,q,z):new D(this,q,z)),this[W])C(()=>this[P]());else this[P]();return q}unpipe(q){let z=this[y].find((Q)=>Q.dest===q);if(z){if(this[y].length===1){if(this[Z]&&this[g]===0)this[Z]=!1;this[y]=[]}else this[y].splice(this[y].indexOf(z),1);z.unpipe()}}addListener(q,z){return this.on(q,z)}on(q,z){let Q=super.on(q,z);if(q==="data"){if(this[m]=!1,this[g]++,!this[y].length&&!this[Z])this[P]()}else if(q==="readable"&&this[V]!==0)super.emit("readable");else if($q(q)&&this[H])super.emit(q),this.removeAllListeners(q);else if(q==="error"&&this[_]){let K=z;if(this[W])C(()=>K.call(this,this[_]));else K.call(this,this[_])}return Q}removeListener(q,z){return this.off(q,z)}off(q,z){let Q=super.off(q,z);if(q==="data"){if(this[g]=this.listeners("data").length,this[g]===0&&!this[m]&&!this[y].length)this[Z]=!1}return Q}removeAllListeners(q){let z=super.removeAllListeners(q);if(q==="data"||q===void 0){if(this[g]=0,!this[m]&&!this[y].length)this[Z]=!1}return z}get emittedEnd(){return this[H]}[l](){if(!this[M]&&!this[H]&&!this[X]&&this[$].length===0&&this[f]){if(this[M]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[i])this.emit("close");this[M]=!1}}emit(q,...z){let Q=z[0];if(q!=="error"&&q!=="close"&&q!==X&&this[X])return!1;else if(q==="data")return!this[w]&&!Q?!1:this[W]?(C(()=>this[S](Q)),!0):this[S](Q);else if(q==="end")return this[o]();else if(q==="close"){if(this[i]=!0,!this[H]&&!this[X])return!1;let J=super.emit("close");return this.removeAllListeners("close"),J}else if(q==="error"){this[_]=Q,super.emit(p,Q);let J=!this[L]||this.listeners("error").length?super.emit("error",Q):!1;return this[l](),J}else if(q==="resume"){let J=super.emit("resume");return this[l](),J}else if(q==="finish"||q==="prefinish"){let J=super.emit(q);return this.removeAllListeners(q),J}let K=super.emit(q,...z);return this[l](),K}[S](q){for(let Q of this[y])if(Q.dest.write(q)===!1)this.pause();let z=this[m]?!1:super.emit("data",q);return this[l](),z}[o](){if(this[H])return!1;return this[H]=!0,this.readable=!1,this[W]?(C(()=>this[I]()),!0):this[I]()}[I](){if(this[Y]){let z=this[Y].end();if(z){for(let Q of this[y])Q.dest.write(z);if(!this[m])super.emit("data",z)}}for(let z of this[y])z.end();let q=super.emit("end");return this.removeAllListeners("end"),q}async collect(){let q=Object.assign([],{dataLength:0});if(!this[w])q.dataLength=0;let z=this.promise();return this.on("data",(Q)=>{if(q.push(Q),!this[w])q.dataLength+=Q.length}),await z,q}async concat(){if(this[w])throw Error("cannot concat in objectMode");let q=await this.collect();return this[x]?q.join(""):Buffer.concat(q,q.dataLength)}async promise(){return new Promise((q,z)=>{this.on(X,()=>z(Error("stream destroyed"))),this.on("error",(Q)=>z(Q)),this.on("end",()=>q())})}[Symbol.asyncIterator](){this[m]=!1;let q=!1,z=async()=>{return this.pause(),q=!0,{value:void 0,done:!0}};return{next:()=>{if(q)return z();let K=this.read();if(K!==null)return Promise.resolve({done:!1,value:K});if(this[f])return z();let J,R,U=(b)=>{this.off("data",B),this.off("end",h),this.off(X,k),z(),R(b)},B=(b)=>{this.off("error",U),this.off("end",h),this.off(X,k),this.pause(),J({value:b,done:!!this[f]})},h=()=>{this.off("error",U),this.off("data",B),this.off(X,k),z(),J({done:!0,value:void 0})},k=()=>U(Error("stream destroyed"));return new Promise((b,n)=>{R=n,J=b,this.once(X,k),this.once("error",U),this.once("end",h),this.once("data",B)})},throw:z,return:z,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[m]=!1;let q=!1,z=()=>{return this.pause(),this.off(p,z),this.off(X,z),this.off("end",z),q=!0,{done:!0,value:void 0}},Q=()=>{if(q)return z();let K=this.read();return K===null?z():{done:!1,value:K}};return this.once("end",z),this.once(p,z),this.once(X,z),{next:Q,throw:z,return:z,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(q){if(this[X]){if(q)this.emit("error",q);else this.emit(X);return this}this[X]=!0,this[m]=!0,this[$].length=0,this[V]=0;let z=this;if(typeof z.close==="function"&&!this[i])z.close();if(q)this.emit("error",q);else this.emit(X);return this}static get isStream(){return j.isStream}}j.Minipass=r});
3
+ export{jq as Qf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$s as h,Xs as e,Ys as f,Zs as g,at as i,bt as j,ct as k,dt as l,ft as m,gt as n}from"./chunk-ts2k13g0.js";import{lt as d}from"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import{Yt as c}from"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import{uu as b}from"./chunk-mbbxedsq.js";import{Fu as a}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-f2pv705d.js";export{h as getEnvInfo,c as Wildcard,n as Token,m as Rpc,d as Process,b as Log,l as Lock,k as Locale,j as LocalContext,i as Keybind,a as Filesystem,g as EffectUtil,f as Color,e as Archive};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Af as f,vf as a,wf as b,xf as c,yf as d,zf as e}from"./chunk-gdj7mqrd.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";export{f as createOpenAICompatible,e as VERSION,d as OpenAICompatibleImageModel,c as OpenAICompatibleEmbeddingModel,b as OpenAICompatibleCompletionLanguageModel,a as OpenAICompatibleChatLanguageModel};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ee as Qb}from"./chunk-dnsh1v42.js";import{Ie as Sb}from"./chunk-gszvgz76.js";import{Je as Rb}from"./chunk-68v3b6ns.js";import{Ke as Nb,Le as Ob,Me as Pb}from"./chunk-bne5w117.js";import{Ne as Mb}from"./chunk-j0bwa5dk.js";import{Ff as Eb,Gf as Hb,Hf as Jb,If as Kb,Jf as Lb}from"./chunk-2drzgtv3.js";import"./chunk-r9w0thdk.js";var x=Pb(),U=Ob(),u=Hb(),v=Jb(),L=Kb(),V=Mb(),P=Nb(),Z=Eb(),_=Qb(),M=Lb(),i=Rb(),Tb=Sb(),Ub=async(b,h,j)=>{return{operation:u.getSmithyContext(h).operation,region:await u.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Vb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:b.region},propertiesExtractor:(h,j)=>({signingProperties:{config:h,context:j}})}}function e(b){return{schemeId:"smithy.api#noAuth"}}var Wb=(b)=>{let h=[];switch(b.operation){case"GetCredentialsForIdentity":{h.push(e());break}case"GetId":{h.push(e());break}default:h.push(Vb(b))}return h},Xb=(b)=>{let h=_.resolveAwsSdkSigV4Config(b);return Object.assign(h,{authSchemePreference:u.normalizeProvider(b.authSchemePreference??[])})},Yb=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"})},n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zb="3.997.14",_b={version:Zb},Q="ref",K=-1,S=!0,m="isSet",bb="PartitionResult",T="booleanEquals",X="getAttr",N="stringEquals",d={[Q]:"Endpoint"},Y={[Q]:bb},O={[Q]:"Region"},A={},o=[O],t={conditions:[[m,[d]],[m,o],["aws.partition",o,bb],[T,[{[Q]:"UseFIPS"},S]],[T,[{fn:X,argv:[Y,"supportsFIPS"]},S]],[T,[{[Q]:"UseDualStack"},S]],[T,[{fn:X,argv:[Y,"supportsDualStack"]},S]],[N,[{fn:X,argv:[Y,"name"]},"aws"]],[N,[O,"us-east-1"]],[N,[O,"us-east-2"]],[N,[O,"us-west-1"]],[N,[O,"us-west-2"]]],results:[[K],[K,"Invalid Configuration: FIPS and custom endpoint are not supported"],[K,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[d,A],["https://cognito-identity-fips.us-east-1.amazonaws.com",A],["https://cognito-identity-fips.us-east-2.amazonaws.com",A],["https://cognito-identity-fips.us-west-1.amazonaws.com",A],["https://cognito-identity-fips.us-west-2.amazonaws.com",A],["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",A],[K,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-identity.{Region}.amazonaws.com",A],["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",A],[K,"Invalid Configuration: Missing Region"]]},$b=2,p=1e8,sb=new Int32Array([-1,1,-1,0,17,3,1,4,p+16,2,5,p+16,3,9,6,5,7,p+15,6,8,p+14,7,p+12,p+13,4,11,10,5,p+9,p+11,5,12,p+10,6,13,p+9,8,p+4,14,9,p+5,15,10,p+6,16,11,p+7,p+8,3,p+1,18,5,p+2,p+3]),Fb=L.BinaryDecisionDiagram.from(sb,$b,t.conditions,t.results),cb=new L.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fb=(b,h={})=>{return cb.get(b,()=>L.decideEndpoint(Fb,{endpointParams:b,logger:h.logger}))};L.customEndpointFunctions.aws=x.awsEndpointFunctions;class z extends u.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,z.prototype)}}class $ extends z{name="ExternalServiceException";$fault="client";constructor(b){super({name:"ExternalServiceException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}class s extends z{name="InternalErrorException";$fault="server";constructor(b){super({name:"InternalErrorException",$fault:"server",...b});Object.setPrototypeOf(this,s.prototype)}}class F extends z{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(b){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...b});Object.setPrototypeOf(this,F.prototype)}}class c extends z{name="InvalidParameterException";$fault="client";constructor(b){super({name:"InvalidParameterException",$fault:"client",...b});Object.setPrototypeOf(this,c.prototype)}}class f extends z{name="NotAuthorizedException";$fault="client";constructor(b){super({name:"NotAuthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,f.prototype)}}class l extends z{name="ResourceConflictException";$fault="client";constructor(b){super({name:"ResourceConflictException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class G extends z{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,G.prototype)}}class r extends z{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,r.prototype)}}class y extends z{name="LimitExceededException";$fault="client";constructor(b){super({name:"LimitExceededException",$fault:"client",...b});Object.setPrototypeOf(this,y.prototype)}}var lb="AccountId",Gb="AccessKeyId",hb="Credentials",rb="CustomRoleArn",yb="Expiration",gb="ExternalServiceException",Ib="GetCredentialsForIdentity",ab="GetCredentialsForIdentityInput",Cb="GetCredentialsForIdentityResponse",ib="GetId",eb="GetIdInput",mb="GetIdResponse",db="InternalErrorException",g="IdentityId",ob="InvalidIdentityPoolConfigurationException",tb="InvalidParameterException",nb="IdentityPoolId",bh="IdentityProviderToken",jb="Logins",hh="LimitExceededException",jh="LoginsMap",kh="NotAuthorizedException",ph="ResourceConflictException",qh="ResourceNotFoundException",uh="SecretKey",vh="SecretKeyString",wh="SessionToken",xh="TooManyRequestsException",H="client",D="error",J="httpError",E="message",kb="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",zh="server",k="com.amazonaws.cognitoidentity",pb=Z.TypeRegistry.for(kb),Ah=[-3,kb,"CognitoIdentityServiceException",0,[],[]];pb.registerError(Ah,z);var B=Z.TypeRegistry.for(k),Bh=[-3,k,gb,{[D]:H,[J]:400},[E],[0]];B.registerError(Bh,$);var Dh=[-3,k,db,{[D]:zh},[E],[0]];B.registerError(Dh,s);var Eh=[-3,k,ob,{[D]:H,[J]:400},[E],[0]];B.registerError(Eh,F);var Hh=[-3,k,tb,{[D]:H,[J]:400},[E],[0]];B.registerError(Hh,c);var Jh=[-3,k,hh,{[D]:H,[J]:400},[E],[0]];B.registerError(Jh,y);var Kh=[-3,k,kh,{[D]:H,[J]:403},[E],[0]];B.registerError(Kh,f);var Lh=[-3,k,ph,{[D]:H,[J]:409},[E],[0]];B.registerError(Lh,l);var Mh=[-3,k,qh,{[D]:H,[J]:404},[E],[0]];B.registerError(Mh,G);var Nh=[-3,k,xh,{[D]:H,[J]:429},[E],[0]];B.registerError(Nh,r);var Oh=[pb,B],Ph=[0,k,bh,8,0],Qh=[0,k,vh,8,0],Rh=[3,k,hb,0,[Gb,uh,wh,yb],[0,[()=>Qh,0],0,4]],Sh=[3,k,ab,0,[g,jb,rb],[0,[()=>qb,0],0],1],Th=[3,k,Cb,0,[g,hb],[0,[()=>Rh,0]]],Uh=[3,k,eb,0,[nb,lb,jb],[0,0,[()=>qb,0]],1],Vh=[3,k,mb,0,[g],[0]],qb=[2,k,jh,0,[0,0],[()=>Ph,0]],Wh=[9,k,Ib,0,()=>Sh,()=>Th],Xh=[9,k,ib,0,()=>Uh,()=>Vh],Yh=(b)=>{return{apiVersion:"2014-06-30",base64Decoder:b?.base64Decoder??M.fromBase64,base64Encoder:b?.base64Encoder??M.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??fb,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??Wb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new _.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.NoAuthSigner}],logger:b?.logger??new u.NoOpLogger,protocol:b?.protocol??Tb.AwsJson1_1Protocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",errorTypeRegistries:Oh,xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:b?.serviceId??"Cognito Identity",urlParser:b?.urlParser??V.parseUrl,utf8Decoder:b?.utf8Decoder??M.fromUtf8,utf8Encoder:b?.utf8Encoder??M.toUtf8}},Zh=(b)=>{u.emitWarningIfUnsupportedVersion(process.version);let h=v.resolveDefaultsModeConfig(b),j=()=>h().then(u.loadConfigsForDefaultMode),w=Yh(b);x.emitWarningIfUnsupportedVersion(process.version);let q={profile:b?.profile,logger:w.logger};return{...w,...b,runtime:"node",defaultsMode:h,authSchemePreference:b?.authSchemePreference??v.loadConfig(_.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,q),bodyLengthChecker:b?.bodyLengthChecker??M.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??x.createDefaultUserAgentProvider({serviceId:w.serviceId,clientVersion:_b.version}),maxAttempts:b?.maxAttempts??v.loadConfig(P.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??v.loadConfig(v.NODE_REGION_CONFIG_OPTIONS,{...v.NODE_REGION_CONFIG_FILE_OPTIONS,...q}),requestHandler:i.NodeHttpHandler.create(b?.requestHandler??j),retryMode:b?.retryMode??v.loadConfig({...P.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await j()).retryMode||P.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??M.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??i.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??v.loadConfig(v.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,q),useFipsEndpoint:b?.useFipsEndpoint??v.loadConfig(v.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,q),userAgentAppId:b?.userAgentAppId??v.loadConfig(x.NODE_APP_ID_CONFIG_OPTIONS,q)}},_h=(b)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:j,credentials:w}=b;return{setHttpAuthScheme(q){let R=h.findIndex((W)=>W.schemeId===q.schemeId);if(R===-1)h.push(q);else h.splice(R,1,q)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider(q){j=q},httpAuthSchemeProvider(){return j},setCredentials(q){w=q},credentials(){return w}}},$h=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},sh=(b,h)=>{let j=Object.assign(x.getAwsRegionExtensionConfiguration(b),u.getDefaultExtensionConfiguration(b),V.getHttpHandlerExtensionConfiguration(b),_h(b));return h.forEach((w)=>w.configure(j)),Object.assign(b,x.resolveAwsRegionExtensionConfiguration(j),u.resolveDefaultRuntimeConfig(j),V.resolveHttpHandlerRuntimeConfig(j),$h(j))};class I extends u.Client{config;constructor(...[b]){let h=Zh(b||{});super(h);this.initConfig=h;let j=Yb(h),w=x.resolveUserAgentConfig(j),q=P.resolveRetryConfig(w),R=v.resolveRegionConfig(q),W=x.resolveHostHeaderConfig(R),zb=L.resolveEndpointConfig(W),Ab=Xb(zb),Bb=sh(Ab,b?.extensions||[]);this.config=Bb,this.middlewareStack.use(Z.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(x.getUserAgentPlugin(this.config)),this.middlewareStack.use(P.getRetryPlugin(this.config)),this.middlewareStack.use(V.getContentLengthPlugin(this.config)),this.middlewareStack.use(x.getHostHeaderPlugin(this.config)),this.middlewareStack.use(x.getLoggerPlugin(this.config)),this.middlewareStack.use(x.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(U.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ub,identityProviderConfigProvider:async(Db)=>new U.DefaultIdentityProviderConfig({"aws.auth#sigv4":Db.credentials})})),this.middlewareStack.use(U.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class a extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Wh).build(){}class C extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Xh).build(){}var Fh={GetCredentialsForIdentityCommand:a,GetIdCommand:C};class ub extends I{}u.createAggregatedClient(Fh,ub);var{Command:ch,Client:fh}=u;var vb=I;var wb=a;var xb=C;export{xb as GetIdCommand,wb as GetCredentialsForIdentityCommand,vb as CognitoIdentityClient};
2
+ import{Fe as Qb}from"./chunk-n4qxj391.js";import{Je as Sb}from"./chunk-twd6r7nf.js";import{Ke as Rb}from"./chunk-3xdmxm5t.js";import{Le as Nb,Me as Ob,Ne as Pb}from"./chunk-9xxnwb33.js";import{Oe as Mb}from"./chunk-qdvnscxm.js";import{Gf as Eb,Hf as Hb,If as Jb,Jf as Kb,Kf as Lb}from"./chunk-yxttz5z5.js";import"./chunk-f2pv705d.js";var x=Pb(),U=Ob(),u=Hb(),v=Jb(),L=Kb(),V=Mb(),P=Nb(),Z=Eb(),_=Qb(),M=Lb(),i=Rb(),Tb=Sb(),Ub=async(b,h,j)=>{return{operation:u.getSmithyContext(h).operation,region:await u.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Vb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:b.region},propertiesExtractor:(h,j)=>({signingProperties:{config:h,context:j}})}}function e(b){return{schemeId:"smithy.api#noAuth"}}var Wb=(b)=>{let h=[];switch(b.operation){case"GetCredentialsForIdentity":{h.push(e());break}case"GetId":{h.push(e());break}default:h.push(Vb(b))}return h},Xb=(b)=>{let h=_.resolveAwsSdkSigV4Config(b);return Object.assign(h,{authSchemePreference:u.normalizeProvider(b.authSchemePreference??[])})},Yb=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"})},n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zb="3.997.14",_b={version:Zb},Q="ref",K=-1,S=!0,m="isSet",bb="PartitionResult",T="booleanEquals",X="getAttr",N="stringEquals",d={[Q]:"Endpoint"},Y={[Q]:bb},O={[Q]:"Region"},A={},o=[O],t={conditions:[[m,[d]],[m,o],["aws.partition",o,bb],[T,[{[Q]:"UseFIPS"},S]],[T,[{fn:X,argv:[Y,"supportsFIPS"]},S]],[T,[{[Q]:"UseDualStack"},S]],[T,[{fn:X,argv:[Y,"supportsDualStack"]},S]],[N,[{fn:X,argv:[Y,"name"]},"aws"]],[N,[O,"us-east-1"]],[N,[O,"us-east-2"]],[N,[O,"us-west-1"]],[N,[O,"us-west-2"]]],results:[[K],[K,"Invalid Configuration: FIPS and custom endpoint are not supported"],[K,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[d,A],["https://cognito-identity-fips.us-east-1.amazonaws.com",A],["https://cognito-identity-fips.us-east-2.amazonaws.com",A],["https://cognito-identity-fips.us-west-1.amazonaws.com",A],["https://cognito-identity-fips.us-west-2.amazonaws.com",A],["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",A],[K,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-identity.{Region}.amazonaws.com",A],["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",A],[K,"Invalid Configuration: Missing Region"]]},$b=2,p=1e8,sb=new Int32Array([-1,1,-1,0,17,3,1,4,p+16,2,5,p+16,3,9,6,5,7,p+15,6,8,p+14,7,p+12,p+13,4,11,10,5,p+9,p+11,5,12,p+10,6,13,p+9,8,p+4,14,9,p+5,15,10,p+6,16,11,p+7,p+8,3,p+1,18,5,p+2,p+3]),Fb=L.BinaryDecisionDiagram.from(sb,$b,t.conditions,t.results),cb=new L.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fb=(b,h={})=>{return cb.get(b,()=>L.decideEndpoint(Fb,{endpointParams:b,logger:h.logger}))};L.customEndpointFunctions.aws=x.awsEndpointFunctions;class z extends u.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,z.prototype)}}class $ extends z{name="ExternalServiceException";$fault="client";constructor(b){super({name:"ExternalServiceException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}class s extends z{name="InternalErrorException";$fault="server";constructor(b){super({name:"InternalErrorException",$fault:"server",...b});Object.setPrototypeOf(this,s.prototype)}}class F extends z{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(b){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...b});Object.setPrototypeOf(this,F.prototype)}}class c extends z{name="InvalidParameterException";$fault="client";constructor(b){super({name:"InvalidParameterException",$fault:"client",...b});Object.setPrototypeOf(this,c.prototype)}}class f extends z{name="NotAuthorizedException";$fault="client";constructor(b){super({name:"NotAuthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,f.prototype)}}class l extends z{name="ResourceConflictException";$fault="client";constructor(b){super({name:"ResourceConflictException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class G extends z{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,G.prototype)}}class r extends z{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,r.prototype)}}class y extends z{name="LimitExceededException";$fault="client";constructor(b){super({name:"LimitExceededException",$fault:"client",...b});Object.setPrototypeOf(this,y.prototype)}}var lb="AccountId",Gb="AccessKeyId",hb="Credentials",rb="CustomRoleArn",yb="Expiration",gb="ExternalServiceException",Ib="GetCredentialsForIdentity",ab="GetCredentialsForIdentityInput",Cb="GetCredentialsForIdentityResponse",ib="GetId",eb="GetIdInput",mb="GetIdResponse",db="InternalErrorException",g="IdentityId",ob="InvalidIdentityPoolConfigurationException",tb="InvalidParameterException",nb="IdentityPoolId",bh="IdentityProviderToken",jb="Logins",hh="LimitExceededException",jh="LoginsMap",kh="NotAuthorizedException",ph="ResourceConflictException",qh="ResourceNotFoundException",uh="SecretKey",vh="SecretKeyString",wh="SessionToken",xh="TooManyRequestsException",H="client",D="error",J="httpError",E="message",kb="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",zh="server",k="com.amazonaws.cognitoidentity",pb=Z.TypeRegistry.for(kb),Ah=[-3,kb,"CognitoIdentityServiceException",0,[],[]];pb.registerError(Ah,z);var B=Z.TypeRegistry.for(k),Bh=[-3,k,gb,{[D]:H,[J]:400},[E],[0]];B.registerError(Bh,$);var Dh=[-3,k,db,{[D]:zh},[E],[0]];B.registerError(Dh,s);var Eh=[-3,k,ob,{[D]:H,[J]:400},[E],[0]];B.registerError(Eh,F);var Hh=[-3,k,tb,{[D]:H,[J]:400},[E],[0]];B.registerError(Hh,c);var Jh=[-3,k,hh,{[D]:H,[J]:400},[E],[0]];B.registerError(Jh,y);var Kh=[-3,k,kh,{[D]:H,[J]:403},[E],[0]];B.registerError(Kh,f);var Lh=[-3,k,ph,{[D]:H,[J]:409},[E],[0]];B.registerError(Lh,l);var Mh=[-3,k,qh,{[D]:H,[J]:404},[E],[0]];B.registerError(Mh,G);var Nh=[-3,k,xh,{[D]:H,[J]:429},[E],[0]];B.registerError(Nh,r);var Oh=[pb,B],Ph=[0,k,bh,8,0],Qh=[0,k,vh,8,0],Rh=[3,k,hb,0,[Gb,uh,wh,yb],[0,[()=>Qh,0],0,4]],Sh=[3,k,ab,0,[g,jb,rb],[0,[()=>qb,0],0],1],Th=[3,k,Cb,0,[g,hb],[0,[()=>Rh,0]]],Uh=[3,k,eb,0,[nb,lb,jb],[0,0,[()=>qb,0]],1],Vh=[3,k,mb,0,[g],[0]],qb=[2,k,jh,0,[0,0],[()=>Ph,0]],Wh=[9,k,Ib,0,()=>Sh,()=>Th],Xh=[9,k,ib,0,()=>Uh,()=>Vh],Yh=(b)=>{return{apiVersion:"2014-06-30",base64Decoder:b?.base64Decoder??M.fromBase64,base64Encoder:b?.base64Encoder??M.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??fb,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??Wb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new _.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.NoAuthSigner}],logger:b?.logger??new u.NoOpLogger,protocol:b?.protocol??Tb.AwsJson1_1Protocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",errorTypeRegistries:Oh,xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:b?.serviceId??"Cognito Identity",urlParser:b?.urlParser??V.parseUrl,utf8Decoder:b?.utf8Decoder??M.fromUtf8,utf8Encoder:b?.utf8Encoder??M.toUtf8}},Zh=(b)=>{u.emitWarningIfUnsupportedVersion(process.version);let h=v.resolveDefaultsModeConfig(b),j=()=>h().then(u.loadConfigsForDefaultMode),w=Yh(b);x.emitWarningIfUnsupportedVersion(process.version);let q={profile:b?.profile,logger:w.logger};return{...w,...b,runtime:"node",defaultsMode:h,authSchemePreference:b?.authSchemePreference??v.loadConfig(_.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,q),bodyLengthChecker:b?.bodyLengthChecker??M.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??x.createDefaultUserAgentProvider({serviceId:w.serviceId,clientVersion:_b.version}),maxAttempts:b?.maxAttempts??v.loadConfig(P.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??v.loadConfig(v.NODE_REGION_CONFIG_OPTIONS,{...v.NODE_REGION_CONFIG_FILE_OPTIONS,...q}),requestHandler:i.NodeHttpHandler.create(b?.requestHandler??j),retryMode:b?.retryMode??v.loadConfig({...P.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await j()).retryMode||P.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??M.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??i.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??v.loadConfig(v.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,q),useFipsEndpoint:b?.useFipsEndpoint??v.loadConfig(v.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,q),userAgentAppId:b?.userAgentAppId??v.loadConfig(x.NODE_APP_ID_CONFIG_OPTIONS,q)}},_h=(b)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:j,credentials:w}=b;return{setHttpAuthScheme(q){let R=h.findIndex((W)=>W.schemeId===q.schemeId);if(R===-1)h.push(q);else h.splice(R,1,q)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider(q){j=q},httpAuthSchemeProvider(){return j},setCredentials(q){w=q},credentials(){return w}}},$h=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},sh=(b,h)=>{let j=Object.assign(x.getAwsRegionExtensionConfiguration(b),u.getDefaultExtensionConfiguration(b),V.getHttpHandlerExtensionConfiguration(b),_h(b));return h.forEach((w)=>w.configure(j)),Object.assign(b,x.resolveAwsRegionExtensionConfiguration(j),u.resolveDefaultRuntimeConfig(j),V.resolveHttpHandlerRuntimeConfig(j),$h(j))};class I extends u.Client{config;constructor(...[b]){let h=Zh(b||{});super(h);this.initConfig=h;let j=Yb(h),w=x.resolveUserAgentConfig(j),q=P.resolveRetryConfig(w),R=v.resolveRegionConfig(q),W=x.resolveHostHeaderConfig(R),zb=L.resolveEndpointConfig(W),Ab=Xb(zb),Bb=sh(Ab,b?.extensions||[]);this.config=Bb,this.middlewareStack.use(Z.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(x.getUserAgentPlugin(this.config)),this.middlewareStack.use(P.getRetryPlugin(this.config)),this.middlewareStack.use(V.getContentLengthPlugin(this.config)),this.middlewareStack.use(x.getHostHeaderPlugin(this.config)),this.middlewareStack.use(x.getLoggerPlugin(this.config)),this.middlewareStack.use(x.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(U.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ub,identityProviderConfigProvider:async(Db)=>new U.DefaultIdentityProviderConfig({"aws.auth#sigv4":Db.credentials})})),this.middlewareStack.use(U.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class a extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Wh).build(){}class C extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Xh).build(){}var Fh={GetCredentialsForIdentityCommand:a,GetIdCommand:C};class ub extends I{}u.createAggregatedClient(Fh,ub);var{Command:ch,Client:fh}=u;var vb=I;var wb=a;var xb=C;export{xb as GetIdCommand,wb as GetCredentialsForIdentityCommand,vb as CognitoIdentityClient};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-r9w0thdk.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir ficheiro","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"A carregar...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Ficheiro de {{kind}} removido.","ui.fileMedia.state.loading":"A carregar {{kind}}...","ui.fileMedia.state.error":"Imposs\xEDvel carregar {{kind}}.","ui.fileMedia.state.unavailable":"Pr\xE9-visualiza\xE7\xE3o de {{kind}} indispon\xEDvel.","ui.fileMedia.binary.title":"Ficheiro bin\xE1rio","ui.fileMedia.binary.description.path":"{{path}} \xE9 bin\xE1rio.","ui.fileMedia.binary.description.default":"Conte\xFAdo bin\xE1rio","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"A comentar em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.diffs.changed":"Alterado","ui.sessionTurn.diffs.showAll":"Mostrar tudo","ui.sessionTurn.diffs.showLess":"Mostrar menos","ui.sessionTurn.diffs.more":"+{{count}} ficheiros","ui.sessionTurn.retry.retrying":"a tentar novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"o gemini est\xE1 sobrecarregado neste momento","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"A delegar trabalho","ui.sessionTurn.status.planning":"A planear os pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"A explorar","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"A pesquisar no c\xF3digo","ui.sessionTurn.status.searchingWeb":"A pesquisar na web","ui.sessionTurn.status.makingEdits":"A fazer edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"A executar comandos","ui.sessionTurn.status.thinking":"A pensar","ui.sessionTurn.status.thinkingWithTopic":"A pensar - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"A recolher pensamentos","ui.sessionTurn.status.consideringNextSteps":"A considerar os pr\xF3ximos passos","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Escreva a sua pr\xF3pria resposta","ui.messagePart.review.title":"Reveja as suas respostas","ui.messagePart.questions.dismissed":"Perguntas ignoradas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.list.loading":"A carregar","ui.list.empty":"Sem resultados","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Sem resultados para","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Correspond\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima correspond\xEAncia","ui.fileSearch.close":"Fechar pesquisa","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para a \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar liga\xE7\xE3o","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Pr\xE9-visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo desloc\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Tarefa","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Pesquisa Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.tool.skill":"Skill","ui.basicTool.called":"Chamado `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.common.file.one":"ficheiro","ui.common.file.other":"ficheiros","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Ignorar","ui.common.close":"Fechar","ui.common.next":"Seguinte","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Reverter mensagem","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrompido","ui.message.queued":"Em fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Corrigido","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas as que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Escreva a sua resposta..."};export{e as dict};
2
+ import"./chunk-f2pv705d.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir ficheiro","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"A carregar...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Ficheiro de {{kind}} removido.","ui.fileMedia.state.loading":"A carregar {{kind}}...","ui.fileMedia.state.error":"Imposs\xEDvel carregar {{kind}}.","ui.fileMedia.state.unavailable":"Pr\xE9-visualiza\xE7\xE3o de {{kind}} indispon\xEDvel.","ui.fileMedia.binary.title":"Ficheiro bin\xE1rio","ui.fileMedia.binary.description.path":"{{path}} \xE9 bin\xE1rio.","ui.fileMedia.binary.description.default":"Conte\xFAdo bin\xE1rio","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"A comentar em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.diffs.changed":"Alterado","ui.sessionTurn.diffs.showAll":"Mostrar tudo","ui.sessionTurn.diffs.showLess":"Mostrar menos","ui.sessionTurn.diffs.more":"+{{count}} ficheiros","ui.sessionTurn.retry.retrying":"a tentar novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"o gemini est\xE1 sobrecarregado neste momento","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"A delegar trabalho","ui.sessionTurn.status.planning":"A planear os pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"A explorar","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"A pesquisar no c\xF3digo","ui.sessionTurn.status.searchingWeb":"A pesquisar na web","ui.sessionTurn.status.makingEdits":"A fazer edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"A executar comandos","ui.sessionTurn.status.thinking":"A pensar","ui.sessionTurn.status.thinkingWithTopic":"A pensar - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"A recolher pensamentos","ui.sessionTurn.status.consideringNextSteps":"A considerar os pr\xF3ximos passos","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Escreva a sua pr\xF3pria resposta","ui.messagePart.review.title":"Reveja as suas respostas","ui.messagePart.questions.dismissed":"Perguntas ignoradas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.list.loading":"A carregar","ui.list.empty":"Sem resultados","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Sem resultados para","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Correspond\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima correspond\xEAncia","ui.fileSearch.close":"Fechar pesquisa","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para a \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar liga\xE7\xE3o","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Pr\xE9-visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo desloc\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Tarefa","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Pesquisa Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.tool.skill":"Skill","ui.basicTool.called":"Chamado `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.common.file.one":"ficheiro","ui.common.file.other":"ficheiros","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Ignorar","ui.common.close":"Fechar","ui.common.next":"Seguinte","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Reverter mensagem","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrompido","ui.message.queued":"Em fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Corrigido","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas as que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Escreva a sua resposta..."};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Mh as f,Nh as q,Oh as w,Ph as x}from"./chunk-060wbpz4.js";import"./chunk-f2pv705d.js";export{w as applyModuleEvalRuntimeOptions,q as applyBaseRuntimeOptions,x as QuickJSWASMModule,f as QuickJSModuleCallbacks};