@qitqode/qitqode-android-arm64 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-gn9p1d50.js → chunk-01gwb793.js} +1 -1
- package/bundle/{chunk-4kse3awh.js → chunk-0304b7xg.js} +1 -1
- package/bundle/{chunk-k9d927xe.js → chunk-05amr7y9.js} +1 -1
- package/bundle/{chunk-am73j1bt.js → chunk-06x1p3t4.js} +1 -1
- package/bundle/{chunk-9798jffg.js → chunk-07net7s8.js} +1 -1
- package/bundle/chunk-08y06vgt.js +3 -0
- package/bundle/chunk-09ecxdmd.js +2 -0
- package/bundle/{chunk-6mscvf6y.js → chunk-0cehm5fn.js} +1 -1
- package/bundle/chunk-0jaj2g7x.js +2 -0
- package/bundle/{chunk-7gczzccz.js → chunk-0m2tj2h9.js} +1 -1
- package/bundle/{chunk-srf73nm4.js → chunk-0mekr486.js} +1 -1
- package/bundle/{chunk-gen6f3dn.js → chunk-0ndvy0nh.js} +2 -2
- package/bundle/chunk-0nr2925m.js +2 -0
- package/bundle/chunk-0vqrakhw.js +3 -0
- package/bundle/{chunk-vf1r5ckp.js → chunk-0w5npkgr.js} +1 -1
- package/bundle/chunk-0wbq1y92.js +2 -0
- package/bundle/chunk-12pxszgn.js +2 -0
- package/bundle/chunk-1337582e.js +2 -0
- package/bundle/{chunk-hxgb0y1w.js → chunk-14ag9ea0.js} +1 -1
- package/bundle/chunk-182jf8fz.js +2 -0
- package/bundle/chunk-1ht3zcsh.js +2 -0
- package/bundle/{chunk-fhng5her.js → chunk-1n4w8dya.js} +2 -2
- package/bundle/{chunk-g7vkkmsk.js → chunk-1qbm1k9y.js} +3 -3
- package/bundle/{chunk-apq38bt4.js → chunk-1xkwm21b.js} +3 -3
- package/bundle/{chunk-3tkp27x7.js → chunk-1xpx1t40.js} +2 -2
- package/bundle/{chunk-w1atxyz0.js → chunk-1yx4jesj.js} +1 -1
- package/bundle/chunk-25zkavr0.js +2 -0
- package/bundle/{chunk-4k149ews.js → chunk-28vnspd4.js} +1 -1
- package/bundle/chunk-2cm91ktc.js +3 -0
- package/bundle/chunk-2jfd82jk.js +2 -0
- package/bundle/{chunk-ve5gb789.js → chunk-2jn2hd12.js} +2 -2
- package/bundle/chunk-2k7bbzj2.js +2 -0
- package/bundle/{chunk-7yf15a3a.js → chunk-2kdn66xt.js} +1 -1
- package/bundle/{chunk-99n6czag.js → chunk-2q76qax6.js} +2 -2
- package/bundle/{chunk-8pe047p0.js → chunk-2sy1wx99.js} +1 -1
- package/bundle/{chunk-8651hq0k.js → chunk-2yb59jwr.js} +1 -1
- package/bundle/chunk-30081kwd.js +2 -0
- package/bundle/{chunk-g0v9g37f.js → chunk-32zrch7h.js} +1 -1
- package/bundle/{chunk-7y3y3j51.js → chunk-3bb7y9pq.js} +2 -2
- package/bundle/{chunk-jz3aav8a.js → chunk-3kdhvq0p.js} +2 -2
- package/bundle/{chunk-m8djypsy.js → chunk-3rgct4bd.js} +1 -1
- package/bundle/{chunk-frdc3ysq.js → chunk-3s0d17xe.js} +1 -1
- package/bundle/chunk-3vag59se.js +2 -0
- package/bundle/{chunk-j1a64ade.js → chunk-3w64fpwn.js} +2 -2
- package/bundle/chunk-3x5v6sjw.js +2 -0
- package/bundle/{chunk-hqg5qbxk.js → chunk-3zn71txs.js} +1 -1
- package/bundle/{chunk-3vbtra1j.js → chunk-41ftye7w.js} +1 -1
- package/bundle/chunk-43ep9d7a.js +2 -0
- package/bundle/chunk-48j09m6e.js +3 -0
- package/bundle/{chunk-6szvs3k9.js → chunk-4920vf6a.js} +1 -1
- package/bundle/{chunk-wa2ce2sg.js → chunk-49tqzsy0.js} +2 -2
- package/bundle/{chunk-cvchztkc.js → chunk-49ypxzfx.js} +1 -1
- package/bundle/{chunk-6nhje520.js → chunk-4k70wrhf.js} +1 -1
- package/bundle/{chunk-tk3bve0x.js → chunk-4nck07pc.js} +2 -2
- package/bundle/chunk-4qqja22v.js +2 -0
- package/bundle/{chunk-23geekk5.js → chunk-54pk7nna.js} +1 -1
- package/bundle/{chunk-ewyk4py6.js → chunk-56pwz1kk.js} +1 -1
- package/bundle/{chunk-2y8qz8te.js → chunk-56qm8xpt.js} +1 -1
- package/bundle/{chunk-y3n31nnx.js → chunk-58gp7wbg.js} +2 -2
- package/bundle/{chunk-9easaxy7.js → chunk-5dm3p5r6.js} +1 -1
- package/bundle/chunk-5gazgxt5.js +2 -0
- package/bundle/{chunk-0ae5q6ck.js → chunk-5jtd006j.js} +2 -2
- package/bundle/{chunk-t488d66k.js → chunk-5mec6cde.js} +1 -1
- package/bundle/{chunk-gvzfffr4.js → chunk-5yaahmjb.js} +1 -1
- package/bundle/{chunk-jbd9k041.js → chunk-5ymj2q6j.js} +2 -2
- package/bundle/{chunk-ebjhggdw.js → chunk-613kegcn.js} +1 -1
- package/bundle/chunk-63znhwx0.js +2 -0
- package/bundle/{chunk-zavtsfxz.js → chunk-6fpfr8tk.js} +1 -1
- package/bundle/{chunk-0pvbk8ks.js → chunk-6h2faxs9.js} +2 -2
- package/bundle/chunk-6hmyy7n6.js +2 -0
- package/bundle/{chunk-78bajmqm.js → chunk-6nk3wx6f.js} +1 -1
- package/bundle/{chunk-1jsywey3.js → chunk-6nkcfncg.js} +1 -1
- package/bundle/{chunk-ps543k72.js → chunk-6s2f5sv4.js} +1 -1
- package/bundle/{chunk-dcx8hjbs.js → chunk-6vb26adv.js} +1 -1
- package/bundle/{chunk-r48g0kaq.js → chunk-6wdwwpsc.js} +2 -2
- package/bundle/{chunk-8r79zf3y.js → chunk-77e1wh0j.js} +2 -2
- package/bundle/chunk-7dyddrpk.js +2 -0
- package/bundle/{chunk-4d1a547n.js → chunk-7e1aw8rw.js} +1 -1
- package/bundle/{chunk-ac202abt.js → chunk-7ez3ye6e.js} +1 -1
- package/bundle/{chunk-wfnk2vsd.js → chunk-7fmy4cvn.js} +1 -1
- package/bundle/{chunk-82gs5cmn.js → chunk-7n2kpqh5.js} +1 -1
- package/bundle/chunk-7penjsgq.js +2 -0
- package/bundle/chunk-7qxn24qa.js +3 -0
- package/bundle/{chunk-4q9w2yve.js → chunk-7rxsj310.js} +2 -2
- package/bundle/{chunk-dkv2mg97.js → chunk-7ryv0f5h.js} +1 -1
- package/bundle/chunk-7t5gzkj6.js +2 -0
- package/bundle/{chunk-84gnbzky.js → chunk-7tbvr236.js} +1 -1
- package/bundle/{chunk-8cr7ks31.js → chunk-81engf0t.js} +1 -1
- package/bundle/{chunk-cy2586rv.js → chunk-880msfsd.js} +1 -1
- package/bundle/chunk-89vgt8vq.js +2 -0
- package/bundle/{chunk-vftqwdpg.js → chunk-8ahpk8td.js} +1 -1
- package/bundle/{chunk-9f7y0dj0.js → chunk-8bzwgcjb.js} +1 -1
- package/bundle/chunk-8e8n82f9.js +2 -0
- package/bundle/{chunk-xj73j10a.js → chunk-91khd3fq.js} +1 -1
- package/bundle/chunk-97exhw9j.js +2 -0
- package/bundle/chunk-9cvkaht5.js +2 -0
- package/bundle/{chunk-1jh5p5qw.js → chunk-9p83me3p.js} +2 -2
- package/bundle/{chunk-ygj1cy0n.js → chunk-9qtf8khv.js} +1 -1
- package/bundle/{chunk-kaeyhw2n.js → chunk-9wm41z2f.js} +2 -2
- package/bundle/chunk-9zrwbxx0.js +3 -0
- package/bundle/{chunk-q6fbyvpq.js → chunk-admgf65a.js} +1 -1
- package/bundle/{chunk-spm1yy6w.js → chunk-afhg3w2j.js} +1 -1
- package/bundle/chunk-akdvstd9.js +2 -0
- package/bundle/{chunk-w7p2x973.js → chunk-atbm0pnt.js} +2 -2
- package/bundle/chunk-ave2e4sa.js +2 -0
- package/bundle/chunk-axnwehc7.js +2 -0
- package/bundle/{chunk-ns0pswww.js → chunk-b79k456s.js} +1 -1
- package/bundle/chunk-bmzyxspj.js +2 -0
- package/bundle/{chunk-9sy9ws1w.js → chunk-bse8p94q.js} +1 -1
- package/bundle/chunk-bvaqpfv8.js +2 -0
- package/bundle/{chunk-gf4ek7rv.js → chunk-c0k8j498.js} +1 -1
- package/bundle/{chunk-pyq01301.js → chunk-cbmw8fy2.js} +1 -1
- package/bundle/{chunk-cesrhm09.js → chunk-cn10hn58.js} +1 -1
- package/bundle/{chunk-gc9q0x8z.js → chunk-cqhpbfcn.js} +3 -3
- package/bundle/{chunk-jegn6jc3.js → chunk-cr06m77n.js} +2 -2
- package/bundle/{chunk-3wzqs241.js → chunk-crap29f6.js} +1 -1
- package/bundle/chunk-cxb05cdg.js +2 -0
- package/bundle/chunk-cxe92z5c.js +2 -0
- package/bundle/{chunk-b643cra9.js → chunk-cyjzqa5p.js} +195 -195
- package/bundle/{chunk-0w4v0fbs.js → chunk-d2n09yvh.js} +2 -2
- package/bundle/{chunk-fm4xa6yx.js → chunk-d31yrcrn.js} +2 -2
- package/bundle/chunk-d5wp85kw.js +2 -0
- package/bundle/{chunk-6j0365q3.js → chunk-dazye86e.js} +2 -2
- package/bundle/chunk-dm5xnb4t.js +2 -0
- package/bundle/chunk-dpeqsvan.js +2 -0
- package/bundle/chunk-drxtmg5c.js +2 -0
- package/bundle/{chunk-k16hzy2q.js → chunk-dv5zf5gz.js} +1 -1
- package/bundle/{chunk-2qcndbxv.js → chunk-e57d1he9.js} +1 -1
- package/bundle/{chunk-1d64dywx.js → chunk-e58pdw5k.js} +2 -2
- package/bundle/chunk-e9pfdjcy.js +2 -0
- package/bundle/chunk-ejn5hfzd.js +2 -0
- package/bundle/{chunk-hg563h5r.js → chunk-ek1fawsj.js} +2 -2
- package/bundle/{chunk-rvvfs9ps.js → chunk-eq33vmze.js} +1 -1
- package/bundle/{chunk-6sdh1q7g.js → chunk-eqaym8gm.js} +1 -1
- package/bundle/chunk-ernd18jb.js +2 -0
- package/bundle/{chunk-evqxvhdb.js → chunk-ewvgbg68.js} +1 -1
- package/bundle/{chunk-wf09j72q.js → chunk-f3c9667r.js} +2 -2
- package/bundle/{chunk-9nx8hm57.js → chunk-f3rrd2p6.js} +1 -1
- package/bundle/chunk-f416n3mp.js +14 -0
- package/bundle/{chunk-hh3w51wp.js → chunk-f6y7a5w3.js} +2 -2
- package/bundle/{chunk-zeh481tm.js → chunk-fd9zrmhr.js} +2 -2
- package/bundle/chunk-ff9b4cg8.js +2 -0
- package/bundle/{chunk-bas6x25m.js → chunk-fffj9447.js} +2 -2
- package/bundle/{chunk-5y8efy5b.js → chunk-fk3praj7.js} +1 -1
- package/bundle/{chunk-ecwz9nhs.js → chunk-fk8cctjy.js} +2 -2
- package/bundle/{chunk-1y9t7nxn.js → chunk-fkat2pw6.js} +1 -1
- package/bundle/chunk-fpff6a4q.js +2 -0
- package/bundle/chunk-fvy5w4dh.js +7 -0
- package/bundle/{chunk-2gxjjqfx.js → chunk-fx7w497c.js} +1 -1
- package/bundle/{chunk-5rkmhzq0.js → chunk-fxb6vjcb.js} +2 -2
- package/bundle/{chunk-9xvctnjr.js → chunk-g4qwkcdv.js} +1 -1
- package/bundle/{chunk-2eardzxs.js → chunk-g6dgc5af.js} +1 -1
- package/bundle/{chunk-2mmspnr3.js → chunk-g7vahvkz.js} +1 -1
- package/bundle/chunk-g8wvr7a1.js +3 -0
- package/bundle/{chunk-21ejqv4v.js → chunk-gaxbbxk6.js} +1 -1
- package/bundle/chunk-gq361kdt.js +2 -0
- package/bundle/{chunk-n1chdwrs.js → chunk-gxa2r4zc.js} +1 -1
- package/bundle/{chunk-p54bzjtv.js → chunk-h56jxxvj.js} +1 -1
- package/bundle/{chunk-2z6fzwyc.js → chunk-hb4d06q0.js} +2 -2
- package/bundle/chunk-hbagpppv.js +2 -0
- package/bundle/chunk-hf473xav.js +2 -0
- package/bundle/{chunk-gff87y4n.js → chunk-hjratj6g.js} +1 -1
- package/bundle/{chunk-y2jmtfdh.js → chunk-hk8j5ht8.js} +2 -2
- package/bundle/{chunk-jr8qcf99.js → chunk-hkmb3zer.js} +2 -2
- package/bundle/chunk-hr88054m.js +2 -0
- package/bundle/{chunk-ep8zn49w.js → chunk-hybq019j.js} +2 -2
- package/bundle/{chunk-1xyn0sp2.js → chunk-hyckncza.js} +2 -2
- package/bundle/{chunk-wj6aq50n.js → chunk-hz1hd1bd.js} +1 -1
- package/bundle/{chunk-zp2ffbc2.js → chunk-j0ftbmex.js} +2 -2
- package/bundle/chunk-j3czd7v2.js +28 -0
- package/bundle/{chunk-0w0jfzb4.js → chunk-j7zs1yg2.js} +1 -1
- package/bundle/{chunk-xv8gnkh5.js → chunk-j87bvp1b.js} +1 -1
- package/bundle/chunk-j9m2d6t5.js +2 -0
- package/bundle/chunk-jd9edy2s.js +2 -0
- package/bundle/{chunk-4tn69nqs.js → chunk-jdkxeqw5.js} +1 -1
- package/bundle/chunk-jwtdbx31.js +2 -0
- package/bundle/chunk-jzcz92pq.js +8 -0
- package/bundle/{chunk-5h2hcp46.js → chunk-k7h6tfzj.js} +1 -1
- package/bundle/{chunk-dann9gfq.js → chunk-kbg3k1az.js} +1 -1
- package/bundle/{chunk-va4davgy.js → chunk-kbjwdv1x.js} +259 -253
- package/bundle/{chunk-j1veq3zr.js → chunk-kbyk7hyn.js} +2 -2
- package/bundle/{chunk-jr9xnvjq.js → chunk-kfk1zqc1.js} +1 -1
- package/bundle/{chunk-9jf67xb0.js → chunk-kkdgzeva.js} +2 -2
- package/bundle/{chunk-9rqrm9y8.js → chunk-kn318ev4.js} +1 -1
- package/bundle/{chunk-pv8jcpnf.js → chunk-kp84yba1.js} +1 -1
- package/bundle/{chunk-b8ag61vj.js → chunk-kpnfndkg.js} +1 -1
- package/bundle/chunk-krkxrej2.js +2 -0
- package/bundle/{chunk-ms1fd6h4.js → chunk-kvz0vzsn.js} +1 -1
- package/bundle/chunk-m26mcy8p.js +2 -0
- package/bundle/chunk-m62wgqp1.js +2 -0
- package/bundle/chunk-m7txgh5w.js +2 -0
- package/bundle/chunk-m84cn9c6.js +2 -0
- package/bundle/{chunk-kr0fsqas.js → chunk-md7vpe1e.js} +1 -1
- package/bundle/{chunk-yz7rqzby.js → chunk-mg239rc3.js} +3 -3
- package/bundle/chunk-mvc7pvtq.js +2 -0
- package/bundle/{chunk-tsn1jkr7.js → chunk-n07rsssz.js} +1 -1
- package/bundle/{chunk-8717htya.js → chunk-n10atvac.js} +1 -1
- package/bundle/chunk-nfp9xtca.js +3 -0
- package/bundle/{chunk-fdezde1z.js → chunk-ngz5xw45.js} +1 -1
- package/bundle/{chunk-7mhffm9f.js → chunk-njzpswgt.js} +183 -183
- package/bundle/{chunk-najzfhb2.js → chunk-nszqy06d.js} +1 -1
- package/bundle/{chunk-q3x4x2tq.js → chunk-nxjbbq5h.js} +1 -1
- package/bundle/{chunk-jmjg8d8a.js → chunk-p0k4sv89.js} +4 -4
- package/bundle/{chunk-bf146hz2.js → chunk-p31yg62z.js} +2 -2
- package/bundle/chunk-p5t9mq8r.js +2 -0
- package/bundle/chunk-pfbykat1.js +2 -0
- package/bundle/{chunk-bd21p9zz.js → chunk-pfn1db1m.js} +2 -2
- package/bundle/{chunk-1fnmkm0z.js → chunk-pjbbdm96.js} +2 -2
- package/bundle/{chunk-k9g77a02.js → chunk-pnj8s20t.js} +1 -1
- package/bundle/{chunk-a5zjrwqy.js → chunk-ppvmy940.js} +2 -2
- package/bundle/{chunk-r3yqe7x0.js → chunk-ptf09vmp.js} +1 -1
- package/bundle/{chunk-sjrmhd3e.js → chunk-q2exgz82.js} +1 -1
- package/bundle/{chunk-te1zfpzv.js → chunk-qan3kwbv.js} +1 -1
- package/bundle/{chunk-7tgm8wp5.js → chunk-qb5qemtp.js} +1 -1
- package/bundle/chunk-qd0nvn4z.js +2 -0
- package/bundle/chunk-qh99kv2j.js +2 -0
- package/bundle/{chunk-kc3hpmr2.js → chunk-qkwhgfjt.js} +2 -2
- package/bundle/{chunk-5kmfnkzv.js → chunk-qm9ezq93.js} +1 -1
- package/bundle/chunk-qmhcbdkg.js +8 -0
- package/bundle/{chunk-7a6p7dfx.js → chunk-qngs31yf.js} +1 -1
- package/bundle/{chunk-hbnr0j7h.js → chunk-qpv4438m.js} +2 -2
- package/bundle/{chunk-hv4nhx6q.js → chunk-qq71akpw.js} +2 -2
- package/bundle/chunk-qyrafh4m.js +2 -0
- package/bundle/{chunk-17ggas8k.js → chunk-r1yqmd4y.js} +1 -1
- package/bundle/chunk-rc37cw86.js +2 -0
- package/bundle/{chunk-xccs5c50.js → chunk-rf625fxx.js} +1 -1
- package/bundle/chunk-rmpty636.js +2 -0
- package/bundle/{chunk-9pe4agdz.js → chunk-rs0nx844.js} +2 -2
- package/bundle/{chunk-9vcw33dv.js → chunk-rvrjw0fy.js} +1 -1
- package/bundle/{chunk-jpygkh1c.js → chunk-rz54qjew.js} +1 -1
- package/bundle/{chunk-a9y27zd2.js → chunk-rze20q68.js} +1 -1
- package/bundle/{chunk-hg9nk090.js → chunk-s1h0k1yj.js} +1 -1
- package/bundle/{chunk-hh4c02fh.js → chunk-s2za1y84.js} +1 -1
- package/bundle/chunk-s3wjwxme.js +2 -0
- package/bundle/chunk-s4ncnbgd.js +2 -0
- package/bundle/{chunk-p4hpr8d7.js → chunk-s54c8fpf.js} +1 -1
- package/bundle/{chunk-0pbt75ev.js → chunk-s5krbdvd.js} +1 -1
- package/bundle/{chunk-wmw2gne9.js → chunk-s86fj82v.js} +2 -2
- package/bundle/{chunk-qywwj58s.js → chunk-sdsggxm4.js} +2 -2
- package/bundle/{chunk-r7xp0xcn.js → chunk-se195e52.js} +2 -2
- package/bundle/chunk-snz3w30x.js +2 -0
- package/bundle/chunk-srw748gr.js +2 -0
- package/bundle/{chunk-mj24ntn9.js → chunk-st74db4c.js} +1 -1
- package/bundle/{chunk-0rtshz2r.js → chunk-t1vtdgd6.js} +1 -1
- package/bundle/{chunk-6dxaty1v.js → chunk-t6xm49ea.js} +1 -1
- package/bundle/{chunk-f819a7ec.js → chunk-t7tstr83.js} +1 -1
- package/bundle/{chunk-v2kyarwz.js → chunk-tedrfa7d.js} +2 -2
- package/bundle/{chunk-zfnbk5gy.js → chunk-tfggzzqw.js} +1 -1
- package/bundle/chunk-tn167yyz.js +2 -0
- package/bundle/{chunk-d56zc21w.js → chunk-txty44v2.js} +1 -1
- package/bundle/{chunk-b6m4yyww.js → chunk-tyy4gx61.js} +1 -1
- package/bundle/chunk-v1xwe58d.js +2 -0
- package/bundle/{chunk-vvypb02q.js → chunk-vh05n2x3.js} +1 -1
- package/bundle/{chunk-agdfqncf.js → chunk-vpqd0t8a.js} +2 -2
- package/bundle/chunk-vrfegg5f.js +2 -0
- package/bundle/{chunk-tzc4jkzg.js → chunk-vthm5q05.js} +1 -1
- package/bundle/{chunk-6g3m7yxf.js → chunk-vw673y0t.js} +2 -2
- package/bundle/{chunk-3tdqsm5c.js → chunk-vx837ete.js} +1 -1
- package/bundle/{chunk-hjbks7r9.js → chunk-vy9xre57.js} +1 -1
- package/bundle/{chunk-x6z2b63w.js → chunk-vyjsng14.js} +1 -1
- package/bundle/{chunk-ftk58wxe.js → chunk-vztxv9dj.js} +1 -1
- package/bundle/{chunk-1p34bx7c.js → chunk-w01gjnty.js} +2 -2
- package/bundle/chunk-w12tky28.js +2 -0
- package/bundle/{chunk-t6w96xq2.js → chunk-w2gpgapp.js} +1 -1
- package/bundle/{chunk-gn7xgd4c.js → chunk-w3pzv615.js} +1 -1
- package/bundle/chunk-w4hbw37v.js +3 -0
- package/bundle/chunk-w9ct698t.js +2 -0
- package/bundle/{chunk-8ace31r2.js → chunk-wefjbwv6.js} +1 -1
- package/bundle/{chunk-sgtgvzv6.js → chunk-wg42cxrw.js} +1 -1
- package/bundle/{chunk-02txthqv.js → chunk-wg5dv21f.js} +2 -2
- package/bundle/chunk-wms4skr9.js +11 -0
- package/bundle/chunk-wr5hdsst.js +9 -0
- package/bundle/chunk-wxnqgh8t.js +2 -0
- package/bundle/chunk-wzmte7sy.js +3 -0
- package/bundle/chunk-x0h1jdxt.js +2 -0
- package/bundle/{chunk-ha1w0xzh.js → chunk-x36jhtex.js} +1 -1
- package/bundle/{chunk-yzdty5t9.js → chunk-x3931we7.js} +2 -2
- package/bundle/{chunk-v7r9np94.js → chunk-x3z8q0ep.js} +1 -1
- package/bundle/chunk-x6hsmnhz.js +2 -0
- package/bundle/{chunk-fkvccmgk.js → chunk-xak2r993.js} +2 -2
- package/bundle/{chunk-c31k8yh0.js → chunk-xc3fadkh.js} +1 -1
- package/bundle/{chunk-hh9a709t.js → chunk-xcs2jbz9.js} +1 -1
- package/bundle/{chunk-qw2hgs5b.js → chunk-xdv9xt0y.js} +2 -2
- package/bundle/{chunk-dgzyn27r.js → chunk-xdwej3ae.js} +1 -1
- package/bundle/chunk-xg9e0enb.js +2 -0
- package/bundle/{chunk-pfhp78cr.js → chunk-xqxpjbqk.js} +1 -1
- package/bundle/chunk-xtxxb25n.js +2 -0
- package/bundle/{chunk-8h9r6c8g.js → chunk-y2ch07yv.js} +2 -2
- package/bundle/chunk-y3s7sh1e.js +2 -0
- package/bundle/chunk-ydvheqw9.js +2 -0
- package/bundle/{chunk-0z3z0gk1.js → chunk-ygwe0vf1.js} +2 -2
- package/bundle/{chunk-58enbars.js → chunk-ykxde207.js} +2 -2
- package/bundle/{chunk-dkm7x8rj.js → chunk-ynfbz3sz.js} +2 -2
- package/bundle/{chunk-2wp1w8cy.js → chunk-yqtfvgrp.js} +1 -1
- package/bundle/{chunk-edvcz2gd.js → chunk-yt1yk4j1.js} +1 -1
- package/bundle/{chunk-yh174jhg.js → chunk-yvj021eg.js} +2 -2
- package/bundle/chunk-yxnq0d7k.js +2 -0
- package/bundle/{chunk-e346x00p.js → chunk-z2m09m4w.js} +1 -1
- package/bundle/{chunk-f3kjp838.js → chunk-z2q3mg73.js} +2 -2
- package/bundle/chunk-z2raegj9.js +2 -0
- package/bundle/{chunk-y1srca0c.js → chunk-z3hj5bfd.js} +2 -2
- package/bundle/chunk-z3pyhmg6.js +2 -0
- package/bundle/{chunk-3nhqd8wg.js → chunk-z4ae6jmb.js} +3 -3
- package/bundle/{chunk-7dckfame.js → chunk-z559gc3n.js} +1 -1
- package/bundle/chunk-z7pg6sw1.js +2 -0
- package/bundle/chunk-z84376c6.js +2 -0
- package/bundle/{chunk-ktmazmas.js → chunk-ze00x1xb.js} +2 -2
- package/bundle/{chunk-pb7rnkke.js → chunk-zjvzc0my.js} +1 -1
- package/bundle/chunk-zn8th65r.js +2 -0
- package/bundle/{chunk-sswbfqcq.js → chunk-zna6neq5.js} +1 -1
- package/bundle/chunk-ztv1brgn.js +2 -0
- package/bundle/{chunk-s9amvacw.js → chunk-zvsafnkp.js} +2 -2
- package/bundle/chunk-zyxvd9fj.js +2 -0
- package/bundle/index.js +16 -16
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0bvde0cx.js +0 -2
- package/bundle/chunk-0kbxnazj.js +0 -2
- package/bundle/chunk-19z5q33z.js +0 -2
- package/bundle/chunk-1a0wnwna.js +0 -2
- package/bundle/chunk-1ddm2wxv.js +0 -2
- package/bundle/chunk-1fk4vsmc.js +0 -2
- package/bundle/chunk-1j2f9nd5.js +0 -2
- package/bundle/chunk-27s736an.js +0 -2
- package/bundle/chunk-2j17xrzj.js +0 -2
- package/bundle/chunk-2zca3nak.js +0 -2
- package/bundle/chunk-2zcvcfq4.js +0 -2
- package/bundle/chunk-38hwkfj5.js +0 -2
- package/bundle/chunk-3afqxvsn.js +0 -2
- package/bundle/chunk-3avc1ppg.js +0 -7
- package/bundle/chunk-3v4vtah1.js +0 -2
- package/bundle/chunk-3ypk0j2f.js +0 -2
- package/bundle/chunk-3z1y040p.js +0 -3
- package/bundle/chunk-4aykrj51.js +0 -9
- package/bundle/chunk-4dtbmqmq.js +0 -2
- package/bundle/chunk-4zjb6rps.js +0 -2
- package/bundle/chunk-5hkcjgwh.js +0 -2
- package/bundle/chunk-5snrz263.js +0 -2
- package/bundle/chunk-653c0mxr.js +0 -11
- package/bundle/chunk-6av7hrrk.js +0 -7
- package/bundle/chunk-6bswn7w5.js +0 -2
- package/bundle/chunk-6epghftw.js +0 -2
- package/bundle/chunk-6jjhxh8p.js +0 -2
- package/bundle/chunk-6ws7xyc5.js +0 -2
- package/bundle/chunk-7g28zhar.js +0 -2
- package/bundle/chunk-7v02b2ms.js +0 -2
- package/bundle/chunk-7vmp2034.js +0 -2
- package/bundle/chunk-7wxrypkr.js +0 -2
- package/bundle/chunk-8kk9gvdy.js +0 -2
- package/bundle/chunk-8ygpp4y3.js +0 -2
- package/bundle/chunk-95q60g1p.js +0 -2
- package/bundle/chunk-9mjbenja.js +0 -2
- package/bundle/chunk-9vn1gy8h.js +0 -2
- package/bundle/chunk-ajp3f08k.js +0 -2
- package/bundle/chunk-aptkpdkc.js +0 -2
- package/bundle/chunk-bky5a42k.js +0 -3
- package/bundle/chunk-bry94ar5.js +0 -2
- package/bundle/chunk-btzyvqkf.js +0 -2
- package/bundle/chunk-c94pjdfh.js +0 -2
- package/bundle/chunk-cct9ds5c.js +0 -2
- package/bundle/chunk-czn535v0.js +0 -2
- package/bundle/chunk-d7wd5hz1.js +0 -2
- package/bundle/chunk-d86cmjrp.js +0 -2
- package/bundle/chunk-dnq65xvn.js +0 -2
- package/bundle/chunk-dpqv8rtn.js +0 -2
- package/bundle/chunk-e9mh7s3z.js +0 -2
- package/bundle/chunk-ek2y5f6g.js +0 -2
- package/bundle/chunk-epdsay73.js +0 -2
- package/bundle/chunk-f89gntcy.js +0 -3
- package/bundle/chunk-ffnsn7tv.js +0 -2
- package/bundle/chunk-fkezc7ew.js +0 -2
- package/bundle/chunk-fsxddgj0.js +0 -2
- package/bundle/chunk-gbcsfg6v.js +0 -2
- package/bundle/chunk-gfmz85hp.js +0 -2
- package/bundle/chunk-gk63k4t6.js +0 -2
- package/bundle/chunk-j0vf8s12.js +0 -2
- package/bundle/chunk-j1bxt69x.js +0 -2
- package/bundle/chunk-jcem8s30.js +0 -2
- package/bundle/chunk-jjwjb9w0.js +0 -3
- package/bundle/chunk-jpham2a3.js +0 -2
- package/bundle/chunk-jzkymnr5.js +0 -2
- package/bundle/chunk-k0qtwnhb.js +0 -2
- package/bundle/chunk-k2rsky7z.js +0 -2
- package/bundle/chunk-kcetcysa.js +0 -2
- package/bundle/chunk-kjfc5v3s.js +0 -2
- package/bundle/chunk-kkvb2c2z.js +0 -8
- package/bundle/chunk-km2ayfyf.js +0 -2
- package/bundle/chunk-knrh89eb.js +0 -2
- package/bundle/chunk-ksqfjawv.js +0 -2
- package/bundle/chunk-mjhb1q0n.js +0 -3
- package/bundle/chunk-mxcger73.js +0 -2
- package/bundle/chunk-nazkrkeb.js +0 -2
- package/bundle/chunk-nk01s49e.js +0 -2
- package/bundle/chunk-ns8b7rx1.js +0 -2
- package/bundle/chunk-ny6vpkx2.js +0 -2
- package/bundle/chunk-q0dd3ak6.js +0 -3
- package/bundle/chunk-q2s057bm.js +0 -2
- package/bundle/chunk-q5cqg2c0.js +0 -28
- package/bundle/chunk-qk2wnp2x.js +0 -2
- package/bundle/chunk-r012q335.js +0 -3
- package/bundle/chunk-rbdjbgkb.js +0 -2
- package/bundle/chunk-rxjprhgh.js +0 -2
- package/bundle/chunk-s3w9bmze.js +0 -2
- package/bundle/chunk-s3zste1a.js +0 -2
- package/bundle/chunk-sbt7qmwm.js +0 -3
- package/bundle/chunk-sf6h44pb.js +0 -2
- package/bundle/chunk-sgvzxs7m.js +0 -2
- package/bundle/chunk-sp9bndyh.js +0 -2
- package/bundle/chunk-vavrczqm.js +0 -3
- package/bundle/chunk-vg4styg5.js +0 -2
- package/bundle/chunk-vh09hhcs.js +0 -2
- package/bundle/chunk-vhktpm0n.js +0 -2
- package/bundle/chunk-vzjcmwry.js +0 -14
- package/bundle/chunk-wtp0yvqw.js +0 -2
- package/bundle/chunk-xmzs7q66.js +0 -2
- package/bundle/chunk-xv80476w.js +0 -2
- package/bundle/chunk-yjvr0et1.js +0 -2
- package/bundle/chunk-zk8n8hnh.js +0 -3
- package/bundle/chunk-zx3kcfkj.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aq as R,Bq as b,Cq as xG,Iq as f,Jq as s,Kq as O,Oq as IG,Pp as y,Up as l,Wp as p,Yp as qG,bq as NG,dq as _,iq as DG,yq as t}from"./chunk-bf146hz2.js";import{$q as PG,Vq as AG,Wq as r,br as T}from"./chunk-t488d66k.js";import{Pu as Q}from"./chunk-r7xp0xcn.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish(),kG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
|
|
2
|
+
import{$p as qG,Bq as t,Dq as R,Eq as b,Fq as xG,Lq as f,Mq as s,Nq as O,Rq as IG,Sp as y,Xp as l,Zp as p,eq as NG,gq as _,lq as DG}from"./chunk-p31yg62z.js";import{Yq as AG,Zq as r,cr as PG,er as T}from"./chunk-5mec6cde.js";import{Tu as Q}from"./chunk-se195e52.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish(),kG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
|
|
3
3
|
|
|
4
4
|
`,G=G.slice(1);for(let{role:z,content:V}of G)switch(z){case"system":throw new AG({message:"Unexpected system message in prompt: ${content}",prompt:G});case"user":{let j=V.map((B)=>{switch(B.type){case"text":return B.text}}).filter(Boolean).join("");U+=`${Y}:
|
|
5
5
|
${j}
|
|
@@ -9,4 +9,4 @@ ${j}
|
|
|
9
9
|
|
|
10
10
|
`;break}case"tool":throw new T({functionality:"tool messages"});default:throw Error(`Unsupported role: ${z}`)}return U+=`${Z}:
|
|
11
11
|
`,{prompt:U,stopSequences:[`
|
|
12
|
-
${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as
|
|
12
|
+
${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as if,CG as jf,gG as kf,mG as lf,dG as mf,jQ as nf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{f as
|
|
2
|
+
import{Vt as c,Yt as i}from"./chunk-08y06vgt.js";import{cu as s}from"./chunk-9p83me3p.js";function f(u){let n=!1,o=(e,a)=>{if(n)return;n=!0,process.exitCode=1,c.error(e,{error:s(a),process_role:u});let l=setTimeout(()=>process.exit(1),1000);i().finally(()=>{clearTimeout(l),process.exit(1)})},t=(e)=>o("unhandled rejection",e),r=(e)=>o("uncaught exception",e);return process.on("unhandledRejection",t),process.on("uncaughtException",r),()=>{process.off("unhandledRejection",t),process.off("uncaughtException",r)}}
|
|
3
|
+
export{f as Ss};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{zk as
|
|
2
|
+
import{DP as M,GP as T}from"./chunk-s2za1y84.js";var F=M((H)=>{var X=(k,z)=>()=>(z||k((z={exports:{}}).exports,z),z.exports),c=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=async(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q(await(0,J.stat)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.isexe=K;var V=(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q((0,z.statSync)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.sync=V;var q=(Z,Q)=>Z.isFile()&&B(Z,Q),B=(Z,Q)=>{let Y=Q.uid??process.getuid?.(),$=Q.groups??process.getgroups?.()??[],A=Q.gid??process.getgid?.()??$[0];if(Y===void 0||A===void 0)throw Error("cannot get uid or gid");let C=new Set([A,...$]),G=Z.mode,U=Z.uid,u=Z.gid,_=parseInt("100",8),L=parseInt("010",8),w=parseInt("001",8),E=_|L;return!!(G&w||G&L&&C.has(u)||G&_&&U===Y||G&E&&Y===0)}}),m=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=T("path"),V=async(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z(await(0,J.stat)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.isexe=V;var q=(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z((0,z.statSync)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.sync=q;var B=(Q,Y)=>{let{pathExt:$=process.env.PATHEXT||""}=Y,A=$.split(K.delimiter);if(A.indexOf("")!==-1)return!0;for(let C of A){let G=C.toLowerCase(),U=Q.substring(Q.length-G.length).toLowerCase();if(G&&U===G)return!0}return!1},Z=(Q,Y,$)=>Q.isFile()&&B(Y,$)}),h=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0})}),N=H&&H.__createBinding||(Object.create?function(k,z,J,K){K===void 0&&(K=J);var V=Object.getOwnPropertyDescriptor(z,J);(!V||("get"in V?!z.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return z[J]}}),Object.defineProperty(k,K,V)}:function(k,z,J,K){K===void 0&&(K=J),k[K]=z[J]}),d=H&&H.__setModuleDefault||(Object.create?function(k,z){Object.defineProperty(k,"default",{enumerable:!0,value:z})}:function(k,z){k.default=z}),O=H&&H.__importStar||function(){var k=function(z){return k=Object.getOwnPropertyNames||function(J){var K=[];for(var V in J)Object.prototype.hasOwnProperty.call(J,V)&&(K[K.length]=V);return K},k(z)};return function(z){if(z&&z.__esModule)return z;var J={};if(z!=null)for(var K=k(z),V=0;V<K.length;V++)K[V]!=="default"&&N(J,z,K[V]);return d(J,z),J}}(),x=H&&H.__exportStar||function(k,z){for(var J in k)J!=="default"&&!Object.prototype.hasOwnProperty.call(z,J)&&N(z,k,J)};Object.defineProperty(H,"__esModule",{value:!0});H.sync=H.isexe=H.posix=H.win32=void 0;var R=O(c());H.posix=R;var W=O(m());H.win32=W;x(h(),H);var a=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=a==="win32"?W:R;H.isexe=b.isexe;H.sync=b.sync});var zk=M((Zk,P)=>{var{isexe:p,sync:o}=F(),{join:r,delimiter:e,sep:I,posix:y}=T("path"),S=process.platform==="win32",D=new RegExp(`[${y.sep}${I===y.sep?"":I}]`.replace(/(\\)/g,"\\$1")),t=new RegExp(`^\\.${D.source}`),g=(k)=>Object.assign(Error(`not found: ${k}`),{code:"ENOENT"}),v=(k,{path:z=process.env.PATH,pathExt:J=process.env.PATHEXT,delimiter:K=e})=>{let V=k.match(D)?[""]:[...S?[process.cwd()]:[],...(z||"").split(K)];if(S){let q=J||[".EXE",".CMD",".BAT",".COM"].join(K),B=q.split(K).flatMap((Z)=>[Z,Z.toLowerCase()]);if(k.includes(".")&&B[0]!=="")B.unshift("");return{pathEnv:V,pathExt:B,pathExtExe:q}}return{pathEnv:V,pathExt:[""]}},f=(k,z)=>{let J=/^".*"$/.test(k)?k.slice(1,-1):k;return(!J&&t.test(z)?z.slice(0,2):"")+r(J,z)},l=async(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(await p(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)},kk=(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(o(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)};P.exports=l;l.sync=kk});
|
|
3
|
+
export{zk as Rs};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Be as ee}from"./chunk-xak2r993.js";import{DP as Z,GP as L}from"./chunk-s2za1y84.js";var Te=Z((le)=>{var $=ee(),R=L("https"),Q=L("stream"),N=L("http2");function D(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let o=Error(String(t));return o.name="AbortError",o}let n=Error("Request aborted");return n.name="AbortError",n}var te=["ECONNRESET","EPIPE","ETIMEDOUT"],V=(e)=>{let t={};for(let n in e){let o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},F=1000,oe=(e,t,n=0)=>{if(!n)return-1;let o=(s)=>{let r=d.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-s),c=(u)=>{if(u?.connecting)u.on("connect",()=>{d.clearTimeout(r)});else d.clearTimeout(r)};if(e.socket)c(e.socket);else e.on("socket",c)};if(n<2000)return o(0),0;return d.setTimeout(o.bind(null,F),F)},ne=(e,t,n=0,o,s)=>{if(n)return d.setTimeout(()=>{let r=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){let c=Object.assign(Error(r),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else r+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(r)},n);return-1},se=3000,re=(e,{keepAlive:t,keepAliveMsecs:n},o=se)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,n||0);else e.on("socket",(r)=>{r.setKeepAlive(t,n||0)})};if(o===0)return s(),0;return d.setTimeout(s,o)},W=3000,ie=(e,t,n=0)=>{let o=(s)=>{let r=n-s,c=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(r,c),e.on("close",()=>e.socket?.removeListener("timeout",c));else e.setTimeout(r,c)};if(0<n&&n<6000)return o(0),0;return d.setTimeout(o.bind(null,n===0?0:W),W)},j=6000;async function K(e,t,n=j,o=!1){let s=t.headers,r=s?s.Expect||s.expect:void 0,c=-1,u=!0;if(!o&&r==="100-continue")u=await Promise.race([new Promise((f)=>{c=Number(d.setTimeout(()=>f(!0),Math.max(j,n)))}),new Promise((f)=>{e.on("continue",()=>{d.clearTimeout(c),f(!0)}),e.on("response",()=>{d.clearTimeout(c),f(!1)}),e.on("error",()=>{d.clearTimeout(c),f(!1)})})]);if(u)ce(e,t.body)}function ce(e,t){if(t instanceof Q.Readable){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==="string"){if(n&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var ae=0,_=void 0,q=void 0;class H{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new H(e)}static checkSocketUsage(e,t,n=console){let{sockets:o,requests:s,maxSockets:r}=e;if(typeof r!=="number"||r===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(o&&s)for(let u in o){let f=o[u]?.length??0,l=s[u]?.length??0;if(f>=r&&l>=2*r)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${l} additional requests are enqueued.
|
|
3
3
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
4
4
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(this.resolveDefaultConfig(o))}).catch(n);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config)this.config=await this.configProvider;let o=this.config,s=e.protocol==="https:";if(!s&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((r,c)=>{let u=void 0,f=-1,l=-1,m=-1,p=-1,b=-1,T=()=>{d.clearTimeout(f),d.clearTimeout(l),d.clearTimeout(m),d.clearTimeout(p),d.clearTimeout(b)},O=async(i)=>{await u,T(),r(i)},y=async(i)=>{await u,T(),c(i)};if(t?.aborted){let i=D(t);y(i);return}let x=e.headers,U=x?(x.Expect??x.expect)==="100-continue":!1,C=s?o.httpsAgent:o.httpAgent;if(U&&!this.externalAgent)C=new(s?R.Agent:_)({keepAlive:!1,maxSockets:1/0});f=d.setTimeout(()=>{this.socketWarningTimestamp=H.checkSocketUsage(C,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2000)+(o.connectionTimeout??1000));let P=e.query?$.buildQueryString(e.query):"",S=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",a=e.password??"";S=`${i}:${a}`}let v=e.path;if(P)v+=`?${P}`;if(e.fragment)v+=`#${e.fragment}`;let E=e.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=e.hostname.slice(1,-1);else E=e.hostname;let A={headers:e.headers,host:E,method:e.method,path:v,port:e.port,agent:C,auth:S},h=(s?R.request:q)(A,(i)=>{let a=new $.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:V(i.headers),body:i});O({response:a})});if(h.on("error",(i)=>{if(te.includes(i.code))y(Object.assign(i,{name:"TimeoutError"}));else y(i)}),t){let i=()=>{h.destroy();let a=D(t);y(a)};if(typeof t.addEventListener==="function"){let a=t;a.addEventListener("abort",i,{once:!0}),h.once("close",()=>a.removeEventListener("abort",i))}else t.onabort=i}let k=n??o.requestTimeout;l=oe(h,y,o.connectionTimeout),m=ne(h,y,k,o.throwOnRequestTimeout,o.logger??console),p=ie(h,y,o.socketTimeout);let w=A.agent;if(typeof w==="object"&&"keepAlive"in w)b=re(h,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});u=K(h,e,k,this.externalAgent).catch((i)=>{return T(),c(i)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:s,httpAgent:r,httpsAgent:c,throwOnRequestTimeout:u,logger:f}=e||{},l=!0,m=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:o,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let p=await import("http"),{Agent:b,request:T}=p.default??p;if(q=T,_=b,r instanceof _||typeof r?.destroy==="function")return this.externalAgent=!0,r;return new _({keepAlive:!0,maxSockets:50,...r})},httpsAgent:(()=>{if(c instanceof R.Agent||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new R.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:f}}}var ue=new Uint16Array(1);class I{id=ue[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.destroy()}useCount(){return this.refs}}class J{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new I(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class G{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let n=this.getUrlString(e),o=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let f=o.poll();if(f)return f.retain(),f}let s=new I(this.connect(n)),r=s.deref();if(this.config.maxConcurrency)r.settings({maxConcurrentStreams:this.config.maxConcurrency},(f)=>{if(f)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let c=()=>{this.removeFromPoolAndClose(n,s)},u=()=>{this.removeFromPoolAndCheckedDestroy(n,s)};if(r.on("goaway",c),r.on("error",u),r.on("frameError",u),r.on("close",u),t.requestTimeout)r.setTimeout(t.requestTimeout,u);return o.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),o=new I(this.connect(n)),s=o.deref();s.settings({maxConcurrentStreams:1});let r=()=>{o.destroy()};if(s.on("error",r),s.on("frameError",r),s.on("close",r),t.requestTimeout)s.setTimeout(t.requestTimeout,r);return o.retain(),o}destroy(){for(let[e,t]of this.connectionPools){for(let n of[...t])n.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,n]of this.connectionPools){let o=[];for(let s of n)o.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:o}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new J;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?N.connect(e):N.connect(e,this.connectOptions)}}var{constants:z}=N;class B{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new G({});static create(e){if(typeof e?.handle==="function")return e;return new B(e)}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(o||{})}).catch(n);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:o}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:f,maxConcurrentStreams:l,nodeHttp2ConnectOptions:m}=this.config;if(this.connectionManager.setDisableConcurrentStreams(f??!1),l)this.connectionManager.setMaxConcurrentStreams(l);if(m)this.connectionManager.setNodeHttp2ConnectOptions(m)}let{requestTimeout:s,disableConcurrentStreams:r}=this.config,c=r||o,u=n??s;return new Promise((f,l)=>{let m=!1,p=void 0,b=async(a)=>{await p,f(a)},T=async(a)=>{await p,l(a)};if(t?.aborted){m=!0;let a=D(t);T(a);return}let{hostname:O,method:y,port:x,protocol:U,query:C}=e,P="";if(e.username!=null||e.password!=null){let a=e.username??"",g=e.password??"";P=`${a}:${g}@`}let S=`${U}//${P}${O}${x?`:${x}`:""}`,v={destination:new URL(S)},E={requestTimeout:this.config?.sessionTimeout,isEventStream:o},A=c?this.connectionManager.createIsolatedSession(v,E):this.connectionManager.lease(v,E),M=A.deref(),h=(a)=>{if(c)A.destroy();m=!0,T(a)},k=C?$.buildQueryString(C):"",w=e.path;if(k)w+=`?${k}`;if(e.fragment)w+=`#${e.fragment}`;let i=M.request({...e.headers,[z.HTTP2_HEADER_PATH]:w,[z.HTTP2_HEADER_METHOD]:y});if(u)i.setTimeout(u,()=>{i.close();let a=Error(`Stream timed out because of no activity for ${u} ms`);a.name="TimeoutError",h(a)});if(t){let a=()=>{i.close();let g=D(t);h(g)};if(typeof t.addEventListener==="function"){let g=t;g.addEventListener("abort",a,{once:!0}),i.once("close",()=>g.removeEventListener("abort",a))}else t.onabort=a}i.on("frameError",(a,g,Y)=>{h(Error(`Frame type id ${a} in stream id ${Y} has failed with code ${g}.`))}),i.on("error",h),i.on("aborted",()=>{h(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${i.rstCode}.`))}),i.on("response",(a)=>{let g=new $.HttpResponse({statusCode:a[":status"]??-1,headers:V(a),body:i});if(m=!0,b({response:g}),c)M.close()}),i.on("close",()=>{if(c)A.destroy();else this.connectionManager.release(v,A);if(!m)h(Error("Unexpected error: http2 request did not get a response"))}),p=K(i,e,u)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}class X extends Q.Writable{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e),n()}}var fe=(e)=>{if(de(e))return he(e);return new Promise((t,n)=>{let o=new X;e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.bufferedBytes));t(s)})})},de=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function he(e){let t=[],n=e.getReader(),o=!1,s=0;while(!o){let{done:u,value:f}=await n.read();if(f)t.push(f),s+=f.length;o=u}let r=new Uint8Array(s),c=0;for(let u of t)r.set(u,c),c+=u.length;return r}le.DEFAULT_REQUEST_TIMEOUT=ae;le.NodeHttp2Handler=B;le.NodeHttpHandler=H;le.streamCollector=fe});
|
|
5
|
-
export{Te as
|
|
5
|
+
export{Te as xe};
|