@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"./chunk-
|
|
2
|
+
import"./chunk-e0vrxetq.js";var i={"ui.sessionReview.title":"Zmiany w sesji","ui.sessionReview.title.lastTurn":"Zmiany z ostatniej tury","ui.sessionReview.diffStyle.unified":"Ujednolicony","ui.sessionReview.diffStyle.split":"Podzielony","ui.sessionReview.openFile":"Otw\xF3rz plik","ui.sessionReview.selection.line":"linia {{line}}","ui.sessionReview.selection.lines":"linie {{start}}-{{end}}","ui.sessionReview.expandAll":"Rozwi\u0144 wszystko","ui.sessionReview.collapseAll":"Zwi\u0144 wszystko","ui.sessionReview.change.added":"Dodano","ui.sessionReview.change.removed":"Usuni\u0119to","ui.sessionReview.change.modified":"Zmodyfikowano","ui.sessionReview.image.loading":"\u0141adowanie...","ui.sessionReview.image.placeholder":"Obraz","ui.sessionReview.largeDiff.title":"Diff jest zbyt du\u017Cy, aby go wyrenderowa\u0107","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} zmienionych linii. Obecnie: {{current}} zmienionych linii.","ui.sessionReview.largeDiff.renderAnyway":"Renderuj mimo to","ui.fileMedia.kind.image":"obraz","ui.fileMedia.kind.audio":"d\u017Awi\u0119k","ui.fileMedia.state.removed":"{{kind}} usuni\u0119ty","ui.fileMedia.state.loading":"Wczytywanie: {{kind}}...","ui.fileMedia.state.error":"B\u0142\u0105d wczytywania: {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} niedost\u0119pny","ui.fileMedia.binary.title":"Plik binarny","ui.fileMedia.binary.description.path":"Nie mo\u017Cna wy\u015Bwietli\u0107 pliku {{path}}, poniewa\u017C jest to plik binarny.","ui.fileMedia.binary.description.default":"Nie mo\u017Cna wy\u015Bwietli\u0107 tego pliku, poniewa\u017C jest to plik binarny.","ui.lineComment.label.prefix":"Komentarz do ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Komentowanie: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Dodaj komentarz","ui.lineComment.submit":"Skomentuj","ui.sessionTurn.steps.show":"Poka\u017C kroki","ui.sessionTurn.steps.hide":"Ukryj kroki","ui.sessionTurn.summary.response":"Odpowied\u017A","ui.sessionTurn.diff.showMore":"Poka\u017C wi\u0119cej zmian ({{count}})","ui.sessionTurn.retry.retrying":"ponawianie","ui.sessionTurn.retry.inSeconds":"za {{seconds}}s","ui.sessionTurn.retry.attempt":"pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini jest teraz mocno przeci\u0105\u017Cony","ui.sessionTurn.error.freeUsageExceeded":"Przekroczono limit darmowego u\u017Cytkowania","ui.sessionTurn.error.addQredits":"Dodaj kredyty","ui.sessionTurn.status.delegating":"Delegowanie pracy","ui.sessionTurn.status.planning":"Planowanie kolejnych krok\xF3w","ui.sessionTurn.status.gatheringContext":"Eksplorowanie","ui.sessionTurn.status.gatheredContext":"Wyeksplorowano","ui.sessionTurn.status.searchingCodebase":"Przeszukiwanie bazy kodu","ui.sessionTurn.status.searchingWeb":"Przeszukiwanie sieci","ui.sessionTurn.status.makingEdits":"Wprowadzanie zmian","ui.sessionTurn.status.runningCommands":"Uruchamianie polece\u0144","ui.sessionTurn.status.thinking":"My\u015Blenie","ui.sessionTurn.status.thinkingWithTopic":"My\u015Blenie - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Zbieranie my\u015Bli","ui.sessionTurn.status.consideringNextSteps":"Rozwa\u017Canie kolejnych krok\xF3w","ui.messagePart.questions.dismissed":"Pytania odrzucone","ui.messagePart.compaction":"Sesja skompaktowana","ui.messagePart.context.read.one":"{{count}} odczyt","ui.messagePart.context.read.other":"{{count}} odczyty","ui.messagePart.context.search.one":"{{count}} wyszukiwanie","ui.messagePart.context.search.other":"{{count}} wyszukiwania","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listy","ui.messagePart.diagnostic.error":"B\u0142\u0105d","ui.messagePart.title.edit":"Edycja","ui.messagePart.title.write":"Pisanie","ui.messagePart.option.typeOwnAnswer":"Wpisz w\u0142asn\u0105 odpowied\u017A","ui.messagePart.review.title":"Przejrzyj swoje odpowiedzi","ui.list.loading":"\u0141adowanie","ui.list.empty":"Brak wynik\xF3w","ui.list.clearFilter":"Wyczy\u015B\u0107 filtr","ui.list.emptyWithFilter.prefix":"Brak wynik\xF3w dla","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nowa wiadomo\u015B\u0107","ui.textField.copyToClipboard":"Skopiuj do schowka","ui.textField.copyLink":"Skopiuj link","ui.textField.copied":"Skopiowano","ui.imagePreview.alt":"Podgl\u0105d obrazu","ui.scrollView.ariaLabel":"tre\u015B\u0107 przewijana","ui.tool.read":"Odczyt","ui.tool.loaded":"Za\u0142adowano","ui.tool.list":"Lista","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Pobieranie sieciowe","ui.tool.websearch":"Wyszukiwanie w sieci","ui.tool.codesearch":"Wyszukiwanie kodu","ui.tool.shell":"Terminal","ui.tool.patch":"Patch","ui.tool.todos":"Zadania","ui.tool.todos.read":"Czytaj zadania","ui.tool.questions":"Pytania","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"plik","ui.common.file.other":"pliki","ui.common.question.one":"pytanie","ui.common.question.other":"pytania","ui.common.add":"Dodaj","ui.common.back":"Wstecz","ui.common.cancel":"Anuluj","ui.common.confirm":"Potwierd\u017A","ui.common.dismiss":"Odrzu\u0107","ui.common.close":"Zamknij","ui.common.next":"Dalej","ui.common.submit":"Prze\u015Blij","ui.permission.deny":"Odm\xF3w","ui.permission.allowAlways":"Zezwalaj zawsze","ui.permission.allowOnce":"Zezw\xF3l raz","ui.message.expand":"Rozwi\u0144 wiadomo\u015B\u0107","ui.message.collapse":"Zwi\u0144 wiadomo\u015B\u0107","ui.message.copy":"Kopiuj","ui.message.copyMessage":"Kopiuj wiadomo\u015B\u0107","ui.message.forkMessage":"Rozwidlij do nowej sesji","ui.message.revertMessage":"Zresetuj do tego punktu","ui.message.copyResponse":"Kopiuj odpowied\u017A","ui.message.copied":"Skopiowano!","ui.message.interrupted":"Przerwano","ui.message.queued":"W kolejce","ui.message.attachment.alt":"za\u0142\u0105cznik","ui.patch.action.deleted":"Usuni\u0119to","ui.patch.action.created":"Utworzono","ui.patch.action.moved":"Przeniesiono","ui.patch.action.patched":"Za\u0142atano","ui.question.subtitle.answered":"{{count}} odpowiedzi","ui.question.answer.none":"(brak odpowiedzi)","ui.question.review.notAnswered":"(bez odpowiedzi)","ui.question.multiHint":"Zaznacz wszystkie pasuj\u0105ce","ui.question.singleHint":"Wybierz jedn\u0105 odpowied\u017A","ui.question.custom.placeholder":"Wpisz swoj\u0105 odpowied\u017A...","ui.fileSearch.placeholder":"Szukaj","ui.fileSearch.previousMatch":"Poprzednie","ui.fileSearch.nextMatch":"Nast\u0119pne","ui.fileSearch.close":"Zamknij wyszukiwanie","ui.tool.task":"Zadanie","ui.tool.skill":"Umiej\u0119tno\u015B\u0107","ui.basicTool.called":"Wywo\u0142ano `{{tool}}`","ui.toolErrorCard.failed":"B\u0142\u0105d","ui.toolErrorCard.copyError":"Kopiuj b\u0142\u0105d","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{i as dict};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qd as n}from"./chunk-yy7r3t3w.js";import{be as i}from"./chunk-f4mnp6xd.js";import{Ch as r,Pg as y,Qg as w,Zg as R,qh as K,rh as X}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Oj as V,Pj as W,Sj as C,Uk as J,_j as M,dl as Y,el as F,yk as g}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import{Ml as E,Ol as u}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import{et as U}from"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import{$t as _,Zt as z,_t as B,bu as H}from"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import{uu as S}from"./chunk-mbbxedsq.js";import{Ku as oo}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import{EI as d,vL as x}from"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import{XP as v,YP as P}from"./chunk-f2pv705d.js";import{EOL as to}from"os";var I=i({command:"config",describe:"show resolved configuration",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(F.Service.use((e)=>e.get()));process.stdout.write(JSON.stringify(o,null,2)+to)})}});import{EOL as b}from"os";var io=i({command:"search <query>",describe:"search files by query",builder:(o)=>o.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.search({query:o.query})));process.stdout.write(e.join(b)+b)})}}),ro=i({command:"read <path>",describe:"read file contents as JSON",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.read(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),no=i({command:"status",describe:"show file status information",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(w.Service.use((e)=>e.status()));process.stdout.write(JSON.stringify(o,null,2)+b)})}}),so=i({command:"list <path>",describe:"list files in a directory",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.list(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),mo=i({command:"tree [dir]",describe:"show directory tree",builder:(o)=>o.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:o.dir,limit:200})));console.log(JSON.stringify(e,null,2))})}}),L=i({command:"file",describe:"file system debugging utilities",builder:(o)=>o.command(ro).command(no).command(so).command(io).command(mo).demandCommand(),async handler(){}});import{EOL as A}from"os";var q=i({command:"lsp",describe:"LSP debugging utilities",builder:(o)=>o.command(ao).command(co).command(lo).demandCommand(),async handler(){}}),ao=i({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(o)=>o.positional("file",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(C.Service.use((t)=>d.gen(function*(){return yield*t.touchFile(o.file,!0),yield*d.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(e,null,2)+A)})}}),co=i({command:"symbols <query>",describe:"search workspace symbols",builder:(o)=>o.positional("query",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.workspaceSymbol(o.query)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}}),lo=i({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(o)=>o.positional("uri",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("document-symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.documentSymbol(o.uri)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}});import{EOL as O}from"os";var k=i({command:"rg",describe:"ripgrep debugging utilities",builder:(o)=>o.command(po).command(uo).command(fo).demandCommand(),async handler(){}}),po=i({command:"tree",describe:"show file tree using ripgrep",builder:(o)=>o.option("limit",{type:"number"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:u.directory,limit:o.limit})));process.stdout.write(e+O)})}}),uo=i({command:"files",describe:"list files using ripgrep",builder:(o)=>o.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(d.gen(function*(){return yield*(yield*y.Service).files({cwd:u.directory,glob:o.glob?[o.glob]:void 0}).pipe(x.take(o.limit??1/0),x.runCollect,d.map((s)=>[...s]))}));process.stdout.write(e.join(O)+O)})}}),fo=i({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(o)=>o.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.search({cwd:u.directory,pattern:o.pattern,glob:o.glob,limit:o.limit})));process.stdout.write(JSON.stringify(e.items,null,2)+O)})}});import{EOL as yo}from"os";var T=i({command:"scrap",describe:"list all known projects",builder:(o)=>o,async handler(){let o=S.Default.time("scrap"),e=await E.list();process.stdout.write(JSON.stringify(e,null,2)+yo),o.stop()}});import{EOL as go}from"os";var $=i({command:"skill",describe:"list all available skills",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(d.gen(function*(){return yield*(yield*R.Service).all()}));process.stdout.write(JSON.stringify(o,null,2)+go)})}});var j=i({command:"snapshot",describe:"snapshot debugging utilities",builder:(o)=>o.command(bo).command(wo).command(So).demandCommand(),async handler(){}}),D=(o)=>n(process.cwd(),async()=>{console.log(await r.runPromise(M.Service.use(o)))}),G=(o)=>o.positional("hash",{type:"string",description:"hash",demandOption:!0}),bo=i({command:"track",describe:"track current snapshot state",async handler(){await D((o)=>o.track())}}),wo=i({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:G,async handler(o){await D((e)=>e.patch(o.hash))}}),So=i({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:G,async handler(o){await D((e)=>e.diff(o.hash))}});import{EOL as h}from"os";import{basename as ho}from"path";var Z=i({command:"agent <name>",describe:"show agent configuration details",builder:(o)=>o.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(o){await n(process.cwd(),async()=>{let e=o.name,t=await r.runPromise(X.Service.use((m)=>m.get(e)));if(!t)process.stderr.write(`Agent ${e} not found, run '${ho(process.execPath)} agent list' to get an agent list`+h),process.exit(1);let s=await Co(t),a=await Oo(t,s),c=o.tool;if(c){let m=s.find((eo)=>eo.id===c);if(!m)process.stderr.write(`Tool ${c} not found for agent ${e}`+h),process.exit(1);if(a[c]===!1)process.stderr.write(`Tool ${c} is disabled for agent ${e}`+h),process.exit(1);let p=vo(o.params),f=await Po(t),N=await m.execute(p,f);process.stdout.write(JSON.stringify({tool:c,input:p,result:N},null,2)+h);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+h)})}});async function Co(o){return r.runPromise(d.gen(function*(){let e=yield*J.Service,t=yield*K.Service,s=o.model??(yield*e.defaultModel());return yield*t.tools({...s,agent:o})}))}async function Oo(o,e){let t=g.disabled(e.map((a)=>a.id),o.permission),s={};for(let a of e)s[a.id]=!t.has(a.id);return s}function vo(o){if(!o)return{};let e=o.trim();if(e.length===0)return{};let t=(()=>{try{return JSON.parse(e)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function Po(o){let{session:e,messageID:t}=await r.runPromise(d.gen(function*(){let a=yield*Y.Service,c=yield*a.create({title:`Debug tool run (${o.name})`}),l=V.ascending(),m=o.model?o.model:yield*d.gen(function*(){return yield*(yield*J.Service).defaultModel()}),p=Date.now(),f={id:l,sessionID:c.id,role:"assistant",time:{created:p},parentID:l,modelID:m.modelID,providerID:m.providerID,mode:"debug",agent:o.name,path:{cwd:u.directory,root:u.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(f),{session:c,messageID:l}})),s=g.merge(o.permission,e.permission??[]);return{sessionID:e.id,messageID:t,callID:W.ascending(),agent:o.name,abort:new AbortController().signal,messages:[],metadata:()=>d.void,ask(a){return d.sync(()=>{for(let c of a.patterns)if(g.evaluate(a.permission,c,s).action==="deny")throw new g.DeniedError({ruleset:s})})}}}var Q=i({command:"worker-smoke",describe:"start the TUI background worker and verify it initialises",builder:(o)=>o.option("timeout",{type:"number",describe:"milliseconds to wait for the worker to answer",default:30000}),handler:async(o)=>{let e=typeof globalThis.QITQODE_WORKER_PATH<"u"?globalThis.QITQODE_WORKER_PATH:new URL("../tui/worker.ts",import.meta.url),t=H({[B]:"worker",[z]:_()}),s=new Worker(e,{env:t}),a=new Promise((m,p)=>{s.onerror=(f)=>{p(Error(`worker crashed during startup: ${f.message||String(f.error??"unknown error")}`))},s.addEventListener("close",()=>{p(Error("worker exited before answering ping"))})}),c=new Promise((m,p)=>{setTimeout(()=>p(Error(`worker did not answer ping within ${o.timeout}ms`)),o.timeout)}),l=U(s);try{let m=await Promise.race([l.call("ping",void 0),a,c]);if(m!=="pong")throw Error(`worker answered ping with unexpected reply: ${JSON.stringify(m)}`);console.log("worker initialised: ping ok"),process.exit(0)}catch(m){console.error(m instanceof Error?m.message:String(m)),process.exit(1)}}});var Be=i({command:"debug",describe:"debugging and troubleshooting tools",builder:(o)=>o.command(I).command(q).command(k).command(L).command(T).command($).command(j).command(Z).command(Q).command(Ao).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await n(process.cwd(),async()=>{await new Promise((e)=>setTimeout(e,86400000))})}}).demandCommand(),async handler(){}}),Ao=i({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[o,e]of Object.entries(oo.Path))console.log(o.padEnd(10),e)}});export{Be as DebugCommand};
|
|
2
|
+
import{Qd as n}from"./chunk-vkkz40je.js";import{be as i}from"./chunk-f4mnp6xd.js";import{Ch as r,Pg as y,Qg as w,Zg as R,qh as K,rh as X}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{Oj as V,Pj as W,Sj as C,Uk as J,_j as M,dl as Y,el as F,yk as g}from"./chunk-k1qd8ecm.js";import"./chunk-bhg69t69.js";import{Ml as E,Ol as u}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"./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 U}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"./chunk-fveaq0pb.js";import{As as z,Bs as B,Cs as _,Es as H}from"./chunk-gswhjd1h.js";import"./chunk-wgkcyqn1.js";import{Xs as S}from"./chunk-59csnjc3.js";import{lt as oo}from"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import{YJ as x,fH as d}from"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import{yO as v,zO as P}from"./chunk-e0vrxetq.js";import{EOL as to}from"os";var I=i({command:"config",describe:"show resolved configuration",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(F.Service.use((e)=>e.get()));process.stdout.write(JSON.stringify(o,null,2)+to)})}});import{EOL as b}from"os";var io=i({command:"search <query>",describe:"search files by query",builder:(o)=>o.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.search({query:o.query})));process.stdout.write(e.join(b)+b)})}}),ro=i({command:"read <path>",describe:"read file contents as JSON",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.read(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),no=i({command:"status",describe:"show file status information",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(w.Service.use((e)=>e.status()));process.stdout.write(JSON.stringify(o,null,2)+b)})}}),so=i({command:"list <path>",describe:"list files in a directory",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.list(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),mo=i({command:"tree [dir]",describe:"show directory tree",builder:(o)=>o.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:o.dir,limit:200})));console.log(JSON.stringify(e,null,2))})}}),L=i({command:"file",describe:"file system debugging utilities",builder:(o)=>o.command(ro).command(no).command(so).command(io).command(mo).demandCommand(),async handler(){}});import{EOL as A}from"os";var q=i({command:"lsp",describe:"LSP debugging utilities",builder:(o)=>o.command(ao).command(co).command(lo).demandCommand(),async handler(){}}),ao=i({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(o)=>o.positional("file",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(C.Service.use((t)=>d.gen(function*(){return yield*t.touchFile(o.file,!0),yield*d.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(e,null,2)+A)})}}),co=i({command:"symbols <query>",describe:"search workspace symbols",builder:(o)=>o.positional("query",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.workspaceSymbol(o.query)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}}),lo=i({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(o)=>o.positional("uri",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("document-symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.documentSymbol(o.uri)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}});import{EOL as O}from"os";var k=i({command:"rg",describe:"ripgrep debugging utilities",builder:(o)=>o.command(po).command(uo).command(fo).demandCommand(),async handler(){}}),po=i({command:"tree",describe:"show file tree using ripgrep",builder:(o)=>o.option("limit",{type:"number"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:u.directory,limit:o.limit})));process.stdout.write(e+O)})}}),uo=i({command:"files",describe:"list files using ripgrep",builder:(o)=>o.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(d.gen(function*(){return yield*(yield*y.Service).files({cwd:u.directory,glob:o.glob?[o.glob]:void 0}).pipe(x.take(o.limit??1/0),x.runCollect,d.map((s)=>[...s]))}));process.stdout.write(e.join(O)+O)})}}),fo=i({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(o)=>o.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.search({cwd:u.directory,pattern:o.pattern,glob:o.glob,limit:o.limit})));process.stdout.write(JSON.stringify(e.items,null,2)+O)})}});import{EOL as yo}from"os";var T=i({command:"scrap",describe:"list all known projects",builder:(o)=>o,async handler(){let o=S.Default.time("scrap"),e=await E.list();process.stdout.write(JSON.stringify(e,null,2)+yo),o.stop()}});import{EOL as go}from"os";var $=i({command:"skill",describe:"list all available skills",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(d.gen(function*(){return yield*(yield*R.Service).all()}));process.stdout.write(JSON.stringify(o,null,2)+go)})}});var j=i({command:"snapshot",describe:"snapshot debugging utilities",builder:(o)=>o.command(bo).command(wo).command(So).demandCommand(),async handler(){}}),D=(o)=>n(process.cwd(),async()=>{console.log(await r.runPromise(M.Service.use(o)))}),G=(o)=>o.positional("hash",{type:"string",description:"hash",demandOption:!0}),bo=i({command:"track",describe:"track current snapshot state",async handler(){await D((o)=>o.track())}}),wo=i({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:G,async handler(o){await D((e)=>e.patch(o.hash))}}),So=i({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:G,async handler(o){await D((e)=>e.diff(o.hash))}});import{EOL as h}from"os";import{basename as ho}from"path";var Z=i({command:"agent <name>",describe:"show agent configuration details",builder:(o)=>o.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(o){await n(process.cwd(),async()=>{let e=o.name,t=await r.runPromise(X.Service.use((m)=>m.get(e)));if(!t)process.stderr.write(`Agent ${e} not found, run '${ho(process.execPath)} agent list' to get an agent list`+h),process.exit(1);let s=await Co(t),a=await Oo(t,s),c=o.tool;if(c){let m=s.find((eo)=>eo.id===c);if(!m)process.stderr.write(`Tool ${c} not found for agent ${e}`+h),process.exit(1);if(a[c]===!1)process.stderr.write(`Tool ${c} is disabled for agent ${e}`+h),process.exit(1);let p=vo(o.params),f=await Po(t),N=await m.execute(p,f);process.stdout.write(JSON.stringify({tool:c,input:p,result:N},null,2)+h);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+h)})}});async function Co(o){return r.runPromise(d.gen(function*(){let e=yield*J.Service,t=yield*K.Service,s=o.model??(yield*e.defaultModel());return yield*t.tools({...s,agent:o})}))}async function Oo(o,e){let t=g.disabled(e.map((a)=>a.id),o.permission),s={};for(let a of e)s[a.id]=!t.has(a.id);return s}function vo(o){if(!o)return{};let e=o.trim();if(e.length===0)return{};let t=(()=>{try{return JSON.parse(e)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function Po(o){let{session:e,messageID:t}=await r.runPromise(d.gen(function*(){let a=yield*Y.Service,c=yield*a.create({title:`Debug tool run (${o.name})`}),l=V.ascending(),m=o.model?o.model:yield*d.gen(function*(){return yield*(yield*J.Service).defaultModel()}),p=Date.now(),f={id:l,sessionID:c.id,role:"assistant",time:{created:p},parentID:l,modelID:m.modelID,providerID:m.providerID,mode:"debug",agent:o.name,path:{cwd:u.directory,root:u.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(f),{session:c,messageID:l}})),s=g.merge(o.permission,e.permission??[]);return{sessionID:e.id,messageID:t,callID:W.ascending(),agent:o.name,abort:new AbortController().signal,messages:[],metadata:()=>d.void,ask(a){return d.sync(()=>{for(let c of a.patterns)if(g.evaluate(a.permission,c,s).action==="deny")throw new g.DeniedError({ruleset:s})})}}}var Q=i({command:"worker-smoke",describe:"start the TUI background worker and verify it initialises",builder:(o)=>o.option("timeout",{type:"number",describe:"milliseconds to wait for the worker to answer",default:30000}),handler:async(o)=>{let e=typeof globalThis.QITQODE_WORKER_PATH<"u"?globalThis.QITQODE_WORKER_PATH:new URL("../tui/worker.ts",import.meta.url),t=H({[B]:"worker",[z]:_()}),s=new Worker(e,{env:t}),a=new Promise((m,p)=>{s.onerror=(f)=>{p(Error(`worker crashed during startup: ${f.message||String(f.error??"unknown error")}`))},s.addEventListener("close",()=>{p(Error("worker exited before answering ping"))})}),c=new Promise((m,p)=>{setTimeout(()=>p(Error(`worker did not answer ping within ${o.timeout}ms`)),o.timeout)}),l=U(s);try{let m=await Promise.race([l.call("ping",void 0),a,c]);if(m!=="pong")throw Error(`worker answered ping with unexpected reply: ${JSON.stringify(m)}`);console.log("worker initialised: ping ok"),process.exit(0)}catch(m){console.error(m instanceof Error?m.message:String(m)),process.exit(1)}}});var Be=i({command:"debug",describe:"debugging and troubleshooting tools",builder:(o)=>o.command(I).command(q).command(k).command(L).command(T).command($).command(j).command(Z).command(Q).command(Ao).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await n(process.cwd(),async()=>{await new Promise((e)=>setTimeout(e,86400000))})}}).demandCommand(),async handler(){}}),Ao=i({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[o,e]of Object.entries(oo.Path))console.log(o.padEnd(10),e)}});export{Be as DebugCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pe as F}from"./chunk-
|
|
2
|
+
import{Pe as F}from"./chunk-ynf17943.js";import{$e as z,cf as B,tf as D}from"./chunk-gsg6zn7e.js";import{Tp as x}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import{Kt as q}from"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-e0vrxetq.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as hW,Se as l,Te as jW,Ue as LQ,We as KQ,Ye as GW,Ze as AQ,_e as QQ,bf as OQ,cf as CW,df as IW,ef as KW,ff as P,gf as O,hf as u,if as VW,jf as bQ,kf as WQ,lf as XQ,mf as qQ,nf as DW,of as a,pf as FW,qf as wQ,rf as BQ,sf as wW}from"./chunk-gwrnxcdn.js";import{hr as $W,lr as BW,mr as UQ,rr as JW,tr as ZQ}from"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import{hv as Q}from"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var mW=P(()=>O(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),pW=P(()=>O(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
2
|
+
import{$e as hW,Se as l,Te as jW,Ue as LQ,We as KQ,Ye as GW,Ze as AQ,_e as QQ,bf as OQ,cf as CW,df as IW,ef as KW,ff as P,gf as O,hf as u,if as VW,jf as bQ,kf as WQ,lf as XQ,mf as qQ,nf as DW,of as a,pf as FW,qf as wQ,rf as BQ,sf as wW}from"./chunk-gsg6zn7e.js";import{Kp as $W,Op as BW,Pp as UQ,Up as JW,Wp as ZQ}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import{Kt as Q}from"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-e0vrxetq.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var mW=P(()=>O(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),pW=P(()=>O(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
3
3
|
|
|
4
4
|
`,X=X.slice(1);for(let{role:J,content:w}of X)switch(J){case"system":throw new BW({message:"Unexpected system message in prompt: ${content}",prompt:X});case"user":{let D=w.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");F+=`${Z}:
|
|
5
5
|
${D}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Oe as mt}from"./chunk-qdvnscxm.js";import{Gf as fr,Hf as pt,Kf as ft}from"./chunk-yxttz5z5.js";import{TP as xe}from"./chunk-f2pv705d.js";var br=xe((Ti)=>{var re=ft(),_e=mt(),oi=pt(),be=fr(),Oe=0,Ue=1,me=2,ce=3,Pe=4,ke=5,mr=6,ct=7,gr=20,ut=21,yr=22,ai=23,gt=24,ge=25,ye=26,he=27,yt=31;function Ae(r){return typeof Buffer<"u"?Buffer.alloc(r):new Uint8Array(r)}var xt=Symbol("@smithy/core/cbor::tagSymbol");function wt(r){return r[xt]=!0,r}var ci=typeof TextDecoder<"u",hi=typeof Buffer<"u",O=Ae(0),oe=new DataView(O.buffer,O.byteOffset,O.byteLength),ur=ci?new TextDecoder:null,D=0;function li(r){O=r,oe=new DataView(O.buffer,O.byteOffset,O.byteLength)}function ae(r,t){if(r>=t)throw Error("unexpected end of (decode) payload.");let i=(O[r]&224)>>5,n=O[r]&31;switch(i){case Oe:case Ue:case mr:let l,c;if(n<24)l=n,c=1;else switch(n){case gt:case ge:case ye:case he:let d=wr[n],f=d+1;if(c=f,t-r<f)throw Error(`countLength ${d} greater than remaining buf len.`);let m=r+1;if(d===1)l=O[m];else if(d===2)l=oe.getUint16(m);else if(d===4)l=oe.getUint32(m);else l=oe.getBigUint64(m);break;default:throw Error(`unexpected minor value ${n}.`)}if(i===Oe)return D=c,ht(l);else if(i===Ue){let d;if(typeof l==="bigint")d=BigInt(-1)-l;else d=-1-l;return D=c,ht(d)}else if(n===2||n===3){let d=$e(r+c,t),f=BigInt(0),m=r+c+D;for(let w=m;w<m+d;++w)f=f<<BigInt(8)|BigInt(O[w]);return D=c+D+d,n===3?-f-BigInt(1):f}else if(n===4){let d=ae(r+c,t),[f,m]=d,w=m<0?-1:1,E="0".repeat(Math.abs(f)+1)+String(BigInt(w)*BigInt(m)),S,_=m<0?"-":"";if(S=f===0?E:E.slice(0,E.length+f)+"."+E.slice(f),S=S.replace(/^0+/g,""),S==="")S="0";if(S[0]===".")S="0"+S;return S=_+S,D=c+D,re.nv(S)}else{let d=ae(r+c,t);return D=c+D,wt({tag:ht(l),value:d})}case ce:case ke:case Pe:case me:if(n===yt)switch(i){case ce:return fi(r,t);case ke:return wi(r,t);case Pe:return yi(r,t);case me:return mi(r,t)}else switch(i){case ce:return pi(r,t);case ke:return xi(r,t);case Pe:return gi(r,t);case me:return Et(r,t)}default:return Ei(r,t)}}function xr(r,t,i){if(hi&&r.constructor?.name==="Buffer")return r.toString("utf-8",t,i);if(ur)return ur.decode(r.subarray(t,i));return re.toUtf8(r.subarray(t,i))}function ui(r){let t=Number(r);if(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)console.warn(Error(`@smithy/core/cbor - truncating BigInt(${r}) to ${t} with loss of precision.`));return t}var wr={[gt]:1,[ge]:2,[ye]:4,[he]:8};function di(r,t){let i=r>>7,n=(r&124)>>2,l=(r&3)<<8|t,c=i===0?1:-1,d,f;if(n===0)if(l===0)return 0;else d=Math.pow(2,-14),f=0;else if(n===31)if(l===0)return c*(1/0);else return NaN;else d=Math.pow(2,n-15),f=1;return f+=l/1024,c*(d*f)}function $e(r,t){let i=O[r]&31;if(i<24)return D=1,i;if(i===gt||i===ge||i===ye||i===he){let n=wr[i];if(D=n+1,t-r<D)throw Error(`countLength ${n} greater than remaining buf len.`);let l=r+1;if(n===1)return O[l];else if(n===2)return oe.getUint16(l);else if(n===4)return oe.getUint32(l);return ui(oe.getBigUint64(l))}throw Error(`unexpected minor value ${i}.`)}function pi(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`string len ${i} greater than remaining buf len.`);let l=xr(O,r,r+i);return D=n+i,l}function fi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,xr(m,0,m.length)}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==ce)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function Et(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`unstructured byte string len ${i} greater than remaining buf len.`);let l=O.subarray(r,r+i);return D=n+i,l}function mi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,m}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==me)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function gi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c=Array(i);for(let d=0;d<i;++d){let f=ae(r,t),m=D;c[d]=f,r+=m}return D=n+(r-l),c}function yi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255)return D=r-n+2,i;let l=ae(r,t);r+=D,i.push(l)}throw Error("expected break marker.")}function xi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c={};for(let d=0;d<i;++d){if(r>=t)throw Error("unexpected end of map payload.");let f=(O[r]&224)>>5;if(f!==ce)throw Error(`unexpected major type ${f} for map key at index ${r}.`);let m=ae(r,t);r+=D;let w=ae(r,t);r+=D,c[m]=w}return D=n+(r-l),c}function wi(r,t){r+=1;let i=r,n={};for(;r<t;){if(r>=t)throw Error("unexpected end of map payload.");if(O[r]===255)return D=r-i+2,n;let l=(O[r]&224)>>5;if(l!==ce)throw Error(`unexpected major type ${l} for map key.`);let c=ae(r,t);r+=D;let d=ae(r,t);r+=D,n[c]=d}throw Error("expected break marker.")}function Ei(r,t){let i=O[r]&31;switch(i){case ut:case gr:return D=1,i===ut;case yr:return D=1,null;case ai:return D=1,null;case ge:if(t-r<3)throw Error("incomplete float16 at end of buf.");return D=3,di(O[r+1],O[r+2]);case ye:if(t-r<5)throw Error("incomplete float32 at end of buf.");return D=5,oe.getFloat32(r+1);case he:if(t-r<9)throw Error("incomplete float64 at end of buf.");return D=9,oe.getFloat64(r+1);default:throw Error(`unexpected minor value ${i}.`)}}function ht(r){if(typeof r==="number")return r;let t=Number(r);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER)return t;return r}var dr=typeof Buffer<"u",Ni=2048,$=Ae(Ni),ne=new DataView($.buffer,$.byteOffset,$.byteLength),C=0;function lt(r){if($.byteLength-C<r)if(C<16000000)dt(Math.max($.byteLength*4,$.byteLength+r));else dt($.byteLength+r+16000000)}function pr(){let r=Ae(C);return r.set($.subarray(0,C),0),C=0,r}function dt(r){let t=$;if($=Ae(r),t)if(t.copy)t.copy($,0,0,t.byteLength);else $.set(t,0);ne=new DataView($.buffer,$.byteOffset,$.byteLength)}function ie(r,t){if(t<24)$[C++]=r<<5|t;else if(t<256)$[C++]=r<<5|24,$[C++]=t;else if(t<65536)$[C++]=r<<5|ge,ne.setUint16(C,t),C+=2;else if(t<4294967296)$[C++]=r<<5|ye,ne.setUint32(C,t),C+=4;else $[C++]=r<<5|he,ne.setBigUint64(C,typeof t==="bigint"?t:BigInt(t)),C+=8}function Si(r){let t=[r];while(t.length){let i=t.pop();if(lt(typeof i==="string"?i.length*4:64),typeof i==="string"){if(dr)ie(ce,Buffer.byteLength(i)),C+=$.write(i,C);else{let n=re.fromUtf8(i);ie(ce,n.byteLength),$.set(n,C),C+=n.byteLength}continue}else if(typeof i==="number"){if(Number.isInteger(i)){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-1;if(c<24)$[C++]=l<<5|c;else if(c<256)$[C++]=l<<5|24,$[C++]=c;else if(c<65536)$[C++]=l<<5|ge,$[C++]=c>>8,$[C++]=c;else if(c<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,c),C+=4;else $[C++]=l<<5|he,ne.setBigUint64(C,BigInt(c)),C+=8;continue}$[C++]=ct<<5|he,ne.setFloat64(C,i),C+=8;continue}else if(typeof i==="bigint"){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-BigInt(1),d=Number(c);if(d<24)$[C++]=l<<5|d;else if(d<256)$[C++]=l<<5|24,$[C++]=d;else if(d<65536)$[C++]=l<<5|ge,$[C++]=d>>8,$[C++]=d&255;else if(d<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,d),C+=4;else if(c<BigInt("18446744073709551616"))$[C++]=l<<5|he,ne.setBigUint64(C,c),C+=8;else{let f=c.toString(2),m=new Uint8Array(Math.ceil(f.length/8)),w=c,E=0;while(m.byteLength-++E>=0)m[m.byteLength-E]=Number(w&BigInt(255)),w>>=BigInt(8);if(lt(m.byteLength*2),$[C++]=n?194:195,dr)ie(me,Buffer.byteLength(m));else ie(me,m.byteLength);$.set(m,C),C+=m.byteLength}continue}else if(i===null){$[C++]=ct<<5|yr;continue}else if(typeof i==="boolean"){$[C++]=ct<<5|(i?ut:gr);continue}else if(typeof i>"u")throw Error("@smithy/core/cbor: client may not serialize undefined value.");else if(Array.isArray(i)){for(let n=i.length-1;n>=0;--n)t.push(i[n]);ie(Pe,i.length);continue}else if(typeof i.byteLength==="number"){lt(i.length*2),ie(me,i.length),$.set(i,C),C+=i.byteLength;continue}else if(typeof i==="object"){if(i instanceof re.NumericValue){let l=i.string.indexOf("."),c=l===-1?0:l-i.string.length+1,d=BigInt(i.string.replace(".",""));$[C++]=196,t.push(d),t.push(c),ie(Pe,2);continue}if(i[xt])if("tag"in i&&"value"in i){t.push(i.value),ie(mr,i.tag);continue}else throw Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(i));let n=Object.keys(i);for(let l=n.length-1;l>=0;--l){let c=n[l];t.push(i[c]),t.push(c)}ie(ke,n.length);continue}throw Error(`data type ${i?.constructor?.name??typeof i} not compatible for encoding.`)}}var Ve={deserialize(r){return li(r),ae(0,r.length)},serialize(r){try{return Si(r),pr()}catch(t){throw pr(),t}},resizeEncodingBuffer(r){dt(r)}},Er=(r,t)=>{return _e.collectBody(r,t).then(async(i)=>{if(i.length)try{return Ve.deserialize(i)}catch(n){throw Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(i)}),n}return{}})},ze=(r)=>{return wt({tag:1,value:r.getTime()/1000})},bi=async(r,t)=>{let i=await Er(r,t);return i.message=i.message??i.Message,i},Nr=(r,t)=>{let i=(l)=>{let c=l;if(typeof c==="number")c=c.toString();if(c.indexOf(",")>=0)c=c.split(",")[0];if(c.indexOf(":")>=0)c=c.split(":")[0];if(c.indexOf("#")>=0)c=c.split("#")[1];return c};if(t.__type!==void 0)return i(t.__type);let n;for(let l in t)if(l.toLowerCase()==="code"){n=l;break}if(n&&t[n]!==void 0)return i(t[n])},_i=(r)=>{if(String(r.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor")throw Error("Malformed RPCv2 CBOR response, status: "+r.statusCode)},Ai=async(r,t,i,n,l)=>{let c=await r.endpoint(),{hostname:d,protocol:f="https",port:m,path:w}=c,E={protocol:f,hostname:d,port:m,method:"POST",path:w.endsWith("/")?w.slice(0,-1)+i:w+i,headers:{...t}};if(n!==void 0)E.hostname=n;if(c.headers)for(let S in c.headers)E.headers[S]=c.headers[S];if(l!==void 0){E.body=l;try{E.headers["content-length"]=String(re.calculateBodyLength(l))}catch(S){}}return new _e.HttpRequest(E)};class Nt extends _e.SerdeContext{createSerializer(){let r=new St;return r.setSerdeContext(this.serdeContext),r}createDeserializer(){let r=new bt;return r.setSerdeContext(this.serdeContext),r}}class St extends _e.SerdeContext{value;write(r,t){this.value=this.serialize(r,t)}serialize(r,t){let i=be.NormalizedSchema.of(r);if(t==null){if(i.isIdempotencyToken())return re.generateIdempotencyToken();return t}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(i.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint")return ze(new Date(Number(t)/1000|0));return ze(t)}if(typeof t==="function"||typeof t==="object"){let n=t;if(i.isListSchema()&&Array.isArray(n)){let c=!!i.getMergedTraits().sparse,d=[],f=0;for(let m of n){let w=this.serialize(i.getValueSchema(),m);if(w!=null||c)d[f++]=w}return d}if(n instanceof Date)return ze(n);let l={};if(i.isMapSchema()){let c=!!i.getMergedTraits().sparse;for(let d in n){let f=this.serialize(i.getValueSchema(),n[d]);if(f!=null||c)l[d]=f}}else if(i.isStructSchema()){for(let[d,f]of i.structIterator()){let m=this.serialize(f,n[d]);if(m!=null)l[d]=m}if(i.isUnionSchema()&&Array.isArray(n.$unknown)){let[d,f]=n.$unknown;l[d]=f}else if(typeof n.__type==="string"){for(let d in n)if(!(d in l))l[d]=this.serialize(15,n[d])}}else if(i.isDocumentSchema())for(let c in n)l[c]=this.serialize(i.getValueSchema(),n[c]);else if(i.isBigDecimalSchema())return n;return l}return t}flush(){let r=Ve.serialize(this.value);return this.value=void 0,r}}class bt extends _e.SerdeContext{read(r,t){let i=Ve.deserialize(t);return this.readValue(r,i)}readValue(r,t){let i=be.NormalizedSchema.of(r);if(i.isTimestampSchema()){if(typeof t==="number")return re._parseEpochTimestamp(t);if(typeof t==="object"){if(t.tag===1&&"value"in t)return re._parseEpochTimestamp(t.value)}}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(typeof t>"u"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol")return t;else if(typeof t==="object"){if(t===null)return null;if("byteLength"in t)return t;if(t instanceof Date)return t;if(i.isDocumentSchema())return t;if(i.isListSchema()){let l=[],c=i.getValueSchema();for(let d of t){let f=this.readValue(c,d);l.push(f)}return l}let n={};if(i.isMapSchema()){let l=i.getValueSchema();for(let c in t){let d=this.readValue(l,t[c]);n[c]=d}}else if(i.isStructSchema()){let l=i.isUnionSchema(),c;if(l){c=new Set;for(let d in t)if(d!=="__type")c.add(d)}for(let[d,f]of i.structIterator()){if(l)c.delete(d);if(t[d]!=null)n[d]=this.readValue(f,t[d])}if(l&&c?.size===1){let d=!0;for(let f in n){d=!1;break}if(d){let f=c.values().next().value;n.$unknown=[f,t[f]]}}else if(typeof t.__type==="string"){for(let d in t)if(!(d in n))n[d]=t[d]}}else if(t instanceof re.NumericValue)return t;return n}else return t}}class Sr extends _e.RpcProtocol{codec=new Nt;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:r,errorTypeRegistries:t}){super({defaultNamespace:r,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(r,t,i){let n=await super.serializeRequest(r,t,i);if(Object.assign(n.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),be.deref(r.input)==="unit")delete n.body,delete n.headers["content-type"];else{if(!n.body)this.serializer.write(15,{}),n.body=this.serializer.flush();try{n.headers["content-length"]=String(n.body.byteLength)}catch(f){}}let{service:l,operation:c}=oi.getSmithyContext(i),d=`/service/${l}/operation/${c}`;if(n.path.endsWith("/"))n.path+=d.slice(1);else n.path+=d;return n}async deserializeResponse(r,t,i){return super.deserializeResponse(r,t,i)}async handleError(r,t,i,n,l){let c=Nr(i,n)??"Unknown",d={$metadata:l,$fault:i.statusCode<=500?"client":"server"},f=this.options.defaultNamespace;if(c.includes("#"))[f]=c.split("#");let m=this.compositeErrorRegistry,w=be.TypeRegistry.for(f);m.copyFrom(w);let E;try{E=m.getSchema(c)}catch(V){if(n.Message)n.message=n.Message;let B=be.TypeRegistry.for("smithy.ts.sdk.synthetic."+f);m.copyFrom(B);let Z=m.getBaseException();if(Z){let L=m.getErrorCtor(Z);throw Object.assign(new L({name:c}),d,n)}throw Object.assign(Error(c),d,n)}let S=be.NormalizedSchema.of(E),_=m.getErrorCtor(E),A=n.message??n.Message??"Unknown",I=new _({}),P={};for(let[V,B]of S.structIterator())P[V]=this.deserializer.readValue(B,n[V]);throw Object.assign(I,d,{$fault:S.getMergedTraits().error,message:A},P)}getDefaultContentType(){return"application/cbor"}}Ti.CborCodec=Nt;Ti.CborShapeDeserializer=bt;Ti.CborShapeSerializer=St;Ti.SmithyRpcV2CborProtocol=Sr;Ti.buildHttpRpcRequest=Ai;Ti.cbor=Ve;Ti.checkCborResponse=_i;Ti.dateToTag=ze;Ti.loadSmithyRpcV2CborErrorCode=Nr;Ti.parseCborBody=Er;Ti.parseCborErrorBody=bi;Ti.tag=wt;Ti.tagSymbol=xt});var Ar=xe((vo,_r)=>{(()=>{var r={d:(e,s)=>{for(var o in s)r.o(s,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s),r:(e)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};r.r(t),r.d(t,{XMLBuilder:()=>ii,XMLParser:()=>ir,XMLValidator:()=>ni});let i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function l(e,s){let o=[],a=s.exec(e);for(;a;){let h=[];h.startIndex=s.lastIndex-a[0].length;let u=a.length;for(let x=0;x<u;x++)h.push(a[x]);o.push(h),a=s.exec(e)}return o}let c=function(e){return n.exec(e)!=null},d=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],f=["__proto__","constructor","prototype"],m={allowBooleanAttributes:!1,unpairedTags:[]};function w(e,s){s=Object.assign({},m,s);let o=[],a=!1,h=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=S(e,u),u.err)return u}else{if(e[u]!=="<"){if(E(e[u]))continue;return L("InvalidChar","char '"+e[u]+"' is not expected.",F(e,u))}{let x=u;if(u++,e[u]==="!"){u=_(e,u);continue}{let p=!1;e[u]==="/"&&(p=!0,u++);let y="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!=="\t"&&e[u]!==`
|
|
2
|
+
import{Oe as mt}from"./chunk-0a4pmkc9.js";import{Gf as fr,Hf as pt,Kf as ft}from"./chunk-35fj1sfm.js";import{uO as xe}from"./chunk-e0vrxetq.js";var br=xe((Ti)=>{var re=ft(),_e=mt(),oi=pt(),be=fr(),Oe=0,Ue=1,me=2,ce=3,Pe=4,ke=5,mr=6,ct=7,gr=20,ut=21,yr=22,ai=23,gt=24,ge=25,ye=26,he=27,yt=31;function Ae(r){return typeof Buffer<"u"?Buffer.alloc(r):new Uint8Array(r)}var xt=Symbol("@smithy/core/cbor::tagSymbol");function wt(r){return r[xt]=!0,r}var ci=typeof TextDecoder<"u",hi=typeof Buffer<"u",O=Ae(0),oe=new DataView(O.buffer,O.byteOffset,O.byteLength),ur=ci?new TextDecoder:null,D=0;function li(r){O=r,oe=new DataView(O.buffer,O.byteOffset,O.byteLength)}function ae(r,t){if(r>=t)throw Error("unexpected end of (decode) payload.");let i=(O[r]&224)>>5,n=O[r]&31;switch(i){case Oe:case Ue:case mr:let l,c;if(n<24)l=n,c=1;else switch(n){case gt:case ge:case ye:case he:let d=wr[n],f=d+1;if(c=f,t-r<f)throw Error(`countLength ${d} greater than remaining buf len.`);let m=r+1;if(d===1)l=O[m];else if(d===2)l=oe.getUint16(m);else if(d===4)l=oe.getUint32(m);else l=oe.getBigUint64(m);break;default:throw Error(`unexpected minor value ${n}.`)}if(i===Oe)return D=c,ht(l);else if(i===Ue){let d;if(typeof l==="bigint")d=BigInt(-1)-l;else d=-1-l;return D=c,ht(d)}else if(n===2||n===3){let d=$e(r+c,t),f=BigInt(0),m=r+c+D;for(let w=m;w<m+d;++w)f=f<<BigInt(8)|BigInt(O[w]);return D=c+D+d,n===3?-f-BigInt(1):f}else if(n===4){let d=ae(r+c,t),[f,m]=d,w=m<0?-1:1,E="0".repeat(Math.abs(f)+1)+String(BigInt(w)*BigInt(m)),S,_=m<0?"-":"";if(S=f===0?E:E.slice(0,E.length+f)+"."+E.slice(f),S=S.replace(/^0+/g,""),S==="")S="0";if(S[0]===".")S="0"+S;return S=_+S,D=c+D,re.nv(S)}else{let d=ae(r+c,t);return D=c+D,wt({tag:ht(l),value:d})}case ce:case ke:case Pe:case me:if(n===yt)switch(i){case ce:return fi(r,t);case ke:return wi(r,t);case Pe:return yi(r,t);case me:return mi(r,t)}else switch(i){case ce:return pi(r,t);case ke:return xi(r,t);case Pe:return gi(r,t);case me:return Et(r,t)}default:return Ei(r,t)}}function xr(r,t,i){if(hi&&r.constructor?.name==="Buffer")return r.toString("utf-8",t,i);if(ur)return ur.decode(r.subarray(t,i));return re.toUtf8(r.subarray(t,i))}function ui(r){let t=Number(r);if(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)console.warn(Error(`@smithy/core/cbor - truncating BigInt(${r}) to ${t} with loss of precision.`));return t}var wr={[gt]:1,[ge]:2,[ye]:4,[he]:8};function di(r,t){let i=r>>7,n=(r&124)>>2,l=(r&3)<<8|t,c=i===0?1:-1,d,f;if(n===0)if(l===0)return 0;else d=Math.pow(2,-14),f=0;else if(n===31)if(l===0)return c*(1/0);else return NaN;else d=Math.pow(2,n-15),f=1;return f+=l/1024,c*(d*f)}function $e(r,t){let i=O[r]&31;if(i<24)return D=1,i;if(i===gt||i===ge||i===ye||i===he){let n=wr[i];if(D=n+1,t-r<D)throw Error(`countLength ${n} greater than remaining buf len.`);let l=r+1;if(n===1)return O[l];else if(n===2)return oe.getUint16(l);else if(n===4)return oe.getUint32(l);return ui(oe.getBigUint64(l))}throw Error(`unexpected minor value ${i}.`)}function pi(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`string len ${i} greater than remaining buf len.`);let l=xr(O,r,r+i);return D=n+i,l}function fi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,xr(m,0,m.length)}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==ce)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function Et(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`unstructured byte string len ${i} greater than remaining buf len.`);let l=O.subarray(r,r+i);return D=n+i,l}function mi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,m}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==me)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function gi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c=Array(i);for(let d=0;d<i;++d){let f=ae(r,t),m=D;c[d]=f,r+=m}return D=n+(r-l),c}function yi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255)return D=r-n+2,i;let l=ae(r,t);r+=D,i.push(l)}throw Error("expected break marker.")}function xi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c={};for(let d=0;d<i;++d){if(r>=t)throw Error("unexpected end of map payload.");let f=(O[r]&224)>>5;if(f!==ce)throw Error(`unexpected major type ${f} for map key at index ${r}.`);let m=ae(r,t);r+=D;let w=ae(r,t);r+=D,c[m]=w}return D=n+(r-l),c}function wi(r,t){r+=1;let i=r,n={};for(;r<t;){if(r>=t)throw Error("unexpected end of map payload.");if(O[r]===255)return D=r-i+2,n;let l=(O[r]&224)>>5;if(l!==ce)throw Error(`unexpected major type ${l} for map key.`);let c=ae(r,t);r+=D;let d=ae(r,t);r+=D,n[c]=d}throw Error("expected break marker.")}function Ei(r,t){let i=O[r]&31;switch(i){case ut:case gr:return D=1,i===ut;case yr:return D=1,null;case ai:return D=1,null;case ge:if(t-r<3)throw Error("incomplete float16 at end of buf.");return D=3,di(O[r+1],O[r+2]);case ye:if(t-r<5)throw Error("incomplete float32 at end of buf.");return D=5,oe.getFloat32(r+1);case he:if(t-r<9)throw Error("incomplete float64 at end of buf.");return D=9,oe.getFloat64(r+1);default:throw Error(`unexpected minor value ${i}.`)}}function ht(r){if(typeof r==="number")return r;let t=Number(r);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER)return t;return r}var dr=typeof Buffer<"u",Ni=2048,$=Ae(Ni),ne=new DataView($.buffer,$.byteOffset,$.byteLength),C=0;function lt(r){if($.byteLength-C<r)if(C<16000000)dt(Math.max($.byteLength*4,$.byteLength+r));else dt($.byteLength+r+16000000)}function pr(){let r=Ae(C);return r.set($.subarray(0,C),0),C=0,r}function dt(r){let t=$;if($=Ae(r),t)if(t.copy)t.copy($,0,0,t.byteLength);else $.set(t,0);ne=new DataView($.buffer,$.byteOffset,$.byteLength)}function ie(r,t){if(t<24)$[C++]=r<<5|t;else if(t<256)$[C++]=r<<5|24,$[C++]=t;else if(t<65536)$[C++]=r<<5|ge,ne.setUint16(C,t),C+=2;else if(t<4294967296)$[C++]=r<<5|ye,ne.setUint32(C,t),C+=4;else $[C++]=r<<5|he,ne.setBigUint64(C,typeof t==="bigint"?t:BigInt(t)),C+=8}function Si(r){let t=[r];while(t.length){let i=t.pop();if(lt(typeof i==="string"?i.length*4:64),typeof i==="string"){if(dr)ie(ce,Buffer.byteLength(i)),C+=$.write(i,C);else{let n=re.fromUtf8(i);ie(ce,n.byteLength),$.set(n,C),C+=n.byteLength}continue}else if(typeof i==="number"){if(Number.isInteger(i)){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-1;if(c<24)$[C++]=l<<5|c;else if(c<256)$[C++]=l<<5|24,$[C++]=c;else if(c<65536)$[C++]=l<<5|ge,$[C++]=c>>8,$[C++]=c;else if(c<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,c),C+=4;else $[C++]=l<<5|he,ne.setBigUint64(C,BigInt(c)),C+=8;continue}$[C++]=ct<<5|he,ne.setFloat64(C,i),C+=8;continue}else if(typeof i==="bigint"){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-BigInt(1),d=Number(c);if(d<24)$[C++]=l<<5|d;else if(d<256)$[C++]=l<<5|24,$[C++]=d;else if(d<65536)$[C++]=l<<5|ge,$[C++]=d>>8,$[C++]=d&255;else if(d<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,d),C+=4;else if(c<BigInt("18446744073709551616"))$[C++]=l<<5|he,ne.setBigUint64(C,c),C+=8;else{let f=c.toString(2),m=new Uint8Array(Math.ceil(f.length/8)),w=c,E=0;while(m.byteLength-++E>=0)m[m.byteLength-E]=Number(w&BigInt(255)),w>>=BigInt(8);if(lt(m.byteLength*2),$[C++]=n?194:195,dr)ie(me,Buffer.byteLength(m));else ie(me,m.byteLength);$.set(m,C),C+=m.byteLength}continue}else if(i===null){$[C++]=ct<<5|yr;continue}else if(typeof i==="boolean"){$[C++]=ct<<5|(i?ut:gr);continue}else if(typeof i>"u")throw Error("@smithy/core/cbor: client may not serialize undefined value.");else if(Array.isArray(i)){for(let n=i.length-1;n>=0;--n)t.push(i[n]);ie(Pe,i.length);continue}else if(typeof i.byteLength==="number"){lt(i.length*2),ie(me,i.length),$.set(i,C),C+=i.byteLength;continue}else if(typeof i==="object"){if(i instanceof re.NumericValue){let l=i.string.indexOf("."),c=l===-1?0:l-i.string.length+1,d=BigInt(i.string.replace(".",""));$[C++]=196,t.push(d),t.push(c),ie(Pe,2);continue}if(i[xt])if("tag"in i&&"value"in i){t.push(i.value),ie(mr,i.tag);continue}else throw Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(i));let n=Object.keys(i);for(let l=n.length-1;l>=0;--l){let c=n[l];t.push(i[c]),t.push(c)}ie(ke,n.length);continue}throw Error(`data type ${i?.constructor?.name??typeof i} not compatible for encoding.`)}}var Ve={deserialize(r){return li(r),ae(0,r.length)},serialize(r){try{return Si(r),pr()}catch(t){throw pr(),t}},resizeEncodingBuffer(r){dt(r)}},Er=(r,t)=>{return _e.collectBody(r,t).then(async(i)=>{if(i.length)try{return Ve.deserialize(i)}catch(n){throw Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(i)}),n}return{}})},ze=(r)=>{return wt({tag:1,value:r.getTime()/1000})},bi=async(r,t)=>{let i=await Er(r,t);return i.message=i.message??i.Message,i},Nr=(r,t)=>{let i=(l)=>{let c=l;if(typeof c==="number")c=c.toString();if(c.indexOf(",")>=0)c=c.split(",")[0];if(c.indexOf(":")>=0)c=c.split(":")[0];if(c.indexOf("#")>=0)c=c.split("#")[1];return c};if(t.__type!==void 0)return i(t.__type);let n;for(let l in t)if(l.toLowerCase()==="code"){n=l;break}if(n&&t[n]!==void 0)return i(t[n])},_i=(r)=>{if(String(r.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor")throw Error("Malformed RPCv2 CBOR response, status: "+r.statusCode)},Ai=async(r,t,i,n,l)=>{let c=await r.endpoint(),{hostname:d,protocol:f="https",port:m,path:w}=c,E={protocol:f,hostname:d,port:m,method:"POST",path:w.endsWith("/")?w.slice(0,-1)+i:w+i,headers:{...t}};if(n!==void 0)E.hostname=n;if(c.headers)for(let S in c.headers)E.headers[S]=c.headers[S];if(l!==void 0){E.body=l;try{E.headers["content-length"]=String(re.calculateBodyLength(l))}catch(S){}}return new _e.HttpRequest(E)};class Nt extends _e.SerdeContext{createSerializer(){let r=new St;return r.setSerdeContext(this.serdeContext),r}createDeserializer(){let r=new bt;return r.setSerdeContext(this.serdeContext),r}}class St extends _e.SerdeContext{value;write(r,t){this.value=this.serialize(r,t)}serialize(r,t){let i=be.NormalizedSchema.of(r);if(t==null){if(i.isIdempotencyToken())return re.generateIdempotencyToken();return t}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(i.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint")return ze(new Date(Number(t)/1000|0));return ze(t)}if(typeof t==="function"||typeof t==="object"){let n=t;if(i.isListSchema()&&Array.isArray(n)){let c=!!i.getMergedTraits().sparse,d=[],f=0;for(let m of n){let w=this.serialize(i.getValueSchema(),m);if(w!=null||c)d[f++]=w}return d}if(n instanceof Date)return ze(n);let l={};if(i.isMapSchema()){let c=!!i.getMergedTraits().sparse;for(let d in n){let f=this.serialize(i.getValueSchema(),n[d]);if(f!=null||c)l[d]=f}}else if(i.isStructSchema()){for(let[d,f]of i.structIterator()){let m=this.serialize(f,n[d]);if(m!=null)l[d]=m}if(i.isUnionSchema()&&Array.isArray(n.$unknown)){let[d,f]=n.$unknown;l[d]=f}else if(typeof n.__type==="string"){for(let d in n)if(!(d in l))l[d]=this.serialize(15,n[d])}}else if(i.isDocumentSchema())for(let c in n)l[c]=this.serialize(i.getValueSchema(),n[c]);else if(i.isBigDecimalSchema())return n;return l}return t}flush(){let r=Ve.serialize(this.value);return this.value=void 0,r}}class bt extends _e.SerdeContext{read(r,t){let i=Ve.deserialize(t);return this.readValue(r,i)}readValue(r,t){let i=be.NormalizedSchema.of(r);if(i.isTimestampSchema()){if(typeof t==="number")return re._parseEpochTimestamp(t);if(typeof t==="object"){if(t.tag===1&&"value"in t)return re._parseEpochTimestamp(t.value)}}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(typeof t>"u"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol")return t;else if(typeof t==="object"){if(t===null)return null;if("byteLength"in t)return t;if(t instanceof Date)return t;if(i.isDocumentSchema())return t;if(i.isListSchema()){let l=[],c=i.getValueSchema();for(let d of t){let f=this.readValue(c,d);l.push(f)}return l}let n={};if(i.isMapSchema()){let l=i.getValueSchema();for(let c in t){let d=this.readValue(l,t[c]);n[c]=d}}else if(i.isStructSchema()){let l=i.isUnionSchema(),c;if(l){c=new Set;for(let d in t)if(d!=="__type")c.add(d)}for(let[d,f]of i.structIterator()){if(l)c.delete(d);if(t[d]!=null)n[d]=this.readValue(f,t[d])}if(l&&c?.size===1){let d=!0;for(let f in n){d=!1;break}if(d){let f=c.values().next().value;n.$unknown=[f,t[f]]}}else if(typeof t.__type==="string"){for(let d in t)if(!(d in n))n[d]=t[d]}}else if(t instanceof re.NumericValue)return t;return n}else return t}}class Sr extends _e.RpcProtocol{codec=new Nt;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:r,errorTypeRegistries:t}){super({defaultNamespace:r,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(r,t,i){let n=await super.serializeRequest(r,t,i);if(Object.assign(n.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),be.deref(r.input)==="unit")delete n.body,delete n.headers["content-type"];else{if(!n.body)this.serializer.write(15,{}),n.body=this.serializer.flush();try{n.headers["content-length"]=String(n.body.byteLength)}catch(f){}}let{service:l,operation:c}=oi.getSmithyContext(i),d=`/service/${l}/operation/${c}`;if(n.path.endsWith("/"))n.path+=d.slice(1);else n.path+=d;return n}async deserializeResponse(r,t,i){return super.deserializeResponse(r,t,i)}async handleError(r,t,i,n,l){let c=Nr(i,n)??"Unknown",d={$metadata:l,$fault:i.statusCode<=500?"client":"server"},f=this.options.defaultNamespace;if(c.includes("#"))[f]=c.split("#");let m=this.compositeErrorRegistry,w=be.TypeRegistry.for(f);m.copyFrom(w);let E;try{E=m.getSchema(c)}catch(V){if(n.Message)n.message=n.Message;let B=be.TypeRegistry.for("smithy.ts.sdk.synthetic."+f);m.copyFrom(B);let Z=m.getBaseException();if(Z){let L=m.getErrorCtor(Z);throw Object.assign(new L({name:c}),d,n)}throw Object.assign(Error(c),d,n)}let S=be.NormalizedSchema.of(E),_=m.getErrorCtor(E),A=n.message??n.Message??"Unknown",I=new _({}),P={};for(let[V,B]of S.structIterator())P[V]=this.deserializer.readValue(B,n[V]);throw Object.assign(I,d,{$fault:S.getMergedTraits().error,message:A},P)}getDefaultContentType(){return"application/cbor"}}Ti.CborCodec=Nt;Ti.CborShapeDeserializer=bt;Ti.CborShapeSerializer=St;Ti.SmithyRpcV2CborProtocol=Sr;Ti.buildHttpRpcRequest=Ai;Ti.cbor=Ve;Ti.checkCborResponse=_i;Ti.dateToTag=ze;Ti.loadSmithyRpcV2CborErrorCode=Nr;Ti.parseCborBody=Er;Ti.parseCborErrorBody=bi;Ti.tag=wt;Ti.tagSymbol=xt});var Ar=xe((vo,_r)=>{(()=>{var r={d:(e,s)=>{for(var o in s)r.o(s,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s),r:(e)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};r.r(t),r.d(t,{XMLBuilder:()=>ii,XMLParser:()=>ir,XMLValidator:()=>ni});let i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function l(e,s){let o=[],a=s.exec(e);for(;a;){let h=[];h.startIndex=s.lastIndex-a[0].length;let u=a.length;for(let x=0;x<u;x++)h.push(a[x]);o.push(h),a=s.exec(e)}return o}let c=function(e){return n.exec(e)!=null},d=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],f=["__proto__","constructor","prototype"],m={allowBooleanAttributes:!1,unpairedTags:[]};function w(e,s){s=Object.assign({},m,s);let o=[],a=!1,h=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=S(e,u),u.err)return u}else{if(e[u]!=="<"){if(E(e[u]))continue;return L("InvalidChar","char '"+e[u]+"' is not expected.",F(e,u))}{let x=u;if(u++,e[u]==="!"){u=_(e,u);continue}{let p=!1;e[u]==="/"&&(p=!0,u++);let y="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!=="\t"&&e[u]!==`
|
|
3
3
|
`&&e[u]!=="\r";u++)y+=e[u];if(y=y.trim(),y[y.length-1]==="/"&&(y=y.substring(0,y.length-1),u--),!Ye(y)){let b;return b=y.trim().length===0?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",L("InvalidTag",b,F(e,u))}let g=P(e,u);if(g===!1)return L("InvalidAttr","Attributes for '"+y+"' have open quote.",F(e,u));let N=g.value;if(u=g.index,N[N.length-1]==="/"){let b=u-N.length;N=N.substring(0,N.length-1);let T=B(N,s);if(T!==!0)return L(T.err.code,T.err.msg,F(e,b+T.err.line));a=!0}else if(p){if(!g.tagClosed)return L("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",F(e,u));if(N.trim().length>0)return L("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",F(e,x));if(o.length===0)return L("InvalidTag","Closing tag '"+y+"' has not been opened.",F(e,x));{let b=o.pop();if(y!==b.tagName){let T=F(e,b.tagStartPos);return L("InvalidTag","Expected closing tag '"+b.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+y+"'.",F(e,x))}o.length==0&&(h=!0)}}else{let b=B(N,s);if(b!==!0)return L(b.err.code,b.err.msg,F(e,u-N.length+b.err.line));if(h===!0)return L("InvalidXml","Multiple possible root nodes found.",F(e,u));s.unpairedTags.indexOf(y)!==-1||o.push({tagName:y,tagStartPos:x}),a=!0}for(u++;u<e.length;u++)if(e[u]==="<"){if(e[u+1]==="!"){u++,u=_(e,u);continue}if(e[u+1]!=="?")break;if(u=S(e,++u),u.err)return u}else if(e[u]==="&"){let b=Z(e,u);if(b==-1)return L("InvalidChar","char '&' is not expected.",F(e,u));u=b}else if(h===!0&&!E(e[u]))return L("InvalidXml","Extra text at the end",F(e,u));e[u]==="<"&&u--}}}return a?o.length==1?L("InvalidTag","Unclosed tag '"+o[0].tagName+"'.",F(e,o[0].tagStartPos)):!(o.length>0)||L("InvalidXml","Invalid '"+JSON.stringify(o.map((u)=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):L("InvalidXml","Start tag expected.",1)}function E(e){return e===" "||e==="\t"||e===`
|
|
4
4
|
`||e==="\r"}function S(e,s){let o=s;for(;s<e.length;s++)if(e[s]=="?"||e[s]==" "){let a=e.substr(o,s-o);if(s>5&&a==="xml")return L("InvalidXml","XML declaration allowed only at the start of the document.",F(e,s));if(e[s]=="?"&&e[s+1]==">"){s++;break}continue}return s}function _(e,s){if(e.length>s+5&&e[s+1]==="-"&&e[s+2]==="-"){for(s+=3;s<e.length;s++)if(e[s]==="-"&&e[s+1]==="-"&&e[s+2]===">"){s+=2;break}}else if(e.length>s+8&&e[s+1]==="D"&&e[s+2]==="O"&&e[s+3]==="C"&&e[s+4]==="T"&&e[s+5]==="Y"&&e[s+6]==="P"&&e[s+7]==="E"){let o=1;for(s+=8;s<e.length;s++)if(e[s]==="<")o++;else if(e[s]===">"&&(o--,o===0))break}else if(e.length>s+9&&e[s+1]==="["&&e[s+2]==="C"&&e[s+3]==="D"&&e[s+4]==="A"&&e[s+5]==="T"&&e[s+6]==="A"&&e[s+7]==="["){for(s+=8;s<e.length;s++)if(e[s]==="]"&&e[s+1]==="]"&&e[s+2]===">"){s+=2;break}}return s}let A='"',I="'";function P(e,s){let o="",a="",h=!1;for(;s<e.length;s++){if(e[s]===A||e[s]===I)a===""?a=e[s]:a!==e[s]||(a="");else if(e[s]===">"&&a===""){h=!0;break}o+=e[s]}return a===""&&{value:o,index:s,tagClosed:h}}let V=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function B(e,s){let o=l(e,V),a={};for(let h=0;h<o.length;h++){if(o[h][1].length===0)return L("InvalidAttr","Attribute '"+o[h][2]+"' has no space in starting.",te(o[h]));if(o[h][3]!==void 0&&o[h][4]===void 0)return L("InvalidAttr","Attribute '"+o[h][2]+"' is without value.",te(o[h]));if(o[h][3]===void 0&&!s.allowBooleanAttributes)return L("InvalidAttr","boolean attribute '"+o[h][2]+"' is not allowed.",te(o[h]));let u=o[h][2];if(!ue(u))return L("InvalidAttr","Attribute '"+u+"' is an invalid name.",te(o[h]));if(Object.prototype.hasOwnProperty.call(a,u))return L("InvalidAttr","Attribute '"+u+"' is repeated.",te(o[h]));a[u]=1}return!0}function Z(e,s){if(e[++s]===";")return-1;if(e[s]==="#")return function(a,h){let u=/\d/;for(a[h]==="x"&&(h++,u=/[\da-fA-F]/);h<a.length;h++){if(a[h]===";")return h;if(!a[h].match(u))break}return-1}(e,++s);let o=0;for(;s<e.length;s++,o++)if(!(e[s].match(/\w/)&&o<20)){if(e[s]===";")break;return-1}return s}function L(e,s,o){return{err:{code:e,msg:s,line:o.line||o,col:o.col}}}function ue(e){return c(e)}function Ye(e){return c(e)}function F(e,s){let o=e.substring(0,s).split(/\r?\n/);return{line:o.length,col:o[o.length-1].length+1}}function te(e){return e.startIndex+e[1].length}let Qt=(e)=>d.includes(e)?"__"+e:e,Ns={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,s){return s},attributeValueProcessor:function(e,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,s,o){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Qt};function Ss(e,s){if(typeof e!="string")return;let o=e.toLowerCase();if(d.some((a)=>o===a.toLowerCase()))throw Error(`[SECURITY] Invalid ${s}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(f.some((a)=>o===a.toLowerCase()))throw Error(`[SECURITY] Invalid ${s}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Kt(e,s){return typeof e=="boolean"?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1000,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof e=="object"&&e!==null?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1000),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??"all"}:Kt(!0)}let bs=function(e){let s=Object.assign({},Ns,e),o=[{value:s.attributeNamePrefix,name:"attributeNamePrefix"},{value:s.attributesGroupName,name:"attributesGroupName"},{value:s.textNodeName,name:"textNodeName"},{value:s.cdataPropName,name:"cdataPropName"},{value:s.commentPropName,name:"commentPropName"}];for(let{value:a,name:h}of o)a&&Ss(a,h);return s.onDangerousProperty===null&&(s.onDangerousProperty=Qt),s.processEntities=Kt(s.processEntities,s.htmlEntities),s.unpairedTagsSet=new Set(s.unpairedTags),s.stopNodes&&Array.isArray(s.stopNodes)&&(s.stopNodes=s.stopNodes.map((a)=>typeof a=="string"&&a.startsWith("*.")?".."+a.substring(2):a)),s},Ze;Ze=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class se{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,s){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:s})}addChild(e,s){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),s!==void 0&&(this.child[this.child.length-1][Ze]={startIndex:s})}static getMetaDataSymbol(){return Ze}}class Gt{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,s){let o=Object.create(null),a=0;if(e[s+3]!=="O"||e[s+4]!=="C"||e[s+5]!=="T"||e[s+6]!=="Y"||e[s+7]!=="P"||e[s+8]!=="E")throw Error("Invalid Tag instead of DOCTYPE");{s+=9;let h=1,u=!1,x=!1,p="";for(;s<e.length;s++)if(e[s]!=="<"||x)if(e[s]===">"){if(x?e[s-1]==="-"&&e[s-2]==="-"&&(x=!1,h--):h--,h===0)break}else e[s]==="["?u=!0:p+=e[s];else{if(u&&de(e,"!ENTITY",s)){let y,g;if(s+=7,[y,g,s]=this.readEntityExp(e,s+1,this.suppressValidationErr),g.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&a>=this.options.maxEntityCount)throw Error(`Entity count (${a+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);o[y]=g,a++}}else if(u&&de(e,"!ELEMENT",s)){s+=8;let{index:y}=this.readElementExp(e,s+1);s=y}else if(u&&de(e,"!ATTLIST",s))s+=8;else if(u&&de(e,"!NOTATION",s)){s+=9;let{index:y}=this.readNotationExp(e,s+1,this.suppressValidationErr);s=y}else{if(!de(e,"!--",s))throw Error("Invalid DOCTYPE");x=!0}h++,p=""}if(h!==0)throw Error("Unclosed DOCTYPE")}return{entities:o,i:s}}readEntityExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s])&&e[s]!=='"'&&e[s]!=="'";)s++;let a=e.substring(o,s);if(Re(a),s=J(e,s),!this.suppressValidationErr){if(e.substring(s,s+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");if(e[s]==="%")throw Error("Parameter entities are not supported")}let h="";if([s,h]=this.readIdentifierVal(e,s,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&h.length>this.options.maxEntitySize)throw Error(`Entity "${a}" size (${h.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[a,h,--s]}readNotationExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);!this.suppressValidationErr&&Re(a),s=J(e,s);let h=e.substring(s,s+6).toUpperCase();if(!this.suppressValidationErr&&h!=="SYSTEM"&&h!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${h}"`);s+=h.length,s=J(e,s);let u=null,x=null;if(h==="PUBLIC")[s,u]=this.readIdentifierVal(e,s,"publicIdentifier"),e[s=J(e,s)]!=='"'&&e[s]!=="'"||([s,x]=this.readIdentifierVal(e,s,"systemIdentifier"));else if(h==="SYSTEM"&&([s,x]=this.readIdentifierVal(e,s,"systemIdentifier"),!this.suppressValidationErr&&!x))throw Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:x,index:--s}}readIdentifierVal(e,s,o){let a="",h=e[s];if(h!=='"'&&h!=="'")throw Error(`Expected quoted string, found "${h}"`);let u=++s;for(;s<e.length&&e[s]!==h;)s++;if(a=e.substring(u,s),e[s]!==h)throw Error(`Unterminated ${o} value`);return[++s,a]}readElementExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);if(!this.suppressValidationErr&&!c(a))throw Error(`Invalid element name: "${a}"`);let h="";if(e[s=J(e,s)]==="E"&&de(e,"MPTY",s))s+=4;else if(e[s]==="A"&&de(e,"NY",s))s+=2;else if(e[s]==="("){let u=++s;for(;s<e.length&&e[s]!==")";)s++;if(h=e.substring(u,s),e[s]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[s]}"`);return{elementName:a,contentModel:h.trim(),index:s}}readAttlistExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);for(Re(a),o=s=J(e,s);s<e.length&&!/\s/.test(e[s]);)s++;let h=e.substring(o,s);if(!Re(h))throw Error(`Invalid attribute name: "${h}"`);s=J(e,s);let u="";if(e.substring(s,s+8).toUpperCase()==="NOTATION"){if(u="NOTATION",e[s=J(e,s+=8)]!=="(")throw Error(`Expected '(', found "${e[s]}"`);s++;let p=[];for(;s<e.length&&e[s]!==")";){let y=s;for(;s<e.length&&e[s]!=="|"&&e[s]!==")";)s++;let g=e.substring(y,s);if(g=g.trim(),!Re(g))throw Error(`Invalid notation name: "${g}"`);p.push(g),e[s]==="|"&&(s++,s=J(e,s))}if(e[s]!==")")throw Error("Unterminated list of notations");s++,u+=" ("+p.join("|")+")"}else{let p=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;u+=e.substring(p,s);let y=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!y.includes(u.toUpperCase()))throw Error(`Invalid attribute type: "${u}"`)}s=J(e,s);let x="";return e.substring(s,s+8).toUpperCase()==="#REQUIRED"?(x="#REQUIRED",s+=8):e.substring(s,s+7).toUpperCase()==="#IMPLIED"?(x="#IMPLIED",s+=7):[s,x]=this.readIdentifierVal(e,s,"ATTLIST"),{elementName:a,attributeName:h,attributeType:u,defaultValue:x,index:s}}}let J=(e,s)=>{for(;s<e.length&&/\s/.test(e[s]);)s++;return s};function de(e,s,o){for(let a=0;a<s.length;a++)if(s[a]!==e[o+a+1])return!1;return!0}function Re(e){if(c(e))return e;throw Error(`Invalid entity name ${e}`)}let _s=/^[-+]?0x[a-fA-F0-9]+$/,As=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Ts={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Cs=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class Wt{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let s=this._matcher.path;if(s.length!==0)return s[s.length-1].values?.[e]}hasAttr(e){let s=this._matcher.path;if(s.length===0)return!1;let o=s[s.length-1];return o.values!==void 0&&e in o.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,s=!0){return this._matcher.toString(e,s)}toArray(){return this._matcher.path.map((e)=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class De{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Wt(this)}push(e,s=null,o=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let a=this.path.length;this.siblingStacks[a]||(this.siblingStacks[a]=new Map);let h=this.siblingStacks[a],u=o?`${o}:${e}`:e,x=h.get(u)||0,p=0;for(let g of h.values())p+=g;h.set(u,x+1);let y={tag:e,position:p,counter:x};o!=null&&(y.namespace=o),s!=null&&(y.values=s),this.path.push(y)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let s=this.path[this.path.length-1];e!=null&&(s.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let s=this.path[this.path.length-1];return s.values!==void 0&&e in s.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,s=!0){let o=e||this.separator;if(o===this.separator&&s===!0){if(this._pathStringCache!==null)return this._pathStringCache;let a=this.path.map((h)=>h.namespace?`${h.namespace}:${h.tag}`:h.tag).join(o);return this._pathStringCache=a,a}return this.path.map((a)=>s&&a.namespace?`${a.namespace}:${a.tag}`:a.tag).join(o)}toArray(){return this.path.map((e)=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let s=e.segments;return s.length!==0&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(s):this._matchSimple(s))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let s=0;s<e.length;s++)if(!this._matchSegment(e[s],this.path[s],s===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let s=this.path.length-1,o=e.length-1;for(;o>=0&&s>=0;){let a=e[o];if(a.type==="deep-wildcard"){if(o--,o<0)return!0;let h=e[o],u=!1;for(let x=s;x>=0;x--)if(this._matchSegment(h,this.path[x],x===this.path.length-1)){s=x-1,o--,u=!0;break}if(!u)return!1}else{if(!this._matchSegment(a,this.path[s],s===this.path.length-1))return!1;s--,o--}}return o<0}_matchSegment(e,s,o){if(e.tag!=="*"&&e.tag!==s.tag)return!1;if(e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==s.namespace)return!1;if(e.attrName!==void 0){if(!o)return!1;if(!s.values||!(e.attrName in s.values))return!1;if(e.attrValue!==void 0&&String(s.values[e.attrName])!==String(e.attrValue))return!1}if(e.position!==void 0){if(!o)return!1;let a=s.counter??0;if(e.position==="first"&&a!==0)return!1;if(e.position==="odd"&&a%2!=1)return!1;if(e.position==="even"&&a%2!=0)return!1;if(e.position==="nth"&&a!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map((e)=>({...e})),siblingStacks:this.siblingStacks.map((e)=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map((s)=>({...s})),this.siblingStacks=e.siblingStacks.map((s)=>new Map(s))}readOnly(){return this._view}}class pe{constructor(e,s={},o){this.pattern=e,this.separator=s.separator||".",this.segments=this._parse(e),this.data=o,this._hasDeepWildcard=this.segments.some((a)=>a.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some((a)=>a.attrName!==void 0),this._hasPositionSelector=this.segments.some((a)=>a.position!==void 0)}_parse(e){let s=[],o=0,a="";for(;o<e.length;)e[o]===this.separator?o+1<e.length&&e[o+1]===this.separator?(a.trim()&&(s.push(this._parseSegment(a.trim())),a=""),s.push({type:"deep-wildcard"}),o+=2):(a.trim()&&s.push(this._parseSegment(a.trim())),a="",o++):(a+=e[o],o++);return a.trim()&&s.push(this._parseSegment(a.trim())),s}_parseSegment(e){let s={type:"tag"},o=null,a=e,h=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(h&&(a=h[1]+h[3],h[2])){let g=h[2].slice(1,-1);g&&(o=g)}let u,x,p=a;if(a.includes("::")){let g=a.indexOf("::");if(u=a.substring(0,g).trim(),p=a.substring(g+2).trim(),!u)throw Error(`Invalid namespace in pattern: ${e}`)}let y=null;if(p.includes(":")){let g=p.lastIndexOf(":"),N=p.substring(0,g).trim(),b=p.substring(g+1).trim();["first","last","odd","even"].includes(b)||/^nth\(\d+\)$/.test(b)?(x=N,y=b):x=p}else x=p;if(!x)throw Error(`Invalid segment pattern: ${e}`);if(s.tag=x,u&&(s.namespace=u),o)if(o.includes("=")){let g=o.indexOf("=");s.attrName=o.substring(0,g).trim(),s.attrValue=o.substring(g+1).trim()}else s.attrName=o.trim();if(y){let g=y.match(/^nth\((\d+)\)$/);g?(s.position="nth",s.positionValue=parseInt(g[1],10)):s.position=y}return s}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class Jt{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let s=e.length,o=e.segments[e.segments.length-1],a=o?.tag;if(a&&a!=="*"){let h=`${s}:${a}`;this._byDepthAndTag.has(h)||this._byDepthAndTag.set(h,[]),this._byDepthAndTag.get(h).push(e)}else this._wildcardByDepth.has(s)||this._wildcardByDepth.set(s,[]),this._wildcardByDepth.get(s).push(e);return this}addAll(e){for(let s of e)this.add(s);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let s=e.getDepth(),o=`${s}:${e.getCurrentTag()}`,a=this._byDepthAndTag.get(o);if(a){for(let u=0;u<a.length;u++)if(e.matches(a[u]))return a[u]}let h=this._wildcardByDepth.get(s);if(h){for(let u=0;u<h.length;u++)if(e.matches(h[u]))return h[u]}for(let u=0;u<this._deepWildcards.length;u++)if(e.matches(this._deepWildcards[u]))return this._deepWildcards[u];return null}}let Ms={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},jt={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Rs={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},Ps=new Set("!?\\\\/[]$%{}^&*()<>|+");function Yt(e){if(e[0]==="#")throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let s of e)if(Ps.has(s))throw Error(`[EntityReplacer] Invalid character '${s}' in entity name: "${e}"`);return e}function et(...e){let s=Object.create(null);for(let o of e)if(o)for(let a of Object.keys(o)){let h=o[a];if(typeof h=="string")s[a]=h;else if(h&&typeof h=="object"&&h.val!==void 0){let u=h.val;typeof u=="string"&&(s[a]=u)}}return s}let fe="external",Le="base",tt="all",Y=Object.freeze({allow:0,leave:1,remove:2,throw:3}),$s=new Set([9,10,13]);class Zt{constructor(e={}){var s;this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:(a)=>a,this._limitTiers=(s=this._limit.applyLimitsTo??fe)&&s!==fe?s===tt?new Set([tt]):s===Le?new Set([Le]):Array.isArray(s)?new Set(s):new Set([fe]):new Set([fe]),this._numericAllowed=e.numericAllowed??!0,this._baseMap=et(jt,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let o=function(a){if(!a)return{xmlVersion:1,onLevel:Y.allow,nullLevel:Y.remove};let h=a.xmlVersion===1.1?1.1:1,u=Y[a.onNCR]??Y.allow,x=Y[a.nullNCR]??Y.remove;return{xmlVersion:h,onLevel:u,nullLevel:Math.max(x,Y.remove)}}(e.ncr);this._ncrXmlVersion=o.xmlVersion,this._ncrOnLevel=o.onLevel,this._ncrNullLevel=o.nullLevel}setExternalEntities(e){if(e)for(let s of Object.keys(e))Yt(s);this._externalMap=et(e)}addExternalEntity(e,s){Yt(e),typeof s=="string"&&s.indexOf("&")===-1&&(this._externalMap[e]=s)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=et(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0)return e;let s=e,o=[],a=e.length,h=0,u=0,x=this._maxTotalExpansions>0,p=this._maxExpandedLength>0,y=x||p;for(;u<a;){if(e.charCodeAt(u)!==38){u++;continue}let N=u+1;for(;N<a&&e.charCodeAt(N)!==59&&N-u<=32;)N++;if(N>=a||e.charCodeAt(N)!==59){u++;continue}let b=e.slice(u+1,N);if(b.length===0){u++;continue}let T,M;if(this._removeSet.has(b))T="",M===void 0&&(M=fe);else{if(this._leaveSet.has(b)){u++;continue}if(b.charCodeAt(0)===35){let R=this._resolveNCR(b);if(R===void 0){u++;continue}T=R,M=Le}else{let R=this._resolveName(b);T=R?.value,M=R?.tier}}if(T!==void 0){if(u>h&&o.push(e.slice(h,u)),o.push(T),h=N+1,u=h,y&&this._tierCounts(M)){if(x&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(p){let R=T.length-(b.length+2);if(R>0&&(this._expandedLength+=R,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else u++}h<a&&o.push(e.slice(h));let g=o.length===0?e:o.join("");return this._postCheck(g,s)}_tierCounts(e){return!!this._limitTiers.has(tt)||this._limitTiers.has(e)}_resolveName(e){return e in this._inputMap?{value:this._inputMap[e],tier:fe}:(e in this._externalMap)?{value:this._externalMap[e],tier:fe}:(e in this._baseMap)?{value:this._baseMap[e],tier:Le}:void 0}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!$s.has(e)?Y.remove:-1}_applyNCRAction(e,s,o){switch(e){case Y.allow:return String.fromCodePoint(o);case Y.remove:return"";case Y.leave:return;case Y.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${s}; (U+${o.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(o)}}_resolveNCR(e){let s=e.charCodeAt(1),o;if(o=s===120||s===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(o)||o<0||o>1114111)return;let a=this._classifyNCR(o);if(!this._numericAllowed&&a<Y.remove)return;let h=a===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,a);return this._applyNCRAction(h,e,o)}}function Is(e,s){if(!e)return{};let o=s.attributesGroupName?e[s.attributesGroupName]:e;if(!o)return{};let a={};for(let h in o)h.startsWith(s.attributeNamePrefix)?a[h.substring(s.attributeNamePrefix.length)]=o[h]:a[h]=o[h];return a}function Ds(e){if(!e||typeof e!="string")return;let s=e.indexOf(":");if(s!==-1&&s>0){let o=e.substring(0,s);if(o!=="xmlns")return o}}class er{constructor(e,s){var o;this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=Us,this.parseTextData=Ls,this.resolveNameSpace=ks,this.buildAttributesMap=Os,this.isItStopNode=vs,this.replaceEntitiesValue=Bs,this.readStopNodeData=Hs,this.saveTextToParentTag=Xs,this.addChild=Vs,this.ignoreAttributesFn=typeof(o=this.options.ignoreAttributes)=="function"?o:Array.isArray(o)?(u)=>{for(let x of o){if(typeof x=="string"&&u===x)return!0;if(x instanceof RegExp&&x.test(u))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let a={...jt};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?a=this.options.htmlEntities:this.options.htmlEntities===!0&&(a={...Rs,...Ms}),this.entityDecoder=new Zt({namedEntities:{...a,...s},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new De,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new Jt;let h=this.options.stopNodes;if(h&&h.length>0){for(let u=0;u<h.length;u++){let x=h[u];typeof x=="string"?this.stopNodeExpressionsSet.add(new pe(x)):x instanceof pe&&this.stopNodeExpressionsSet.add(x)}this.stopNodeExpressionsSet.seal()}}}function Ls(e,s,o,a,h,u,x){let p=this.options;if(e!==void 0&&(p.trimValues&&!a&&(e=e.trim()),e.length>0)){x||(e=this.replaceEntitiesValue(e,s,o));let y=p.jPath?o.toString():o,g=p.tagValueProcessor(s,e,y,h,u);return g==null?e:typeof g!=typeof e||g!==e?g:p.trimValues||e.trim()===e?tr(e,p.parseTagValue,p.numberParseOptions):e}}function ks(e){if(this.options.removeNSPrefix){let s=e.split(":"),o=e.charAt(0)==="/"?"/":"";if(s[0]==="xmlns")return"";s.length===2&&(e=o+s[1])}return e}let zs=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Os(e,s,o,a=!1){let h=this.options;if(a===!0||h.ignoreAttributes!==!0&&typeof e=="string"){let u=l(e,zs),x=u.length,p={},y=Array(x),g=!1,N={};for(let M=0;M<x;M++){let R=this.resolveNameSpace(u[M][1]),z=u[M][4];if(R.length&&z!==void 0){let v=z;h.trimValues&&(v=v.trim()),v=this.replaceEntitiesValue(v,o,this.readonlyMatcher),y[M]=v,N[R]=v,g=!0}}g&&typeof s=="object"&&s.updateCurrent&&s.updateCurrent(N);let b=h.jPath?s.toString():this.readonlyMatcher,T=!1;for(let M=0;M<x;M++){let R=this.resolveNameSpace(u[M][1]);if(this.ignoreAttributesFn(R,b))continue;let z=h.attributeNamePrefix+R;if(R.length)if(h.transformAttributeName&&(z=h.transformAttributeName(z)),z=rr(z,h),u[M][4]!==void 0){let v=y[M],K=h.attributeValueProcessor(R,v,b);p[z]=K==null?v:typeof K!=typeof v||K!==v?K:tr(v,h.parseAttributeValue,h.numberParseOptions),T=!0}else h.allowBooleanAttributes&&(p[z]=!0,T=!0)}if(!T)return;if(h.attributesGroupName&&!h.preserveOrder){let M={};return M[h.attributesGroupName]=p,M}return p}}let Us=function(e){e=e.replace(/\r\n?/g,`
|
|
5
5
|
`);let s=new se("!xml"),o=s,a="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let h=this.options,u=new Gt(h.processEntities),x=e.length;for(let p=0;p<x;p++)if(e[p]==="<"){let y=e.charCodeAt(p+1);if(y===47){let g=Ee(e,">",p,"Closing Tag is not closed."),N=e.substring(p+2,g).trim();if(h.removeNSPrefix){let T=N.indexOf(":");T!==-1&&(N=N.substr(T+1))}N=st(h.transformTagName,N,"",h).tagName,o&&(a=this.saveTextToParentTag(a,o,this.readonlyMatcher));let b=this.matcher.getCurrentTag();if(N&&h.unpairedTagsSet.has(N))throw Error(`Unpaired tag can not be used as closing tag: </${N}>`);b&&h.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,o=this.tagsNodeStack.pop(),a="",p=g}else if(y===63){let g=rt(e,p,!1,"?>");if(!g)throw Error("Pi Tag is not closed.");a=this.saveTextToParentTag(a,o,this.readonlyMatcher);let N=this.buildAttributesMap(g.tagExp,this.matcher,g.tagName,!0);if(N){let b=N[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1)}if(h.ignoreDeclaration&&g.tagName==="?xml"||h.ignorePiTags);else{let b=new se(g.tagName);b.add(h.textNodeName,""),g.tagName!==g.tagExp&&g.attrExpPresent&&h.ignoreAttributes!==!0&&(b[":@"]=N),this.addChild(o,b,this.readonlyMatcher,p)}p=g.closeIndex+1}else if(y===33&&e.charCodeAt(p+2)===45&&e.charCodeAt(p+3)===45){let g=Ee(e,"-->",p+4,"Comment is not closed.");if(h.commentPropName){let N=e.substring(p+4,g-2);a=this.saveTextToParentTag(a,o,this.readonlyMatcher),o.add(h.commentPropName,[{[h.textNodeName]:N}])}p=g}else if(y===33&&e.charCodeAt(p+2)===68){let g=u.readDocType(e,p);this.entityDecoder.addInputEntities(g.entities),p=g.i}else if(y===33&&e.charCodeAt(p+2)===91){let g=Ee(e,"]]>",p,"CDATA is not closed.")-2,N=e.substring(p+9,g);a=this.saveTextToParentTag(a,o,this.readonlyMatcher);let b=this.parseTextData(N,o.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),h.cdataPropName?o.add(h.cdataPropName,[{[h.textNodeName]:N}]):o.add(h.textNodeName,b),p=g+2}else{let g=rt(e,p,h.removeNSPrefix);if(!g){let X=e.substring(Math.max(0,p-50),Math.min(x,p+50));throw Error(`readTagExp returned undefined at position ${p}. Context: "${X}"`)}let{tagName:N,rawTagName:b,tagExp:T,attrExpPresent:M,closeIndex:R}=g;if({tagName:N,tagExp:T}=st(h.transformTagName,N,T,h),h.strictReservedNames&&(N===h.commentPropName||N===h.cdataPropName||N===h.textNodeName||N===h.attributesGroupName))throw Error(`Invalid tag name: ${N}`);o&&a&&o.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,o,this.readonlyMatcher,!1));let z=o;z&&h.unpairedTagsSet.has(z.tagname)&&(o=this.tagsNodeStack.pop(),this.matcher.pop());let v=!1;T.length>0&&T.lastIndexOf("/")===T.length-1&&(v=!0,N[N.length-1]==="/"?(N=N.substr(0,N.length-1),T=N):T=T.substr(0,T.length-1),M=N!==T);let K,q=null,Se={};K=Ds(b),N!==s.tagname&&this.matcher.push(N,{},K),N!==T&&M&&(q=this.buildAttributesMap(T,this.matcher,N),q&&(Se=Is(q,h))),N!==s.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let G=p;if(this.isCurrentNodeStopNode){let X="";if(v)p=g.closeIndex;else if(h.unpairedTagsSet.has(N))p=g.closeIndex;else{let at=this.readStopNodeData(e,b,R+1);if(!at)throw Error(`Unexpected end of ${b}`);p=at.i,X=at.tagContent}let ot=new se(N);q&&(ot[":@"]=q),ot.add(h.textNodeName,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(o,ot,this.readonlyMatcher,G)}else{if(v){({tagName:N,tagExp:T}=st(h.transformTagName,N,T,h));let X=new se(N);q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(h.unpairedTagsSet.has(N)){let X=new se(N);q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),this.matcher.pop(),this.isCurrentNodeStopNode=!1,p=g.closeIndex;continue}{let X=new se(N);if(this.tagsNodeStack.length>h.maxNestedTags)throw Error("Maximum nested tags exceeded");this.tagsNodeStack.push(o),q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),o=X}}a="",p=R}}}else a+=e[p];return s.child};function Vs(e,s,o,a){this.options.captureMetaData||(a=void 0);let h=this.options.jPath?o.toString():o,u=this.options.updateTag(s.tagname,h,s[":@"]);u===!1||(typeof u=="string"?(s.tagname=u,e.addChild(s,a)):e.addChild(s,a))}function Bs(e,s,o){let a=this.options.processEntities;if(!a||!a.enabled)return e;if(a.allowedTags){let h=this.options.jPath?o.toString():o;if(!(Array.isArray(a.allowedTags)?a.allowedTags.includes(s):a.allowedTags(s,h)))return e}if(a.tagFilter){let h=this.options.jPath?o.toString():o;if(!a.tagFilter(s,h))return e}return this.entityDecoder.decode(e)}function Xs(e,s,o,a){return e&&(a===void 0&&(a=s.child.length===0),(e=this.parseTextData(e,s.tagname,o,!1,!!s[":@"]&&Object.keys(s[":@"]).length!==0,a))!==void 0&&e!==""&&s.add(this.options.textNodeName,e),e=""),e}function vs(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Ee(e,s,o,a){let h=e.indexOf(s,o);if(h===-1)throw Error(a);return h+s.length-1}function Fs(e,s,o,a){let h=e.indexOf(s,o);if(h===-1)throw Error(a);return h}function rt(e,s,o,a=">"){let h=function(b,T,M=">"){let R=0,z=b.length,v=M.charCodeAt(0),K=M.length>1?M.charCodeAt(1):-1,q="",Se=T;for(let G=T;G<z;G++){let X=b.charCodeAt(G);if(R)X===R&&(R=0);else if(X===34||X===39)R=X;else if(X===v){if(K===-1)return q+=b.substring(Se,G),{data:q,index:G};if(b.charCodeAt(G+1)===K)return q+=b.substring(Se,G),{data:q,index:G}}else X!==9||R||(q+=b.substring(Se,G)+" ",Se=G+1)}}(e,s+1,a);if(!h)return;let{data:u,index:x}=h,p=u.search(/\s/),y=u,g=!0;p!==-1&&(y=u.substring(0,p),u=u.substring(p+1).trimStart());let N=y;if(o){let b=y.indexOf(":");b!==-1&&(y=y.substr(b+1),g=y!==h.data.substr(b+1))}return{tagName:y,tagExp:u,closeIndex:x,attrExpPresent:g,rawTagName:N}}function Hs(e,s,o){let a=o,h=1,u=e.length;for(;o<u;o++)if(e[o]==="<"){let x=e.charCodeAt(o+1);if(x===47){let p=Fs(e,">",o,`${s} is not closed`);if(e.substring(o+2,p).trim()===s&&(h--,h===0))return{tagContent:e.substring(a,o),i:p};o=p}else if(x===63)o=Ee(e,"?>",o+1,"StopNode is not closed.");else if(x===33&&e.charCodeAt(o+2)===45&&e.charCodeAt(o+3)===45)o=Ee(e,"-->",o+3,"StopNode is not closed.");else if(x===33&&e.charCodeAt(o+2)===91)o=Ee(e,"]]>",o,"StopNode is not closed.")-2;else{let p=rt(e,o,!1);p&&((p&&p.tagName)===s&&p.tagExp[p.tagExp.length-1]!=="/"&&h++,o=p.closeIndex)}}}function tr(e,s,o){if(s&&typeof e=="string"){let a=e.trim();return a==="true"||a!=="false"&&function(h,u={}){if(u=Object.assign({},Ts,u),!h||typeof h!="string")return h;let x=h.trim();if(x.length===0)return h;if(u.skipLike!==void 0&&u.skipLike.test(x))return h;if(x==="0")return 0;if(u.hex&&_s.test(x))return function(y){if(parseInt)return parseInt(y,16);if(Number.parseInt)return Number.parseInt(y,16);if(window&&window.parseInt)return window.parseInt(y,16);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}(x);if(isFinite(x)){if(x.includes("e")||x.includes("E"))return function(y,g,N){if(!N.eNotation)return y;let b=g.match(Cs);if(b){let T=b[1]||"",M=b[3].indexOf("e")===-1?"E":"e",R=b[2],z=T?y[R.length+1]===M:y[R.length]===M;return R.length>1&&z?y:(R.length!==1||!b[3].startsWith(`.${M}`)&&b[3][0]!==M)&&R.length>0?N.leadingZeros&&!z?(g=(b[1]||"")+b[3],Number(g)):y:Number(g)}return y}(h,x,u);{let y=As.exec(x);if(y){let g=y[1]||"",N=y[2],b=(p=y[3])&&p.indexOf(".")!==-1?((p=p.replace(/0+$/,""))==="."?p="0":p[0]==="."?p="0"+p:p[p.length-1]==="."&&(p=p.substring(0,p.length-1)),p):p,T=g?h[N.length+1]===".":h[N.length]===".";if(!u.leadingZeros&&(N.length>1||N.length===1&&!T))return h;{let M=Number(x),R=String(M);if(M===0)return M;if(R.search(/[eE]/)!==-1)return u.eNotation?M:h;if(x.indexOf(".")!==-1)return R==="0"||R===b||R===`${g}${b}`?M:h;let z=N?b:x;return N?z===R||g+z===R?M:h:z===R||z===g+R?M:h}}return h}}var p;return function(y,g,N){let b=g===1/0;switch(N.infinity.toLowerCase()){case"null":return null;case"infinity":return g;case"string":return b?"Infinity":"-Infinity";default:return y}}(h,Number(x),u)}(e,o)}return e!==void 0?e:""}function st(e,s,o,a){if(e){let h=e(s);o===s&&(o=h),s=h}return{tagName:s=rr(s,a),tagExp:o}}function rr(e,s){if(f.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return d.includes(e)?s.onDangerousProperty(e):e}let it=se.getMetaDataSymbol();function qs(e,s){if(!e||typeof e!="object")return{};if(!s)return e;let o={};for(let a in e)a.startsWith(s)?o[a.substring(s.length)]=e[a]:o[a]=e[a];return o}function Qs(e,s,o,a){return sr(e,s,o,a)}function sr(e,s,o,a){let h,u={};for(let x=0;x<e.length;x++){let p=e[x],y=Ks(p);if(y!==void 0&&y!==s.textNodeName){let g=qs(p[":@"]||{},s.attributeNamePrefix);o.push(y,g)}if(y===s.textNodeName)h===void 0?h=p[y]:h+=""+p[y];else{if(y===void 0)continue;if(p[y]){let g=sr(p[y],s,o,a),N=Ws(g,s);if(Object.keys(g).length===0&&s.alwaysCreateTextNode&&(g[s.textNodeName]=""),p[":@"]?Gs(g,p[":@"],a,s):Object.keys(g).length!==1||g[s.textNodeName]===void 0||s.alwaysCreateTextNode?Object.keys(g).length===0&&(s.alwaysCreateTextNode?g[s.textNodeName]="":g=""):g=g[s.textNodeName],p[it]!==void 0&&typeof g=="object"&&g!==null&&(g[it]=p[it]),u[y]!==void 0&&Object.prototype.hasOwnProperty.call(u,y))Array.isArray(u[y])||(u[y]=[u[y]]),u[y].push(g);else{let b=s.jPath?a.toString():a;s.isArray(y,b,N)?u[y]=[g]:u[y]=g}y!==void 0&&y!==s.textNodeName&&o.pop()}}}return typeof h=="string"?h.length>0&&(u[s.textNodeName]=h):h!==void 0&&(u[s.textNodeName]=h),u}function Ks(e){let s=Object.keys(e);for(let o=0;o<s.length;o++){let a=s[o];if(a!==":@")return a}}function Gs(e,s,o,a){if(s){let h=Object.keys(s),u=h.length;for(let x=0;x<u;x++){let p=h[x],y=p.startsWith(a.attributeNamePrefix)?p.substring(a.attributeNamePrefix.length):p,g=a.jPath?o.toString()+"."+y:o;a.isArray(p,g,!0,!0)?e[p]=[s[p]]:e[p]=s[p]}}}function Ws(e,s){let{textNodeName:o}=s,a=Object.keys(e).length;return a===0||!(a!==1||!e[o]&&typeof e[o]!="boolean"&&e[o]!==0)}class ir{constructor(e){this.externalEntities={},this.options=bs(e)}parse(e,s){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw Error("XML data is accepted in String or Bytes[] form.");if(s){s===!0&&(s={});let h=w(e,s);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}let o=new er(this.options,this.externalEntities),a=o.parseXml(e);return this.options.preserveOrder||a===void 0?a:Qs(a,this.options,o.matcher,o.readonlyMatcher)}addEntity(e,s){if(s.indexOf("&")!==-1)throw Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(s==="&")throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=s}static getMetaDataSymbol(){return se.getMetaDataSymbol()}}function nr(e){return String(e).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function or(e){return String(e).replace(/\]\]>/g,"]]]]><![CDATA[>")}function Ne(e){return String(e).replace(/"/g,""").replace(/'/g,"'")}function Js(e,s){let o="";s.format&&s.indentBy.length>0&&(o=`
|