@qitqode/qitqode-android-arm64 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-ztyy3ga3.js → chunk-01e3v1xz.js} +2 -2
- package/bundle/{chunk-p54bzjtv.js → chunk-060wbpz4.js} +1 -1
- package/bundle/{chunk-ypdt9mmr.js → chunk-0am156m5.js} +2 -2
- package/bundle/{chunk-gjd3wf8b.js → chunk-0bgssfvq.js} +1 -1
- package/bundle/{chunk-dnnkq5y4.js → chunk-0crgymtr.js} +2 -2
- package/bundle/chunk-0dzpjk7x.js +2 -0
- package/bundle/{chunk-bwbqkfv0.js → chunk-0ffmwhw7.js} +1 -1
- package/bundle/{chunk-h62chdmw.js → chunk-0g0jpw0z.js} +1 -1
- package/bundle/{chunk-mn9end71.js → chunk-0ggvqmnm.js} +1 -1
- package/bundle/{chunk-y7hgevfv.js → chunk-0gsw04hw.js} +2 -2
- package/bundle/{chunk-tkrwcjkr.js → chunk-0qpqd7nz.js} +2 -2
- package/bundle/{chunk-nty5z2cj.js → chunk-0tqmm8b8.js} +1 -1
- package/bundle/chunk-12fwmmcp.js +2 -0
- package/bundle/{chunk-8yvx3pgy.js → chunk-14d301ze.js} +1 -1
- package/bundle/{chunk-ngfxxfem.js → chunk-16srrzjr.js} +1 -1
- package/bundle/{chunk-45a4n21f.js → chunk-19pspc1p.js} +1 -1
- package/bundle/chunk-1a95ysv3.js +2 -0
- package/bundle/chunk-1akh8pk2.js +2 -0
- package/bundle/{chunk-5tky3csh.js → chunk-1ay97v74.js} +1 -1
- package/bundle/{chunk-6ar91jvd.js → chunk-1c0yp2gv.js} +1 -1
- package/bundle/{chunk-2md6sx8d.js → chunk-1rgt2vmt.js} +1 -1
- package/bundle/{chunk-3kpse7zy.js → chunk-1vpx7szf.js} +1 -1
- package/bundle/chunk-22qetqnp.js +2 -0
- package/bundle/{chunk-tm34qp8j.js → chunk-2bjfz4fb.js} +1 -1
- package/bundle/{chunk-a7rp46yt.js → chunk-2c26kxp4.js} +5 -5
- package/bundle/{chunk-xe69cnsk.js → chunk-2c41dncf.js} +1 -1
- package/bundle/{chunk-fyhqp4pb.js → chunk-2cjfezfr.js} +1 -1
- package/bundle/chunk-2d2a92kj.js +2 -0
- package/bundle/{chunk-m5dm7a1t.js → chunk-2pex3ak9.js} +1 -1
- package/bundle/chunk-2qrvkef8.js +2 -0
- package/bundle/chunk-2tppw8j9.js +2 -0
- package/bundle/chunk-2y87m7pe.js +2 -0
- package/bundle/{chunk-sfw5qddj.js → chunk-33jcxsbe.js} +1 -1
- package/bundle/{chunk-d0x5pbkm.js → chunk-3623jvcm.js} +1 -1
- package/bundle/{chunk-953pqp3w.js → chunk-368jx5dp.js} +1 -1
- package/bundle/chunk-3ft1dn9j.js +2 -0
- package/bundle/{chunk-rn83r0js.js → chunk-3k7016c2.js} +1 -1
- package/bundle/chunk-3rgct4bd.js +11 -0
- package/bundle/{chunk-68v3b6ns.js → chunk-3xdmxm5t.js} +2 -2
- package/bundle/{chunk-xwdxgg16.js → chunk-42q8vj0w.js} +1 -1
- package/bundle/{chunk-yhj01dz9.js → chunk-438faz6b.js} +2 -2
- package/bundle/chunk-4656qm05.js +2 -0
- package/bundle/chunk-46knch5z.js +2 -0
- package/bundle/{chunk-n23d0q00.js → chunk-4bewbvvr.js} +1 -1
- package/bundle/{chunk-pmg53fdd.js → chunk-4byvnx78.js} +1 -1
- package/bundle/chunk-4ftjx7ss.js +2 -0
- package/bundle/{chunk-jqk3v8d6.js → chunk-4fvbexr8.js} +1 -1
- package/bundle/{chunk-k1nh5sd2.js → chunk-4fy08jcj.js} +1 -1
- package/bundle/{chunk-0smnwqk6.js → chunk-4j76bf4j.js} +2 -2
- package/bundle/{chunk-5nrc5rhh.js → chunk-4jpab7ag.js} +1 -1
- package/bundle/{chunk-43ttzy29.js → chunk-4ngmjk8j.js} +2 -2
- package/bundle/{chunk-vnrjk2be.js → chunk-4rpgwgx9.js} +1 -1
- package/bundle/chunk-4sgy87h5.js +2 -0
- package/bundle/{chunk-65bmsp2t.js → chunk-4vzjdmts.js} +1 -1
- package/bundle/{chunk-zc0cdvcv.js → chunk-4zhrg3rv.js} +2 -2
- package/bundle/{chunk-5pzs51sp.js → chunk-52rdms56.js} +1 -1
- package/bundle/chunk-54hktc8h.js +2 -0
- package/bundle/{chunk-smznrv7k.js → chunk-55way0em.js} +1 -1
- package/bundle/{chunk-k4gsktts.js → chunk-59kk0mce.js} +1 -1
- package/bundle/chunk-59m55866.js +2 -0
- package/bundle/{chunk-q3h42a94.js → chunk-5b3v1x2c.js} +2 -2
- package/bundle/chunk-5js5nw7r.js +2 -0
- package/bundle/{chunk-f3zmdfqa.js → chunk-5nhwqg7c.js} +1 -1
- package/bundle/{chunk-tzb26ntq.js → chunk-5r05d901.js} +3 -3
- package/bundle/{chunk-avefgbjg.js → chunk-5zh91zk2.js} +2 -2
- package/bundle/chunk-61jn7908.js +2 -0
- package/bundle/chunk-61txdqz1.js +2 -0
- package/bundle/chunk-668g9wkg.js +2 -0
- package/bundle/chunk-6frhjpmt.js +2 -0
- package/bundle/{chunk-920z7g7j.js → chunk-6gqs1k7m.js} +1 -1
- package/bundle/chunk-6k14c8x1.js +5 -0
- package/bundle/{chunk-g42krp0z.js → chunk-6nxebcf8.js} +1 -1
- package/bundle/chunk-6r1jpj0h.js +2 -0
- package/bundle/{chunk-7bcm7gg1.js → chunk-6r48fje7.js} +1 -1
- package/bundle/{chunk-bqn6bqws.js → chunk-6ychs4wx.js} +1 -1
- package/bundle/{chunk-21rq4592.js → chunk-705xnxbc.js} +2 -2
- package/bundle/chunk-73fn4dqd.js +2 -0
- package/bundle/{chunk-q3nvzhyh.js → chunk-73xryfgn.js} +2 -2
- package/bundle/{chunk-q9tgdghx.js → chunk-76h0f86f.js} +1 -1
- package/bundle/{chunk-d51908mv.js → chunk-77h8tytk.js} +1 -1
- package/bundle/chunk-78j2c2je.js +2 -0
- package/bundle/chunk-78jt24ht.js +2 -0
- package/bundle/chunk-7j2vpavd.js +2 -0
- package/bundle/chunk-7nkxgm72.js +2 -0
- package/bundle/{chunk-f31yvp20.js → chunk-7p6mxch0.js} +1 -1
- package/bundle/{chunk-mhhtf0v3.js → chunk-7sq5dyv1.js} +1 -1
- package/bundle/{chunk-804vmbcd.js → chunk-7x2q1w0f.js} +1 -1
- package/bundle/{chunk-ac7482n2.js → chunk-7z96r2px.js} +2 -2
- package/bundle/chunk-84pjdenq.js +2 -0
- package/bundle/chunk-859pkecc.js +2 -0
- package/bundle/{chunk-y0527cg0.js → chunk-8hmt3avx.js} +1 -1
- package/bundle/{chunk-cng61dby.js → chunk-8jvfqh3b.js} +1 -1
- package/bundle/{chunk-8wwdrwf2.js → chunk-8p0t8qah.js} +1 -1
- package/bundle/chunk-8p249svd.js +2 -0
- package/bundle/{chunk-z1932c3f.js → chunk-8rfqv5he.js} +1 -1
- package/bundle/chunk-8rqbx4jw.js +2 -0
- package/bundle/chunk-8s3krfsm.js +2 -0
- package/bundle/{chunk-pb30kkbs.js → chunk-93pmbdz7.js} +6 -6
- package/bundle/{chunk-vcygx6hs.js → chunk-95am490c.js} +2 -2
- package/bundle/{chunk-k3dacdp5.js → chunk-9a6p1gdn.js} +8 -8
- package/bundle/chunk-9aafddkw.js +3 -0
- package/bundle/{chunk-0xrb12s8.js → chunk-9g9katgy.js} +2 -2
- package/bundle/{chunk-24rkf2gk.js → chunk-9qzwmt76.js} +1 -1
- package/bundle/chunk-9sv53kb4.js +2 -0
- package/bundle/chunk-9wbe0dkx.js +2 -0
- package/bundle/{chunk-bne5w117.js → chunk-9xxnwb33.js} +4 -4
- package/bundle/{chunk-fjbv3jht.js → chunk-a610qd3x.js} +1 -1
- package/bundle/{chunk-5c2438af.js → chunk-a76w2jwm.js} +1 -1
- package/bundle/{chunk-at22twxx.js → chunk-aa2n02qk.js} +2 -2
- package/bundle/{chunk-4pshnq6g.js → chunk-abv0fskc.js} +1 -1
- package/bundle/{chunk-7g66qc1v.js → chunk-acd72413.js} +2 -2
- package/bundle/{chunk-wkg3c643.js → chunk-ae7b11np.js} +2 -2
- package/bundle/{chunk-gy21fw82.js → chunk-agqss9ga.js} +2 -2
- package/bundle/chunk-aj5z8qd5.js +2 -0
- package/bundle/{chunk-8e4s6nc2.js → chunk-ajp53ksp.js} +1 -1
- package/bundle/{chunk-j164q40b.js → chunk-amp6mvbp.js} +2 -2
- package/bundle/{chunk-97q2t1yz.js → chunk-aqcpk2vg.js} +1 -1
- package/bundle/chunk-b0c2mvc0.js +2 -0
- package/bundle/{chunk-kth84vdn.js → chunk-b6eypnbj.js} +1 -1
- package/bundle/chunk-b79z8f94.js +2 -0
- package/bundle/chunk-bbwcsdy9.js +2 -0
- package/bundle/chunk-bbzjdbb9.js +2 -0
- package/bundle/{chunk-6evh2ke8.js → chunk-bd505nsd.js} +1 -1
- package/bundle/{chunk-p4027t94.js → chunk-bd84t3fb.js} +1 -1
- package/bundle/chunk-bh4s1yct.js +2 -0
- package/bundle/{chunk-rrv0n73b.js → chunk-bk7f59fn.js} +1 -1
- package/bundle/{chunk-venprxdp.js → chunk-bn71wqqf.js} +1 -1
- package/bundle/{chunk-j9h1sp4g.js → chunk-c3szabpf.js} +2 -2
- package/bundle/{chunk-z6sbjvtv.js → chunk-c6cajbyj.js} +1 -1
- package/bundle/{chunk-p6crzjtf.js → chunk-c8prg3jx.js} +2 -2
- package/bundle/chunk-crqcppwq.js +2 -0
- package/bundle/{chunk-t239rvej.js → chunk-cth373se.js} +2 -2
- package/bundle/chunk-d09zpgj1.js +2 -0
- package/bundle/{chunk-t5r3w9e1.js → chunk-d1tb1jd0.js} +1 -1
- package/bundle/{chunk-mmjgf680.js → chunk-dbpkq7ba.js} +2 -2
- package/bundle/{chunk-pe2xdkez.js → chunk-dd4qnh8s.js} +2 -2
- package/bundle/{chunk-p169ee92.js → chunk-defj5zs6.js} +1 -1
- package/bundle/chunk-dexcptaz.js +3 -0
- package/bundle/chunk-dgqkak21.js +2 -0
- package/bundle/{chunk-jww55nk9.js → chunk-dgva3y5v.js} +1 -1
- package/bundle/chunk-dhgvh7c3.js +2 -0
- package/bundle/{chunk-mhtxp66q.js → chunk-djqxbnwc.js} +2 -2
- package/bundle/chunk-dmd101ja.js +2 -0
- package/bundle/{chunk-vygkwwjd.js → chunk-drnj1a14.js} +2 -2
- package/bundle/{chunk-g3wvtyw3.js → chunk-dt1wwt7m.js} +1 -1
- package/bundle/{chunk-cz5vta94.js → chunk-dw70wds9.js} +1 -1
- package/bundle/{chunk-xdd3553a.js → chunk-dw7yrk1g.js} +1 -1
- package/bundle/chunk-dwb39jdf.js +2 -0
- package/bundle/chunk-dx4zxex7.js +2 -0
- package/bundle/{chunk-ph8hn1wt.js → chunk-dy2k5rdx.js} +2 -2
- package/bundle/{chunk-wwdpw27v.js → chunk-dz3bec8g.js} +1 -1
- package/bundle/{chunk-t0761rhq.js → chunk-e0zb6sw6.js} +2 -2
- package/bundle/chunk-e2pqvscp.js +2 -0
- package/bundle/{chunk-vsz4s6zt.js → chunk-e4g4mvak.js} +1 -1
- package/bundle/{chunk-fhqfqd5v.js → chunk-eeq0krp7.js} +2 -2
- package/bundle/chunk-efe6kj3d.js +2 -0
- package/bundle/{chunk-qp1n7kwe.js → chunk-egkhynj5.js} +1 -1
- package/bundle/chunk-emac0dss.js +2 -0
- package/bundle/chunk-encfnt6w.js +2 -0
- package/bundle/{chunk-y29ejqg2.js → chunk-etv6c77a.js} +1 -1
- package/bundle/{chunk-32j0q58h.js → chunk-eyr5ymt8.js} +1 -1
- package/bundle/{chunk-r9w0thdk.js → chunk-f2pv705d.js} +1 -1
- package/bundle/{chunk-5w76kdjr.js → chunk-f4mnp6xd.js} +1 -1
- package/bundle/{chunk-xdteq9bd.js → chunk-f84hw65n.js} +1 -1
- package/bundle/chunk-fg2nyz2x.js +2 -0
- package/bundle/chunk-ga6wc979.js +2 -0
- package/bundle/{chunk-hqbbs9dm.js → chunk-gbxf6e5d.js} +3 -3
- package/bundle/chunk-gdew7bwm.js +2 -0
- package/bundle/{chunk-w9gzfsy7.js → chunk-gdj7mqrd.js} +2 -2
- package/bundle/chunk-ge19ff9d.js +2 -0
- package/bundle/{chunk-bzebyyfr.js → chunk-ghap1n1m.js} +4 -4
- package/bundle/chunk-gt0q07xq.js +2 -0
- package/bundle/{chunk-7mppvhv9.js → chunk-gwrnxcdn.js} +2 -2
- package/bundle/{chunk-e8p92vz4.js → chunk-gww0skmn.js} +2 -2
- package/bundle/chunk-h4dnjfr2.js +2 -0
- package/bundle/{chunk-has2rz35.js → chunk-h7658zxy.js} +1 -1
- package/bundle/chunk-h8fx619t.js +2 -0
- package/bundle/{chunk-313zqzc1.js → chunk-hfefq104.js} +1 -1
- package/bundle/{chunk-ff548b0j.js → chunk-hhk2sp5n.js} +2 -2
- package/bundle/{chunk-47k5jy1p.js → chunk-hqjc4wgg.js} +2 -2
- package/bundle/{chunk-48r70n4s.js → chunk-hrtze4c5.js} +1 -1
- package/bundle/{chunk-r5zy4za0.js → chunk-hwsqqkrv.js} +2 -2
- package/bundle/{chunk-ehb4hd9c.js → chunk-j6xmgn63.js} +1 -1
- package/bundle/chunk-jnvb3s7f.js +2 -0
- package/bundle/chunk-jrq2xw6e.js +2 -0
- package/bundle/chunk-jwckmhjm.js +2 -0
- package/bundle/{chunk-99s035f0.js → chunk-jxkrhrp0.js} +2 -2
- package/bundle/chunk-jz27ypm5.js +2 -0
- package/bundle/chunk-jzrs878d.js +2 -0
- package/bundle/chunk-jzx700tb.js +2 -0
- package/bundle/chunk-k1x8469r.js +3 -0
- package/bundle/{chunk-bkct64rs.js → chunk-k3g28tbw.js} +1 -1
- package/bundle/{chunk-wy3a4cab.js → chunk-k6zwfstj.js} +1 -1
- package/bundle/{chunk-0qd3567w.js → chunk-kfj37631.js} +1 -1
- package/bundle/{chunk-khzzmyk2.js → chunk-kmzpeq8k.js} +1 -1
- package/bundle/{chunk-bd21p9zz.js → chunk-kre93a89.js} +2 -2
- package/bundle/{chunk-j8fcfhr2.js → chunk-kry4vcrf.js} +2 -2
- package/bundle/chunk-ktp2b4t4.js +2 -0
- package/bundle/chunk-m483jvn8.js +2 -0
- package/bundle/chunk-makecdh6.js +8 -0
- package/bundle/{chunk-tr6rdr6h.js → chunk-mbbxedsq.js} +2 -2
- package/bundle/chunk-menbcmkq.js +2 -0
- package/bundle/{chunk-hwrrrbqd.js → chunk-mghnkwp8.js} +1 -1
- package/bundle/{chunk-pr7z5dj8.js → chunk-mhxyv9c8.js} +1 -1
- package/bundle/{chunk-k5q9px67.js → chunk-mjrqhbp2.js} +1 -1
- package/bundle/{chunk-9zm6r55d.js → chunk-msh249db.js} +2 -2
- package/bundle/{chunk-nmzrrqgb.js → chunk-n0g4983e.js} +1 -1
- package/bundle/{chunk-dnsh1v42.js → chunk-n4qxj391.js} +2 -2
- package/bundle/{chunk-ptqk1j2r.js → chunk-n5p7cn4w.js} +1 -1
- package/bundle/{chunk-5zkj5xv9.js → chunk-n9twhc5d.js} +2 -2
- package/bundle/{chunk-p5be5ddp.js → chunk-na1wr2qf.js} +1 -1
- package/bundle/{chunk-4agaj51z.js → chunk-nbckdba0.js} +1 -1
- package/bundle/{chunk-ezrqhqkp.js → chunk-nftbj8g9.js} +1 -1
- package/bundle/{chunk-d7nsd979.js → chunk-nfzpegqx.js} +1 -1
- package/bundle/chunk-np8h66t0.js +2 -0
- package/bundle/{chunk-v6v9xn81.js → chunk-npzx3yd5.js} +1 -1
- package/bundle/chunk-nr2j8ytn.js +3 -0
- package/bundle/{chunk-w46g7kdq.js → chunk-nrk29616.js} +2 -2
- package/bundle/{chunk-fsqses4g.js → chunk-ns8xnkjb.js} +2 -2
- package/bundle/{chunk-7vmx8bg9.js → chunk-ntpn0w9m.js} +2 -2
- package/bundle/chunk-nwwmns3w.js +2 -0
- package/bundle/{chunk-ksme3gj1.js → chunk-p40z6510.js} +1 -1
- package/bundle/{chunk-3ktzxj69.js → chunk-p847g35y.js} +1 -1
- package/bundle/{chunk-vf492zs6.js → chunk-p8ak162p.js} +1 -1
- package/bundle/chunk-pe5dpzec.js +2 -0
- package/bundle/{chunk-bbng1cea.js → chunk-pf3nqf00.js} +1 -1
- package/bundle/{chunk-9hz56z6a.js → chunk-ppy0jy6j.js} +1 -1
- package/bundle/{chunk-et3804wr.js → chunk-prbxhnza.js} +1 -1
- package/bundle/{chunk-nrat6ncm.js → chunk-ptwex14s.js} +1 -1
- package/bundle/{chunk-qey1efpx.js → chunk-q3pt4p9f.js} +1 -1
- package/bundle/{chunk-pt0xphq9.js → chunk-q6mcnq9p.js} +1 -1
- package/bundle/{chunk-kengqzja.js → chunk-q6p92zyn.js} +2 -2
- package/bundle/{chunk-ycvwpmd9.js → chunk-q87fw8dk.js} +2 -2
- package/bundle/chunk-q8f6a074.js +2 -0
- package/bundle/{chunk-cj7r8w1e.js → chunk-qbrj9wzd.js} +1 -1
- package/bundle/{chunk-j0bwa5dk.js → chunk-qdvnscxm.js} +2 -2
- package/bundle/{chunk-d6jhs818.js → chunk-qp3hxqg5.js} +2 -2
- package/bundle/{chunk-jg1ccs3j.js → chunk-qph2c2v7.js} +1 -1
- package/bundle/{chunk-3vvd7j14.js → chunk-qprbef09.js} +1 -1
- package/bundle/chunk-qqaevt32.js +2 -0
- package/bundle/chunk-qzpvz708.js +2 -0
- package/bundle/{chunk-cbnkx933.js → chunk-r4kg0z96.js} +2 -2
- package/bundle/{chunk-faee8zgc.js → chunk-r73e8gsp.js} +1 -1
- package/bundle/chunk-reyjr2e0.js +2 -0
- package/bundle/{chunk-dxdggn90.js → chunk-rfzra502.js} +1 -1
- package/bundle/{chunk-tg226j37.js → chunk-rhrcgvb8.js} +1 -1
- package/bundle/{chunk-wyj8cpx5.js → chunk-rk0fnvp5.js} +1 -1
- package/bundle/{chunk-t8c4cs6z.js → chunk-rqedtjz9.js} +1 -1
- package/bundle/{chunk-eg3syjtv.js → chunk-s06t769q.js} +2 -2
- package/bundle/{chunk-m80v76m9.js → chunk-skxg3s8z.js} +1 -1
- package/bundle/{chunk-7x6yrtzn.js → chunk-spzd8rev.js} +1 -1
- package/bundle/chunk-t178njgb.js +2 -0
- package/bundle/{chunk-3jf3jhrs.js → chunk-t4b2fm7z.js} +1 -1
- package/bundle/{chunk-55fcmswd.js → chunk-t8sy5sgx.js} +2 -2
- package/bundle/{chunk-s4vx9x1v.js → chunk-t9qyzzsz.js} +1 -1
- package/bundle/{chunk-6scf311w.js → chunk-tc9xbn1t.js} +1 -1
- package/bundle/{chunk-qnvsqnz5.js → chunk-tezrgfc6.js} +2 -2
- package/bundle/chunk-tjpev5t6.js +2 -0
- package/bundle/{chunk-vkaa7k3e.js → chunk-tkzctbxq.js} +2 -2
- package/bundle/{chunk-xy0gnpen.js → chunk-ts2k13g0.js} +1 -1
- package/bundle/{chunk-gszvgz76.js → chunk-twd6r7nf.js} +2 -2
- package/bundle/{chunk-qxcyz5hc.js → chunk-twfvrafb.js} +2 -2
- package/bundle/{chunk-70q8qcb2.js → chunk-twvmjsxf.js} +1 -1
- package/bundle/{chunk-ggxzf22k.js → chunk-tz3s8dvy.js} +1 -1
- package/bundle/chunk-tzq7wjgv.js +3 -0
- package/bundle/{chunk-n78f8hfk.js → chunk-v0c3k797.js} +1 -1
- package/bundle/chunk-v1s16wwd.js +2 -0
- package/bundle/{chunk-fr34mnyg.js → chunk-v3nmnm57.js} +2 -2
- package/bundle/chunk-v6b29nx4.js +2 -0
- package/bundle/chunk-v6rgd1j5.js +2 -0
- package/bundle/chunk-v9dnetq8.js +2 -0
- package/bundle/{chunk-450fef7h.js → chunk-v9w88wpy.js} +2 -2
- package/bundle/{chunk-7hvf9dgx.js → chunk-va2qfh0x.js} +1 -1
- package/bundle/chunk-vd5mpvcc.js +2 -0
- package/bundle/{chunk-w4synhfg.js → chunk-vfb72vdy.js} +1 -1
- package/bundle/{chunk-3cr2p4mp.js → chunk-vhzx5bxd.js} +1 -1
- package/bundle/{chunk-cmb62jkt.js → chunk-vjn54xj5.js} +2 -2
- package/bundle/{chunk-ybane1en.js → chunk-vp3yf46q.js} +1 -1
- package/bundle/{chunk-p4b0s5td.js → chunk-vzrc2fmt.js} +1 -1
- package/bundle/{chunk-ejqzcdcx.js → chunk-w3zhy5vq.js} +1 -1
- package/bundle/{chunk-hjt94wce.js → chunk-w43kmnm9.js} +641 -635
- package/bundle/{chunk-w4brava0.js → chunk-wb1d3mqw.js} +1 -1
- package/bundle/{chunk-6m9jb0s9.js → chunk-wd8hbven.js} +2 -2
- package/bundle/{chunk-vshycswk.js → chunk-wgt1tqw9.js} +1 -1
- package/bundle/{chunk-0428v6mw.js → chunk-whw18cn9.js} +1 -1
- package/bundle/{chunk-pxm4qvqk.js → chunk-wjz42325.js} +2 -2
- package/bundle/{chunk-y67kaj0b.js → chunk-wvb17w0z.js} +1 -1
- package/bundle/chunk-wwct4z7j.js +2 -0
- package/bundle/{chunk-55ykn8nz.js → chunk-x55h5qdc.js} +4 -4
- package/bundle/{chunk-05ck7acg.js → chunk-x80d0zh7.js} +1 -1
- package/bundle/{chunk-mjjaezwq.js → chunk-x9fyt3vx.js} +2 -2
- package/bundle/{chunk-g22e4gw7.js → chunk-xb3sxa6f.js} +1 -1
- package/bundle/{chunk-yz25607t.js → chunk-xcxqt8ag.js} +1 -1
- package/bundle/{chunk-c36p881g.js → chunk-xhh70g8j.js} +3 -3
- package/bundle/chunk-xr9wz961.js +2 -0
- package/bundle/{chunk-0cnwsf8p.js → chunk-y0h3jfkj.js} +1 -1
- package/bundle/{chunk-m7ganre7.js → chunk-y2t5pmqw.js} +1 -1
- package/bundle/{chunk-qkvqvgcx.js → chunk-y5q9v80n.js} +1 -1
- package/bundle/{chunk-5asx1706.js → chunk-yd94wz5v.js} +2 -2
- package/bundle/{chunk-5df5aja0.js → chunk-yjqww6ag.js} +2 -2
- package/bundle/{chunk-2drzgtv3.js → chunk-yxttz5z5.js} +2 -2
- package/bundle/{chunk-da6kggv7.js → chunk-yy7r3t3w.js} +2 -2
- package/bundle/{chunk-5pwv2p3s.js → chunk-yzpc5kj2.js} +1 -1
- package/bundle/{chunk-73r8bjjz.js → chunk-z6kcnpsj.js} +2 -2
- package/bundle/{chunk-nj1ntakd.js → chunk-z744mz4w.js} +2 -2
- package/bundle/{chunk-39z96pc6.js → chunk-z7kswv9r.js} +3 -3
- package/bundle/chunk-zfegnt1e.js +2 -0
- package/bundle/chunk-zg7kesbp.js +2 -0
- package/bundle/{chunk-jnrnncqc.js → chunk-znmbfx70.js} +1 -1
- package/bundle/{chunk-24ygjbpf.js → chunk-zp5sr5nx.js} +2 -2
- package/bundle/{chunk-ha1w0xzh.js → chunk-zrhw1szj.js} +1 -1
- package/bundle/chunk-zy06fe4r.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0ppnq3a4.js +0 -2
- package/bundle/chunk-0te0vcdn.js +0 -2
- package/bundle/chunk-11h06z17.js +0 -2
- package/bundle/chunk-28yv4fqe.js +0 -2
- package/bundle/chunk-34a52hyr.js +0 -2
- package/bundle/chunk-3d73kfea.js +0 -2
- package/bundle/chunk-3n3gb3vd.js +0 -2
- package/bundle/chunk-3sq60y9f.js +0 -2
- package/bundle/chunk-49mbnqvc.js +0 -2
- package/bundle/chunk-4fr6kae9.js +0 -2
- package/bundle/chunk-516w1nc4.js +0 -2
- package/bundle/chunk-535nm66j.js +0 -2
- package/bundle/chunk-5kpxpm8e.js +0 -2
- package/bundle/chunk-5nm5s0h2.js +0 -2
- package/bundle/chunk-5ysbwr4x.js +0 -3
- package/bundle/chunk-6dvmyeg7.js +0 -2
- package/bundle/chunk-6ex981t8.js +0 -2
- package/bundle/chunk-6gpf2bjs.js +0 -2
- package/bundle/chunk-6jeg2r5j.js +0 -2
- package/bundle/chunk-6nry7tah.js +0 -2
- package/bundle/chunk-7bgzcpdw.js +0 -2
- package/bundle/chunk-7kjvcbwa.js +0 -2
- package/bundle/chunk-7x30x94y.js +0 -2
- package/bundle/chunk-86hsh44c.js +0 -3
- package/bundle/chunk-8jma2btf.js +0 -2
- package/bundle/chunk-8sbb95a4.js +0 -2
- package/bundle/chunk-93e0w75z.js +0 -2
- package/bundle/chunk-97gp818s.js +0 -2
- package/bundle/chunk-9epf2zbh.js +0 -2
- package/bundle/chunk-agv04nt7.js +0 -2
- package/bundle/chunk-be7smmar.js +0 -2
- package/bundle/chunk-bg1t0kke.js +0 -2
- package/bundle/chunk-bryx5cx9.js +0 -2
- package/bundle/chunk-c13rrw41.js +0 -2
- package/bundle/chunk-c2kkv619.js +0 -2
- package/bundle/chunk-c3zge8cg.js +0 -3
- package/bundle/chunk-c5xj1y5v.js +0 -2
- package/bundle/chunk-cfhfc86j.js +0 -8
- package/bundle/chunk-ckpm4dvv.js +0 -2
- package/bundle/chunk-cqkaamvn.js +0 -2
- package/bundle/chunk-ct8twng1.js +0 -2
- package/bundle/chunk-d38y7bvh.js +0 -2
- package/bundle/chunk-d6hxsfm6.js +0 -2
- package/bundle/chunk-descb9jz.js +0 -2
- package/bundle/chunk-dvr2b9r1.js +0 -2
- package/bundle/chunk-ea5fktnn.js +0 -2
- package/bundle/chunk-f0t7rryn.js +0 -3
- package/bundle/chunk-f4mf6tpp.js +0 -2
- package/bundle/chunk-f97k17t8.js +0 -2
- package/bundle/chunk-g4ehhdzp.js +0 -2
- package/bundle/chunk-gd6qpdjw.js +0 -2
- package/bundle/chunk-gdn91t9j.js +0 -2
- package/bundle/chunk-gehn9fd9.js +0 -2
- package/bundle/chunk-h9wh48d0.js +0 -5
- package/bundle/chunk-hhax4mxw.js +0 -2
- package/bundle/chunk-hjb1etf8.js +0 -2
- package/bundle/chunk-jvkzdap1.js +0 -2
- package/bundle/chunk-kg8fcv91.js +0 -2
- package/bundle/chunk-kgptyf7n.js +0 -3
- package/bundle/chunk-kjjjrjnb.js +0 -2
- package/bundle/chunk-ky88ba80.js +0 -2
- package/bundle/chunk-m5cfmhwh.js +0 -2
- package/bundle/chunk-m7qxxbns.js +0 -2
- package/bundle/chunk-mh19kwzw.js +0 -10
- package/bundle/chunk-n8wg5h5p.js +0 -2
- package/bundle/chunk-nvs0d8jg.js +0 -2
- package/bundle/chunk-p6hcj3kv.js +0 -2
- package/bundle/chunk-pexmns0j.js +0 -2
- package/bundle/chunk-pt603np4.js +0 -2
- package/bundle/chunk-pz1avwyt.js +0 -2
- package/bundle/chunk-qk5bfcv8.js +0 -2
- package/bundle/chunk-qr06byhp.js +0 -2
- package/bundle/chunk-r7sq3maz.js +0 -2
- package/bundle/chunk-rcrjbhaz.js +0 -2
- package/bundle/chunk-rmgs9nmj.js +0 -2
- package/bundle/chunk-rytavefg.js +0 -2
- package/bundle/chunk-sh9vjnsh.js +0 -2
- package/bundle/chunk-st0c5wwc.js +0 -2
- package/bundle/chunk-teb3k2sf.js +0 -2
- package/bundle/chunk-ts798jvf.js +0 -2
- package/bundle/chunk-tx5aj02v.js +0 -2
- package/bundle/chunk-v1t51rrq.js +0 -2
- package/bundle/chunk-vdrz2t9c.js +0 -2
- package/bundle/chunk-vh9ptqn0.js +0 -2
- package/bundle/chunk-vj4x8hvz.js +0 -2
- package/bundle/chunk-w72rctxz.js +0 -2
- package/bundle/chunk-wbw9zv3h.js +0 -2
- package/bundle/chunk-x6mw98c2.js +0 -2
- package/bundle/chunk-y6p57wgh.js +0 -2
- package/bundle/chunk-y6xs8v17.js +0 -2
- package/bundle/chunk-z3xsfpc6.js +0 -2
- package/bundle/chunk-zkm3yyyf.js +0 -2
- package/bundle/chunk-zn5pw733.js +0 -2
- package/bundle/chunk-zxwvnmea.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-f2pv705d.js";var pr=Object.defineProperty,hr=(e)=>{throw TypeError(e)},cn=(e,t,r)=>(t in e)?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},kt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||hr("Cannot "+r),F=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),gr=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pn=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fr={};dr(fr,{languages:()=>ns,options:()=>is,parsers:()=>tn,printers:()=>mu});var hn=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},L=hn,vr="string",Cr="array",yr="cursor",rt="indent",nt="align",Sr="trim",at="group",it="fill",st="if-break",ut="indent-if-break",br="line-suffix",_r="line-suffix-boundary",Z="line",wr="label",ot="break-parent",Ar=new Set([yr,rt,nt,Sr,at,it,st,ut,br,_r,Z,wr,ot]),dn=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},de=dn;function mn(e){if(typeof e=="string")return vr;if(Array.isArray(e))return Cr;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var kr=mn,gn=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
|
3
3
|
Expected it to be 'string' or 'object'.`;if(kr(e))throw Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=gn([...Ar].map((a)=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
|
|
4
4
|
Expected it to be ${n}.`}var vn=class extends Error{name="InvalidDocError";constructor(e){super(fn(e)),this.doc=e}},Cn=vn;function Er(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let s=a(i);return r.set(i,s),s}function a(i){switch(kr(i)){case Cr:return t(i.map(n));case it:return t({...i,parts:i.parts.map(n)});case st:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case at:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case nt:case rt:case ut:case wr:case br:return t({...i,contents:n(i.contents)});case vr:case yr:case Sr:case _r:case Z:case ot:return t(i);default:throw new Cn(i)}}}function P(e,t=kn){return Er(e,(r)=>typeof r=="string"?ee(t,r.split(`
|
|
5
5
|
`)):r)}var lt=()=>{},$=lt,xr=lt,yn=lt;function H(e){return $(e),{type:rt,contents:e}}function Dr(e,t){return $(t),{type:nt,contents:t,n:e}}function k(e,t={}){return $(e),xr(t.expandedStates,!0),{type:at,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Sn(e){return Dr(Number.NEGATIVE_INFINITY,e)}function bn(e){return Dr({type:"root"},e)}function Tr(e){return yn(e),{type:it,parts:e}}function xe(e,t="",r={}){return $(e),t!==""&&$(t),{type:st,breakContents:e,flatContents:t,groupId:r.groupId}}function _n(e,t){return $(e),{type:ut,contents:e,groupId:t.groupId,negate:t.negate}}var me={type:ot},wn={type:Z,hard:!0},An={type:Z,hard:!0,literal:!0},_={type:Z},D={type:Z,soft:!0},y=[wn,me],kn=[An,me];function ee(e,t){$(e),xr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Se="'",Et='"';function En(e,t){let r=t===!0||t===Se?Se:Et,n=r===Se?Et:Se,a=0,i=0;for(let s of e)s===r?a++:s===n&&i++;return a>i?n:r}var xn=En;function Dn(e){if(typeof e!="string")throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var N,Tn=class{constructor(e){gr(this,N),pn(this,N,new Set(e))}getLeadingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return F(this,N).has(e.charAt(0))}hasTrailingWhitespace(e){return F(this,N).has(de(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${Dn([...F(this,N)].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>t.has(r))}hasNonWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>!t.has(r))}isWhitespaceOnly(e){let t=F(this,N);return Array.prototype.every.call(e,(r)=>t.has(r))}};N=new WeakMap;var Bn=Tn,Ln=["\t",`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{fg as a,gg as b}from"./chunk-n9twhc5d.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-f2pv705d.js";export{a as start,b as Heap};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-f2pv705d.js";var Jm=Object.defineProperty,Om=(e)=>{throw TypeError(e)},dh=(e,_,o)=>(_ in e)?Jm(e,_,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[_]=o,Lm=(e,_)=>{for(var o in _)Jm(e,o,{get:_[o],enumerable:!0})},zo=(e,_,o)=>dh(e,typeof _!="symbol"?_+"":_,o),mh=(e,_,o)=>_.has(e)||Om("Cannot "+o),fh=(e,_,o)=>_.has(e)?Om("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(e):_.set(e,o),ye=(e,_,o)=>(mh(e,_,"access private method"),o),Rm={};Lm(Rm,{parsers:()=>qm});var qm={};Lm(qm,{typescript:()=>T4});var hh=()=>()=>{},Fp=hh,yh=(e,_,o,c)=>{if(!(e&&_==null))return _.replaceAll?_.replaceAll(o,c):o.global?_.replace(o,c):_.split(o).join(c)},Na=yh,gh="5.8",At=[],bh=new Map;function Ho(e){return e!==void 0?e.length:0}function O_(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c)return c}}function vh(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c!==void 0)return c}}function xd(e,_,o){let c=[];q.assertEqual(e.length,_.length);for(let h=0;h<e.length;h++)c.push(o(e[h],_[h],h));return c}function jp(e,_){if(e!==void 0){for(let o=0;o<e.length;o++)if(!_(e[o],o))return!1}return!0}function Um(e,_,o){if(e!==void 0)for(let c=o??0;c<e.length;c++){let h=e[c];if(_(h,c))return h}}function Gu(e,_,o){if(e===void 0)return-1;for(let c=o??0;c<e.length;c++)if(_(e[c],c))return c;return-1}function xh(e,_,o=Op){if(e!==void 0){for(let c=0;c<e.length;c++)if(o(e[c],_))return!0}return!1}function Xn(e,_){if(e!==void 0){let o=e.length,c=0;for(;c<o&&_(e[c]);)c++;if(c<o){let h=e.slice(0,c);for(c++;c<o;){let v=e[c];_(v)&&h.push(v),c++}return h}}return e}function cp(e,_){let o;if(e!==void 0){o=[];for(let c=0;c<e.length;c++)o.push(_(e[c],c))}return o}function Bm(e){let _=[];for(let o=0;o<e.length;o++){let c=e[o];c&&($n(c)?D_(_,c):_.push(c))}return _}function zm(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h&&($n(h)?o=D_(o,h):o=C_(o,h))}return o??At}function wh(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=e[c],v=_(h,c);(o||h!==v||$n(v))&&(o||(o=e.slice(0,c)),$n(v)?D_(o,v):o.push(v))}return o??e}function Th(e,_){let o=[];if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h!==void 0&&o.push(h)}return o}function Zt(e,_){if(e!==void 0)if(_!==void 0){for(let o=0;o<e.length;o++)if(_(e[o]))return!0}else return e.length>0;return!1}function Mp(e,_){return _===void 0||_.length===0?e:e===void 0||e.length===0?_:[...e,..._]}function Sh(e,_,o=Op){if(e===void 0||_===void 0)return e===_;if(e.length!==_.length)return!1;for(let c=0;c<e.length;c++)if(!o(e[c],_[c],c))return!1;return!0}function C_(e,_){return _===void 0?e:e===void 0?[_]:(e.push(_),e)}function up(e,_){return _<0?e.length+_:_}function D_(e,_,o,c){if(_===void 0||_.length===0)return e;if(e===void 0)return _.slice(o,c);o=o===void 0?0:up(_,o),c=c===void 0?_.length:up(_,c);for(let h=o;h<c&&h<_.length;h++)_[h]!==void 0&&e.push(_[h]);return e}function kh(e,_,o){return xh(e,_,o)?!1:(e.push(_),!0)}function Ch(e,_,o){return e!==void 0?(kh(e,_,o),e):[_]}function Ah(e,_){return e.length===0?At:e.slice().sort(_)}var S4=Array.prototype.at?(e,_)=>e==null?void 0:e.at(_):(e,_)=>{if(e!==void 0&&(_=up(e,_),_<e.length))return e[_]};function Jp(e){return e===void 0||e.length===0?void 0:e[0]}function ja(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Dh(e){return q.assert(e.length!==0),e[e.length-1]}function Eh(e){return e!==void 0&&e.length===1?e[0]:void 0}function Ph(e,_,o,c,h){return Nh(e,o(_),o,c,h)}function Nh(e,_,o,c,h){if(!Zt(e))return-1;let v=h??0,A=e.length-1;for(;v<=A;){let E=v+(A-v>>1),s=o(e[E],E);switch(c(s,_)){case-1:v=E+1;break;case 0:return E;case 1:A=E-1;break}}return~v}function Ih(e,_,o,c,h){if(e&&e.length>0){let v=e.length;if(v>0){let A=c===void 0||c<0?0:c,E=h===void 0||A+h>v-1?v-1:A+h,s;for(arguments.length<=2?(s=e[A],A++):s=o;A<=E;)s=_(s,e[A],A),A++;return s}}return o}var Km=Object.prototype.hasOwnProperty;function Dn(e,_){return Km.call(e,_)}function Fh(e){let _=[];for(let o in e)Km.call(e,o)&&_.push(o);return _}function jh(){let e=new Map;return e.add=Mh,e.remove=Jh,e}function Mh(e,_){let o=this.get(e);return o!==void 0?o.push(_):this.set(e,o=[_]),o}function Jh(e,_){let o=this.get(e);o!==void 0&&(Vh(o,_),o.length||this.delete(e))}function $n(e){return Array.isArray(e)}function $u(e){return $n(e)?e:[e]}function Oh(e,_){return e!==void 0&&_(e)?e:void 0}function Cn(e,_){return e!==void 0&&_(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(_)}'.`)}function qa(e){}function Lh(){return!0}function gt(e){return e}function wd(e){let _;return()=>(e&&(_=e(),e=void 0),_)}function H_(e){let _=new Map;return(o)=>{let c=`${typeof o}:${o}`,h=_.get(c);return h===void 0&&!_.has(c)&&(h=e(o),_.set(c,h)),h}}function Op(e,_){return e===_}function Lp(e,_){return e===_||e!==void 0&&_!==void 0&&e.toUpperCase()===_.toUpperCase()}function Rh(e,_){return Op(e,_)}function qh(e,_){return e===_?0:e===void 0?-1:_===void 0?1:e<_?-1:1}function Vm(e,_){return qh(e,_)}function Uh(e,_,o){for(let c=0;c<e.length;c++)_=Math.max(_,o(e[c]));return _}function Qo(e,_,o){let c=Math.max(2,Math.floor(e.length*0.34)),h=Math.floor(e.length*0.4)+1,v;for(let A of _){let E=o(A);if(E!==void 0&&Math.abs(E.length-e.length)<=c){if(E===e||E.length<3&&E.toLowerCase()!==e.toLowerCase())continue;let s=Bh(e,E,h-0.1);if(s===void 0)continue;q.assert(s<h),h=s,v=A}}return v}function Bh(e,_,o){let c=Array(_.length+1),h=Array(_.length+1),v=o+0.01;for(let E=0;E<=_.length;E++)c[E]=E;for(let E=1;E<=e.length;E++){let s=e.charCodeAt(E-1),V=Math.ceil(E>o?E-o:1),d=Math.floor(_.length>o+E?o+E:_.length);h[0]=E;let T=E;for(let S=1;S<V;S++)h[S]=v;for(let S=V;S<=d;S++){let F=e[E-1].toLowerCase()===_[S-1].toLowerCase()?c[S-1]+0.1:c[S-1]+2,te=s===_.charCodeAt(S-1)?c[S-1]:Math.min(c[S]+1,h[S-1]+1,F);h[S]=te,T=Math.min(T,te)}for(let S=d+1;S<=_.length;S++)h[S]=v;if(T>o)return;let b=c;c=h,h=b}let A=c[_.length];return A>o?void 0:A}function zh(e,_,o){let c=e.length-_.length;return c>=0&&(o?Lp(e.slice(c),_):e.indexOf(_,c)===c)}function Kh(e,_){e[_]=e[e.length-1],e.pop()}function Vh(e,_){return Wh(e,(o)=>o===_)}function Wh(e,_){for(let o=0;o<e.length;o++)if(_(e[o]))return Kh(e,o),!0;return!1}function _c(e,_,o){return o?Lp(e.slice(0,_.length),_):e.lastIndexOf(_,0)===0}function pp(e){return e===void 0?void 0:[e]}var q;((e)=>{let _=0;e.currentLogLevel=2,e.isDebugging=!1;function o(J){return e.currentLogLevel<=J}e.shouldLog=o;function c(J,oe){e.loggingHost&&o(J)&&e.loggingHost.log(J,oe)}function h(J){c(3,J)}e.log=h,((J)=>{function oe(Ye){c(1,Ye)}J.error=oe;function pe(Ye){c(2,Ye)}J.warn=pe;function ke(Ye){c(3,Ye)}J.log=ke;function Qe(Ye){c(4,Ye)}J.trace=Qe})(h=e.log||(e.log={}));let v={};function A(){return _}e.getAssertionLevel=A;function E(J){let oe=_;if(_=J,J>oe)for(let pe of Fh(v)){let ke=v[pe];ke!==void 0&&e[pe]!==ke.assertion&&J>=ke.level&&(e[pe]=ke,v[pe]=void 0)}}e.setAssertionLevel=E;function s(J){return _>=J}e.shouldAssert=s;function V(J,oe){return s(J)?!0:(v[oe]={level:J,assertion:e[oe]},e[oe]=qa,!1)}function d(J,oe){debugger;let pe=Error(J?`Debug Failure. ${J}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(pe,oe||d),pe}e.fail=d;function T(J,oe,pe){return d(`${oe||"Unexpected node."}\r
|
|
3
3
|
Node ${jt(J.kind)} was unexpected.`,pe||T)}e.failBadSyntaxKind=T;function b(J,oe,pe,ke){J||(oe=oe?`False expression: ${oe}`:"False expression.",pe&&(oe+=`\r
|
|
4
4
|
Verbose Debug Information: `+(typeof pe=="string"?pe:pe())),d(oe,ke||b))}e.assert=b;function S(J,oe,pe,ke,Qe){if(J!==oe){let Ye=pe?ke?`${pe} ${ke}`:pe:"";d(`Expected ${J} === ${oe}. ${Ye}`,Qe||S)}}e.assertEqual=S;function F(J,oe,pe,ke){J>=oe&&d(`Expected ${J} < ${oe}. ${pe||""}`,ke||F)}e.assertLessThan=F;function te(J,oe,pe){J>oe&&d(`Expected ${J} <= ${oe}`,pe||te)}e.assertLessThanOrEqual=te;function ve(J,oe,pe){J<oe&&d(`Expected ${J} >= ${oe}`,pe||ve)}e.assertGreaterThanOrEqual=ve;function fe(J,oe,pe){J==null&&d(oe,pe||fe)}e.assertIsDefined=fe;function me(J,oe,pe){return fe(J,oe,pe||me),J}e.checkDefined=me;function j(J,oe,pe){for(let ke of J)fe(ke,oe,pe||j)}e.assertEachIsDefined=j;function ne(J,oe,pe){return j(J,oe,pe||ne),J}e.checkEachDefined=ne;function je(J,oe="Illegal value:",pe){let ke=typeof J=="object"&&Dn(J,"kind")&&Dn(J,"pos")?"SyntaxKind: "+jt(J.kind):JSON.stringify(J);return d(`${oe} ${ke}`,pe||je)}e.assertNever=je;function K(J,oe,pe,ke){V(1,"assertEachNode")&&b(oe===void 0||jp(J,oe),pe||"Unexpected node.",()=>`Node array did not pass test '${y_(oe)}'.`,ke||K)}e.assertEachNode=K;function se(J,oe,pe,ke){V(1,"assertNode")&&b(J!==void 0&&(oe===void 0||oe(J)),pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} did not pass test '${y_(oe)}'.`,ke||se)}e.assertNode=se;function G(J,oe,pe,ke){V(1,"assertNotNode")&&b(J===void 0||oe===void 0||!oe(J),pe||"Unexpected node.",()=>`Node ${jt(J.kind)} should not have passed test '${y_(oe)}'.`,ke||G)}e.assertNotNode=G;function mt(J,oe,pe,ke){V(1,"assertOptionalNode")&&b(oe===void 0||J===void 0||oe(J),pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} did not pass test '${y_(oe)}'.`,ke||mt)}e.assertOptionalNode=mt;function en(J,oe,pe,ke){V(1,"assertOptionalToken")&&b(oe===void 0||J===void 0||J.kind===oe,pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} was not a '${jt(oe)}' token.`,ke||en)}e.assertOptionalToken=en;function h_(J,oe,pe){V(1,"assertMissingNode")&&b(J===void 0,oe||"Unexpected node.",()=>`Node ${jt(J.kind)} was unexpected'.`,pe||h_)}e.assertMissingNode=h_;function tn(J){}e.type=tn;function y_(J){if(typeof J!="function")return"";if(Dn(J,"name"))return J.name;{let oe=Function.prototype.toString.call(J),pe=/^function\s+([\w$]+)\s*\(/.exec(oe);return pe?pe[1]:""}}e.getFunctionName=y_;function P_(J){return`{ name: ${si(J.escapedName)}; flags: ${st(J.flags)}; declarations: ${cp(J.declarations,(oe)=>jt(oe.kind))} }`}e.formatSymbol=P_;function We(J=0,oe,pe){let ke=Pn(oe);if(J===0)return ke.length>0&&ke[0][0]===0?ke[0][1]:"0";if(pe){let Qe=[],Ye=J;for(let[at,Et]of ke){if(at>J)break;at!==0&&at&J&&(Qe.push(Et),Ye&=~at)}if(Ye===0)return Qe.join("|")}else for(let[Qe,Ye]of ke)if(Qe===J)return Ye;return J.toString()}e.formatEnum=We;let _n=new Map;function Pn(J){let oe=_n.get(J);if(oe)return oe;let pe=[];for(let Qe in J){let Ye=J[Qe];typeof Ye=="number"&&pe.push([Ye,Qe])}let ke=Ah(pe,(Qe,Ye)=>Vm(Qe[0],Ye[0]));return _n.set(J,ke),ke}function jt(J){return We(J,Fe,!1)}e.formatSyntaxKind=jt;function L_(J){return We(J,ef,!1)}e.formatSnippetKind=L_;function N_(J){return We(J,Wn,!1)}e.formatScriptKind=N_;function Mt(J){return We(J,Y_,!0)}e.formatNodeFlags=Mt;function bt(J){return We(J,$m,!0)}e.formatNodeCheckFlags=bt;function He(J){return We(J,Wm,!0)}e.formatModifierFlags=He;function R_(J){return We(J,Zm,!0)}e.formatTransformFlags=R_;function Xt(J){return We(J,tf,!0)}e.formatEmitFlags=Xt;function st(J){return We(J,Gm,!0)}e.formatSymbolFlags=st;function rt(J){return We(J,o_,!0)}e.formatTypeFlags=rt;function Rt(J){return We(J,Qm,!0)}e.formatSignatureFlags=Rt;function Jt(J){return We(J,Hm,!0)}e.formatObjectFlags=Jt;function lt(J){return We(J,dp,!0)}e.formatFlowFlags=lt;function nn(J){return We(J,Xm,!0)}e.formatRelationComparisonResult=nn;function ft(J){return We(J,CheckMode,!0)}e.formatCheckMode=ft;function g_(J){return We(J,SignatureCheckMode,!0)}e.formatSignatureCheckMode=g_;function yt(J){return We(J,TypeFacts,!0)}e.formatTypeFacts=yt;let i_=!1,_t;function qt(J){"__debugFlowFlags"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(){let oe=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",pe=this.flags&-2048;return`${oe}${pe?` (${lt(pe)})`:""}`}},__debugFlowFlags:{get(){return We(this.flags,dp,!0)}},__debugToString:{value(){return hn(this)}}})}function t_(J){return i_&&(typeof Object.setPrototypeOf=="function"?(_t||(_t=Object.create(Object.prototype),qt(_t)),Object.setPrototypeOf(J,_t)):qt(J)),J}e.attachFlowNodeDebugInfo=t_;let rn;function dn(J){"__tsDebuggerDisplay"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(oe){return oe=String(oe).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${oe}`}}})}function mn(J){i_&&(typeof Object.setPrototypeOf=="function"?(rn||(rn=Object.create(Array.prototype),dn(rn)),Object.setPrototypeOf(J,rn)):dn(J))}e.attachNodeArrayDebugInfo=mn;function q_(){if(i_)return;let J=new WeakMap,oe=new WeakMap;Object.defineProperties(Ct.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let ke=this.flags&33554432?"TransientSymbol":"Symbol",Qe=this.flags&-33554433;return`${ke} '${hp(this)}'${Qe?` (${st(Qe)})`:""}`}},__debugFlags:{get(){return st(this.flags)}}}),Object.defineProperties(Ct.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let ke=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",Qe=this.flags&524288?this.objectFlags&-1344:0;return`${ke}${this.symbol?` '${hp(this.symbol)}'`:""}${Qe?` (${Jt(Qe)})`:""}`}},__debugFlags:{get(){return rt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Jt(this.objectFlags):""}},__debugTypeToString:{value(){let ke=J.get(this);return ke===void 0&&(ke=this.checker.typeToString(this),J.set(this,ke)),ke}}}),Object.defineProperties(Ct.getSignatureConstructor().prototype,{__debugFlags:{get(){return Rt(this.flags)}},__debugSignatureToString:{value(){var ke;return(ke=this.checker)==null?void 0:ke.signatureToString(this)}}});let pe=[Ct.getNodeConstructor(),Ct.getIdentifierConstructor(),Ct.getTokenConstructor(),Ct.getSourceFileConstructor()];for(let ke of pe)Dn(ke.prototype,"__debugKind")||Object.defineProperties(ke.prototype,{__tsDebuggerDisplay:{value(){return`${Fa(this)?"GeneratedIdentifier":tt(this)?`Identifier '${E_(this)}'`:Xr(this)?`PrivateIdentifier '${E_(this)}'`:Ra(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:Ba(this)?`NumericLiteral ${this.text}`:og(this)?`BigIntLiteral ${this.text}n`:Qf(this)?"TypeParameterDeclaration":sc(this)?"ParameterDeclaration":Yf(this)?"ConstructorDeclaration":Tp(this)?"GetAccessorDeclaration":cc(this)?"SetAccessorDeclaration":mg(this)?"CallSignatureDeclaration":fg(this)?"ConstructSignatureDeclaration":Zf(this)?"IndexSignatureDeclaration":hg(this)?"TypePredicateNode":e1(this)?"TypeReferenceNode":t1(this)?"FunctionTypeNode":_1(this)?"ConstructorTypeNode":yg(this)?"TypeQueryNode":gg(this)?"TypeLiteralNode":bg(this)?"ArrayTypeNode":vg(this)?"TupleTypeNode":wg(this)?"OptionalTypeNode":Tg(this)?"RestTypeNode":Sg(this)?"UnionTypeNode":kg(this)?"IntersectionTypeNode":Cg(this)?"ConditionalTypeNode":Ag(this)?"InferTypeNode":Dg(this)?"ParenthesizedTypeNode":Eg(this)?"ThisTypeNode":Pg(this)?"TypeOperatorNode":Ng(this)?"IndexedAccessTypeNode":Ig(this)?"MappedTypeNode":Fg(this)?"LiteralTypeNode":xg(this)?"NamedTupleMember":jg(this)?"ImportTypeNode":jt(this.kind)}${this.flags?` (${Mt(this.flags)})`:""}`}},__debugKind:{get(){return jt(this.kind)}},__debugNodeFlags:{get(){return Mt(this.flags)}},__debugModifierFlags:{get(){return He(h2(this))}},__debugTransformFlags:{get(){return R_(this.transformFlags)}},__debugIsParseTreeNode:{get(){return ac(this)}},__debugEmitFlags:{get(){return Xt(La(this))}},__debugGetText:{value(Qe){if(Aa(this))return"";let Ye=oe.get(this);if(Ye===void 0){let at=N0(this),Et=at&&fr(at);Ye=Et?Od(Et,at,Qe):"",oe.set(this,Ye)}return Ye}}});i_=!0}e.enableDebugInfo=q_;function U_(J){let oe=J&7,pe=oe===0?"in out":oe===3?"[bivariant]":oe===2?"in":oe===1?"out":oe===4?"[independent]":"";return J&8?pe+=" (unmeasurable)":J&16&&(pe+=" (unreliable)"),pe}e.formatVariance=U_;class fn{__debugToString(){var J;switch(this.kind){case 3:return((J=this.debugInfo)==null?void 0:J.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return xd(this.sources,this.targets||cp(this.sources,()=>"any"),(oe,pe)=>`${oe.__debugTypeToString()} -> ${typeof pe=="string"?pe:pe.__debugTypeToString()}`).join(", ");case 2:return xd(this.sources,this.targets,(oe,pe)=>`${oe.__debugTypeToString()} -> ${pe().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
|
|
5
5
|
`).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ap as c,Bp as u,Cp as i,Gp as I3,Ho as T,Oo as m,Xo as A,ap as O3,qp as l,sp as k,tp as O,xp as s,yp as S}from"./chunk-ph8hn1wt.js";import{Jp as q3,Op as v,Vp as y}from"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import{Jt as j}from"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-r9w0thdk.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.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"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
|
|
2
|
+
import{$q as u,Aq as O3,Qq as l,Sq as k,Tq as O,Xq as s,Yq as S,_q as c,ar as i,er as I3,fq as T,mq as m,vq as A}from"./chunk-dy2k5rdx.js";import{hr as q3,mr as v,tr as y}from"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import{hv as j}from"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.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"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{GP as a,HP as b,IP as c,JP as d,KP as e,LP as f,MP as g,NP as h,OP as i,PP as j}from"./chunk-wjz42325.js";import"./chunk-f2pv705d.js";export{c as TreeCursor,b as Tree,f as Query,j as Parser,d as Node,i as MIN_COMPATIBLE_VERSION,a as LookaheadIterator,g as Language,h as LANGUAGE_VERSION,e as CaptureQuantifier};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Jo as D,Ko as m,No as R,Oo as X,So as v,Uo as x,Vo as S}from"./chunk-gbxf6e5d.js";import{ip as A,mp as L}from"./chunk-95am490c.js";import{cu as U}from"./chunk-hwsqqkrv.js";import{Au as P,Fu as F}from"./chunk-aa2n02qk.js";import{EI as k,qF as s,rP as B}from"./chunk-tezrgfc6.js";import{UP as E}from"./chunk-f2pv705d.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 Eo,Y as Fo,w as Go,M as Ho};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{eg as X}from"./chunk-s06t769q.js";import{Eg as M,Ig as x}from"./chunk-dd4qnh8s.js";import{yj as B}from"./chunk-9a6p1gdn.js";import{Gp as G,Kp as C,Rp as N,Sp as V,Vp as L}from"./chunk-makecdh6.js";import{EI as z}from"./chunk-tezrgfc6.js";var Z="forgewise";function A(j){if(!j||j.type!=="api")return"skip";if(j.method==="api-key")return"skip";if(M(j.expiresAt))return"skip";return"probe"}function F(j){if(j===null)return"skipped";if(!j)return"revoked";return"valid"}function U(j){if(!j||j.type!=="api")return{kind:"skip"};if(j.method==="api-key")return{kind:"skip"};if(!M(j.expiresAt))return{kind:"skip"};if(j.refreshToken)return{kind:"refresh-token",refreshToken:j.refreshToken};return{kind:"browser"}}function T(j){if(j==="invalid_grant")return{kind:"revoked"};if(j===null)return{kind:"transient"};return{kind:"persist",credential:L(j,{rotateRefreshToken:!0})}}var b=1e4;function P(j){if(!j)return;if(j.type!=="api")return{type:j.type,expiresAt:0};return{type:j.type,method:j.metadata?.method,expiresAt:Number(j.metadata?.expires_at??0),refreshToken:j.metadata?.refresh_token}}function w(){if(process.platform==="linux")return Boolean(process.env.DISPLAY||process.env.WAYLAND_DISPLAY);return process.platform==="win32"||process.platform==="darwin"}var K=()=>z.gen(function*(){let j=yield*B.Service,D=yield*z.orElseSucceed(j.get(Z),()=>{return});if(A(P(D))==="skip")return"skipped";if(!D||D.type!=="api")return"skipped";let J=yield*z.orElseSucceed(z.tryPromise({try:()=>C(),catch:()=>{return}}).pipe(z.map((Q)=>Q.issuer)),()=>{return});if(!J)return"skipped";let $=yield*z.promise(()=>N(J,D.key)),H=F($);if(H==="revoked")yield*z.orElseSucceed(j.remove(Z),()=>{return});return H}).pipe(z.withSpan("forgewise.validateStoredToken")),W=()=>z.gen(function*(){let j=yield*B.Service,D=yield*z.orElseSucceed(j.get(Z),()=>{return}),J=U(P(D));if(J.kind==="skip")return"skipped";if(J.kind==="refresh-token"){let _=yield*z.promise(()=>V(J.refreshToken).catch(()=>null)),q=T(_);if(q.kind==="revoked")return yield*z.orElseSucceed(j.remove(Z),()=>{return}),"failed";if(q.kind==="persist")return(yield*j.set(Z,q.credential).pipe(z.map(()=>!0),z.catch(()=>z.succeed(!1))))?"ok":"failed"}if(!w())return"skipped";let $=new AbortController,H=setTimeout(()=>$.abort(),b),Q=yield*z.promise(()=>x({signal:$.signal}).catch(()=>null).finally(()=>clearTimeout(H)));if(!Q)return"failed";let Y=L(Q,{rotateRefreshToken:!1});return(yield*j.set(Z,Y).pipe(z.map(()=>!0),z.catch(()=>z.succeed(!1))))?"ok":"failed"}).pipe(z.withSpan("forgewise.refreshIfNeeded"));var E=()=>z.gen(function*(){if((yield*z.promise(()=>G()))?.method!=="sso")return"ok";if((yield*K())==="revoked")return yield*z.sync(()=>X.println(X.Style.TEXT_DANGER+"Your session was revoked (signed out from another device or by an admin action). Run `qitqode auth login` to sign in again."+X.Style.TEXT_NORMAL)),"revoked";if((yield*W())==="failed")yield*z.sync(()=>X.println(X.Style.TEXT_DIM+"(Session refresh failed \u2014 run `qitqode auth login` to re-authenticate)"+X.Style.TEXT_NORMAL));return"ok"});
|
|
3
3
|
export{E as h};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{np as G$}from"./chunk-kmzpeq8k.js";import{ht as A$}from"./chunk-01e3v1xz.js";import{mt as k$}from"./chunk-dbpkq7ba.js";import{vu as Y$,wu as U$,yu as CZ,zu as KZ}from"./chunk-aa2n02qk.js";import{Lu as SZ}from"./chunk-k1x8469r.js";import{$B as rZ,$F as RZ,$G as h,$K as X$,EI as P,FL as F$,HG as $Z,IG as LZ,JG as qZ,JH as xZ,KG as f,KH as Q$,KK as DZ,MC as gZ,MG as jZ,OG as D$,OK as C,PG as i,SG as J$,VG as o,WF as z$,WK as r,XB as kZ,XG as l,aC as sZ,aH as K$,bB as a,cH as c,cI as EZ,dH as vZ,eL as JZ,hL as fZ,iL as iZ,jJ as YZ,kF as Z$,mJ as V$,mL as PZ,nH as IZ,nL as lZ,pK as d,qH as zZ,qI as p,rF as $$,rK as m,rL as cZ,sF as E,uB as L,uF as WZ,vB as eZ,vF as q$,vL as v,xB as ZZ,xL as B$,zB as oZ}from"./chunk-tezrgfc6.js";import{SP as u$,UP as BZ,WP as h$}from"./chunk-f2pv705d.js";var pZ={};BZ(pZ,{makeHandle:()=>AZ,make:()=>GZ,ProcessId:()=>UZ,ExitCode:()=>FZ,ChildProcessSpawner:()=>W});var FZ=YZ(),UZ=YZ(),hZ="~effect/ChildProcessSpawner/ChildProcessHandle",j$={[hZ]:hZ,...kZ,toJSON(){return{_id:"ChildProcessHandle",pid:this.pid}}},AZ=(Z)=>Object.assign(Object.create(j$),Z),GZ=(Z)=>{let q=(B,Q)=>Z(B).pipe(h((U)=>fZ(Q?.includeStderr===!0?U.all:U.stdout)),r),z=(B,Q)=>iZ(q(B,Q));return W.of({spawn:Z,exitCode:(B)=>xZ(o(Z(B),(Q)=>Q.exitCode)),streamString:q,streamLines:z,lines:(B,Q)=>lZ(z(B,Q)),string:(B,Q)=>cZ(q(B,Q))})};class W extends gZ()("effect/process/ChildProcessSpawner"){}var x={};BZ(x,{setEnv:()=>HZ,setCwd:()=>yZ,prefix:()=>C$,pipeTo:()=>P$,parseFdName:()=>g,make:()=>k,isStandardCommand:()=>I$,isPipedCommand:()=>E$,isCommand:()=>s,fdName:()=>NZ});var MZ="~effect/unstable/process/ChildProcess",aZ={...rZ,...sZ,[MZ]:MZ,asEffect(){return W.use((Z)=>Z.spawn(this))}},s=(Z)=>oZ(Z,MZ),I$=(Z)=>Z._tag==="StandardCommand",E$=(Z)=>Z._tag==="PipedCommand",I=(Z,q,z)=>Object.assign(Object.create(aZ),{_tag:"StandardCommand",command:Z,args:q,options:z}),e=(Z,q,z={})=>Object.assign(Object.create(aZ),{_tag:"PipedCommand",left:Z,right:q,options:z}),k=function(...q){if(OZ(q[0])){let[U,...A]=q,G=bZ(U,A);return I(G[0]??"",G.slice(1),{})}if(typeof q[0]==="object"&&!Array.isArray(q[0])&&!OZ(q[0])){let U=q[0];return function(A,...G){let b=bZ(A,G);return I(b[0]??"",b.slice(1),U)}}if(typeof q[0]==="string"&&!Array.isArray(q[1])){let[U,A={}]=q;return I(U,[],A)}let[z,B=[],Q={}]=q;return I(z,B,Q)},P$=a((Z)=>s(Z[0])&&s(Z[1]),(Z,q,z)=>e(Z,q,z??{})),C$=function(...q){if(s(q[0])&&q.length>1){let[B,...Q]=q,U=dZ(Q);return _Z(B,U)}let z=dZ(q);return(B)=>_Z(B,z)},dZ=(Z)=>{if(OZ(Z[0])){let[B,...Q]=Z,U=bZ(B,Q);return{command:U[0]??"",args:U.slice(1)}}let[q,z=[]]=Z;return{command:q,args:z}},_Z=(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(q.command,[...q.args,Z.command,...Z.args],Z.options);case"PipedCommand":return e(_Z(Z.left,q),Z.right,Z.options)}},yZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(Z.command,Z.args,{...Z.options,cwd:q});case"PipedCommand":return e(yZ(Z.left,q),yZ(Z.right,q),Z.options)}}),HZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":{let z=Z.options.env===void 0?q:{...Z.options.env,...q};return I(Z.command,Z.args,{...Z.options,env:z})}case"PipedCommand":return e(HZ(Z.left,q),HZ(Z.right,q),Z.options)}}),OZ=(Z)=>Array.isArray(Z)&&("raw"in Z)&&Array.isArray(Z.raw),g=(Z)=>{let q=/^fd(\d+)$/.exec(Z);if(q===null)return;let z=parseInt(q[1],10);return z>=3?z:void 0},NZ=(Z)=>`fd${Z}`,bZ=(Z,q)=>{let z=[];for(let[B,Q]of Z.entries())z=S$(Z,q,z,Q,B);return z},S$=(Z,q,z,B,Q)=>{let U=Z.raw[Q];if(U===void 0)throw Error(`Invalid backslash sequence: ${Z.raw[Q]}`);let{hasLeadingWhitespace:A,hasTrailingWhitespace:G,tokens:b}=w$(B,U),N=nZ(z,b,A);if(Q===q.length)return N;let S=q[Q],QZ=Array.isArray(S)?S.map((VZ)=>mZ(VZ)):[mZ(S)];return nZ(N,QZ,G)},mZ=(Z)=>{if(typeof Z==="string")return Z;return String(Z)},tZ=new Set([" ","\t","\r",`
|
|
3
3
|
`]),T$={x:3,u:5},w$=(Z,q)=>{if(q.length===0)return{tokens:[],hasLeadingWhitespace:!1,hasTrailingWhitespace:!1};let z=tZ.has(q[0]),B=[],Q=0;for(let A=0,G=0;A<Z.length;A+=1,G+=1){let b=q[G];if(tZ.has(b)){if(Q!==A)B.push(Z.slice(Q,A));Q=A+1}else if(b==="\\"){let N=q[G+1];if(N===`
|
|
4
|
-
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return V$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=D$(function*(){let Z=yield*B$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...A$(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return K$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:X$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=$$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,q$(K,Z$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return J$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return eZ(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*Q$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=z$(W,f$),l$=i$.pipe(RZ(Y$.layer),RZ(U$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-
|
|
5
|
-
export{W as
|
|
4
|
+
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return V$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=D$(function*(){let Z=yield*B$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...A$(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return K$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:X$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=$$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,q$(K,Z$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return J$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return eZ(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*Q$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=z$(W,f$),l$=i$.pipe(RZ(Y$.layer),RZ(U$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-78j2c2je.js");return Z(W,l$)});var H$=(Z,q)=>P.gen(function*(){let z=yield*Z.spawn(q),[B,Q]=yield*P.all([v.mkString(v.decodeText(z.stdout)),v.mkString(v.decodeText(z.stderr))],{concurrency:2});return{code:yield*z.exitCode,text:B,stderr:Q}}).pipe(P.scoped),Mq=H$,_q=(Z,q,z)=>H$(Z,x.make("git",q,{cwd:z?.cwd,extendEnv:!0,stdin:"ignore"}));var TZ={};BZ(TZ,{payloads:()=>p$,define:()=>c$,BusEvent:()=>TZ});var O$=new Map;function c$(Z,q){let z={type:Z,properties:q};return O$.set(Z,z),z}function p$(){return O$.entries().map(([Z,q])=>{return SZ.object({type:SZ.literal(Z),properties:q.properties}).meta({ref:`Event.${q.type}`})}).toArray()}
|
|
5
|
+
export{W as Tl,pZ as Ul,x as Vl,l$ as Wl,H$ as Xl,Mq as Yl,_q as Zl,TZ as _l};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{$ as
|
|
2
|
+
import{np as J}from"./chunk-kmzpeq8k.js";import{it as H,jt as I,kt as Q}from"./chunk-01e3v1xz.js";import{Du as N}from"./chunk-aa2n02qk.js";import{WP as L}from"./chunk-f2pv705d.js";import{platform as R,release as U}from"os";import{tmpdir as V}from"os";import X from"path";import Y from"fs/promises";var Z=J(async()=>{let{which:D}=await import("./chunk-aj5z8qd5.js");return D}),T=J(async()=>{let{default:D}=await import("./chunk-v0c3k797.js");return D});function _(D){if(!process.stdout.isTTY)return;let A=`\x1B]52;c;${Buffer.from(D).toString("base64")}\x07`,E=process.env.TMUX||process.env.STY?`\x1BPtmux;\x1B${A}\x1B\\`:A;process.stdout.write(E)}async function $(){let D=R();if(D==="darwin"){let k=X.join(V(),"qitqode-clipboard.png");try{return await I(["osascript","-e",'set imageData to the clipboard as "PNGf"',"-e",`set fileRef to open for access POSIX file "${k}" with write permission`,"-e","set eof fileRef to 0","-e","write imageData to fileRef","-e","close access fileRef"],{nothrow:!0}),{data:(await N(k)).toString("base64"),mime:"image/png"}}catch{}finally{await Y.rm(k,{force:!0}).catch(()=>{})}}if(D==="win32"||U().includes("WSL")){let E=await Q(["powershell.exe","-NonInteractive","-NoProfile","-command","Add-Type -AssemblyName System.Windows.Forms; $img = [System.Windows.Forms.Clipboard]::GetImage(); if ($img) { $ms = New-Object System.IO.MemoryStream; $img.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png); [System.Convert]::ToBase64String($ms.ToArray()) }"],{nothrow:!0});if(E.text){let K=Buffer.from(E.text.trim(),"base64");if(K.length>0)return{data:K.toString("base64"),mime:"image/png"}}}if(D==="linux"){let k=await I(["wl-paste","-t","image/png"],{nothrow:!0});if(k.stdout.byteLength>0)return{data:Buffer.from(k.stdout).toString("base64"),mime:"image/png"};let E=await I(["xclip","-selection","clipboard","-t","image/png","-o"],{nothrow:!0});if(E.stdout.byteLength>0)return{data:Buffer.from(E.stdout).toString("base64"),mime:"image/png"}}let A=await(await T()).read().catch(()=>{});if(A)return{data:A,mime:"text/plain"}}var j=J(async()=>{let D=R(),G=await Z();if(D==="darwin"&&G("osascript"))return console.log("clipboard: using osascript"),async(A)=>{let k=A.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");await I(["osascript","-e",`set the clipboard to "${k}"`],{nothrow:!0})};if(D==="linux"){if(process.env.WAYLAND_DISPLAY&&G("wl-copy"))return console.log("clipboard: using wl-copy"),async(A)=>{let k=H(["wl-copy"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xclip"))return console.log("clipboard: using xclip"),async(A)=>{let k=H(["xclip","-selection","clipboard"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xsel"))return console.log("clipboard: using xsel"),async(A)=>{let k=H(["xsel","--clipboard","--input"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})}}if(D==="win32")return console.log("clipboard: using powershell"),async(A)=>{let k=H(["powershell.exe","-NonInteractive","-NoProfile","-Command","[Console]::InputEncoding = [System.Text.Encoding]::UTF8; Set-Clipboard -Value ([Console]::In.ReadToEnd())"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};return console.log("clipboard: no native support"),async(A)=>{await(await T()).write(A).catch(()=>{})}});async function v(D){_(D),await(await j())(D)}
|
|
3
|
+
export{$ as Gd,v as Hd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{o as L}from"./chunk-ghap1n1m.js";import"./chunk-npzx3yd5.js";import{A as K}from"./chunk-16srrzjr.js";import{B as N}from"./chunk-gsez13bg.js";import{C as F,E as J}from"./chunk-c8k32724.js";import"./chunk-76h0f86f.js";import"./chunk-nfzpegqx.js";import"./chunk-gbkz04ke.js";import"./chunk-abv0fskc.js";import{$ as M}from"./chunk-gww0skmn.js";import"./chunk-x55h5qdc.js";import"./chunk-5zh91zk2.js";import"./chunk-rk0fnvp5.js";import"./chunk-8p0t8qah.js";import"./chunk-4zhrg3rv.js";import{be as B}from"./chunk-f4mnp6xd.js";import"./chunk-438faz6b.js";import"./chunk-qp3hxqg5.js";import"./chunk-djqxbnwc.js";import{eg as z}from"./chunk-s06t769q.js";import"./chunk-4ngmjk8j.js";import"./chunk-dd4qnh8s.js";import"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-ntpn0w9m.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import"./chunk-f2pv705d.js";var x=B({command:"attach <url>",describe:"attach to a running qitqode server",builder:(j)=>j.positional("url",{type:"string",describe:"http://localhost:4096",demandOption:!0}).option("dir",{type:"string",description:"directory to run in"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],type:"string",describe:"session id to continue"}).option("fork",{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}),handler:async(j)=>{let Q=J();try{F();let q=N(j);if(q){z.error(q),process.exitCode=1;return}let R=(()=>{if(!j.dir)return;try{return process.chdir(j.dir),process.cwd()}catch{return j.dir}})(),S=M({password:j.password}),V=await K.get();await L({url:j.url,config:V,args:{continue:j.continue,sessionID:j.session,fork:j.fork},directory:R,headers:S})}finally{Q?.()}}});export{x as AttachCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Af as h}from"./chunk-gdj7mqrd.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";var v=(q)=>{return h({baseURL:"https://gateway.ai.cloudflare.com/v1/compat",name:"Unified",...q||{}})},x=v();export{x as unified,v as createUnified};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-8p0t8qah.js";import"./chunk-f2pv705d.js";var e={"ui.sessionReview.title":"Promjene sesije","ui.sessionReview.title.lastTurn":"Promjene u posljednjem potezu","ui.sessionReview.diffStyle.unified":"Ujedinjeno","ui.sessionReview.diffStyle.split":"Podijeljeno","ui.sessionReview.openFile":"Otvori fajl","ui.sessionReview.selection.line":"linija {{line}}","ui.sessionReview.selection.lines":"linije {{start}}-{{end}}","ui.sessionReview.expandAll":"Pro\u0161iri sve","ui.sessionReview.collapseAll":"Sa\u017Emi sve","ui.sessionReview.change.added":"Dodano","ui.sessionReview.change.removed":"Uklonjeno","ui.sessionReview.change.modified":"Izmijenjeno","ui.sessionReview.image.loading":"U\u010Ditavanje...","ui.sessionReview.image.placeholder":"Slika","ui.sessionReview.largeDiff.title":"Diff je prevelik za prikaz","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} izmijenjenih linija. Trenutno: {{current}} izmijenjenih linija.","ui.sessionReview.largeDiff.renderAnyway":"Prika\u017Ei svejedno","ui.fileMedia.kind.image":"slika","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Uklonjeno: {{kind}}","ui.fileMedia.state.loading":"U\u010Ditavanje: {{kind}}...","ui.fileMedia.state.error":"Gre\u0161ka pri u\u010Ditavanju: {{kind}}","ui.fileMedia.state.unavailable":"Nedostupno: {{kind}}","ui.fileMedia.binary.title":"Binarni fajl","ui.fileMedia.binary.description.path":"{{path}} se ne mo\u017Ee prikazati jer je binarni fajl.","ui.fileMedia.binary.description.default":"Ovaj fajl se ne mo\u017Ee prikazati jer je binarni.","ui.lineComment.label.prefix":"Komentar na ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Komentari\u0161e\u0161 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Dodaj komentar","ui.lineComment.submit":"Komentari\u0161i","ui.sessionTurn.steps.show":"Prika\u017Ei korake","ui.sessionTurn.steps.hide":"Sakrij korake","ui.sessionTurn.summary.response":"Odgovor","ui.sessionTurn.diff.showMore":"Prika\u017Ei jo\u0161 izmjena ({{count}})","ui.sessionTurn.retry.retrying":"ponovni poku\u0161aj","ui.sessionTurn.retry.inSeconds":"za {{seconds}}s","ui.sessionTurn.retry.attempt":"poku\u0161aj #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - poku\u0161aj #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini je trenutno preoptere\u0107en","ui.sessionTurn.error.freeUsageExceeded":"Besplatna upotreba prema\u0161ena","ui.sessionTurn.error.addQredits":"Dodaj kredite","ui.sessionTurn.status.delegating":"Delegiranje posla","ui.sessionTurn.status.planning":"Planiranje sljede\u0107ih koraka","ui.sessionTurn.status.gatheringContext":"Istra\u017Eivanje","ui.sessionTurn.status.gatheredContext":"Istra\u017Eeno","ui.sessionTurn.status.searchingCodebase":"Pretra\u017Eivanje baze koda","ui.sessionTurn.status.searchingWeb":"Pretra\u017Eivanje weba","ui.sessionTurn.status.makingEdits":"Pravljenje izmjena","ui.sessionTurn.status.runningCommands":"Pokretanje komandi","ui.sessionTurn.status.thinking":"Razmi\u0161ljanje","ui.sessionTurn.status.thinkingWithTopic":"Razmi\u0161ljanje - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Sre\u0111ivanje misli","ui.sessionTurn.status.consideringNextSteps":"Razmatranje sljede\u0107ih koraka","ui.messagePart.questions.dismissed":"Pitanja odba\u010Dena","ui.messagePart.compaction":"Sesija sa\u017Eeta","ui.messagePart.context.read.one":"{{count}} \u010Ditanje","ui.messagePart.context.read.other":"{{count}} \u010Ditanja","ui.messagePart.context.search.one":"{{count}} pretraga","ui.messagePart.context.search.other":"{{count}} pretrage","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} liste","ui.messagePart.diagnostic.error":"Gre\u0161ka","ui.messagePart.title.edit":"Uredi","ui.messagePart.title.write":"Napi\u0161i","ui.messagePart.option.typeOwnAnswer":"Unesi svoj odgovor","ui.messagePart.review.title":"Pregledaj svoje odgovore","ui.list.loading":"U\u010Ditavanje","ui.list.empty":"Nema rezultata","ui.list.clearFilter":"O\u010Disti filter","ui.list.emptyWithFilter.prefix":"Nema rezultata za","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nova poruka","ui.textField.copyToClipboard":"Kopiraj u me\u0111uspremnik","ui.textField.copyLink":"Kopiraj link","ui.textField.copied":"Kopirano","ui.imagePreview.alt":"Pregled slike","ui.scrollView.ariaLabel":"sadr\u017Eaj za pomjeranje","ui.tool.read":"\u010Citanje","ui.tool.loaded":"U\u010Ditano","ui.tool.list":"Listanje","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Web preuzimanje","ui.tool.websearch":"Pretraga weba","ui.tool.codesearch":"Pretraga koda","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Lista zadataka","ui.tool.todos.read":"\u010Citanje liste zadataka","ui.tool.questions":"Pitanja","ui.tool.agent":"{{type}} agent","ui.tool.agent.default":"agent","ui.common.file.one":"datoteka","ui.common.file.other":"datoteke","ui.common.question.one":"pitanje","ui.common.question.other":"pitanja","ui.common.add":"Dodaj","ui.common.back":"Nazad","ui.common.cancel":"Otka\u017Ei","ui.common.confirm":"Potvrdi","ui.common.dismiss":"Odbaci","ui.common.close":"Zatvori","ui.common.next":"Dalje","ui.common.submit":"Po\u0161alji","ui.permission.deny":"Zabrani","ui.permission.allowAlways":"Uvijek dozvoli","ui.permission.allowOnce":"Dozvoli jednom","ui.message.expand":"Pro\u0161iri poruku","ui.message.collapse":"Sa\u017Emi poruku","ui.message.copy":"Kopiraj","ui.message.copyMessage":"Kopiraj poruku","ui.message.forkMessage":"Forkaj u novu sesiju","ui.message.revertMessage":"Resetuj na ovu ta\u010Dku","ui.message.copyResponse":"Kopiraj odgovor","ui.message.copied":"Kopirano!","ui.message.interrupted":"Prekinuto","ui.message.queued":"U redu","ui.message.attachment.alt":"prilog","ui.patch.action.deleted":"Obrisano","ui.patch.action.created":"Kreirano","ui.patch.action.moved":"Premje\u0161teno","ui.patch.action.patched":"Primijenjeno","ui.question.subtitle.answered":"{{count}} odgovoreno","ui.question.answer.none":"(nema odgovora)","ui.question.review.notAnswered":"(nije odgovoreno)","ui.question.multiHint":"Odaberi sve \u0161to va\u017Ei","ui.question.singleHint":"Odaberi jedan odgovor","ui.question.custom.placeholder":"Unesi svoj odgovor...","ui.fileSearch.placeholder":"Prona\u0111i","ui.fileSearch.previousMatch":"Prethodno","ui.fileSearch.nextMatch":"Sljede\u0107e","ui.fileSearch.close":"Zatvori pretragu","ui.tool.task":"Zadatak","ui.tool.skill":"Vje\u0161tina","ui.basicTool.called":"Pozvan `{{tool}}`","ui.toolErrorCard.failed":"Neuspje\u0161no","ui.toolErrorCard.copyError":"Kopiraj gre\u0161ku","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
|