@qitqode/qitqode-android-arm64 0.2.7 → 0.2.9
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-ga6wc979.js → chunk-03zpnwk2.js} +1 -1
- package/bundle/{chunk-qdvnscxm.js → chunk-0a4pmkc9.js} +1 -1
- package/bundle/chunk-0aqdzyar.js +2 -0
- package/bundle/{chunk-drnj1a14.js → chunk-0egrckx0.js} +1 -1
- package/bundle/{chunk-aqcpk2vg.js → chunk-0eh3yc6e.js} +1 -1
- package/bundle/{chunk-14d301ze.js → chunk-0mh600tv.js} +1 -1
- package/bundle/{chunk-yd94wz5v.js → chunk-0s4cp6q2.js} +1 -1
- package/bundle/{chunk-368jx5dp.js → chunk-0tcggtwv.js} +1 -1
- package/bundle/{chunk-0qpqd7nz.js → chunk-0tm6589k.js} +2 -2
- package/bundle/{chunk-0gsw04hw.js → chunk-0w19vmd7.js} +2 -2
- package/bundle/{chunk-j6xmgn63.js → chunk-0z1keh2w.js} +1 -1
- package/bundle/{chunk-djqxbnwc.js → chunk-13jq2ygc.js} +1 -1
- package/bundle/{chunk-znmbfx70.js → chunk-1a6q1f5n.js} +1 -1
- package/bundle/{chunk-w43kmnm9.js → chunk-1acn5me8.js} +357 -357
- package/bundle/{chunk-aa2n02qk.js → chunk-1bxfzd6r.js} +2 -2
- package/bundle/{chunk-hrtze4c5.js → chunk-1har4t9a.js} +1 -1
- package/bundle/{chunk-33jcxsbe.js → chunk-1p9s5jj1.js} +1 -1
- package/bundle/{chunk-p40z6510.js → chunk-1v0khv7p.js} +1 -1
- package/bundle/{chunk-eeq0krp7.js → chunk-27saej0r.js} +2 -2
- package/bundle/{chunk-ppy0jy6j.js → chunk-29gwtcey.js} +1 -1
- package/bundle/{chunk-yjqww6ag.js → chunk-29q89bge.js} +2 -2
- package/bundle/chunk-2a5gjgvp.js +2 -0
- package/bundle/{chunk-bn71wqqf.js → chunk-2caaqmec.js} +1 -1
- package/bundle/{chunk-hhk2sp5n.js → chunk-2kh0tg92.js} +1 -1
- package/bundle/{chunk-bd505nsd.js → chunk-2nheahmq.js} +1 -1
- package/bundle/{chunk-42q8vj0w.js → chunk-2phyc1c0.js} +1 -1
- package/bundle/chunk-2pkfphgb.js +2 -0
- package/bundle/{chunk-4fy08jcj.js → chunk-2vaphpz0.js} +1 -1
- package/bundle/{chunk-qbrj9wzd.js → chunk-30wp95w1.js} +1 -1
- package/bundle/chunk-32fpqd0n.js +2 -0
- package/bundle/{chunk-yxttz5z5.js → chunk-35fj1sfm.js} +1 -1
- package/bundle/{chunk-1vpx7szf.js → chunk-3bb4aqh9.js} +1 -1
- package/bundle/chunk-3f2cjzb4.js +2 -0
- package/bundle/chunk-3qvap1kv.js +2 -0
- package/bundle/{chunk-c8prg3jx.js → chunk-3va85mbe.js} +2 -2
- package/bundle/{chunk-wvb17w0z.js → chunk-3z2zn8rj.js} +1 -1
- package/bundle/{chunk-84pjdenq.js → chunk-42hvspe7.js} +1 -1
- package/bundle/chunk-452tk6v3.js +2 -0
- package/bundle/{chunk-w3zhy5vq.js → chunk-48gap82w.js} +1 -1
- package/bundle/{chunk-4ftjx7ss.js → chunk-4gqb1hps.js} +1 -1
- package/bundle/{chunk-gww0skmn.js → chunk-4pmvxnkj.js} +1 -1
- package/bundle/chunk-4y9wbfd2.js +8 -0
- package/bundle/chunk-50qgz5ka.js +2 -0
- package/bundle/{chunk-4zhrg3rv.js → chunk-52xvhxek.js} +1 -1
- package/bundle/chunk-539cw9r0.js +2 -0
- package/bundle/{chunk-nfzpegqx.js → chunk-53jstmdp.js} +1 -1
- package/bundle/{chunk-8hmt3avx.js → chunk-56wq8cqj.js} +1 -1
- package/bundle/{chunk-mbbxedsq.js → chunk-59csnjc3.js} +2 -2
- package/bundle/chunk-5b0xyq5z.js +2 -0
- package/bundle/{chunk-0ggvqmnm.js → chunk-5bv63rqj.js} +1 -1
- package/bundle/{chunk-vfb72vdy.js → chunk-5cw8235e.js} +1 -1
- package/bundle/chunk-5j4nxpdy.js +2 -0
- package/bundle/chunk-5nxgk6hw.js +2 -0
- package/bundle/chunk-5qkvhr6y.js +2 -0
- package/bundle/{chunk-5zh91zk2.js → chunk-5r7c6vvx.js} +1 -1
- package/bundle/{chunk-c6cajbyj.js → chunk-5wx962mw.js} +1 -1
- package/bundle/{chunk-7sq5dyv1.js → chunk-5xkp27b1.js} +1 -1
- package/bundle/chunk-6dpdkzrk.js +2 -0
- package/bundle/chunk-6p6m5956.js +3 -0
- package/bundle/{chunk-n4qxj391.js → chunk-6ps30qax.js} +1 -1
- package/bundle/{chunk-kmzpeq8k.js → chunk-6tqbnxar.js} +1 -1
- package/bundle/{chunk-b6eypnbj.js → chunk-6vnqbejg.js} +1 -1
- package/bundle/{chunk-ghap1n1m.js → chunk-702bt91p.js} +4 -4
- package/bundle/{chunk-2c26kxp4.js → chunk-705qkpra.js} +1 -1
- package/bundle/{chunk-2pex3ak9.js → chunk-72crs18f.js} +1 -1
- package/bundle/chunk-76c400ze.js +2 -0
- package/bundle/{chunk-mghnkwp8.js → chunk-7adsab4h.js} +1 -1
- package/bundle/{chunk-n0g4983e.js → chunk-7bxxc4a3.js} +1 -1
- package/bundle/chunk-7g59hc61.js +2 -0
- package/bundle/{chunk-52rdms56.js → chunk-7jy53zqy.js} +1 -1
- package/bundle/chunk-7p88j56s.js +2 -0
- package/bundle/{chunk-5b3v1x2c.js → chunk-7pckez5z.js} +2 -2
- package/bundle/{chunk-q6p92zyn.js → chunk-7r92d7v9.js} +1 -1
- package/bundle/{chunk-t4b2fm7z.js → chunk-7thhd7ds.js} +1 -1
- package/bundle/chunk-7trngc9g.js +2 -0
- package/bundle/{chunk-4fvbexr8.js → chunk-85wh85pk.js} +1 -1
- package/bundle/chunk-8cebbmtf.js +2 -0
- package/bundle/chunk-8j1xcdmd.js +2 -0
- package/bundle/{chunk-ntpn0w9m.js → chunk-8jmb5bd4.js} +2 -2
- package/bundle/{chunk-pf3nqf00.js → chunk-8ysp6vf8.js} +1 -1
- package/bundle/{chunk-3k7016c2.js → chunk-8yzghzjq.js} +1 -1
- package/bundle/chunk-90r2z49k.js +2 -0
- package/bundle/{chunk-amp6mvbp.js → chunk-92r1gw2j.js} +1 -1
- package/bundle/{chunk-ktp2b4t4.js → chunk-94mjwy22.js} +1 -1
- package/bundle/{chunk-y5q9v80n.js → chunk-9bw6bx5c.js} +1 -1
- package/bundle/{chunk-f84hw65n.js → chunk-9cf2ktyh.js} +1 -1
- package/bundle/{chunk-x55h5qdc.js → chunk-a1z8rnq7.js} +3 -3
- package/bundle/{chunk-c3szabpf.js → chunk-a48mx917.js} +2 -2
- package/bundle/{chunk-prbxhnza.js → chunk-a8bjcvda.js} +1 -1
- package/bundle/chunk-aenrd7dk.js +2 -0
- package/bundle/{chunk-dw70wds9.js → chunk-afr8m0q1.js} +1 -1
- package/bundle/{chunk-7p6mxch0.js → chunk-ag8wxwwz.js} +1 -1
- package/bundle/{chunk-22qetqnp.js → chunk-ahmy80vb.js} +1 -1
- package/bundle/chunk-avn12jkt.js +2 -0
- package/bundle/{chunk-tc9xbn1t.js → chunk-ax64ngf2.js} +1 -1
- package/bundle/{chunk-0crgymtr.js → chunk-az3nss5m.js} +2 -2
- package/bundle/{chunk-73xryfgn.js → chunk-b5ym419d.js} +2 -2
- package/bundle/{chunk-dt1wwt7m.js → chunk-b7sr9rn3.js} +1 -1
- package/bundle/{chunk-9qzwmt76.js → chunk-bc2krtaf.js} +1 -1
- package/bundle/{chunk-jxkrhrp0.js → chunk-bhg69t69.js} +1 -1
- package/bundle/{chunk-ns8xnkjb.js → chunk-bkfafcbw.js} +1 -1
- package/bundle/{chunk-tkzctbxq.js → chunk-bnw744ej.js} +2 -2
- package/bundle/{chunk-twvmjsxf.js → chunk-bpfq8fz4.js} +1 -1
- package/bundle/chunk-brk6bge4.js +3 -0
- package/bundle/{chunk-s06t769q.js → chunk-bwadggys.js} +1 -1
- package/bundle/{chunk-spzd8rev.js → chunk-c76cjhn0.js} +1 -1
- package/bundle/{chunk-abv0fskc.js → chunk-c987bemn.js} +1 -1
- package/bundle/{chunk-705xnxbc.js → chunk-ccf4pgkr.js} +1 -1
- package/bundle/chunk-ce5e7j62.js +2 -0
- package/bundle/{chunk-2bjfz4fb.js → chunk-cf9m9m9q.js} +1 -1
- package/bundle/{chunk-z7kswv9r.js → chunk-cfwz1hgr.js} +3 -3
- package/bundle/{chunk-dgva3y5v.js → chunk-cghz0855.js} +1 -1
- package/bundle/{chunk-a76w2jwm.js → chunk-cr5tknvb.js} +1 -1
- package/bundle/chunk-cw1gwjx9.js +2 -0
- package/bundle/chunk-czw30fjs.js +2 -0
- package/bundle/{chunk-x80d0zh7.js → chunk-d30k7dpf.js} +1 -1
- package/bundle/{chunk-x9fyt3vx.js → chunk-d839fr0w.js} +1 -1
- package/bundle/{chunk-q87fw8dk.js → chunk-dcv6wj9x.js} +1 -1
- package/bundle/{chunk-4byvnx78.js → chunk-dgcannw0.js} +1 -1
- package/bundle/{chunk-4rpgwgx9.js → chunk-dhvx9p54.js} +1 -1
- package/bundle/{chunk-z744mz4w.js → chunk-dt3bsmfe.js} +2 -2
- package/bundle/chunk-dtcvqrmn.js +2 -0
- package/bundle/chunk-dwhsvpag.js +2 -0
- package/bundle/{chunk-4j76bf4j.js → chunk-dwkrqtbc.js} +1 -1
- package/bundle/{chunk-vzrc2fmt.js → chunk-dwqvcdmf.js} +1 -1
- package/bundle/chunk-e0hfpdje.js +2 -0
- package/bundle/{chunk-ajp53ksp.js → chunk-e0hha3be.js} +1 -1
- package/bundle/{chunk-f2pv705d.js → chunk-e0vrxetq.js} +1 -1
- package/bundle/{chunk-59kk0mce.js → chunk-e2wfj86b.js} +1 -1
- package/bundle/chunk-e5jk67xh.js +2 -0
- package/bundle/{chunk-ae7b11np.js → chunk-eacpc64g.js} +2 -2
- package/bundle/{chunk-hqjc4wgg.js → chunk-eewe7tx1.js} +2 -2
- package/bundle/{chunk-etv6c77a.js → chunk-eg1m81ax.js} +1 -1
- package/bundle/chunk-eg4pq4hv.js +2 -0
- package/bundle/{chunk-9xxnwb33.js → chunk-ejhhrece.js} +3 -3
- package/bundle/chunk-ew3yz97p.js +2 -0
- package/bundle/{chunk-19pspc1p.js → chunk-f2v4g7t1.js} +1 -1
- package/bundle/chunk-f2yfyhh8.js +2 -0
- package/bundle/{chunk-vp3yf46q.js → chunk-fa8pwdwv.js} +1 -1
- package/bundle/{chunk-vhzx5bxd.js → chunk-fd8x2nb4.js} +1 -1
- package/bundle/{chunk-dz3bec8g.js → chunk-fej5x648.js} +1 -1
- package/bundle/{chunk-0tqmm8b8.js → chunk-fh3d0wce.js} +1 -1
- package/bundle/{chunk-twd6r7nf.js → chunk-fjftb2sz.js} +1 -1
- package/bundle/{chunk-xhh70g8j.js → chunk-fs1vb39f.js} +2 -2
- package/bundle/{chunk-9g9katgy.js → chunk-ftvvm4r5.js} +2 -2
- package/bundle/chunk-fv5mrdyc.js +5 -0
- package/bundle/{chunk-gdew7bwm.js → chunk-fveaq0pb.js} +1 -1
- package/bundle/{chunk-ptwex14s.js → chunk-fw1f47de.js} +1 -1
- package/bundle/{chunk-y2t5pmqw.js → chunk-g26redah.js} +1 -1
- package/bundle/{chunk-acd72413.js → chunk-g3n465ee.js} +1 -1
- package/bundle/{chunk-hfefq104.js → chunk-g4tyaj0m.js} +1 -1
- package/bundle/{chunk-a610qd3x.js → chunk-g6y2c5az.js} +1 -1
- package/bundle/{chunk-tezrgfc6.js → chunk-g7v6sp3c.js} +2 -2
- package/bundle/{chunk-4bewbvvr.js → chunk-g878zd6e.js} +1 -1
- package/bundle/{chunk-na1wr2qf.js → chunk-g9nwqwqp.js} +1 -1
- package/bundle/chunk-gbvm6dpv.js +2 -0
- package/bundle/{chunk-xcxqt8ag.js → chunk-ggncq8w8.js} +1 -1
- package/bundle/chunk-gkbx6edf.js +2 -0
- package/bundle/{chunk-skxg3s8z.js → chunk-gq9hb2e8.js} +1 -1
- package/bundle/{chunk-gwrnxcdn.js → chunk-gsg6zn7e.js} +1 -1
- package/bundle/{chunk-v3nmnm57.js → chunk-gswhjd1h.js} +2 -2
- package/bundle/{chunk-4jpab7ag.js → chunk-gznt3dv8.js} +1 -1
- package/bundle/{chunk-defj5zs6.js → chunk-h1bvqstw.js} +1 -1
- package/bundle/chunk-h5w91zr4.js +2 -0
- package/bundle/{chunk-qp3hxqg5.js → chunk-h8mfbbjh.js} +1 -1
- package/bundle/chunk-hmpb3c21.js +2 -0
- package/bundle/chunk-hq7s4f75.js +2 -0
- package/bundle/{chunk-6gqs1k7m.js → chunk-hz02vrqs.js} +1 -1
- package/bundle/{chunk-3xdmxm5t.js → chunk-j10a984e.js} +1 -1
- package/bundle/chunk-j1h64m65.js +2 -0
- package/bundle/chunk-j32rr7rt.js +2 -0
- package/bundle/chunk-j871xzr7.js +2 -0
- package/bundle/{chunk-kfj37631.js → chunk-jmmtcr2r.js} +1 -1
- package/bundle/{chunk-h7658zxy.js → chunk-jpn9zfj5.js} +1 -1
- package/bundle/{chunk-wgt1tqw9.js → chunk-jqj1ay7x.js} +1 -1
- package/bundle/{chunk-e4g4mvak.js → chunk-jr80q31w.js} +1 -1
- package/bundle/{chunk-9a6p1gdn.js → chunk-k1qd8ecm.js} +7 -7
- package/bundle/{chunk-8jvfqh3b.js → chunk-k3m7jfdh.js} +1 -1
- package/bundle/{chunk-gbxf6e5d.js → chunk-k6981ysw.js} +3 -3
- package/bundle/{chunk-k6zwfstj.js → chunk-kckr30tf.js} +1 -1
- package/bundle/{chunk-8rfqv5he.js → chunk-kgv68cpb.js} +1 -1
- package/bundle/{chunk-55way0em.js → chunk-kveztc6k.js} +1 -1
- package/bundle/chunk-kx88qekb.js +2 -0
- package/bundle/chunk-m4g4djss.js +2 -0
- package/bundle/{chunk-nbckdba0.js → chunk-m4r8sepw.js} +1 -1
- package/bundle/{chunk-6ychs4wx.js → chunk-m7tmgvh6.js} +1 -1
- package/bundle/{chunk-npzx3yd5.js → chunk-maa21rh9.js} +1 -1
- package/bundle/{chunk-egkhynj5.js → chunk-makegrxs.js} +1 -1
- package/bundle/{chunk-438faz6b.js → chunk-mr17tppa.js} +1 -1
- package/bundle/{chunk-4ngmjk8j.js → chunk-mrq35ftw.js} +1 -1
- package/bundle/{chunk-9aafddkw.js → chunk-mt2by7rx.js} +1 -1
- package/bundle/{chunk-yzpc5kj2.js → chunk-mv7q6ach.js} +1 -1
- package/bundle/chunk-mwkms65j.js +3 -0
- package/bundle/chunk-n61e0znt.js +2 -0
- package/bundle/{chunk-kry4vcrf.js → chunk-n6tqtk6h.js} +2 -2
- package/bundle/{chunk-k3g28tbw.js → chunk-nas631g2.js} +1 -1
- package/bundle/chunk-ndd4cn3z.js +2 -0
- package/bundle/{chunk-dd4qnh8s.js → chunk-nsp1za8t.js} +1 -1
- package/bundle/chunk-nsw5x43k.js +2 -0
- package/bundle/{chunk-bk7f59fn.js → chunk-ntr0ezf2.js} +1 -1
- package/bundle/{chunk-cth373se.js → chunk-p2fte9vz.js} +2 -2
- package/bundle/chunk-p5b5ekhh.js +2 -0
- package/bundle/chunk-pf23nw4z.js +2 -0
- package/bundle/{chunk-whw18cn9.js → chunk-phf37x1c.js} +1 -1
- package/bundle/{chunk-r73e8gsp.js → chunk-phpxxd48.js} +1 -1
- package/bundle/{chunk-1ay97v74.js → chunk-pqg1wjb5.js} +1 -1
- package/bundle/chunk-pw3cv89g.js +2 -0
- package/bundle/{chunk-0am156m5.js → chunk-qbnt4ynd.js} +1 -1
- package/bundle/{chunk-mjrqhbp2.js → chunk-qgek59e6.js} +1 -1
- package/bundle/{chunk-v9w88wpy.js → chunk-qgkb6n8k.js} +1 -1
- package/bundle/{chunk-2c41dncf.js → chunk-qk1jkc0n.js} +1 -1
- package/bundle/{chunk-wb1d3mqw.js → chunk-qk5vy2pr.js} +1 -1
- package/bundle/{chunk-r4kg0z96.js → chunk-qsme16gk.js} +1 -1
- package/bundle/{chunk-d1tb1jd0.js → chunk-qwmae3vk.js} +1 -1
- package/bundle/chunk-rdk62809.js +2 -0
- package/bundle/{chunk-5r05d901.js → chunk-rdreeyv0.js} +2 -2
- package/bundle/chunk-rew6r516.js +2 -0
- package/bundle/{chunk-0bgssfvq.js → chunk-rjcz4kbm.js} +1 -1
- package/bundle/chunk-rmsqb6r4.js +10 -0
- package/bundle/{chunk-qph2c2v7.js → chunk-rva2ekrt.js} +1 -1
- package/bundle/{chunk-7z96r2px.js → chunk-rwnwjm82.js} +1 -1
- package/bundle/{chunk-ts2k13g0.js → chunk-rwwvy89t.js} +1 -1
- package/bundle/{chunk-tz3s8dvy.js → chunk-rye1yjnr.js} +1 -1
- package/bundle/{chunk-t9qyzzsz.js → chunk-ryrxgn6d.js} +1 -1
- package/bundle/{chunk-wjz42325.js → chunk-s2tc3qs0.js} +2 -2
- package/bundle/{chunk-p847g35y.js → chunk-s5aefff0.js} +1 -1
- package/bundle/{chunk-msh249db.js → chunk-sa0rrreh.js} +2 -2
- package/bundle/{chunk-dbpkq7ba.js → chunk-sbjymf20.js} +2 -2
- package/bundle/{chunk-n5p7cn4w.js → chunk-scnbt714.js} +1 -1
- package/bundle/chunk-skgr9ypq.js +2 -0
- package/bundle/{chunk-rhrcgvb8.js → chunk-sm1g81cv.js} +1 -1
- package/bundle/chunk-sv40pwe2.js +2 -0
- package/bundle/{chunk-qprbef09.js → chunk-sy9w1t2y.js} +1 -1
- package/bundle/{chunk-bd84t3fb.js → chunk-sz0favtz.js} +1 -1
- package/bundle/{chunk-xb3sxa6f.js → chunk-t18ka1e7.js} +1 -1
- package/bundle/{chunk-va2qfh0x.js → chunk-t3w43rft.js} +1 -1
- package/bundle/{chunk-n9twhc5d.js → chunk-t6zz47zk.js} +1 -1
- package/bundle/{chunk-wd8hbven.js → chunk-t8fjgkp8.js} +1 -1
- package/bundle/chunk-tax3ecy5.js +2 -0
- package/bundle/{chunk-6r48fje7.js → chunk-tbx741en.js} +1 -1
- package/bundle/chunk-tfhpjmny.js +2 -0
- package/bundle/{chunk-2cjfezfr.js → chunk-tk4z6r09.js} +1 -1
- package/bundle/chunk-tnete6ye.js +2 -0
- package/bundle/{chunk-2y87m7pe.js → chunk-tpyq7ycb.js} +1 -1
- package/bundle/chunk-tr0rm1ka.js +2 -0
- package/bundle/{chunk-nftbj8g9.js → chunk-trstb8ee.js} +1 -1
- package/bundle/{chunk-77h8tytk.js → chunk-ty14zznd.js} +1 -1
- package/bundle/chunk-v5h5wxw5.js +2 -0
- package/bundle/chunk-v6141yq1.js +2 -0
- package/bundle/{chunk-vjn54xj5.js → chunk-vbfej8ds.js} +2 -2
- package/bundle/{chunk-5nhwqg7c.js → chunk-vd8cmdpv.js} +1 -1
- package/bundle/{chunk-76h0f86f.js → chunk-vgt3artc.js} +1 -1
- package/bundle/chunk-vjs69r6x.js +2 -0
- package/bundle/{chunk-yy7r3t3w.js → chunk-vkkz40je.js} +1 -1
- package/bundle/chunk-vmhar83s.js +2 -0
- package/bundle/{chunk-zp5sr5nx.js → chunk-vph4w4yy.js} +1 -1
- package/bundle/chunk-vpjyk76v.js +2 -0
- package/bundle/chunk-vqvnw12p.js +2 -0
- package/bundle/{chunk-0g0jpw0z.js → chunk-vr8nwzp0.js} +1 -1
- package/bundle/{chunk-nrk29616.js → chunk-vs3s49jw.js} +1 -1
- package/bundle/{chunk-v0c3k797.js → chunk-vsqvnxbz.js} +1 -1
- package/bundle/{chunk-rqedtjz9.js → chunk-w0nc0gcx.js} +1 -1
- package/bundle/chunk-w0sztk4y.js +2 -0
- package/bundle/chunk-w6bb320d.js +2 -0
- package/bundle/{chunk-t8sy5sgx.js → chunk-w7a33cwa.js} +2 -2
- package/bundle/{chunk-agqss9ga.js → chunk-wb47k8ah.js} +2 -2
- package/bundle/{chunk-rfzra502.js → chunk-wd8f9r4k.js} +1 -1
- package/bundle/{chunk-hwsqqkrv.js → chunk-wgkcyqn1.js} +2 -2
- package/bundle/{chunk-dy2k5rdx.js → chunk-wm9nh9nb.js} +2 -2
- package/bundle/{chunk-6nxebcf8.js → chunk-wn63q3xp.js} +1 -1
- package/bundle/{chunk-z6kcnpsj.js → chunk-wqk1v8t0.js} +2 -2
- package/bundle/chunk-wqw6yjrg.js +2 -0
- package/bundle/{chunk-q3pt4p9f.js → chunk-wr6rnxr5.js} +1 -1
- package/bundle/chunk-ws08rxge.js +2 -0
- package/bundle/{chunk-dw7yrk1g.js → chunk-wtt5wms9.js} +1 -1
- package/bundle/{chunk-93pmbdz7.js → chunk-wtxh5m6j.js} +6 -6
- package/bundle/{chunk-q6mcnq9p.js → chunk-wwvek9zf.js} +1 -1
- package/bundle/chunk-wz3dvc3g.js +2 -0
- package/bundle/chunk-x2pmqvdc.js +2 -0
- package/bundle/chunk-x4wfq39v.js +2 -0
- package/bundle/chunk-x7a3kqe5.js +2 -0
- package/bundle/chunk-xb22grz6.js +2 -0
- package/bundle/{chunk-3623jvcm.js → chunk-xy8arehp.js} +1 -1
- package/bundle/{chunk-16srrzjr.js → chunk-y31f8k5f.js} +1 -1
- package/bundle/chunk-y3eeva80.js +2 -0
- package/bundle/{chunk-mhxyv9c8.js → chunk-y3gy62q5.js} +1 -1
- package/bundle/chunk-yb6m08zj.js +2 -0
- package/bundle/{chunk-b79z8f94.js → chunk-ybcqkgs7.js} +1 -1
- package/bundle/{chunk-95am490c.js → chunk-ydgst3h8.js} +2 -2
- package/bundle/{chunk-twfvrafb.js → chunk-ykpj10nz.js} +1 -1
- package/bundle/{chunk-e0zb6sw6.js → chunk-ynf17943.js} +1 -1
- package/bundle/{chunk-01e3v1xz.js → chunk-z0kbyr00.js} +2 -2
- package/bundle/{chunk-4vzjdmts.js → chunk-zfrftgcy.js} +1 -1
- package/bundle/chunk-zj1jc1xt.js +2 -0
- package/bundle/{chunk-9sv53kb4.js → chunk-zm0m0504.js} +1 -1
- package/bundle/chunk-zq32jhj1.js +2 -0
- package/bundle/{chunk-gdj7mqrd.js → chunk-zqdjk4rf.js} +1 -1
- package/bundle/{chunk-7x2q1w0f.js → chunk-zsg29gba.js} +1 -1
- package/bundle/{chunk-1c0yp2gv.js → chunk-zwhmg9dj.js} +1 -1
- package/bundle/chunk-zxwjxszn.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-0dzpjk7x.js +0 -2
- package/bundle/chunk-12fwmmcp.js +0 -2
- package/bundle/chunk-1a95ysv3.js +0 -2
- package/bundle/chunk-1akh8pk2.js +0 -2
- package/bundle/chunk-2d2a92kj.js +0 -2
- package/bundle/chunk-2qrvkef8.js +0 -2
- package/bundle/chunk-2tppw8j9.js +0 -2
- package/bundle/chunk-3ft1dn9j.js +0 -2
- package/bundle/chunk-3rgct4bd.js +0 -11
- package/bundle/chunk-4656qm05.js +0 -2
- package/bundle/chunk-46knch5z.js +0 -2
- package/bundle/chunk-4sgy87h5.js +0 -2
- package/bundle/chunk-54hktc8h.js +0 -2
- package/bundle/chunk-59m55866.js +0 -2
- package/bundle/chunk-5js5nw7r.js +0 -2
- package/bundle/chunk-61jn7908.js +0 -2
- package/bundle/chunk-61txdqz1.js +0 -2
- package/bundle/chunk-668g9wkg.js +0 -2
- package/bundle/chunk-6frhjpmt.js +0 -2
- package/bundle/chunk-6k14c8x1.js +0 -5
- package/bundle/chunk-6r1jpj0h.js +0 -2
- package/bundle/chunk-73fn4dqd.js +0 -2
- package/bundle/chunk-78j2c2je.js +0 -2
- package/bundle/chunk-78jt24ht.js +0 -2
- package/bundle/chunk-7j2vpavd.js +0 -2
- package/bundle/chunk-7nkxgm72.js +0 -2
- package/bundle/chunk-859pkecc.js +0 -2
- package/bundle/chunk-8p249svd.js +0 -2
- package/bundle/chunk-8rqbx4jw.js +0 -2
- package/bundle/chunk-8s3krfsm.js +0 -2
- package/bundle/chunk-9wbe0dkx.js +0 -2
- package/bundle/chunk-aj5z8qd5.js +0 -2
- package/bundle/chunk-b0c2mvc0.js +0 -2
- package/bundle/chunk-bbwcsdy9.js +0 -2
- package/bundle/chunk-bbzjdbb9.js +0 -2
- package/bundle/chunk-bh4s1yct.js +0 -2
- package/bundle/chunk-crqcppwq.js +0 -2
- package/bundle/chunk-d09zpgj1.js +0 -2
- package/bundle/chunk-dexcptaz.js +0 -3
- package/bundle/chunk-dgqkak21.js +0 -2
- package/bundle/chunk-dhgvh7c3.js +0 -2
- package/bundle/chunk-dmd101ja.js +0 -2
- package/bundle/chunk-dwb39jdf.js +0 -2
- package/bundle/chunk-dx4zxex7.js +0 -2
- package/bundle/chunk-e2pqvscp.js +0 -2
- package/bundle/chunk-efe6kj3d.js +0 -2
- package/bundle/chunk-emac0dss.js +0 -2
- package/bundle/chunk-encfnt6w.js +0 -2
- package/bundle/chunk-fg2nyz2x.js +0 -2
- package/bundle/chunk-ge19ff9d.js +0 -2
- package/bundle/chunk-gt0q07xq.js +0 -2
- package/bundle/chunk-h4dnjfr2.js +0 -2
- package/bundle/chunk-h8fx619t.js +0 -2
- package/bundle/chunk-jnvb3s7f.js +0 -2
- package/bundle/chunk-jrq2xw6e.js +0 -2
- package/bundle/chunk-jwckmhjm.js +0 -2
- package/bundle/chunk-jz27ypm5.js +0 -2
- package/bundle/chunk-jzrs878d.js +0 -2
- package/bundle/chunk-jzx700tb.js +0 -2
- package/bundle/chunk-k1x8469r.js +0 -3
- package/bundle/chunk-m483jvn8.js +0 -2
- package/bundle/chunk-makecdh6.js +0 -8
- package/bundle/chunk-menbcmkq.js +0 -2
- package/bundle/chunk-np8h66t0.js +0 -2
- package/bundle/chunk-nwwmns3w.js +0 -2
- package/bundle/chunk-pe5dpzec.js +0 -2
- package/bundle/chunk-q8f6a074.js +0 -2
- package/bundle/chunk-qqaevt32.js +0 -2
- package/bundle/chunk-qzpvz708.js +0 -2
- package/bundle/chunk-reyjr2e0.js +0 -2
- package/bundle/chunk-t178njgb.js +0 -2
- package/bundle/chunk-tjpev5t6.js +0 -2
- package/bundle/chunk-tzq7wjgv.js +0 -3
- package/bundle/chunk-v1s16wwd.js +0 -2
- package/bundle/chunk-v6b29nx4.js +0 -2
- package/bundle/chunk-v6rgd1j5.js +0 -2
- package/bundle/chunk-v9dnetq8.js +0 -2
- package/bundle/chunk-vd5mpvcc.js +0 -2
- package/bundle/chunk-wwct4z7j.js +0 -2
- package/bundle/chunk-xr9wz961.js +0 -2
- package/bundle/chunk-zfegnt1e.js +0 -2
- package/bundle/chunk-zg7kesbp.js +0 -2
- package/bundle/chunk-zy06fe4r.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ne as w}from"./chunk-9xxnwb33.js";import{Oe as oe}from"./chunk-qdvnscxm.js";import{If as l}from"./chunk-yxttz5z5.js";import{SP as i,WP as f}from"./chunk-f2pv705d.js";var g=i(l(),1);var ce=i(l(),1);var O=i(w(),1),S=i(l(),1);var q=i(w(),1),b=i(l(),1),j=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-efe6kj3d.js"),{fromContainerMetadata:c}=await import("./chunk-2y87m7pe.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>b.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-2y87m7pe.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-bbzjdbb9.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new b.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>q.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var G=(e,{profile:s="default",logger:t}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(re(e,{profile:s,logger:t})||ae(e,{profile:s,logger:t}))},re=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ae=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},J=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:o}=await import("./chunk-h7658zxy.js");t.roleAssumer=o({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new S.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${S.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},U(s[h]??{})):(await j(c.credential_source,e,t.logger)(t))();if(U(c))return T.then((o)=>O.setCredentialFeature(o,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let o={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new S.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});o.SerialNumber=u,o.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,o).then((k)=>O.setCredentialFeature(k,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},U=(e)=>{return!e.role_arn&&!!e.credential_source};var z=i(w(),1);var Y=i(w(),1),x=i(l(),1);var d=i(l(),1),v=i(oe(),1);import{createHash as ie,createPrivateKey as he,createPublicKey as ye,sign as ue}from"crypto";import{promises as R}from"fs";import{homedir as de}from"os";import{dirname as we,join as N}from"path";class K{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new d.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=K.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-dw7yrk1g.js"),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((o)=>{return o?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let o=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:k}=o.tokenOutput?.accessToken??{},{refreshToken:E,expiresIn:B}=o.tokenOutput??{};if(!u||!y||!k||!E)throw new d.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(B??900)*1000,m=new Date(Date.now()+A),H={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:k,expiresAt:m.toISOString()},refreshToken:E};await this.saveToken(H);let _=H.accessToken;return{accessKeyId:_.accessKeyId,secretAccessKey:_.secretAccessKey,sessionToken:_.sessionToken,accountId:_.accountId,expiration:m}}catch(o){if(o.name==="AccessDeniedException"){let u=o.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(o)}. Please re-authenticate using \`aws login\``}throw new d.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new d.CredentialsProviderError(`Failed to refresh token: ${String(o)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await d.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await R.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new d.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new d.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=we(s);try{await R.mkdir(t,{recursive:!0})}catch(n){}await R.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??N(de(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=ie("sha256").update(s).digest("hex");return N(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(v.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=he({key:t.dpopKey,format:"pem",type:"sec1"}),a=ye(n).export({format:"der",type:"spki"}),c=-1;for(let m=0;m<a.length;m++)if(a[m]===4){c=m;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},o={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(o)).toString("base64url"),k=`${u}.${y}`,E=ue("sha256",Buffer.from(k),n),A=this.derToRawSignature(E).toString("base64url");return`${k}.${A}`}catch(n){throw new d.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var W=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await x.parseKnownFiles(e||{}),n=x.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new x.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new K(r,e,s).loadCredentials();return Y.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var C=(e)=>{return Boolean(e&&e.login_session)},X=async(e,s,t)=>{let n=await W({...s,profile:e})({callerClientConfig:t});return z.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var Q=i(w(),1),V=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",Z=async(e,s)=>import("./chunk-bbwcsdy9.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>Q.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var D=i(w(),1),M=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-m483jvn8.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},p=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var ee=i(w(),1),$=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,P=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ee.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var te=i(w(),1),se=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,ne=async(e,s,t)=>import("./chunk-dmd101ja.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>te.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var F=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&$(c))return P(c,t);if(a||G(c,{profile:e,logger:t.logger}))return J(e,s,t,n,r,F);if($(c))return P(c,t);if(se(c))return ne(c,t,n);if(V(c))return Z(t,e);if(p(c))return await M(e,c,t,n);if(C(c))return X(e,t,n);throw new ce.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var je=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return F(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{W as he,je as ie};
|
|
2
|
+
import{Ne as w}from"./chunk-ejhhrece.js";import{Oe as oe}from"./chunk-0a4pmkc9.js";import{If as l}from"./chunk-35fj1sfm.js";import{tO as i,xO as f}from"./chunk-e0vrxetq.js";var g=i(l(),1);var ce=i(l(),1);var O=i(w(),1),S=i(l(),1);var q=i(w(),1),b=i(l(),1),j=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-90r2z49k.js"),{fromContainerMetadata:c}=await import("./chunk-tpyq7ycb.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>b.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-tpyq7ycb.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-0aqdzyar.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new b.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>q.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var G=(e,{profile:s="default",logger:t}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(re(e,{profile:s,logger:t})||ae(e,{profile:s,logger:t}))},re=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ae=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},J=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:o}=await import("./chunk-jpn9zfj5.js");t.roleAssumer=o({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new S.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${S.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},U(s[h]??{})):(await j(c.credential_source,e,t.logger)(t))();if(U(c))return T.then((o)=>O.setCredentialFeature(o,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let o={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new S.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});o.SerialNumber=u,o.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,o).then((k)=>O.setCredentialFeature(k,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},U=(e)=>{return!e.role_arn&&!!e.credential_source};var z=i(w(),1);var Y=i(w(),1),x=i(l(),1);var d=i(l(),1),v=i(oe(),1);import{createHash as ie,createPrivateKey as he,createPublicKey as ye,sign as ue}from"crypto";import{promises as R}from"fs";import{homedir as de}from"os";import{dirname as we,join as N}from"path";class K{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new d.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=K.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-wtt5wms9.js"),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((o)=>{return o?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let o=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:k}=o.tokenOutput?.accessToken??{},{refreshToken:E,expiresIn:B}=o.tokenOutput??{};if(!u||!y||!k||!E)throw new d.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(B??900)*1000,m=new Date(Date.now()+A),H={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:k,expiresAt:m.toISOString()},refreshToken:E};await this.saveToken(H);let _=H.accessToken;return{accessKeyId:_.accessKeyId,secretAccessKey:_.secretAccessKey,sessionToken:_.sessionToken,accountId:_.accountId,expiration:m}}catch(o){if(o.name==="AccessDeniedException"){let u=o.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(o)}. Please re-authenticate using \`aws login\``}throw new d.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new d.CredentialsProviderError(`Failed to refresh token: ${String(o)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await d.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await R.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new d.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new d.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=we(s);try{await R.mkdir(t,{recursive:!0})}catch(n){}await R.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??N(de(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=ie("sha256").update(s).digest("hex");return N(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(v.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=he({key:t.dpopKey,format:"pem",type:"sec1"}),a=ye(n).export({format:"der",type:"spki"}),c=-1;for(let m=0;m<a.length;m++)if(a[m]===4){c=m;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},o={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(o)).toString("base64url"),k=`${u}.${y}`,E=ue("sha256",Buffer.from(k),n),A=this.derToRawSignature(E).toString("base64url");return`${k}.${A}`}catch(n){throw new d.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var W=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await x.parseKnownFiles(e||{}),n=x.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new x.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new K(r,e,s).loadCredentials();return Y.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var C=(e)=>{return Boolean(e&&e.login_session)},X=async(e,s,t)=>{let n=await W({...s,profile:e})({callerClientConfig:t});return z.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var Q=i(w(),1),V=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",Z=async(e,s)=>import("./chunk-ce5e7j62.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>Q.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var D=i(w(),1),M=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-wqw6yjrg.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},p=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var ee=i(w(),1),$=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,P=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ee.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var te=i(w(),1),se=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,ne=async(e,s,t)=>import("./chunk-v6141yq1.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>te.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var F=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&$(c))return P(c,t);if(a||G(c,{profile:e,logger:t.logger}))return J(e,s,t,n,r,F);if($(c))return P(c,t);if(se(c))return ne(c,t,n);if(V(c))return Z(t,e);if(p(c))return await M(e,c,t,n);if(C(c))return X(e,t,n);throw new ce.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var je=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return F(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{W as he,je as ie};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{R as
|
|
2
|
+
import{uO as Z,xO as W}from"./chunk-e0vrxetq.js";var R=Z(($G,E)=>{var{defineProperty:N,getOwnPropertyDescriptor:Kz,getOwnPropertyNames:Qz}=Object,Wz=Object.prototype.hasOwnProperty,Xz=(z,G)=>{for(var H in G)N(z,H,{get:G[H],enumerable:!0})},Yz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Qz(G))if(!Wz.call(z,K)&&K!==H)N(z,K,{get:()=>G[K],enumerable:!(Q=Kz(G,K))||Q.enumerable})}return z},Zz=(z)=>Yz(N({},"__esModule",{value:!0}),z),O={};Xz(O,{VercelOidcTokenError:()=>S});E.exports=Zz(O);class S extends Error{constructor(z,G){super(z);this.name="VercelOidcTokenError",this.cause=G}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var P=Z((qG,y)=>{var{create:$z,defineProperty:L,getOwnPropertyDescriptor:qz,getOwnPropertyNames:vz,getPrototypeOf:Bz}=Object,Fz=Object.prototype.hasOwnProperty,Uz=(z,G)=>{for(var H in G)L(z,H,{get:G[H],enumerable:!0})},C=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of vz(G))if(!Fz.call(z,K)&&K!==H)L(z,K,{get:()=>G[K],enumerable:!(Q=qz(G,K))||Q.enumerable})}return z},I=(z,G,H)=>(H=z!=null?$z(Bz(z)):{},C(G||!z||!z.__esModule?L(H,"default",{value:z,enumerable:!0}):H,z)),Lz=(z)=>C(L({},"__esModule",{value:!0}),z),x={};Uz(x,{findRootDir:()=>Jz,getUserDataDir:()=>Nz});y.exports=Lz(x);var B=I(W("path")),bz=I(W("fs")),A=I(W("os")),Vz=R();function Jz(){try{let z=process.cwd();while(z!==B.default.dirname(z)){let G=B.default.join(z,".vercel");if(bz.default.existsSync(G))return z;z=B.default.dirname(z)}}catch(z){throw new Vz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function Nz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(A.default.platform()){case"darwin":return B.default.join(A.default.homedir(),"Library/Application Support");case"linux":return B.default.join(A.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var i=Z((vG,c)=>{var{create:Rz,defineProperty:b,getOwnPropertyDescriptor:Az,getOwnPropertyNames:Iz,getPrototypeOf:Dz}=Object,wz=Object.prototype.hasOwnProperty,Tz=(z,G)=>{for(var H in G)b(z,H,{get:G[H],enumerable:!0})},u=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Iz(G))if(!wz.call(z,K)&&K!==H)b(z,K,{get:()=>G[K],enumerable:!(Q=Az(G,K))||Q.enumerable})}return z},l=(z,G,H)=>(H=z!=null?Rz(Dz(z)):{},u(G||!z||!z.__esModule?b(H,"default",{value:z,enumerable:!0}):H,z)),jz=(z)=>u(b({},"__esModule",{value:!0}),z),g={};Tz(g,{isValidAccessToken:()=>Ez,readAuthConfig:()=>Oz,writeAuthConfig:()=>Sz});c.exports=jz(g);var F=l(W("fs")),h=l(W("path")),Mz=f();function k(){let z=(0,Mz.getVercelDataDir)();if(!z)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return h.join(z,"auth.json")}function Oz(){try{let z=k();if(!F.existsSync(z))return null;let G=F.readFileSync(z,"utf8");if(!G)return null;return JSON.parse(G)}catch(z){return null}}function Sz(z){let G=k(),H=h.dirname(G);if(!F.existsSync(H))F.mkdirSync(H,{mode:504,recursive:!0});F.writeFileSync(G,JSON.stringify(z,null,2),{mode:384})}function Ez(z,G=0){if(!z.token)return!1;if(typeof z.expiresAt!=="number")return!0;let H=Math.floor(Date.now()/1000),Q=G/1000;return z.expiresAt>=H+Q}});var a=Z((BG,s)=>{var{defineProperty:T,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:xz}=Object,yz=Object.prototype.hasOwnProperty,Pz=(z,G)=>{for(var H in G)T(z,H,{get:G[H],enumerable:!0})},uz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of xz(G))if(!yz.call(z,K)&&K!==H)T(z,K,{get:()=>G[K],enumerable:!(Q=Cz(G,K))||Q.enumerable})}return z},lz=(z)=>uz(T({},"__esModule",{value:!0}),z),d={};Pz(d,{processTokenResponse:()=>iz,refreshTokenRequest:()=>cz});s.exports=lz(d);var D=W("os"),gz="https://vercel.com",hz="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",p=`@vercel/oidc node-${process.version} ${(0,D.platform)()} (${(0,D.arch)()}) ${(0,D.hostname)()}`,w=null;async function kz(){if(w)return w;let z=`${gz}/.well-known/openid-configuration`,G=await fetch(z,{headers:{"user-agent":p}});if(!G.ok)throw Error("Failed to discover OAuth endpoints");let H=await G.json();if(!H||typeof H.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let Q=H.token_endpoint;return w=Q,Q}async function cz(z){let G=await kz();return await fetch(G,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":p},body:new URLSearchParams({client_id:hz,grant_type:"refresh_token",...z})})}async function iz(z){let G=await z.json();if(!z.ok){let H=typeof G==="object"&&G&&"error"in G?String(G.error):"Token refresh failed";return[Error(H)]}if(typeof G!=="object"||G===null)return[Error("Invalid token response")];if(typeof G.access_token!=="string")return[Error("Missing access_token in response")];if(G.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof G.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,G]}});var t=Z((FG,r)=>{var{defineProperty:j,getOwnPropertyDescriptor:fz,getOwnPropertyNames:dz}=Object,pz=Object.prototype.hasOwnProperty,sz=(z,G)=>{for(var H in G)j(z,H,{get:G[H],enumerable:!0})},az=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of dz(G))if(!pz.call(z,K)&&K!==H)j(z,K,{get:()=>G[K],enumerable:!(Q=fz(G,K))||Q.enumerable})}return z},_z=(z)=>az(j({},"__esModule",{value:!0}),z),_={};sz(_,{AccessTokenMissingError:()=>m,RefreshAccessTokenFailedError:()=>n});r.exports=_z(_);class m extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class n extends Error{constructor(z){super("Failed to refresh authentication token.",{cause:z});this.name="RefreshAccessTokenFailedError"}}});var f=Z((UG,Hz)=>{var{create:mz,defineProperty:V,getOwnPropertyDescriptor:nz,getOwnPropertyNames:rz,getPrototypeOf:tz}=Object,ez=Object.prototype.hasOwnProperty,oz=(z,G)=>{for(var H in G)V(z,H,{get:G[H],enumerable:!0})},o=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of rz(G))if(!ez.call(z,K)&&K!==H)V(z,K,{get:()=>G[K],enumerable:!(Q=nz(G,K))||Q.enumerable})}return z},zz=(z,G,H)=>(H=z!=null?mz(tz(z)):{},o(G||!z||!z.__esModule?V(H,"default",{value:z,enumerable:!0}):H,z)),zG=(z)=>o(V({},"__esModule",{value:!0}),z),Gz={};oz(Gz,{assertVercelOidcTokenResponse:()=>M,findProjectInfo:()=>QG,getTokenPayload:()=>YG,getVercelDataDir:()=>GG,getVercelOidcToken:()=>KG,getVercelToken:()=>HG,isExpired:()=>ZG,loadToken:()=>XG,saveToken:()=>WG});Hz.exports=zG(Gz);var U=zz(W("path")),X=zz(W("fs")),v=R(),J=P(),$=i(),e=a(),q=t();function GG(){let G=(0,J.getUserDataDir)();if(!G)return null;return U.join(G,"com.vercel.cli")}async function HG(z){let G=(0,$.readAuthConfig)();if(!G?.token)throw new q.AccessTokenMissingError;if((0,$.isValidAccessToken)(G,z?.expirationBufferMs))return G.token;if(!G.refreshToken)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError("No refresh token available");try{let H=await(0,e.refreshTokenRequest)({refresh_token:G.refreshToken}),[Q,K]=await(0,e.processTokenResponse)(H);if(Q||!K)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError(Q);let Y={token:K.access_token,expiresAt:Math.floor(Date.now()/1000)+K.expires_in};if(K.refresh_token)Y.refreshToken=K.refresh_token;return(0,$.writeAuthConfig)(Y),Y.token}catch(H){if((0,$.writeAuthConfig)({}),H instanceof q.AccessTokenMissingError||H instanceof q.RefreshAccessTokenFailedError)throw H;throw new q.RefreshAccessTokenFailedError(H)}}async function KG(z,G,H){let Q=`https://api.vercel.com/v1/projects/${G}/token?source=vercel-oidc-refresh${H?`&teamId=${H}`:""}`,K=await fetch(Q,{method:"POST",headers:{Authorization:`Bearer ${z}`}});if(!K.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${K.statusText}`);let Y=await K.json();return M(Y),Y}function M(z){if(!z||typeof z!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in z)||typeof z.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function QG(){let z=(0,J.findRootDir)();if(!z)throw new v.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let G=U.join(z,".vercel","project.json");if(!X.existsSync(G))throw new v.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let H=JSON.parse(X.readFileSync(G,"utf8"));if(typeof H.projectId!=="string"&&typeof H.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:H.projectId,teamId:H.orgId}}function WG(z,G){let H=(0,J.getUserDataDir)();if(!H)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let Q=U.join(H,"com.vercel.token",`${G}.json`),K=JSON.stringify(z);X.mkdirSync(U.dirname(Q),{mode:504,recursive:!0}),X.writeFileSync(Q,K),X.chmodSync(Q,432);return}function XG(z){let G=(0,J.getUserDataDir)();if(!G)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let H=U.join(G,"com.vercel.token",`${z}.json`);if(!X.existsSync(H))return null;let Q=JSON.parse(X.readFileSync(H,"utf8"));return M(Q),Q}function YG(z){let G=z.split(".");if(G.length!==3)throw new v.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let H=G[1].replace(/-/g,"+").replace(/_/g,"/"),Q=H.padEnd(H.length+(4-H.length%4)%4,"=");return JSON.parse(Buffer.from(Q,"base64").toString("utf8"))}function ZG(z,G=0){return z.exp*1000<Date.now()+G}});
|
|
3
|
+
export{R as aq,t as bq,f as cq};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{w as
|
|
2
|
+
import{Fq as z,Iq as B}from"./chunk-29q89bge.js";import{Er as D}from"./chunk-rwwvy89t.js";import{Qy as r}from"./chunk-w7a33cwa.js";import{AB as x,EE as R,fH as W}from"./chunk-g7v6sp3c.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
|
|
3
|
+
export{w as wq,C as xq,y as yq,U as zq,H as Aq,d as Bq,F as Cq};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{uf as j}from"./chunk-
|
|
2
|
+
import{uf as j}from"./chunk-fs1vb39f.js";import{Mf as w,Nf as D}from"./chunk-d839fr0w.js";import{Ap as Z,Hp as $,gp as Q}from"./chunk-wm9nh9nb.js";import{Tp as P}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import{tO as G}from"./chunk-e0vrxetq.js";var y=G(j(),1);var K=null,Y=null;function E(f){if(!K||f!==Y)K=new y.GoogleAuth({scopes:["https://www.googleapis.com/auth/cloud-platform"],...f}),Y=f;return K}async function N(f){let q=await(await E(f||{}).getClient()).getAccessToken();return(q==null?void 0:q.token)||null}var b={bash_20241022:D.bash_20241022,bash_20250124:D.bash_20250124,textEditor_20241022:D.textEditor_20241022,textEditor_20250124:D.textEditor_20250124,textEditor_20250429:D.textEditor_20250429,textEditor_20250728:D.textEditor_20250728,computer_20241022:D.computer_20241022,webSearch_20250305:D.webSearch_20250305,toolSearchRegex_20251119:D.toolSearchRegex_20251119,toolSearchBm25_20251119:D.toolSearchBm25_20251119};function V(f={}){let W=()=>{var z;let F=Q({settingValue:f.location,environmentVariableName:"GOOGLE_VERTEX_LOCATION"}),J=Q({settingValue:f.project,environmentVariableName:"GOOGLE_VERTEX_PROJECT"});return(z=$(f.baseURL))!=null?z:`https://${F==="global"?"":F+"-"}aiplatform.googleapis.com/v1/projects/${J}/locations/${F}/publishers/anthropic/models`},H=(z)=>{var F;return new w(z,{provider:"vertex.anthropic.messages",baseURL:W(),headers:(F=f.headers)!=null?F:{},fetch:f.fetch,buildRequestUrl:(J,X)=>`${J}/${z}:${X?"streamRawPredict":"rawPredict"}`,transformRequestBody:(J)=>{let{model:X,...B}=J;return{...B,anthropic_version:"vertex-2023-10-16"}},supportedUrls:()=>({}),supportsNativeStructuredOutput:!1,supportsStrictTools:!1})},q=function(z){if(new.target)throw Error("The Anthropic model function cannot be called with the new keyword.");return H(z)};return q.specificationVersion="v3",q.languageModel=H,q.chat=H,q.messages=H,q.embeddingModel=(z)=>{throw new P({modelId:z,modelType:"embeddingModel"})},q.textEmbeddingModel=q.embeddingModel,q.imageModel=(z)=>{throw new P({modelId:z,modelType:"imageModel"})},q.tools=b,q}function C(f={}){return V({...f,headers:async()=>({Authorization:`Bearer ${await N(f.googleAuthOptions)}`,...await Z(f.headers)})})}var L=C();export{L as vertexAnthropic,C as createVertexAnthropic};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{VP as K}from"./chunk-f2pv705d.js";var H,$,z,k,Z;var J=K(()=>{H={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},$={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},z={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},k={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},Z={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}});class h{static getFirstMatch(B,d){let x=d.match(B);return x&&x.length>0&&x[1]||""}static getSecondMatch(B,d){let x=d.match(B);return x&&x.length>1&&x[2]||""}static matchAndReturnConst(B,d,x){if(B.test(d))return x;return}static getWindowsVersionName(B){switch(B){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(B){let d=B.split(".").splice(0,2).map((Q)=>parseInt(Q,10)||0);d.push(0);let x=d[0],W=d[1];if(x===10)switch(W){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(x){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}}static getAndroidVersionName(B){let d=B.split(".").splice(0,2).map((x)=>parseInt(x,10)||0);if(d.push(0),d[0]===1&&d[1]<5)return;if(d[0]===1&&d[1]<6)return"Cupcake";if(d[0]===1&&d[1]>=6)return"Donut";if(d[0]===2&&d[1]<2)return"Eclair";if(d[0]===2&&d[1]===2)return"Froyo";if(d[0]===2&&d[1]>2)return"Gingerbread";if(d[0]===3)return"Honeycomb";if(d[0]===4&&d[1]<1)return"Ice Cream Sandwich";if(d[0]===4&&d[1]<4)return"Jelly Bean";if(d[0]===4&&d[1]>=4)return"KitKat";if(d[0]===5)return"Lollipop";if(d[0]===6)return"Marshmallow";if(d[0]===7)return"Nougat";if(d[0]===8)return"Oreo";if(d[0]===9)return"Pie";return}static getVersionPrecision(B){return B.split(".").length}static compareVersions(B,d,x=!1){let W=h.getVersionPrecision(B),Q=h.getVersionPrecision(d),y=Math.max(W,Q),C=0,Y=h.map([B,d],(G)=>{let E=y-h.getVersionPrecision(G),_=G+Array(E+1).join(".0");return h.map(_.split("."),(S)=>Array(20-S.length).join("0")+S).reverse()});if(x)C=y-Math.min(W,Q);y-=1;while(y>=C){if(Y[0][y]>Y[1][y])return 1;if(Y[0][y]===Y[1][y]){if(y===C)return 0;y-=1}else if(Y[0][y]<Y[1][y])return-1}return}static map(B,d){let x=[],W;if(Array.prototype.map)return Array.prototype.map.call(B,d);for(W=0;W<B.length;W+=1)x.push(d(B[W]));return x}static find(B,d){let x,W;if(Array.prototype.find)return Array.prototype.find.call(B,d);for(x=0,W=B.length;x<W;x+=1){let Q=B[x];if(d(Q,x))return Q}return}static assign(B,...d){let x=B,W,Q;if(Object.assign)return Object.assign(B,...d);for(W=0,Q=d.length;W<Q;W+=1){let y=d[W];if(typeof y==="object"&&y!==null)Object.keys(y).forEach((Y)=>{x[Y]=y[Y]})}return B}static getBrowserAlias(B){return H[B]}static getBrowserTypeByAlias(B){return $[B]||""}}var X=K(()=>{J()});var q,L,c;var j=K(()=>{X();q=/version\/(\d+(\.?_?\d+)+)/i,L=[{test:[/gptbot/i],describe(B){let d={name:"GPTBot"},x=h.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/chatgpt-user/i],describe(B){let d={name:"ChatGPT-User"},x=h.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/oai-searchbot/i],describe(B){let d={name:"OAI-SearchBot"},x=h.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(B){let d={name:"ClaudeBot"},x=h.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/omgilibot/i,/webzio-extended/i],describe(B){let d={name:"Omgilibot"},x=h.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/diffbot/i],describe(B){let d={name:"Diffbot"},x=h.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/perplexitybot/i],describe(B){let d={name:"PerplexityBot"},x=h.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/perplexity-user/i],describe(B){let d={name:"Perplexity-User"},x=h.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/youbot/i],describe(B){let d={name:"YouBot"},x=h.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-webindexer/i],describe(B){let d={name:"Meta-WebIndexer"},x=h.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalads/i],describe(B){let d={name:"Meta-ExternalAds"},x=h.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalagent/i],describe(B){let d={name:"Meta-ExternalAgent"},x=h.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalfetcher/i],describe(B){let d={name:"Meta-ExternalFetcher"},x=h.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/googlebot/i],describe(B){let d={name:"Googlebot"},x=h.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/linespider/i],describe(B){let d={name:"Linespider"},x=h.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/amazonbot/i],describe(B){let d={name:"AmazonBot"},x=h.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/bingbot/i],describe(B){let d={name:"BingCrawler"},x=h.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/baiduspider/i],describe(B){let d={name:"BaiduSpider"},x=h.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/duckduckbot/i],describe(B){let d={name:"DuckDuckBot"},x=h.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/ia_archiver/i],describe(B){let d={name:"InternetArchiveCrawler"},x=h.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe(B){let d={name:"SlackBot"},x=h.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/yahoo!?[\s/]*slurp/i],describe(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe(){return{name:"PingdomBot"}}},{test:[/opera/i],describe(B){let d={name:"Opera"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/opr\/|opios/i],describe(B){let d={name:"Opera"},x=h.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/SamsungBrowser/i],describe(B){let d={name:"Samsung Internet for Android"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/Whale/i],describe(B){let d={name:"NAVER Whale Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/PaleMoon/i],describe(B){let d={name:"Pale Moon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/MZBrowser/i],describe(B){let d={name:"MZ Browser"},x=h.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/focus/i],describe(B){let d={name:"Focus"},x=h.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/swing/i],describe(B){let d={name:"Swing"},x=h.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/coast/i],describe(B){let d={name:"Opera Coast"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(B){let d={name:"Opera Touch"},x=h.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/yabrowser/i],describe(B){let d={name:"Yandex Browser"},x=h.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/ucbrowser/i],describe(B){let d={name:"UC Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/Maxthon|mxios/i],describe(B){let d={name:"Maxthon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/epiphany/i],describe(B){let d={name:"Epiphany"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/puffin/i],describe(B){let d={name:"Puffin"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sleipnir/i],describe(B){let d={name:"Sleipnir"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/k-meleon/i],describe(B){let d={name:"K-Meleon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/micromessenger/i],describe(B){let d={name:"WeChat"},x=h.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/qqbrowser/i],describe(B){let d={name:/qqbrowserlite/i.test(B)?"QQ Browser Lite":"QQ Browser"},x=h.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/msie|trident/i],describe(B){let d={name:"Internet Explorer"},x=h.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/\sedg\//i],describe(B){let d={name:"Microsoft Edge"},x=h.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/edg([ea]|ios)/i],describe(B){let d={name:"Microsoft Edge"},x=h.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/vivaldi/i],describe(B){let d={name:"Vivaldi"},x=h.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/seamonkey/i],describe(B){let d={name:"SeaMonkey"},x=h.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sailfish/i],describe(B){let d={name:"Sailfish"},x=h.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,B);if(x)d.version=x;return d}},{test:[/silk/i],describe(B){let d={name:"Amazon Silk"},x=h.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/phantom/i],describe(B){let d={name:"PhantomJS"},x=h.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/slimerjs/i],describe(B){let d={name:"SlimerJS"},x=h.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(B){let d={name:"BlackBerry"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/(web|hpw)[o0]s/i],describe(B){let d={name:"WebOS Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/bada/i],describe(B){let d={name:"Bada"},x=h.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/tizen/i],describe(B){let d={name:"Tizen"},x=h.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/qupzilla/i],describe(B){let d={name:"QupZilla"},x=h.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/librewolf/i],describe(B){let d={name:"LibreWolf"},x=h.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/firefox|iceweasel|fxios/i],describe(B){let d={name:"Firefox"},x=h.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/electron/i],describe(B){let d={name:"Electron"},x=h.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(B){let d={name:"Sogou Browser"},x=h.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,B),W=h.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,B),Q=h.getFirstMatch(/se ([\d.]+)x/i,B),y=x||W||Q;if(y)d.version=y;return d}},{test:[/MiuiBrowser/i],describe(B){let d={name:"Miui"},x=h.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){if(B.hasBrand("DuckDuckGo"))return!0;return B.test(/\sDdg\/[\d.]+$/i)},describe(B,d){let x={name:"DuckDuckGo"};if(d){let Q=d.getBrandVersion("DuckDuckGo");if(Q)return x.version=Q,x}let W=h.getFirstMatch(/\sDdg\/([\d.]+)$/i,B);if(W)x.version=W;return x}},{test(B){return B.hasBrand("Brave")},describe(B,d){let x={name:"Brave"};if(d){let W=d.getBrandVersion("Brave");if(W)return x.version=W,x}return x}},{test:[/chromium/i],describe(B){let d={name:"Chromium"},x=h.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/chrome|crios|crmo/i],describe(B){let d={name:"Chrome"},x=h.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/GSA/i],describe(B){let d={name:"Google Search"},x=h.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){let d=!B.test(/like android/i),x=B.test(/android/i);return d&&x},describe(B){let d={name:"Android Browser"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/playstation 4/i],describe(B){let d={name:"PlayStation 4"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/safari|applewebkit/i],describe(B){let d={name:"Safari"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/.*/i],describe(B){let d=/^(.*)\/(.*) /,x=/^(.*)\/(.*)[ \t]\((.*)/,Q=B.search("\\(")!==-1?x:d;return{name:h.getFirstMatch(Q,B),version:h.getSecondMatch(Q,B)}}}],c=L});var N;var F=K(()=>{X();J();N=[{test:[/Roku\/DVP/],describe(B){let d=h.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,B);return{name:k.Roku,version:d}}},{test:[/windows phone/i],describe(B){let d=h.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,B);return{name:k.WindowsPhone,version:d}}},{test:[/windows /i],describe(B){let d=h.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,B),x=h.getWindowsVersionName(d);return{name:k.Windows,version:d,versionName:x}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(B){let d={name:k.iOS},x=h.getSecondMatch(/(Version\/)(\d[\d.]+)/,B);if(x)d.version=x;return d}},{test:[/macintosh/i],describe(B){let d=h.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,B).replace(/[_\s]/g,"."),x=h.getMacOSVersionName(d),W={name:k.MacOS,version:d};if(x)W.versionName=x;return W}},{test:[/(ipod|iphone|ipad)/i],describe(B){let d=h.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,B).replace(/[_\s]/g,".");return{name:k.iOS,version:d}}},{test:[/OpenHarmony/i],describe(B){let d=h.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,B);return{name:k.HarmonyOS,version:d}}},{test(B){let d=!B.test(/like android/i),x=B.test(/android/i);return d&&x},describe(B){let d=h.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,B),x=h.getAndroidVersionName(d),W={name:k.Android,version:d};if(x)W.versionName=x;return W}},{test:[/(web|hpw)[o0]s/i],describe(B){let d=h.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,B),x={name:k.WebOS};if(d&&d.length)x.version=d;return x}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(B){let d=h.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,B)||h.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,B)||h.getFirstMatch(/\bbb(\d+)/i,B);return{name:k.BlackBerry,version:d}}},{test:[/bada/i],describe(B){let d=h.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,B);return{name:k.Bada,version:d}}},{test:[/tizen/i],describe(B){let d=h.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,B);return{name:k.Tizen,version:d}}},{test:[/linux/i],describe(){return{name:k.Linux}}},{test:[/CrOS/],describe(){return{name:k.ChromeOS}}},{test:[/PlayStation 4/],describe(B){let d=h.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,B);return{name:k.PlayStation4,version:d}}}]});var g;var O=K(()=>{X();J();g=[{test:[/googlebot/i],describe(){return{type:z.bot,vendor:"Google"}}},{test:[/linespider/i],describe(){return{type:z.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe(){return{type:z.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe(){return{type:z.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe(){return{type:z.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe(){return{type:z.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(){return{type:z.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe(){return{type:z.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe(){return{type:z.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe(){return{type:z.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe(){return{type:z.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe(){return{type:z.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe(){return{type:z.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe(){return{type:z.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe(){return{type:z.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{type:z.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe(){return{type:z.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe(B){let d=h.getFirstMatch(/(can-l01)/i,B)&&"Nova",x={type:z.mobile,vendor:"Huawei"};if(d)x.model=d;return x}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:z.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:z.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:z.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:z.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:z.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:z.tablet}}},{test(B){let d=B.test(/ipod|iphone/i),x=B.test(/like (ipod|iphone)/i);return d&&!x},describe(B){let d=h.getFirstMatch(/(ipod|iphone)/i,B);return{type:z.mobile,vendor:"Apple",model:d}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:z.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(B){let d=h.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,B),x={type:z.mobile,vendor:"Nokia"};if(d)x.model=d;return x}},{test:[/[^-]mobi/i],describe(){return{type:z.mobile}}},{test(B){return B.getBrowserName(!0)==="blackberry"},describe(){return{type:z.mobile,vendor:"BlackBerry"}}},{test(B){return B.getBrowserName(!0)==="bada"},describe(){return{type:z.mobile}}},{test(B){return B.getBrowserName()==="windows phone"},describe(){return{type:z.mobile,vendor:"Microsoft"}}},{test(B){let d=Number(String(B.getOSVersion()).split(".")[0]);return B.getOSName(!0)==="android"&&d>=3},describe(){return{type:z.tablet}}},{test(B){return B.getOSName(!0)==="android"},describe(){return{type:z.mobile}}},{test:[/smart-?tv|smarttv/i],describe(){return{type:z.tv}}},{test:[/netcast/i],describe(){return{type:z.tv}}},{test(B){return B.getOSName(!0)==="macos"},describe(){return{type:z.desktop,vendor:"Apple"}}},{test(B){return B.getOSName(!0)==="windows"},describe(){return{type:z.desktop}}},{test(B){return B.getOSName(!0)==="linux"},describe(){return{type:z.desktop}}},{test(B){return B.getOSName(!0)==="playstation 4"},describe(){return{type:z.tv}}},{test(B){return B.getOSName(!0)==="roku"},describe(){return{type:z.tv}}}]});var f;var I=K(()=>{X();J();f=[{test(B){return B.getBrowserName(!0)==="microsoft edge"},describe(B){if(/\sedg\//i.test(B))return{name:Z.Blink};let x=h.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,B);return{name:Z.EdgeHTML,version:x}}},{test:[/trident/i],describe(B){let d={name:Z.Trident},x=h.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){return B.test(/presto/i)},describe(B){let d={name:Z.Presto},x=h.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){let d=B.test(/gecko/i),x=B.test(/like gecko/i);return d&&!x},describe(B){let d={name:Z.Gecko},x=h.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Z.Blink}}},{test:[/(apple)?webkit/i],describe(B){let d={name:Z.WebKit},x=h.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}}]});class T{constructor(B,d=!1,x=null){if(B===void 0||B===null||B==="")throw Error("UserAgent parameter can't be empty");this._ua=B;let W=!1;if(typeof d==="boolean")W=d,this._hints=x;else if(d!=null&&typeof d==="object")this._hints=d;else this._hints=null;if(this.parsedResult={},W!==!0)this.parse()}getHints(){return this._hints}hasBrand(B){if(!this._hints||!Array.isArray(this._hints.brands))return!1;let d=B.toLowerCase();return this._hints.brands.some((x)=>x.brand&&x.brand.toLowerCase()===d)}getBrandVersion(B){if(!this._hints||!Array.isArray(this._hints.brands))return;let d=B.toLowerCase(),x=this._hints.brands.find((W)=>W.brand&&W.brand.toLowerCase()===d);return x?x.version:void 0}getUA(){return this._ua}test(B){return B.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let B=h.find(c,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.browser=B.describe(this.getUA(),this);return this.parsedResult.browser}getBrowser(){if(this.parsedResult.browser)return this.parsedResult.browser;return this.parseBrowser()}getBrowserName(B){if(B)return String(this.getBrowser().name).toLowerCase()||"";return this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){if(this.parsedResult.os)return this.parsedResult.os;return this.parseOS()}parseOS(){this.parsedResult.os={};let B=h.find(N,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.os=B.describe(this.getUA());return this.parsedResult.os}getOSName(B){let{name:d}=this.getOS();if(B)return String(d).toLowerCase()||"";return d||""}getOSVersion(){return this.getOS().version}getPlatform(){if(this.parsedResult.platform)return this.parsedResult.platform;return this.parsePlatform()}getPlatformType(B=!1){let{type:d}=this.getPlatform();if(B)return String(d).toLowerCase()||"";return d||""}parsePlatform(){this.parsedResult.platform={};let B=h.find(g,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.platform=B.describe(this.getUA());return this.parsedResult.platform}getEngine(){if(this.parsedResult.engine)return this.parsedResult.engine;return this.parseEngine()}getEngineName(B){if(B)return String(this.getEngine().name).toLowerCase()||"";return this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let B=h.find(f,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.engine=B.describe(this.getUA());return this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return h.assign({},this.parsedResult)}satisfies(B){let d={},x=0,W={},Q=0;if(Object.keys(B).forEach((C)=>{let Y=B[C];if(typeof Y==="string")W[C]=Y,Q+=1;else if(typeof Y==="object")d[C]=Y,x+=1}),x>0){let C=Object.keys(d),Y=h.find(C,(E)=>this.isOS(E));if(Y){let E=this.satisfies(d[Y]);if(E!==void 0)return E}let G=h.find(C,(E)=>this.isPlatform(E));if(G){let E=this.satisfies(d[G]);if(E!==void 0)return E}}if(Q>0){let C=Object.keys(W),Y=h.find(C,(G)=>this.isBrowser(G,!0));if(Y!==void 0)return this.compareVersion(W[Y])}return}isBrowser(B,d=!1){let x=this.getBrowserName().toLowerCase(),W=B.toLowerCase(),Q=h.getBrowserTypeByAlias(W);if(d&&Q)W=Q.toLowerCase();return W===x}compareVersion(B){let d=[0],x=B,W=!1,Q=this.getBrowserVersion();if(typeof Q!=="string")return;if(B[0]===">"||B[0]==="<"){if(x=B.substr(1),B[1]==="=")W=!0,x=B.substr(2);else d=[];if(B[0]===">")d.push(1);else d.push(-1)}else if(B[0]==="=")x=B.substr(1);else if(B[0]==="~")W=!0,x=B.substr(1);return d.indexOf(h.compareVersions(Q,x,W))>-1}isOS(B){return this.getOSName(!0)===String(B).toLowerCase()}isPlatform(B){return this.getPlatformType(!0)===String(B).toLowerCase()}isEngine(B){return this.getEngineName(!0)===String(B).toLowerCase()}is(B,d=!1){return this.isBrowser(B,d)||this.isOS(B)||this.isPlatform(B)}some(B=[]){return B.some((d)=>this.is(d))}}var D;var R=K(()=>{j();F();O();I();X();D=T});class V{static getParser(B,d=!1,x=null){if(typeof B!=="string")throw Error("UserAgent should be a string");return new D(B,d,x)}static parse(B,d=null){return new D(B,d).getResult()}static get BROWSER_MAP(){return $}static get ENGINE_MAP(){return Z}static get OS_MAP(){return k}static get PLATFORMS_MAP(){return z}}var Wd;var M=K(()=>{R();J();/*!
|
|
2
|
+
import{wO as K}from"./chunk-e0vrxetq.js";var H,$,z,k,Z;var J=K(()=>{H={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},$={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},z={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},k={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},Z={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}});class h{static getFirstMatch(B,d){let x=d.match(B);return x&&x.length>0&&x[1]||""}static getSecondMatch(B,d){let x=d.match(B);return x&&x.length>1&&x[2]||""}static matchAndReturnConst(B,d,x){if(B.test(d))return x;return}static getWindowsVersionName(B){switch(B){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(B){let d=B.split(".").splice(0,2).map((Q)=>parseInt(Q,10)||0);d.push(0);let x=d[0],W=d[1];if(x===10)switch(W){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(x){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}}static getAndroidVersionName(B){let d=B.split(".").splice(0,2).map((x)=>parseInt(x,10)||0);if(d.push(0),d[0]===1&&d[1]<5)return;if(d[0]===1&&d[1]<6)return"Cupcake";if(d[0]===1&&d[1]>=6)return"Donut";if(d[0]===2&&d[1]<2)return"Eclair";if(d[0]===2&&d[1]===2)return"Froyo";if(d[0]===2&&d[1]>2)return"Gingerbread";if(d[0]===3)return"Honeycomb";if(d[0]===4&&d[1]<1)return"Ice Cream Sandwich";if(d[0]===4&&d[1]<4)return"Jelly Bean";if(d[0]===4&&d[1]>=4)return"KitKat";if(d[0]===5)return"Lollipop";if(d[0]===6)return"Marshmallow";if(d[0]===7)return"Nougat";if(d[0]===8)return"Oreo";if(d[0]===9)return"Pie";return}static getVersionPrecision(B){return B.split(".").length}static compareVersions(B,d,x=!1){let W=h.getVersionPrecision(B),Q=h.getVersionPrecision(d),y=Math.max(W,Q),C=0,Y=h.map([B,d],(G)=>{let E=y-h.getVersionPrecision(G),_=G+Array(E+1).join(".0");return h.map(_.split("."),(S)=>Array(20-S.length).join("0")+S).reverse()});if(x)C=y-Math.min(W,Q);y-=1;while(y>=C){if(Y[0][y]>Y[1][y])return 1;if(Y[0][y]===Y[1][y]){if(y===C)return 0;y-=1}else if(Y[0][y]<Y[1][y])return-1}return}static map(B,d){let x=[],W;if(Array.prototype.map)return Array.prototype.map.call(B,d);for(W=0;W<B.length;W+=1)x.push(d(B[W]));return x}static find(B,d){let x,W;if(Array.prototype.find)return Array.prototype.find.call(B,d);for(x=0,W=B.length;x<W;x+=1){let Q=B[x];if(d(Q,x))return Q}return}static assign(B,...d){let x=B,W,Q;if(Object.assign)return Object.assign(B,...d);for(W=0,Q=d.length;W<Q;W+=1){let y=d[W];if(typeof y==="object"&&y!==null)Object.keys(y).forEach((Y)=>{x[Y]=y[Y]})}return B}static getBrowserAlias(B){return H[B]}static getBrowserTypeByAlias(B){return $[B]||""}}var X=K(()=>{J()});var q,L,c;var j=K(()=>{X();q=/version\/(\d+(\.?_?\d+)+)/i,L=[{test:[/gptbot/i],describe(B){let d={name:"GPTBot"},x=h.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/chatgpt-user/i],describe(B){let d={name:"ChatGPT-User"},x=h.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/oai-searchbot/i],describe(B){let d={name:"OAI-SearchBot"},x=h.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(B){let d={name:"ClaudeBot"},x=h.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/omgilibot/i,/webzio-extended/i],describe(B){let d={name:"Omgilibot"},x=h.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/diffbot/i],describe(B){let d={name:"Diffbot"},x=h.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/perplexitybot/i],describe(B){let d={name:"PerplexityBot"},x=h.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/perplexity-user/i],describe(B){let d={name:"Perplexity-User"},x=h.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/youbot/i],describe(B){let d={name:"YouBot"},x=h.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-webindexer/i],describe(B){let d={name:"Meta-WebIndexer"},x=h.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalads/i],describe(B){let d={name:"Meta-ExternalAds"},x=h.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalagent/i],describe(B){let d={name:"Meta-ExternalAgent"},x=h.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/meta-externalfetcher/i],describe(B){let d={name:"Meta-ExternalFetcher"},x=h.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/googlebot/i],describe(B){let d={name:"Googlebot"},x=h.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/linespider/i],describe(B){let d={name:"Linespider"},x=h.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/amazonbot/i],describe(B){let d={name:"AmazonBot"},x=h.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/bingbot/i],describe(B){let d={name:"BingCrawler"},x=h.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/baiduspider/i],describe(B){let d={name:"BaiduSpider"},x=h.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/duckduckbot/i],describe(B){let d={name:"DuckDuckBot"},x=h.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/ia_archiver/i],describe(B){let d={name:"InternetArchiveCrawler"},x=h.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe(B){let d={name:"SlackBot"},x=h.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/yahoo!?[\s/]*slurp/i],describe(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe(){return{name:"PingdomBot"}}},{test:[/opera/i],describe(B){let d={name:"Opera"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/opr\/|opios/i],describe(B){let d={name:"Opera"},x=h.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/SamsungBrowser/i],describe(B){let d={name:"Samsung Internet for Android"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/Whale/i],describe(B){let d={name:"NAVER Whale Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/PaleMoon/i],describe(B){let d={name:"Pale Moon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/MZBrowser/i],describe(B){let d={name:"MZ Browser"},x=h.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/focus/i],describe(B){let d={name:"Focus"},x=h.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/swing/i],describe(B){let d={name:"Swing"},x=h.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/coast/i],describe(B){let d={name:"Opera Coast"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(B){let d={name:"Opera Touch"},x=h.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/yabrowser/i],describe(B){let d={name:"Yandex Browser"},x=h.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/ucbrowser/i],describe(B){let d={name:"UC Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/Maxthon|mxios/i],describe(B){let d={name:"Maxthon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/epiphany/i],describe(B){let d={name:"Epiphany"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/puffin/i],describe(B){let d={name:"Puffin"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sleipnir/i],describe(B){let d={name:"Sleipnir"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/k-meleon/i],describe(B){let d={name:"K-Meleon"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/micromessenger/i],describe(B){let d={name:"WeChat"},x=h.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/qqbrowser/i],describe(B){let d={name:/qqbrowserlite/i.test(B)?"QQ Browser Lite":"QQ Browser"},x=h.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/msie|trident/i],describe(B){let d={name:"Internet Explorer"},x=h.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/\sedg\//i],describe(B){let d={name:"Microsoft Edge"},x=h.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/edg([ea]|ios)/i],describe(B){let d={name:"Microsoft Edge"},x=h.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/vivaldi/i],describe(B){let d={name:"Vivaldi"},x=h.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/seamonkey/i],describe(B){let d={name:"SeaMonkey"},x=h.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sailfish/i],describe(B){let d={name:"Sailfish"},x=h.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,B);if(x)d.version=x;return d}},{test:[/silk/i],describe(B){let d={name:"Amazon Silk"},x=h.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/phantom/i],describe(B){let d={name:"PhantomJS"},x=h.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/slimerjs/i],describe(B){let d={name:"SlimerJS"},x=h.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(B){let d={name:"BlackBerry"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/(web|hpw)[o0]s/i],describe(B){let d={name:"WebOS Browser"},x=h.getFirstMatch(q,B)||h.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/bada/i],describe(B){let d={name:"Bada"},x=h.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/tizen/i],describe(B){let d={name:"Tizen"},x=h.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/qupzilla/i],describe(B){let d={name:"QupZilla"},x=h.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/librewolf/i],describe(B){let d={name:"LibreWolf"},x=h.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/firefox|iceweasel|fxios/i],describe(B){let d={name:"Firefox"},x=h.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/electron/i],describe(B){let d={name:"Electron"},x=h.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(B){let d={name:"Sogou Browser"},x=h.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,B),W=h.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,B),Q=h.getFirstMatch(/se ([\d.]+)x/i,B),y=x||W||Q;if(y)d.version=y;return d}},{test:[/MiuiBrowser/i],describe(B){let d={name:"Miui"},x=h.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){if(B.hasBrand("DuckDuckGo"))return!0;return B.test(/\sDdg\/[\d.]+$/i)},describe(B,d){let x={name:"DuckDuckGo"};if(d){let Q=d.getBrandVersion("DuckDuckGo");if(Q)return x.version=Q,x}let W=h.getFirstMatch(/\sDdg\/([\d.]+)$/i,B);if(W)x.version=W;return x}},{test(B){return B.hasBrand("Brave")},describe(B,d){let x={name:"Brave"};if(d){let W=d.getBrandVersion("Brave");if(W)return x.version=W,x}return x}},{test:[/chromium/i],describe(B){let d={name:"Chromium"},x=h.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,B)||h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/chrome|crios|crmo/i],describe(B){let d={name:"Chrome"},x=h.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/GSA/i],describe(B){let d={name:"Google Search"},x=h.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){let d=!B.test(/like android/i),x=B.test(/android/i);return d&&x},describe(B){let d={name:"Android Browser"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/playstation 4/i],describe(B){let d={name:"PlayStation 4"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/safari|applewebkit/i],describe(B){let d={name:"Safari"},x=h.getFirstMatch(q,B);if(x)d.version=x;return d}},{test:[/.*/i],describe(B){let d=/^(.*)\/(.*) /,x=/^(.*)\/(.*)[ \t]\((.*)/,Q=B.search("\\(")!==-1?x:d;return{name:h.getFirstMatch(Q,B),version:h.getSecondMatch(Q,B)}}}],c=L});var N;var F=K(()=>{X();J();N=[{test:[/Roku\/DVP/],describe(B){let d=h.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,B);return{name:k.Roku,version:d}}},{test:[/windows phone/i],describe(B){let d=h.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,B);return{name:k.WindowsPhone,version:d}}},{test:[/windows /i],describe(B){let d=h.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,B),x=h.getWindowsVersionName(d);return{name:k.Windows,version:d,versionName:x}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(B){let d={name:k.iOS},x=h.getSecondMatch(/(Version\/)(\d[\d.]+)/,B);if(x)d.version=x;return d}},{test:[/macintosh/i],describe(B){let d=h.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,B).replace(/[_\s]/g,"."),x=h.getMacOSVersionName(d),W={name:k.MacOS,version:d};if(x)W.versionName=x;return W}},{test:[/(ipod|iphone|ipad)/i],describe(B){let d=h.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,B).replace(/[_\s]/g,".");return{name:k.iOS,version:d}}},{test:[/OpenHarmony/i],describe(B){let d=h.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,B);return{name:k.HarmonyOS,version:d}}},{test(B){let d=!B.test(/like android/i),x=B.test(/android/i);return d&&x},describe(B){let d=h.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,B),x=h.getAndroidVersionName(d),W={name:k.Android,version:d};if(x)W.versionName=x;return W}},{test:[/(web|hpw)[o0]s/i],describe(B){let d=h.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,B),x={name:k.WebOS};if(d&&d.length)x.version=d;return x}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(B){let d=h.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,B)||h.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,B)||h.getFirstMatch(/\bbb(\d+)/i,B);return{name:k.BlackBerry,version:d}}},{test:[/bada/i],describe(B){let d=h.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,B);return{name:k.Bada,version:d}}},{test:[/tizen/i],describe(B){let d=h.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,B);return{name:k.Tizen,version:d}}},{test:[/linux/i],describe(){return{name:k.Linux}}},{test:[/CrOS/],describe(){return{name:k.ChromeOS}}},{test:[/PlayStation 4/],describe(B){let d=h.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,B);return{name:k.PlayStation4,version:d}}}]});var g;var O=K(()=>{X();J();g=[{test:[/googlebot/i],describe(){return{type:z.bot,vendor:"Google"}}},{test:[/linespider/i],describe(){return{type:z.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe(){return{type:z.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe(){return{type:z.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe(){return{type:z.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe(){return{type:z.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe(){return{type:z.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(){return{type:z.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe(){return{type:z.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe(){return{type:z.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe(){return{type:z.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe(){return{type:z.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe(){return{type:z.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe(){return{type:z.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{type:z.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe(){return{type:z.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe(){return{type:z.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{type:z.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe(){return{type:z.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe(B){let d=h.getFirstMatch(/(can-l01)/i,B)&&"Nova",x={type:z.mobile,vendor:"Huawei"};if(d)x.model=d;return x}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:z.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:z.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:z.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:z.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:z.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:z.tablet}}},{test(B){let d=B.test(/ipod|iphone/i),x=B.test(/like (ipod|iphone)/i);return d&&!x},describe(B){let d=h.getFirstMatch(/(ipod|iphone)/i,B);return{type:z.mobile,vendor:"Apple",model:d}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:z.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(B){let d=h.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,B),x={type:z.mobile,vendor:"Nokia"};if(d)x.model=d;return x}},{test:[/[^-]mobi/i],describe(){return{type:z.mobile}}},{test(B){return B.getBrowserName(!0)==="blackberry"},describe(){return{type:z.mobile,vendor:"BlackBerry"}}},{test(B){return B.getBrowserName(!0)==="bada"},describe(){return{type:z.mobile}}},{test(B){return B.getBrowserName()==="windows phone"},describe(){return{type:z.mobile,vendor:"Microsoft"}}},{test(B){let d=Number(String(B.getOSVersion()).split(".")[0]);return B.getOSName(!0)==="android"&&d>=3},describe(){return{type:z.tablet}}},{test(B){return B.getOSName(!0)==="android"},describe(){return{type:z.mobile}}},{test:[/smart-?tv|smarttv/i],describe(){return{type:z.tv}}},{test:[/netcast/i],describe(){return{type:z.tv}}},{test(B){return B.getOSName(!0)==="macos"},describe(){return{type:z.desktop,vendor:"Apple"}}},{test(B){return B.getOSName(!0)==="windows"},describe(){return{type:z.desktop}}},{test(B){return B.getOSName(!0)==="linux"},describe(){return{type:z.desktop}}},{test(B){return B.getOSName(!0)==="playstation 4"},describe(){return{type:z.tv}}},{test(B){return B.getOSName(!0)==="roku"},describe(){return{type:z.tv}}}]});var f;var I=K(()=>{X();J();f=[{test(B){return B.getBrowserName(!0)==="microsoft edge"},describe(B){if(/\sedg\//i.test(B))return{name:Z.Blink};let x=h.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,B);return{name:Z.EdgeHTML,version:x}}},{test:[/trident/i],describe(B){let d={name:Z.Trident},x=h.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){return B.test(/presto/i)},describe(B){let d={name:Z.Presto},x=h.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test(B){let d=B.test(/gecko/i),x=B.test(/like gecko/i);return d&&!x},describe(B){let d={name:Z.Gecko},x=h.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Z.Blink}}},{test:[/(apple)?webkit/i],describe(B){let d={name:Z.WebKit},x=h.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,B);if(x)d.version=x;return d}}]});class T{constructor(B,d=!1,x=null){if(B===void 0||B===null||B==="")throw Error("UserAgent parameter can't be empty");this._ua=B;let W=!1;if(typeof d==="boolean")W=d,this._hints=x;else if(d!=null&&typeof d==="object")this._hints=d;else this._hints=null;if(this.parsedResult={},W!==!0)this.parse()}getHints(){return this._hints}hasBrand(B){if(!this._hints||!Array.isArray(this._hints.brands))return!1;let d=B.toLowerCase();return this._hints.brands.some((x)=>x.brand&&x.brand.toLowerCase()===d)}getBrandVersion(B){if(!this._hints||!Array.isArray(this._hints.brands))return;let d=B.toLowerCase(),x=this._hints.brands.find((W)=>W.brand&&W.brand.toLowerCase()===d);return x?x.version:void 0}getUA(){return this._ua}test(B){return B.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let B=h.find(c,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.browser=B.describe(this.getUA(),this);return this.parsedResult.browser}getBrowser(){if(this.parsedResult.browser)return this.parsedResult.browser;return this.parseBrowser()}getBrowserName(B){if(B)return String(this.getBrowser().name).toLowerCase()||"";return this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){if(this.parsedResult.os)return this.parsedResult.os;return this.parseOS()}parseOS(){this.parsedResult.os={};let B=h.find(N,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.os=B.describe(this.getUA());return this.parsedResult.os}getOSName(B){let{name:d}=this.getOS();if(B)return String(d).toLowerCase()||"";return d||""}getOSVersion(){return this.getOS().version}getPlatform(){if(this.parsedResult.platform)return this.parsedResult.platform;return this.parsePlatform()}getPlatformType(B=!1){let{type:d}=this.getPlatform();if(B)return String(d).toLowerCase()||"";return d||""}parsePlatform(){this.parsedResult.platform={};let B=h.find(g,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.platform=B.describe(this.getUA());return this.parsedResult.platform}getEngine(){if(this.parsedResult.engine)return this.parsedResult.engine;return this.parseEngine()}getEngineName(B){if(B)return String(this.getEngine().name).toLowerCase()||"";return this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let B=h.find(f,(d)=>{if(typeof d.test==="function")return d.test(this);if(Array.isArray(d.test))return d.test.some((x)=>this.test(x));throw Error("Browser's test function is not valid")});if(B)this.parsedResult.engine=B.describe(this.getUA());return this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return h.assign({},this.parsedResult)}satisfies(B){let d={},x=0,W={},Q=0;if(Object.keys(B).forEach((C)=>{let Y=B[C];if(typeof Y==="string")W[C]=Y,Q+=1;else if(typeof Y==="object")d[C]=Y,x+=1}),x>0){let C=Object.keys(d),Y=h.find(C,(E)=>this.isOS(E));if(Y){let E=this.satisfies(d[Y]);if(E!==void 0)return E}let G=h.find(C,(E)=>this.isPlatform(E));if(G){let E=this.satisfies(d[G]);if(E!==void 0)return E}}if(Q>0){let C=Object.keys(W),Y=h.find(C,(G)=>this.isBrowser(G,!0));if(Y!==void 0)return this.compareVersion(W[Y])}return}isBrowser(B,d=!1){let x=this.getBrowserName().toLowerCase(),W=B.toLowerCase(),Q=h.getBrowserTypeByAlias(W);if(d&&Q)W=Q.toLowerCase();return W===x}compareVersion(B){let d=[0],x=B,W=!1,Q=this.getBrowserVersion();if(typeof Q!=="string")return;if(B[0]===">"||B[0]==="<"){if(x=B.substr(1),B[1]==="=")W=!0,x=B.substr(2);else d=[];if(B[0]===">")d.push(1);else d.push(-1)}else if(B[0]==="=")x=B.substr(1);else if(B[0]==="~")W=!0,x=B.substr(1);return d.indexOf(h.compareVersions(Q,x,W))>-1}isOS(B){return this.getOSName(!0)===String(B).toLowerCase()}isPlatform(B){return this.getPlatformType(!0)===String(B).toLowerCase()}isEngine(B){return this.getEngineName(!0)===String(B).toLowerCase()}is(B,d=!1){return this.isBrowser(B,d)||this.isOS(B)||this.isPlatform(B)}some(B=[]){return B.some((d)=>this.is(d))}}var D;var R=K(()=>{j();F();O();I();X();D=T});class V{static getParser(B,d=!1,x=null){if(typeof B!=="string")throw Error("UserAgent should be a string");return new D(B,d,x)}static parse(B,d=null){return new D(B,d).getResult()}static get BROWSER_MAP(){return $}static get ENGINE_MAP(){return Z}static get OS_MAP(){return k}static get PLATFORMS_MAP(){return z}}var Wd;var M=K(()=>{R();J();/*!
|
|
3
3
|
* Bowser - a browser detector
|
|
4
4
|
* https://github.com/bowser-js/bowser
|
|
5
5
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ul as f,Vl as Gj,Wl as Rj,Xl as Hj,_l as s}from"./chunk-5r05d901.js";import{hp as xj}from"./chunk-msh249db.js";import{np as vj}from"./chunk-kmzpeq8k.js";import{rs as P,ss as wj,ys as k,zs as Kj}from"./chunk-z6kcnpsj.js";import{Dt as a,Et as y}from"./chunk-v3nmnm57.js";import{lu as I,uu as h}from"./chunk-mbbxedsq.js";import{Fu as i,Gu as Ij,Hu as Jj,Ku as Nj}from"./chunk-aa2n02qk.js";import{Lu as j}from"./chunk-k1x8469r.js";import{EI as Q,ZC as Wj,bG as o,rP as C,vL as l,wG as d}from"./chunk-tezrgfc6.js";import{SP as Mj,UP as Oj,WP as Ej}from"./chunk-f2pv705d.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>uj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(k.retryTransient({retryOn:"errors-and-responses",times:2,schedule:d.exponential(200).pipe(d.jittered)}));import Yj from"path";var z=Mj(xj(),1);import n from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function kj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(n.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(n.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),u=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*u(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>kj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*u(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*u(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*u(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),M="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var nj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*k.HttpClient,V=k.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(M))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(M)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(nj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${M}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${M}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${M}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),uj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),gj=300000,Aj=8388608,T,dj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<gj}function Lj(J){return!J&&lj()}function g(J){let V=dj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return g(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason);V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Tj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=g(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-mghnkwp8.js").then((_)=>g(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Tj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),g($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Tj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(T||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),T=setInterval(async()=>{await jj()},3600000),T.unref()}function aj(){if(!T)return;clearInterval(T),T=void 0}
|
|
2
|
+
import{Ul as f,Vl as Gj,Wl as Rj,Xl as Hj,_l as s}from"./chunk-rdreeyv0.js";import{Kn as xj}from"./chunk-sa0rrreh.js";import{Qn as vj}from"./chunk-6tqbnxar.js";import{$q as k,Uq as P,Vq as wj,ar as Kj}from"./chunk-wqk1v8t0.js";import{es as a,fs as y}from"./chunk-gswhjd1h.js";import{Os as I,Xs as h}from"./chunk-59csnjc3.js";import{gt as i,ht as Ij,it as Jj,lt as Nj}from"./chunk-1bxfzd6r.js";import{mt as j}from"./chunk-6p6m5956.js";import{AB as Wj,EE as o,UN as C,YJ as l,ZE as d,fH as Q}from"./chunk-g7v6sp3c.js";import{tO as Mj,vO as Oj,xO as Ej}from"./chunk-e0vrxetq.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>uj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(k.retryTransient({retryOn:"errors-and-responses",times:2,schedule:d.exponential(200).pipe(d.jittered)}));import Yj from"path";var z=Mj(xj(),1);import n from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function kj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(n.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(n.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),u=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*u(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>kj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*u(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*u(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*u(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),M="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var nj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*k.HttpClient,V=k.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(M))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(M)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(nj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${M}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${M}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${M}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),uj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),gj=300000,Aj=8388608,T,dj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<gj}function Lj(J){return!J&&lj()}function g(J){let V=dj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return g(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason);V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Tj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=g(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-7adsab4h.js").then((_)=>g(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Tj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),g($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Tj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(T||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),T=setInterval(async()=>{await jj()},3600000),T.unref()}function aj(){if(!T)return;clearInterval(T),T=void 0}
|
|
3
3
|
export{_j as fl,U as gl,Aj as hl,pj as il,cj as jl,Pj as kl,S as ll,fj as ml,jj as nl,sj as ol,aj as pl,tj as ql};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$f as r}from"./chunk-
|
|
2
|
+
import{$f as r}from"./chunk-qsme16gk.js";import{Ch as n}from"./chunk-1acn5me8.js";import{el as e}from"./chunk-k1qd8ecm.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
|
|
3
3
|
export{a as Od,c as Pd};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as $B,b as zB}from"./chunk-
|
|
3
|
-
`+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let $=await V.event.subscribe(),z=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),D=$.stream[Symbol.asyncIterator](),C=z.completion.then(()=>"DONE");(async()=>{try{while(!0){let W=await Promise.race([D.next(),C]);if(W==="DONE")break;let N=W;if(N.done)break;let G=N.value;z.onEvent(G);let K=G.properties;if(G.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let F=String(J.text??"").trim();if(F)process.stdout.write(F+M)}}if(G.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(G.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,F=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(F)}}}finally{z.stop(),await D.return?.(void 0).catch(()=>{})}})().catch((W)=>{console.error(W),process.exit(1)});let y=B.model?e.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:y,parts:[{type:"text",text:B.prompt}]}),z.markStarted(),await z.completion}var aB=BB({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>g(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(WB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=VB();try{JB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=bB(B)??B.model,Y=q(process.env.PWD??process.cwd()),$=B.project?q(h.isAbsolute(B.project)?B.project:h.join(Y,B.project)):q(process.cwd());if(B.project&&!await E($)){let J=QB(B.project,$);if(H.error(J.error),J.hint)H.println(J.hint);process.exitCode=1;return}let z=T($);if(z){if(B.project){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}let J=q(GB.homedir());if(T(J)){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:$,home:J}),$=J}let D=await FB();try{process.chdir($)}catch{H.error("Failed to change directory to "+$);return}let C=q(process.cwd()),I=p({[u]:"worker",[c]:l()}),y=new Worker(D,{env:I});y.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let W=n(y),N=()=>{W.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:A(J)})})};process.on("SIGUSR2",N);let G=!1,K=async()=>{if(G)return;G=!0,process.off("SIGUSR2",N),await o(W.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:A(J)})}),y.terminate()};try{let J=import("./chunk-
|
|
2
|
+
import{a as $B,b as zB}from"./chunk-k3m7jfdh.js";import"./chunk-vd8cmdpv.js";import"./chunk-0z1keh2w.js";import{B as XB}from"./chunk-gsez13bg.js";import{C as JB,E as VB}from"./chunk-c8k32724.js";import"./chunk-vgt3artc.js";import{Y as YB,Z as ZB}from"./chunk-nr2j8ytn.js";import"./chunk-2kh0tg92.js";import"./chunk-52xvhxek.js";import{be as BB}from"./chunk-f4mnp6xd.js";import{$f as O,Zf as g,_f as w,ag as i}from"./chunk-qsme16gk.js";import{eg as H}from"./chunk-bwadggys.js";import{Gg as r}from"./chunk-nsp1za8t.js";import{Ch as S}from"./chunk-1acn5me8.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import{Rj as o,Uk as e,yj as U}from"./chunk-k1qd8ecm.js";import"./chunk-bhg69t69.js";import{Nl as T}from"./chunk-fv5mrdyc.js";import"./chunk-rdreeyv0.js";import"./chunk-rmsqb6r4.js";import"./chunk-7pckez5z.js";import"./chunk-k6981ysw.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import{bo as a,ho as s,wo as t}from"./chunk-4y9wbfd2.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-b5ym419d.js";import"./chunk-29q89bge.js";import"./chunk-wqk1v8t0.js";import{Hr as n}from"./chunk-rwwvy89t.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import{cs as f}from"./chunk-fveaq0pb.js";import{As as c,Bs as u,Cs as l,Es as p}from"./chunk-gswhjd1h.js";import{Is as A}from"./chunk-wgkcyqn1.js";import{Rs as x}from"./chunk-59csnjc3.js";import{dt as E,ft as q}from"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import{fH as P}from"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import{xO as v}from"./chunk-e0vrxetq.js";import h from"path";import{fileURLToPath as KB}from"url";import{writeHeapSnapshot as MB}from"v8";import GB,{EOL as M}from"os";var WB={free:"free",adaptive:"adaptive",fast:"fast",economical:"economical",maxInt:"max-int",orchestrated:"orchestrated"},m=ZB;function R(B){if(B.agent)return B.agent;return m}function QB(B,V){if(h.isAbsolute(B)||B.includes("/")||B.includes("\\")||B.startsWith(".")||B.startsWith("~"))return{error:"Directory not found: "+V};return{error:`Unknown command "${B}"`,hint:"Run `qitqode --help` to see the available commands, or pass an existing directory to start the TUI there."}}function bB(B){for(let[V,X]of Object.entries(WB))if(B[V]){let Z=f[X];if(Z)return`${Z.providerID}/${Z.modelID}`}return}function jB(B){return async(X,Z)=>{let Y=new Request(X,Z),$=Y.body?await Y.text():void 0,z=await B.call("fetch",{url:Y.url,method:Y.method,headers:Object.fromEntries(Y.headers.entries()),body:$});return new Response(z.body,{status:z.status,headers:z.headers})}}function CB(B){return{subscribe:async(V)=>{return B.on("global.event",(X)=>{V(X)})}}}async function FB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await E(KB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function _B(B){let V=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return V;if(!V)return B;return V+`
|
|
3
|
+
`+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let $=await V.event.subscribe(),z=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),D=$.stream[Symbol.asyncIterator](),C=z.completion.then(()=>"DONE");(async()=>{try{while(!0){let W=await Promise.race([D.next(),C]);if(W==="DONE")break;let N=W;if(N.done)break;let G=N.value;z.onEvent(G);let K=G.properties;if(G.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let F=String(J.text??"").trim();if(F)process.stdout.write(F+M)}}if(G.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(G.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,F=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(F)}}}finally{z.stop(),await D.return?.(void 0).catch(()=>{})}})().catch((W)=>{console.error(W),process.exit(1)});let y=B.model?e.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:y,parts:[{type:"text",text:B.prompt}]}),z.markStarted(),await z.completion}var aB=BB({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>g(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(WB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=VB();try{JB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=bB(B)??B.model,Y=q(process.env.PWD??process.cwd()),$=B.project?q(h.isAbsolute(B.project)?B.project:h.join(Y,B.project)):q(process.cwd());if(B.project&&!await E($)){let J=QB(B.project,$);if(H.error(J.error),J.hint)H.println(J.hint);process.exitCode=1;return}let z=T($);if(z){if(B.project){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}let J=q(GB.homedir());if(T(J)){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:$,home:J}),$=J}let D=await FB();try{process.chdir($)}catch{H.error("Failed to change directory to "+$);return}let C=q(process.cwd()),I=p({[u]:"worker",[c]:l()}),y=new Worker(D,{env:I});y.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let W=n(y),N=()=>{W.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:A(J)})})};process.on("SIGUSR2",N);let G=!1,K=async()=>{if(G)return;G=!0,process.off("SIGUSR2",N),await o(W.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:A(J)})}),y.terminate()};try{let J=import("./chunk-tr0rm1ka.js"),F=import("./chunk-hq7s4f75.js").then(({TuiConfig:_})=>_.get()),L=await _B(B.prompt),HB=await F;if(B.headless&&w(O(B))){H.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let k=O(B),j=w(k)?{url:(await W.call("server",k)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:jB(W),events:CB(W)};if(setTimeout(()=>{W.call("checkUpgrade",{directory:C}).catch(()=>{})},1000).unref?.(),B.headless){if(!L){H.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let Q=await r({tryOpen:!1,onCode:(b)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+b.verificationUri+M),process.stdout.write(" and enter code: "+b.userCode+M),b.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+b.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await S.runPromise(P.gen(function*(){yield*(yield*U.Service).set("forgewise",t(Q,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(Q.name||Q.email)+M)}catch(Q){H.error("SSO sign-in failed: "+A(Q)),process.exitCode=1;return}await d({url:j.url,fetch:j.fetch,prompt:L,model:Z,agent:R(B)??m,directory:C});return}let _=$B(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(_)await S.runPromise(zB(_));else if(!await S.runPromise(P.gen(function*(){if(yield*P.promise(()=>s()))return!0;return!!(yield*(yield*U.Service).get("forgewise"))}))){H.error(`Not signed in. Use one of:
|
|
4
4
|
qitqode auth login (browser / device-code flow)
|
|
5
5
|
qitqode auth login --api-key (paste a Qortex API key)
|
|
6
6
|
--api-key <key> (inline for this run)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-8p0t8qah.js";import"./chunk-
|
|
2
|
+
import"./chunk-8p0t8qah.js";import"./chunk-e0vrxetq.js";var e={"ui.sessionReview.title":"\u5DE5\u4F5C\u968E\u6BB5\u8B8A\u66F4","ui.sessionReview.title.lastTurn":"\u4E0A\u4E00\u8F2A\u8B8A\u66F4","ui.sessionReview.diffStyle.unified":"\u6574\u5408","ui.sessionReview.diffStyle.split":"\u62C6\u5206","ui.sessionReview.openFile":"\u958B\u555F\u6A94\u6848","ui.sessionReview.selection.line":"\u7B2C {{line}} \u884C","ui.sessionReview.selection.lines":"\u7B2C {{start}}-{{end}} \u884C","ui.sessionReview.expandAll":"\u5168\u90E8\u5C55\u958B","ui.sessionReview.collapseAll":"\u5168\u90E8\u6536\u5408","ui.sessionReview.change.added":"\u5DF2\u65B0\u589E","ui.sessionReview.change.removed":"\u5DF2\u79FB\u9664","ui.sessionReview.change.modified":"\u5DF2\u4FEE\u6539","ui.sessionReview.image.loading":"\u8F09\u5165\u4E2D...","ui.sessionReview.image.placeholder":"\u5716\u7247","ui.sessionReview.largeDiff.title":"\u5DEE\u7570\u904E\u5927\uFF0C\u7121\u6CD5\u6E32\u67D3","ui.sessionReview.largeDiff.meta":"\u9650\u5236\uFF1A{{limit}} \u884C\u8B8A\u66F4\u3002\u76EE\u524D\uFF1A{{current}} \u884C\u8B8A\u66F4\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u4ECD\u7136\u6E32\u67D3","ui.fileMedia.kind.image":"\u5716\u7247","ui.fileMedia.kind.audio":"\u97F3\u8A0A","ui.fileMedia.state.removed":"{{kind}}\u5DF2\u79FB\u9664","ui.fileMedia.state.loading":"\u6B63\u5728\u8F09\u5165{{kind}}...","ui.fileMedia.state.error":"\u8F09\u5165{{kind}}\u5931\u6557","ui.fileMedia.state.unavailable":"{{kind}}\u7121\u6CD5\u9810\u89BD","ui.fileMedia.binary.title":"\u4E8C\u9032\u4F4D\u6A94\u6848","ui.fileMedia.binary.description.path":"\u7121\u6CD5\u986F\u793A {{path}}\uFF0C\u56E0\u70BA\u5B83\u662F\u4E8C\u9032\u4F4D\u6A94\u6848\u3002","ui.fileMedia.binary.description.default":"\u7121\u6CD5\u986F\u793A\u6B64\u6A94\u6848\uFF0C\u56E0\u70BA\u5B83\u662F\u4E8C\u9032\u4F4D\u6A94\u6848\u3002","ui.lineComment.label.prefix":"\u8A55\u8AD6 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u6B63\u5728\u8A55\u8AD6 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u65B0\u589E\u8A55\u8AD6","ui.lineComment.submit":"\u8A55\u8AD6","ui.sessionTurn.steps.show":"\u986F\u793A\u6B65\u9A5F","ui.sessionTurn.steps.hide":"\u96B1\u85CF\u6B65\u9A5F","ui.sessionTurn.summary.response":"\u56DE\u8986","ui.sessionTurn.diff.showMore":"\u986F\u793A\u66F4\u591A\u8B8A\u66F4 ({{count}})","ui.sessionTurn.retry.retrying":"\u91CD\u8A66\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}} \u79D2\u5F8C","ui.sessionTurn.retry.attempt":"\u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.attemptLine":"{{line}} - \u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.geminiHot":"gemini \u76EE\u524D\u904E\u8F09","ui.sessionTurn.error.freeUsageExceeded":"\u514D\u8CBB\u4F7F\u7528\u984D\u5EA6\u5DF2\u7528\u5B8C","ui.sessionTurn.error.addQredits":"\u65B0\u589E\u9EDE\u6578","ui.sessionTurn.status.delegating":"\u6B63\u5728\u59D4\u6D3E\u5DE5\u4F5C","ui.sessionTurn.status.planning":"\u6B63\u5728\u898F\u5283\u4E0B\u4E00\u6B65","ui.sessionTurn.status.gatheringContext":"\u6B63\u5728\u63A2\u7D22","ui.sessionTurn.status.gatheredContext":"\u5DF2\u63A2\u7D22","ui.sessionTurn.status.searchingCodebase":"\u6B63\u5728\u641C\u5C0B\u7A0B\u5F0F\u78BC\u5EAB","ui.sessionTurn.status.searchingWeb":"\u6B63\u5728\u641C\u5C0B\u7DB2\u9801","ui.sessionTurn.status.makingEdits":"\u6B63\u5728\u4FEE\u6539","ui.sessionTurn.status.runningCommands":"\u6B63\u5728\u57F7\u884C\u547D\u4EE4","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u6B63\u5728\u6574\u7406\u601D\u7DD2","ui.sessionTurn.status.consideringNextSteps":"\u6B63\u5728\u8003\u616E\u4E0B\u4E00\u6B65","ui.messagePart.questions.dismissed":"\u554F\u984C\u5DF2\u7565\u904E","ui.messagePart.compaction":"\u5DE5\u4F5C\u968E\u6BB5\u5DF2\u58D3\u7E2E","ui.messagePart.context.read.one":"{{count}} \u6B21\u8B80\u53D6","ui.messagePart.context.read.other":"{{count}} \u6B21\u8B80\u53D6","ui.messagePart.context.search.one":"{{count}} \u6B21\u641C\u5C0B","ui.messagePart.context.search.other":"{{count}} \u6B21\u641C\u5C0B","ui.messagePart.context.list.one":"{{count}} \u500B\u6E05\u55AE","ui.messagePart.context.list.other":"{{count}} \u500B\u6E05\u55AE","ui.messagePart.diagnostic.error":"\u932F\u8AA4","ui.messagePart.title.edit":"\u7DE8\u8F2F","ui.messagePart.title.write":"\u5BEB\u5165","ui.messagePart.option.typeOwnAnswer":"\u8F38\u5165\u81EA\u5DF1\u7684\u7B54\u6848","ui.messagePart.review.title":"\u6AA2\u67E5\u4F60\u7684\u7B54\u6848","ui.list.loading":"\u8F09\u5165\u4E2D","ui.list.empty":"\u7121\u7D50\u679C","ui.list.clearFilter":"\u6E05\u9664\u7BE9\u9078","ui.list.emptyWithFilter.prefix":"\u6C92\u6709\u95DC\u65BC","ui.list.emptyWithFilter.suffix":"\u7684\u7D50\u679C","ui.messageNav.newMessage":"\u65B0\u8A0A\u606F","ui.textField.copyToClipboard":"\u8907\u88FD\u5230\u526A\u8CBC\u7C3F","ui.textField.copyLink":"\u8907\u88FD\u9023\u7D50","ui.textField.copied":"\u5DF2\u8907\u88FD","ui.imagePreview.alt":"\u5716\u7247\u9810\u89BD","ui.scrollView.ariaLabel":"\u53EF\u6372\u52D5\u5167\u5BB9","ui.tool.read":"\u8B80\u53D6","ui.tool.loaded":"\u5DF2\u8F09\u5165","ui.tool.list":"\u6E05\u55AE","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u7DB2\u9801\u641C\u5C0B","ui.tool.codesearch":"\u7A0B\u5F0F\u78BC\u641C\u5C0B","ui.tool.shell":"Shell","ui.tool.patch":"\u4FEE\u88DC","ui.tool.todos":"\u5F85\u8FA6","ui.tool.todos.read":"\u8B80\u53D6\u5F85\u8FA6","ui.tool.questions":"\u554F\u984C","ui.tool.agent":"{{type}} \u4EE3\u7406\u7A0B\u5F0F","ui.tool.agent.default":"\u4EE3\u7406\u7A0B\u5F0F","ui.common.file.one":"\u500B\u6A94\u6848","ui.common.file.other":"\u500B\u6A94\u6848","ui.common.question.one":"\u500B\u554F\u984C","ui.common.question.other":"\u500B\u554F\u984C","ui.common.add":"\u65B0\u589E","ui.common.back":"\u8FD4\u56DE","ui.common.cancel":"\u53D6\u6D88","ui.common.confirm":"\u78BA\u8A8D","ui.common.dismiss":"\u5FFD\u7565","ui.common.close":"\u95DC\u9589","ui.common.next":"\u4E0B\u4E00\u6B65","ui.common.submit":"\u63D0\u4EA4","ui.permission.deny":"\u62D2\u7D55","ui.permission.allowAlways":"\u6C38\u9060\u5141\u8A31","ui.permission.allowOnce":"\u5141\u8A31\u4E00\u6B21","ui.message.expand":"\u5C55\u958B\u8A0A\u606F","ui.message.collapse":"\u6536\u5408\u8A0A\u606F","ui.message.copy":"\u8907\u88FD","ui.message.copyMessage":"\u8907\u88FD\u8A0A\u606F","ui.message.forkMessage":"\u5206\u652F\u5230\u65B0\u5DE5\u4F5C\u968E\u6BB5","ui.message.revertMessage":"\u91CD\u8A2D\u81F3\u6B64\u9EDE","ui.message.copyResponse":"\u8907\u88FD\u56DE\u8986","ui.message.copied":"\u5DF2\u8907\u88FD\uFF01","ui.message.interrupted":"\u5DF2\u4E2D\u65B7","ui.message.queued":"\u6392\u968A\u4E2D","ui.message.attachment.alt":"\u9644\u4EF6","ui.patch.action.deleted":"\u5DF2\u522A\u9664","ui.patch.action.created":"\u5DF2\u5EFA\u7ACB","ui.patch.action.moved":"\u5DF2\u79FB\u52D5","ui.patch.action.patched":"\u5DF2\u5957\u7528\u4FEE\u88DC","ui.question.subtitle.answered":"{{count}} \u5DF2\u56DE\u7B54","ui.question.answer.none":"(\u7121\u7B54\u6848)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u53EF\u591A\u9078","ui.question.singleHint":"\u9078\u64C7\u4E00\u500B\u7B54\u6848","ui.question.custom.placeholder":"\u8F38\u5165\u4F60\u7684\u7B54\u6848...","ui.fileSearch.placeholder":"\u641C\u5C0B","ui.fileSearch.previousMatch":"\u4E0A\u4E00\u500B","ui.fileSearch.nextMatch":"\u4E0B\u4E00\u500B","ui.fileSearch.close":"\u95DC\u9589\u641C\u5C0B","ui.tool.task":"\u4EFB\u52D9","ui.tool.skill":"\u6280\u80FD","ui.basicTool.called":"\u547C\u53EB\u4E86 `{{tool}}`","ui.toolErrorCard.failed":"\u5931\u6557","ui.toolErrorCard.copyError":"\u8907\u88FD\u932F\u8AA4","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{xO as o}from"./chunk-e0vrxetq.js";var i=(t)=>`standard-openapi: ${t}`,s=new Map,r=async(t)=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./chunk-g4tyaj0m.js")).default();break;case"zod":a=(await import("./chunk-5j4nxpdy.js")).default();break;default:a=(await import("./chunk-7p88j56s.js")).default()}return s.set(t,a),a},d=async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:n={},options:c}=e;return{schema:await a(t,{components:n,options:c}),components:Object.keys(n).length>0?n:void 0}};
|
|
3
|
+
export{i as Jg,d as Kg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{bs as _}from"./chunk-0tm6589k.js";import{mt as h}from"./chunk-6p6m5956.js";import{vO as X,xO as L}from"./chunk-e0vrxetq.js";var E={};X(E,{println:()=>g,print:()=>a,markdown:()=>G,logo:()=>I,input:()=>w,error:()=>A,empty:()=>D,UI:()=>E,Style:()=>m,CancelledError:()=>N});import{EOL as x}from"os";var T={left:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 "," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "],right:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"]},R={left:[" "," ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 "],right:[" "," ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var O=["\u2800 ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"],N=_.create("UICancelledError",h.void()),m={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function g(...r){a(...r),process.stderr.write(x)}function a(...r){f=!1,process.stderr.write(r.join(" "))}var f=!1;function D(){if(f)return;g(""+m.TEXT_NORMAL),f=!0}function I(r){if(!process.stdout.isTTY&&!process.stderr.isTTY){let o=[];for(let s of O){if(r)o.push(r);o.push(s),o.push(x)}return o.join("").trimEnd()}let n=[],t="\x1B[0m",i={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},c={fg:t,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},d=" ",b=(o,s,u,l)=>{let e=[];for(let p of o){if(p==="_"){e.push(l," ",t);continue}if(p==="^"){e.push(s,l,"\u2580",t);continue}if(p==="~"){e.push(u,"\u2580",t);continue}if(p===" "){e.push(" ");continue}e.push(s,p,t)}return e.join("")};return T.left.forEach((o,s)=>{if(r)n.push(r);n.push(b(o,i.fg,i.shadow,i.bg)),n.push(d);let u=T.right[s]??"";n.push(b(u,c.fg,c.shadow,c.bg)),n.push(x)}),n.join("").trimEnd()}async function w(r){let t=L("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise((i)=>{t.question(r,(c)=>{t.close(),i(c.trim())})})}function A(r){if(r.startsWith("Error: "))r=r.slice(7);g(m.TEXT_DANGER_BOLD+"Error: "+m.TEXT_NORMAL+r)}function G(r){return r}
|
|
3
3
|
export{T as cg,R as dg,E as eg};
|