@qitqode/qitqode-android-arm64 0.2.10 → 0.2.13
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.
- package/bundle/{chunk-x308f9j4.js → chunk-00krzh3y.js} +2 -2
- package/bundle/{chunk-q0xgxygw.js → chunk-04x4b2yy.js} +1 -1
- package/bundle/{chunk-1q10jyka.js → chunk-08mgb5tt.js} +2 -2
- package/bundle/{chunk-yexzxx6f.js → chunk-094m66q5.js} +1 -1
- package/bundle/{chunk-c3ey896z.js → chunk-0cjp9088.js} +1 -1
- package/bundle/{chunk-7a3txs9f.js → chunk-0mdmqtfr.js} +2 -2
- package/bundle/chunk-0nves64y.js +2 -0
- package/bundle/chunk-0v7knkt5.js +2 -0
- package/bundle/{chunk-wbt31xap.js → chunk-0w77vhg4.js} +2 -2
- package/bundle/{chunk-dnjyepb2.js → chunk-0ware2sh.js} +2 -2
- package/bundle/{chunk-djfrkbd5.js → chunk-0xf12tf3.js} +1 -1
- package/bundle/{chunk-qbewhcsz.js → chunk-139qfnsq.js} +1 -1
- package/bundle/{chunk-xgf4k9q7.js → chunk-1851skhm.js} +1 -1
- package/bundle/{chunk-f17se3hh.js → chunk-1bbx1da7.js} +1 -1
- package/bundle/{chunk-vk35g121.js → chunk-1bhcg889.js} +2 -2
- package/bundle/{chunk-xnxw5zz9.js → chunk-1exjy880.js} +2 -2
- package/bundle/{chunk-atacnspd.js → chunk-1f9qcrn6.js} +2 -2
- package/bundle/{chunk-5fcyb122.js → chunk-1gt6ppza.js} +1 -1
- package/bundle/chunk-1h5jdsgx.js +2 -0
- package/bundle/{chunk-brk1jca3.js → chunk-1q5h95hc.js} +1 -1
- package/bundle/chunk-1r5e1jsb.js +2 -0
- package/bundle/{chunk-vy93mn7d.js → chunk-1rafe6f5.js} +2 -2
- package/bundle/{chunk-62y6zk9x.js → chunk-1rw4srd1.js} +1 -1
- package/bundle/{chunk-h2p984qb.js → chunk-1sejtx9a.js} +2 -2
- package/bundle/{chunk-3zzrdpsx.js → chunk-1wy8wmah.js} +1 -1
- package/bundle/chunk-1wyy3c48.js +2 -0
- package/bundle/chunk-1z299xq6.js +2 -0
- package/bundle/chunk-21aqt31s.js +2 -0
- package/bundle/chunk-22aq9ymg.js +2 -0
- package/bundle/chunk-26a17c9z.js +2 -0
- package/bundle/chunk-2a154mr0.js +2 -0
- package/bundle/{chunk-acsqvgdw.js → chunk-2b80n6nx.js} +1 -1
- package/bundle/{chunk-nnkfdhh9.js → chunk-2bfq0mtx.js} +1 -1
- package/bundle/{chunk-wecs14rz.js → chunk-2d0vympj.js} +1 -1
- package/bundle/{chunk-dz3kcsb6.js → chunk-2h8b0csf.js} +2 -2
- package/bundle/{chunk-xqwk2zsx.js → chunk-2md5fz4f.js} +2 -2
- package/bundle/chunk-2nbce486.js +2 -0
- package/bundle/chunk-2npxatq9.js +2 -0
- package/bundle/{chunk-gx4v8z64.js → chunk-2p1qaqv3.js} +2 -2
- package/bundle/{chunk-ge7csm6m.js → chunk-2ts2s8b4.js} +2 -2
- package/bundle/{chunk-d1xfv4d3.js → chunk-374js0y6.js} +1 -1
- package/bundle/{chunk-g52wmt1v.js → chunk-3be70hxy.js} +1 -1
- package/bundle/{chunk-c8yc8qcd.js → chunk-3fx3eghq.js} +1 -1
- package/bundle/chunk-3gryj9r9.js +2 -0
- package/bundle/chunk-3jnanbjr.js +2 -0
- package/bundle/chunk-3meh1cbc.js +2 -0
- package/bundle/{chunk-t2r51r6v.js → chunk-3rcfy8te.js} +1 -1
- package/bundle/chunk-3t71xfr6.js +2 -0
- package/bundle/chunk-4045jzv5.js +2 -0
- package/bundle/{chunk-qdh2dm62.js → chunk-404ew3d3.js} +1 -1
- package/bundle/{chunk-ecz4h0a2.js → chunk-45dtsre6.js} +1 -1
- package/bundle/{chunk-v03xq38e.js → chunk-47pxz6cb.js} +2 -2
- package/bundle/{chunk-v8bxj01h.js → chunk-4ar8hey8.js} +1 -1
- package/bundle/chunk-4b2vv484.js +2 -0
- package/bundle/{chunk-9tz18e54.js → chunk-4d9s7cgr.js} +1 -1
- package/bundle/chunk-4ene1ymj.js +2 -0
- package/bundle/{chunk-yydqavgh.js → chunk-4enhsmq1.js} +2 -2
- package/bundle/{chunk-dm447tgc.js → chunk-4krmja97.js} +2 -2
- package/bundle/{chunk-pwsajn96.js → chunk-4q14whpc.js} +1 -1
- package/bundle/{chunk-z023h7t8.js → chunk-4s9d2zte.js} +1 -1
- package/bundle/{chunk-9zy5tsry.js → chunk-4wzv2v36.js} +3 -3
- package/bundle/{chunk-4sa9t0vx.js → chunk-53n3tfwn.js} +2 -2
- package/bundle/{chunk-3sj0jv91.js → chunk-5828bcp8.js} +1 -1
- package/bundle/chunk-58r5etg8.js +2 -0
- package/bundle/{chunk-waa781eh.js → chunk-5a4zt1b7.js} +1 -1
- package/bundle/chunk-5c2zw4h0.js +2 -0
- package/bundle/chunk-5e0vejcb.js +8 -0
- package/bundle/{chunk-nq4x6792.js → chunk-5es19n1m.js} +2 -2
- package/bundle/{chunk-32xd626h.js → chunk-5fbzvy6q.js} +2 -2
- package/bundle/{chunk-e1x1mp9m.js → chunk-5gv6r7v8.js} +1 -1
- package/bundle/{chunk-v8rqgt7h.js → chunk-5psekq9f.js} +1 -1
- package/bundle/{chunk-te91d271.js → chunk-5rtsnnjk.js} +1 -1
- package/bundle/{chunk-p6jf1fyt.js → chunk-5wjwzbk8.js} +1 -1
- package/bundle/chunk-608f83n0.js +2 -0
- package/bundle/{chunk-asxmkyz2.js → chunk-610mqqqa.js} +1 -1
- package/bundle/chunk-671r50ry.js +2 -0
- package/bundle/chunk-6bfnhr3d.js +2 -0
- package/bundle/chunk-6cv6d8rw.js +2 -0
- package/bundle/{chunk-psqtptrs.js → chunk-6dmk2eyt.js} +1 -1
- package/bundle/{chunk-7s0nq2aa.js → chunk-6g3bzap8.js} +2 -2
- package/bundle/{chunk-ccdjzn2m.js → chunk-6jb4mnvq.js} +3 -3
- package/bundle/{chunk-m01h6kk1.js → chunk-6kpk6pr3.js} +1 -1
- package/bundle/{chunk-gbkz04ke.js → chunk-6p848y99.js} +1 -1
- package/bundle/chunk-6qm6f88j.js +2 -0
- package/bundle/{chunk-wh2qqhep.js → chunk-6wt8g6mc.js} +2 -2
- package/bundle/{chunk-mn0pshpv.js → chunk-71naz1qp.js} +1 -1
- package/bundle/{chunk-by1kwg4r.js → chunk-72qx43fq.js} +2 -2
- package/bundle/chunk-78bfwwmc.js +2 -0
- package/bundle/{chunk-0sfc21qe.js → chunk-78rfz0ex.js} +2 -2
- package/bundle/{chunk-1r81q7m3.js → chunk-7bvh48s2.js} +1 -1
- package/bundle/{chunk-mmqyter3.js → chunk-7h0regqs.js} +1 -1
- package/bundle/{chunk-d0dsgxk4.js → chunk-7k1q26yn.js} +2 -2
- package/bundle/{chunk-kec1xw1n.js → chunk-7nh8vjx4.js} +1 -1
- package/bundle/{chunk-5w7ebtcd.js → chunk-7p8f8xav.js} +1 -1
- package/bundle/chunk-7wwtgxxf.js +2 -0
- package/bundle/{chunk-gksbv613.js → chunk-81mwbcy3.js} +2 -2
- package/bundle/{chunk-fvv1cret.js → chunk-821zkh5v.js} +1 -1
- package/bundle/{chunk-pf2vq6t1.js → chunk-84712kbe.js} +2 -2
- package/bundle/{chunk-eabbrt1p.js → chunk-8hrt4d0v.js} +1 -1
- package/bundle/{chunk-gmq1kwn0.js → chunk-8psfgg8y.js} +1 -1
- package/bundle/{chunk-at4dge22.js → chunk-8rbbt1s8.js} +1 -1
- package/bundle/{chunk-cdenq7jb.js → chunk-8t17w67q.js} +1 -1
- package/bundle/{chunk-9fjcgdea.js → chunk-8xbd0ra5.js} +1 -1
- package/bundle/{chunk-nh4zk07t.js → chunk-95ga21eq.js} +1 -1
- package/bundle/{chunk-e10c0crf.js → chunk-962hspr0.js} +1 -1
- package/bundle/chunk-98sb49dz.js +2 -0
- package/bundle/{chunk-9d0exvey.js → chunk-9a9qcvtz.js} +2 -2
- package/bundle/{chunk-x0hhw46n.js → chunk-9c0f79mt.js} +1 -1
- package/bundle/{chunk-kcqeh1e5.js → chunk-9h2fms7x.js} +1 -1
- package/bundle/chunk-9kbtpq9m.js +2 -0
- package/bundle/{chunk-eqpep2m2.js → chunk-9r6wk75s.js} +1 -1
- package/bundle/chunk-9szp9b4m.js +2 -0
- package/bundle/{chunk-tg1f56s3.js → chunk-9xbc558j.js} +1 -1
- package/bundle/chunk-9xqszq0c.js +2 -0
- package/bundle/chunk-a32kjs9e.js +2 -0
- package/bundle/{chunk-c8080519.js → chunk-a4242cn4.js} +1 -1
- package/bundle/{chunk-c8k32724.js → chunk-ajyfms68.js} +1 -1
- package/bundle/{chunk-8peby2d1.js → chunk-ajykvcas.js} +1 -1
- package/bundle/{chunk-tm79yrf3.js → chunk-anm5g0m4.js} +2 -2
- package/bundle/chunk-apym02ct.js +2 -0
- package/bundle/{chunk-dx7rexx3.js → chunk-aq75kv5f.js} +3 -3
- package/bundle/chunk-armv2rv5.js +2 -0
- package/bundle/chunk-as215v64.js +2 -0
- package/bundle/{chunk-rk21wv4k.js → chunk-b274mb6v.js} +1 -1
- package/bundle/{chunk-zfqgh9h7.js → chunk-b46t2315.js} +1 -1
- package/bundle/{chunk-yzd6cyep.js → chunk-ba2hn77m.js} +1 -1
- package/bundle/{chunk-pyf649pz.js → chunk-bd4krah7.js} +1 -1
- package/bundle/chunk-bnmpgpyf.js +2 -0
- package/bundle/{chunk-5nm5egq0.js → chunk-bpv378bm.js} +2 -2
- package/bundle/chunk-bq3zt1x1.js +2 -0
- package/bundle/chunk-bx8fgjam.js +2 -0
- package/bundle/{chunk-fsndgr9a.js → chunk-bydaqb08.js} +1 -1
- package/bundle/{chunk-819qr675.js → chunk-c1srcpfk.js} +1 -1
- package/bundle/{chunk-9bbwxp5d.js → chunk-c99npyz9.js} +1 -1
- package/bundle/chunk-ckcnb59t.js +2 -0
- package/bundle/{chunk-qdbx1qkr.js → chunk-csbndz33.js} +1 -1
- package/bundle/{chunk-c1c8ch3g.js → chunk-cv3xdp8q.js} +8 -8
- package/bundle/{chunk-xvvt886p.js → chunk-d2049chz.js} +2 -2
- package/bundle/{chunk-je8fcsa9.js → chunk-d4ys15w3.js} +1 -1
- package/bundle/chunk-d79xaj6s.js +3 -0
- package/bundle/chunk-dah2d37s.js +2 -0
- package/bundle/chunk-dhgjv1n2.js +2 -0
- package/bundle/chunk-dk9k8ff5.js +2 -0
- package/bundle/{chunk-b9f78x5g.js → chunk-dmgdwvn1.js} +1 -1
- package/bundle/{chunk-azss4acq.js → chunk-dpm5x19e.js} +2 -2
- package/bundle/{chunk-rpdgn9z3.js → chunk-dwjv3m5s.js} +2 -2
- package/bundle/chunk-dymysn4h.js +2 -0
- package/bundle/{chunk-7rbg6mg9.js → chunk-dzy3ezht.js} +2 -2
- package/bundle/{chunk-8rkszwxq.js → chunk-e0w082wt.js} +4 -4
- package/bundle/{chunk-0mwzxqt5.js → chunk-e4658j15.js} +3 -3
- package/bundle/{chunk-pbanj1gk.js → chunk-e6s8ep9m.js} +2 -2
- package/bundle/{chunk-dp6ms01y.js → chunk-ec1bwa7f.js} +2 -2
- package/bundle/{chunk-ff8q10gk.js → chunk-eefzbdbk.js} +2 -2
- package/bundle/{chunk-j5z95b6f.js → chunk-eftk07r3.js} +1 -1
- package/bundle/{chunk-qjw2zcq5.js → chunk-eh73j82b.js} +1 -1
- package/bundle/{chunk-h91zmzs5.js → chunk-es6vbsjg.js} +1 -1
- package/bundle/{chunk-k10rtgsk.js → chunk-etvwxwn3.js} +1 -1
- package/bundle/chunk-ev4gw5k6.js +2 -0
- package/bundle/chunk-ew2dxm43.js +2 -0
- package/bundle/{chunk-nk5vrenn.js → chunk-ewde5bss.js} +2 -2
- package/bundle/{chunk-8gpjmj42.js → chunk-fbd971t7.js} +3 -3
- package/bundle/{chunk-gbnf7zf9.js → chunk-ff031crt.js} +1 -1
- package/bundle/chunk-ffp4wg27.js +2 -0
- package/bundle/{chunk-6y58jzak.js → chunk-fj87htwn.js} +1 -1
- package/bundle/{chunk-rxnd79h7.js → chunk-fmvmp278.js} +1 -1
- package/bundle/{chunk-6mnk5sg3.js → chunk-fqzfytjk.js} +1 -1
- package/bundle/{chunk-c2ns2csn.js → chunk-g0x6q2ks.js} +1 -1
- package/bundle/{chunk-mp1x10t5.js → chunk-g3y5kvg6.js} +2 -2
- package/bundle/{chunk-3vae1s42.js → chunk-g6ffx794.js} +1 -1
- package/bundle/{chunk-d1fv2c7s.js → chunk-gcpwm7b5.js} +2 -2
- package/bundle/{chunk-pxm0x3e0.js → chunk-gdawpkxs.js} +2 -2
- package/bundle/{chunk-jbcqhw3x.js → chunk-gjmxrz0v.js} +2 -2
- package/bundle/{chunk-vbb1jg02.js → chunk-gtmtvjwc.js} +1 -1
- package/bundle/{chunk-7hdb1fhq.js → chunk-gvc1mqrs.js} +2 -2
- package/bundle/{chunk-56yp5v0w.js → chunk-gw2fz5ry.js} +1 -1
- package/bundle/{chunk-g08qj9z3.js → chunk-h1p3xcfp.js} +2 -2
- package/bundle/{chunk-c9cngded.js → chunk-h2vtypa5.js} +1 -1
- package/bundle/{chunk-m4j6t713.js → chunk-h9tcpbr7.js} +1 -1
- package/bundle/{chunk-2fbkw84y.js → chunk-hcd0k14e.js} +2 -2
- package/bundle/{chunk-s05hqtx1.js → chunk-hd6sd912.js} +1 -1
- package/bundle/{chunk-6wjdhvdf.js → chunk-hgcnzsd5.js} +1 -1
- package/bundle/chunk-hjy90gt2.js +2 -0
- package/bundle/{chunk-2zjet9tx.js → chunk-hk8m8vax.js} +2 -2
- package/bundle/chunk-hmden934.js +2 -0
- package/bundle/{chunk-0tkznq75.js → chunk-hnbtfpb7.js} +1 -1
- package/bundle/{chunk-ngyv4fhn.js → chunk-hp9q7vvq.js} +2 -2
- package/bundle/{chunk-kc8n5cgb.js → chunk-hrfdrz36.js} +1 -1
- package/bundle/chunk-hsm8fbb1.js +2 -0
- package/bundle/{chunk-yce8ph5b.js → chunk-hsmtjb4d.js} +2 -2
- package/bundle/chunk-hz1xfedb.js +2 -0
- package/bundle/{chunk-qq9yc2tp.js → chunk-hzzvmr41.js} +2 -2
- package/bundle/chunk-ja9y478k.js +2 -0
- package/bundle/chunk-jam7xyjf.js +2 -0
- package/bundle/{chunk-4a9jqe5s.js → chunk-jcn8bg31.js} +1 -1
- package/bundle/{chunk-2dmcpqak.js → chunk-jf4zyy7r.js} +1 -1
- package/bundle/{chunk-yspstxkq.js → chunk-jmrqp50k.js} +1 -1
- package/bundle/{chunk-qm9fm5ja.js → chunk-jrh028na.js} +2 -2
- package/bundle/{chunk-r81w6skn.js → chunk-jt94rhev.js} +1 -1
- package/bundle/{chunk-cs825mxr.js → chunk-k3x6z5q1.js} +1 -1
- package/bundle/chunk-k51qphrk.js +2 -0
- package/bundle/chunk-kee7xpe3.js +2 -0
- package/bundle/{chunk-61t4g8bh.js → chunk-m18pxkdg.js} +4 -4
- package/bundle/{chunk-npdgfqaw.js → chunk-map852em.js} +1 -1
- package/bundle/{chunk-wd2xmkdp.js → chunk-mbma071k.js} +2 -2
- package/bundle/{chunk-qyan69nb.js → chunk-mchf2bcc.js} +2 -2
- package/bundle/{chunk-x50adh71.js → chunk-mfg4stzn.js} +1 -1
- package/bundle/{chunk-snf6ahg7.js → chunk-mgff8bcx.js} +1 -1
- package/bundle/{chunk-81dvy370.js → chunk-mhn0a828.js} +1 -1
- package/bundle/{chunk-yh1t6jrj.js → chunk-mp5m0acf.js} +1 -1
- package/bundle/{chunk-1m78yy4k.js → chunk-mqtj38j9.js} +1 -1
- package/bundle/{chunk-cxtwavyf.js → chunk-mrh5q4s6.js} +2 -2
- package/bundle/{chunk-xcmbxny8.js → chunk-msbe5rb7.js} +1 -1
- package/bundle/{chunk-b8rzn48q.js → chunk-n73ckwr7.js} +1 -1
- package/bundle/{chunk-gqgjybjc.js → chunk-nn2hbew8.js} +1 -1
- package/bundle/{chunk-9nf5650d.js → chunk-npryn3en.js} +1 -1
- package/bundle/chunk-p13eeqe4.js +2 -0
- package/bundle/{chunk-a70m6kyn.js → chunk-p3tcw42f.js} +1 -1
- package/bundle/chunk-p45f2nyb.js +2 -0
- package/bundle/{chunk-q26s0wb5.js → chunk-p863r97y.js} +1 -1
- package/bundle/{chunk-tjfer79w.js → chunk-paqy0c2v.js} +1 -1
- package/bundle/{chunk-vsfj16v9.js → chunk-pfen4ekj.js} +2 -2
- package/bundle/{chunk-5p2r8bxx.js → chunk-pzn7cade.js} +1 -1
- package/bundle/{chunk-jt6bvxtr.js → chunk-q65qzc9w.js} +1 -1
- package/bundle/{chunk-h0pvxre5.js → chunk-q7wc3frq.js} +1 -1
- package/bundle/{chunk-141p12c4.js → chunk-qa38xchd.js} +1 -1
- package/bundle/{chunk-f0ab2f28.js → chunk-qqftaqza.js} +1 -1
- package/bundle/{chunk-d9w2bn2e.js → chunk-qvwx32p9.js} +2 -2
- package/bundle/chunk-qw9whsy2.js +2 -0
- package/bundle/{chunk-8nnajdwf.js → chunk-r65zw08x.js} +3 -3
- package/bundle/chunk-r77kpzdv.js +2 -0
- package/bundle/{chunk-e3mrw0k7.js → chunk-r9hsd9pw.js} +1 -1
- package/bundle/chunk-rc95tp19.js +2 -0
- package/bundle/{chunk-xv03hbgj.js → chunk-rf9pjbg3.js} +1 -1
- package/bundle/chunk-rmh2fhqy.js +2 -0
- package/bundle/{chunk-t9pq363q.js → chunk-rqdfmbns.js} +2 -2
- package/bundle/{chunk-ev6jwt7q.js → chunk-rr94dpe9.js} +1 -1
- package/bundle/chunk-rrn86a8w.js +2 -0
- package/bundle/{chunk-kk850sdw.js → chunk-rwt0rwvn.js} +2 -2
- package/bundle/{chunk-f6btedtt.js → chunk-s7ypkpg2.js} +1 -1
- package/bundle/{chunk-hgm8yfcb.js → chunk-s81ck6bw.js} +1 -1
- package/bundle/chunk-s8v0h63x.js +2 -0
- package/bundle/chunk-sh4mngre.js +2 -0
- package/bundle/chunk-shqqngm8.js +2 -0
- package/bundle/chunk-sjfcwykr.js +2 -0
- package/bundle/{chunk-q7s6z0nz.js → chunk-sn15skh8.js} +1 -1
- package/bundle/chunk-sv01v0n0.js +2 -0
- package/bundle/{chunk-dzma8zvf.js → chunk-sv27ep93.js} +2 -2
- package/bundle/{chunk-q8fjktv4.js → chunk-t1e52h0k.js} +1 -1
- package/bundle/{chunk-zskdxbbh.js → chunk-t1hw67x4.js} +1 -1
- package/bundle/{chunk-9pj10pgd.js → chunk-t4kma6mq.js} +2 -2
- package/bundle/{chunk-8v60bqm0.js → chunk-t66gerft.js} +1 -1
- package/bundle/{chunk-z69tt390.js → chunk-t7gp6mjm.js} +1 -1
- package/bundle/{chunk-dd461rg3.js → chunk-tks3qzsw.js} +1 -1
- package/bundle/{chunk-1h96bk6p.js → chunk-tn0sfsks.js} +2 -2
- package/bundle/chunk-tn8hsd2c.js +2 -0
- package/bundle/chunk-tqsx7w8z.js +2 -0
- package/bundle/{chunk-tdevq564.js → chunk-trg0zg0q.js} +1 -1
- package/bundle/chunk-tyt1negg.js +2 -0
- package/bundle/chunk-tz1sv9kt.js +3 -0
- package/bundle/{chunk-p506eydh.js → chunk-tzw56029.js} +1 -1
- package/bundle/{chunk-t5wdstzv.js → chunk-v30fmrz0.js} +1 -1
- package/bundle/chunk-v580zwpf.js +3 -0
- package/bundle/{chunk-6gbdvz6p.js → chunk-v6djkm35.js} +1 -1
- package/bundle/{chunk-h6z86aay.js → chunk-v9yxkbz7.js} +1 -1
- package/bundle/chunk-vdv6cyh0.js +2 -0
- package/bundle/{chunk-z0m1qm7j.js → chunk-vqxyk6as.js} +2 -2
- package/bundle/{chunk-se8d5xg9.js → chunk-vr7525pa.js} +1 -1
- package/bundle/chunk-vsk8yfxp.js +2 -0
- package/bundle/{chunk-vjt6mh10.js → chunk-vvcyvdnk.js} +2 -2
- package/bundle/chunk-vvgmkjym.js +2 -0
- package/bundle/{chunk-0bhzhh7s.js → chunk-vvmvryh1.js} +2 -2
- package/bundle/{chunk-eme9xmh3.js → chunk-vzf04vad.js} +1 -1
- package/bundle/{chunk-xstxdw7v.js → chunk-vzj91hg8.js} +1 -1
- package/bundle/chunk-w0zyex7f.js +2 -0
- package/bundle/{chunk-e72jwbfc.js → chunk-w264gs2c.js} +1 -1
- package/bundle/chunk-w623r5kb.js +3 -0
- package/bundle/{chunk-5rqjze1g.js → chunk-wac35a6p.js} +1 -1
- package/bundle/chunk-wkxt9v7s.js +2 -0
- package/bundle/{chunk-gb51fn3r.js → chunk-wqm1vawg.js} +1 -1
- package/bundle/{chunk-pchv413c.js → chunk-wrkt670m.js} +2 -2
- package/bundle/{chunk-2y5bthrp.js → chunk-wspm2k19.js} +1 -1
- package/bundle/chunk-wwf6zacw.js +2 -0
- package/bundle/{chunk-nqk8d62j.js → chunk-wwtyrgga.js} +1 -1
- package/bundle/{chunk-ajnzv5jt.js → chunk-x0wy15q9.js} +2 -2
- package/bundle/chunk-x9c8eddk.js +2 -0
- package/bundle/{chunk-ztvkzex1.js → chunk-xaewye8w.js} +1 -1
- package/bundle/{chunk-gq3zb4wv.js → chunk-xgdst5n5.js} +2 -2
- package/bundle/{chunk-3yfjgks3.js → chunk-xgphhnpk.js} +1 -1
- package/bundle/chunk-xjed8t2h.js +2 -0
- package/bundle/{chunk-qtyapmy7.js → chunk-xn6mwsc9.js} +1 -1
- package/bundle/{chunk-v0hnn7nb.js → chunk-xpz5mnwz.js} +1 -1
- package/bundle/{chunk-6axm2qtj.js → chunk-xrb46v1e.js} +1 -1
- package/bundle/chunk-xxhta1tm.js +2 -0
- package/bundle/{chunk-532fnfmw.js → chunk-y5m9c5ek.js} +2 -2
- package/bundle/{chunk-9s5h0f1y.js → chunk-y9kjt2jj.js} +2 -2
- package/bundle/{chunk-vbfc0wgv.js → chunk-y9mxwwz7.js} +2 -2
- package/bundle/{chunk-td9hm9be.js → chunk-ycth54ja.js} +1 -1
- package/bundle/{chunk-pky8h8rh.js → chunk-ydz7387e.js} +1 -1
- package/bundle/{chunk-f3y5kr76.js → chunk-yg5azmxb.js} +2 -2
- package/bundle/{chunk-j7637cwg.js → chunk-yhe5qz48.js} +2 -2
- package/bundle/chunk-yhj6858v.js +2 -0
- package/bundle/chunk-yq3byrpv.js +2 -0
- package/bundle/{chunk-3mtjxmw1.js → chunk-yqvqzg7b.js} +1 -1
- package/bundle/chunk-ys8ajwys.js +2 -0
- package/bundle/chunk-yzt7p956.js +2 -0
- package/bundle/{chunk-2cvwrabw.js → chunk-yzxcjr6y.js} +2 -2
- package/bundle/{chunk-f6vy70p6.js → chunk-z1psybn1.js} +2 -2
- package/bundle/{chunk-xj0zc9za.js → chunk-z2cnd2cp.js} +1 -1
- package/bundle/{chunk-s27cz24e.js → chunk-z4gczap3.js} +52 -52
- package/bundle/chunk-z56cb3fs.js +2 -0
- package/bundle/{chunk-qdafm7qg.js → chunk-z66xdxkg.js} +2 -2
- package/bundle/{chunk-v16n1fep.js → chunk-z6f54x4k.js} +2 -2
- package/bundle/{chunk-kds2g7r2.js → chunk-z6qb4gt5.js} +1 -1
- package/bundle/{chunk-q4mtwv1w.js → chunk-zgj7jx8k.js} +2 -2
- package/bundle/{chunk-mn5cacf6.js → chunk-zhddj91f.js} +2 -2
- package/bundle/chunk-zhypknyg.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +3 -3
- package/bundle/chunk-062chtrq.js +0 -2
- package/bundle/chunk-062vs7bp.js +0 -2
- package/bundle/chunk-08g14hmz.js +0 -2
- package/bundle/chunk-0w2v8dfy.js +0 -2
- package/bundle/chunk-10fr7a2y.js +0 -2
- package/bundle/chunk-15bjhfav.js +0 -3
- package/bundle/chunk-1hv61m11.js +0 -2
- package/bundle/chunk-2mkvx8b2.js +0 -2
- package/bundle/chunk-2rykfc3a.js +0 -2
- package/bundle/chunk-2w5hx4fs.js +0 -2
- package/bundle/chunk-2yy63sxz.js +0 -2
- package/bundle/chunk-2z3fe4qw.js +0 -2
- package/bundle/chunk-361cmmrp.js +0 -2
- package/bundle/chunk-3r6dq1h3.js +0 -2
- package/bundle/chunk-4a12wv2m.js +0 -2
- package/bundle/chunk-547a55ba.js +0 -2
- package/bundle/chunk-5ztmc770.js +0 -2
- package/bundle/chunk-62x3r2q8.js +0 -2
- package/bundle/chunk-6th7vpwm.js +0 -2
- package/bundle/chunk-6ybh5smv.js +0 -2
- package/bundle/chunk-73kprndw.js +0 -2
- package/bundle/chunk-79fr19xf.js +0 -2
- package/bundle/chunk-7ezr478e.js +0 -2
- package/bundle/chunk-7gj1vqyj.js +0 -2
- package/bundle/chunk-7ywfkwb4.js +0 -2
- package/bundle/chunk-85fnnwm2.js +0 -2
- package/bundle/chunk-89fwh84w.js +0 -2
- package/bundle/chunk-8e724g3k.js +0 -2
- package/bundle/chunk-9894a2yn.js +0 -2
- package/bundle/chunk-98ye2nwt.js +0 -2
- package/bundle/chunk-9s4excg8.js +0 -2
- package/bundle/chunk-aetgcegz.js +0 -2
- package/bundle/chunk-agas0nay.js +0 -2
- package/bundle/chunk-ayknzc4m.js +0 -2
- package/bundle/chunk-b2ybst88.js +0 -2
- package/bundle/chunk-bd5vtjd7.js +0 -2
- package/bundle/chunk-bjqqk6jt.js +0 -2
- package/bundle/chunk-cpkcdykz.js +0 -2
- package/bundle/chunk-cyafm8d6.js +0 -2
- package/bundle/chunk-d4316r53.js +0 -2
- package/bundle/chunk-d8ym7mcg.js +0 -2
- package/bundle/chunk-dnpjxjkp.js +0 -2
- package/bundle/chunk-e5gjqtby.js +0 -2
- package/bundle/chunk-ee3mqzms.js +0 -2
- package/bundle/chunk-er5f61s5.js +0 -2
- package/bundle/chunk-er716522.js +0 -2
- package/bundle/chunk-ez3gacqe.js +0 -2
- package/bundle/chunk-fkc7wf1p.js +0 -2
- package/bundle/chunk-fm6z8nqb.js +0 -2
- package/bundle/chunk-g0qwm23d.js +0 -2
- package/bundle/chunk-g4yn8cj8.js +0 -2
- package/bundle/chunk-gsez13bg.js +0 -3
- package/bundle/chunk-h1spsy3y.js +0 -2
- package/bundle/chunk-h8gkv40j.js +0 -2
- package/bundle/chunk-j59kmb49.js +0 -2
- package/bundle/chunk-jv37ghev.js +0 -2
- package/bundle/chunk-k3hcb6qf.js +0 -2
- package/bundle/chunk-k5d822n2.js +0 -3
- package/bundle/chunk-m8ytbq04.js +0 -2
- package/bundle/chunk-mf9nc4xz.js +0 -2
- package/bundle/chunk-mxby91bj.js +0 -2
- package/bundle/chunk-mzv1gh6f.js +0 -2
- package/bundle/chunk-n0hsvvw8.js +0 -2
- package/bundle/chunk-nm1v9z14.js +0 -2
- package/bundle/chunk-p7nstcxa.js +0 -2
- package/bundle/chunk-pfwkvv7g.js +0 -2
- package/bundle/chunk-pn1jz8qj.js +0 -2
- package/bundle/chunk-pqvmtfk7.js +0 -2
- package/bundle/chunk-prgw26g3.js +0 -2
- package/bundle/chunk-pv9ty6v7.js +0 -2
- package/bundle/chunk-q4rstre7.js +0 -2
- package/bundle/chunk-q6jk2v6g.js +0 -2
- package/bundle/chunk-qd43npx3.js +0 -2
- package/bundle/chunk-qdb21y83.js +0 -2
- package/bundle/chunk-qeksaefy.js +0 -2
- package/bundle/chunk-r7t9yb9d.js +0 -2
- package/bundle/chunk-sdv3a4w3.js +0 -2
- package/bundle/chunk-sk89becn.js +0 -2
- package/bundle/chunk-tc0996xz.js +0 -2
- package/bundle/chunk-tfs50mgj.js +0 -2
- package/bundle/chunk-thecq33z.js +0 -3
- package/bundle/chunk-tjvtp9d9.js +0 -2
- package/bundle/chunk-tkm9m3n0.js +0 -2
- package/bundle/chunk-v1s1rcqx.js +0 -2
- package/bundle/chunk-v4dt4062.js +0 -2
- package/bundle/chunk-wgrq86kd.js +0 -2
- package/bundle/chunk-x8ks2bn7.js +0 -2
- package/bundle/chunk-xy2ty5h5.js +0 -8
- package/bundle/chunk-z0383stv.js +0 -2
- package/bundle/chunk-zewrmk8x.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{z as
|
|
2
|
+
import{sP as q,vP as b}from"./chunk-0xf12tf3.js";var z=q((f)=>{Object.defineProperty(f,"__esModule",{value:!0});f.execAsync=void 0;var v=b("child_process"),w=b("util");f.execAsync=w.promisify(v.exec)});
|
|
3
|
+
export{z as pP};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{gn as D,hn as m,kn as R,ln as X,pn as v,rn as x,sn as S}from"./chunk-fbd971t7.js";import{Hn as A,Ln as L}from"./chunk-z66xdxkg.js";import{Dt as U}from"./chunk-vvmvryh1.js";import{$t as P,eu as F}from"./chunk-mrh5q4s6.js";import{RE as s,SO as B,dI as k}from"./chunk-hk8m8vax.js";import{tP as E}from"./chunk-0xf12tf3.js";var V={};E(V,{schema:()=>c,jsonc:()=>g,ConfigParse:()=>V});function g($,T){let J=[],j=D($,J,{allowTrailingComma:!0});if(J.length){let C=$.split(`
|
|
3
3
|
`),y=J.map((H)=>{let I=$.substring(0,H.offset).split(`
|
|
4
4
|
`),Q=I.length,Z=I[I.length-1].length+1,K=C[Q-1],z=`${m(H.error)} at line ${Q}, column ${Z}`;if(!K)return z;return`${z}
|
|
5
5
|
Line ${Q}: ${K}
|
|
@@ -11,4 +11,4 @@ ${$}
|
|
|
11
11
|
${y}
|
|
12
12
|
--- End ---`})}return j}function c($,T,J){let j=$.safeParse(T);if(j.success)return j.data;throw new X({path:J,issues:j.error.issues})}var Y={};E(Y,{substitute:()=>u,ConfigVariable:()=>Y});import G from"path";import h from"os";function a($){return $.type==="path"?$.path:$.source}function n($){return $.type==="path"?G.dirname($.path):$.dir}async function u($){let T=$.missing??"error",J=$.text.replace(/\{env:([^}]+)\}/g,(Q,Z)=>{return process.env[Z]||""}),j=Array.from(J.matchAll(/\{file:[^}]+\}/g));if(!j.length)return J;let C=n($),y=a($),H="",I=0;for(let Q of j){let Z=Q[0],K=Q.index;H+=J.slice(I,K);let z=J.lastIndexOf(`
|
|
13
13
|
`,K-1)+1;if(J.slice(z,K).trimStart().startsWith("//")){H+=Z,I=K+Z.length;continue}let W=Z.replace(/^\{file:/,"").replace(/\}$/,"");if(W.startsWith("~/"))W=G.join(h.homedir(),W.slice(2));let N=G.isAbsolute(W)?W:G.resolve(C,W),d=(await F.readText(N).catch((O)=>{if(T==="empty")return"";let r=`bad file reference: "${Z}"`;if(O.code==="ENOENT")throw new X({path:y,message:r+` ${N} does not exist`},{cause:O});throw new X({path:y,message:r},{cause:O})})).trim();H+=JSON.stringify(d).slice(1,-1),I=K+Z.length}return H+=J.slice(I),H}var w={};E(w,{resolvePluginSpec:()=>e,pluginSpecifier:()=>b,pluginOptions:()=>t,load:()=>p,deduplicatePluginOrigins:()=>i,Spec:()=>l,Options:()=>o,ConfigPlugin:()=>w});import{pathToFileURL as q}from"url";import _ from"path";var o=B.Record(B.String,B.Unknown).pipe(A(($)=>({zod:L($)}))),l=B.Union([B.String,B.mutable(B.Tuple([B.String,o]))]).pipe(A(($)=>({zod:L($)})));async function p($){let T=[];for(let J of await P.scan("{plugin,plugins}/*.{ts,js}",{cwd:$,absolute:!0,dot:!0,symlink:!0}))T.push(q(J).href);return T}function b($){return Array.isArray($)?$[0]:$}function t($){return Array.isArray($)?$[1]:void 0}async function e($,T){let J=b($);if(!x(J))return $;let j=_.dirname(T),C=(()=>{if(J.startsWith("file://"))return J;if(_.isAbsolute(J)||/^[A-Za-z]:[\\/]/.test(J))return q(J).href;return q(_.resolve(j,J)).href})(),y=await S(C).catch(()=>C);if(Array.isArray($))return[y,$[1]];return y}function i($){let T=new Set,J=[];for(let j of $.toReversed()){let C=b(j.spec),y=C.startsWith("file://")?C:v(C).pkg;if(T.has(y))continue;T.add(y),J.push(j)}return J.toReversed()}var M={};E(M,{install:()=>T$,declaresDependencies:()=>f,ConfigDependencies:()=>M});import $$ from"path";var J$=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function f($){if(!U($))return!1;return J$.some((T)=>{let J=$[T];return U(J)&&Object.keys(J).length>0})}var T$=k.fn("Config.installDependencies")(function*($){let T=yield*$.fs.readJson($$.join($.dir,"package.json")).pipe(k.exit),J=s.isSuccess(T)?T.value:void 0;if(!f(J))return;yield*$.npm.install($.dir)});
|
|
14
|
-
export{V as
|
|
14
|
+
export{V as bn,Y as cn,w as dn,M as en};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var j=Object.create;var{getPrototypeOf:k,defineProperty:i,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var g=b?o??=new WeakMap:p??=new WeakMap,e=g.get(a);if(e)return e}c=a!=null?j(k(a)):{};let h=b||!a||!a.__esModule?i(c,"default",{value:a,enumerable:!0}):c;for(let f of l(a))if(!m.call(h,f))i(h,f,{get:n.bind(a,f),enumerable:!0});if(d)g.set(a,h);return h};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)i(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=(a,b)=>()=>(a&&(b=a(a=0)),b);var w=import.meta.require,x=(a,b,c)=>{if(b!=null){if(typeof b!=="object"&&typeof b!=="function")throw TypeError('Object expected to be assigned to "using" declaration');let d;if(c)d=b[Symbol.asyncDispose];if(d===void 0)d=b[Symbol.dispose];if(typeof d!=="function")throw TypeError("Object not disposable");a.push([c,d,b])}else if(c)a.push([c]);return b},y=(a,b,c)=>{let d=(e)=>b=c?new SuppressedError(e,b,"An error was suppressed during disposal"):(c=!0,e),g=(e)=>{while(e=a.pop())try{var h=e[1]&&e[1].call(e[2]);if(e[0])return Promise.resolve(h).then(g,(f)=>(d(f),g()))}catch(f){d(f)}if(c)throw b};return g()};
|
|
3
|
-
export{s as
|
|
3
|
+
export{s as rP,t as sP,u as tP,v as uP,w as vP,x as wP,y as xP};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-cqtkxwd8.js";import{
|
|
2
|
+
import"./chunk-cqtkxwd8.js";import{Zq as H}from"./chunk-mfg4stzn.js";import{Iu as Q,mu as gG}from"./chunk-zgj7jx8k.js";import{wz as mG}from"./chunk-0mdmqtfr.js";import"./chunk-0xf12tf3.js";var{defineProperty:uJ,defineProperties:cJ,getOwnPropertyDescriptors:dJ,getOwnPropertySymbols:VB}=Object,uG=Object.prototype.hasOwnProperty,cG=Object.prototype.propertyIsEnumerable,dG=(B)=>{throw TypeError(B)},GG=(B,G,J)=>(G in B)?uJ(B,G,{enumerable:!0,configurable:!0,writable:!0,value:J}):B[G]=J,W=(B,G)=>{for(var J in G||(G={}))if(uG.call(G,J))GG(B,J,G[J]);if(VB){for(var J of VB(G))if(cG.call(G,J))GG(B,J,G[J])}return B},T=(B,G)=>cJ(B,dJ(G)),LB=(B,G)=>{var J={};for(var N in B)if(uG.call(B,N)&&G.indexOf(N)<0)J[N]=B[N];if(B!=null&&VB){for(var N of VB(B))if(G.indexOf(N)<0&&cG.call(B,N))J[N]=B[N]}return J},pJ=(B,G,J)=>G.has(B)||dG("Cannot "+J),JG=(B,G,J)=>(pJ(B,G,"read from private field"),J?J.call(B):G.get(B)),iJ=(B,G,J)=>G.has(B)?dG("Cannot add the same private member more than once"):G instanceof WeakSet?G.add(B):G.set(B,J),pG="vercel.ai.error",rJ=Symbol.for(pG),NG,QG,I=class B extends(QG=Error,NG=rJ,QG){constructor({name:G,message:J,cause:N}){super(J);this[NG]=!0,this.name=G,this.cause=N}static isInstance(G){return B.hasMarker(G,pG)}static hasMarker(G,J){let N=Symbol.for(J);return G!=null&&typeof G==="object"&&N in G&&typeof G[N]==="boolean"&&G[N]===!0}},iG="AI_APICallError",rG=`vercel.ai.error.${iG}`,sJ=Symbol.for(rG),XG,YG,o=class extends(YG=I,XG=sJ,YG){constructor({message:B,url:G,requestBodyValues:J,statusCode:N,responseHeaders:X,responseBody:Y,cause:Z,isRetryable:$=N!=null&&(N===408||N===409||N===429||N>=500),data:z}){super({name:iG,message:B,cause:Z});this[XG]=!0,this.url=G,this.requestBodyValues=J,this.statusCode=N,this.responseHeaders=X,this.responseBody=Y,this.isRetryable=$,this.data=z}static isInstance(B){return I.hasMarker(B,rG)}},sG="AI_EmptyResponseBodyError",nG=`vercel.ai.error.${sG}`,nJ=Symbol.for(nG),ZG,$G,aJ=class extends($G=I,ZG=nJ,$G){constructor({message:B="Empty response body"}={}){super({name:sG,message:B});this[ZG]=!0}static isInstance(B){return I.hasMarker(B,nG)}};function aG(B){if(B==null)return"unknown error";if(typeof B==="string")return B;if(B instanceof Error)return B.message;return JSON.stringify(B)}var lG="AI_InvalidArgumentError",tG=`vercel.ai.error.${lG}`,lJ=Symbol.for(tG),WG,zG,oG=class extends(zG=I,WG=lJ,zG){constructor({message:B,cause:G,argument:J}){super({name:lG,message:B,cause:G});this[WG]=!0,this.argument=J}static isInstance(B){return I.hasMarker(B,tG)}},eG="AI_InvalidPromptError",BJ=`vercel.ai.error.${eG}`,tJ=Symbol.for(BJ),jG,KG,oJ=class extends(KG=I,jG=tJ,KG){constructor({prompt:B,message:G,cause:J}){super({name:eG,message:`Invalid prompt: ${G}`,cause:J});this[jG]=!0,this.prompt=B}static isInstance(B){return I.hasMarker(B,BJ)}},GJ="AI_InvalidResponseDataError",JJ=`vercel.ai.error.${GJ}`,eJ=Symbol.for(JJ),LG,FG,KB=class extends(FG=I,LG=eJ,FG){constructor({data:B,message:G=`Invalid response data: ${JSON.stringify(B)}.`}){super({name:GJ,message:G});this[LG]=!0,this.data=B}static isInstance(B){return I.hasMarker(B,JJ)}},NJ="AI_JSONParseError",QJ=`vercel.ai.error.${NJ}`,BN=Symbol.for(QJ),qG,wG,bB=class extends(wG=I,qG=BN,wG){constructor({text:B,cause:G}){super({name:NJ,message:`JSON parsing failed: Text: ${B}.
|
|
3
3
|
Error message: ${aG(G)}`,cause:G});this[qG]=!0,this.text=B}static isInstance(B){return I.hasMarker(B,QJ)}},XJ="AI_LoadAPIKeyError",YJ=`vercel.ai.error.${XJ}`,GN=Symbol.for(YJ),EG,PG,OB=class extends(PG=I,EG=GN,PG){constructor({message:B}){super({name:XJ,message:B});this[EG]=!0}static isInstance(B){return I.hasMarker(B,YJ)}},ZJ="AI_LoadSettingError",$J=`vercel.ai.error.${ZJ}`,JN=Symbol.for($J),OG,HG,XX=class extends(HG=I,OG=JN,HG){constructor({message:B}){super({name:ZJ,message:B});this[OG]=!0}static isInstance(B){return I.hasMarker(B,$J)}},WJ="AI_NoContentGeneratedError",zJ=`vercel.ai.error.${WJ}`,NN=Symbol.for(zJ),SG,yG,rB=class extends(yG=I,SG=NN,yG){constructor({message:B="No content generated."}={}){super({name:WJ,message:B});this[SG]=!0}static isInstance(B){return I.hasMarker(B,zJ)}},jJ="AI_NoSuchModelError",KJ=`vercel.ai.error.${jJ}`,QN=Symbol.for(KJ),AG,VG,YX=class extends(VG=I,AG=QN,VG){constructor({errorName:B=jJ,modelId:G,modelType:J,message:N=`No such ${J}: ${G}`}){super({name:B,message:N});this[AG]=!0,this.modelId=G,this.modelType=J}static isInstance(B){return I.hasMarker(B,KJ)}},LJ="AI_TooManyEmbeddingValuesForCallError",FJ=`vercel.ai.error.${LJ}`,XN=Symbol.for(FJ),bG,MG,ZX=class extends(MG=I,bG=XN,MG){constructor(B){super({name:LJ,message:`Too many values for a single embedding call. The ${B.provider} model "${B.modelId}" can only embed up to ${B.maxEmbeddingsPerCall} values per call, but ${B.values.length} values were provided.`});this[bG]=!0,this.provider=B.provider,this.modelId=B.modelId,this.maxEmbeddingsPerCall=B.maxEmbeddingsPerCall,this.values=B.values}static isInstance(B){return I.hasMarker(B,FJ)}},qJ="AI_TypeValidationError",wJ=`vercel.ai.error.${qJ}`,YN=Symbol.for(wJ),TG,UG,FB=class B extends(UG=I,TG=YN,UG){constructor({value:G,cause:J}){super({name:qJ,message:`Type validation failed: Value: ${JSON.stringify(G)}.
|
|
4
4
|
Error message: ${aG(J)}`,cause:J});this[TG]=!0,this.value=G}static isInstance(G){return I.hasMarker(G,wJ)}static wrap({value:G,cause:J}){return B.isInstance(J)&&J.value===G?J:new B({value:G,cause:J})}},EJ="AI_UnsupportedFunctionalityError",PJ=`vercel.ai.error.${EJ}`,ZN=Symbol.for(PJ),xG,kG,BB=class extends(kG=I,xG=ZN,kG){constructor({functionality:B,message:G=`'${B}' functionality not supported.`}){super({name:EJ,message:G});this[xG]=!0,this.functionality=B}static isInstance(B){return I.hasMarker(B,PJ)}},DG=class extends Error{constructor(B,G){super(B),this.name="ParseError",this.type=G.type,this.field=G.field,this.value=G.value,this.line=G.line}};function CB(B){}function $N(B){if(typeof B=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:G=CB,onError:J=CB,onRetry:N=CB,onComment:X}=B,Y="",Z=!0,$,z="",j="";function E(K){let V=Z?K.replace(/^\xEF\xBB\xBF/,""):K,[F,x]=WN(`${Y}${V}`);for(let C of F)P(C);Y=x,Z=!1}function P(K){if(K===""){L();return}if(K.startsWith(":")){X&&X(K.slice(K.startsWith(": ")?2:1));return}let V=K.indexOf(":");if(V!==-1){let F=K.slice(0,V),x=K[V+1]===" "?2:1,C=K.slice(V+x);q(F,C,K);return}q(K,"",K)}function q(K,V,F){switch(K){case"event":j=V;break;case"data":z=`${z}${V}
|
|
5
5
|
`;break;case"id":$=V.includes("\x00")?void 0:V;break;case"retry":/^\d+$/.test(V)?N(parseInt(V,10)):J(new DG(`Invalid \`retry\` value: "${V}"`,{type:"invalid-retry",value:V,line:F}));break;default:J(new DG(`Unknown field "${K.length>20?`${K.slice(0,20)}\u2026`:K}"`,{type:"unknown-field",field:K,value:V,line:F}));break}}function L(){z.length>0&&G({id:$,event:j||void 0,data:z.endsWith(`
|
|
@@ -7,4 +7,4 @@ params: ${Z}`);if(this.query=Y,this.params=Z,this.cause=$,Error.captureStackTrac
|
|
|
7
7
|
created_at numeric,
|
|
8
8
|
name text,
|
|
9
9
|
applied_at TEXT
|
|
10
|
-
)`;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 _=cZ({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 YX=class{static[J]="SQLiteQueryBuilder";dialect;dialectConfig;constructor(X){this.dialect=D(X,MX)?X:void 0,this.dialectConfig=D(X,MX)?void 0:X}$with=(X,Y)=>{let Z=this;return{as:(G)=>{if(typeof G==="function")G=G(Z);return new Proxy(new WX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new b({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...X){let Y=this;function Z(G){return new X1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X})}function $(G){return new X1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X,distinct:!0})}return{select:Z,selectDistinct:$}}select(X){return new X1({fields:X??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(X){return new X1({fields:X??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new xX(this.dialectConfig);return this.dialect}};var KX=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 g(_,G[H])}return $});return new tX(this.table,Y,this.session,this.dialect,this.withList)}select(X){let Y=typeof X==="function"?X(new YX):X;if(!D(Y,x)&&!q1(this.table[n],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 tX(this.table,Y,this.session,this.dialect,this.withList,!0)}},tX=class extends c{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[v.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,JX(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:e(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 kX=class{static[J]="SQLiteUpdateBuilder";constructor(X,Y,Z,$){this.table=X,this.session=Y,this.dialect=Z,this.withList=$}set(X){return new sZ(this.table,JX(this.table,X),this.session,this.dialect,this.withList)}},sZ=class extends c{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 $=v1(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,v)?Y[A.Symbol.Columns]:D(Y,T)?Y._.selectedFields:D(Y,L1)?Y[Q].selectedFields:void 0:void 0;Z=Z(new Proxy(this.config.table[A.Symbol.Columns],new b({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),G&&new Proxy(G,new b({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 b({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[v.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:e(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 NX=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 LZ(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 pZ(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 YX(Z.dialect));return new Proxy(new WX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new b({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count(X,Y){return new BZ({source:X,filters:Y,session:this.session})}with(...X){let Y=this;function Z(z){return new X1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X})}function $(z){return new X1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X,distinct:!0})}function G(z){return new kX(z,Y.session,Y.dialect,X)}function H(z){return new KX(z,Y.session,Y.dialect,X)}function _(z){return new VX(z,Y.session,Y.dialect,X)}return{select:Z,selectDistinct:$,update:G,insert:H,delete:_}}select(X){return new X1({fields:X??void 0,session:this.session,dialect:this.dialect})}selectDistinct(X){return new X1({fields:X??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update(X){return new kX(X,this.session,this.dialect)}$cache;insert(X){return new KX(X,this.session,this.dialect)}delete(X){return new VX(X,this.session,this.dialect)}run(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new XX(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 XX(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 XX(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 XX(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 P2=class{static[J]="Cache"},tZ=class extends P2{static[J]="NoopCache";strategy(){return"all"}async get(X){}async put(X,Y,Z,$){}async onMutate(X){}};async function nX(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 nZ=class extends c{static[J]="ExecuteResultSync";constructor(X){super();this.resultCb=X}async execute(){return this.resultCb()}sync(){return this.resultCb()}},iX=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,tZ)||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 nX(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 nX(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 nZ(()=>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)}}},lX=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")}},aX=class extends NX{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 TZ}};var XY=class extends lX{static[J]="SQLiteBunSession";logger;constructor(X,Y,Z,$,G={}){super(Y);this.client=X,this.relations=Z,this.schema=$,this.logger=G.logger??new OY}exec(X){this.client.exec(X)}prepareQuery(X,Y,Z,$,G){return new eX(this.client.prepare(X.sql),X,this.logger,Y,Z,$,G)}prepareRelationalQuery(X,Y,Z,$){return new eX(this.client.prepare(X.sql),X,this.logger,Y,Z,!1,$,!0)}transaction(X,Y={}){let Z=new iZ("sync",this.dialect,this,this.relations,this.schema),$;return this.client.transaction(()=>{$=X(Z)})[Y.behavior??"deferred"](),$}},iZ=class X extends aX{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}}},eX=class extends iX{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)=>BX(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 BX(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 RX}from"bun:sqlite";var lZ=class extends NX{static[J]="SQLiteBunDatabase"};function ZX(X,Y={}){let Z=new xX({casing:Y.casing}),$;if(Y.logger===!0)$=new DY;else if(Y.logger!==!1)$=Y.logger;let G;if(Y.schema){let z=RZ(Y.schema,QZ);G={fullSchema:Y.schema,schema:z.tables,tableNamesMap:z.tableNamesMap}}let H=Y.relations??{},_=new lZ("sync",Z,new XY(X,Z,H,G,{logger:$}),H,G);return _.$client=X,_}function YY(...X){if(X[0]===void 0||typeof X[0]==="string")return ZX(X[0]===void 0?new RX:new RX(X[0]),X[1]);let{connection:Y,client:Z,...$}=X[0];if(Z)return ZX(Z,$);if(typeof Y==="object"){let{source:G,...H}=Y;return ZX(new RX(G,Object.values(H).filter((_)=>_!==void 0).length?H:void 0),$)}return ZX(new RX(Y),$)}(function(X){function Y(Z){return ZX({},Z)}X.mock=Y})(YY||(YY={}));export{D as Wl,N as Xl,E0 as Yl,Y0 as Zl,E1 as _l,h as $l,x as am,S1 as bm,$0 as cm,PX as dm,C1 as em,LX as fm,G0 as gm,g as hm,W0 as im,W as jm,l as km,J0 as lm,D1 as mm,y as nm,H0 as om,_0 as pm,TX as qm,SX as rm,D0 as sm,j0 as tm,T0 as um,q as vm,a as wm,h1 as xm,m as ym,V1 as zm,I1 as Am,p1 as Bm,y1 as Cm,f1 as Dm,b1 as Em,d1 as Fm,g1 as Gm,m1 as Hm,c1 as Im,k1 as Jm,N1 as Km,u1 as Lm,r1 as Mm,o1 as Nm,s1 as Om,t1 as Pm,n1 as Qm,qX as Rm,vX as Sm,hX as Tm,M1 as Um,i1 as Vm,_J as Wm,XY as Xm,iZ as Ym,eX as Zm,lZ as _m,YY as $m};
|
|
10
|
+
)`;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 _=cZ({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 YX=class{static[J]="SQLiteQueryBuilder";dialect;dialectConfig;constructor(X){this.dialect=D(X,MX)?X:void 0,this.dialectConfig=D(X,MX)?void 0:X}$with=(X,Y)=>{let Z=this;return{as:(G)=>{if(typeof G==="function")G=G(Z);return new Proxy(new WX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new b({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...X){let Y=this;function Z(G){return new X1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X})}function $(G){return new X1({fields:G??void 0,session:void 0,dialect:Y.getDialect(),withList:X,distinct:!0})}return{select:Z,selectDistinct:$}}select(X){return new X1({fields:X??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(X){return new X1({fields:X??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new xX(this.dialectConfig);return this.dialect}};var KX=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 g(_,G[H])}return $});return new tX(this.table,Y,this.session,this.dialect,this.withList)}select(X){let Y=typeof X==="function"?X(new YX):X;if(!D(Y,x)&&!q1(this.table[n],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 tX(this.table,Y,this.session,this.dialect,this.withList,!0)}},tX=class extends c{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[v.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,JX(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:e(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 kX=class{static[J]="SQLiteUpdateBuilder";constructor(X,Y,Z,$){this.table=X,this.session=Y,this.dialect=Z,this.withList=$}set(X){return new sZ(this.table,JX(this.table,X),this.session,this.dialect,this.withList)}},sZ=class extends c{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 $=v1(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,v)?Y[A.Symbol.Columns]:D(Y,T)?Y._.selectedFields:D(Y,L1)?Y[Q].selectedFields:void 0:void 0;Z=Z(new Proxy(this.config.table[A.Symbol.Columns],new b({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),G&&new Proxy(G,new b({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 b({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[v.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:e(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 NX=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 LZ(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 pZ(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 YX(Z.dialect));return new Proxy(new WX(G.getSQL(),Y??("getSelectedFields"in G?G.getSelectedFields()??{}:{}),X,!0),new b({alias:X,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count(X,Y){return new BZ({source:X,filters:Y,session:this.session})}with(...X){let Y=this;function Z(z){return new X1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X})}function $(z){return new X1({fields:z??void 0,session:Y.session,dialect:Y.dialect,withList:X,distinct:!0})}function G(z){return new kX(z,Y.session,Y.dialect,X)}function H(z){return new KX(z,Y.session,Y.dialect,X)}function _(z){return new VX(z,Y.session,Y.dialect,X)}return{select:Z,selectDistinct:$,update:G,insert:H,delete:_}}select(X){return new X1({fields:X??void 0,session:this.session,dialect:this.dialect})}selectDistinct(X){return new X1({fields:X??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update(X){return new kX(X,this.session,this.dialect)}$cache;insert(X){return new KX(X,this.session,this.dialect)}delete(X){return new VX(X,this.session,this.dialect)}run(X){let Y=typeof X==="string"?W.raw(X):X.getSQL();if(this.resultKind==="async")return new XX(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 XX(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 XX(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 XX(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 P2=class{static[J]="Cache"},tZ=class extends P2{static[J]="NoopCache";strategy(){return"all"}async get(X){}async put(X,Y,Z,$){}async onMutate(X){}};async function nX(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 nZ=class extends c{static[J]="ExecuteResultSync";constructor(X){super();this.resultCb=X}async execute(){return this.resultCb()}sync(){return this.resultCb()}},iX=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,tZ)||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 nX(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 nX(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 nZ(()=>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)}}},lX=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")}},aX=class extends NX{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 TZ}};var XY=class extends lX{static[J]="SQLiteBunSession";logger;constructor(X,Y,Z,$,G={}){super(Y);this.client=X,this.relations=Z,this.schema=$,this.logger=G.logger??new OY}exec(X){this.client.exec(X)}prepareQuery(X,Y,Z,$,G){return new eX(this.client.prepare(X.sql),X,this.logger,Y,Z,$,G)}prepareRelationalQuery(X,Y,Z,$){return new eX(this.client.prepare(X.sql),X,this.logger,Y,Z,!1,$,!0)}transaction(X,Y={}){let Z=new iZ("sync",this.dialect,this,this.relations,this.schema),$;return this.client.transaction(()=>{$=X(Z)})[Y.behavior??"deferred"](),$}},iZ=class X extends aX{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}}},eX=class extends iX{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)=>BX(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 BX(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 RX}from"bun:sqlite";var lZ=class extends NX{static[J]="SQLiteBunDatabase"};function ZX(X,Y={}){let Z=new xX({casing:Y.casing}),$;if(Y.logger===!0)$=new DY;else if(Y.logger!==!1)$=Y.logger;let G;if(Y.schema){let z=RZ(Y.schema,QZ);G={fullSchema:Y.schema,schema:z.tables,tableNamesMap:z.tableNamesMap}}let H=Y.relations??{},_=new lZ("sync",Z,new XY(X,Z,H,G,{logger:$}),H,G);return _.$client=X,_}function YY(...X){if(X[0]===void 0||typeof X[0]==="string")return ZX(X[0]===void 0?new RX:new RX(X[0]),X[1]);let{connection:Y,client:Z,...$}=X[0];if(Z)return ZX(Z,$);if(typeof Y==="object"){let{source:G,...H}=Y;return ZX(new RX(G,Object.values(H).filter((_)=>_!==void 0).length?H:void 0),$)}return ZX(new RX(Y),$)}(function(X){function Y(Z){return ZX({},Z)}X.mock=Y})(YY||(YY={}));export{D as Xl,N as Yl,E0 as Zl,Y0 as _l,E1 as $l,h as am,x as bm,S1 as cm,$0 as dm,PX as em,C1 as fm,LX as gm,G0 as hm,g as im,W0 as jm,W as km,l as lm,J0 as mm,D1 as nm,y as om,H0 as pm,_0 as qm,TX as rm,SX as sm,D0 as tm,j0 as um,T0 as vm,q as wm,a as xm,h1 as ym,m as zm,V1 as Am,I1 as Bm,p1 as Cm,y1 as Dm,f1 as Em,b1 as Fm,d1 as Gm,g1 as Hm,m1 as Im,c1 as Jm,k1 as Km,N1 as Lm,u1 as Mm,r1 as Nm,o1 as Om,s1 as Pm,t1 as Qm,n1 as Rm,qX as Sm,vX as Tm,hX as Um,M1 as Vm,i1 as Wm,_J as Xm,XY as Ym,iZ as Zm,eX as _m,lZ as $m,YY as an};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import P from"fs";import B from"fs";var x;function K(){try{return B.statSync("/.dockerenv"),!0}catch{return!1}}function M(){try{return B.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function y(){if(x===void 0)x=K()||M();return x}var z,Q=()=>{try{return P.statSync("/run/.containerenv"),!0}catch{return!1}};function q(){if(z===void 0)z=Q()||y();return z}import J from"process";import V from"os";import A from"fs";var H=()=>{if(J.platform!=="linux")return!1;if(V.release().toLowerCase().includes("microsoft")){if(q())return!1;return!0}try{if(A.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!q()}catch{}if(A.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||A.existsSync("/run/WSL"))return!q();return!1},L=J.env.__IS_WSL_TEST__?H:H();
|
|
3
|
-
export{q as
|
|
3
|
+
export{q as er,L as fr};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Hq as j,Iq as M,Jq as f,Lq as N,Oq as H,Pq as z,Qq as A,Tq as I,Yq as t}from"./chunk-7nh8vjx4.js";import{Zq as U}from"./chunk-mfg4stzn.js";import{mu as n}from"./chunk-zgj7jx8k.js";import{wz as d}from"./chunk-0mdmqtfr.js";function NJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function VJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}function B(F){return Object.fromEntries([...F.headers])}var{btoa:$F,atob:LF}=globalThis;function TJ(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=LF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function o(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return $F(J)}function _J(F){return F instanceof Uint8Array?o(F):F}function jJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:o(F.data)}`}function kJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var a="AI_DownloadError",s=`vercel.ai.error.${a}`,UF=Symbol.for(s),m,u,O=class extends(u=j,m=UF,u){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:a,message:X,cause:W});this[m]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return j.hasMarker(F,s)}},r=2147483648;async function wF({response:F,url:J,maxBytes:Q=r}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:R}=await Y.read();if(G)break;if($+=R.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(R)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let w=new Uint8Array($),L=0;for(let G of Z)w.set(G,L),L+=G.length;return w}function i(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http or https, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(EF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(e(Q)){if(k(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function e(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function k(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function EF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(e(Q))return k(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,w=Y>>8&255,L=Y&255;return k(`${Z}.${$}.${w}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function SJ(F,J){var Q,W;i(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)i(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await wF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:r}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var GF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new N({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},xJ=GF();function b(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var CF=["fetch failed","failed to fetch"],MF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function KF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&MF.includes(J))return!0;return!1}function qF({error:F,url:J,requestBodyValues:Q}){if(b(F))return F;if(F instanceof TypeError&&CF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new M({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(KF(F))return new M({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function DF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function OF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function IF(F,...J){let Q=new Headers(OF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var PF="4.0.21";var zF="JSON schema:",AF="You MUST answer with a JSON object that matches the JSON schema above.",HF="You MUST answer with JSON.";function BF({prompt:F,schema:J,schemaPrefix:Q=J!=null?zF:void 0,schemaSuffix:W=J!=null?AF:HF}){return[F!=null&&F.length>0?F:void 0,F!=null&&F.length>0?"":void 0,Q,J!=null?JSON.stringify(J):void 0,W].filter((X)=>X!=null).join(`
|
|
3
3
|
`)}function yJ({messages:F,schema:J,schemaPrefix:Q,schemaSuffix:W}){var X,Y;let Z=((X=F[0])==null?void 0:X.role)==="system"?{...F[0]}:{role:"system",content:""};return Z.content=BF({prompt:Z.content,schema:J,schemaPrefix:Q,schemaSuffix:W}),[Z,...((Y=F[0])==null?void 0:Y.role)==="system"?F.slice(1):F]}function hJ(F){return F!=null}function uJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new z({message:`${W} API key must be a string.`});if(typeof process>"u")throw new z({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables is not supported in this environment.`});if(F=process.env[J],F==null)throw new z({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new z({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function pJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} setting must be a string.`});if(typeof process>"u")throw new A({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables is not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function lJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var RF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,NF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function p(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(RF.test(F)===!1&&NF.test(F)===!1)return J;return VF(J)}function VF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return p(F)}try{return p(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var TF=Symbol("Let zodToJsonSchema decide on which parser to use"),l={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},_F=(F)=>typeof F==="string"?{...l,name:F}:{...l,...F};function K(){return{}}function jF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==U.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function kF(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function bF(){return{type:"boolean"}}function FF(F,J){return E(F.type._def,J)}var SF=(F,J)=>{return E(F.innerType._def,J)};function JF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>JF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return gF(F)}}var gF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function xF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function vF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function yF(F){return{type:"string",enum:Array.from(F.values)}}var hF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function mF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(hF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function uF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var T=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(T===void 0)T=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return T},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function QF(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":C(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":C(Q,W.regex,W.message,J);break;case"cuid":C(Q,q.cuid,W.message,J);break;case"cuid2":C(Q,q.cuid2,W.message,J);break;case"startsWith":C(Q,RegExp(`^${_(W.value,J)}`),W.message,J);break;case"endsWith":C(Q,RegExp(`${_(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{C(Q,RegExp(_(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":C(Q,q.base64url,W.message,J);break;case"jwt":C(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")C(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")C(Q,q.ipv6Cidr,W.message,J);break}case"emoji":C(Q,q.emoji(),W.message,J);break;case"ulid":{C(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{C(Q,q.base64,W.message,J);break}}break}case"nanoid":C(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function _(F,J){return J.patternStrategy==="escape"?pF(F):F}var iF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function pF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!iF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function C(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:c(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=c(J,W)}function c(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,w=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(w)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),w=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],w=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(X[L]==="$"){Y+=`($|(?=[\r
|
|
5
5
|
]))`;continue}}if(W.s&&X[L]==="."){Y+=$?`${X[L]}\r
|
|
6
6
|
`:`[${X[L]}\r
|
|
7
7
|
]`;continue}if(Y+=X[L],X[L]==="\\")Z=!0;else if($&&X[L]==="]")$=!1;else if(!$&&X[L]==="[")$=!0}try{new RegExp(Y)}catch(L){return console.warn(`Could not convert regex pattern at ${J.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),F.source}return Y}function WF(F,J){var Q,W,X,Y,Z,$;let w={type:"object",additionalProperties:(Q=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]}))!=null?Q:J.allowedAdditionalProperties};if(((W=F.keyType)==null?void 0:W._def.typeName)===U.ZodString&&((X=F.keyType._def.checks)==null?void 0:X.length)){let{type:L,...G}=QF(F.keyType._def,J);return{...w,propertyNames:G}}else if(((Y=F.keyType)==null?void 0:Y._def.typeName)===U.ZodEnum)return{...w,propertyNames:{enum:F.keyType._def.values}};else if(((Z=F.keyType)==null?void 0:Z._def.typeName)===U.ZodBranded&&F.keyType._def.type._def.typeName===U.ZodString&&(($=F.keyType._def.type._def.checks)==null?void 0:$.length)){let{type:L,...G}=FF(F.keyType._def,J);return{...w,propertyNames:G}}return w}function lF(F,J){if(J.mapStrategy==="record")return WF(F,J);let Q=E(F.keyType._def,{...J,currentPath:[...J.currentPath,"items","items","0"]})||K(),W=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items","items","1"]})||K();return{type:"array",maxItems:125,items:{type:"array",items:[Q,W],minItems:2,maxItems:2}}}function cF(F){let J=F.values,W=Object.keys(F.values).filter((Y)=>{return typeof J[J[Y]]!=="number"}).map((Y)=>J[Y]),X=Array.from(new Set(W.map((Y)=>typeof Y)));return{type:X.length===1?X[0]==="string"?"string":"number":["string","number"],enum:W}}function dF(){return{not:K()}}function nF(){return{type:"null"}}var S={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function fF(F,J){let Q=F.options instanceof Map?Array.from(F.options.values()):F.options;if(Q.every((W)=>(W._def.typeName in S)&&(!W._def.checks||!W._def.checks.length))){let W=Q.reduce((X,Y)=>{let Z=S[Y._def.typeName];return Z&&!X.includes(Z)?[...X,Z]:X},[]);return{type:W.length>1?W:W[0]}}else if(Q.every((W)=>W._def.typeName==="ZodLiteral"&&!W.description)){let W=Q.reduce((X,Y)=>{let Z=typeof Y._def.value;switch(Z){case"string":case"number":case"boolean":return[...X,Z];case"bigint":return[...X,"integer"];case"object":if(Y._def.value===null)return[...X,"null"];case"symbol":case"undefined":case"function":default:return X}},[]);if(W.length===Q.length){let X=W.filter((Y,Z,$)=>$.indexOf(Y)===Z);return{type:X.length>1?X:X[0],enum:Q.reduce((Y,Z)=>{return Y.includes(Z._def.value)?Y:[...Y,Z._def.value]},[])}}}else if(Q.every((W)=>W._def.typeName==="ZodEnum"))return{type:"string",enum:Q.reduce((W,X)=>[...W,...X._def.values.filter((Y)=>!W.includes(Y))],[])};return tF(F,J)}var tF=(F,J)=>{let Q=(F.options instanceof Map?Array.from(F.options.values()):F.options).map((W,X)=>E(W._def,{...J,currentPath:[...J.currentPath,"anyOf",`${X}`]})).filter((W)=>!!W&&(!J.strictUnions||typeof W==="object"&&Object.keys(W).length>0));return Q.length?{anyOf:Q}:void 0};function oF(F,J){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(F.innerType._def.typeName)&&(!F.innerType._def.checks||!F.innerType._def.checks.length))return{type:[S[F.innerType._def.typeName],"null"]};let Q=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","0"]});return Q&&{anyOf:[Q,{type:"null"}]}}function aF(F){let J={type:"number"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"int":J.type="integer";break;case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function sF(F,J){let Q={type:"object",properties:{}},W=[],X=F.shape();for(let Z in X){let $=X[Z];if($===void 0||$._def===void 0)continue;let w=eF($),L=E($._def,{...J,currentPath:[...J.currentPath,"properties",Z],propertyPath:[...J.currentPath,"properties",Z]});if(L===void 0)continue;if(Q.properties[Z]=L,!w)W.push(Z)}if(W.length)Q.required=W;let Y=rF(F,J);if(Y!==void 0)Q.additionalProperties=Y;return Q}function rF(F,J){if(F.catchall._def.typeName!=="ZodNever")return E(F.catchall._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]});switch(F.unknownKeys){case"passthrough":return J.allowedAdditionalProperties;case"strict":return J.rejectedAdditionalProperties;case"strip":return J.removeAdditionalStrategy==="strict"?J.allowedAdditionalProperties:J.rejectedAdditionalProperties}}function eF(F){try{return F.isOptional()}catch(J){return!0}}var FJ=(F,J)=>{var Q;if(J.currentPath.toString()===((Q=J.propertyPath)==null?void 0:Q.toString()))return E(F.innerType._def,J);let W=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","1"]});return W?{anyOf:[{not:K()},W]}:K()},JJ=(F,J)=>{if(J.pipeStrategy==="input")return E(F.in._def,J);else if(J.pipeStrategy==="output")return E(F.out._def,J);let Q=E(F.in._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),W=E(F.out._def,{...J,currentPath:[...J.currentPath,"allOf",Q?"1":"0"]});return{allOf:[Q,W].filter((X)=>X!==void 0)}};function QJ(F,J){return E(F.type._def,J)}function WJ(F,J){let W={type:"array",uniqueItems:!0,items:E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};if(F.minSize)W.minItems=F.minSize.value;if(F.maxSize)W.maxItems=F.maxSize.value;return W}function XJ(F,J){if(F.rest)return{type:"array",minItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[]),additionalItems:E(F.rest._def,{...J,currentPath:[...J.currentPath,"additionalItems"]})};else return{type:"array",minItems:F.items.length,maxItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[])}}function YJ(){return{not:K()}}function ZJ(){return K()}var $J=(F,J)=>{return E(F.innerType._def,J)},LJ=(F,J,Q)=>{switch(J){case U.ZodString:return QF(F,Q);case U.ZodNumber:return aF(F);case U.ZodObject:return sF(F,Q);case U.ZodBigInt:return kF(F);case U.ZodBoolean:return bF();case U.ZodDate:return JF(F,Q);case U.ZodUndefined:return YJ();case U.ZodNull:return nF();case U.ZodArray:return jF(F,Q);case U.ZodUnion:case U.ZodDiscriminatedUnion:return fF(F,Q);case U.ZodIntersection:return mF(F,Q);case U.ZodTuple:return XJ(F,Q);case U.ZodRecord:return WF(F,Q);case U.ZodLiteral:return uF(F);case U.ZodEnum:return yF(F);case U.ZodNativeEnum:return cF(F);case U.ZodNullable:return oF(F,Q);case U.ZodOptional:return FJ(F,Q);case U.ZodMap:return lF(F,Q);case U.ZodSet:return WJ(F,Q);case U.ZodLazy:return()=>F.getter()._def;case U.ZodPromise:return QJ(F,Q);case U.ZodNaN:case U.ZodNever:return dF();case U.ZodEffects:return vF(F,Q);case U.ZodAny:return K();case U.ZodUnknown:return ZJ();case U.ZodDefault:return xF(F,Q);case U.ZodBranded:return FF(F,Q);case U.ZodReadonly:return $J(F,Q);case U.ZodCatch:return SF(F,Q);case U.ZodPipeline:return JJ(F,Q);case U.ZodFunction:case U.ZodVoid:case U.ZodSymbol:return;default:return((W)=>{return})(J)}},UJ=(F,J)=>{let Q=0;for(;Q<F.length&&Q<J.length;Q++)if(F[Q]!==J[Q])break;return[(F.length-Q).toString(),...J.slice(Q)].join("/")};function E(F,J,Q=!1){var W;let X=J.seen.get(F);if(J.override){let w=(W=J.override)==null?void 0:W.call(J,F,J,X,Q);if(w!==TF)return w}if(X&&!Q){let w=wJ(X,J);if(w!==void 0)return w}let Y={def:F,path:J.currentPath,jsonSchema:void 0};J.seen.set(F,Y);let Z=LJ(F,F.typeName,J),$=typeof Z==="function"?E(Z(),J):Z;if($)EJ(F,J,$);if(J.postProcess){let w=J.postProcess($,F,J);return Y.jsonSchema=$,w}return Y.jsonSchema=$,$}var wJ=(F,J)=>{switch(J.$refStrategy){case"root":return{$ref:F.path.join("/")};case"relative":return{$ref:UJ(J.currentPath,F.path)};case"none":case"seen":{if(F.path.length<J.currentPath.length&&F.path.every((Q,W)=>J.currentPath[W]===Q))return console.warn(`Recursive reference detected at ${J.currentPath.join("/")}! Defaulting to any`),K();return J.$refStrategy==="seen"?K():void 0}}},EJ=(F,J,Q)=>{if(F.description)Q.description=F.description;return Q},GJ=(F)=>{let J=_F(F),Q=J.name!==void 0?[...J.basePath,J.definitionPath,J.name]:J.basePath;return{...J,currentPath:Q,propertyPath:void 0,seen:new Map(Object.entries(J.definitions).map(([W,X])=>[X._def,{def:X._def,path:[...J.basePath,J.definitionPath,W],jsonSchema:void 0}]))}},CJ=(F,J)=>{var Q;let W=GJ(J),X=typeof J==="object"&&J.definitions?Object.entries(J.definitions).reduce((L,[G,R])=>{var h;return{...L,[G]:(h=E(R._def,{...W,currentPath:[...W.basePath,W.definitionPath,G]},!0))!=null?h:K()}},{}):void 0,Y=typeof J==="string"?J:(J==null?void 0:J.nameStrategy)==="title"?void 0:J==null?void 0:J.name,Z=(Q=E(F._def,Y===void 0?W:{...W,currentPath:[...W.basePath,W.definitionPath,Y]},!1))!=null?Q:K(),$=typeof J==="object"&&J.name!==void 0&&J.nameStrategy==="title"?J.name:void 0;if($!==void 0)Z.title=$;let w=Y===void 0?X?{...Z,[W.definitionPath]:X}:Z:{$ref:[...W.$refStrategy==="relative"?[]:W.basePath,W.definitionPath,Y].join("/"),[W.definitionPath]:{...X,[Y]:Z}};return w.$schema="http://json-schema.org/draft-07/schema#",w},g=Symbol.for("vercel.ai.schema");function aJ(F){let J;return()=>{if(J==null)J=F();return J}}function V(F,{validate:J}={}){return{[g]:!0,_type:void 0,get jsonSchema(){if(typeof F==="function")F=F();return F},validate:J}}function MJ(F){return typeof F==="object"&&F!==null&&g in F&&F[g]===!0&&"jsonSchema"in F&&"validate"in F}function KJ(F){return F==null?V({properties:{},additionalProperties:!1}):MJ(F)?F:("~standard"in F)?F["~standard"].vendor==="zod"?PJ(F):qJ(F):F()}function qJ(F){return V(()=>v(F["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(J)=>{let Q=await F["~standard"].validate(J);return"value"in Q?{success:!0,value:Q.value}:{success:!1,error:new I({value:J,cause:Q.issues})}}})}function DJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return V(()=>CJ(F,{$refStrategy:W?"root":"none"}),{validate:async(X)=>{let Y=await F.safeParseAsync(X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function OJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return V(()=>v(d(F,{target:"draft-7",io:"input",reused:W?"ref":"inline"})),{validate:async(X)=>{let Y=await n(F,X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function IJ(F){return"_zod"in F}function PJ(F,J){if(IJ(F))return OJ(F,J);else return DJ(F,J)}async function zJ({value:F,schema:J,context:Q}){let W=await y({value:F,schema:J,context:Q});if(!W.success)throw I.wrap({value:F,cause:W.error,context:Q});return W.value}async function y({value:F,schema:J,context:Q}){let W=KJ(J);try{if(W.validate==null)return{success:!0,value:F,rawValue:F};let X=await W.validate(F);if(X.success)return{success:!0,value:X.value,rawValue:F};return{success:!1,error:I.wrap({value:F,cause:X.error,context:Q}),rawValue:F}}catch(X){return{success:!1,error:I.wrap({value:F,cause:X,context:Q}),rawValue:F}}}async function AJ({text:F,schema:J}){try{let Q=x(F);if(J==null)return Q;return zJ({value:Q,schema:J})}catch(Q){if(H.isInstance(Q)||I.isInstance(Q))throw Q;throw new H({text:F,cause:Q})}}async function XF({text:F,schema:J}){try{let Q=x(F);if(J==null)return{success:!0,value:Q,rawValue:Q};return await y({value:Q,schema:J})}catch(Q){return{success:!1,error:H.isInstance(Q)?Q:new H({text:F,cause:Q}),rawValue:void 0}}}function sJ(F){try{return x(F),!0}catch(J){return!1}}function HJ({stream:F,schema:J}){return F.pipeThrough(new TextDecoderStream).pipeThrough(new t).pipeThrough(new TransformStream({async transform({data:Q},W){if(Q==="[DONE]")return;W.enqueue(await XF({text:Q,schema:J}))}}))}async function FQ({provider:F,providerOptions:J,schema:Q}){if((J==null?void 0:J[F])==null)return;let W=await y({value:J[F],schema:Q});if(!W.success)throw new N({argument:"providerOptions",message:`invalid ${F} provider options`,cause:W.error});return W.value}var BJ=()=>globalThis.fetch,QQ=async({url:F,headers:J,body:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>YF({url:F,headers:{"Content-Type":"application/json",...J},body:{content:JSON.stringify(Q),values:Q},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),WQ=async({url:F,headers:J,formData:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>YF({url:F,headers:J,body:{content:Q,values:Object.fromEntries(Q.entries())},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),YF=async({url:F,headers:J={},body:Q,successfulResponseHandler:W,failedResponseHandler:X,abortSignal:Y,fetch:Z=BJ()})=>{try{let $=await Z(F,{method:"POST",headers:IF(J,`ai-sdk/provider-utils/${PF}`,DF()),body:Q.content,signal:Y}),w=B($);if(!$.ok){let L;try{L=await X({response:$,url:F,requestBodyValues:Q.values})}catch(G){if(b(G)||M.isInstance(G))throw G;throw new M({message:"Failed to process error response",cause:G,statusCode:$.status,url:F,responseHeaders:w,requestBodyValues:Q.values})}throw L.value}try{return await W({response:$,url:F,requestBodyValues:Q.values})}catch(L){if(L instanceof Error){if(b(L)||M.isInstance(L))throw L}throw new M({message:"Failed to process successful response",cause:L,statusCode:$.status,url:F,responseHeaders:w,requestBodyValues:Q.values})}}catch($){throw qF({error:$,url:F,requestBodyValues:Q.values})}};function ZF(F){return F}function XQ({id:F,inputSchema:J}){return({execute:Q,outputSchema:W,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:w,...L})=>ZF({type:"provider",id:F,args:L,inputSchema:J,outputSchema:W,execute:Q,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:w})}function YQ({id:F,inputSchema:J,outputSchema:Q,supportsDeferredResults:W}){return({execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:w,onInputAvailable:L,...G})=>ZF({type:"provider",id:F,args:G,inputSchema:J,outputSchema:Q,execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:w,onInputAvailable:L,supportsDeferredResults:W})}var $Q=({errorSchema:F,errorToMessage:J,isRetryable:Q})=>async({response:W,url:X,requestBodyValues:Y})=>{let Z=await W.text(),$=B(W);if(Z.trim()==="")return{responseHeaders:$,value:new M({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})};try{let w=await AJ({text:Z,schema:F});return{responseHeaders:$,value:new M({message:J(w),url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,data:w,isRetryable:Q==null?void 0:Q(W,w)})}}catch(w){return{responseHeaders:$,value:new M({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})}}},LQ=(F)=>async({response:J})=>{let Q=B(J);if(J.body==null)throw new f({});return{responseHeaders:Q,value:HJ({stream:J.body,schema:F})}},UQ=(F)=>async({response:J,url:Q,requestBodyValues:W})=>{let X=await J.text(),Y=await XF({text:X,schema:F}),Z=B(J);if(!Y.success)throw new M({message:"Invalid JSON response",cause:Y.error,statusCode:J.status,responseHeaders:Z,responseBody:X,url:Q,requestBodyValues:W});return{responseHeaders:Z,value:Y.value,rawValue:Y.rawValue}},wQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=B(F);if(!F.body)throw new M({message:"Response body is empty",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0});try{let X=await F.arrayBuffer();return{responseHeaders:W,value:new Uint8Array(X)}}catch(X){throw new M({message:"Failed to read response as array buffer",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0,cause:X})}};function EQ(F){return F==null?void 0:F.replace(/\/$/,"")}
|
|
8
|
-
export{NJ as
|
|
8
|
+
export{NJ as Ue,VJ as Ve,TJ as We,o as Xe,_J as Ye,jJ as Ze,kJ as _e,SJ as $e,xJ as af,IF as bf,yJ as cf,hJ as df,uJ as ef,pJ as ff,lJ as gf,aJ as hf,PJ as if,zJ as jf,AJ as kf,sJ as lf,FQ as mf,QQ as nf,WQ as of,XQ as pf,YQ as qf,$Q as rf,LQ as sf,UQ as tf,wQ as uf,EQ as vf};
|