@qitqode/qitqode-android-arm64 0.2.13 → 0.2.14
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-9c0f79mt.js → chunk-00ft63qn.js} +1 -1
- package/bundle/chunk-00r3he5x.js +2 -0
- package/bundle/{chunk-vr7525pa.js → chunk-02tmc2st.js} +1 -1
- package/bundle/{chunk-81mwbcy3.js → chunk-05bkxat0.js} +2 -2
- package/bundle/{chunk-ewde5bss.js → chunk-06tgmvh6.js} +2 -2
- package/bundle/{chunk-etvwxwn3.js → chunk-07b4pkk6.js} +1 -1
- package/bundle/{chunk-wqm1vawg.js → chunk-0ejx0yqx.js} +1 -1
- package/bundle/chunk-0ks20gz1.js +2 -0
- package/bundle/{chunk-2md5fz4f.js → chunk-0m4gvjcv.js} +2 -2
- package/bundle/{chunk-jf4zyy7r.js → chunk-0mztgsxp.js} +1 -1
- package/bundle/{chunk-7bvh48s2.js → chunk-10kj86va.js} +1 -1
- package/bundle/{chunk-b46t2315.js → chunk-10q04xh5.js} +1 -1
- package/bundle/{chunk-dwjv3m5s.js → chunk-175720ws.js} +2 -2
- package/bundle/{chunk-xgphhnpk.js → chunk-19rs84t8.js} +1 -1
- package/bundle/{chunk-ajykvcas.js → chunk-1a08ffyd.js} +1 -1
- package/bundle/{chunk-hsmtjb4d.js → chunk-1bq15kf0.js} +2 -2
- package/bundle/{chunk-1sejtx9a.js → chunk-1e75j4m1.js} +2 -2
- package/bundle/{chunk-c1srcpfk.js → chunk-1gdt9q05.js} +1 -1
- package/bundle/{chunk-3be70hxy.js → chunk-1mfdmm2t.js} +1 -1
- package/bundle/{chunk-dmgdwvn1.js → chunk-1pft3sar.js} +1 -1
- package/bundle/chunk-1r7anzk5.js +2 -0
- package/bundle/{chunk-rr94dpe9.js → chunk-1ypzf18e.js} +1 -1
- package/bundle/chunk-26e51217.js +2 -0
- package/bundle/{chunk-bd4krah7.js → chunk-2ascwm7j.js} +1 -1
- package/bundle/{chunk-q7wc3frq.js → chunk-2d61z24r.js} +1 -1
- package/bundle/chunk-2g4kxtz0.js +2 -0
- package/bundle/chunk-2jzay8a9.js +2 -0
- package/bundle/{chunk-5828bcp8.js → chunk-2k2szpze.js} +1 -1
- package/bundle/chunk-2q78bdtj.js +2 -0
- package/bundle/{chunk-jrh028na.js → chunk-2w3n0q9m.js} +2 -2
- package/bundle/{chunk-sv27ep93.js → chunk-2w79k0mh.js} +2 -2
- package/bundle/chunk-30rghawe.js +2 -0
- package/bundle/{chunk-jt94rhev.js → chunk-3152y1q9.js} +1 -1
- package/bundle/{chunk-1851skhm.js → chunk-31a47ptm.js} +1 -1
- package/bundle/chunk-33mzqyyb.js +3 -0
- package/bundle/chunk-34yk99ep.js +2 -0
- package/bundle/{chunk-2p1qaqv3.js → chunk-358wdvj7.js} +2 -2
- package/bundle/{chunk-fqzfytjk.js → chunk-3c73rngn.js} +1 -1
- package/bundle/{chunk-wspm2k19.js → chunk-3cs1qf8x.js} +1 -1
- package/bundle/chunk-3dajnr1w.js +2 -0
- package/bundle/chunk-3ege6krg.js +2 -0
- package/bundle/chunk-43vpxggb.js +2 -0
- package/bundle/{chunk-aq75kv5f.js → chunk-47jkx37s.js} +3 -3
- package/bundle/{chunk-hcd0k14e.js → chunk-48rg4yhk.js} +2 -2
- package/bundle/chunk-49y7zg15.js +2 -0
- package/bundle/{chunk-qa38xchd.js → chunk-4hvenszg.js} +1 -1
- package/bundle/{chunk-msbe5rb7.js → chunk-4p9fny77.js} +1 -1
- package/bundle/{chunk-g6ffx794.js → chunk-4ppw719f.js} +1 -1
- package/bundle/{chunk-g0x6q2ks.js → chunk-4r7fbkcm.js} +1 -1
- package/bundle/{chunk-5fbzvy6q.js → chunk-4s1n38ds.js} +2 -2
- package/bundle/{chunk-z6qb4gt5.js → chunk-4v29ayke.js} +1 -1
- package/bundle/{chunk-gvc1mqrs.js → chunk-4xqwt6dr.js} +2 -2
- package/bundle/{chunk-1bhcg889.js → chunk-4ycg2c6f.js} +2 -2
- package/bundle/{chunk-pzn7cade.js → chunk-5341jv20.js} +1 -1
- package/bundle/{chunk-eefzbdbk.js → chunk-583d91xq.js} +2 -2
- package/bundle/{chunk-z6f54x4k.js → chunk-5cwy8y78.js} +2 -2
- package/bundle/{chunk-6g3bzap8.js → chunk-5dvy83ms.js} +2 -2
- package/bundle/{chunk-ff031crt.js → chunk-5h1s0akp.js} +1 -1
- package/bundle/{chunk-tn0sfsks.js → chunk-5mf4qrye.js} +2 -2
- package/bundle/{chunk-0mdmqtfr.js → chunk-5q98z8ck.js} +2 -2
- package/bundle/chunk-5qhsfjzq.js +3 -0
- package/bundle/{chunk-y9kjt2jj.js → chunk-5rvvfgfy.js} +2 -2
- package/bundle/chunk-5xxn06g0.js +2 -0
- package/bundle/{chunk-2d0vympj.js → chunk-61b81z2h.js} +1 -1
- package/bundle/{chunk-4enhsmq1.js → chunk-62gefpwn.js} +2 -2
- package/bundle/{chunk-2h8b0csf.js → chunk-674pexjx.js} +2 -2
- package/bundle/{chunk-4ar8hey8.js → chunk-69htq8kq.js} +1 -1
- package/bundle/{chunk-h1p3xcfp.js → chunk-69k7cdtv.js} +2 -2
- package/bundle/{chunk-53n3tfwn.js → chunk-6cztstry.js} +2 -2
- package/bundle/{chunk-ba2hn77m.js → chunk-6d4xc6br.js} +1 -1
- package/bundle/{chunk-vqxyk6as.js → chunk-6dd2dx69.js} +2 -2
- package/bundle/{chunk-eftk07r3.js → chunk-6j53vtzd.js} +1 -1
- package/bundle/{chunk-yzxcjr6y.js → chunk-6kch0q2d.js} +2 -2
- package/bundle/{chunk-sn15skh8.js → chunk-6pt6nqwk.js} +1 -1
- package/bundle/{chunk-r9hsd9pw.js → chunk-6wmtbebc.js} +1 -1
- package/bundle/{chunk-3fx3eghq.js → chunk-6y0wgz2j.js} +1 -1
- package/bundle/{chunk-vvmvryh1.js → chunk-6yshpz0z.js} +2 -2
- package/bundle/{chunk-2ts2s8b4.js → chunk-71jmhvef.js} +2 -2
- package/bundle/{chunk-9xbc558j.js → chunk-73a7ts8r.js} +1 -1
- package/bundle/{chunk-5rtsnnjk.js → chunk-7a4sb6q7.js} +1 -1
- package/bundle/chunk-7cp30q0t.js +2 -0
- package/bundle/{chunk-d4ys15w3.js → chunk-7s9msscb.js} +1 -1
- package/bundle/{chunk-v30fmrz0.js → chunk-7w571q26.js} +1 -1
- package/bundle/chunk-7xc73qb1.js +2 -0
- package/bundle/{chunk-m18pxkdg.js → chunk-840mmmzz.js} +4 -4
- package/bundle/{chunk-jcn8bg31.js → chunk-86reb44c.js} +1 -1
- package/bundle/{chunk-hnbtfpb7.js → chunk-86sfzgnf.js} +1 -1
- package/bundle/{chunk-v9yxkbz7.js → chunk-8a9sj8gp.js} +1 -1
- package/bundle/{chunk-404ew3d3.js → chunk-8b9z8j3z.js} +1 -1
- package/bundle/{chunk-0cjp9088.js → chunk-8gkz5550.js} +1 -1
- package/bundle/chunk-8gz8fk6r.js +2 -0
- package/bundle/chunk-8ht7cq3h.js +2 -0
- package/bundle/{chunk-dpm5x19e.js → chunk-8jkqyf9n.js} +2 -2
- package/bundle/{chunk-3rcfy8te.js → chunk-8qpfphdz.js} +1 -1
- package/bundle/chunk-8qv0119d.js +2 -0
- package/bundle/{chunk-t1hw67x4.js → chunk-8zpsgfb6.js} +1 -1
- package/bundle/{chunk-c99npyz9.js → chunk-96sra8g8.js} +1 -1
- package/bundle/{chunk-nn2hbew8.js → chunk-99df6wvm.js} +1 -1
- package/bundle/{chunk-5wjwzbk8.js → chunk-9amnqaeq.js} +1 -1
- package/bundle/{chunk-z1psybn1.js → chunk-9gxyt2ay.js} +2 -2
- package/bundle/{chunk-hk8m8vax.js → chunk-9kc2th5c.js} +2 -2
- package/bundle/chunk-9m0eawt5.js +2 -0
- package/bundle/{chunk-fj87htwn.js → chunk-9mabvb06.js} +1 -1
- package/bundle/chunk-9thgxbze.js +2 -0
- package/bundle/{chunk-xn6mwsc9.js → chunk-9ttebtcf.js} +1 -1
- package/bundle/{chunk-gdawpkxs.js → chunk-9z7y4x7q.js} +1 -1
- package/bundle/{chunk-xgdst5n5.js → chunk-9znfb8f2.js} +2 -2
- package/bundle/chunk-9zsp3qkh.js +2 -0
- package/bundle/{chunk-mfg4stzn.js → chunk-a1mbach4.js} +1 -1
- package/bundle/chunk-a32y70fe.js +2 -0
- package/bundle/{chunk-hgcnzsd5.js → chunk-a3g8de96.js} +1 -1
- package/bundle/{chunk-bydaqb08.js → chunk-a8askx4y.js} +1 -1
- package/bundle/{chunk-gcpwm7b5.js → chunk-adws0hhk.js} +2 -2
- package/bundle/{chunk-1rw4srd1.js → chunk-ae1g5y4r.js} +1 -1
- package/bundle/{chunk-y5m9c5ek.js → chunk-ahgb3r1c.js} +2 -2
- package/bundle/{chunk-6p848y99.js → chunk-art8gejd.js} +1 -1
- package/bundle/{chunk-eh73j82b.js → chunk-avksqxan.js} +1 -1
- package/bundle/chunk-avzaqy6a.js +2 -0
- package/bundle/chunk-az12tp53.js +2 -0
- package/bundle/{chunk-gjmxrz0v.js → chunk-b350g18y.js} +2 -2
- package/bundle/chunk-b5dpzcc7.js +2 -0
- package/bundle/chunk-bcgtqx3g.js +2 -0
- package/bundle/{chunk-0w77vhg4.js → chunk-bdcd2mcb.js} +2 -2
- package/bundle/chunk-bde5d507.js +2 -0
- package/bundle/{chunk-139qfnsq.js → chunk-bemyyen3.js} +1 -1
- package/bundle/{chunk-84712kbe.js → chunk-bga4kqd1.js} +2 -2
- package/bundle/{chunk-4s9d2zte.js → chunk-bm8azfnt.js} +1 -1
- package/bundle/{chunk-1bbx1da7.js → chunk-bmdqb48f.js} +1 -1
- package/bundle/{chunk-bpv378bm.js → chunk-bq6cvf16.js} +2 -2
- package/bundle/{chunk-t66gerft.js → chunk-bxnsrggq.js} +1 -1
- package/bundle/{chunk-2b80n6nx.js → chunk-bzh71a92.js} +1 -1
- package/bundle/chunk-bzzggc3s.js +2 -0
- package/bundle/{chunk-78rfz0ex.js → chunk-c5cyt23k.js} +2 -2
- package/bundle/chunk-c8qx439t.js +2 -0
- package/bundle/{chunk-t1e52h0k.js → chunk-ch7s512a.js} +1 -1
- package/bundle/{chunk-jmrqp50k.js → chunk-chnr7pe5.js} +1 -1
- package/bundle/chunk-ckw51fn6.js +2 -0
- package/bundle/{chunk-1rafe6f5.js → chunk-crqycrs4.js} +2 -2
- package/bundle/{chunk-z2cnd2cp.js → chunk-d10qre1b.js} +1 -1
- package/bundle/{chunk-v6djkm35.js → chunk-d385e2qt.js} +1 -1
- package/bundle/{chunk-paqy0c2v.js → chunk-d4faz5xa.js} +1 -1
- package/bundle/{chunk-8xbd0ra5.js → chunk-d7h1dp0h.js} +1 -1
- package/bundle/chunk-denp0wrq.js +2 -0
- package/bundle/chunk-depxzjer.js +2 -0
- package/bundle/chunk-dhvqpcf3.js +2 -0
- package/bundle/chunk-dkqqswbv.js +2 -0
- package/bundle/{chunk-e4658j15.js → chunk-dmb0ez0m.js} +3 -3
- package/bundle/{chunk-47pxz6cb.js → chunk-dn0437c1.js} +2 -2
- package/bundle/{chunk-es6vbsjg.js → chunk-dvp0r93q.js} +1 -1
- package/bundle/{chunk-374js0y6.js → chunk-e18hshcg.js} +1 -1
- package/bundle/chunk-e5t7jsxa.js +2 -0
- package/bundle/{chunk-wac35a6p.js → chunk-e611m0p4.js} +1 -1
- package/bundle/{chunk-4krmja97.js → chunk-e8s4mp5n.js} +2 -2
- package/bundle/chunk-eb811dt2.js +2 -0
- package/bundle/{chunk-95ga21eq.js → chunk-edvfqxfr.js} +1 -1
- package/bundle/{chunk-yhe5qz48.js → chunk-ej0yzstw.js} +2 -2
- package/bundle/{chunk-7p8f8xav.js → chunk-ep4drmt9.js} +1 -1
- package/bundle/{chunk-xaewye8w.js → chunk-eqsank84.js} +1 -1
- package/bundle/{chunk-s7ypkpg2.js → chunk-et3tgx7t.js} +1 -1
- package/bundle/{chunk-trg0zg0q.js → chunk-f0dp1tf9.js} +1 -1
- package/bundle/chunk-fbz2xv2w.js +2 -0
- package/bundle/{chunk-cv3xdp8q.js → chunk-fd04358e.js} +375 -305
- package/bundle/{chunk-mbma071k.js → chunk-fdmz0502.js} +2 -2
- package/bundle/{chunk-mrh5q4s6.js → chunk-ffx0cr44.js} +2 -2
- package/bundle/{chunk-e6s8ep9m.js → chunk-ffyj5nsg.js} +2 -2
- package/bundle/{chunk-2bfq0mtx.js → chunk-ffz334ab.js} +1 -1
- package/bundle/{chunk-9a9qcvtz.js → chunk-fkq0v5qv.js} +2 -2
- package/bundle/{chunk-mp5m0acf.js → chunk-fmcg649e.js} +1 -1
- package/bundle/{chunk-g3y5kvg6.js → chunk-fp2xgnjn.js} +2 -2
- package/bundle/{chunk-rqdfmbns.js → chunk-fpzkyzny.js} +2 -2
- package/bundle/{chunk-yg5azmxb.js → chunk-g738e799.js} +2 -2
- package/bundle/{chunk-1exjy880.js → chunk-g77kddrs.js} +2 -2
- package/bundle/chunk-gbvcb4k1.js +2 -0
- package/bundle/{chunk-mgff8bcx.js → chunk-gd0j16gn.js} +1 -1
- package/bundle/chunk-gdtnqzbp.js +2 -0
- package/bundle/{chunk-hrfdrz36.js → chunk-gfvq78gy.js} +1 -1
- package/bundle/{chunk-h2vtypa5.js → chunk-gkf7x1yj.js} +1 -1
- package/bundle/chunk-gkfvhh28.js +2 -0
- package/bundle/chunk-gnh8c49b.js +2 -0
- package/bundle/chunk-gvf6ek9f.js +2 -0
- package/bundle/chunk-gvx5hmhk.js +2 -0
- package/bundle/{chunk-1f9qcrn6.js → chunk-h036zy9e.js} +2 -2
- package/bundle/{chunk-zhddj91f.js → chunk-hf39qx6t.js} +2 -2
- package/bundle/chunk-hham7r33.js +2 -0
- package/bundle/{chunk-map852em.js → chunk-hrcqbadm.js} +1 -1
- package/bundle/chunk-hsjbe5zy.js +2 -0
- package/bundle/{chunk-fbd971t7.js → chunk-hx13a8es.js} +3 -3
- package/bundle/{chunk-04x4b2yy.js → chunk-j15wejz0.js} +1 -1
- package/bundle/{chunk-08mgb5tt.js → chunk-j1bv93m4.js} +12 -10
- package/bundle/{chunk-5es19n1m.js → chunk-j2snkw45.js} +2 -2
- package/bundle/{chunk-z66xdxkg.js → chunk-j3agzs13.js} +2 -2
- package/bundle/{chunk-4wzv2v36.js → chunk-j45p2v4a.js} +3 -3
- package/bundle/{chunk-094m66q5.js → chunk-j46bxb1b.js} +1 -1
- package/bundle/{chunk-5e0vejcb.js → chunk-jvvctqjd.js} +2 -2
- package/bundle/chunk-jvx7jtm4.js +3 -0
- package/bundle/{chunk-0ware2sh.js → chunk-jwv6fda1.js} +2 -2
- package/bundle/{chunk-1gt6ppza.js → chunk-k0chq88p.js} +1 -1
- package/bundle/chunk-k6gdmqff.js +2 -0
- package/bundle/{chunk-8t17w67q.js → chunk-k769v1ds.js} +1 -1
- package/bundle/{chunk-ycth54ja.js → chunk-kdqhwa65.js} +1 -1
- package/bundle/{chunk-8hrt4d0v.js → chunk-ky3fhz9z.js} +1 -1
- package/bundle/chunk-kzkb4648.js +2 -0
- package/bundle/chunk-m2540waa.js +2 -0
- package/bundle/{chunk-hp9q7vvq.js → chunk-m6967jtv.js} +2 -2
- package/bundle/{chunk-7h0regqs.js → chunk-m8kjtp60.js} +1 -1
- package/bundle/{chunk-q65qzc9w.js → chunk-mbmaeq0a.js} +1 -1
- package/bundle/{chunk-anm5g0m4.js → chunk-meehnnv9.js} +2 -2
- package/bundle/{chunk-k3x6z5q1.js → chunk-mjkwd1sz.js} +1 -1
- package/bundle/chunk-mscvm1rm.js +2 -0
- package/bundle/chunk-mw3hh526.js +2 -0
- package/bundle/chunk-n3nsrk5n.js +2 -0
- package/bundle/{chunk-rf9pjbg3.js → chunk-n6pn4f3r.js} +1 -1
- package/bundle/{chunk-wrkt670m.js → chunk-n7zd97hy.js} +2 -2
- package/bundle/chunk-n9nmc4q4.js +2 -0
- package/bundle/{chunk-p3tcw42f.js → chunk-nb4xtk1n.js} +1 -1
- package/bundle/{chunk-hd6sd912.js → chunk-ngygp66y.js} +1 -1
- package/bundle/chunk-nj4as8vy.js +2 -0
- package/bundle/chunk-nrzca9yd.js +2 -0
- package/bundle/chunk-nxm6gpyv.js +2 -0
- package/bundle/{chunk-5gv6r7v8.js → chunk-nyxn7npc.js} +1 -1
- package/bundle/{chunk-mhn0a828.js → chunk-nzz7gzg2.js} +1 -1
- package/bundle/{chunk-y9mxwwz7.js → chunk-p0852vfn.js} +2 -2
- package/bundle/{chunk-xrb46v1e.js → chunk-p4xqfkbh.js} +1 -1
- package/bundle/{chunk-7nh8vjx4.js → chunk-pdcxmr6x.js} +1 -1
- package/bundle/{chunk-6wt8g6mc.js → chunk-pp10epga.js} +2 -2
- package/bundle/{chunk-w264gs2c.js → chunk-prz2fkn9.js} +1 -1
- package/bundle/{chunk-d2049chz.js → chunk-psmwrvqs.js} +2 -2
- package/bundle/{chunk-4d9s7cgr.js → chunk-pwq2f75j.js} +1 -1
- package/bundle/{chunk-5psekq9f.js → chunk-pwrwb7mn.js} +1 -1
- package/bundle/{chunk-1wy8wmah.js → chunk-px69995t.js} +1 -1
- package/bundle/{chunk-pfen4ekj.js → chunk-q1dmxn63.js} +2 -2
- package/bundle/chunk-qbjqkezn.js +2 -0
- package/bundle/chunk-qhtp1xvx.js +2 -0
- package/bundle/chunk-qkztgpay.js +2 -0
- package/bundle/{chunk-x0wy15q9.js → chunk-qn1fhqyw.js} +2 -2
- package/bundle/{chunk-rwt0rwvn.js → chunk-qpggztkq.js} +2 -2
- package/bundle/{chunk-n73ckwr7.js → chunk-qpk7jp6t.js} +1 -1
- package/bundle/{chunk-71naz1qp.js → chunk-qqsj69m2.js} +1 -1
- package/bundle/{chunk-7k1q26yn.js → chunk-qrztx1b4.js} +2 -2
- package/bundle/{chunk-xpz5mnwz.js → chunk-qz20b42s.js} +1 -1
- package/bundle/{chunk-dzy3ezht.js → chunk-rd08wx37.js} +2 -2
- package/bundle/{chunk-mqtj38j9.js → chunk-rn3je2hv.js} +1 -1
- package/bundle/chunk-rnf3dy0y.js +2 -0
- package/bundle/{chunk-72qx43fq.js → chunk-rqap90xh.js} +2 -2
- package/bundle/chunk-rry4kq85.js +2 -0
- package/bundle/{chunk-5a4zt1b7.js → chunk-rws2tsdv.js} +1 -1
- package/bundle/{chunk-r65zw08x.js → chunk-rx9eh3db.js} +3 -3
- package/bundle/{chunk-tzw56029.js → chunk-rxt6gktt.js} +1 -1
- package/bundle/chunk-ryfj80q6.js +2 -0
- package/bundle/{chunk-ec1bwa7f.js → chunk-s0gmxpxm.js} +2 -2
- package/bundle/{chunk-8psfgg8y.js → chunk-s9epttpy.js} +1 -1
- package/bundle/{chunk-gtmtvjwc.js → chunk-sb3cgb4v.js} +1 -1
- package/bundle/{chunk-p863r97y.js → chunk-set1f1wr.js} +1 -1
- package/bundle/{chunk-zgj7jx8k.js → chunk-sg9enzsp.js} +2 -2
- package/bundle/{chunk-0xf12tf3.js → chunk-sh03ka27.js} +1 -1
- package/bundle/chunk-snx49w8h.js +2 -0
- package/bundle/{chunk-610mqqqa.js → chunk-spcdwmy4.js} +1 -1
- package/bundle/{chunk-ydz7387e.js → chunk-sy76e7nr.js} +1 -1
- package/bundle/{chunk-csbndz33.js → chunk-szfqmkj6.js} +1 -1
- package/bundle/chunk-t21mdqbb.js +2 -0
- package/bundle/{chunk-t7gp6mjm.js → chunk-tcyzj3rz.js} +1 -1
- package/bundle/chunk-tn2yyqeb.js +2 -0
- package/bundle/chunk-ttebf3nt.js +2 -0
- package/bundle/chunk-twpfh0mx.js +2 -0
- package/bundle/{chunk-a4242cn4.js → chunk-tz1bzrnh.js} +1 -1
- package/bundle/chunk-tzf6d5qy.js +2 -0
- package/bundle/{chunk-hzzvmr41.js → chunk-v1axkp21.js} +2 -2
- package/bundle/chunk-v2mq09wx.js +2 -0
- package/bundle/chunk-v59a02aj.js +2 -0
- package/bundle/{chunk-8rbbt1s8.js → chunk-v5me0cj9.js} +1 -1
- package/bundle/{chunk-gw2fz5ry.js → chunk-v7v0krrj.js} +1 -1
- package/bundle/{chunk-9r6wk75s.js → chunk-veptx3fk.js} +1 -1
- package/bundle/chunk-vnstr4g1.js +2 -0
- package/bundle/{chunk-vvcyvdnk.js → chunk-vr13f6b5.js} +2 -2
- package/bundle/chunk-vxr4rzt0.js +2 -0
- package/bundle/{chunk-fmvmp278.js → chunk-vzkdzhn0.js} +1 -1
- package/bundle/chunk-w0h9rczg.js +2 -0
- package/bundle/{chunk-6jb4mnvq.js → chunk-w136zswr.js} +3 -3
- package/bundle/chunk-w214dwws.js +2 -0
- package/bundle/{chunk-mchf2bcc.js → chunk-w4fr00s7.js} +2 -2
- package/bundle/chunk-w8344et5.js +2 -0
- package/bundle/{chunk-b274mb6v.js → chunk-w8nj5ph5.js} +1 -1
- package/bundle/chunk-weyg78et.js +2 -0
- package/bundle/{chunk-6kpk6pr3.js → chunk-wf0n1cs9.js} +1 -1
- package/bundle/{chunk-00krzh3y.js → chunk-wfpnv00c.js} +2 -2
- package/bundle/{chunk-9h2fms7x.js → chunk-wmj3xndt.js} +1 -1
- package/bundle/{chunk-wwtyrgga.js → chunk-wrzn87w0.js} +1 -1
- package/bundle/{chunk-npryn3en.js → chunk-ws720v4j.js} +1 -1
- package/bundle/{chunk-t4kma6mq.js → chunk-x0de4z05.js} +2 -2
- package/bundle/{chunk-qqftaqza.js → chunk-x3dzzq0t.js} +1 -1
- package/bundle/{chunk-45dtsre6.js → chunk-x4jnyj09.js} +1 -1
- package/bundle/chunk-xchj8gna.js +2 -0
- package/bundle/{chunk-s81ck6bw.js → chunk-xdcwx384.js} +1 -1
- package/bundle/{chunk-yqvqzg7b.js → chunk-xmf59618.js} +1 -1
- package/bundle/chunk-y18ptwk2.js +2 -0
- package/bundle/{chunk-z4gczap3.js → chunk-y1v7mf1a.js} +9 -9
- package/bundle/chunk-y3dpyz2d.js +2 -0
- package/bundle/{chunk-h9tcpbr7.js → chunk-y5ydtbpd.js} +1 -1
- package/bundle/{chunk-vzj91hg8.js → chunk-yg9n2a2d.js} +1 -1
- package/bundle/chunk-ykvgmje9.js +35 -0
- package/bundle/chunk-yvjecrjy.js +2 -0
- package/bundle/chunk-yw2x6by6.js +2 -0
- package/bundle/{chunk-962hspr0.js → chunk-z0dj15g9.js} +1 -1
- package/bundle/chunk-z0r4syk8.js +2 -0
- package/bundle/{chunk-1q5h95hc.js → chunk-z6qyx227.js} +1 -1
- package/bundle/chunk-z7c00g63.js +2 -0
- package/bundle/{chunk-tks3qzsw.js → chunk-zgwasq3p.js} +1 -1
- package/bundle/{chunk-6dmk2eyt.js → chunk-zh7e6kqs.js} +1 -1
- package/bundle/{chunk-4q14whpc.js → chunk-zjyaze0d.js} +1 -1
- package/bundle/chunk-znr0saas.js +2 -0
- package/bundle/{chunk-e0w082wt.js → chunk-zpjtse0z.js} +184 -184
- package/bundle/chunk-zqqt7v17.js +2 -0
- package/bundle/chunk-zwrgh1hc.js +2 -0
- package/bundle/{chunk-821zkh5v.js → chunk-zx63mepv.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0nves64y.js +0 -2
- package/bundle/chunk-0v7knkt5.js +0 -2
- package/bundle/chunk-1h5jdsgx.js +0 -2
- package/bundle/chunk-1r5e1jsb.js +0 -2
- package/bundle/chunk-1wyy3c48.js +0 -2
- package/bundle/chunk-1z299xq6.js +0 -2
- package/bundle/chunk-21aqt31s.js +0 -2
- package/bundle/chunk-22aq9ymg.js +0 -2
- package/bundle/chunk-26a17c9z.js +0 -2
- package/bundle/chunk-2a154mr0.js +0 -2
- package/bundle/chunk-2nbce486.js +0 -2
- package/bundle/chunk-2npxatq9.js +0 -2
- package/bundle/chunk-3gryj9r9.js +0 -2
- package/bundle/chunk-3jnanbjr.js +0 -2
- package/bundle/chunk-3meh1cbc.js +0 -2
- package/bundle/chunk-3t71xfr6.js +0 -2
- package/bundle/chunk-4045jzv5.js +0 -2
- package/bundle/chunk-4b2vv484.js +0 -2
- package/bundle/chunk-4ene1ymj.js +0 -2
- package/bundle/chunk-58r5etg8.js +0 -2
- package/bundle/chunk-5c2zw4h0.js +0 -2
- package/bundle/chunk-608f83n0.js +0 -2
- package/bundle/chunk-671r50ry.js +0 -2
- package/bundle/chunk-6bfnhr3d.js +0 -2
- package/bundle/chunk-6cv6d8rw.js +0 -2
- package/bundle/chunk-6qm6f88j.js +0 -2
- package/bundle/chunk-78bfwwmc.js +0 -2
- package/bundle/chunk-7wwtgxxf.js +0 -2
- package/bundle/chunk-98sb49dz.js +0 -2
- package/bundle/chunk-9kbtpq9m.js +0 -2
- package/bundle/chunk-9szp9b4m.js +0 -2
- package/bundle/chunk-9xqszq0c.js +0 -2
- package/bundle/chunk-a32kjs9e.js +0 -2
- package/bundle/chunk-apym02ct.js +0 -2
- package/bundle/chunk-armv2rv5.js +0 -2
- package/bundle/chunk-as215v64.js +0 -2
- package/bundle/chunk-bnmpgpyf.js +0 -2
- package/bundle/chunk-bq3zt1x1.js +0 -2
- package/bundle/chunk-bx8fgjam.js +0 -2
- package/bundle/chunk-ckcnb59t.js +0 -2
- package/bundle/chunk-d79xaj6s.js +0 -3
- package/bundle/chunk-dah2d37s.js +0 -2
- package/bundle/chunk-dhgjv1n2.js +0 -2
- package/bundle/chunk-dk9k8ff5.js +0 -2
- package/bundle/chunk-dymysn4h.js +0 -2
- package/bundle/chunk-ev4gw5k6.js +0 -2
- package/bundle/chunk-ew2dxm43.js +0 -2
- package/bundle/chunk-ffp4wg27.js +0 -2
- package/bundle/chunk-hjy90gt2.js +0 -2
- package/bundle/chunk-hmden934.js +0 -2
- package/bundle/chunk-hsm8fbb1.js +0 -2
- package/bundle/chunk-hz1xfedb.js +0 -2
- package/bundle/chunk-ja9y478k.js +0 -2
- package/bundle/chunk-jam7xyjf.js +0 -2
- package/bundle/chunk-k51qphrk.js +0 -2
- package/bundle/chunk-kee7xpe3.js +0 -2
- package/bundle/chunk-p13eeqe4.js +0 -2
- package/bundle/chunk-p45f2nyb.js +0 -2
- package/bundle/chunk-qvwx32p9.js +0 -35
- package/bundle/chunk-qw9whsy2.js +0 -2
- package/bundle/chunk-r77kpzdv.js +0 -2
- package/bundle/chunk-rc95tp19.js +0 -2
- package/bundle/chunk-rmh2fhqy.js +0 -2
- package/bundle/chunk-rrn86a8w.js +0 -2
- package/bundle/chunk-s8v0h63x.js +0 -2
- package/bundle/chunk-sh4mngre.js +0 -2
- package/bundle/chunk-shqqngm8.js +0 -2
- package/bundle/chunk-sjfcwykr.js +0 -2
- package/bundle/chunk-sv01v0n0.js +0 -2
- package/bundle/chunk-tn8hsd2c.js +0 -2
- package/bundle/chunk-tqsx7w8z.js +0 -2
- package/bundle/chunk-tyt1negg.js +0 -2
- package/bundle/chunk-v580zwpf.js +0 -3
- package/bundle/chunk-vdv6cyh0.js +0 -2
- package/bundle/chunk-vsk8yfxp.js +0 -2
- package/bundle/chunk-vvgmkjym.js +0 -2
- package/bundle/chunk-vzf04vad.js +0 -2
- package/bundle/chunk-w0zyex7f.js +0 -2
- package/bundle/chunk-w623r5kb.js +0 -3
- package/bundle/chunk-wkxt9v7s.js +0 -2
- package/bundle/chunk-wwf6zacw.js +0 -2
- package/bundle/chunk-x9c8eddk.js +0 -2
- package/bundle/chunk-xjed8t2h.js +0 -2
- package/bundle/chunk-xxhta1tm.js +0 -2
- package/bundle/chunk-yhj6858v.js +0 -2
- package/bundle/chunk-yq3byrpv.js +0 -2
- package/bundle/chunk-ys8ajwys.js +0 -2
- package/bundle/chunk-yzt7p956.js +0 -2
- package/bundle/chunk-z56cb3fs.js +0 -2
- package/bundle/chunk-zhypknyg.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{g as
|
|
2
|
+
import{nu as L}from"./chunk-33mzqyyb.js";import{MI as F,gI as M,nC as C}from"./chunk-9kc2th5c.js";var g=(q)=>(H)=>Object.assign(H,q(H));function k(){return(q,H)=>{class G{static make(J){return J}}return Object.setPrototypeOf(G,H),G}}var y=Symbol.for("effect-zod/override"),A=Symbol.for("effect-zod/preprocess"),B=new WeakMap,N={};function n(q){return V(q.ast)}function V(q){let H=B.get(q);if(H)return H;let G=D(q);return B.set(q,G),G}function D(q){let H=q.annotations?.[y];if(H)return H;let X=q.encoding?.length&&q._tag!=="Declaration"&&!(F.isOptional(q)&&_(q)!==void 0)?I(q):x(q),R=q.checks?.length?E(X,q.checks,q):X,Y=q.annotations?.[A],W=Y?L.preprocess(Y,R):R,U=F.resolveDescription(q),j=F.resolveIdentifier(q),Z=U?W.describe(U):W;return j?Z.meta({ref:j}):Z}function I(q){let H=q.encoding;return H.reduce((G,J)=>G.transform((X)=>P(J.transformation,X)),V(H[0].to))}function P(q,H){let G=M.runSyncExit(q.decode.run(C.some(H),N));if(G._tag==="Failure")throw Error(`effect-zod: transform failed: ${String(G.cause)}`);return C.getOrElse(G.value,()=>H)}function E(q,H,G){let J=[],X=(W)=>{if(W._tag==="FilterGroup")W.checks.forEach(X);else J.push(W)};H.forEach(X);let R=[],Y=J.reduce((W,U)=>{let j=O(W,U);if(j)return j;return R.push(U),W},q);if(R.length===0)return Y;return Y.superRefine((W,U)=>{for(let j of R){let Z=j.run(W,G,N);if(!Z)continue;let Q=b(Z)??j.annotations?.message??"Validation failed";U.addIssue({code:"custom",message:Q})}})}function O(q,H){let G=H.annotations?.meta;if(!G||typeof G._tag!=="string")return;switch(G._tag){case"isInt":return K(q,"int");case"isFinite":return K(q,"finite");case"isGreaterThan":return K(q,"gt",G.exclusiveMinimum);case"isGreaterThanOrEqualTo":return K(q,"gte",G.minimum);case"isLessThan":return K(q,"lt",G.exclusiveMaximum);case"isLessThanOrEqualTo":return K(q,"lte",G.maximum);case"isBetween":{let J=G.exclusiveMinimum?K(q,"gt",G.minimum):K(q,"gte",G.minimum);if(!J)return;return G.exclusiveMaximum?K(J,"lt",G.maximum):K(J,"lte",G.maximum)}case"isMultipleOf":return K(q,"multipleOf",G.divisor);case"isMinLength":return K(q,"min",G.minLength);case"isMaxLength":return K(q,"max",G.maxLength);case"isLengthBetween":{let J=K(q,"min",G.minimum);if(!J)return;return K(J,"max",G.maximum)}case"isPattern":return K(q,"regex",G.regExp);case"isStartsWith":return K(q,"startsWith",G.startsWith);case"isEndsWith":return K(q,"endsWith",G.endsWith);case"isIncludes":return K(q,"includes",G.includes);case"isUUID":return K(q,"uuid");case"isULID":return K(q,"ulid");case"isBase64":return K(q,"base64");case"isBase64Url":return K(q,"base64url")}return}function K(q,H,...G){let J=q[H];return typeof J==="function"?J.apply(q,G):void 0}function b(q){if(typeof q?.annotations?.message==="string")return q.annotations.message;if(typeof q?.message==="string")return q.message;return}function x(q){if(F.isOptional(q))return T(q);switch(q._tag){case"String":return L.string();case"Number":return L.number();case"Boolean":return L.boolean();case"Null":return L.null();case"Undefined":return L.undefined();case"Any":case"Unknown":return L.unknown();case"Never":return L.never();case"Literal":return L.literal(q.literal);case"Union":return v(q);case"Objects":return w(q);case"Arrays":return S(q);case"Declaration":return z(q);default:return $(q)}}function T(q){if(q._tag!=="Union")return $(q);let H=q.types.filter((X)=>X._tag!=="Undefined"),G=H.length===1?V(H[0]):H.length>1?L.union(H.map(V)):L.undefined(),J=_(q);if(J!==void 0)return G.default(J.value);return G.optional()}function _(q){let H=q.encoding;if(!H?.length)return;for(let G of H){let J=M.runSyncExit(G.transformation.decode.run(C.none(),{}));if(J._tag!=="Success")continue;if(C.isSome(J.value))return{value:J.value.value}}return}function v(q){if(q.types.length>=2&&q.types.every((J)=>J._tag==="Literal"&&typeof J.literal==="string"))return L.enum(q.types.map((J)=>J.literal));let H=q.types.map(V);if(H.length===1)return H[0];if(H.length<2)return $(q);let G=q.annotations?.discriminator;if(typeof G==="string")return L.discriminatedUnion(G,H);return L.union(H)}function w(q){if(q.propertySignatures.length===0&&q.indexSignatures.length===1){let G=q.indexSignatures[0];if(G.parameter._tag!=="String")return $(q);return L.record(L.string(),V(G.type))}if(q.indexSignatures.length===0)return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)])));if(q.indexSignatures.length!==1)return $(q);let H=q.indexSignatures[0];if(H.parameter._tag!=="String")return $(q);return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)]))).catchall(V(H.type))}function S(q){if(q.elements.length===0){if(q.rest.length!==1)return $(q);return L.array(V(q.rest[0]))}if(q.rest.length>0)return $(q);let H=q.elements.map(V);return L.tuple(H)}function z(q){if(q.typeParameters.length!==1)return $(q);return V(q.typeParameters[0])}function $(q){let H=F.resolveIdentifier(q);throw Error(`unsupported effect schema: ${H??q._tag}`)}
|
|
3
|
+
export{g as Jn,k as Kn,y as Ln,A as Mn,n as Nn};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{uP as vQ,vP as A,yP as _}from"./chunk-sh03ka27.js";var U1=A((_5,e6)=>{var E8=Object.prototype.hasOwnProperty,t6=Object.prototype.toString,i6=Object.defineProperty,a6=Object.getOwnPropertyDescriptor,n6=function($){if(typeof Array.isArray==="function")return Array.isArray($);return t6.call($)==="[object Array]"},r6=function($){if(!$||t6.call($)!=="[object Object]")return!1;var Q=E8.call($,"constructor"),Y=$.constructor&&$.constructor.prototype&&E8.call($.constructor.prototype,"isPrototypeOf");if($.constructor&&!Q&&!Y)return!1;var V;for(V in $);return typeof V>"u"||E8.call($,V)},s6=function($,Q){if(i6&&Q.name==="__proto__")i6($,Q.name,{enumerable:!0,configurable:!0,value:Q.newValue,writable:!0});else $[Q.name]=Q.newValue},o6=function($,Q){if(Q==="__proto__"){if(!E8.call($,Q))return;else if(a6)return a6($,Q).value}return $[Q]};e6.exports=function Z(){var $,Q,Y,V,W,z,K=arguments[0],F=1,L=arguments.length,N=!1;if(typeof K==="boolean")N=K,K=arguments[1]||{},F=2;if(K==null||typeof K!=="object"&&typeof K!=="function")K={};for(;F<L;++F)if($=arguments[F],$!=null){for(Q in $)if(Y=o6(K,Q),V=o6($,Q),K!==V){if(N&&V&&(r6(V)||(W=n6(V)))){if(W)W=!1,z=Y&&n6(Y)?Y:[];else z=Y&&r6(Y)?Y:{};s6(K,{name:Q,newValue:Z(N,z,V)})}else if(typeof V<"u")s6(K,{name:Q,newValue:V})}}return K}});var ZZ=A((x5,LQ)=>{LQ.exports={name:"gaxios",version:"7.1.4",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^22.13.1","@types/sinon":"^17.0.3","@types/tmp":"^0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.1.3",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.2","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var QZ=A((b5,$Z)=>{var SQ=ZZ();$Z.exports={pkg:SQ}});var G1=A((T0)=>{var VZ=T0&&T0.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(T0,"__esModule",{value:!0});T0.GaxiosError=T0.GAXIOS_ERROR_SYMBOL=void 0;T0.defaultErrorRedactor=WZ;var YZ=VZ(U1()),BQ=VZ(QZ()),D1=BQ.default.pkg;T0.GAXIOS_ERROR_SYMBOL=Symbol.for(`${D1.name}-gaxios-error`);class M1 extends Error{config;response;code;status;error;[T0.GAXIOS_ERROR_SYMBOL]=D1.version;static[Symbol.hasInstance](Z){if(Z&&typeof Z==="object"&&T0.GAXIOS_ERROR_SYMBOL in Z&&Z[T0.GAXIOS_ERROR_SYMBOL]===D1.version)return!0;return Function.prototype[Symbol.hasInstance].call(M1,Z)}constructor(Z,$,Q,Y){super(Z,{cause:Y});if(this.config=$,this.response=Q,this.error=Y instanceof Error?Y:void 0,this.config=(0,YZ.default)(!0,{},$),this.response)this.response.config=(0,YZ.default)(!0,{},this.response.config);if(this.response){try{this.response.data=OQ(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}if(Y instanceof DOMException)this.code=Y.name;else if(Y&&typeof Y==="object"&&"code"in Y&&(typeof Y.code==="string"||typeof Y.code==="number"))this.code=Y.code}static extractAPIErrorFromResponse(Z,$="The request failed"){let Q=$;if(typeof Z.data==="string")Q=Z.data;if(Z.data&&typeof Z.data==="object"&&"error"in Z.data&&Z.data.error&&!Z.ok){if(typeof Z.data.error==="string")return{message:Z.data.error,code:Z.status,status:Z.statusText};if(typeof Z.data.error==="object"){Q="message"in Z.data.error&&typeof Z.data.error.message==="string"?Z.data.error.message:Q;let Y="status"in Z.data.error&&typeof Z.data.error.status==="string"?Z.data.error.status:Z.statusText,V="code"in Z.data.error&&typeof Z.data.error.code==="number"?Z.data.error.code:Z.status;if("errors"in Z.data.error&&Array.isArray(Z.data.error.errors)){let W=[];for(let z of Z.data.error.errors)if(typeof z==="object"&&"message"in z&&typeof z.message==="string")W.push(z.message);return Object.assign({message:W.join(`
|
|
3
3
|
`)||Q,code:V,status:Y},Z.data.error)}return Object.assign({message:Q,code:V,status:Y},Z.data.error)}}return{message:Q,code:Z.status,status:Z.statusText}}}T0.GaxiosError=M1;function OQ(Z,$){switch(Z){case"stream":return $;case"json":return JSON.parse(JSON.stringify($));case"arraybuffer":return JSON.parse(Buffer.from($).toString("utf8"));case"blob":return JSON.parse($.text());default:return $}}function WZ(Z){function Q(W){if(!W)return;W.forEach((z,K)=>{if(/^authentication$/i.test(K)||/^authorization$/i.test(K)||/secret/i.test(K))W.set(K,"<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")})}function Y(W,z){if(typeof W==="object"&&W!==null&&typeof W[z]==="string"){let K=W[z];if(/grant_type=/i.test(K)||/assertion=/i.test(K)||/secret/i.test(K))W[z]="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>."}}function V(W){if(!W||typeof W!=="object")return;else if(W instanceof FormData||W instanceof URLSearchParams||"forEach"in W&&"set"in W)W.forEach((z,K)=>{if(["grant_type","assertion"].includes(K)||/secret/.test(K))W.set(K,"<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")});else{if("grant_type"in W)W.grant_type="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";if("assertion"in W)W.assertion="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";if("client_secret"in W)W.client_secret="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>."}}if(Z.config){if(Q(Z.config.headers),Y(Z.config,"data"),V(Z.config.data),Y(Z.config,"body"),V(Z.config.body),Z.config.url.searchParams.has("token"))Z.config.url.searchParams.set("token","<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.");if(Z.config.url.searchParams.has("client_secret"))Z.config.url.searchParams.set("client_secret","<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")}if(Z.response){if(WZ({config:Z.response.config}),Q(Z.response.headers),Z.response.bodyUsed)Y(Z.response,"data"),V(Z.response.data)}return Z}});var HZ=A((XZ)=>{Object.defineProperty(XZ,"__esModule",{value:!0});XZ.getRetryConfig=PQ;async function PQ(Z){let $=JZ(Z);if(!Z||!Z.config||!$&&!Z.config.retry)return{shouldRetry:!1};$=$||{},$.currentRetryAttempt=$.currentRetryAttempt||0,$.retry=$.retry===void 0||$.retry===null?3:$.retry,$.httpMethodsToRetry=$.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],$.noResponseRetries=$.noResponseRetries===void 0||$.noResponseRetries===null?2:$.noResponseRetries,$.retryDelayMultiplier=$.retryDelayMultiplier?$.retryDelayMultiplier:2,$.timeOfFirstRequest=$.timeOfFirstRequest?$.timeOfFirstRequest:Date.now(),$.totalTimeout=$.totalTimeout?$.totalTimeout:Number.MAX_SAFE_INTEGER,$.maxRetryDelay=$.maxRetryDelay?$.maxRetryDelay:Number.MAX_SAFE_INTEGER;let Q=[[100,199],[408,408],[429,429],[500,599]];if($.statusCodesToRetry=$.statusCodesToRetry||Q,Z.config.retryConfig=$,!await($.shouldRetry||AQ)(Z))return{shouldRetry:!1,config:Z.config};let V=jQ($);Z.config.retryConfig.currentRetryAttempt+=1;let W=$.retryBackoff?$.retryBackoff(Z,V):new Promise((z)=>{setTimeout(z,V)});if($.onRetryAttempt)await $.onRetryAttempt(Z);return await W,{shouldRetry:!0,config:Z.config}}function AQ(Z){let $=JZ(Z);if(Z.config.signal?.aborted&&Z.code!=="TimeoutError"||Z.code==="AbortError")return!1;if(!$||$.retry===0)return!1;if(!Z.response&&($.currentRetryAttempt||0)>=$.noResponseRetries)return!1;if(!$.httpMethodsToRetry||!$.httpMethodsToRetry.includes(Z.config.method?.toUpperCase()||"GET"))return!1;if(Z.response&&Z.response.status){let Q=!1;for(let[Y,V]of $.statusCodesToRetry){let W=Z.response.status;if(W>=Y&&W<=V){Q=!0;break}}if(!Q)return!1}if($.currentRetryAttempt=$.currentRetryAttempt||0,$.currentRetryAttempt>=$.retry)return!1;return!0}function JZ(Z){if(Z&&Z.config&&Z.config.retryConfig)return Z.config.retryConfig;return}function jQ(Z){let Q=(Z.currentRetryAttempt?0:Z.retryDelay??100)+(Math.pow(Z.retryDelayMultiplier,Z.currentRetryAttempt)-1)/2*1000,Y=Z.totalTimeout-(Date.now()-Z.timeOfFirstRequest);return Math.min(Q,Y,Z.maxRetryDelay)}});var I1=A((KZ)=>{Object.defineProperty(KZ,"__esModule",{value:!0});KZ.GaxiosInterceptorManager=void 0;class zZ extends Set{}KZ.GaxiosInterceptorManager=zZ});var UZ=A((o0)=>{var EQ=o0&&o0.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}},s0;Object.defineProperty(o0,"__esModule",{value:!0});o0.Gaxios=void 0;var hQ=EQ(U1()),fQ=_("https"),p0=G1(),kQ=HZ(),wZ=_("stream"),FZ=I1(),yQ=async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),_Q=204;class R1{agentCache=new Map;defaults;interceptors;constructor(Z){this.defaults=Z||{},this.interceptors={request:new FZ.GaxiosInterceptorManager,response:new FZ.GaxiosInterceptorManager}}fetch(...Z){let $=Z[0],Q=Z[1],Y=void 0,V=new Headers;if(typeof $==="string")Y=new URL($);else if($ instanceof URL)Y=$;else if($&&$.url)Y=new URL($.url);if($&&typeof $==="object"&&"headers"in $)s0.mergeHeaders(V,$.headers);if(Q)s0.mergeHeaders(V,new Headers(Q.headers));if(typeof $==="object"&&!($ instanceof URL))return this.request({...Q,...$,headers:V,url:Y});else return this.request({...Q,headers:V,url:Y})}async request(Z={}){let $=await this.#Y(Z);return $=await this.#$($),this.#Q(this._request($))}async _defaultAdapter(Z){let $=Z.fetchImplementation||this.defaults.fetchImplementation||await s0.#H(),Q={...Z};delete Q.data;let Y=await $(Z.url,Q),V=await this.getResponseData(Z,Y);if(!Object.getOwnPropertyDescriptor(Y,"data")?.configurable)Object.defineProperties(Y,{data:{configurable:!0,writable:!0,enumerable:!0,value:V}});return Object.assign(Y,{config:Z,data:V})}async _request(Z){try{let $;if(Z.adapter)$=await Z.adapter(Z,this._defaultAdapter.bind(this));else $=await this._defaultAdapter(Z);if(!Z.validateStatus($.status)){if(Z.responseType==="stream"){let Y=[];for await(let V of $.data)Y.push(V);$.data=Y.toString()}let Q=p0.GaxiosError.extractAPIErrorFromResponse($,`Request failed with status code ${$.status}`);throw new p0.GaxiosError(Q?.message,Z,$,Q)}return $}catch($){let Q;if($ instanceof p0.GaxiosError)Q=$;else if($ instanceof Error)Q=new p0.GaxiosError($.message,Z,void 0,$);else Q=new p0.GaxiosError("Unexpected Gaxios Error",Z,void 0,$);let{shouldRetry:Y,config:V}=await(0,kQ.getRetryConfig)(Q);if(Y&&V)return Q.config.retryConfig.currentRetryAttempt=V.retryConfig.currentRetryAttempt,Z.retryConfig=Q.config?.retryConfig,this.#V(Z),this._request(Z);if(Z.errorRedactor)Z.errorRedactor(Q);throw Q}}async getResponseData(Z,$){if($.status===_Q)return"";if(Z.maxContentLength&&$.headers.has("content-length")&&Z.maxContentLength<Number.parseInt($.headers?.get("content-length")||""))throw new p0.GaxiosError("Response's `Content-Length` is over the limit.",Z,Object.assign($,{config:Z}));switch(Z.responseType){case"stream":return $.body;case"json":{let Q=await $.text();try{return JSON.parse(Q)}catch{return Q}}case"arraybuffer":return $.arrayBuffer();case"blob":return $.blob();case"text":return $.text();default:return this.getResponseDataFromContentType($)}}#Z(Z,$=[]){let Q=new URL(Z),Y=[...$],V=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let W of V)Y.push(W.trim());for(let W of Y)if(W instanceof RegExp){if(W.test(Q.toString()))return!1}else if(W instanceof URL){if(W.origin===Q.origin)return!1}else if(W.startsWith("*.")||W.startsWith(".")){let z=W.replace(/^\*\./,".");if(Q.hostname.endsWith(z))return!1}else if(W===Q.origin||W===Q.hostname||W===Q.href)return!1;return!0}async#$(Z){let $=Promise.resolve(Z);for(let Q of this.interceptors.request.values())if(Q)$=$.then(Q.resolved,Q.rejected);return $}async#Q(Z){let $=Promise.resolve(Z);for(let Q of this.interceptors.response.values())if(Q)$=$.then(Q.resolved,Q.rejected);return $}async#Y(Z){let $=new Headers(this.defaults.headers);s0.mergeHeaders($,Z.headers);let Q=(0,hQ.default)(!0,{},this.defaults,Z);if(!Q.url)throw Error("URL is required.");if(Q.baseURL)Q.url=new URL(Q.url,Q.baseURL);if(Q.url=new URL(Q.url),Q.params)if(Q.paramsSerializer){let W=Q.paramsSerializer(Q.params);if(W.startsWith("?"))W=W.slice(1);let z=Q.url.toString().includes("?")?"&":"?";Q.url=Q.url+z+W}else{let W=Q.url instanceof URL?Q.url:new URL(Q.url);for(let[z,K]of new URLSearchParams(Q.params))W.searchParams.append(z,K);Q.url=W}if(typeof Z.maxContentLength==="number")Q.size=Z.maxContentLength;if(typeof Z.maxRedirects==="number")Q.follow=Z.maxRedirects;let Y=typeof Q.data==="string"||Q.data instanceof ArrayBuffer||Q.data instanceof Blob||globalThis.File&&Q.data instanceof File||Q.data instanceof FormData||Q.data instanceof wZ.Readable||Q.data instanceof ReadableStream||Q.data instanceof String||Q.data instanceof URLSearchParams||ArrayBuffer.isView(Q.data)||["Blob","File","FormData"].includes(Q.data?.constructor?.name||"");if(Q.multipart?.length){let W=await yQ();$.set("content-type",`multipart/related; boundary=${W}`),Q.body=wZ.Readable.from(this.getMultipartRequest(Q.multipart,W))}else if(Y)Q.body=Q.data;else if(typeof Q.data==="object")if($.get("Content-Type")==="application/x-www-form-urlencoded")Q.body=Q.paramsSerializer?Q.paramsSerializer(Q.data):new URLSearchParams(Q.data);else{if(!$.has("content-type"))$.set("content-type","application/json");Q.body=JSON.stringify(Q.data)}else if(Q.data)Q.body=Q.data;if(Q.validateStatus=Q.validateStatus||this.validateStatus,Q.responseType=Q.responseType||"unknown",!$.has("accept")&&Q.responseType==="json")$.set("accept","application/json");let V=Q.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(Q.agent);else if(V&&this.#Z(Q.url,Q.noProxy)){let W=await s0.#X();if(this.agentCache.has(V))Q.agent=this.agentCache.get(V);else Q.agent=new W(V,{cert:Q.cert,key:Q.key}),this.agentCache.set(V,Q.agent)}else if(Q.cert&&Q.key)if(this.agentCache.has(Q.key))Q.agent=this.agentCache.get(Q.key);else Q.agent=new fQ.Agent({cert:Q.cert,key:Q.key}),this.agentCache.set(Q.key,Q.agent);if(typeof Q.errorRedactor!=="function"&&Q.errorRedactor!==!1)Q.errorRedactor=p0.defaultErrorRedactor;if(Q.body&&!("duplex"in Q))Q.duplex="half";return this.#V(Q),Object.assign(Q,{headers:$,url:Q.url instanceof URL?Q.url:new URL(Q.url)})}#V(Z){if(Z.timeout){let $=AbortSignal.timeout(Z.timeout);if(Z.signal&&!Z.signal.aborted)Z.signal=AbortSignal.any([Z.signal,$]);else Z.signal=$}}validateStatus(Z){return Z>=200&&Z<300}async getResponseDataFromContentType(Z){let $=Z.headers.get("Content-Type");if($===null)return Z.text();if($=$.toLowerCase(),$.includes("application/json")){let Q=await Z.text();try{Q=JSON.parse(Q)}catch{}return Q}else if($.match(/^text\//))return Z.text();else return Z.blob()}async*getMultipartRequest(Z,$){let Q=`--${$}--`;for(let Y of Z){let V=Y.headers.get("Content-Type")||"application/octet-stream";if(yield`--${$}\r
|
|
4
4
|
Content-Type: ${V}\r
|
|
5
5
|
\r
|
|
6
6
|
`,typeof Y.content==="string")yield Y.content;else yield*Y.content;yield`\r
|
|
7
|
-
`}yield Q}static#W;static#J;static async#X(){return this.#W||=(await import("./chunk-sjfcwykr.js").then((m)=>vQ(m.default))).HttpsProxyAgent,this.#W}static async#H(){let Z=typeof window<"u"&&!!window;return this.#J||=Z?window.fetch:(await import("node-fetch")).default,this.#J}static mergeHeaders(Z,...$){Z=Z instanceof Headers?Z:new Headers(Z);for(let Q of $)(Q instanceof Headers?Q:new Headers(Q)).forEach((V,W)=>{W==="set-cookie"?Z.append(W,V):Z.set(W,V)});return Z}}o0.Gaxios=R1;s0=R1});var X0=A((q0)=>{var xQ=q0&&q0.__createBinding||(Object.create?function(Z,$,Q,Y){if(Y===void 0)Y=Q;var V=Object.getOwnPropertyDescriptor($,Q);if(!V||("get"in V?!$.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return $[Q]}};Object.defineProperty(Z,Y,V)}:function(Z,$,Q,Y){if(Y===void 0)Y=Q;Z[Y]=$[Q]}),bQ=q0&&q0.__exportStar||function(Z,$){for(var Q in Z)if(Q!=="default"&&!Object.prototype.hasOwnProperty.call($,Q))xQ($,Z,Q)};Object.defineProperty(q0,"__esModule",{value:!0});q0.instance=q0.Gaxios=q0.GaxiosError=void 0;q0.request=gQ;var DZ=UZ();Object.defineProperty(q0,"Gaxios",{enumerable:!0,get:function(){return DZ.Gaxios}});var mQ=G1();Object.defineProperty(q0,"GaxiosError",{enumerable:!0,get:function(){return mQ.GaxiosError}});bQ(I1(),q0);q0.instance=new DZ.Gaxios;async function gQ(Z){return q0.instance.request(Z)}});var N1=A((MZ,h8)=>{(function(Z){var $,Q=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,V=Math.floor,W="[BigNumber Error] ",z=W+"Number primitive has more than 15 significant digits: ",K=100000000000000,F=14,L=9007199254740991,N=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],S=1e7,P=1e9;function x(b){var v,k,m,O=B.prototype={constructor:B,toString:null,valueOf:null},t=new B(1),i=20,d=4,V0=-7,s=21,Q0=-1e7,e=1e7,Y0=!1,y0=1,w0=0,H1={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},c0="0123456789abcdefghijklmnopqrstuvwxyz",z1=!0;function B(J,X){var H,G,w,D,R,q,U,I,M=this;if(!(M instanceof B))return new B(J,X);if(X==null){if(J&&J._isBigNumber===!0){if(M.s=J.s,!J.c||J.e>e)M.c=M.e=null;else if(J.e<Q0)M.c=[M.e=0];else M.e=J.e,M.c=J.c.slice();return}if((q=typeof J=="number")&&J*0==0){if(M.s=1/J<0?(J=-J,-1):1,J===~~J){for(D=0,R=J;R>=10;R/=10,D++);if(D>e)M.c=M.e=null;else M.e=D,M.c=[J];return}I=String(J)}else{if(!Q.test(I=String(J)))return m(M,I,q);M.s=I.charCodeAt(0)==45?(I=I.slice(1),-1):1}if((D=I.indexOf("."))>-1)I=I.replace(".","");if((R=I.search(/e/i))>0){if(D<0)D=R;D+=+I.slice(R+1),I=I.substring(0,R)}else if(D<0)D=I.length}else{if(j(X,2,c0.length,"Base"),X==10&&z1)return M=new B(J),R0(M,i+M.e+1,d);if(I=String(J),q=typeof J=="number"){if(J*0!=0)return m(M,I,q,X);if(M.s=1/J<0?(I=I.slice(1),-1):1,B.DEBUG&&I.replace(/^0\.0*|\./,"").length>15)throw Error(z+J)}else M.s=I.charCodeAt(0)===45?(I=I.slice(1),-1):1;H=c0.slice(0,X),D=R=0;for(U=I.length;R<U;R++)if(H.indexOf(G=I.charAt(R))<0){if(G=="."){if(R>D){D=U;continue}}else if(!w){if(I==I.toUpperCase()&&(I=I.toLowerCase())||I==I.toLowerCase()&&(I=I.toUpperCase())){w=!0,R=-1,D=0;continue}}return m(M,String(J),q,X)}if(q=!1,I=k(I,X,10,M.s),(D=I.indexOf("."))>-1)I=I.replace(".","");else D=I.length}for(R=0;I.charCodeAt(R)===48;R++);for(U=I.length;I.charCodeAt(--U)===48;);if(I=I.slice(R,++U)){if(U-=R,q&&B.DEBUG&&U>15&&(J>L||J!==V(J)))throw Error(z+M.s*J);if((D=D-R-1)>e)M.c=M.e=null;else if(D<Q0)M.c=[M.e=0];else{if(M.e=D,M.c=[],R=(D+1)%F,D<0)R+=F;if(R<U){if(R)M.c.push(+I.slice(0,R));for(U-=F;R<U;)M.c.push(+I.slice(R,R+=F));R=F-(I=I.slice(R)).length}else R-=U;for(;R--;I+="0");M.c.push(+I)}}else M.c=[M.e=0]}B.clone=x,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(J){var X,H;if(J!=null)if(typeof J=="object"){if(J.hasOwnProperty(X="DECIMAL_PLACES"))H=J[X],j(H,0,P,X),i=H;if(J.hasOwnProperty(X="ROUNDING_MODE"))H=J[X],j(H,0,8,X),d=H;if(J.hasOwnProperty(X="EXPONENTIAL_AT"))if(H=J[X],H&&H.pop)j(H[0],-P,0,X),j(H[1],0,P,X),V0=H[0],s=H[1];else j(H,-P,P,X),V0=-(s=H<0?-H:H);if(J.hasOwnProperty(X="RANGE"))if(H=J[X],H&&H.pop)j(H[0],-P,-1,X),j(H[1],1,P,X),Q0=H[0],e=H[1];else if(j(H,-P,P,X),H)Q0=-(e=H<0?-H:H);else throw Error(W+X+" cannot be zero: "+H);if(J.hasOwnProperty(X="CRYPTO"))if(H=J[X],H===!!H)if(H)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Y0=H;else throw Y0=!H,Error(W+"crypto unavailable");else Y0=H;else throw Error(W+X+" not true or false: "+H);if(J.hasOwnProperty(X="MODULO_MODE"))H=J[X],j(H,0,9,X),y0=H;if(J.hasOwnProperty(X="POW_PRECISION"))H=J[X],j(H,0,P,X),w0=H;if(J.hasOwnProperty(X="FORMAT"))if(H=J[X],typeof H=="object")H1=H;else throw Error(W+X+" not an object: "+H);if(J.hasOwnProperty(X="ALPHABET"))if(H=J[X],typeof H=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(H))z1=H.slice(0,10)=="0123456789",c0=H;else throw Error(W+X+" invalid: "+H)}else throw Error(W+"Object expected: "+J);return{DECIMAL_PLACES:i,ROUNDING_MODE:d,EXPONENTIAL_AT:[V0,s],RANGE:[Q0,e],CRYPTO:Y0,MODULO_MODE:y0,POW_PRECISION:w0,FORMAT:H1,ALPHABET:c0}},B.isBigNumber=function(J){if(!J||J._isBigNumber!==!0)return!1;if(!B.DEBUG)return!0;var X,H,G=J.c,w=J.e,D=J.s;Z:if({}.toString.call(G)=="[object Array]"){if((D===1||D===-1)&&w>=-P&&w<=P&&w===V(w)){if(G[0]===0){if(w===0&&G.length===1)return!0;break Z}if(X=(w+1)%F,X<1)X+=F;if(String(G[0]).length==X){for(X=0;X<G.length;X++)if(H=G[X],H<0||H>=K||H!==V(H))break Z;if(H!==0)return!0}}}else if(G===null&&w===null&&(D===null||D===1||D===-1))return!0;throw Error(W+"Invalid BigNumber: "+J)},B.maximum=B.max=function(){return p6(arguments,-1)},B.minimum=B.min=function(){return p6(arguments,1)},B.random=function(){var J=9007199254740992,X=Math.random()*J&2097151?function(){return V(Math.random()*J)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(H){var G,w,D,R,q,U=0,I=[],M=new B(t);if(H==null)H=i;else j(H,0,P);if(R=Y(H/F),Y0)if(crypto.getRandomValues){G=crypto.getRandomValues(new Uint32Array(R*=2));for(;U<R;)if(q=G[U]*131072+(G[U+1]>>>11),q>=9000000000000000)w=crypto.getRandomValues(new Uint32Array(2)),G[U]=w[0],G[U+1]=w[1];else I.push(q%100000000000000),U+=2;U=R/2}else if(crypto.randomBytes){G=crypto.randomBytes(R*=7);for(;U<R;)if(q=(G[U]&31)*281474976710656+G[U+1]*1099511627776+G[U+2]*4294967296+G[U+3]*16777216+(G[U+4]<<16)+(G[U+5]<<8)+G[U+6],q>=9000000000000000)crypto.randomBytes(7).copy(G,U);else I.push(q%100000000000000),U+=7;U=R/7}else throw Y0=!1,Error(W+"crypto unavailable");if(!Y0){for(;U<R;)if(q=X(),q<9000000000000000)I[U++]=q%100000000000000}if(R=I[--U],H%=F,R&&H)q=N[F-H],I[U]=V(R/q)*q;for(;I[U]===0;I.pop(),U--);if(U<0)I=[D=0];else{for(D=-1;I[0]===0;I.splice(0,1),D-=F);for(U=1,q=I[0];q>=10;q/=10,U++);if(U<F)D-=F-U}return M.e=D,M.c=I,M}}(),B.sum=function(){var J=1,X=arguments,H=new B(X[0]);for(;J<X.length;)H=H.plus(X[J++]);return H},k=function(){var J="0123456789";function X(H,G,w,D){var R,q=[0],U,I=0,M=H.length;for(;I<M;){for(U=q.length;U--;q[U]*=G);q[0]+=D.indexOf(H.charAt(I++));for(R=0;R<q.length;R++)if(q[R]>w-1){if(q[R+1]==null)q[R+1]=0;q[R+1]+=q[R]/w|0,q[R]%=w}}return q.reverse()}return function(H,G,w,D,R){var q,U,I,M,T,E,h,c,Z0=H.indexOf("."),W0=i,l=d;if(Z0>=0)M=w0,w0=0,H=H.replace(".",""),c=new B(G),E=c.pow(H.length-Z0),w0=M,c.c=X(J0(C(E.c),E.e,"0"),10,w,J),c.e=c.c.length;h=X(H,G,w,R?(q=c0,J):(q=J,c0)),I=M=h.length;for(;h[--M]==0;h.pop());if(!h[0])return q.charAt(0);if(Z0<0)--I;else E.c=h,E.e=I,E.s=D,E=v(E,c,W0,l,w),h=E.c,T=E.r,I=E.e;if(U=I+W0+1,Z0=h[U],M=w/2,T=T||U<0||h[U+1]!=null,T=l<4?(Z0!=null||T)&&(l==0||l==(E.s<0?3:2)):Z0>M||Z0==M&&(l==4||T||l==6&&h[U-1]&1||l==(E.s<0?8:7)),U<1||!h[0])H=T?J0(q.charAt(1),-W0,q.charAt(0)):q.charAt(0);else{if(h.length=U,T){for(--w;++h[--U]>w;)if(h[U]=0,!U)++I,h=[1].concat(h)}for(M=h.length;!h[--M];);for(Z0=0,H="";Z0<=M;H+=q.charAt(h[Z0++]));H=J0(H,I,q.charAt(0))}return H}}(),v=function(){function J(G,w,D){var R,q,U,I,M=0,T=G.length,E=w%S,h=w/S|0;for(G=G.slice();T--;)U=G[T]%S,I=G[T]/S|0,R=h*U+I*E,q=E*U+R%S*S+M,M=(q/D|0)+(R/S|0)+h*I,G[T]=q%D;if(M)G=[M].concat(G);return G}function X(G,w,D,R){var q,U;if(D!=R)U=D>R?1:-1;else for(q=U=0;q<D;q++)if(G[q]!=w[q]){U=G[q]>w[q]?1:-1;break}return U}function H(G,w,D,R){var q=0;for(;D--;)G[D]-=q,q=G[D]<w[D]?1:0,G[D]=q*R+G[D]-w[D];for(;!G[0]&&G.length>1;G.splice(0,1));}return function(G,w,D,R,q){var U,I,M,T,E,h,c,Z0,W0,l,a,z0,v8,w1,F1,v0,K8,N0=G.s==w.s?1:-1,K0=G.c,$0=w.c;if(!K0||!K0[0]||!$0||!$0[0])return new B(!G.s||!w.s||(K0?$0&&K0[0]==$0[0]:!$0)?NaN:K0&&K0[0]==0||!$0?N0*0:N0/0);if(Z0=new B(N0),W0=Z0.c=[],I=G.e-w.e,N0=D+I+1,!q)q=K,I=u(G.e/F)-u(w.e/F),N0=N0/F|0;for(M=0;$0[M]==(K0[M]||0);M++);if($0[M]>(K0[M]||0))I--;if(N0<0)W0.push(1),T=!0;else{if(w1=K0.length,v0=$0.length,M=0,N0+=2,E=V(q/($0[0]+1)),E>1)$0=J($0,E,q),K0=J(K0,E,q),v0=$0.length,w1=K0.length;v8=v0,l=K0.slice(0,v0),a=l.length;for(;a<v0;l[a++]=0);if(K8=$0.slice(),K8=[0].concat(K8),F1=$0[0],$0[1]>=q/2)F1++;do{if(E=0,U=X($0,l,v0,a),U<0){if(z0=l[0],v0!=a)z0=z0*q+(l[1]||0);if(E=V(z0/F1),E>1){if(E>=q)E=q-1;h=J($0,E,q),c=h.length,a=l.length;while(X(h,l,c,a)==1)E--,H(h,v0<c?K8:$0,c,q),c=h.length,U=1}else{if(E==0)U=E=1;h=$0.slice(),c=h.length}if(c<a)h=[0].concat(h);if(H(l,h,a,q),a=l.length,U==-1)while(X($0,l,v0,a)<1)E++,H(l,v0<a?K8:$0,a,q),a=l.length}else if(U===0)E++,l=[0];if(W0[M++]=E,l[0])l[a++]=K0[v8]||0;else l=[K0[v8]],a=1}while((v8++<w1||l[0]!=null)&&N0--);if(T=l[0]!=null,!W0[0])W0.splice(0,1)}if(q==K){for(M=1,N0=W0[0];N0>=10;N0/=10,M++);R0(Z0,D+(Z0.e=M+I*F-1)+1,R,T)}else Z0.e=I,Z0.r=+T;return Z0}}();function K1(J,X,H,G){var w,D,R,q,U;if(H==null)H=d;else j(H,0,8);if(!J.c)return J.toString();if(w=J.c[0],R=J.e,X==null)U=C(J.c),U=G==1||G==2&&(R<=V0||R>=s)?o(U,R):J0(U,R,"0");else if(J=R0(new B(J),X,H),D=J.e,U=C(J.c),q=U.length,G==1||G==2&&(X<=D||D<=V0)){for(;q<X;U+="0",q++);U=o(U,D)}else if(X-=R+(G===2&&D>R),U=J0(U,D,"0"),D+1>q){if(--X>0)for(U+=".";X--;U+="0");}else if(X+=D-q,X>0){if(D+1==q)U+=".";for(;X--;U+="0");}return J.s<0&&w?"-"+U:U}function p6(J,X){var H,G,w=1,D=new B(J[0]);for(;w<J.length;w++)if(G=new B(J[w]),!G.s||(H=f(D,G))===X||H===0&&D.s===X)D=G;return D}function q1(J,X,H){var G=1,w=X.length;for(;!X[--w];X.pop());for(w=X[0];w>=10;w/=10,G++);if((H=G+H*F-1)>e)J.c=J.e=null;else if(H<Q0)J.c=[J.e=0];else J.e=H,J.c=X;return J}m=function(){var J=/^(-?)0([xbo])(?=\w[\w.]*$)/i,X=/^([^.]+)\.$/,H=/^\.([^.]+)$/,G=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,R,q,U){var I,M=q?R:R.replace(w,"");if(G.test(M))D.s=isNaN(M)?null:M<0?-1:1;else{if(!q){if(M=M.replace(J,function(T,E,h){return I=(h=h.toLowerCase())=="x"?16:h=="b"?2:8,!U||U==I?E:T}),U)I=U,M=M.replace(X,"$1").replace(H,"0.$1");if(R!=M)return new B(M,I)}if(B.DEBUG)throw Error(W+"Not a"+(U?" base "+U:"")+" number: "+R);D.s=null}D.c=D.e=null}}();function R0(J,X,H,G){var w,D,R,q,U,I,M,T=J.c,E=N;if(T){Z:{for(w=1,q=T[0];q>=10;q/=10,w++);if(D=X-w,D<0)D+=F,R=X,U=T[I=0],M=V(U/E[w-R-1]%10);else if(I=Y((D+1)/F),I>=T.length)if(G){for(;T.length<=I;T.push(0));U=M=0,w=1,D%=F,R=D-F+1}else break Z;else{U=q=T[I];for(w=1;q>=10;q/=10,w++);D%=F,R=D-F+w,M=R<0?0:V(U/E[w-R-1]%10)}if(G=G||X<0||T[I+1]!=null||(R<0?U:U%E[w-R-1]),G=H<4?(M||G)&&(H==0||H==(J.s<0?3:2)):M>5||M==5&&(H==4||G||H==6&&(D>0?R>0?U/E[w-R]:0:T[I-1])%10&1||H==(J.s<0?8:7)),X<1||!T[0]){if(T.length=0,G)X-=J.e+1,T[0]=E[(F-X%F)%F],J.e=-X||0;else T[0]=J.e=0;return J}if(D==0)T.length=I,q=1,I--;else T.length=I+1,q=E[F-D],T[I]=R>0?V(U/E[w-R]%E[R])*q:0;if(G)for(;;)if(I==0){for(D=1,R=T[0];R>=10;R/=10,D++);R=T[0]+=q;for(q=1;R>=10;R/=10,q++);if(D!=q){if(J.e++,T[0]==K)T[0]=1}break}else{if(T[I]+=q,T[I]!=K)break;T[I--]=0,q=1}for(D=T.length;T[--D]===0;T.pop());}if(J.e>e)J.c=J.e=null;else if(J.e<Q0)J.c=[J.e=0]}return J}function _0(J){var X,H=J.e;if(H===null)return J.toString();return X=C(J.c),X=H<=V0||H>=s?o(X,H):J0(X,H,"0"),J.s<0?"-"+X:X}if(O.absoluteValue=O.abs=function(){var J=new B(this);if(J.s<0)J.s=1;return J},O.comparedTo=function(J,X){return f(this,new B(J,X))},O.decimalPlaces=O.dp=function(J,X){var H,G,w,D=this;if(J!=null){if(j(J,0,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J+D.e+1,X)}if(!(H=D.c))return null;if(G=((w=H.length-1)-u(this.e/F))*F,w=H[w])for(;w%10==0;w/=10,G--);if(G<0)G=0;return G},O.dividedBy=O.div=function(J,X){return v(this,new B(J,X),i,d)},O.dividedToIntegerBy=O.idiv=function(J,X){return v(this,new B(J,X),0,1)},O.exponentiatedBy=O.pow=function(J,X){var H,G,w,D,R,q,U,I,M,T=this;if(J=new B(J),J.c&&!J.isInteger())throw Error(W+"Exponent not an integer: "+_0(J));if(X!=null)X=new B(X);if(q=J.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!J.c||!J.c[0])return M=new B(Math.pow(+_0(T),q?J.s*(2-p(J)):+_0(J))),X?M.mod(X):M;if(U=J.s<0,X){if(X.c?!X.c[0]:!X.s)return new B(NaN);if(G=!U&&T.isInteger()&&X.isInteger(),G)T=T.mod(X)}else if(J.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||q&&T.c[1]>=240000000:T.c[0]<80000000000000||q&&T.c[0]<=99999750000000))){if(D=T.s<0&&p(J)?-0:0,T.e>-1)D=1/D;return new B(U?1/D:D)}else if(w0)D=Y(w0/F+2);if(q){if(H=new B(0.5),U)J.s=1;I=p(J)}else w=Math.abs(+_0(J)),I=w%2;M=new B(t);for(;;){if(I){if(M=M.times(T),!M.c)break;if(D){if(M.c.length>D)M.c.length=D}else if(G)M=M.mod(X)}if(w){if(w=V(w/2),w===0)break;I=w%2}else if(J=J.times(H),R0(J,J.e+1,1),J.e>14)I=p(J);else{if(w=+_0(J),w===0)break;I=w%2}if(T=T.times(T),D){if(T.c&&T.c.length>D)T.c.length=D}else if(G)T=T.mod(X)}if(G)return M;if(U)M=t.div(M);return X?M.mod(X):D?R0(M,w0,d,R):M},O.integerValue=function(J){var X=new B(this);if(J==null)J=d;else j(J,0,8);return R0(X,X.e+1,J)},O.isEqualTo=O.eq=function(J,X){return f(this,new B(J,X))===0},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(J,X){return f(this,new B(J,X))>0},O.isGreaterThanOrEqualTo=O.gte=function(J,X){return(X=f(this,new B(J,X)))===1||X===0},O.isInteger=function(){return!!this.c&&u(this.e/F)>this.c.length-2},O.isLessThan=O.lt=function(J,X){return f(this,new B(J,X))<0},O.isLessThanOrEqualTo=O.lte=function(J,X){return(X=f(this,new B(J,X)))===-1||X===0},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&this.c[0]==0},O.minus=function(J,X){var H,G,w,D,R=this,q=R.s;if(J=new B(J,X),X=J.s,!q||!X)return new B(NaN);if(q!=X)return J.s=-X,R.plus(J);var U=R.e/F,I=J.e/F,M=R.c,T=J.c;if(!U||!I){if(!M||!T)return M?(J.s=-X,J):new B(T?R:NaN);if(!M[0]||!T[0])return T[0]?(J.s=-X,J):new B(M[0]?R:d==3?-0:0)}if(U=u(U),I=u(I),M=M.slice(),q=U-I){if(D=q<0)q=-q,w=M;else I=U,w=T;w.reverse();for(X=q;X--;w.push(0));w.reverse()}else{G=(D=(q=M.length)<(X=T.length))?q:X;for(q=X=0;X<G;X++)if(M[X]!=T[X]){D=M[X]<T[X];break}}if(D)w=M,M=T,T=w,J.s=-J.s;if(X=(G=T.length)-(H=M.length),X>0)for(;X--;M[H++]=0);X=K-1;for(;G>q;){if(M[--G]<T[G]){for(H=G;H&&!M[--H];M[H]=X);--M[H],M[G]+=K}M[G]-=T[G]}for(;M[0]==0;M.splice(0,1),--I);if(!M[0])return J.s=d==3?-1:1,J.c=[J.e=0],J;return q1(J,M,I)},O.modulo=O.mod=function(J,X){var H,G,w=this;if(J=new B(J,X),!w.c||!J.s||J.c&&!J.c[0])return new B(NaN);else if(!J.c||w.c&&!w.c[0])return new B(w);if(y0==9)G=J.s,J.s=1,H=v(w,J,0,3),J.s=G,H.s*=G;else H=v(w,J,0,y0);if(J=w.minus(H.times(J)),!J.c[0]&&y0==1)J.s=w.s;return J},O.multipliedBy=O.times=function(J,X){var H,G,w,D,R,q,U,I,M,T,E,h,c,Z0,W0,l=this,a=l.c,z0=(J=new B(J,X)).c;if(!a||!z0||!a[0]||!z0[0]){if(!l.s||!J.s||a&&!a[0]&&!z0||z0&&!z0[0]&&!a)J.c=J.e=J.s=null;else if(J.s*=l.s,!a||!z0)J.c=J.e=null;else J.c=[0],J.e=0;return J}if(G=u(l.e/F)+u(J.e/F),J.s*=l.s,U=a.length,T=z0.length,U<T)c=a,a=z0,z0=c,w=U,U=T,T=w;for(w=U+T,c=[];w--;c.push(0));Z0=K,W0=S;for(w=T;--w>=0;){H=0,E=z0[w]%W0,h=z0[w]/W0|0;for(R=U,D=w+R;D>w;)I=a[--R]%W0,M=a[R]/W0|0,q=h*I+M*E,I=E*I+q%W0*W0+c[D]+H,H=(I/Z0|0)+(q/W0|0)+h*M,c[D--]=I%Z0;c[D]=H}if(H)++G;else c.splice(0,1);return q1(J,c,G)},O.negated=function(){var J=new B(this);return J.s=-J.s||null,J},O.plus=function(J,X){var H,G=this,w=G.s;if(J=new B(J,X),X=J.s,!w||!X)return new B(NaN);if(w!=X)return J.s=-X,G.minus(J);var D=G.e/F,R=J.e/F,q=G.c,U=J.c;if(!D||!R){if(!q||!U)return new B(w/0);if(!q[0]||!U[0])return U[0]?J:new B(q[0]?G:w*0)}if(D=u(D),R=u(R),q=q.slice(),w=D-R){if(w>0)R=D,H=U;else w=-w,H=q;H.reverse();for(;w--;H.push(0));H.reverse()}if(w=q.length,X=U.length,w-X<0)H=U,U=q,q=H,X=w;for(w=0;X;)w=(q[--X]=q[X]+U[X]+w)/K|0,q[X]=K===q[X]?0:q[X]%K;if(w)q=[w].concat(q),++R;return q1(J,q,R)},O.precision=O.sd=function(J,X){var H,G,w,D=this;if(J!=null&&J!==!!J){if(j(J,1,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J,X)}if(!(H=D.c))return null;if(w=H.length-1,G=w*F+1,w=H[w]){for(;w%10==0;w/=10,G--);for(w=H[0];w>=10;w/=10,G++);}if(J&&D.e+1>G)G=D.e+1;return G},O.shiftedBy=function(J){return j(J,-L,L),this.times("1e"+J)},O.squareRoot=O.sqrt=function(){var J,X,H,G,w,D=this,R=D.c,q=D.s,U=D.e,I=i+4,M=new B("0.5");if(q!==1||!R||!R[0])return new B(!q||q<0&&(!R||R[0])?NaN:R?D:1/0);if(q=Math.sqrt(+_0(D)),q==0||q==1/0){if(X=C(R),(X.length+U)%2==0)X+="0";if(q=Math.sqrt(+X),U=u((U+1)/2)-(U<0||U%2),q==1/0)X="5e"+U;else X=q.toExponential(),X=X.slice(0,X.indexOf("e")+1)+U;H=new B(X)}else H=new B(q+"");if(H.c[0]){if(U=H.e,q=U+I,q<3)q=0;for(;;)if(w=H,H=M.times(w.plus(v(D,w,I,1))),C(w.c).slice(0,q)===(X=C(H.c)).slice(0,q)){if(H.e<U)--q;if(X=X.slice(q-3,q+1),X=="9999"||!G&&X=="4999"){if(!G){if(R0(w,w.e+i+2,0),w.times(w).eq(D)){H=w;break}}I+=4,q+=4,G=1}else{if(!+X||!+X.slice(1)&&X.charAt(0)=="5")R0(H,H.e+i+2,1),J=!H.times(H).eq(D);break}}}return R0(H,H.e+i+1,d,J)},O.toExponential=function(J,X){if(J!=null)j(J,0,P),J++;return K1(this,J,X,1)},O.toFixed=function(J,X){if(J!=null)j(J,0,P),J=J+this.e+1;return K1(this,J,X)},O.toFormat=function(J,X,H){var G,w=this;if(H==null)if(J!=null&&X&&typeof X=="object")H=X,X=null;else if(J&&typeof J=="object")H=J,J=X=null;else H=H1;else if(typeof H!="object")throw Error(W+"Argument not an object: "+H);if(G=w.toFixed(J,X),w.c){var D,R=G.split("."),q=+H.groupSize,U=+H.secondaryGroupSize,I=H.groupSeparator||"",M=R[0],T=R[1],E=w.s<0,h=E?M.slice(1):M,c=h.length;if(U)D=q,q=U,U=D,c-=D;if(q>0&&c>0){D=c%q||q,M=h.substr(0,D);for(;D<c;D+=q)M+=I+h.substr(D,q);if(U>0)M+=I+h.slice(D);if(E)M="-"+M}G=T?M+(H.decimalSeparator||"")+((U=+H.fractionGroupSize)?T.replace(new RegExp("\\d{"+U+"}\\B","g"),"$&"+(H.fractionGroupSeparator||"")):T):M}return(H.prefix||"")+G+(H.suffix||"")},O.toFraction=function(J){var X,H,G,w,D,R,q,U,I,M,T,E,h=this,c=h.c;if(J!=null){if(q=new B(J),!q.isInteger()&&(q.c||q.s!==1)||q.lt(t))throw Error(W+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+_0(q))}if(!c)return new B(h);X=new B(t),I=H=new B(t),G=U=new B(t),E=C(c),D=X.e=E.length-h.e-1,X.c[0]=N[(R=D%F)<0?F+R:R],J=!J||q.comparedTo(X)>0?D>0?X:I:q,R=e,e=1/0,q=new B(E),U.c[0]=0;for(;;){if(M=v(q,X,0,1),w=H.plus(M.times(G)),w.comparedTo(J)==1)break;H=G,G=w,I=U.plus(M.times(w=I)),U=w,X=q.minus(M.times(w=X)),q=w}return w=v(J.minus(H),G,0,1),U=U.plus(w.times(I)),H=H.plus(w.times(G)),U.s=I.s=h.s,D=D*2,T=v(I,G,D,d).minus(h).abs().comparedTo(v(U,H,D,d).minus(h).abs())<1?[I,G]:[U,H],e=R,T},O.toNumber=function(){return+_0(this)},O.toPrecision=function(J,X){if(J!=null)j(J,1,P);return K1(this,J,X,2)},O.toString=function(J){var X,H=this,G=H.s,w=H.e;if(w===null)if(G){if(X="Infinity",G<0)X="-"+X}else X="NaN";else{if(J==null)X=w<=V0||w>=s?o(C(H.c),w):J0(C(H.c),w,"0");else if(J===10&&z1)H=R0(new B(H),i+w+1,d),X=J0(C(H.c),H.e,"0");else j(J,2,c0.length,"Base"),X=k(J0(C(H.c),w,"0"),10,J,G,!0);if(G<0&&H.c[0])X="-"+X}return X},O.valueOf=O.toJSON=function(){return _0(this)},O._isBigNumber=!0,b!=null)B.set(b);return B}function u(b){var v=b|0;return b>0||b===v?v:v-1}function C(b){var v,k,m=1,O=b.length,t=b[0]+"";for(;m<O;){v=b[m++]+"",k=F-v.length;for(;k--;v="0"+v);t+=v}for(O=t.length;t.charCodeAt(--O)===48;);return t.slice(0,O+1||1)}function f(b,v){var k,m,O=b.c,t=v.c,i=b.s,d=v.s,V0=b.e,s=v.e;if(!i||!d)return null;if(k=O&&!O[0],m=t&&!t[0],k||m)return k?m?0:-d:i;if(i!=d)return i;if(k=i<0,m=V0==s,!O||!t)return m?0:!O^k?1:-1;if(!m)return V0>s^k?1:-1;d=(V0=O.length)<(s=t.length)?V0:s;for(i=0;i<d;i++)if(O[i]!=t[i])return O[i]>t[i]^k?1:-1;return V0==s?0:V0>s^k?1:-1}function j(b,v,k,m){if(b<v||b>k||b!==V(b))throw Error(W+(m||"Argument")+(typeof b=="number"?b<v||b>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function p(b){var v=b.c.length-1;return u(b.e/F)==v&&b.c[v]%2!=0}function o(b,v){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(v<0?"e":"e+")+v}function J0(b,v,k){var m,O;if(v<0){for(O=k+".";++v;O+=k);b=O+b}else if(m=b.length,++v>m){for(O=k,v-=m;--v;O+=k);b+=O}else if(v<m)b=b.slice(0,v)+"."+b.slice(v);return b}if($=x(),$.default=$.BigNumber=$,typeof define=="function"&&define.amd)define(function(){return $});else if(typeof h8<"u"&&h8.exports)h8.exports=$;else{if(!Z)Z=typeof self<"u"&&self?self:window;Z.BigNumber=$}})(MZ)});var NZ=A((c5,RZ)=>{var GZ=N1(),IZ=c5;(function(){function Z(L){return L<10?"0"+L:L}var $=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Y,V,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':"\\\"","\\":"\\\\"},z;function K(L){return Q.lastIndex=0,Q.test(L)?'"'+L.replace(Q,function(N){var S=W[N];return typeof S==="string"?S:"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+L+'"'}function F(L,N){var S,P,x,u,C=Y,f,j=N[L],p=j!=null&&(j instanceof GZ||GZ.isBigNumber(j));if(j&&typeof j==="object"&&typeof j.toJSON==="function")j=j.toJSON(L);if(typeof z==="function")j=z.call(N,L,j);switch(typeof j){case"string":if(p)return j;else return K(j);case"number":return isFinite(j)?String(j):"null";case"boolean":case"null":case"bigint":return String(j);case"object":if(!j)return"null";if(Y+=V,f=[],Object.prototype.toString.apply(j)==="[object Array]"){u=j.length;for(S=0;S<u;S+=1)f[S]=F(S,j)||"null";return x=f.length===0?"[]":Y?`[
|
|
7
|
+
`}yield Q}static#W;static#J;static async#X(){return this.#W||=(await import("./chunk-b5dpzcc7.js").then((m)=>vQ(m.default))).HttpsProxyAgent,this.#W}static async#H(){let Z=typeof window<"u"&&!!window;return this.#J||=Z?window.fetch:(await import("node-fetch")).default,this.#J}static mergeHeaders(Z,...$){Z=Z instanceof Headers?Z:new Headers(Z);for(let Q of $)(Q instanceof Headers?Q:new Headers(Q)).forEach((V,W)=>{W==="set-cookie"?Z.append(W,V):Z.set(W,V)});return Z}}o0.Gaxios=R1;s0=R1});var X0=A((q0)=>{var xQ=q0&&q0.__createBinding||(Object.create?function(Z,$,Q,Y){if(Y===void 0)Y=Q;var V=Object.getOwnPropertyDescriptor($,Q);if(!V||("get"in V?!$.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return $[Q]}};Object.defineProperty(Z,Y,V)}:function(Z,$,Q,Y){if(Y===void 0)Y=Q;Z[Y]=$[Q]}),bQ=q0&&q0.__exportStar||function(Z,$){for(var Q in Z)if(Q!=="default"&&!Object.prototype.hasOwnProperty.call($,Q))xQ($,Z,Q)};Object.defineProperty(q0,"__esModule",{value:!0});q0.instance=q0.Gaxios=q0.GaxiosError=void 0;q0.request=gQ;var DZ=UZ();Object.defineProperty(q0,"Gaxios",{enumerable:!0,get:function(){return DZ.Gaxios}});var mQ=G1();Object.defineProperty(q0,"GaxiosError",{enumerable:!0,get:function(){return mQ.GaxiosError}});bQ(I1(),q0);q0.instance=new DZ.Gaxios;async function gQ(Z){return q0.instance.request(Z)}});var N1=A((MZ,h8)=>{(function(Z){var $,Q=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,V=Math.floor,W="[BigNumber Error] ",z=W+"Number primitive has more than 15 significant digits: ",K=100000000000000,F=14,L=9007199254740991,N=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],S=1e7,P=1e9;function x(b){var v,k,m,O=B.prototype={constructor:B,toString:null,valueOf:null},t=new B(1),i=20,d=4,V0=-7,s=21,Q0=-1e7,e=1e7,Y0=!1,y0=1,w0=0,H1={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},c0="0123456789abcdefghijklmnopqrstuvwxyz",z1=!0;function B(J,X){var H,G,w,D,R,q,U,I,M=this;if(!(M instanceof B))return new B(J,X);if(X==null){if(J&&J._isBigNumber===!0){if(M.s=J.s,!J.c||J.e>e)M.c=M.e=null;else if(J.e<Q0)M.c=[M.e=0];else M.e=J.e,M.c=J.c.slice();return}if((q=typeof J=="number")&&J*0==0){if(M.s=1/J<0?(J=-J,-1):1,J===~~J){for(D=0,R=J;R>=10;R/=10,D++);if(D>e)M.c=M.e=null;else M.e=D,M.c=[J];return}I=String(J)}else{if(!Q.test(I=String(J)))return m(M,I,q);M.s=I.charCodeAt(0)==45?(I=I.slice(1),-1):1}if((D=I.indexOf("."))>-1)I=I.replace(".","");if((R=I.search(/e/i))>0){if(D<0)D=R;D+=+I.slice(R+1),I=I.substring(0,R)}else if(D<0)D=I.length}else{if(j(X,2,c0.length,"Base"),X==10&&z1)return M=new B(J),R0(M,i+M.e+1,d);if(I=String(J),q=typeof J=="number"){if(J*0!=0)return m(M,I,q,X);if(M.s=1/J<0?(I=I.slice(1),-1):1,B.DEBUG&&I.replace(/^0\.0*|\./,"").length>15)throw Error(z+J)}else M.s=I.charCodeAt(0)===45?(I=I.slice(1),-1):1;H=c0.slice(0,X),D=R=0;for(U=I.length;R<U;R++)if(H.indexOf(G=I.charAt(R))<0){if(G=="."){if(R>D){D=U;continue}}else if(!w){if(I==I.toUpperCase()&&(I=I.toLowerCase())||I==I.toLowerCase()&&(I=I.toUpperCase())){w=!0,R=-1,D=0;continue}}return m(M,String(J),q,X)}if(q=!1,I=k(I,X,10,M.s),(D=I.indexOf("."))>-1)I=I.replace(".","");else D=I.length}for(R=0;I.charCodeAt(R)===48;R++);for(U=I.length;I.charCodeAt(--U)===48;);if(I=I.slice(R,++U)){if(U-=R,q&&B.DEBUG&&U>15&&(J>L||J!==V(J)))throw Error(z+M.s*J);if((D=D-R-1)>e)M.c=M.e=null;else if(D<Q0)M.c=[M.e=0];else{if(M.e=D,M.c=[],R=(D+1)%F,D<0)R+=F;if(R<U){if(R)M.c.push(+I.slice(0,R));for(U-=F;R<U;)M.c.push(+I.slice(R,R+=F));R=F-(I=I.slice(R)).length}else R-=U;for(;R--;I+="0");M.c.push(+I)}}else M.c=[M.e=0]}B.clone=x,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(J){var X,H;if(J!=null)if(typeof J=="object"){if(J.hasOwnProperty(X="DECIMAL_PLACES"))H=J[X],j(H,0,P,X),i=H;if(J.hasOwnProperty(X="ROUNDING_MODE"))H=J[X],j(H,0,8,X),d=H;if(J.hasOwnProperty(X="EXPONENTIAL_AT"))if(H=J[X],H&&H.pop)j(H[0],-P,0,X),j(H[1],0,P,X),V0=H[0],s=H[1];else j(H,-P,P,X),V0=-(s=H<0?-H:H);if(J.hasOwnProperty(X="RANGE"))if(H=J[X],H&&H.pop)j(H[0],-P,-1,X),j(H[1],1,P,X),Q0=H[0],e=H[1];else if(j(H,-P,P,X),H)Q0=-(e=H<0?-H:H);else throw Error(W+X+" cannot be zero: "+H);if(J.hasOwnProperty(X="CRYPTO"))if(H=J[X],H===!!H)if(H)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Y0=H;else throw Y0=!H,Error(W+"crypto unavailable");else Y0=H;else throw Error(W+X+" not true or false: "+H);if(J.hasOwnProperty(X="MODULO_MODE"))H=J[X],j(H,0,9,X),y0=H;if(J.hasOwnProperty(X="POW_PRECISION"))H=J[X],j(H,0,P,X),w0=H;if(J.hasOwnProperty(X="FORMAT"))if(H=J[X],typeof H=="object")H1=H;else throw Error(W+X+" not an object: "+H);if(J.hasOwnProperty(X="ALPHABET"))if(H=J[X],typeof H=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(H))z1=H.slice(0,10)=="0123456789",c0=H;else throw Error(W+X+" invalid: "+H)}else throw Error(W+"Object expected: "+J);return{DECIMAL_PLACES:i,ROUNDING_MODE:d,EXPONENTIAL_AT:[V0,s],RANGE:[Q0,e],CRYPTO:Y0,MODULO_MODE:y0,POW_PRECISION:w0,FORMAT:H1,ALPHABET:c0}},B.isBigNumber=function(J){if(!J||J._isBigNumber!==!0)return!1;if(!B.DEBUG)return!0;var X,H,G=J.c,w=J.e,D=J.s;Z:if({}.toString.call(G)=="[object Array]"){if((D===1||D===-1)&&w>=-P&&w<=P&&w===V(w)){if(G[0]===0){if(w===0&&G.length===1)return!0;break Z}if(X=(w+1)%F,X<1)X+=F;if(String(G[0]).length==X){for(X=0;X<G.length;X++)if(H=G[X],H<0||H>=K||H!==V(H))break Z;if(H!==0)return!0}}}else if(G===null&&w===null&&(D===null||D===1||D===-1))return!0;throw Error(W+"Invalid BigNumber: "+J)},B.maximum=B.max=function(){return p6(arguments,-1)},B.minimum=B.min=function(){return p6(arguments,1)},B.random=function(){var J=9007199254740992,X=Math.random()*J&2097151?function(){return V(Math.random()*J)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(H){var G,w,D,R,q,U=0,I=[],M=new B(t);if(H==null)H=i;else j(H,0,P);if(R=Y(H/F),Y0)if(crypto.getRandomValues){G=crypto.getRandomValues(new Uint32Array(R*=2));for(;U<R;)if(q=G[U]*131072+(G[U+1]>>>11),q>=9000000000000000)w=crypto.getRandomValues(new Uint32Array(2)),G[U]=w[0],G[U+1]=w[1];else I.push(q%100000000000000),U+=2;U=R/2}else if(crypto.randomBytes){G=crypto.randomBytes(R*=7);for(;U<R;)if(q=(G[U]&31)*281474976710656+G[U+1]*1099511627776+G[U+2]*4294967296+G[U+3]*16777216+(G[U+4]<<16)+(G[U+5]<<8)+G[U+6],q>=9000000000000000)crypto.randomBytes(7).copy(G,U);else I.push(q%100000000000000),U+=7;U=R/7}else throw Y0=!1,Error(W+"crypto unavailable");if(!Y0){for(;U<R;)if(q=X(),q<9000000000000000)I[U++]=q%100000000000000}if(R=I[--U],H%=F,R&&H)q=N[F-H],I[U]=V(R/q)*q;for(;I[U]===0;I.pop(),U--);if(U<0)I=[D=0];else{for(D=-1;I[0]===0;I.splice(0,1),D-=F);for(U=1,q=I[0];q>=10;q/=10,U++);if(U<F)D-=F-U}return M.e=D,M.c=I,M}}(),B.sum=function(){var J=1,X=arguments,H=new B(X[0]);for(;J<X.length;)H=H.plus(X[J++]);return H},k=function(){var J="0123456789";function X(H,G,w,D){var R,q=[0],U,I=0,M=H.length;for(;I<M;){for(U=q.length;U--;q[U]*=G);q[0]+=D.indexOf(H.charAt(I++));for(R=0;R<q.length;R++)if(q[R]>w-1){if(q[R+1]==null)q[R+1]=0;q[R+1]+=q[R]/w|0,q[R]%=w}}return q.reverse()}return function(H,G,w,D,R){var q,U,I,M,T,E,h,c,Z0=H.indexOf("."),W0=i,l=d;if(Z0>=0)M=w0,w0=0,H=H.replace(".",""),c=new B(G),E=c.pow(H.length-Z0),w0=M,c.c=X(J0(C(E.c),E.e,"0"),10,w,J),c.e=c.c.length;h=X(H,G,w,R?(q=c0,J):(q=J,c0)),I=M=h.length;for(;h[--M]==0;h.pop());if(!h[0])return q.charAt(0);if(Z0<0)--I;else E.c=h,E.e=I,E.s=D,E=v(E,c,W0,l,w),h=E.c,T=E.r,I=E.e;if(U=I+W0+1,Z0=h[U],M=w/2,T=T||U<0||h[U+1]!=null,T=l<4?(Z0!=null||T)&&(l==0||l==(E.s<0?3:2)):Z0>M||Z0==M&&(l==4||T||l==6&&h[U-1]&1||l==(E.s<0?8:7)),U<1||!h[0])H=T?J0(q.charAt(1),-W0,q.charAt(0)):q.charAt(0);else{if(h.length=U,T){for(--w;++h[--U]>w;)if(h[U]=0,!U)++I,h=[1].concat(h)}for(M=h.length;!h[--M];);for(Z0=0,H="";Z0<=M;H+=q.charAt(h[Z0++]));H=J0(H,I,q.charAt(0))}return H}}(),v=function(){function J(G,w,D){var R,q,U,I,M=0,T=G.length,E=w%S,h=w/S|0;for(G=G.slice();T--;)U=G[T]%S,I=G[T]/S|0,R=h*U+I*E,q=E*U+R%S*S+M,M=(q/D|0)+(R/S|0)+h*I,G[T]=q%D;if(M)G=[M].concat(G);return G}function X(G,w,D,R){var q,U;if(D!=R)U=D>R?1:-1;else for(q=U=0;q<D;q++)if(G[q]!=w[q]){U=G[q]>w[q]?1:-1;break}return U}function H(G,w,D,R){var q=0;for(;D--;)G[D]-=q,q=G[D]<w[D]?1:0,G[D]=q*R+G[D]-w[D];for(;!G[0]&&G.length>1;G.splice(0,1));}return function(G,w,D,R,q){var U,I,M,T,E,h,c,Z0,W0,l,a,z0,v8,w1,F1,v0,K8,N0=G.s==w.s?1:-1,K0=G.c,$0=w.c;if(!K0||!K0[0]||!$0||!$0[0])return new B(!G.s||!w.s||(K0?$0&&K0[0]==$0[0]:!$0)?NaN:K0&&K0[0]==0||!$0?N0*0:N0/0);if(Z0=new B(N0),W0=Z0.c=[],I=G.e-w.e,N0=D+I+1,!q)q=K,I=u(G.e/F)-u(w.e/F),N0=N0/F|0;for(M=0;$0[M]==(K0[M]||0);M++);if($0[M]>(K0[M]||0))I--;if(N0<0)W0.push(1),T=!0;else{if(w1=K0.length,v0=$0.length,M=0,N0+=2,E=V(q/($0[0]+1)),E>1)$0=J($0,E,q),K0=J(K0,E,q),v0=$0.length,w1=K0.length;v8=v0,l=K0.slice(0,v0),a=l.length;for(;a<v0;l[a++]=0);if(K8=$0.slice(),K8=[0].concat(K8),F1=$0[0],$0[1]>=q/2)F1++;do{if(E=0,U=X($0,l,v0,a),U<0){if(z0=l[0],v0!=a)z0=z0*q+(l[1]||0);if(E=V(z0/F1),E>1){if(E>=q)E=q-1;h=J($0,E,q),c=h.length,a=l.length;while(X(h,l,c,a)==1)E--,H(h,v0<c?K8:$0,c,q),c=h.length,U=1}else{if(E==0)U=E=1;h=$0.slice(),c=h.length}if(c<a)h=[0].concat(h);if(H(l,h,a,q),a=l.length,U==-1)while(X($0,l,v0,a)<1)E++,H(l,v0<a?K8:$0,a,q),a=l.length}else if(U===0)E++,l=[0];if(W0[M++]=E,l[0])l[a++]=K0[v8]||0;else l=[K0[v8]],a=1}while((v8++<w1||l[0]!=null)&&N0--);if(T=l[0]!=null,!W0[0])W0.splice(0,1)}if(q==K){for(M=1,N0=W0[0];N0>=10;N0/=10,M++);R0(Z0,D+(Z0.e=M+I*F-1)+1,R,T)}else Z0.e=I,Z0.r=+T;return Z0}}();function K1(J,X,H,G){var w,D,R,q,U;if(H==null)H=d;else j(H,0,8);if(!J.c)return J.toString();if(w=J.c[0],R=J.e,X==null)U=C(J.c),U=G==1||G==2&&(R<=V0||R>=s)?o(U,R):J0(U,R,"0");else if(J=R0(new B(J),X,H),D=J.e,U=C(J.c),q=U.length,G==1||G==2&&(X<=D||D<=V0)){for(;q<X;U+="0",q++);U=o(U,D)}else if(X-=R+(G===2&&D>R),U=J0(U,D,"0"),D+1>q){if(--X>0)for(U+=".";X--;U+="0");}else if(X+=D-q,X>0){if(D+1==q)U+=".";for(;X--;U+="0");}return J.s<0&&w?"-"+U:U}function p6(J,X){var H,G,w=1,D=new B(J[0]);for(;w<J.length;w++)if(G=new B(J[w]),!G.s||(H=f(D,G))===X||H===0&&D.s===X)D=G;return D}function q1(J,X,H){var G=1,w=X.length;for(;!X[--w];X.pop());for(w=X[0];w>=10;w/=10,G++);if((H=G+H*F-1)>e)J.c=J.e=null;else if(H<Q0)J.c=[J.e=0];else J.e=H,J.c=X;return J}m=function(){var J=/^(-?)0([xbo])(?=\w[\w.]*$)/i,X=/^([^.]+)\.$/,H=/^\.([^.]+)$/,G=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,R,q,U){var I,M=q?R:R.replace(w,"");if(G.test(M))D.s=isNaN(M)?null:M<0?-1:1;else{if(!q){if(M=M.replace(J,function(T,E,h){return I=(h=h.toLowerCase())=="x"?16:h=="b"?2:8,!U||U==I?E:T}),U)I=U,M=M.replace(X,"$1").replace(H,"0.$1");if(R!=M)return new B(M,I)}if(B.DEBUG)throw Error(W+"Not a"+(U?" base "+U:"")+" number: "+R);D.s=null}D.c=D.e=null}}();function R0(J,X,H,G){var w,D,R,q,U,I,M,T=J.c,E=N;if(T){Z:{for(w=1,q=T[0];q>=10;q/=10,w++);if(D=X-w,D<0)D+=F,R=X,U=T[I=0],M=V(U/E[w-R-1]%10);else if(I=Y((D+1)/F),I>=T.length)if(G){for(;T.length<=I;T.push(0));U=M=0,w=1,D%=F,R=D-F+1}else break Z;else{U=q=T[I];for(w=1;q>=10;q/=10,w++);D%=F,R=D-F+w,M=R<0?0:V(U/E[w-R-1]%10)}if(G=G||X<0||T[I+1]!=null||(R<0?U:U%E[w-R-1]),G=H<4?(M||G)&&(H==0||H==(J.s<0?3:2)):M>5||M==5&&(H==4||G||H==6&&(D>0?R>0?U/E[w-R]:0:T[I-1])%10&1||H==(J.s<0?8:7)),X<1||!T[0]){if(T.length=0,G)X-=J.e+1,T[0]=E[(F-X%F)%F],J.e=-X||0;else T[0]=J.e=0;return J}if(D==0)T.length=I,q=1,I--;else T.length=I+1,q=E[F-D],T[I]=R>0?V(U/E[w-R]%E[R])*q:0;if(G)for(;;)if(I==0){for(D=1,R=T[0];R>=10;R/=10,D++);R=T[0]+=q;for(q=1;R>=10;R/=10,q++);if(D!=q){if(J.e++,T[0]==K)T[0]=1}break}else{if(T[I]+=q,T[I]!=K)break;T[I--]=0,q=1}for(D=T.length;T[--D]===0;T.pop());}if(J.e>e)J.c=J.e=null;else if(J.e<Q0)J.c=[J.e=0]}return J}function _0(J){var X,H=J.e;if(H===null)return J.toString();return X=C(J.c),X=H<=V0||H>=s?o(X,H):J0(X,H,"0"),J.s<0?"-"+X:X}if(O.absoluteValue=O.abs=function(){var J=new B(this);if(J.s<0)J.s=1;return J},O.comparedTo=function(J,X){return f(this,new B(J,X))},O.decimalPlaces=O.dp=function(J,X){var H,G,w,D=this;if(J!=null){if(j(J,0,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J+D.e+1,X)}if(!(H=D.c))return null;if(G=((w=H.length-1)-u(this.e/F))*F,w=H[w])for(;w%10==0;w/=10,G--);if(G<0)G=0;return G},O.dividedBy=O.div=function(J,X){return v(this,new B(J,X),i,d)},O.dividedToIntegerBy=O.idiv=function(J,X){return v(this,new B(J,X),0,1)},O.exponentiatedBy=O.pow=function(J,X){var H,G,w,D,R,q,U,I,M,T=this;if(J=new B(J),J.c&&!J.isInteger())throw Error(W+"Exponent not an integer: "+_0(J));if(X!=null)X=new B(X);if(q=J.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!J.c||!J.c[0])return M=new B(Math.pow(+_0(T),q?J.s*(2-p(J)):+_0(J))),X?M.mod(X):M;if(U=J.s<0,X){if(X.c?!X.c[0]:!X.s)return new B(NaN);if(G=!U&&T.isInteger()&&X.isInteger(),G)T=T.mod(X)}else if(J.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||q&&T.c[1]>=240000000:T.c[0]<80000000000000||q&&T.c[0]<=99999750000000))){if(D=T.s<0&&p(J)?-0:0,T.e>-1)D=1/D;return new B(U?1/D:D)}else if(w0)D=Y(w0/F+2);if(q){if(H=new B(0.5),U)J.s=1;I=p(J)}else w=Math.abs(+_0(J)),I=w%2;M=new B(t);for(;;){if(I){if(M=M.times(T),!M.c)break;if(D){if(M.c.length>D)M.c.length=D}else if(G)M=M.mod(X)}if(w){if(w=V(w/2),w===0)break;I=w%2}else if(J=J.times(H),R0(J,J.e+1,1),J.e>14)I=p(J);else{if(w=+_0(J),w===0)break;I=w%2}if(T=T.times(T),D){if(T.c&&T.c.length>D)T.c.length=D}else if(G)T=T.mod(X)}if(G)return M;if(U)M=t.div(M);return X?M.mod(X):D?R0(M,w0,d,R):M},O.integerValue=function(J){var X=new B(this);if(J==null)J=d;else j(J,0,8);return R0(X,X.e+1,J)},O.isEqualTo=O.eq=function(J,X){return f(this,new B(J,X))===0},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(J,X){return f(this,new B(J,X))>0},O.isGreaterThanOrEqualTo=O.gte=function(J,X){return(X=f(this,new B(J,X)))===1||X===0},O.isInteger=function(){return!!this.c&&u(this.e/F)>this.c.length-2},O.isLessThan=O.lt=function(J,X){return f(this,new B(J,X))<0},O.isLessThanOrEqualTo=O.lte=function(J,X){return(X=f(this,new B(J,X)))===-1||X===0},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&this.c[0]==0},O.minus=function(J,X){var H,G,w,D,R=this,q=R.s;if(J=new B(J,X),X=J.s,!q||!X)return new B(NaN);if(q!=X)return J.s=-X,R.plus(J);var U=R.e/F,I=J.e/F,M=R.c,T=J.c;if(!U||!I){if(!M||!T)return M?(J.s=-X,J):new B(T?R:NaN);if(!M[0]||!T[0])return T[0]?(J.s=-X,J):new B(M[0]?R:d==3?-0:0)}if(U=u(U),I=u(I),M=M.slice(),q=U-I){if(D=q<0)q=-q,w=M;else I=U,w=T;w.reverse();for(X=q;X--;w.push(0));w.reverse()}else{G=(D=(q=M.length)<(X=T.length))?q:X;for(q=X=0;X<G;X++)if(M[X]!=T[X]){D=M[X]<T[X];break}}if(D)w=M,M=T,T=w,J.s=-J.s;if(X=(G=T.length)-(H=M.length),X>0)for(;X--;M[H++]=0);X=K-1;for(;G>q;){if(M[--G]<T[G]){for(H=G;H&&!M[--H];M[H]=X);--M[H],M[G]+=K}M[G]-=T[G]}for(;M[0]==0;M.splice(0,1),--I);if(!M[0])return J.s=d==3?-1:1,J.c=[J.e=0],J;return q1(J,M,I)},O.modulo=O.mod=function(J,X){var H,G,w=this;if(J=new B(J,X),!w.c||!J.s||J.c&&!J.c[0])return new B(NaN);else if(!J.c||w.c&&!w.c[0])return new B(w);if(y0==9)G=J.s,J.s=1,H=v(w,J,0,3),J.s=G,H.s*=G;else H=v(w,J,0,y0);if(J=w.minus(H.times(J)),!J.c[0]&&y0==1)J.s=w.s;return J},O.multipliedBy=O.times=function(J,X){var H,G,w,D,R,q,U,I,M,T,E,h,c,Z0,W0,l=this,a=l.c,z0=(J=new B(J,X)).c;if(!a||!z0||!a[0]||!z0[0]){if(!l.s||!J.s||a&&!a[0]&&!z0||z0&&!z0[0]&&!a)J.c=J.e=J.s=null;else if(J.s*=l.s,!a||!z0)J.c=J.e=null;else J.c=[0],J.e=0;return J}if(G=u(l.e/F)+u(J.e/F),J.s*=l.s,U=a.length,T=z0.length,U<T)c=a,a=z0,z0=c,w=U,U=T,T=w;for(w=U+T,c=[];w--;c.push(0));Z0=K,W0=S;for(w=T;--w>=0;){H=0,E=z0[w]%W0,h=z0[w]/W0|0;for(R=U,D=w+R;D>w;)I=a[--R]%W0,M=a[R]/W0|0,q=h*I+M*E,I=E*I+q%W0*W0+c[D]+H,H=(I/Z0|0)+(q/W0|0)+h*M,c[D--]=I%Z0;c[D]=H}if(H)++G;else c.splice(0,1);return q1(J,c,G)},O.negated=function(){var J=new B(this);return J.s=-J.s||null,J},O.plus=function(J,X){var H,G=this,w=G.s;if(J=new B(J,X),X=J.s,!w||!X)return new B(NaN);if(w!=X)return J.s=-X,G.minus(J);var D=G.e/F,R=J.e/F,q=G.c,U=J.c;if(!D||!R){if(!q||!U)return new B(w/0);if(!q[0]||!U[0])return U[0]?J:new B(q[0]?G:w*0)}if(D=u(D),R=u(R),q=q.slice(),w=D-R){if(w>0)R=D,H=U;else w=-w,H=q;H.reverse();for(;w--;H.push(0));H.reverse()}if(w=q.length,X=U.length,w-X<0)H=U,U=q,q=H,X=w;for(w=0;X;)w=(q[--X]=q[X]+U[X]+w)/K|0,q[X]=K===q[X]?0:q[X]%K;if(w)q=[w].concat(q),++R;return q1(J,q,R)},O.precision=O.sd=function(J,X){var H,G,w,D=this;if(J!=null&&J!==!!J){if(j(J,1,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J,X)}if(!(H=D.c))return null;if(w=H.length-1,G=w*F+1,w=H[w]){for(;w%10==0;w/=10,G--);for(w=H[0];w>=10;w/=10,G++);}if(J&&D.e+1>G)G=D.e+1;return G},O.shiftedBy=function(J){return j(J,-L,L),this.times("1e"+J)},O.squareRoot=O.sqrt=function(){var J,X,H,G,w,D=this,R=D.c,q=D.s,U=D.e,I=i+4,M=new B("0.5");if(q!==1||!R||!R[0])return new B(!q||q<0&&(!R||R[0])?NaN:R?D:1/0);if(q=Math.sqrt(+_0(D)),q==0||q==1/0){if(X=C(R),(X.length+U)%2==0)X+="0";if(q=Math.sqrt(+X),U=u((U+1)/2)-(U<0||U%2),q==1/0)X="5e"+U;else X=q.toExponential(),X=X.slice(0,X.indexOf("e")+1)+U;H=new B(X)}else H=new B(q+"");if(H.c[0]){if(U=H.e,q=U+I,q<3)q=0;for(;;)if(w=H,H=M.times(w.plus(v(D,w,I,1))),C(w.c).slice(0,q)===(X=C(H.c)).slice(0,q)){if(H.e<U)--q;if(X=X.slice(q-3,q+1),X=="9999"||!G&&X=="4999"){if(!G){if(R0(w,w.e+i+2,0),w.times(w).eq(D)){H=w;break}}I+=4,q+=4,G=1}else{if(!+X||!+X.slice(1)&&X.charAt(0)=="5")R0(H,H.e+i+2,1),J=!H.times(H).eq(D);break}}}return R0(H,H.e+i+1,d,J)},O.toExponential=function(J,X){if(J!=null)j(J,0,P),J++;return K1(this,J,X,1)},O.toFixed=function(J,X){if(J!=null)j(J,0,P),J=J+this.e+1;return K1(this,J,X)},O.toFormat=function(J,X,H){var G,w=this;if(H==null)if(J!=null&&X&&typeof X=="object")H=X,X=null;else if(J&&typeof J=="object")H=J,J=X=null;else H=H1;else if(typeof H!="object")throw Error(W+"Argument not an object: "+H);if(G=w.toFixed(J,X),w.c){var D,R=G.split("."),q=+H.groupSize,U=+H.secondaryGroupSize,I=H.groupSeparator||"",M=R[0],T=R[1],E=w.s<0,h=E?M.slice(1):M,c=h.length;if(U)D=q,q=U,U=D,c-=D;if(q>0&&c>0){D=c%q||q,M=h.substr(0,D);for(;D<c;D+=q)M+=I+h.substr(D,q);if(U>0)M+=I+h.slice(D);if(E)M="-"+M}G=T?M+(H.decimalSeparator||"")+((U=+H.fractionGroupSize)?T.replace(new RegExp("\\d{"+U+"}\\B","g"),"$&"+(H.fractionGroupSeparator||"")):T):M}return(H.prefix||"")+G+(H.suffix||"")},O.toFraction=function(J){var X,H,G,w,D,R,q,U,I,M,T,E,h=this,c=h.c;if(J!=null){if(q=new B(J),!q.isInteger()&&(q.c||q.s!==1)||q.lt(t))throw Error(W+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+_0(q))}if(!c)return new B(h);X=new B(t),I=H=new B(t),G=U=new B(t),E=C(c),D=X.e=E.length-h.e-1,X.c[0]=N[(R=D%F)<0?F+R:R],J=!J||q.comparedTo(X)>0?D>0?X:I:q,R=e,e=1/0,q=new B(E),U.c[0]=0;for(;;){if(M=v(q,X,0,1),w=H.plus(M.times(G)),w.comparedTo(J)==1)break;H=G,G=w,I=U.plus(M.times(w=I)),U=w,X=q.minus(M.times(w=X)),q=w}return w=v(J.minus(H),G,0,1),U=U.plus(w.times(I)),H=H.plus(w.times(G)),U.s=I.s=h.s,D=D*2,T=v(I,G,D,d).minus(h).abs().comparedTo(v(U,H,D,d).minus(h).abs())<1?[I,G]:[U,H],e=R,T},O.toNumber=function(){return+_0(this)},O.toPrecision=function(J,X){if(J!=null)j(J,1,P);return K1(this,J,X,2)},O.toString=function(J){var X,H=this,G=H.s,w=H.e;if(w===null)if(G){if(X="Infinity",G<0)X="-"+X}else X="NaN";else{if(J==null)X=w<=V0||w>=s?o(C(H.c),w):J0(C(H.c),w,"0");else if(J===10&&z1)H=R0(new B(H),i+w+1,d),X=J0(C(H.c),H.e,"0");else j(J,2,c0.length,"Base"),X=k(J0(C(H.c),w,"0"),10,J,G,!0);if(G<0&&H.c[0])X="-"+X}return X},O.valueOf=O.toJSON=function(){return _0(this)},O._isBigNumber=!0,b!=null)B.set(b);return B}function u(b){var v=b|0;return b>0||b===v?v:v-1}function C(b){var v,k,m=1,O=b.length,t=b[0]+"";for(;m<O;){v=b[m++]+"",k=F-v.length;for(;k--;v="0"+v);t+=v}for(O=t.length;t.charCodeAt(--O)===48;);return t.slice(0,O+1||1)}function f(b,v){var k,m,O=b.c,t=v.c,i=b.s,d=v.s,V0=b.e,s=v.e;if(!i||!d)return null;if(k=O&&!O[0],m=t&&!t[0],k||m)return k?m?0:-d:i;if(i!=d)return i;if(k=i<0,m=V0==s,!O||!t)return m?0:!O^k?1:-1;if(!m)return V0>s^k?1:-1;d=(V0=O.length)<(s=t.length)?V0:s;for(i=0;i<d;i++)if(O[i]!=t[i])return O[i]>t[i]^k?1:-1;return V0==s?0:V0>s^k?1:-1}function j(b,v,k,m){if(b<v||b>k||b!==V(b))throw Error(W+(m||"Argument")+(typeof b=="number"?b<v||b>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function p(b){var v=b.c.length-1;return u(b.e/F)==v&&b.c[v]%2!=0}function o(b,v){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(v<0?"e":"e+")+v}function J0(b,v,k){var m,O;if(v<0){for(O=k+".";++v;O+=k);b=O+b}else if(m=b.length,++v>m){for(O=k,v-=m;--v;O+=k);b+=O}else if(v<m)b=b.slice(0,v)+"."+b.slice(v);return b}if($=x(),$.default=$.BigNumber=$,typeof define=="function"&&define.amd)define(function(){return $});else if(typeof h8<"u"&&h8.exports)h8.exports=$;else{if(!Z)Z=typeof self<"u"&&self?self:window;Z.BigNumber=$}})(MZ)});var NZ=A((c5,RZ)=>{var GZ=N1(),IZ=c5;(function(){function Z(L){return L<10?"0"+L:L}var $=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Y,V,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':"\\\"","\\":"\\\\"},z;function K(L){return Q.lastIndex=0,Q.test(L)?'"'+L.replace(Q,function(N){var S=W[N];return typeof S==="string"?S:"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+L+'"'}function F(L,N){var S,P,x,u,C=Y,f,j=N[L],p=j!=null&&(j instanceof GZ||GZ.isBigNumber(j));if(j&&typeof j==="object"&&typeof j.toJSON==="function")j=j.toJSON(L);if(typeof z==="function")j=z.call(N,L,j);switch(typeof j){case"string":if(p)return j;else return K(j);case"number":return isFinite(j)?String(j):"null";case"boolean":case"null":case"bigint":return String(j);case"object":if(!j)return"null";if(Y+=V,f=[],Object.prototype.toString.apply(j)==="[object Array]"){u=j.length;for(S=0;S<u;S+=1)f[S]=F(S,j)||"null";return x=f.length===0?"[]":Y?`[
|
|
8
8
|
`+Y+f.join(`,
|
|
9
9
|
`+Y)+`
|
|
10
10
|
`+C+"]":"["+f.join(",")+"]",Y=C,x}if(z&&typeof z==="object"){u=z.length;for(S=0;S<u;S+=1)if(typeof z[S]==="string"){if(P=z[S],x=F(P,j),x)f.push(K(P)+(Y?": ":":")+x)}}else Object.keys(j).forEach(function(o){var J0=F(o,j);if(J0)f.push(K(o)+(Y?": ":":")+J0)});return x=f.length===0?"{}":Y?`{
|
|
@@ -29,4 +29,4 @@ To learn more about authentication and Google APIs, visit:
|
|
|
29
29
|
https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:"Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.",NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment.
|
|
30
30
|
To learn more about Universe Domain retrieval, visit:
|
|
31
31
|
https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};class QQ{checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#Z=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(Z={}){if(this._cachedProjectId=Z.projectId||null,this.cachedCredential=Z.authClient||null,this.keyFilename=Z.keyFilename||Z.keyFile,this.scopes=Z.scopes,this.clientOptions=Z.clientOptions||{},this.jsonContent=Z.credentials||null,this.apiKey=Z.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw RangeError(YQ.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);if(Z.universeDomain)this.clientOptions.universeDomain=Z.universeDomain}setGapicJWTValues(Z){Z.defaultServicePath=this.defaultServicePath,Z.useJWTAccessWithScope=this.useJWTAccessWithScope,Z.defaultScopes=this.defaultScopes}getProjectId(Z){if(Z)this.getProjectIdAsync().then(($)=>Z(null,$),Z);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(Z){if(Z instanceof Error&&Z.message===YQ.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;else throw Z}}async findAndCacheProjectId(){let Z=null;if(Z||=await this.getProductionProjectId(),Z||=await this.getFileProjectId(),Z||=await this.getDefaultServiceProjectId(),Z||=await this.getGCEProjectId(),Z||=await this.getExternalAccountClientProjectId(),Z)return this._cachedProjectId=Z,Z;else throw Error(YQ.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){if(this._cachedProjectId)return this._cachedProjectId;if(!this._findProjectIdPromise)this._findProjectIdPromise=this.findAndCacheProjectId();return this._findProjectIdPromise}async getUniverseDomainFromMetadataServer(){let Z;try{Z=await j8.universe("universe-domain"),Z||=u6.DEFAULT_UNIVERSE}catch($){if($&&$?.response?.status===404)Z=u6.DEFAULT_UNIVERSE;else throw $}return Z}async getUniverseDomain(){let Z=(0,$Q.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{Z??=(await this.getClient()).universeDomain}catch{Z??=u6.DEFAULT_UNIVERSE}return Z}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(Z={},$){let Q;if(typeof Z==="function")$=Z;else Q=Z;if($)this.getApplicationDefaultAsync(Q).then((Y)=>$(null,Y.credential,Y.projectId),$);else return this.getApplicationDefaultAsync(Q)}async getApplicationDefaultAsync(Z={}){if(this.cachedCredential)return await this.#$(this.cachedCredential,null);let $;if($=await this._tryGetApplicationCredentialsFromEnvironmentVariable(Z),$){if($ instanceof X8.JWT)$.scopes=this.scopes;else if($ instanceof C8.BaseExternalAccountClient)$.scopes=this.getAnyScopes();return await this.#$($)}if($=await this._tryGetApplicationCredentialsFromWellKnownFile(Z),$){if($ instanceof X8.JWT)$.scopes=this.scopes;else if($ instanceof C8.BaseExternalAccountClient)$.scopes=this.getAnyScopes();return await this.#$($)}if(await this._checkIsGCE())return Z.scopes=this.getAnyScopes(),await this.#$(new Q5.Compute(Z));throw Error(YQ.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#$(Z,$=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let Q=await this.getProjectIdOptional();if($)Z.quotaProjectId=$;return this.cachedCredential=Z,{credential:Z,projectId:Q}}async _checkIsGCE(){if(this.checkIsGCE===void 0)this.checkIsGCE=j8.getGCPResidency()||await j8.isAvailable();return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(Z){let $=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!$||$.length===0)return null;try{return this._getApplicationCredentialsFromFilePath($,Z)}catch(Q){if(Q instanceof Error)Q.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${Q.message}`;throw Q}}async _tryGetApplicationCredentialsFromWellKnownFile(Z){let $=null;if(this._isWindows())$=process.env.APPDATA;else{let Y=process.env.HOME;if(Y)$=g6.join(Y,".config")}if($){if($=g6.join($,"gcloud","application_default_credentials.json"),!A8.existsSync($))$=null}if(!$)return null;return await this._getApplicationCredentialsFromFilePath($,Z)}async _getApplicationCredentialsFromFilePath(Z,$={}){if(!Z||Z.length===0)throw Error("The file path is invalid.");try{if(Z=A8.realpathSync(Z),!A8.lstatSync(Z).isFile())throw Error()}catch(Y){if(Y instanceof Error)Y.message=`The file at ${Z} does not exist, or it is not a file. ${Y.message}`;throw Y}let Q=A8.createReadStream(Z);return this.fromStream(Q,$)}fromImpersonatedJSON(Z){if(!Z)throw Error("Must pass in a JSON object containing an impersonated refresh token");if(Z.type!==H8.IMPERSONATED_ACCOUNT_TYPE)throw Error(`The incoming JSON object does not have the "${H8.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!Z.source_credentials)throw Error("The incoming JSON object does not contain a source_credentials field");if(!Z.service_account_impersonation_url)throw Error("The incoming JSON object does not contain a service_account_impersonation_url field");let $=this.fromJSON(Z.source_credentials);if(Z.service_account_impersonation_url?.length>256)throw RangeError(`Target principal is too long: ${Z.service_account_impersonation_url}`);let Q=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(Z.service_account_impersonation_url)?.groups?.target;if(!Q)throw RangeError(`Cannot extract target principal from ${Z.service_account_impersonation_url}`);let Y=(this.scopes||Z.scopes||this.defaultScopes)??[];return new H8.Impersonated({...Z,sourceClient:$,targetPrincipal:Q,targetScopes:Array.isArray(Y)?Y:[Y]})}fromJSON(Z,$={}){let Q,Y=(0,$Q.originalOrCamelOptions)($).get("universe_domain");if(Z.type===e9.USER_REFRESH_ACCOUNT_TYPE)Q=new e9.UserRefreshClient($),Q.fromJSON(Z);else if(Z.type===H8.IMPERSONATED_ACCOUNT_TYPE)Q=this.fromImpersonatedJSON(Z);else if(Z.type===C8.EXTERNAL_ACCOUNT_TYPE)Q=W5.ExternalAccountClient.fromJSON({...Z,...$}),Q.scopes=this.getAnyScopes();else if(Z.type===ZQ.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE)Q=new ZQ.ExternalAccountAuthorizedUserClient({...Z,...$});else $.scopes=this.scopes,Q=new X8.JWT($),this.setGapicJWTValues(Q),Q.fromJSON(Z);if(Y)Q.universeDomain=Y;return Q}_cacheClientFromJSON(Z,$){let Q=this.fromJSON(Z,$);return this.jsonContent=Z,this.cachedCredential=Q,Q}fromStream(Z,$={},Q){let Y={};if(typeof $==="function")Q=$;else Y=$;if(Q)this.fromStreamAsync(Z,Y).then((V)=>Q(null,V),Q);else return this.fromStreamAsync(Z,Y)}fromStreamAsync(Z,$){return new Promise((Q,Y)=>{if(!Z)throw Error("Must pass in a stream containing the Google auth settings.");let V=[];Z.setEncoding("utf8").on("error",Y).on("data",(W)=>V.push(W)).on("end",()=>{try{try{let W=JSON.parse(V.join("")),z=this._cacheClientFromJSON(W,$);return Q(z)}catch(W){if(!this.keyFilename)throw W;let z=new X8.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=z,this.setGapicJWTValues(z),Q(z)}}catch(W){return Y(W)}})})}fromAPIKey(Z,$={}){return new X8.JWT({...$,apiKey:Z})}_isWindows(){let Z=Z5.platform();if(Z&&Z.length>=3){if(Z.substring(0,3).toLowerCase()==="win")return!0}return!1}async getDefaultServiceProjectId(){return new Promise((Z)=>{(0,tJ.exec)("gcloud config config-helper --format json",($,Q)=>{if(!$&&Q)try{let Y=JSON.parse(Q).configuration.properties.core.project;Z(Y);return}catch(Y){}Z(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let $=await this.getClient();if($&&$.projectId)return $.projectId}let Z=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(Z)return Z.projectId;else return null}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==C8.EXTERNAL_ACCOUNT_TYPE)return null;return await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await j8.project("project-id")}catch(Z){return null}}getCredentials(Z){if(Z)this.getCredentialsAsync().then(($)=>Z(null,$),Z);else return this.getCredentialsAsync()}async getCredentialsAsync(){let Z=await this.getClient();if(Z instanceof H8.Impersonated)return{client_email:Z.getTargetPrincipal()};if(Z instanceof C8.BaseExternalAccountClient){let $=Z.getServiceAccountEmail();if($)return{client_email:$,universe_domain:Z.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[$,Q]=await Promise.all([j8.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:$,universe_domain:Q}}throw Error(YQ.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#Z=this.#Z||this.#Q();try{return await this.#Z}finally{this.#Z=null}}async#Q(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);else if(this.keyFilename){let Z=g6.resolve(this.keyFilename),$=A8.createReadStream(Z);return await this.fromStreamAsync($,this.clientOptions)}else if(this.apiKey){let Z=await this.fromAPIKey(this.apiKey,this.clientOptions);Z.scopes=this.scopes;let{credential:$}=await this.#$(Z);return $}else{let{credential:Z}=await this.getApplicationDefaultAsync(this.clientOptions);return Z}}async getIdTokenClient(Z){let $=await this.getClient();if(!("fetchIdToken"in $))throw Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new Y5.IdTokenClient({targetAudience:Z,idTokenProvider:$})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(Z){return(await this.getClient()).getRequestHeaders(Z)}async authorizeRequest(Z={}){let $=Z.url,Y=await(await this.getClient()).getRequestHeaders($);return Z.headers=eJ.Gaxios.mergeHeaders(Z.headers,Y),Z}async fetch(...Z){return(await this.getClient()).fetch(...Z)}async request(Z){return(await this.getClient()).request(Z)}getEnv(){return(0,V5.getEnv)()}async sign(Z,$){let Q=await this.getClient(),Y=await this.getUniverseDomain();if($=$||`https://iamcredentials.${Y}/v1/projects/-/serviceAccounts/`,Q instanceof H8.Impersonated)return(await Q.sign(Z)).signedBlob;let V=(0,$5.createCrypto)();if(Q instanceof X8.JWT&&Q.key)return await V.sign(Q.key,Z);let W=await this.getCredentials();if(!W.client_email)throw Error("Cannot sign data without `client_email`.");return this.signBlob(V,W.client_email,Z,$)}async signBlob(Z,$,Q,Y){let V=new URL(Y+`${$}:signBlob`);return(await this.request({method:"POST",url:V.href,data:{payload:Z.encodeBase64StringUtf8(Q)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}}YQ.GoogleAuth=QQ});var zQ=A((XQ)=>{Object.defineProperty(XQ,"__esModule",{value:!0});XQ.IAMAuth=void 0;class JQ{selector;token;constructor(Z,$){this.selector=Z,this.token=$,this.selector=Z,this.token=$}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}}XQ.IAMAuth=JQ});var FQ=A((qQ)=>{Object.defineProperty(qQ,"__esModule",{value:!0});qQ.DownscopedClient=qQ.EXPIRATION_TIME_OFFSET=qQ.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var J5=X0(),X5=_("stream"),d6=D0(),H5=o8(),z5="urn:ietf:params:oauth:grant-type:token-exchange",K5="urn:ietf:params:oauth:token-type:access_token",q5="urn:ietf:params:oauth:token-type:access_token";qQ.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;qQ.EXPIRATION_TIME_OFFSET=300000;class KQ extends d6.AuthClient{authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(Z,$={accessBoundary:{accessBoundaryRules:[]}}){super(Z instanceof d6.AuthClient?{}:Z);if(Z instanceof d6.AuthClient)this.authClient=Z,this.credentialAccessBoundary=$;else this.authClient=Z.authClient,this.credentialAccessBoundary=Z.credentialAccessBoundary;if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw Error("At least one access boundary rule needs to be defined.");else if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>qQ.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw Error(`The provided access boundary has more than ${qQ.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let Q of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(Q.availablePermissions.length===0)throw Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new H5.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(Z){if(!Z.expiry_date)throw Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(Z),this.cachedDownscopedAccessToken=Z}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))await this.refreshAccessTokenAsync();return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let Z=await this.getAccessToken(),$=new Headers({authorization:`Bearer ${Z.token}`});return this.addSharedMetadataHeaders($)}request(Z,$){if($)this.requestAsync(Z).then((Q)=>$(null,Q),(Q)=>{return $(Q,Q.response)});else return this.requestAsync(Z)}async requestAsync(Z,$=!1){let Q;try{let Y=await this.getRequestHeaders();Z.headers=J5.Gaxios.mergeHeaders(Z.headers),this.addUserProjectAndAuthHeaders(Z.headers,Y),Q=await this.transporter.request(Z)}catch(Y){let V=Y.response;if(V){let W=V.status,z=V.config.data instanceof X5.Readable;if(!$&&(W===401||W===403)&&!z&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(Z,!0)}throw Y}return Q}async refreshAccessTokenAsync(){let Z=(await this.authClient.getAccessToken()).token,$={grantType:z5,requestedTokenType:K5,subjectToken:Z,subjectTokenType:q5},Q=await this.stsCredential.exchangeToken($,void 0,this.credentialAccessBoundary),Y=this.authClient.credentials?.expiry_date||null,V=Q.expires_in?new Date().getTime()+Q.expires_in*1000:Y;return this.cachedDownscopedAccessToken={access_token:Q.access_token,expiry_date:V,res:Q.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(Z){let $=new Date().getTime();return Z.expiry_date?$>=Z.expiry_date-this.eagerRefreshThresholdMillis:!1}}qQ.DownscopedClient=KQ});var GQ=A((DQ)=>{Object.defineProperty(DQ,"__esModule",{value:!0});DQ.PassThroughClient=void 0;var F5=D0();class UQ extends F5.AuthClient{async request(Z){return this.transporter.request(Z)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}}DQ.PassThroughClient=UQ});var y5=A((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.GoogleAuth=r.auth=r.PassThroughClient=r.ExternalAccountAuthorizedUserClient=r.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=r.ExecutableError=r.PluggableAuthClient=r.DownscopedClient=r.BaseExternalAccountClient=r.ExternalAccountClient=r.IdentityPoolClient=r.AwsRequestSigner=r.AwsClient=r.UserRefreshClient=r.LoginTicket=r.ClientAuthentication=r.OAuth2Client=r.CodeChallengeMethod=r.Impersonated=r.JWT=r.JWTAccess=r.IdTokenClient=r.IAMAuth=r.GCPEnv=r.Compute=r.DEFAULT_UNIVERSE=r.AuthClient=r.gaxios=r.gcpMetadata=void 0;var IQ=WQ();Object.defineProperty(r,"GoogleAuth",{enumerable:!0,get:function(){return IQ.GoogleAuth}});r.gcpMetadata=U8();r.gaxios=X0();var RQ=D0();Object.defineProperty(r,"AuthClient",{enumerable:!0,get:function(){return RQ.AuthClient}});Object.defineProperty(r,"DEFAULT_UNIVERSE",{enumerable:!0,get:function(){return RQ.DEFAULT_UNIVERSE}});var U5=u1();Object.defineProperty(r,"Compute",{enumerable:!0,get:function(){return U5.Compute}});var D5=l1();Object.defineProperty(r,"GCPEnv",{enumerable:!0,get:function(){return D5.GCPEnv}});var M5=zQ();Object.defineProperty(r,"IAMAuth",{enumerable:!0,get:function(){return M5.IAMAuth}});var G5=d1();Object.defineProperty(r,"IdTokenClient",{enumerable:!0,get:function(){return G5.IdTokenClient}});var I5=J6();Object.defineProperty(r,"JWTAccess",{enumerable:!0,get:function(){return I5.JWTAccess}});var R5=H6();Object.defineProperty(r,"JWT",{enumerable:!0,get:function(){return R5.JWT}});var N5=K6();Object.defineProperty(r,"Impersonated",{enumerable:!0,get:function(){return N5.Impersonated}});var c6=n0();Object.defineProperty(r,"CodeChallengeMethod",{enumerable:!0,get:function(){return c6.CodeChallengeMethod}});Object.defineProperty(r,"OAuth2Client",{enumerable:!0,get:function(){return c6.OAuth2Client}});Object.defineProperty(r,"ClientAuthentication",{enumerable:!0,get:function(){return c6.ClientAuthentication}});var T5=m1();Object.defineProperty(r,"LoginTicket",{enumerable:!0,get:function(){return T5.LoginTicket}});var L5=z6();Object.defineProperty(r,"UserRefreshClient",{enumerable:!0,get:function(){return L5.UserRefreshClient}});var S5=L6();Object.defineProperty(r,"AwsClient",{enumerable:!0,get:function(){return S5.AwsClient}});var B5=T6();Object.defineProperty(r,"AwsRequestSigner",{enumerable:!0,get:function(){return B5.AwsRequestSigner}});var O5=N6();Object.defineProperty(r,"IdentityPoolClient",{enumerable:!0,get:function(){return O5.IdentityPoolClient}});var P5=x6();Object.defineProperty(r,"ExternalAccountClient",{enumerable:!0,get:function(){return P5.ExternalAccountClient}});var A5=l0();Object.defineProperty(r,"BaseExternalAccountClient",{enumerable:!0,get:function(){return A5.BaseExternalAccountClient}});var j5=FQ();Object.defineProperty(r,"DownscopedClient",{enumerable:!0,get:function(){return j5.DownscopedClient}});var NQ=_6();Object.defineProperty(r,"PluggableAuthClient",{enumerable:!0,get:function(){return NQ.PluggableAuthClient}});Object.defineProperty(r,"ExecutableError",{enumerable:!0,get:function(){return NQ.ExecutableError}});var TQ=m6();Object.defineProperty(r,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:function(){return TQ.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE}});Object.defineProperty(r,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:function(){return TQ.ExternalAccountAuthorizedUserClient}});var C5=GQ();Object.defineProperty(r,"PassThroughClient",{enumerable:!0,get:function(){return C5.PassThroughClient}});var v5=new IQ.GoogleAuth;r.auth=v5});
|
|
32
|
-
export{y5 as
|
|
32
|
+
export{y5 as yf};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as AQ,Ue as l,Ve as jW,We as LQ,Ye as KQ,_e as GW,af as QQ,bf as hW,df as OQ,ef as CW,ff as IW,gf as KW,hf as P,if as O,jf as u,kf as VW,lf as bQ,mf as WQ,nf as XQ,of as qQ,pf as DW,qf as a,rf as FW,sf as wQ,tf as BQ,uf as wW}from"./chunk-1bhcg889.js";import{Iq as $W,Mq as BW,Nq as UQ,Sq as JW,Uq as ZQ}from"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import{Iu as Q}from"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-0xf12tf3.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==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 $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){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 mW=P(()=>O(Q.object({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(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({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()}))),pW=P(()=>O(Q.union([Q.object({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(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({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()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==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 w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
2
|
+
import{We as l,Xe as jW,Ye as LQ,_e as KQ,af as GW,bf as AQ,cf as QQ,df as hW,ff as OQ,gf as CW,hf as IW,if as KW,jf as P,kf as O,lf as u,mf as VW,nf as bQ,of as WQ,pf as XQ,qf as qQ,rf as DW,sf as a,tf as FW,uf as wQ,vf as BQ,wf as wW}from"./chunk-4ycg2c6f.js";import{Lq as $W,Pq as BW,Qq as UQ,Vq as JW,Xq as ZQ}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as Q}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==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 $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){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 mW=P(()=>O(Q.object({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(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({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()}))),pW=P(()=>O(Q.union([Q.object({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(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({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()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==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 w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
3
3
|
|
|
4
4
|
`,X=X.slice(1);for(let{role:J,content:w}of X)switch(J){case"system":throw new BW({message:"Unexpected system message in prompt: ${content}",prompt:X});case"user":{let D=w.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");F+=`${Z}:
|
|
5
5
|
${D}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as $B,b as zB}from"./chunk-
|
|
3
|
-
`+B}async function v(B){let J=o({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),Z=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],X=await XB(J.session,B)??(await J.session.create({permission:Z})).data?.id;if(!X){z.error("headless: failed to create session");return}let G=await J.event.subscribe(),Y=YB({sessionID:X,query:async()=>{return(await J.session.status()).data?.[X]}}),H=G.stream[Symbol.asyncIterator](),U=Y.completion.then(()=>"DONE");(async()=>{try{while(!0){let Q=await Promise.race([H.next(),U]);if(Q==="DONE")break;let K=Q;if(K.done)break;let b=K.value;Y.onEvent(b);let W=b.properties;if(b.type==="message.part.updated"){let $=W?.part;if(!$||$.sessionID!==X)continue;if($.type==="text"&&$.time?.end){let V=String($.text??"").trim();if(V)process.stdout.write(V+M)}}if(b.type==="permission.asked"){if(!W||W.sessionID!==X)continue;await J.permission.reply({requestID:String(W.id),reply:"once"})}if(b.type==="session.error"){if(!W||W.sessionID!==X||!W.error)continue;let $=W.error,V=$?.data!==null&&typeof $?.data==="object"&&"message"in $.data?String($.data.message):String($?.name??$);z.error(V)}}}finally{Y.stop(),await H.return?.(void 0).catch(()=>{})}})().catch((Q)=>{console.error(Q),process.exit(1)});let h=B.model?r.parseModel(B.model):void 0;await J.session.prompt({sessionID:X,agent:B.agent,model:h,parts:[{type:"text",text:B.prompt}]}),Y.markStarted(),await Y.completion}var sB=e({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>p(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(g).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((J)=>{if(J.dark&&J.light)throw Error("--dark and --light are mutually exclusive");if(J.sso&&!J.headless)throw Error("--sso requires --headless");if(J.sso&&J["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let Z=Object.keys(WB).filter((X)=>J[X]);if(Z.length>1)throw Error(`${Z.map((X)=>`--${X}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(Z.length===1&&J.model)throw Error(`--${Z[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let J=JB();try{BB();let Z=VB(B);if(Z){z.error(Z),process.exitCode=1;return}let X=jB(B)??B.model,G=y(process.env.PWD??process.cwd()),Y=B.project?y(D.isAbsolute(B.project)?B.project:D.join(G,B.project)):y(process.cwd());if(B.project&&!await E(Y)){let V=bB(B.project,Y);if(z.error(V.error),V.hint)z.println(V.hint);process.exitCode=1;return}let H=T(Y);if(H){if(B.project){z.error("Cannot start in "+Y+": "+H),process.exitCode=1;return}let V=y(QB.homedir());if(T(V)){z.error("Cannot start in "+Y+": "+H),process.exitCode=1;return}P.warn("unsafe start directory, falling back to home",{requested:Y,home:V}),Y=V}let U=await qB();try{process.chdir(Y)}catch{z.error("Failed to change directory to "+Y);return}let C=y(process.cwd()),h=l({[c]:"worker",[f]:u()}),Q=new Worker(U,{env:h});Q.onerror=(V)=>{P.error("thread error",{message:V.message,filename:V.filename,lineno:V.lineno,colno:V.colno,error:V.error})};let K=i(Q),b=()=>{K.call("reload",void 0).catch((V)=>{P.warn("worker reload failed",{error:L(V)})})};process.on("SIGUSR2",b);let W=!1,$=async()=>{if(W)return;W=!0,process.off("SIGUSR2",b),await n(K.call("shutdown",void 0),5000).catch((V)=>{P.warn("worker shutdown failed",{error:L(V)})}),Q.terminate()};try{let V=import("./chunk-
|
|
2
|
+
import{a as $B,b as zB}from"./chunk-6d4xc6br.js";import"./chunk-6y0wgz2j.js";import"./chunk-rn3je2hv.js";import{B as VB,C as XB}from"./chunk-tz1sv9kt.js";import{D as BB,F as JB}from"./chunk-ajyfms68.js";import"./chunk-9z7y4x7q.js";import{aa as YB,ba as ZB}from"./chunk-6j53vtzd.js";import"./chunk-p0852vfn.js";import"./chunk-ej0yzstw.js";import{fe as e}from"./chunk-w8nj5ph5.js";import{Xf as p,Yf as w,Zf as O,_f as g}from"./chunk-bga4kqd1.js";import{cg as z}from"./chunk-psmwrvqs.js";import{Eg as t}from"./chunk-9gxyt2ay.js";import{Ah as x}from"./chunk-fd04358e.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import{Pj as n,Sk as r,wj as A}from"./chunk-y1v7mf1a.js";import"./chunk-358wdvj7.js";import{Ll as T}from"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import{Yo as o,cp as a,rp as s}from"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import{Is as i}from"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import{dt as d}from"./chunk-1a08ffyd.js";import{Bt as f,Ct as c,Dt as u,Ft as l}from"./chunk-8jkqyf9n.js";import{Jt as L}from"./chunk-6yshpz0z.js";import{St as P}from"./chunk-5dvy83ms.js";import{eu as E,gu as y}from"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import{gI as N}from"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import{yP as k}from"./chunk-sh03ka27.js";import D from"path";import{fileURLToPath as MB}from"url";import{writeHeapSnapshot as GB}from"v8";import QB,{EOL as M}from"os";var WB={free:"free",adaptive:"adaptive",fast:"fast",economical:"economical",maxInt:"max-int",orchestrated:"orchestrated"},m=ZB;function R(B){if(B.agent)return B.agent;return m}function bB(B,J){if(D.isAbsolute(B)||B.includes("/")||B.includes("\\")||B.startsWith(".")||B.startsWith("~"))return{error:"Directory not found: "+J};return{error:`Unknown command "${B}"`,hint:"Run `qitqode --help` to see the available commands, or pass an existing directory to start the TUI there."}}function jB(B){for(let[J,Z]of Object.entries(WB))if(B[J]){let X=d[Z];if(X)return`${X.providerID}/${X.modelID}`}return}function FB(B){return async(Z,X)=>{let G=new Request(Z,X),Y=G.body?await G.text():void 0,H=await B.call("fetch",{url:G.url,method:G.method,headers:Object.fromEntries(G.headers.entries()),body:Y});return new Response(H.body,{status:H.status,headers:H.headers})}}function _B(B){return{subscribe:async(J)=>{return B.on("global.event",(Z)=>{J(Z)})}}}async function qB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await E(MB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function yB(B){let J=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return J;if(!J)return B;return J+`
|
|
3
|
+
`+B}async function v(B){let J=o({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),Z=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],X=await XB(J.session,B)??(await J.session.create({permission:Z})).data?.id;if(!X){z.error("headless: failed to create session");return}let G=await J.event.subscribe(),Y=YB({sessionID:X,query:async()=>{return(await J.session.status()).data?.[X]}}),H=G.stream[Symbol.asyncIterator](),U=Y.completion.then(()=>"DONE");(async()=>{try{while(!0){let Q=await Promise.race([H.next(),U]);if(Q==="DONE")break;let K=Q;if(K.done)break;let b=K.value;Y.onEvent(b);let W=b.properties;if(b.type==="message.part.updated"){let $=W?.part;if(!$||$.sessionID!==X)continue;if($.type==="text"&&$.time?.end){let V=String($.text??"").trim();if(V)process.stdout.write(V+M)}}if(b.type==="permission.asked"){if(!W||W.sessionID!==X)continue;await J.permission.reply({requestID:String(W.id),reply:"once"})}if(b.type==="session.error"){if(!W||W.sessionID!==X||!W.error)continue;let $=W.error,V=$?.data!==null&&typeof $?.data==="object"&&"message"in $.data?String($.data.message):String($?.name??$);z.error(V)}}}finally{Y.stop(),await H.return?.(void 0).catch(()=>{})}})().catch((Q)=>{console.error(Q),process.exit(1)});let h=B.model?r.parseModel(B.model):void 0;await J.session.prompt({sessionID:X,agent:B.agent,model:h,parts:[{type:"text",text:B.prompt}]}),Y.markStarted(),await Y.completion}var sB=e({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>p(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(g).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((J)=>{if(J.dark&&J.light)throw Error("--dark and --light are mutually exclusive");if(J.sso&&!J.headless)throw Error("--sso requires --headless");if(J.sso&&J["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let Z=Object.keys(WB).filter((X)=>J[X]);if(Z.length>1)throw Error(`${Z.map((X)=>`--${X}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(Z.length===1&&J.model)throw Error(`--${Z[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let J=JB();try{BB();let Z=VB(B);if(Z){z.error(Z),process.exitCode=1;return}let X=jB(B)??B.model,G=y(process.env.PWD??process.cwd()),Y=B.project?y(D.isAbsolute(B.project)?B.project:D.join(G,B.project)):y(process.cwd());if(B.project&&!await E(Y)){let V=bB(B.project,Y);if(z.error(V.error),V.hint)z.println(V.hint);process.exitCode=1;return}let H=T(Y);if(H){if(B.project){z.error("Cannot start in "+Y+": "+H),process.exitCode=1;return}let V=y(QB.homedir());if(T(V)){z.error("Cannot start in "+Y+": "+H),process.exitCode=1;return}P.warn("unsafe start directory, falling back to home",{requested:Y,home:V}),Y=V}let U=await qB();try{process.chdir(Y)}catch{z.error("Failed to change directory to "+Y);return}let C=y(process.cwd()),h=l({[c]:"worker",[f]:u()}),Q=new Worker(U,{env:h});Q.onerror=(V)=>{P.error("thread error",{message:V.message,filename:V.filename,lineno:V.lineno,colno:V.colno,error:V.error})};let K=i(Q),b=()=>{K.call("reload",void 0).catch((V)=>{P.warn("worker reload failed",{error:L(V)})})};process.on("SIGUSR2",b);let W=!1,$=async()=>{if(W)return;W=!0,process.off("SIGUSR2",b),await n(K.call("shutdown",void 0),5000).catch((V)=>{P.warn("worker shutdown failed",{error:L(V)})}),Q.terminate()};try{let V=import("./chunk-2g4kxtz0.js"),HB=import("./chunk-vnstr4g1.js").then(({TuiConfig:q})=>q.get()),S=await yB(B.prompt),KB=await HB;if(B.headless&&w(O(B))){z.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let I=O(B),_=w(I)?{url:(await K.call("server",I)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:FB(K),events:_B(K)};if(setTimeout(()=>{K.call("checkUpgrade",{directory:C}).catch(()=>{})},1000).unref?.(),B.headless){if(!S){z.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let j=await t({tryOpen:!1,onCode:(F)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+F.verificationUri+M),process.stdout.write(" and enter code: "+F.userCode+M),F.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+F.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await x.runPromise(N.gen(function*(){yield*(yield*A.Service).set("forgewise",s(j,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(j.name||j.email)+M)}catch(j){z.error("SSO sign-in failed: "+L(j)),process.exitCode=1;return}await v({url:_.url,fetch:_.fetch,prompt:S,model:X,agent:R(B)??m,directory:C,continue:B.continue,sessionID:B.session,fork:B.fork});return}let q=$B(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(q)await x.runPromise(zB(q));else if(!await x.runPromise(N.gen(function*(){if(yield*N.promise(()=>a()))return!0;return!!(yield*(yield*A.Service).get("forgewise"))}))){z.error(`Not signed in. Use one of:
|
|
4
4
|
qitqode auth login (browser / device-code flow)
|
|
5
5
|
qitqode auth login --api-key (paste a Qortex API key)
|
|
6
6
|
--api-key <key> (inline for this run)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{jg as E}from"./chunk-g738e799.js";import"./chunk-583d91xq.js";import"./chunk-e8s4mp5n.js";import"./chunk-9gxyt2ay.js";import"./chunk-5qhsfjzq.js";import"./chunk-nfg7nt13.js";import"./chunk-4s1n38ds.js";import"./chunk-2w79k0mh.js";import"./chunk-fd04358e.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import"./chunk-y1v7mf1a.js";import"./chunk-358wdvj7.js";import"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import{yP as z}from"./chunk-sh03ka27.js";var J={command:"generate",handler:async()=>{let A=await E.openapi();for(let q of Object.values(A.paths))for(let y of["get","post","put","delete","patch"]){let k=q[y];if(!k?.operationId)continue;k["x-codeSamples"]=[{lang:"js",source:['import { createQitQodeClient } from "@qitqode/sdk"',"","const client = createQitQodeClient()",`await client.${k.operationId}({`," ...","})"].join(`
|
|
3
|
+
`)}]}let F=JSON.stringify(A,null,2),B=await import("./chunk-dmb0ez0m.js"),C=await import("./chunk-6pt6nqwk.js"),D=await import("./chunk-gfvq78gy.js"),G=await(B.format??B.default?.format)(F,{parser:"json",plugins:[C.default??C,D.default??D],printWidth:120});await new Promise((q,y)=>{process.stdout.write(G,(k)=>{if(k)y(k);else q()})})}};export{J as GenerateCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{in as D,jn as m,mn as R,nn as X,rn as v,tn as x,un as S}from"./chunk-hx13a8es.js";import{Jn as A,Nn as L}from"./chunk-j3agzs13.js";import{Gt as U}from"./chunk-6yshpz0z.js";import{cu as P,hu as F}from"./chunk-ffx0cr44.js";import{UE as s,VO as B,gI as k}from"./chunk-9kc2th5c.js";import{wP as E}from"./chunk-sh03ka27.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 dn,Y as en,w as fn,M as gn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Te as u,Ue as f,Ve as _}from"./chunk-meehnnv9.js";import{We as z,Ye as C,af as U,bf as I,df as v,gf as b,pf as R,qf as T,tf as S,vf as h,xf as k}from"./chunk-4ycg2c6f.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as V}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";var m=class{constructor(j,G){this.modelId=j,this.config=G,this.specificationVersion="v3",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:j,n:G,size:P,aspectRatio:W,seed:N,providerOptions:K,headers:Y,abortSignal:X,files:Q,mask:q}){var F,Z,J,A,D;let $=[],B=(J=(Z=(F=this.config._internal)==null?void 0:F.currentDate)==null?void 0:Z.call(F))!=null?J:new Date;if(Q!=null&&Q.length>0){let{value:y,responseHeaders:c}=await T({url:this.getEditUrl(),headers:z(this.config.headers(),Y),formData:U({model:this.modelId,prompt:j,image:await Promise.all(Q.map((H)=>w(H))),mask:q!=null?await w(q):void 0,n:G,size:P,...(A=K.deepinfra)!=null?A:{}},{useArrayBrackets:!1}),failedResponseHandler:S({errorSchema:t,errorToMessage:(H)=>{var x,M;return(M=(x=H.error)==null?void 0:x.message)!=null?M:"Unknown error"}}),successfulResponseHandler:h(d),abortSignal:X,fetch:this.config.fetch});return{images:y.data.map((H)=>H.b64_json),warnings:$,response:{timestamp:B,modelId:this.modelId,headers:c}}}let E=P==null?void 0:P.split("x"),{value:L,responseHeaders:O}=await R({url:`${this.config.baseURL}/${this.modelId}`,headers:z(this.config.headers(),Y),body:{prompt:j,num_images:G,...W&&{aspect_ratio:W},...E&&{width:E[0],height:E[1]},...N!=null&&{seed:N},...(D=K.deepinfra)!=null?D:{}},failedResponseHandler:S({errorSchema:g,errorToMessage:(y)=>y.detail.error}),successfulResponseHandler:h(p),abortSignal:X,fetch:this.config.fetch});return{images:L.images.map((y)=>y.replace(/^data:image\/\w+;base64,/,"")),warnings:$,response:{timestamp:B,modelId:this.modelId,headers:O}}}getEditUrl(){return`${this.config.baseURL.replace("/inference","/openai")}/images/edits`}},g=V.object({detail:V.object({error:V.string()})}),p=V.object({images:V.array(V.string())}),t=V.object({error:V.object({message:V.string()}).optional()}),d=V.object({data:V.array(V.object({b64_json:V.string()}))});async function w(j){if(j.type==="url")return I(j.url);let G=j.data instanceof Uint8Array?j.data:C(j.data);return new Blob([G],{type:j.mediaType})}var l=class extends u{constructor(j,G){super(j,G)}fixUsageForGeminiModels(j){var G,P;if(!j||!((G=j.completion_tokens_details)==null?void 0:G.reasoning_tokens))return j;let W=(P=j.completion_tokens)!=null?P:0,N=j.completion_tokens_details.reasoning_tokens;if(N>W){let K=W+N;return{...j,completion_tokens:K,total_tokens:j.total_tokens!=null?j.total_tokens+N:void 0}}return j}async doGenerate(j){var G,P,W,N,K,Y,X;let Q=await super.doGenerate(j);if((G=Q.usage)==null?void 0:G.raw){let q=this.fixUsageForGeminiModels(Q.usage.raw);if(q!==Q.usage.raw){let F=(P=q.prompt_tokens)!=null?P:0,Z=(W=q.completion_tokens)!=null?W:0,J=(K=(N=q.prompt_tokens_details)==null?void 0:N.cached_tokens)!=null?K:0,A=(X=(Y=q.completion_tokens_details)==null?void 0:Y.reasoning_tokens)!=null?X:0;return{...Q,usage:{inputTokens:{total:F,noCache:F-J,cacheRead:J,cacheWrite:void 0},outputTokens:{total:Z,text:Z-A,reasoning:A},raw:q}}}}return Q}async doStream(j){let G=await super.doStream(j),P=G.stream,W=this.fixUsageForGeminiModels.bind(this),N=new ReadableStream({async start(K){var Y,X,Q,q,F,Z,J;let A=P.getReader();try{while(!0){let{done:D,value:$}=await A.read();if(D)break;if($.type==="finish"&&((Y=$.usage)==null?void 0:Y.raw)){let B=W($.usage.raw);if(B!==$.usage.raw){let E=(X=B.prompt_tokens)!=null?X:0,L=(Q=B.completion_tokens)!=null?Q:0,O=(F=(q=B.prompt_tokens_details)==null?void 0:q.cached_tokens)!=null?F:0,y=(J=(Z=B.completion_tokens_details)==null?void 0:Z.reasoning_tokens)!=null?J:0;K.enqueue({...$,usage:{inputTokens:{total:E,noCache:E-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:L,text:L-y,reasoning:y},raw:B}})}else K.enqueue($)}else K.enqueue($)}K.close()}catch(D){K.error(D)}}});return{...G,stream:N}}},n="2.0.41";function i(j={}){var G;let P=k((G=j.baseURL)!=null?G:"https://api.deepinfra.com/v1"),W=()=>v({Authorization:`Bearer ${b({apiKey:j.apiKey,environmentVariableName:"DEEPINFRA_API_KEY",description:"DeepInfra's API key"})}`,...j.headers},`ai-sdk/deepinfra/${n}`),N=(F)=>({provider:`deepinfra.${F}`,url:({path:Z})=>`${P}/openai${Z}`,headers:W,fetch:j.fetch}),K=(F)=>{return new l(F,N("chat"))},Y=(F)=>new f(F,N("completion")),X=(F)=>new _(F,N("embedding")),Q=(F)=>new m(F,{...N("image"),baseURL:P?`${P}/inference`:"https://api.deepinfra.com/v1/inference"}),q=(F)=>K(F);return q.specificationVersion="v3",q.completionModel=Y,q.chatModel=K,q.image=Q,q.imageModel=Q,q.languageModel=K,q.embeddingModel=X,q.textEmbeddingModel=X,q}var jj=i();export{jj as deepinfra,i as createDeepInfra,n as VERSION};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bg as i,Cg as j,Dg as k,Eg as l,Fg as m,Gg as n}from"./chunk-9gxyt2ay.js";import"./chunk-qn1fhqyw.js";import{ep as a,fp as b,gp as c,hp as d,ip as e,jp as f,np as g,op as h}from"./chunk-pp10epga.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-1a08ffyd.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{f as resolveDevicePoll,h as refreshAccessToken,g as probeToken,l as loginDevice,n as loginBrowser,m as login,b as isReplitEnv,j as isNearExpiry,c as getConfig,i as getCallbackUri,k as fetchQreditsBalance,a as checkoutApiKey,d as ForgewiseError,e as DeviceFlowUnsupportedError};
|