@qitqode/qitqode-android-arm64 0.2.13 → 0.2.15
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/bun +2 -2
- package/bundle/{chunk-9c0f79mt.js → chunk-00ft63qn.js} +1 -1
- package/bundle/{chunk-vr7525pa.js → chunk-02tmc2st.js} +1 -1
- package/bundle/{chunk-ewde5bss.js → chunk-06tgmvh6.js} +2 -2
- package/bundle/{chunk-wqm1vawg.js → chunk-0ejx0yqx.js} +1 -1
- package/bundle/{chunk-2md5fz4f.js → chunk-0m4gvjcv.js} +2 -2
- package/bundle/{chunk-jf4zyy7r.js → chunk-0mztgsxp.js} +1 -1
- package/bundle/{chunk-7bvh48s2.js → chunk-10kj86va.js} +1 -1
- package/bundle/{chunk-b46t2315.js → chunk-10q04xh5.js} +1 -1
- package/bundle/{chunk-dwjv3m5s.js → chunk-175720ws.js} +2 -2
- package/bundle/{chunk-xgphhnpk.js → chunk-19rs84t8.js} +1 -1
- package/bundle/{chunk-hsmtjb4d.js → chunk-1bq15kf0.js} +2 -2
- package/bundle/{chunk-1sejtx9a.js → chunk-1e75j4m1.js} +2 -2
- package/bundle/{chunk-dmgdwvn1.js → chunk-1pft3sar.js} +1 -1
- package/bundle/chunk-1r7anzk5.js +2 -0
- package/bundle/{chunk-rr94dpe9.js → chunk-1ypzf18e.js} +1 -1
- package/bundle/{chunk-q7wc3frq.js → chunk-2d61z24r.js} +1 -1
- package/bundle/{chunk-r9hsd9pw.js → chunk-2fged9vy.js} +1 -1
- package/bundle/chunk-2jzay8a9.js +2 -0
- package/bundle/{chunk-5828bcp8.js → chunk-2k2szpze.js} +1 -1
- package/bundle/{chunk-2p1qaqv3.js → chunk-2pw56zpj.js} +2 -2
- package/bundle/{chunk-yzxcjr6y.js → chunk-2tkgtasa.js} +2 -2
- package/bundle/{chunk-jrh028na.js → chunk-2w3n0q9m.js} +2 -2
- package/bundle/chunk-30rghawe.js +2 -0
- package/bundle/{chunk-jt94rhev.js → chunk-3152y1q9.js} +1 -1
- package/bundle/{chunk-1851skhm.js → chunk-31a47ptm.js} +1 -1
- package/bundle/chunk-33mzqyyb.js +3 -0
- package/bundle/{chunk-fqzfytjk.js → chunk-3c73rngn.js} +1 -1
- package/bundle/{chunk-wspm2k19.js → chunk-3cs1qf8x.js} +1 -1
- package/bundle/chunk-3dajnr1w.js +2 -0
- package/bundle/chunk-3ege6krg.js +2 -0
- package/bundle/chunk-43vpxggb.js +2 -0
- package/bundle/{chunk-hcd0k14e.js → chunk-48rg4yhk.js} +2 -2
- package/bundle/chunk-49y7zg15.js +2 -0
- package/bundle/{chunk-etvwxwn3.js → chunk-4b56k59w.js} +1 -1
- package/bundle/{chunk-aq75kv5f.js → chunk-4gzggzc0.js} +3 -3
- package/bundle/{chunk-rqdfmbns.js → chunk-4jfnhghx.js} +2 -2
- package/bundle/{chunk-g6ffx794.js → chunk-4ppw719f.js} +1 -1
- package/bundle/{chunk-g0x6q2ks.js → chunk-4r7fbkcm.js} +1 -1
- package/bundle/{chunk-5fbzvy6q.js → chunk-4s1n38ds.js} +2 -2
- package/bundle/{chunk-z6qb4gt5.js → chunk-4v29ayke.js} +1 -1
- package/bundle/{chunk-qa38xchd.js → chunk-4xcwnwd6.js} +1 -1
- package/bundle/{chunk-gvc1mqrs.js → chunk-4xqwt6dr.js} +2 -2
- package/bundle/{chunk-1bhcg889.js → chunk-4ycg2c6f.js} +2 -2
- package/bundle/{chunk-3be70hxy.js → chunk-4yd2vvh6.js} +1 -1
- package/bundle/{chunk-pzn7cade.js → chunk-5341jv20.js} +1 -1
- package/bundle/{chunk-z4gczap3.js → chunk-5asf8f41.js} +72 -72
- package/bundle/{chunk-z6f54x4k.js → chunk-5cwy8y78.js} +2 -2
- package/bundle/{chunk-6g3bzap8.js → chunk-5dvy83ms.js} +2 -2
- package/bundle/{chunk-ff031crt.js → chunk-5h1s0akp.js} +1 -1
- package/bundle/{chunk-tn0sfsks.js → chunk-5mf4qrye.js} +2 -2
- package/bundle/{chunk-0mdmqtfr.js → chunk-5q98z8ck.js} +2 -2
- package/bundle/chunk-5qhsfjzq.js +3 -0
- package/bundle/chunk-5re7995e.js +2 -0
- package/bundle/{chunk-y9kjt2jj.js → chunk-5rvvfgfy.js} +2 -2
- package/bundle/chunk-5xxn06g0.js +2 -0
- package/bundle/{chunk-2d0vympj.js → chunk-61b81z2h.js} +1 -1
- package/bundle/{chunk-4enhsmq1.js → chunk-62gefpwn.js} +2 -2
- package/bundle/{chunk-2h8b0csf.js → chunk-674pexjx.js} +2 -2
- package/bundle/{chunk-4ar8hey8.js → chunk-69htq8kq.js} +1 -1
- package/bundle/{chunk-h1p3xcfp.js → chunk-69k7cdtv.js} +2 -2
- package/bundle/{chunk-53n3tfwn.js → chunk-6cztstry.js} +2 -2
- package/bundle/{chunk-vqxyk6as.js → chunk-6dd2dx69.js} +2 -2
- package/bundle/{chunk-eftk07r3.js → chunk-6j53vtzd.js} +1 -1
- package/bundle/chunk-6k0y2332.js +2 -0
- package/bundle/{chunk-sn15skh8.js → chunk-6pt6nqwk.js} +1 -1
- package/bundle/{chunk-6wt8g6mc.js → chunk-6qwnty59.js} +2 -2
- package/bundle/{chunk-vvmvryh1.js → chunk-6yshpz0z.js} +2 -2
- package/bundle/{chunk-cv3xdp8q.js → chunk-6zdzbmzs.js} +394 -323
- package/bundle/{chunk-2ts2s8b4.js → chunk-71jmhvef.js} +2 -2
- package/bundle/{chunk-9xbc558j.js → chunk-73a7ts8r.js} +1 -1
- package/bundle/{chunk-sv27ep93.js → chunk-76wm7tw8.js} +2 -2
- package/bundle/chunk-7cp30q0t.js +2 -0
- package/bundle/chunk-7t63wz2f.js +2 -0
- package/bundle/{chunk-v30fmrz0.js → chunk-7w571q26.js} +1 -1
- package/bundle/{chunk-fbd971t7.js → chunk-83n11xym.js} +3 -3
- package/bundle/{chunk-m18pxkdg.js → chunk-840mmmzz.js} +4 -4
- package/bundle/{chunk-jcn8bg31.js → chunk-86reb44c.js} +1 -1
- package/bundle/{chunk-hnbtfpb7.js → chunk-86sfzgnf.js} +1 -1
- package/bundle/{chunk-4krmja97.js → chunk-878sb0es.js} +2 -2
- package/bundle/{chunk-v9yxkbz7.js → chunk-8a9sj8gp.js} +1 -1
- package/bundle/{chunk-0cjp9088.js → chunk-8gkz5550.js} +1 -1
- package/bundle/chunk-8gz8fk6r.js +2 -0
- package/bundle/chunk-8ht7cq3h.js +2 -0
- package/bundle/{chunk-msbe5rb7.js → chunk-8mqcar7f.js} +1 -1
- package/bundle/{chunk-3rcfy8te.js → chunk-8qpfphdz.js} +1 -1
- package/bundle/chunk-8qv0119d.js +2 -0
- package/bundle/{chunk-t1hw67x4.js → chunk-8zpsgfb6.js} +1 -1
- package/bundle/{chunk-c99npyz9.js → chunk-96sra8g8.js} +1 -1
- package/bundle/{chunk-nn2hbew8.js → chunk-99df6wvm.js} +1 -1
- package/bundle/{chunk-5wjwzbk8.js → chunk-9amnqaeq.js} +1 -1
- package/bundle/{chunk-hk8m8vax.js → chunk-9kc2th5c.js} +2 -2
- package/bundle/chunk-9m0eawt5.js +2 -0
- package/bundle/{chunk-fj87htwn.js → chunk-9mabvb06.js} +1 -1
- package/bundle/{chunk-xn6mwsc9.js → chunk-9ttebtcf.js} +1 -1
- package/bundle/{chunk-mfg4stzn.js → chunk-a1mbach4.js} +1 -1
- package/bundle/chunk-a32y70fe.js +2 -0
- package/bundle/{chunk-hgcnzsd5.js → chunk-a3g8de96.js} +1 -1
- package/bundle/{chunk-bydaqb08.js → chunk-a8askx4y.js} +1 -1
- package/bundle/{chunk-gcpwm7b5.js → chunk-adws0hhk.js} +2 -2
- package/bundle/{chunk-08mgb5tt.js → chunk-ae1b15bd.js} +12 -10
- package/bundle/{chunk-y5m9c5ek.js → chunk-ahgb3r1c.js} +2 -2
- package/bundle/chunk-apneazwv.js +2 -0
- package/bundle/{chunk-6p848y99.js → chunk-art8gejd.js} +1 -1
- package/bundle/{chunk-eh73j82b.js → chunk-avksqxan.js} +1 -1
- package/bundle/chunk-aw5yv01t.js +2 -0
- package/bundle/chunk-az12tp53.js +2 -0
- package/bundle/{chunk-gjmxrz0v.js → chunk-b350g18y.js} +2 -2
- package/bundle/chunk-b5dpzcc7.js +2 -0
- package/bundle/{chunk-c1srcpfk.js → chunk-b6m5tr80.js} +1 -1
- package/bundle/chunk-baq0wk3q.js +2 -0
- package/bundle/chunk-bcgtqx3g.js +2 -0
- package/bundle/{chunk-0w77vhg4.js → chunk-bdcd2mcb.js} +2 -2
- package/bundle/chunk-bde5d507.js +2 -0
- package/bundle/{chunk-139qfnsq.js → chunk-bemyyen3.js} +1 -1
- package/bundle/{chunk-1bbx1da7.js → chunk-bmdqb48f.js} +1 -1
- package/bundle/{chunk-bpv378bm.js → chunk-bq6cvf16.js} +2 -2
- package/bundle/{chunk-t66gerft.js → chunk-bxnsrggq.js} +1 -1
- package/bundle/{chunk-2b80n6nx.js → chunk-bzh71a92.js} +1 -1
- package/bundle/chunk-bzzggc3s.js +2 -0
- package/bundle/{chunk-2bfq0mtx.js → chunk-c1wc4b5q.js} +1 -1
- package/bundle/{chunk-78rfz0ex.js → chunk-c5cyt23k.js} +2 -2
- package/bundle/chunk-c8qx439t.js +2 -0
- package/bundle/{chunk-t1e52h0k.js → chunk-ch7s512a.js} +1 -1
- package/bundle/chunk-ckw51fn6.js +2 -0
- package/bundle/{chunk-1rafe6f5.js → chunk-crqycrs4.js} +2 -2
- package/bundle/{chunk-bd4krah7.js → chunk-csy1v12x.js} +1 -1
- package/bundle/{chunk-z2cnd2cp.js → chunk-d10qre1b.js} +1 -1
- package/bundle/{chunk-v6djkm35.js → chunk-d385e2qt.js} +1 -1
- package/bundle/{chunk-paqy0c2v.js → chunk-d4faz5xa.js} +1 -1
- package/bundle/{chunk-8xbd0ra5.js → chunk-d7h1dp0h.js} +1 -1
- package/bundle/chunk-denp0wrq.js +2 -0
- package/bundle/chunk-depxzjer.js +2 -0
- package/bundle/chunk-dhvqpcf3.js +2 -0
- package/bundle/{chunk-gdawpkxs.js → chunk-djdfpezf.js} +1 -1
- package/bundle/chunk-dkqqswbv.js +2 -0
- package/bundle/{chunk-e4658j15.js → chunk-dmb0ez0m.js} +3 -3
- package/bundle/chunk-dpbm03yh.js +2 -0
- package/bundle/{chunk-es6vbsjg.js → chunk-dvp0r93q.js} +1 -1
- package/bundle/{chunk-374js0y6.js → chunk-e18hshcg.js} +1 -1
- package/bundle/{chunk-5rtsnnjk.js → chunk-e37gd3p2.js} +1 -1
- package/bundle/chunk-e5t7jsxa.js +2 -0
- package/bundle/{chunk-wac35a6p.js → chunk-e611m0p4.js} +1 -1
- package/bundle/chunk-eb811dt2.js +2 -0
- package/bundle/{chunk-95ga21eq.js → chunk-edvfqxfr.js} +1 -1
- package/bundle/{chunk-yhe5qz48.js → chunk-ej0yzstw.js} +2 -2
- package/bundle/{chunk-7p8f8xav.js → chunk-ep4drmt9.js} +1 -1
- package/bundle/{chunk-xaewye8w.js → chunk-eqsank84.js} +1 -1
- package/bundle/{chunk-84712kbe.js → chunk-estc7tzt.js} +2 -2
- package/bundle/{chunk-s7ypkpg2.js → chunk-et3tgx7t.js} +1 -1
- package/bundle/{chunk-trg0zg0q.js → chunk-f0dp1tf9.js} +1 -1
- package/bundle/{chunk-z1psybn1.js → chunk-f0x3q5dj.js} +2 -2
- package/bundle/chunk-fbz2xv2w.js +2 -0
- package/bundle/{chunk-mbma071k.js → chunk-fdmz0502.js} +2 -2
- package/bundle/{chunk-mrh5q4s6.js → chunk-ffx0cr44.js} +2 -2
- package/bundle/{chunk-e6s8ep9m.js → chunk-ffyj5nsg.js} +2 -2
- package/bundle/chunk-ffynh19k.js +2 -0
- package/bundle/chunk-fgr9xshx.js +2 -0
- package/bundle/{chunk-9a9qcvtz.js → chunk-fkq0v5qv.js} +2 -2
- package/bundle/{chunk-mp5m0acf.js → chunk-fmcg649e.js} +1 -1
- package/bundle/{chunk-g3y5kvg6.js → chunk-fp2xgnjn.js} +2 -2
- package/bundle/{chunk-rwt0rwvn.js → chunk-fswt9qc0.js} +2 -2
- package/bundle/{chunk-1exjy880.js → chunk-g77kddrs.js} +2 -2
- package/bundle/chunk-gbvcb4k1.js +2 -0
- package/bundle/{chunk-mgff8bcx.js → chunk-gd0j16gn.js} +1 -1
- package/bundle/chunk-gdtnqzbp.js +2 -0
- package/bundle/{chunk-hrfdrz36.js → chunk-gfvq78gy.js} +1 -1
- package/bundle/chunk-gkfvhh28.js +2 -0
- package/bundle/chunk-gvx5hmhk.js +2 -0
- package/bundle/chunk-gww6abk3.js +2 -0
- package/bundle/{chunk-1f9qcrn6.js → chunk-h036zy9e.js} +2 -2
- package/bundle/{chunk-71naz1qp.js → chunk-h6b5966p.js} +1 -1
- package/bundle/{chunk-zhddj91f.js → chunk-hf39qx6t.js} +2 -2
- package/bundle/chunk-hham7r33.js +2 -0
- package/bundle/chunk-hmm0gj34.js +3 -0
- package/bundle/{chunk-404ew3d3.js → chunk-hmmn62jg.js} +1 -1
- package/bundle/{chunk-map852em.js → chunk-hrcqbadm.js} +1 -1
- package/bundle/chunk-hsjbe5zy.js +2 -0
- package/bundle/{chunk-04x4b2yy.js → chunk-j15wejz0.js} +1 -1
- package/bundle/{chunk-5es19n1m.js → chunk-j2snkw45.js} +2 -2
- package/bundle/{chunk-z66xdxkg.js → chunk-j3agzs13.js} +2 -2
- package/bundle/{chunk-4wzv2v36.js → chunk-j45p2v4a.js} +3 -3
- package/bundle/{chunk-094m66q5.js → chunk-j46bxb1b.js} +1 -1
- package/bundle/chunk-j89sv999.js +2 -0
- package/bundle/{chunk-1gt6ppza.js → chunk-k0chq88p.js} +1 -1
- package/bundle/{chunk-81mwbcy3.js → chunk-k4wfq9cn.js} +2 -2
- package/bundle/{chunk-8t17w67q.js → chunk-k769v1ds.js} +1 -1
- package/bundle/{chunk-rf9pjbg3.js → chunk-k8dbc1p5.js} +1 -1
- package/bundle/chunk-k9b4005p.js +2 -0
- package/bundle/{chunk-xgdst5n5.js → chunk-kegvr7wt.js} +2 -2
- package/bundle/chunk-kht2kwam.js +2 -0
- package/bundle/{chunk-h2vtypa5.js → chunk-knqpyc7s.js} +1 -1
- package/bundle/{chunk-8hrt4d0v.js → chunk-ky3fhz9z.js} +1 -1
- package/bundle/chunk-kzkb4648.js +2 -0
- package/bundle/chunk-m2540waa.js +2 -0
- package/bundle/{chunk-hp9q7vvq.js → chunk-m6967jtv.js} +2 -2
- package/bundle/{chunk-7h0regqs.js → chunk-m8kjtp60.js} +1 -1
- package/bundle/{chunk-q65qzc9w.js → chunk-mbmaeq0a.js} +1 -1
- package/bundle/chunk-mdxtt9wv.js +8 -0
- package/bundle/{chunk-anm5g0m4.js → chunk-meehnnv9.js} +2 -2
- package/bundle/{chunk-k3x6z5q1.js → chunk-mjkwd1sz.js} +1 -1
- package/bundle/{chunk-dpm5x19e.js → chunk-mnjz8nqs.js} +2 -2
- package/bundle/{chunk-e0w082wt.js → chunk-mq3w4z8k.js} +184 -184
- package/bundle/chunk-mreacz8r.js +2 -0
- package/bundle/chunk-mscvm1rm.js +2 -0
- package/bundle/chunk-mw3hh526.js +2 -0
- package/bundle/chunk-n3nsrk5n.js +2 -0
- package/bundle/chunk-n4qbnecw.js +35 -0
- package/bundle/{chunk-wrkt670m.js → chunk-n7zd97hy.js} +2 -2
- package/bundle/chunk-n9nmc4q4.js +2 -0
- package/bundle/{chunk-p3tcw42f.js → chunk-nb4xtk1n.js} +1 -1
- package/bundle/chunk-nj4as8vy.js +2 -0
- package/bundle/chunk-nxm6gpyv.js +2 -0
- package/bundle/{chunk-5gv6r7v8.js → chunk-nyxn7npc.js} +1 -1
- package/bundle/{chunk-mhn0a828.js → chunk-nzz7gzg2.js} +1 -1
- package/bundle/{chunk-y9mxwwz7.js → chunk-p0852vfn.js} +2 -2
- package/bundle/{chunk-xrb46v1e.js → chunk-p4xqfkbh.js} +1 -1
- package/bundle/{chunk-7nh8vjx4.js → chunk-pdcxmr6x.js} +1 -1
- package/bundle/chunk-pqzx9ha6.js +2 -0
- package/bundle/{chunk-w264gs2c.js → chunk-prz2fkn9.js} +1 -1
- package/bundle/{chunk-d2049chz.js → chunk-psmwrvqs.js} +2 -2
- package/bundle/{chunk-4d9s7cgr.js → chunk-pwq2f75j.js} +1 -1
- package/bundle/{chunk-5psekq9f.js → chunk-pwrwb7mn.js} +1 -1
- package/bundle/{chunk-1wy8wmah.js → chunk-px69995t.js} +1 -1
- package/bundle/{chunk-pfen4ekj.js → chunk-q1dmxn63.js} +2 -2
- package/bundle/{chunk-ycth54ja.js → chunk-q896qkhe.js} +1 -1
- package/bundle/chunk-qbjqkezn.js +2 -0
- package/bundle/chunk-qhtp1xvx.js +2 -0
- package/bundle/{chunk-hd6sd912.js → chunk-qk6jh32z.js} +1 -1
- package/bundle/chunk-qkztgpay.js +2 -0
- package/bundle/{chunk-x0wy15q9.js → chunk-qn1fhqyw.js} +2 -2
- package/bundle/{chunk-n73ckwr7.js → chunk-qpk7jp6t.js} +1 -1
- package/bundle/{chunk-7k1q26yn.js → chunk-qrztx1b4.js} +2 -2
- package/bundle/{chunk-dzy3ezht.js → chunk-rd08wx37.js} +2 -2
- package/bundle/{chunk-ba2hn77m.js → chunk-rk4c0zat.js} +1 -1
- package/bundle/{chunk-mqtj38j9.js → chunk-rn3je2hv.js} +1 -1
- package/bundle/chunk-rnf3dy0y.js +2 -0
- package/bundle/{chunk-72qx43fq.js → chunk-rqap90xh.js} +2 -2
- package/bundle/chunk-rry4kq85.js +2 -0
- package/bundle/{chunk-47pxz6cb.js → chunk-rt49c6js.js} +2 -2
- package/bundle/{chunk-5a4zt1b7.js → chunk-rws2tsdv.js} +1 -1
- package/bundle/{chunk-r65zw08x.js → chunk-rx9eh3db.js} +3 -3
- package/bundle/{chunk-tzw56029.js → chunk-rxt6gktt.js} +1 -1
- package/bundle/chunk-ryfj80q6.js +2 -0
- package/bundle/{chunk-ec1bwa7f.js → chunk-s0gmxpxm.js} +2 -2
- package/bundle/{chunk-8psfgg8y.js → chunk-s9epttpy.js} +1 -1
- package/bundle/{chunk-gtmtvjwc.js → chunk-sb3cgb4v.js} +1 -1
- package/bundle/{chunk-p863r97y.js → chunk-set1f1wr.js} +1 -1
- package/bundle/{chunk-zgj7jx8k.js → chunk-sg9enzsp.js} +2 -2
- package/bundle/{chunk-0xf12tf3.js → chunk-sh03ka27.js} +1 -1
- package/bundle/chunk-snx49w8h.js +2 -0
- package/bundle/{chunk-610mqqqa.js → chunk-spcdwmy4.js} +1 -1
- package/bundle/{chunk-ydz7387e.js → chunk-sy76e7nr.js} +1 -1
- package/bundle/{chunk-csbndz33.js → chunk-szfqmkj6.js} +1 -1
- package/bundle/chunk-t21mdqbb.js +2 -0
- package/bundle/{chunk-t7gp6mjm.js → chunk-tcyzj3rz.js} +1 -1
- package/bundle/chunk-tkbjcznz.js +2 -0
- package/bundle/chunk-tn2yyqeb.js +2 -0
- package/bundle/chunk-ttebf3nt.js +2 -0
- package/bundle/chunk-twpfh0mx.js +2 -0
- package/bundle/{chunk-a4242cn4.js → chunk-tz1bzrnh.js} +1 -1
- package/bundle/chunk-tzf6d5qy.js +2 -0
- package/bundle/{chunk-hzzvmr41.js → chunk-v1axkp21.js} +2 -2
- package/bundle/chunk-v2mq09wx.js +2 -0
- package/bundle/chunk-v59a02aj.js +2 -0
- package/bundle/{chunk-8rbbt1s8.js → chunk-v5me0cj9.js} +1 -1
- package/bundle/{chunk-gw2fz5ry.js → chunk-v7v0krrj.js} +1 -1
- package/bundle/{chunk-9r6wk75s.js → chunk-veptx3fk.js} +1 -1
- package/bundle/{chunk-d4ys15w3.js → chunk-vgmgg994.js} +1 -1
- package/bundle/{chunk-vvcyvdnk.js → chunk-vr13f6b5.js} +2 -2
- package/bundle/{chunk-jmrqp50k.js → chunk-vsv4p060.js} +1 -1
- package/bundle/chunk-vxr4rzt0.js +2 -0
- package/bundle/chunk-w0h9rczg.js +2 -0
- package/bundle/{chunk-fmvmp278.js → chunk-w0t1ajhg.js} +1 -1
- package/bundle/{chunk-6jb4mnvq.js → chunk-w136zswr.js} +3 -3
- package/bundle/chunk-w8344et5.js +2 -0
- package/bundle/{chunk-b274mb6v.js → chunk-w8nj5ph5.js} +1 -1
- package/bundle/chunk-weyg78et.js +2 -0
- package/bundle/{chunk-6kpk6pr3.js → chunk-wf0n1cs9.js} +1 -1
- package/bundle/{chunk-00krzh3y.js → chunk-wfpnv00c.js} +2 -2
- package/bundle/{chunk-mchf2bcc.js → chunk-wne3v1fk.js} +2 -2
- package/bundle/{chunk-wwtyrgga.js → chunk-wrzn87w0.js} +1 -1
- package/bundle/{chunk-npryn3en.js → chunk-ws720v4j.js} +1 -1
- package/bundle/chunk-wyavgt96.js +2 -0
- package/bundle/{chunk-t4kma6mq.js → chunk-x0de4z05.js} +2 -2
- package/bundle/{chunk-qqftaqza.js → chunk-x3dzzq0t.js} +1 -1
- package/bundle/{chunk-45dtsre6.js → chunk-x4jnyj09.js} +1 -1
- package/bundle/chunk-xchj8gna.js +2 -0
- package/bundle/{chunk-s81ck6bw.js → chunk-xdcwx384.js} +1 -1
- package/bundle/{chunk-yqvqzg7b.js → chunk-xmf59618.js} +1 -1
- package/bundle/{chunk-1rw4srd1.js → chunk-xxck1man.js} +1 -1
- package/bundle/{chunk-yg5azmxb.js → chunk-y4cz5s3h.js} +2 -2
- package/bundle/{chunk-vzj91hg8.js → chunk-yg9n2a2d.js} +1 -1
- package/bundle/{chunk-eefzbdbk.js → chunk-yhpwceqg.js} +2 -2
- package/bundle/{chunk-h9tcpbr7.js → chunk-yms3bsm7.js} +1 -1
- package/bundle/{chunk-9h2fms7x.js → chunk-ytfq6rn9.js} +1 -1
- package/bundle/chunk-yvjecrjy.js +2 -0
- package/bundle/{chunk-xpz5mnwz.js → chunk-yvtkx4x4.js} +1 -1
- package/bundle/chunk-yw2x6by6.js +2 -0
- package/bundle/{chunk-0ware2sh.js → chunk-ywj77e0m.js} +2 -2
- package/bundle/{chunk-962hspr0.js → chunk-z0dj15g9.js} +1 -1
- package/bundle/chunk-z0r4syk8.js +2 -0
- package/bundle/{chunk-1q5h95hc.js → chunk-z6qyx227.js} +1 -1
- package/bundle/chunk-z7c00g63.js +2 -0
- package/bundle/chunk-z93n3cbm.js +2 -0
- package/bundle/{chunk-3fx3eghq.js → chunk-zbt53cb5.js} +1 -1
- package/bundle/{chunk-tks3qzsw.js → chunk-zgwasq3p.js} +1 -1
- package/bundle/{chunk-6dmk2eyt.js → chunk-zh7e6kqs.js} +1 -1
- package/bundle/{chunk-4s9d2zte.js → chunk-zhhcfqhh.js} +1 -1
- package/bundle/{chunk-4q14whpc.js → chunk-zjyaze0d.js} +1 -1
- package/bundle/chunk-znr0saas.js +2 -0
- package/bundle/chunk-zqqt7v17.js +2 -0
- package/bundle/chunk-zwrgh1hc.js +2 -0
- package/bundle/chunk-zwxp07yc.js +2 -0
- package/bundle/{chunk-821zkh5v.js → chunk-zx63mepv.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0nves64y.js +0 -2
- package/bundle/chunk-0v7knkt5.js +0 -2
- package/bundle/chunk-1h5jdsgx.js +0 -2
- package/bundle/chunk-1r5e1jsb.js +0 -2
- package/bundle/chunk-1wyy3c48.js +0 -2
- package/bundle/chunk-1z299xq6.js +0 -2
- package/bundle/chunk-21aqt31s.js +0 -2
- package/bundle/chunk-22aq9ymg.js +0 -2
- package/bundle/chunk-26a17c9z.js +0 -2
- package/bundle/chunk-2a154mr0.js +0 -2
- package/bundle/chunk-2nbce486.js +0 -2
- package/bundle/chunk-2npxatq9.js +0 -2
- package/bundle/chunk-3gryj9r9.js +0 -2
- package/bundle/chunk-3jnanbjr.js +0 -2
- package/bundle/chunk-3meh1cbc.js +0 -2
- package/bundle/chunk-3t71xfr6.js +0 -2
- package/bundle/chunk-4045jzv5.js +0 -2
- package/bundle/chunk-4b2vv484.js +0 -2
- package/bundle/chunk-4ene1ymj.js +0 -2
- package/bundle/chunk-58r5etg8.js +0 -2
- package/bundle/chunk-5c2zw4h0.js +0 -2
- package/bundle/chunk-5e0vejcb.js +0 -8
- package/bundle/chunk-608f83n0.js +0 -2
- package/bundle/chunk-671r50ry.js +0 -2
- package/bundle/chunk-6bfnhr3d.js +0 -2
- package/bundle/chunk-6cv6d8rw.js +0 -2
- package/bundle/chunk-6qm6f88j.js +0 -2
- package/bundle/chunk-78bfwwmc.js +0 -2
- package/bundle/chunk-7wwtgxxf.js +0 -2
- package/bundle/chunk-98sb49dz.js +0 -2
- package/bundle/chunk-9kbtpq9m.js +0 -2
- package/bundle/chunk-9szp9b4m.js +0 -2
- package/bundle/chunk-9xqszq0c.js +0 -2
- package/bundle/chunk-a32kjs9e.js +0 -2
- package/bundle/chunk-ajykvcas.js +0 -2
- package/bundle/chunk-apym02ct.js +0 -2
- package/bundle/chunk-armv2rv5.js +0 -2
- package/bundle/chunk-as215v64.js +0 -2
- package/bundle/chunk-bnmpgpyf.js +0 -2
- package/bundle/chunk-bq3zt1x1.js +0 -2
- package/bundle/chunk-bx8fgjam.js +0 -2
- package/bundle/chunk-ckcnb59t.js +0 -2
- package/bundle/chunk-d79xaj6s.js +0 -3
- package/bundle/chunk-dah2d37s.js +0 -2
- package/bundle/chunk-dhgjv1n2.js +0 -2
- package/bundle/chunk-dk9k8ff5.js +0 -2
- package/bundle/chunk-dymysn4h.js +0 -2
- package/bundle/chunk-ev4gw5k6.js +0 -2
- package/bundle/chunk-ew2dxm43.js +0 -2
- package/bundle/chunk-ffp4wg27.js +0 -2
- package/bundle/chunk-hjy90gt2.js +0 -2
- package/bundle/chunk-hmden934.js +0 -2
- package/bundle/chunk-hsm8fbb1.js +0 -2
- package/bundle/chunk-hz1xfedb.js +0 -2
- package/bundle/chunk-ja9y478k.js +0 -2
- package/bundle/chunk-jam7xyjf.js +0 -2
- package/bundle/chunk-k51qphrk.js +0 -2
- package/bundle/chunk-kee7xpe3.js +0 -2
- package/bundle/chunk-p13eeqe4.js +0 -2
- package/bundle/chunk-p45f2nyb.js +0 -2
- package/bundle/chunk-qvwx32p9.js +0 -35
- package/bundle/chunk-qw9whsy2.js +0 -2
- package/bundle/chunk-r77kpzdv.js +0 -2
- package/bundle/chunk-rc95tp19.js +0 -2
- package/bundle/chunk-rmh2fhqy.js +0 -2
- package/bundle/chunk-rrn86a8w.js +0 -2
- package/bundle/chunk-s8v0h63x.js +0 -2
- package/bundle/chunk-sh4mngre.js +0 -2
- package/bundle/chunk-shqqngm8.js +0 -2
- package/bundle/chunk-sjfcwykr.js +0 -2
- package/bundle/chunk-sv01v0n0.js +0 -2
- package/bundle/chunk-tn8hsd2c.js +0 -2
- package/bundle/chunk-tqsx7w8z.js +0 -2
- package/bundle/chunk-tyt1negg.js +0 -2
- package/bundle/chunk-v580zwpf.js +0 -3
- package/bundle/chunk-vdv6cyh0.js +0 -2
- package/bundle/chunk-vsk8yfxp.js +0 -2
- package/bundle/chunk-vvgmkjym.js +0 -2
- package/bundle/chunk-vzf04vad.js +0 -2
- package/bundle/chunk-w0zyex7f.js +0 -2
- package/bundle/chunk-w623r5kb.js +0 -3
- package/bundle/chunk-wkxt9v7s.js +0 -2
- package/bundle/chunk-wwf6zacw.js +0 -2
- package/bundle/chunk-x9c8eddk.js +0 -2
- package/bundle/chunk-xjed8t2h.js +0 -2
- package/bundle/chunk-xxhta1tm.js +0 -2
- package/bundle/chunk-yhj6858v.js +0 -2
- package/bundle/chunk-yq3byrpv.js +0 -2
- package/bundle/chunk-ys8ajwys.js +0 -2
- package/bundle/chunk-yzt7p956.js +0 -2
- package/bundle/chunk-z56cb3fs.js +0 -2
- package/bundle/chunk-zhypknyg.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Hq as k,Iq as C,Jq as t,Lq as V,Oq as B,Pq as A,Qq as H,Tq as I,Yq as o}from"./chunk-7nh8vjx4.js";import{Zq as w}from"./chunk-mfg4stzn.js";import{mu as f}from"./chunk-zgj7jx8k.js";import{wz as n}from"./chunk-0mdmqtfr.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
|
|
2
|
+
import{$q as o,Kq as k,Lq as C,Mq as t,Oq as V,Rq as B,Sq as A,Tq as H,Wq as I}from"./chunk-pdcxmr6x.js";import{ar as w}from"./chunk-a1mbach4.js";import{pu as f}from"./chunk-sg9enzsp.js";import{zz as n}from"./chunk-5q98z8ck.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
|
|
3
3
|
]))`;continue}else if(X[L]==="$"){Y+=`($|(?=[\r
|
|
4
4
|
]))`;continue}}if(W.s&&X[L]==="."){Y+=$?`${X[L]}\r
|
|
5
5
|
`:`[${X[L]}\r
|
|
6
6
|
]`;continue}if(Y+=X[L],X[L]==="\\")Z=!0;else if($&&X[L]==="]")$=!1;else if(!$&&X[L]==="[")$=!0}try{new RegExp(Y)}catch(L){return console.warn(`Could not convert regex pattern at ${J.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),F.source}return Y}function LF(F,J){var Q,W,X,Y,Z,$;let U={type:"object",additionalProperties:(Q=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]}))!=null?Q:J.allowedAdditionalProperties};if(((W=F.keyType)==null?void 0:W._def.typeName)===w.ZodString&&((X=F.keyType._def.checks)==null?void 0:X.length)){let{type:L,...G}=$F(F.keyType._def,J);return{...U,propertyNames:G}}else if(((Y=F.keyType)==null?void 0:Y._def.typeName)===w.ZodEnum)return{...U,propertyNames:{enum:F.keyType._def.values}};else if(((Z=F.keyType)==null?void 0:Z._def.typeName)===w.ZodBranded&&F.keyType._def.type._def.typeName===w.ZodString&&(($=F.keyType._def.type._def.checks)==null?void 0:$.length)){let{type:L,...G}=YF(F.keyType._def,J);return{...U,propertyNames:G}}return U}function iF(F,J){if(J.mapStrategy==="record")return LF(F,J);let Q=E(F.keyType._def,{...J,currentPath:[...J.currentPath,"items","items","0"]})||K(),W=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items","items","1"]})||K();return{type:"array",maxItems:125,items:{type:"array",items:[Q,W],minItems:2,maxItems:2}}}function pF(F){let J=F.values,W=Object.keys(F.values).filter((Y)=>{return typeof J[J[Y]]!=="number"}).map((Y)=>J[Y]),X=Array.from(new Set(W.map((Y)=>typeof Y)));return{type:X.length===1?X[0]==="string"?"string":"number":["string","number"],enum:W}}function lF(){return{not:K()}}function cF(){return{type:"null"}}var S={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function dF(F,J){let Q=F.options instanceof Map?Array.from(F.options.values()):F.options;if(Q.every((W)=>(W._def.typeName in S)&&(!W._def.checks||!W._def.checks.length))){let W=Q.reduce((X,Y)=>{let Z=S[Y._def.typeName];return Z&&!X.includes(Z)?[...X,Z]:X},[]);return{type:W.length>1?W:W[0]}}else if(Q.every((W)=>W._def.typeName==="ZodLiteral"&&!W.description)){let W=Q.reduce((X,Y)=>{let Z=typeof Y._def.value;switch(Z){case"string":case"number":case"boolean":return[...X,Z];case"bigint":return[...X,"integer"];case"object":if(Y._def.value===null)return[...X,"null"];case"symbol":case"undefined":case"function":default:return X}},[]);if(W.length===Q.length){let X=W.filter((Y,Z,$)=>$.indexOf(Y)===Z);return{type:X.length>1?X:X[0],enum:Q.reduce((Y,Z)=>{return Y.includes(Z._def.value)?Y:[...Y,Z._def.value]},[])}}}else if(Q.every((W)=>W._def.typeName==="ZodEnum"))return{type:"string",enum:Q.reduce((W,X)=>[...W,...X._def.values.filter((Y)=>!W.includes(Y))],[])};return nF(F,J)}var nF=(F,J)=>{let Q=(F.options instanceof Map?Array.from(F.options.values()):F.options).map((W,X)=>E(W._def,{...J,currentPath:[...J.currentPath,"anyOf",`${X}`]})).filter((W)=>!!W&&(!J.strictUnions||typeof W==="object"&&Object.keys(W).length>0));return Q.length?{anyOf:Q}:void 0};function fF(F,J){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(F.innerType._def.typeName)&&(!F.innerType._def.checks||!F.innerType._def.checks.length))return{type:[S[F.innerType._def.typeName],"null"]};let Q=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","0"]});return Q&&{anyOf:[Q,{type:"null"}]}}function tF(F){let J={type:"number"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"int":J.type="integer";break;case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function oF(F,J){let Q={type:"object",properties:{}},W=[],X=F.shape();for(let Z in X){let $=X[Z];if($===void 0||$._def===void 0)continue;let U=sF($),L=E($._def,{...J,currentPath:[...J.currentPath,"properties",Z],propertyPath:[...J.currentPath,"properties",Z]});if(L===void 0)continue;if(Q.properties[Z]=L,!U)W.push(Z)}if(W.length)Q.required=W;let Y=aF(F,J);if(Y!==void 0)Q.additionalProperties=Y;return Q}function aF(F,J){if(F.catchall._def.typeName!=="ZodNever")return E(F.catchall._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]});switch(F.unknownKeys){case"passthrough":return J.allowedAdditionalProperties;case"strict":return J.rejectedAdditionalProperties;case"strip":return J.removeAdditionalStrategy==="strict"?J.allowedAdditionalProperties:J.rejectedAdditionalProperties}}function sF(F){try{return F.isOptional()}catch(J){return!0}}var rF=(F,J)=>{var Q;if(J.currentPath.toString()===((Q=J.propertyPath)==null?void 0:Q.toString()))return E(F.innerType._def,J);let W=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","1"]});return W?{anyOf:[{not:K()},W]}:K()},eF=(F,J)=>{if(J.pipeStrategy==="input")return E(F.in._def,J);else if(J.pipeStrategy==="output")return E(F.out._def,J);let Q=E(F.in._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),W=E(F.out._def,{...J,currentPath:[...J.currentPath,"allOf",Q?"1":"0"]});return{allOf:[Q,W].filter((X)=>X!==void 0)}};function FJ(F,J){return E(F.type._def,J)}function JJ(F,J){let W={type:"array",uniqueItems:!0,items:E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};if(F.minSize)W.minItems=F.minSize.value;if(F.maxSize)W.maxItems=F.maxSize.value;return W}function QJ(F,J){if(F.rest)return{type:"array",minItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[]),additionalItems:E(F.rest._def,{...J,currentPath:[...J.currentPath,"additionalItems"]})};else return{type:"array",minItems:F.items.length,maxItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[])}}function WJ(){return{not:K()}}function XJ(){return K()}var YJ=(F,J)=>{return E(F.innerType._def,J)},ZJ=(F,J,Q)=>{switch(J){case w.ZodString:return $F(F,Q);case w.ZodNumber:return tF(F);case w.ZodObject:return oF(F,Q);case w.ZodBigInt:return _F(F);case w.ZodBoolean:return jF();case w.ZodDate:return ZF(F,Q);case w.ZodUndefined:return WJ();case w.ZodNull:return cF();case w.ZodArray:return TF(F,Q);case w.ZodUnion:case w.ZodDiscriminatedUnion:return dF(F,Q);case w.ZodIntersection:return yF(F,Q);case w.ZodTuple:return QJ(F,Q);case w.ZodRecord:return LF(F,Q);case w.ZodLiteral:return hF(F);case w.ZodEnum:return xF(F);case w.ZodNativeEnum:return pF(F);case w.ZodNullable:return fF(F,Q);case w.ZodOptional:return rF(F,Q);case w.ZodMap:return iF(F,Q);case w.ZodSet:return JJ(F,Q);case w.ZodLazy:return()=>F.getter()._def;case w.ZodPromise:return FJ(F,Q);case w.ZodNaN:case w.ZodNever:return lF();case w.ZodEffects:return gF(F,Q);case w.ZodAny:return K();case w.ZodUnknown:return XJ();case w.ZodDefault:return SF(F,Q);case w.ZodBranded:return YF(F,Q);case w.ZodReadonly:return YJ(F,Q);case w.ZodCatch:return kF(F,Q);case w.ZodPipeline:return eF(F,Q);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return((W)=>{return})(J)}},$J=(F,J)=>{let Q=0;for(;Q<F.length&&Q<J.length;Q++)if(F[Q]!==J[Q])break;return[(F.length-Q).toString(),...J.slice(Q)].join("/")};function E(F,J,Q=!1){var W;let X=J.seen.get(F);if(J.override){let U=(W=J.override)==null?void 0:W.call(J,F,J,X,Q);if(U!==NF)return U}if(X&&!Q){let U=LJ(X,J);if(U!==void 0)return U}let Y={def:F,path:J.currentPath,jsonSchema:void 0};J.seen.set(F,Y);let Z=ZJ(F,F.typeName,J),$=typeof Z==="function"?E(Z(),J):Z;if($)UJ(F,J,$);if(J.postProcess){let U=J.postProcess($,F,J);return Y.jsonSchema=$,U}return Y.jsonSchema=$,$}var LJ=(F,J)=>{switch(J.$refStrategy){case"root":return{$ref:F.path.join("/")};case"relative":return{$ref:$J(J.currentPath,F.path)};case"none":case"seen":{if(F.path.length<J.currentPath.length&&F.path.every((Q,W)=>J.currentPath[W]===Q))return console.warn(`Recursive reference detected at ${J.currentPath.join("/")}! Defaulting to any`),K();return J.$refStrategy==="seen"?K():void 0}}},UJ=(F,J,Q)=>{if(F.description)Q.description=F.description;return Q},wJ=(F)=>{let J=VF(F),Q=J.name!==void 0?[...J.basePath,J.definitionPath,J.name]:J.basePath;return{...J,currentPath:Q,propertyPath:void 0,seen:new Map(Object.entries(J.definitions).map(([W,X])=>[X._def,{def:X._def,path:[...J.basePath,J.definitionPath,W],jsonSchema:void 0}]))}},EJ=(F,J)=>{var Q;let W=wJ(J),X=typeof J==="object"&&J.definitions?Object.entries(J.definitions).reduce((L,[G,N])=>{var h;return{...L,[G]:(h=E(N._def,{...W,currentPath:[...W.basePath,W.definitionPath,G]},!0))!=null?h:K()}},{}):void 0,Y=typeof J==="string"?J:(J==null?void 0:J.nameStrategy)==="title"?void 0:J==null?void 0:J.name,Z=(Q=E(F._def,Y===void 0?W:{...W,currentPath:[...W.basePath,W.definitionPath,Y]},!1))!=null?Q:K(),$=typeof J==="object"&&J.name!==void 0&&J.nameStrategy==="title"?J.name:void 0;if($!==void 0)Z.title=$;let U=Y===void 0?X?{...Z,[W.definitionPath]:X}:Z:{$ref:[...W.$refStrategy==="relative"?[]:W.basePath,W.definitionPath,Y].join("/"),[W.definitionPath]:{...X,[Y]:Z}};return U.$schema="http://json-schema.org/draft-07/schema#",U},g=Symbol.for("vercel.ai.schema");function JQ(F){let J;return()=>{if(J==null)J=F();return J}}function T(F,{validate:J}={}){return{[g]:!0,_type:void 0,get jsonSchema(){if(typeof F==="function")F=F();return F},validate:J}}function GJ(F){return typeof F==="object"&&F!==null&&g in F&&F[g]===!0&&"jsonSchema"in F&&"validate"in F}function CJ(F){return F==null?T({properties:{},additionalProperties:!1}):GJ(F)?F:("~standard"in F)?F["~standard"].vendor==="zod"?OJ(F):MJ(F):F()}function MJ(F){return T(()=>v(F["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(J)=>{let Q=await F["~standard"].validate(J);return"value"in Q?{success:!0,value:Q.value}:{success:!1,error:new I({value:J,cause:Q.issues})}}})}function KJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>EJ(F,{$refStrategy:W?"root":"none"}),{validate:async(X)=>{let Y=await F.safeParseAsync(X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function qJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>v(n(F,{target:"draft-7",io:"input",reused:W?"ref":"inline"})),{validate:async(X)=>{let Y=await f(F,X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function DJ(F){return"_zod"in F}function OJ(F,J){if(DJ(F))return qJ(F,J);else return KJ(F,J)}async function IJ({value:F,schema:J,context:Q}){let W=await y({value:F,schema:J,context:Q});if(!W.success)throw I.wrap({value:F,cause:W.error,context:Q});return W.value}async function y({value:F,schema:J,context:Q}){let W=CJ(J);try{if(W.validate==null)return{success:!0,value:F,rawValue:F};let X=await W.validate(F);if(X.success)return{success:!0,value:X.value,rawValue:F};return{success:!1,error:I.wrap({value:F,cause:X.error,context:Q}),rawValue:F}}catch(X){return{success:!1,error:I.wrap({value:F,cause:X,context:Q}),rawValue:F}}}async function PJ({text:F,schema:J}){try{let Q=x(F);if(J==null)return Q;return IJ({value:Q,schema:J})}catch(Q){if(B.isInstance(Q)||I.isInstance(Q))throw Q;throw new B({text:F,cause:Q})}}async function UF({text:F,schema:J}){try{let Q=x(F);if(J==null)return{success:!0,value:Q,rawValue:Q};return await y({value:Q,schema:J})}catch(Q){return{success:!1,error:B.isInstance(Q)?Q:new B({text:F,cause:Q}),rawValue:void 0}}}function QQ(F){try{return x(F),!0}catch(J){return!1}}function zJ({stream:F,schema:J}){return F.pipeThrough(new TextDecoderStream).pipeThrough(new o).pipeThrough(new TransformStream({async transform({data:Q},W){if(Q==="[DONE]")return;W.enqueue(await UF({text:Q,schema:J}))}}))}async function YQ({provider:F,providerOptions:J,schema:Q}){if((J==null?void 0:J[F])==null)return;let W=await y({value:J[F],schema:Q});if(!W.success)throw new V({argument:"providerOptions",message:`invalid ${F} provider options`,cause:W.error});return W.value}var AJ=()=>globalThis.fetch,$Q=async({url:F,headers:J,body:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:{"Content-Type":"application/json",...J},body:{content:JSON.stringify(Q),values:Q},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),LQ=async({url:F,headers:J,formData:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:J,body:{content:Q,values:Object.fromEntries(Q.entries())},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),wF=async({url:F,headers:J={},body:Q,successfulResponseHandler:W,failedResponseHandler:X,abortSignal:Y,fetch:Z=AJ()})=>{try{let $=await Z(F,{method:"POST",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),body:Q.content,signal:Y}),U=z($);if(!$.ok){let L;try{L=await X({response:$,url:F,requestBodyValues:Q.values})}catch(G){if(R(G)||C.isInstance(G))throw G;throw new C({message:"Failed to process error response",cause:G,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}throw L.value}try{return await W({response:$,url:F,requestBodyValues:Q.values})}catch(L){if(L instanceof Error){if(R(L)||C.isInstance(L))throw L}throw new C({message:"Failed to process successful response",cause:L,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}}catch($){throw JF({error:$,url:F,requestBodyValues:Q.values})}};function EF(F){return F}function UQ(F){return{...F,type:"dynamic"}}function wQ({id:F,inputSchema:J}){return({execute:Q,outputSchema:W,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U,...L})=>EF({type:"provider",id:F,args:L,inputSchema:J,outputSchema:W,execute:Q,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U})}function EQ({id:F,inputSchema:J,outputSchema:Q,supportsDeferredResults:W}){return({execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,...G})=>EF({type:"provider",id:F,args:G,inputSchema:J,outputSchema:Q,execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,supportsDeferredResults:W})}async function GQ(F){if(typeof F==="function")F=F();return Promise.resolve(F)}var MQ=({errorSchema:F,errorToMessage:J,isRetryable:Q})=>async({response:W,url:X,requestBodyValues:Y})=>{let Z=await W.text(),$=z(W);if(Z.trim()==="")return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})};try{let U=await PJ({text:Z,schema:F});return{responseHeaders:$,value:new C({message:J(U),url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,data:U,isRetryable:Q==null?void 0:Q(W,U)})}}catch(U){return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})}}},KQ=(F)=>async({response:J})=>{let Q=z(J);if(J.body==null)throw new t({});return{responseHeaders:Q,value:zJ({stream:J.body,schema:F})}},qQ=(F)=>async({response:J,url:Q,requestBodyValues:W})=>{let X=await J.text(),Y=await UF({text:X,schema:F}),Z=z(J);if(!Y.success)throw new C({message:"Invalid JSON response",cause:Y.error,statusCode:J.status,responseHeaders:Z,responseBody:X,url:Q,requestBodyValues:W});return{responseHeaders:Z,value:Y.value,rawValue:Y.rawValue}},DQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F);if(!F.body)throw new C({message:"Response body is empty",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0});try{let X=await F.arrayBuffer();return{responseHeaders:W,value:new Uint8Array(X)}}catch(X){throw new C({message:"Failed to read response as array buffer",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0,cause:X})}},OQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F),X=await F.text();return{responseHeaders:W,value:new C({message:F.statusText,url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:X})}};function IQ(F){let J=F.indexOf(".");return J===-1?F:F.slice(0,J)}function PQ(F){return F==null?void 0:F.replace(/\/$/,"")}function HJ(F){return F!=null&&typeof F[Symbol.asyncIterator]==="function"}async function*zQ({execute:F,input:J,options:Q}){let W=F(J,Q);if(HJ(W)){let X;for await(let Y of W)X=Y,yield{type:"preliminary",output:Y};yield{type:"final",output:X}}else yield{type:"final",output:await W}}
|
|
7
|
-
export{RJ as
|
|
7
|
+
export{RJ as Jp,NJ as Kp,VJ as Lp,TJ as Mp,z as Np,_J as Op,a as Pp,jJ as Qp,kJ as Rp,bJ as Sp,O as Tp,e as Up,KF as Vp,p as Wp,gJ as Xp,DF as Yp,vJ as Zp,yJ as _p,R as $p,QF as aq,zF as bq,WF as cq,uJ as dq,iJ as eq,pJ as fq,cJ as gq,dJ as hq,fJ as iq,tJ as jq,JQ as kq,T as lq,CJ as mq,OJ as nq,IJ as oq,y as pq,PJ as qq,UF as rq,QQ as sq,zJ as tq,YQ as uq,$Q as vq,LQ as wq,EF as xq,UQ as yq,wQ as zq,EQ as Aq,GQ as Bq,MQ as Cq,KQ as Dq,qQ as Eq,DQ as Fq,OQ as Gq,IQ as Hq,PQ as Iq,zQ as Jq};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{d0 as
|
|
2
|
+
import{vP as I,yP as Z}from"./chunk-sh03ka27.js";var x=I((r0,u)=>{u.exports=v;v.sync=K0;var N=Z("fs");function T0(q,L){var $=L.pathExt!==void 0?L.pathExt:process.env.PATHEXT;if(!$)return!0;if($=$.split(";"),$.indexOf("")!==-1)return!0;for(var G=0;G<$.length;G++){var H=$[G].toLowerCase();if(H&&q.substr(-H.length).toLowerCase()===H)return!0}return!1}function R(q,L,$){if(!q.isSymbolicLink()&&!q.isFile())return!1;return T0(L,$)}function v(q,L,$){N.stat(q,function(G,H){$(G,G?!1:R(H,q,L))})}function K0(q,L){return R(N.statSync(q),q,L)}});var g=I((o0,E)=>{E.exports=b;b.sync=f0;var C=Z("fs");function b(q,L,$){C.stat(q,function(G,H){$(G,G?!1:w(H,L))})}function f0(q,L){return w(C.statSync(q),L)}function w(q,L){return q.isFile()&&A0(q,L)}function A0(q,L){var{mode:$,uid:G,gid:H}=q,X=L.uid!==void 0?L.uid:process.getuid&&process.getuid(),k=L.gid!==void 0?L.gid:process.getgid&&process.getgid(),J=parseInt("100",8),Y=parseInt("010",8),B=parseInt("001",8),V=J|Y,Q=$&B||$&Y&&H===k||$&J&&G===X||$&V&&X===0;return Q}});var h=I((s0,c)=>{var p0=Z("fs"),K;if(process.platform==="win32"||global.TESTING_WINDOWS)K=x();else K=g();c.exports=A;A.sync=D0;function A(q,L,$){if(typeof L==="function")$=L,L={};if(!$){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,H){A(q,L||{},function(X,k){if(X)H(X);else G(k)})})}K(q,L||{},function(G,H){if(G){if(G.code==="EACCES"||L&&L.ignoreErrors)G=null,H=!1}$(G,H)})}function D0(q,L){try{return K.sync(q,L||{})}catch($){if(L&&L.ignoreErrors||$.code==="EACCES")return!1;else throw $}}});var r=I((a0,d)=>{var _=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",l=Z("path"),F0=_?";":":",m=h(),n=(q)=>Object.assign(Error(`not found: ${q}`),{code:"ENOENT"}),i=(q,L)=>{let $=L.colon||F0,G=q.match(/\//)||_&&q.match(/\\/)?[""]:[..._?[process.cwd()]:[],...(L.path||process.env.PATH||"").split($)],H=_?L.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",X=_?H.split($):[""];if(_){if(q.indexOf(".")!==-1&&X[0]!=="")X.unshift("")}return{pathEnv:G,pathExt:X,pathExtExe:H}},t=(q,L,$)=>{if(typeof L==="function")$=L,L={};if(!L)L={};let{pathEnv:G,pathExt:H,pathExtExe:X}=i(q,L),k=[],J=(B)=>new Promise((V,Q)=>{if(B===G.length)return L.all&&k.length?V(k):Q(n(q));let U=G[B],T=/^".*"$/.test(U)?U.slice(1,-1):U,z=l.join(T,q),f=!T&&/^\.[\\\/]/.test(q)?q.slice(0,2)+z:z;V(Y(f,B,0))}),Y=(B,V,Q)=>new Promise((U,T)=>{if(Q===H.length)return U(J(V+1));let z=H[Q];m(B+z,{pathExt:X},(f,M0)=>{if(!f&&M0)if(L.all)k.push(B+z);else return U(B+z);return U(Y(B,V,Q+1))})});return $?J(0).then((B)=>$(null,B),$):J(0)},O0=(q,L)=>{L=L||{};let{pathEnv:$,pathExt:G,pathExtExe:H}=i(q,L),X=[];for(let k=0;k<$.length;k++){let J=$[k],Y=/^".*"$/.test(J)?J.slice(1,-1):J,B=l.join(Y,q),V=!Y&&/^\.[\\\/]/.test(q)?q.slice(0,2)+B:B;for(let Q=0;Q<G.length;Q++){let U=V+G[Q];try{if(m.sync(U,{pathExt:H}))if(L.all)X.push(U);else return U}catch(T){}}}if(L.all&&X.length)return X;if(L.nothrow)return null;throw n(q)};d.exports=t;t.sync=O0});var p=I((e0,D)=>{var o=(q={})=>{let L=q.env||process.env;if((q.platform||process.platform)!=="win32")return"PATH";return Object.keys(L).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};D.exports=o;D.exports.default=o});var q0=I((qq,e)=>{var s=Z("path"),P0=r(),S0=p();function a(q,L){let $=q.options.env||process.env,G=process.cwd(),H=q.options.cwd!=null,X=H&&process.chdir!==void 0&&!process.chdir.disabled;if(X)try{process.chdir(q.options.cwd)}catch(J){}let k;try{k=P0.sync(q.command,{path:$[S0({env:$})],pathExt:L?s.delimiter:void 0})}catch(J){}finally{if(X)process.chdir(G)}if(k)k=s.resolve(H?q.options.cwd:"",k);return k}function j0(q){return a(q)||a(q,!0)}e.exports=j0});var L0=I((N0,O)=>{var F=/([()\][%!^"`<>&|;, *?])/g;function W0(q){return q=q.replace(F,"^$1"),q}function y0(q,L){if(q=`${q}`,q=q.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),q=q.replace(/(?=(\\+?)?)\1$/,"$1$1"),q=`"${q}"`,q=q.replace(F,"^$1"),L)q=q.replace(F,"^$1");return q}N0.command=W0;N0.argument=y0});var G0=I((Lq,$0)=>{$0.exports=/^#!(.*)/});var X0=I(($q,H0)=>{var u0=G0();H0.exports=(q="")=>{let L=q.match(u0);if(!L)return null;let[$,G]=L[0].replace(/#! ?/,"").split(" "),H=$.split("/").pop();if(H==="env")return G;return G?`${H} ${G}`:H}});var B0=I((Gq,k0)=>{var P=Z("fs"),x0=X0();function C0(q){let $=Buffer.alloc(150),G;try{G=P.openSync(q,"r"),P.readSync(G,$,0,150,0),P.closeSync(G)}catch(H){}return x0($.toString())}k0.exports=C0});var U0=I((Hq,Q0)=>{var b0=Z("path"),I0=q0(),J0=L0(),w0=B0(),E0=process.platform==="win32",g0=/\.(?:com|exe)$/i,c0=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h0(q){q.file=I0(q);let L=q.file&&w0(q.file);if(L)return q.args.unshift(q.file),q.command=L,I0(q);return q.file}function l0(q){if(!E0)return q;let L=h0(q),$=!g0.test(L);if(q.options.forceShell||$){let G=c0.test(L);q.command=b0.normalize(q.command),q.command=J0.command(q.command),q.args=q.args.map((X)=>J0.argument(X,G));let H=[q.command].concat(q.args).join(" ");q.args=["/d","/s","/c",`"${H}"`],q.command=process.env.comspec||"cmd.exe",q.options.windowsVerbatimArguments=!0}return q}function m0(q,L,$){if(L&&!Array.isArray(L))$=L,L=null;L=L?L.slice(0):[],$=Object.assign({},$);let G={command:q,args:L,options:$,file:void 0,original:{command:q,args:L}};return $.shell?G:l0(G)}Q0.exports=m0});var Z0=I((Xq,Y0)=>{var S=process.platform==="win32";function j(q,L){return Object.assign(Error(`${L} ${q.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${L} ${q.command}`,path:q.command,spawnargs:q.args})}function n0(q,L){if(!S)return;let $=q.emit;q.emit=function(G,H){if(G==="exit"){let X=V0(H,L);if(X)return $.call(q,"error",X)}return $.apply(q,arguments)}}function V0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawn");return null}function i0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawnSync");return null}Y0.exports={hookChildProcess:n0,verifyENOENT:V0,verifyENOENTSync:i0,notFoundError:j}});var d0=I((kq,M)=>{var z0=Z("child_process"),W=U0(),y=Z0();function _0(q,L,$){let G=W(q,L,$),H=z0.spawn(G.command,G.args,G.options);return y.hookChildProcess(H,G),H}function t0(q,L,$){let G=W(q,L,$),H=z0.spawnSync(G.command,G.args,G.options);return H.error=H.error||y.verifyENOENTSync(H.status,G),H}M.exports=_0;M.exports.spawn=_0;M.exports.sync=t0;M.exports._parse=W;M.exports._enoent=y});
|
|
3
|
+
export{d0 as Qs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Re as T}from"./chunk-w136zswr.js";import{Gf as p}from"./chunk-48rg4yhk.js";import{uP as N}from"./chunk-sh03ka27.js";var a=N(T(),1),t=N(p(),1);import{readFileSync as f}from"fs";var i=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:E,providerId:n,policyArns:d,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:c}=e;if(!c){let{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-ws720v4j.js");c=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:E,ProviderId:n,PolicyArns:d,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",A="AWS_ROLE_SESSION_NAME",w=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[I],E=e?.roleSessionName??process.env[A];if(!o||!r)throw new t.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:t.externalDataInterceptor?.getTokenRecord?.()[o]??f(o,{encoding:"ascii"}),roleArn:r,roleSessionName:E})(s);if(o===process.env[_])a.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as je,w as ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$h as
|
|
2
|
+
import{$h as m,Ai as N,Bi as O,Ci as P,Di as Q,Ei as R,Ph as a,Qh as b,Rh as c,Sh as d,Th as e,Uh as f,Vh as g,Wh as h,Xh as i,Yh as j,Zh as k,_h as l,ai as n,bi as o,ci as p,di as q,ei as r,fi as s,gi as t,hi as u,ii as v,ji as w,ki as x,li as y,mi as z,ni as A,oi as B,pi as C,qi as D,ri as E,si as F,ti as G,ui as H,vi as I,wi as J,xi as K,yi as L,zi as M}from"./chunk-rd08wx37.js";import"./chunk-sh03ka27.js";export{Q as parseModelsYml,m as isWorkflowModel,l as isResponsesApiModel,O as gitlab,n as getWorkflowModelRef,h as getValidModelsForProvider,g as getProviderForModelId,j as getOpenAIModelForModelId,k as getOpenAIApiType,f as getModelMapping,i as getAnthropicModelForModelId,R as discoverWorkflowModels,N as createGitLab,r as WorkflowType,s as WS_KEEPALIVE_PING_INTERVAL_MS,t as WS_HEARTBEAT_INTERVAL_MS,z as WORKFLOW_ENVIRONMENT,q as VERSION,K as TOKEN_EXPIRY_SKEW_MS,H as OPENCODE_GITLAB_AUTH_CLIENT_ID,L as OAUTH_SCOPES,e as MODEL_MAPPINGS,o as MODEL_ID_TO_ANTHROPIC_MODEL,B as GitLabWorkflowTokenClient,G as GitLabWorkflowLanguageModel,A as GitLabWorkflowClient,D as GitLabProjectDetector,C as GitLabProjectCache,p as GitLabOpenAILanguageModel,M as GitLabOAuthManager,E as GitLabModelDiscovery,P as GitLabModelConfigRegistry,F as GitLabModelCache,a as GitLabError,c as GitLabDirectAccessClient,d as GitLabAnthropicLanguageModel,J as GITLAB_COM_URL,u as DEFAULT_WORKFLOW_DEFINITION,v as DEFAULT_CLIENT_CAPABILITIES,b as DEFAULT_AI_GATEWAY_URL,y as DEFAULT_AGENT_PRIVILEGES,w as CLIENT_VERSION,I as BUNDLED_CLIENT_ID,x as AGENT_PRIVILEGES};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{sP as D}from"./chunk-bdcd2mcb.js";import{tP as C}from"./chunk-x0de4z05.js";import{vP as z,yP as B}from"./chunk-sh03ka27.js";var H=z((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var E=B("fs"),F=D(),q=C();async function G(){try{return(await E.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}try{return(await(0,F.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}return}v.getMachineId=G});export default H();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{fe as a}from"./chunk-w8nj5ph5.js";import{$f as d}from"./chunk-estc7tzt.js";import{cg as i}from"./chunk-psmwrvqs.js";import{Al as p,Cl as n}from"./chunk-rt49c6js.js";import"./chunk-4gzggzc0.js";import{cn as f}from"./chunk-31a47ptm.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-kegvr7wt.js";import"./chunk-2tkgtasa.js";import"./chunk-6cztstry.js";import"./chunk-4yd2vvh6.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-mnjz8nqs.js";import{Jt as m}from"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";import{spawn as y}from"child_process";import{Database as g}from"bun:sqlite";import{EOL as l}from"os";var b=a({command:"$0 [query]",describe:"open an interactive sqlite3 shell or run a query",builder:(t)=>{return t.positional("query",{type:"string",describe:"SQL query to execute"}).option("format",{type:"string",choices:["json","tsv"],default:"tsv",describe:"Output format"})},handler:async(t)=>{let o=t.query;if(o){let r=new g(n.Path,{readonly:!0});try{let e=r.query(o).all();if(t.format==="json")console.log(JSON.stringify(e,null,2));else if(e.length>0){let s=Object.keys(e[0]);console.log(s.join("\t"));for(let u of e)console.log(s.map((h)=>u[h]).join("\t"))}}catch(e){i.error(m(e)),process.exit(1)}r.close();return}let c=y("sqlite3",[n.Path],{stdio:"inherit"});await new Promise((r)=>c.on("close",r))}}),w=a({command:"path",describe:"print the database path",handler:()=>{console.log(n.Path)}}),q=a({command:"migrate",describe:"migrate JSON data to SQLite (merges with existing data)",handler:async()=>{let t=new g(n.Path),o=process.stderr.isTTY,c=-1;if(o)process.stderr.write("\x1B[?25l");try{let r=await p.run(f({client:t}),{progress:(e)=>{let s=Math.floor(e.current/e.total*100);if(s===c)return;if(c=s,o)process.stderr.write(d(s,`${e.current}/${e.total}`)+" ");else process.stderr.write(`sqlite-migration:${s}${l}`)}});if(o)process.stderr.write(`
|
|
3
3
|
`);if(o)process.stderr.write("\x1B[?25h");else process.stderr.write(`sqlite-migration:done${l}`);if(i.println(`Migration complete: ${r.projects} projects, ${r.sessions} sessions, ${r.messages} messages`),r.errors.length>0)i.println(`${r.errors.length} errors occurred during migration`)}catch(r){if(o)process.stderr.write("\x1B[?25h");i.error(`Migration failed: ${m(r)}`),process.exit(1)}finally{t.close()}}}),v=a({command:"db",describe:"database tools",builder:(t)=>{return t.command(b).command(w).command(q).demandCommand()},handler:()=>{}});export{v as DbCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{He as Sw}from"./chunk-e6s8ep9m.js";import{Le as $w}from"./chunk-2md5fz4f.js";import{Me as dw}from"./chunk-h1p3xcfp.js";import{Ne as Aw,Oe as xw,Pe as Cw}from"./chunk-6jb4mnvq.js";import{Qe as Ew}from"./chunk-ec1bwa7f.js";import{Cf as yw,Df as Rw,Ef as Pw,Ff as vw,Gf as Tw}from"./chunk-hcd0k14e.js";import"./chunk-0xf12tf3.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
|
|
2
|
+
import{Je as Sw}from"./chunk-ffyj5nsg.js";import{Ne as $w}from"./chunk-0m4gvjcv.js";import{Oe as dw}from"./chunk-69k7cdtv.js";import{Pe as Aw,Qe as xw,Re as Cw}from"./chunk-w136zswr.js";import{Se as Ew}from"./chunk-s0gmxpxm.js";import{Ef as yw,Ff as Rw,Gf as Pw,Hf as vw,If as Tw}from"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ql as f,Rl as Gj,Sl as Rj,Tl as Hj,Wl as s}from"./chunk-aq75kv5f.js";import{Gn as xj}from"./chunk-1f9qcrn6.js";import{Mn as vj}from"./chunk-jt94rhev.js";import{Sr as P,Tr as wj,Zr as T,_r as Kj}from"./chunk-53n3tfwn.js";import{ct as a,dt as y}from"./chunk-dpm5x19e.js";import{Mt as I,Vt as h}from"./chunk-6g3bzap8.js";import{eu as i,fu as Ij,gu as Jj,ju as Nj}from"./chunk-mrh5q4s6.js";import{ku as j}from"./chunk-w623r5kb.js";import{CF as o,SO as C,WK as l,XF as g,dI as Q,yC as Wj}from"./chunk-hk8m8vax.js";import{rP as kj,tP as Oj,vP as Ej}from"./chunk-0xf12tf3.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>nj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(T.retryTransient({retryOn:"errors-and-responses",times:2,schedule:g.exponential(200).pipe(g.jittered)}));import Yj from"path";var z=kj(xj(),1);import u from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function Tj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(u.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(u.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),n=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*n(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>Tj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*n(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*n(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*n(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),k="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var uj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*T.HttpClient,V=T.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(k))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(k)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(uj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${k}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${k}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${k}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),nj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),dj=300000,Aj=8388608,M,gj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<dj}function Lj(J){return!J&&lj()}function d(J){let V=gj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return d(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){V.throwIfAborted();let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason).catch(()=>{return});V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(V.throwIfAborted(),B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Mj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=d(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-hnbtfpb7.js").then((_)=>d(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Mj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),d($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Mj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(M||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),M=setInterval(async()=>{await jj()},3600000),M.unref()}function aj(){if(!M)return;clearInterval(M),M=void 0}
|
|
3
|
-
export{_j as
|
|
2
|
+
import{Sl as f,Tl as Gj,Ul as Rj,Vl as Hj,Yl as s}from"./chunk-4gzggzc0.js";import{In as xj}from"./chunk-h036zy9e.js";import{On as vj}from"./chunk-3152y1q9.js";import{Vr as P,Wr as wj,as as T,bs as Kj}from"./chunk-6cztstry.js";import{ft as a,gt as y}from"./chunk-mnjz8nqs.js";import{Pt as I,Yt as h}from"./chunk-5dvy83ms.js";import{hu as i,iu as Ij,ju as Jj,mu as Nj}from"./chunk-ffx0cr44.js";import{nu as j}from"./chunk-33mzqyyb.js";import{BC as Wj,FF as o,VO as C,ZK as l,_F as g,gI as Q}from"./chunk-9kc2th5c.js";import{uP as kj,wP as Oj,yP as Ej}from"./chunk-sh03ka27.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>nj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(T.retryTransient({retryOn:"errors-and-responses",times:2,schedule:g.exponential(200).pipe(g.jittered)}));import Yj from"path";var z=kj(xj(),1);import u from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function Tj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(u.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(u.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),n=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*n(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>Tj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*n(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*n(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*n(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),k="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var uj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*T.HttpClient,V=T.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(k))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(k)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(uj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${k}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${k}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${k}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),nj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),dj=300000,Aj=8388608,M,gj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<dj}function Lj(J){return!J&&lj()}function d(J){let V=gj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return d(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){V.throwIfAborted();let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason).catch(()=>{return});V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(V.throwIfAborted(),B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Mj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=d(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-86sfzgnf.js").then((_)=>d(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Mj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),d($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Mj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(M||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),M=setInterval(async()=>{await jj()},3600000),M.unref()}function aj(){if(!M)return;clearInterval(M),M=void 0}
|
|
3
|
+
export{_j as dl,U as el,Aj as fl,pj as gl,cj as hl,Pj as il,S as jl,fj as kl,jj as ll,sj as ml,aj as nl,tj as ol};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Hr as mJ,Ir as vJ,Jr as dJ,Kr as lJ,Nr as d,Or as l,Qr as uJ,Rr as cJ,Ur as pJ,Vr as iJ,Wr as nJ,Xr as aJ,Yr as rJ,_r as AQ}from"./chunk-53n3tfwn.js";import{Bt as FQ,ct as CQ,dt as DQ}from"./chunk-dpm5x19e.js";import{Mt as x,Vt as GJ}from"./chunk-6g3bzap8.js";import{$O as eJ,CF as z,CH as xJ,DE as qQ,DG as EJ,GH as fJ,HG as MJ,IF as b,KE as _J,KF as CJ,KG as oJ,OG as RJ,PM as j,QG as VJ,RH as E,TG as hJ,UF as DJ,VF as FJ,WF as AJ,WH as yJ,XH as bJ,ZE as BQ,_E as wQ,_O as g,aD as GQ,aH as jJ,bF as $J,cF as UJ,cP as HQ,dC as wJ,dI as I,dP as WQ,eN as o,eP as R,gC as HJ,gG as t,gH as NJ,hF as zJ,hG as OJ,jC as WJ,jG as y,kJ as gJ,lC as $Q,oD as IJ,qB as tJ,rD as PJ,rH as kJ,sF as ZJ,tC as f,uD as T,vH as LJ,wG as TJ,xD as KJ,yH as SJ}from"./chunk-hk8m8vax.js";import{rP as zQ,tP as u,vP as S}from"./chunk-0xf12tf3.js";var IX={};u(IX,{resource:()=>BJ,layer:()=>EQ,enabled:()=>OQ,Observability:()=>WX});var p={};u(p,{make:()=>IQ,layer:()=>ZX});var VQ=AJ.pipe(FJ,DJ((J)=>{if(lJ(J)&&J.reason._tag==="StatusCodeError"&&J.reason.response.status===429){let Q=HJ(J.reason.response.headers["retry-after"]).pipe(WJ(CJ),wJ(()=>5));return t(T(Q))}return t(T(1))})),sJ=E(function*(J){let Q=yield*jJ(),X=f(Q,b),Y=f(Q,UJ),$=fJ(Q),G=KJ(IJ(J.exportInterval),PJ),B=void 0,C=nJ(f(Q,pJ)).pipe(iJ(NJ(rJ,!1)),aJ({schedule:VQ,times:3})),V=vJ({"user-agent":`effect-opentelemetry-${J.label}/0.0.0`});if(J.headers)V=dJ(mJ(J.headers),V);let r=uJ(J.url,{headers:V}),O=[],s=OJ(()=>{if(B!==void 0&&X.currentTimeMillisUnsafe()<B)return y;else if(B!==void 0)B=void 0;let h=O;if(J.maxBatchSize!=="disabled"){if(O.length===0)return y;O=[]}return C.execute(cJ(r,J.body(h))).pipe(EJ,SJ(!1))}).pipe(MJ((h)=>{if(B!==void 0)return y;return B=X.currentTimeMillisUnsafe()+60000,O=[],yJ("Disabling exporter for 60 seconds",h)}),bJ({package:"@effect/opentelemetry",module:J.label}));return yield*zJ(Y,s.pipe(RJ,kJ,VJ(J.shutdownTimeout))),yield*hJ(G).pipe(TJ(s),LJ,xJ(Y)),{push(h){if(B!==void 0)return;if(O.push(h),J.maxBatchSize!=="disabled"&&O.length>=J.maxBatchSize)gJ($(s),Y)}}});var jQ=(J)=>{let Q=J.attributes?e(Object.entries(J.attributes)):[];if(Q.push({key:"service.name",value:{stringValue:J.serviceName}}),J.serviceVersion)Q.push({key:"service.version",value:{stringValue:J.serviceVersion}});return{attributes:Q,droppedAttributesCount:0}},JQ=E(function*(J){let Q={...yield*g(o(eJ(j,j)),"OTEL_RESOURCE_ATTRIBUTES"),...J?.attributes},X=J?.serviceName??Q["service.name"]??(yield*g(j,"OTEL_SERVICE_NAME"));delete Q["service.name"];let Y=J?.serviceVersion??Q["service.version"]??(yield*g(o(j),"OTEL_SERVICE_VERSION"));return delete Q["service.version"],jQ({serviceName:X,serviceVersion:Y,attributes:Q})},oJ),QQ=(J)=>{let Q=J.attributes.find((X)=>X.key==="service.name");if(!Q||!Q.value.stringValue)throw Error("Resource does not contain a service name");return Q.value.stringValue},e=(J)=>{let Q=[];for(let[X,Y]of J)Q.push({key:X,value:m(Y)});return Q},m=(J)=>{if(Array.isArray(J))return{arrayValue:{values:J.map(m)}};switch(typeof J){case"string":return{stringValue:J};case"bigint":return{intValue:Number(J)};case"number":return Number.isInteger(J)?{intValue:J}:{doubleValue:J};case"boolean":return{boolValue:J};default:return{stringValue:tJ(J)}}};var c={};u(c,{layerProtobuf:()=>YX,layerJson:()=>XX,OtlpSerialization:()=>M});var N={Varint:0,Fixed64:1,LengthDelimited:2,Fixed32:5},k=(J,Q)=>J<<3|Q,D=(J)=>{let Q=[],X=typeof J==="bigint"?J:BigInt(J);while(X>0x7fn)Q.push(Number(X&0x7fn)|128),X>>=7n;return Q.push(Number(X)),new Uint8Array(Q)};var kQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setBigUint64(0,J,!0),Q},LQ=(J)=>{let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,J,!0),Q},SQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setFloat64(0,J,!0),Q},xQ=(J)=>new TextEncoder().encode(J),fQ=(J)=>{let Q=new Uint8Array(J.length/2);for(let X=0;X<J.length;X+=2)Q[X/2]=parseInt(J.slice(X,X+2),16);return Q},Z=(...J)=>{let Q=J.reduce(($,G)=>$+G.length,0),X=new Uint8Array(Q),Y=0;for(let $ of J)X.set($,Y),Y+=$.length;return X},q=(J,Q)=>Z(D(k(J,N.Varint)),D(Q));var JJ=(J,Q)=>q(J,Q?1:0),W=(J,Q)=>Z(D(k(J,N.Fixed64)),kQ(Q)),v=(J,Q)=>Z(D(k(J,N.Fixed32)),LQ(Q)),F=(J,Q)=>Z(D(k(J,N.Fixed64)),SQ(Q)),L=(J,Q)=>Z(D(k(J,N.LengthDelimited)),D(Q.length),Q),K=(J,Q)=>L(J,xQ(Q)),U=(J,Q)=>L(J,fQ(Q)),w=(J,Q)=>L(J,Q),_=(J,Q,X)=>Z(...Q.map((Y)=>w(J,X(Y))));var H=(J,Q)=>Q!==void 0&&Q!==""?K(J,Q):new Uint8Array(0);var QJ=(J)=>{if(J.stringValue!==void 0&&J.stringValue!==null)return K(1,J.stringValue);if(J.boolValue!==void 0&&J.boolValue!==null)return JJ(2,J.boolValue);if(J.intValue!==void 0&&J.intValue!==null)return q(3,BigInt(J.intValue));if(J.doubleValue!==void 0&&J.doubleValue!==null)return F(4,J.doubleValue);if(J.arrayValue!==void 0)return w(5,bQ(J.arrayValue));if(J.kvlistValue!==void 0)return w(6,gQ(J.kvlistValue));if(J.bytesValue!==void 0)return L(7,J.bytesValue);return new Uint8Array(0)},bQ=(J)=>_(1,J.values,QJ),gQ=(J)=>_(1,J.values,P),P=(J)=>Z(K(1,J.key),w(2,QJ(J.value))),XJ=(J)=>Z(K(1,J.name),H(2,J.version),J.attributes?_(3,J.attributes,P):new Uint8Array(0),J.droppedAttributesCount?q(4,J.droppedAttributesCount):new Uint8Array(0)),YJ=(J)=>Z(_(1,J.attributes,P),J.droppedAttributesCount>0?q(2,J.droppedAttributesCount):new Uint8Array(0));var mQ=(J)=>Z(H(2,J.message),q(3,J.code)),vQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),K(2,J.name),_(3,J.attributes,P),J.droppedAttributesCount>0?q(4,J.droppedAttributesCount):new Uint8Array(0)),dQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),_(4,J.attributes,P),J.droppedAttributesCount>0?q(5,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(6,J.flags):new Uint8Array(0)),lQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),J.parentSpanId!==void 0?U(4,J.parentSpanId):new Uint8Array(0),K(5,J.name),q(6,J.kind),W(7,BigInt(J.startTimeUnixNano)),W(8,BigInt(J.endTimeUnixNano)),_(9,J.attributes,P),J.droppedAttributesCount>0?q(10,J.droppedAttributesCount):new Uint8Array(0),_(11,J.events,vQ),J.droppedEventsCount>0?q(12,J.droppedEventsCount):new Uint8Array(0),_(13,J.links,dQ),J.droppedLinksCount>0?q(14,J.droppedLinksCount):new Uint8Array(0),w(15,mQ(J.status)),J.flags!==void 0?v(16,J.flags):new Uint8Array(0)),uQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.spans,lQ),H(3,J.schemaUrl)),cQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeSpans,uQ),H(3,J.schemaUrl)),XQ=(J)=>_(1,J.resourceSpans,cQ);var YQ=(J)=>Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),J.asDouble!==void 0?F(4,J.asDouble):new Uint8Array(0),J.asInt!==void 0?W(6,BigInt(J.asInt)):new Uint8Array(0),_(7,J.attributes,P),J.flags!==void 0?q(8,J.flags):new Uint8Array(0)),pQ=(J)=>{let Q=Z(...J.bucketCounts.map((Y)=>W(6,BigInt(Y)))),X=Z(...J.explicitBounds.map((Y)=>F(7,Y)));return Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),W(4,BigInt(J.count)),J.sum!==void 0?F(5,J.sum):new Uint8Array(0),Q,X,_(9,J.attributes,P),J.flags!==void 0?q(10,J.flags):new Uint8Array(0),J.min!==void 0?F(11,J.min):new Uint8Array(0),J.max!==void 0?F(12,J.max):new Uint8Array(0))},iQ=(J)=>_(1,J.dataPoints,YQ),nQ=(J)=>Z(_(1,J.dataPoints,YQ),q(2,J.aggregationTemporality),JJ(3,J.isMonotonic)),aQ=(J)=>Z(_(1,J.dataPoints,pQ),q(2,J.aggregationTemporality)),rQ=(J)=>Z(K(1,J.name),H(2,J.description),H(3,J.unit),J.gauge!==void 0?w(5,iQ(J.gauge)):new Uint8Array(0),J.sum!==void 0?w(7,nQ(J.sum)):new Uint8Array(0),J.histogram!==void 0?w(9,aQ(J.histogram)):new Uint8Array(0)),sQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.metrics,rQ),H(3,J.schemaUrl)),tQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeMetrics,sQ),H(3,J.schemaUrl)),ZQ=(J)=>_(1,J.resourceMetrics,tQ);var oQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),J.severityNumber!==void 0?q(2,J.severityNumber):new Uint8Array(0),H(3,J.severityText),J.body!==void 0?w(5,QJ(J.body)):new Uint8Array(0),_(6,J.attributes,P),J.droppedAttributesCount!==void 0&&J.droppedAttributesCount>0?q(7,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(8,J.flags):new Uint8Array(0),J.traceId!==void 0&&J.traceId!==""?U(9,J.traceId):new Uint8Array(0),J.spanId!==void 0&&J.spanId!==""?U(10,J.spanId):new Uint8Array(0),J.observedTimeUnixNano!==void 0?W(11,BigInt(J.observedTimeUnixNano)):new Uint8Array(0)),eQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.logRecords,oQ),H(3,J.schemaUrl)),JX=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeLogs,eQ),H(3,J.schemaUrl)),_Q=(J)=>_(1,J.resourceLogs,JX);class M extends $Q()("effect/observability/OtlpSerialization"){}var XX=ZJ(M,{traces:(J)=>l(J),metrics:(J)=>l(J),logs:(J)=>l(J)}),YX=ZJ(M,{traces:(J)=>d(XQ(J),"application/x-protobuf"),metrics:(J)=>d(ZQ(J),"application/x-protobuf"),logs:(J)=>d(_Q(J),"application/x-protobuf")});var IQ=E(function*(J){let Q=yield*M,X=yield*JQ(J.resource),Y={name:QQ(X)},$=yield*sJ({label:"OtlpLogger",url:J.url,headers:J.headers,maxBatchSize:J.maxBatchSize??1000,exportInterval:J.exportInterval??T(1),body:(B)=>Q.logs({resourceLogs:[{resource:X,scopeLogs:[{scope:Y,logRecords:B}]}]}),shutdownTimeout:J.shutdownTimeout??T(3)}),G={excludeLogSpans:J.excludeLogSpans??!1,clock:yield*b};return HQ((B)=>{$.push(_X(B,G))})}),ZX=(J)=>WQ([IQ(J)],{mergeWithExisting:J.mergeWithExisting??!0}),_X=(J,Q)=>{let Y=Q.clock.currentTimeNanosUnsafe().toString(),$=J.date.getTime(),G=e(Object.entries(J.fiber.getRef(BQ)));if(G.push({key:"fiberId",value:{intValue:J.fiber.id}}),!Q.excludeLogSpans)for(let[V,r]of J.fiber.getRef(wQ))G.push({key:`logSpan.${V}`,value:{stringValue:`${$-r}ms`}});if(J.cause.reasons.length>0)G.push({key:"log.error",value:{stringValue:qQ(J.cause)}});let B=GQ(J.message),C={severityNumber:$X(J.logLevel),severityText:J.logLevel,timeUnixNano:Y,observedTimeUnixNano:Y,attributes:G,body:m(B.length===1?B[0]:B),droppedAttributesCount:0};if(J.fiber.currentSpan)C.traceId=J.fiber.currentSpan.traceId,C.spanId=J.fiber.currentSpan.spanId;return C},$X=(J)=>{switch(J){case"Trace":return A.SEVERITY_NUMBER_TRACE;case"Debug":return A.SEVERITY_NUMBER_DEBUG;case"Info":return A.SEVERITY_NUMBER_INFO;case"Warn":return A.SEVERITY_NUMBER_WARN;case"Error":return A.SEVERITY_NUMBER_ERROR;case"Fatal":return A.SEVERITY_NUMBER_FATAL;default:return A.SEVERITY_NUMBER_UNSPECIFIED}},A={SEVERITY_NUMBER_UNSPECIFIED:0,SEVERITY_NUMBER_TRACE:1,SEVERITY_NUMBER_TRACE2:2,SEVERITY_NUMBER_TRACE3:3,SEVERITY_NUMBER_TRACE4:4,SEVERITY_NUMBER_DEBUG:5,SEVERITY_NUMBER_DEBUG2:6,SEVERITY_NUMBER_DEBUG3:7,SEVERITY_NUMBER_DEBUG4:8,SEVERITY_NUMBER_INFO:9,SEVERITY_NUMBER_INFO2:10,SEVERITY_NUMBER_INFO3:11,SEVERITY_NUMBER_INFO4:12,SEVERITY_NUMBER_WARN:13,SEVERITY_NUMBER_WARN2:14,SEVERITY_NUMBER_WARN3:15,SEVERITY_NUMBER_WARN4:16,SEVERITY_NUMBER_ERROR:17,SEVERITY_NUMBER_ERROR2:18,SEVERITY_NUMBER_ERROR3:19,SEVERITY_NUMBER_ERROR4:20,SEVERITY_NUMBER_FATAL:21,SEVERITY_NUMBER_FATAL2:22,SEVERITY_NUMBER_FATAL3:23,SEVERITY_NUMBER_FATAL4:24};var UQ={};u(UQ,{logger:()=>n,layer:()=>qJ,create:()=>KQ});var GX=(J)=>J==="sessionID"?"session.id":J,PQ=(J)=>Object.fromEntries(Object.entries(J??{}).filter((Q)=>Q[1]!==void 0&&Q[1]!==null).map(([Q,X])=>[GX(Q),X])),qX=(J)=>{if(Array.isArray(J))return J.map((Q)=>String(Q)).join(" ");return J===void 0?"":String(J)},i=(J,Q,X,Y)=>{let $=PQ({...Q,...Y}),G=J(X);return Object.keys($).length?I.annotateLogs(G,$):G},n=R.make((J)=>{let Q=PQ(J.fiber.getRef($J.CurrentLogAnnotations)),X=J.date.getTime();for(let[B,C]of J.fiber.getRef($J.CurrentLogSpans))Q[`logSpan.${B}`]=`${X-C}ms`;if(J.cause.reasons.length>0)Q.cause=_J.pretty(J.cause);let Y=typeof Q.service==="string"?Q.service:void 0;if(Y)delete Q.service;let $=Y?GJ.create({service:Y}):GJ.Default,G=qX(J.message);switch(J.logLevel){case"Trace":case"Debug":return $.debug(G,Q);case"Warn":return $.warn(G,Q);case"Error":case"Fatal":return $.error(G,Q);default:return $.info(G,Q)}}),qJ=R.layer([n],{mergeWithExisting:!1}),KQ=(J={})=>({debug:(Q,X)=>i((Y)=>I.logDebug(Y),J,Q,X),info:(Q,X)=>i((Y)=>I.logInfo(Y),J,Q,X),warn:(Q,X)=>i((Y)=>I.logWarning(Y),J,Q,X),error:(Q,X)=>i((Y)=>I.logError(Y),J,Q,X),with:(Q)=>KQ({...J,...Q})});var a=x.OTEL_EXPORTER_OTLP_ENDPOINT,OQ=!!a,BX=crypto.randomUUID(),TQ=x.OTEL_EXPORTER_OTLP_HEADERS?x.OTEL_EXPORTER_OTLP_HEADERS.split(",").reduce((J,Q)=>{let[X,...Y]=Q.split("=");return J[X]=Y.join("="),J},{}):void 0;function BJ(){let J=FQ("main"),Q=(()=>{let X=process.env.OTEL_RESOURCE_ATTRIBUTES;if(!X)return{};try{return Object.fromEntries(X.split(",").map((Y)=>{let $=Y.indexOf("=");if($<1)throw Error("Invalid OTEL_RESOURCE_ATTRIBUTES entry");return[decodeURIComponent(Y.slice(0,$)),decodeURIComponent(Y.slice($+1))]}))}catch{return{}}})();return{serviceName:"qitqode",serviceVersion:CQ,attributes:{...Q,"deployment.environment.name":DQ,"qitqode.client":x.QITQODE_CLIENT,"qitqode.process_role":J.processRole,"qitqode.run_id":J.runID,"service.instance.id":BX}}}function wX(){return R.layer([n,p.make({url:`${a}/v1/logs`,resource:BJ(),headers:TQ})],{mergeWithExisting:!1}).pipe(z.provide(c.layerJson),z.provide(AQ.layer))}var HX=async()=>{let J=await import("./chunk-ydz7387e.js"),Q=await import("./chunk-2b80n6nx.js"),X=await import("./chunk-c99npyz9.js"),{AsyncLocalStorageContextManager:Y}=await import("./chunk-821zkh5v.js").then((m)=>zQ(m.default,1)),{context:$}=await import("./chunk-98sb49dz.js").then((m)=>zQ(m.default,1)),G=new Y;return G.enable(),$.setGlobalContextManager(G),J.layer(()=>({resource:BJ(),spanProcessor:new X.BatchSpanProcessor(new Q.OTLPTraceExporter({url:`${a}/v1/traces`,headers:TQ}))}))},EQ=!a?qJ:z.unwrap(I.gen(function*(){let J=yield*I.promise(HX);return z.mergeAll(J,wX())})),WX={enabled:OQ,layer:EQ};var aX=z.makeMemoMapUnsafe();
|
|
3
|
-
export{qJ as
|
|
2
|
+
import{$r as rJ,Kr as mJ,Lr as vJ,Mr as dJ,Nr as lJ,Qr as d,Rr as l,Tr as uJ,Ur as cJ,Xr as pJ,Yr as iJ,Zr as nJ,_r as aJ,bs as AQ}from"./chunk-6cztstry.js";import{Et as FQ,ft as CQ,gt as DQ}from"./chunk-mnjz8nqs.js";import{Pt as x,Yt as GJ}from"./chunk-5dvy83ms.js";import{AD as KJ,BH as SJ,FF as z,FH as xJ,GE as qQ,GG as EJ,JH as fJ,KG as MJ,LF as b,NE as _J,NF as CJ,NG as oJ,RG as RJ,SM as j,TG as VJ,UH as E,WG as hJ,XF as DJ,YF as FJ,ZF as AJ,ZH as yJ,_H as bJ,aF as BQ,bF as wQ,bP as g,cP as eJ,dD as GQ,dH as jJ,eF as $J,fF as UJ,fP as HQ,gC as wJ,gI as I,gP as WQ,hN as o,hP as R,jC as HJ,jG as t,jH as NJ,kF as zJ,kG as OJ,mC as WJ,mG as y,nJ as gJ,oC as $Q,rD as IJ,tB as tJ,uD as PJ,uH as kJ,vF as ZJ,wC as f,xD as T,yH as LJ,zG as TJ}from"./chunk-9kc2th5c.js";import{uP as zQ,wP as u,yP as S}from"./chunk-sh03ka27.js";var IX={};u(IX,{resource:()=>BJ,layer:()=>EQ,enabled:()=>OQ,Observability:()=>WX});var p={};u(p,{make:()=>IQ,layer:()=>ZX});var VQ=AJ.pipe(FJ,DJ((J)=>{if(lJ(J)&&J.reason._tag==="StatusCodeError"&&J.reason.response.status===429){let Q=HJ(J.reason.response.headers["retry-after"]).pipe(WJ(CJ),wJ(()=>5));return t(T(Q))}return t(T(1))})),sJ=E(function*(J){let Q=yield*jJ(),X=f(Q,b),Y=f(Q,UJ),$=fJ(Q),G=KJ(IJ(J.exportInterval),PJ),B=void 0,C=nJ(f(Q,pJ)).pipe(iJ(NJ(rJ,!1)),aJ({schedule:VQ,times:3})),V=vJ({"user-agent":`effect-opentelemetry-${J.label}/0.0.0`});if(J.headers)V=dJ(mJ(J.headers),V);let r=uJ(J.url,{headers:V}),O=[],s=OJ(()=>{if(B!==void 0&&X.currentTimeMillisUnsafe()<B)return y;else if(B!==void 0)B=void 0;let h=O;if(J.maxBatchSize!=="disabled"){if(O.length===0)return y;O=[]}return C.execute(cJ(r,J.body(h))).pipe(EJ,SJ(!1))}).pipe(MJ((h)=>{if(B!==void 0)return y;return B=X.currentTimeMillisUnsafe()+60000,O=[],yJ("Disabling exporter for 60 seconds",h)}),bJ({package:"@effect/opentelemetry",module:J.label}));return yield*zJ(Y,s.pipe(RJ,kJ,VJ(J.shutdownTimeout))),yield*hJ(G).pipe(TJ(s),LJ,xJ(Y)),{push(h){if(B!==void 0)return;if(O.push(h),J.maxBatchSize!=="disabled"&&O.length>=J.maxBatchSize)gJ($(s),Y)}}});var jQ=(J)=>{let Q=J.attributes?e(Object.entries(J.attributes)):[];if(Q.push({key:"service.name",value:{stringValue:J.serviceName}}),J.serviceVersion)Q.push({key:"service.version",value:{stringValue:J.serviceVersion}});return{attributes:Q,droppedAttributesCount:0}},JQ=E(function*(J){let Q={...yield*g(o(eJ(j,j)),"OTEL_RESOURCE_ATTRIBUTES"),...J?.attributes},X=J?.serviceName??Q["service.name"]??(yield*g(j,"OTEL_SERVICE_NAME"));delete Q["service.name"];let Y=J?.serviceVersion??Q["service.version"]??(yield*g(o(j),"OTEL_SERVICE_VERSION"));return delete Q["service.version"],jQ({serviceName:X,serviceVersion:Y,attributes:Q})},oJ),QQ=(J)=>{let Q=J.attributes.find((X)=>X.key==="service.name");if(!Q||!Q.value.stringValue)throw Error("Resource does not contain a service name");return Q.value.stringValue},e=(J)=>{let Q=[];for(let[X,Y]of J)Q.push({key:X,value:m(Y)});return Q},m=(J)=>{if(Array.isArray(J))return{arrayValue:{values:J.map(m)}};switch(typeof J){case"string":return{stringValue:J};case"bigint":return{intValue:Number(J)};case"number":return Number.isInteger(J)?{intValue:J}:{doubleValue:J};case"boolean":return{boolValue:J};default:return{stringValue:tJ(J)}}};var c={};u(c,{layerProtobuf:()=>YX,layerJson:()=>XX,OtlpSerialization:()=>M});var N={Varint:0,Fixed64:1,LengthDelimited:2,Fixed32:5},k=(J,Q)=>J<<3|Q,D=(J)=>{let Q=[],X=typeof J==="bigint"?J:BigInt(J);while(X>0x7fn)Q.push(Number(X&0x7fn)|128),X>>=7n;return Q.push(Number(X)),new Uint8Array(Q)};var kQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setBigUint64(0,J,!0),Q},LQ=(J)=>{let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,J,!0),Q},SQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setFloat64(0,J,!0),Q},xQ=(J)=>new TextEncoder().encode(J),fQ=(J)=>{let Q=new Uint8Array(J.length/2);for(let X=0;X<J.length;X+=2)Q[X/2]=parseInt(J.slice(X,X+2),16);return Q},Z=(...J)=>{let Q=J.reduce(($,G)=>$+G.length,0),X=new Uint8Array(Q),Y=0;for(let $ of J)X.set($,Y),Y+=$.length;return X},q=(J,Q)=>Z(D(k(J,N.Varint)),D(Q));var JJ=(J,Q)=>q(J,Q?1:0),W=(J,Q)=>Z(D(k(J,N.Fixed64)),kQ(Q)),v=(J,Q)=>Z(D(k(J,N.Fixed32)),LQ(Q)),F=(J,Q)=>Z(D(k(J,N.Fixed64)),SQ(Q)),L=(J,Q)=>Z(D(k(J,N.LengthDelimited)),D(Q.length),Q),K=(J,Q)=>L(J,xQ(Q)),U=(J,Q)=>L(J,fQ(Q)),w=(J,Q)=>L(J,Q),_=(J,Q,X)=>Z(...Q.map((Y)=>w(J,X(Y))));var H=(J,Q)=>Q!==void 0&&Q!==""?K(J,Q):new Uint8Array(0);var QJ=(J)=>{if(J.stringValue!==void 0&&J.stringValue!==null)return K(1,J.stringValue);if(J.boolValue!==void 0&&J.boolValue!==null)return JJ(2,J.boolValue);if(J.intValue!==void 0&&J.intValue!==null)return q(3,BigInt(J.intValue));if(J.doubleValue!==void 0&&J.doubleValue!==null)return F(4,J.doubleValue);if(J.arrayValue!==void 0)return w(5,bQ(J.arrayValue));if(J.kvlistValue!==void 0)return w(6,gQ(J.kvlistValue));if(J.bytesValue!==void 0)return L(7,J.bytesValue);return new Uint8Array(0)},bQ=(J)=>_(1,J.values,QJ),gQ=(J)=>_(1,J.values,P),P=(J)=>Z(K(1,J.key),w(2,QJ(J.value))),XJ=(J)=>Z(K(1,J.name),H(2,J.version),J.attributes?_(3,J.attributes,P):new Uint8Array(0),J.droppedAttributesCount?q(4,J.droppedAttributesCount):new Uint8Array(0)),YJ=(J)=>Z(_(1,J.attributes,P),J.droppedAttributesCount>0?q(2,J.droppedAttributesCount):new Uint8Array(0));var mQ=(J)=>Z(H(2,J.message),q(3,J.code)),vQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),K(2,J.name),_(3,J.attributes,P),J.droppedAttributesCount>0?q(4,J.droppedAttributesCount):new Uint8Array(0)),dQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),_(4,J.attributes,P),J.droppedAttributesCount>0?q(5,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(6,J.flags):new Uint8Array(0)),lQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),J.parentSpanId!==void 0?U(4,J.parentSpanId):new Uint8Array(0),K(5,J.name),q(6,J.kind),W(7,BigInt(J.startTimeUnixNano)),W(8,BigInt(J.endTimeUnixNano)),_(9,J.attributes,P),J.droppedAttributesCount>0?q(10,J.droppedAttributesCount):new Uint8Array(0),_(11,J.events,vQ),J.droppedEventsCount>0?q(12,J.droppedEventsCount):new Uint8Array(0),_(13,J.links,dQ),J.droppedLinksCount>0?q(14,J.droppedLinksCount):new Uint8Array(0),w(15,mQ(J.status)),J.flags!==void 0?v(16,J.flags):new Uint8Array(0)),uQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.spans,lQ),H(3,J.schemaUrl)),cQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeSpans,uQ),H(3,J.schemaUrl)),XQ=(J)=>_(1,J.resourceSpans,cQ);var YQ=(J)=>Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),J.asDouble!==void 0?F(4,J.asDouble):new Uint8Array(0),J.asInt!==void 0?W(6,BigInt(J.asInt)):new Uint8Array(0),_(7,J.attributes,P),J.flags!==void 0?q(8,J.flags):new Uint8Array(0)),pQ=(J)=>{let Q=Z(...J.bucketCounts.map((Y)=>W(6,BigInt(Y)))),X=Z(...J.explicitBounds.map((Y)=>F(7,Y)));return Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),W(4,BigInt(J.count)),J.sum!==void 0?F(5,J.sum):new Uint8Array(0),Q,X,_(9,J.attributes,P),J.flags!==void 0?q(10,J.flags):new Uint8Array(0),J.min!==void 0?F(11,J.min):new Uint8Array(0),J.max!==void 0?F(12,J.max):new Uint8Array(0))},iQ=(J)=>_(1,J.dataPoints,YQ),nQ=(J)=>Z(_(1,J.dataPoints,YQ),q(2,J.aggregationTemporality),JJ(3,J.isMonotonic)),aQ=(J)=>Z(_(1,J.dataPoints,pQ),q(2,J.aggregationTemporality)),rQ=(J)=>Z(K(1,J.name),H(2,J.description),H(3,J.unit),J.gauge!==void 0?w(5,iQ(J.gauge)):new Uint8Array(0),J.sum!==void 0?w(7,nQ(J.sum)):new Uint8Array(0),J.histogram!==void 0?w(9,aQ(J.histogram)):new Uint8Array(0)),sQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.metrics,rQ),H(3,J.schemaUrl)),tQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeMetrics,sQ),H(3,J.schemaUrl)),ZQ=(J)=>_(1,J.resourceMetrics,tQ);var oQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),J.severityNumber!==void 0?q(2,J.severityNumber):new Uint8Array(0),H(3,J.severityText),J.body!==void 0?w(5,QJ(J.body)):new Uint8Array(0),_(6,J.attributes,P),J.droppedAttributesCount!==void 0&&J.droppedAttributesCount>0?q(7,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(8,J.flags):new Uint8Array(0),J.traceId!==void 0&&J.traceId!==""?U(9,J.traceId):new Uint8Array(0),J.spanId!==void 0&&J.spanId!==""?U(10,J.spanId):new Uint8Array(0),J.observedTimeUnixNano!==void 0?W(11,BigInt(J.observedTimeUnixNano)):new Uint8Array(0)),eQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.logRecords,oQ),H(3,J.schemaUrl)),JX=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeLogs,eQ),H(3,J.schemaUrl)),_Q=(J)=>_(1,J.resourceLogs,JX);class M extends $Q()("effect/observability/OtlpSerialization"){}var XX=ZJ(M,{traces:(J)=>l(J),metrics:(J)=>l(J),logs:(J)=>l(J)}),YX=ZJ(M,{traces:(J)=>d(XQ(J),"application/x-protobuf"),metrics:(J)=>d(ZQ(J),"application/x-protobuf"),logs:(J)=>d(_Q(J),"application/x-protobuf")});var IQ=E(function*(J){let Q=yield*M,X=yield*JQ(J.resource),Y={name:QQ(X)},$=yield*sJ({label:"OtlpLogger",url:J.url,headers:J.headers,maxBatchSize:J.maxBatchSize??1000,exportInterval:J.exportInterval??T(1),body:(B)=>Q.logs({resourceLogs:[{resource:X,scopeLogs:[{scope:Y,logRecords:B}]}]}),shutdownTimeout:J.shutdownTimeout??T(3)}),G={excludeLogSpans:J.excludeLogSpans??!1,clock:yield*b};return HQ((B)=>{$.push(_X(B,G))})}),ZX=(J)=>WQ([IQ(J)],{mergeWithExisting:J.mergeWithExisting??!0}),_X=(J,Q)=>{let Y=Q.clock.currentTimeNanosUnsafe().toString(),$=J.date.getTime(),G=e(Object.entries(J.fiber.getRef(BQ)));if(G.push({key:"fiberId",value:{intValue:J.fiber.id}}),!Q.excludeLogSpans)for(let[V,r]of J.fiber.getRef(wQ))G.push({key:`logSpan.${V}`,value:{stringValue:`${$-r}ms`}});if(J.cause.reasons.length>0)G.push({key:"log.error",value:{stringValue:qQ(J.cause)}});let B=GQ(J.message),C={severityNumber:$X(J.logLevel),severityText:J.logLevel,timeUnixNano:Y,observedTimeUnixNano:Y,attributes:G,body:m(B.length===1?B[0]:B),droppedAttributesCount:0};if(J.fiber.currentSpan)C.traceId=J.fiber.currentSpan.traceId,C.spanId=J.fiber.currentSpan.spanId;return C},$X=(J)=>{switch(J){case"Trace":return A.SEVERITY_NUMBER_TRACE;case"Debug":return A.SEVERITY_NUMBER_DEBUG;case"Info":return A.SEVERITY_NUMBER_INFO;case"Warn":return A.SEVERITY_NUMBER_WARN;case"Error":return A.SEVERITY_NUMBER_ERROR;case"Fatal":return A.SEVERITY_NUMBER_FATAL;default:return A.SEVERITY_NUMBER_UNSPECIFIED}},A={SEVERITY_NUMBER_UNSPECIFIED:0,SEVERITY_NUMBER_TRACE:1,SEVERITY_NUMBER_TRACE2:2,SEVERITY_NUMBER_TRACE3:3,SEVERITY_NUMBER_TRACE4:4,SEVERITY_NUMBER_DEBUG:5,SEVERITY_NUMBER_DEBUG2:6,SEVERITY_NUMBER_DEBUG3:7,SEVERITY_NUMBER_DEBUG4:8,SEVERITY_NUMBER_INFO:9,SEVERITY_NUMBER_INFO2:10,SEVERITY_NUMBER_INFO3:11,SEVERITY_NUMBER_INFO4:12,SEVERITY_NUMBER_WARN:13,SEVERITY_NUMBER_WARN2:14,SEVERITY_NUMBER_WARN3:15,SEVERITY_NUMBER_WARN4:16,SEVERITY_NUMBER_ERROR:17,SEVERITY_NUMBER_ERROR2:18,SEVERITY_NUMBER_ERROR3:19,SEVERITY_NUMBER_ERROR4:20,SEVERITY_NUMBER_FATAL:21,SEVERITY_NUMBER_FATAL2:22,SEVERITY_NUMBER_FATAL3:23,SEVERITY_NUMBER_FATAL4:24};var UQ={};u(UQ,{logger:()=>n,layer:()=>qJ,create:()=>KQ});var GX=(J)=>J==="sessionID"?"session.id":J,PQ=(J)=>Object.fromEntries(Object.entries(J??{}).filter((Q)=>Q[1]!==void 0&&Q[1]!==null).map(([Q,X])=>[GX(Q),X])),qX=(J)=>{if(Array.isArray(J))return J.map((Q)=>String(Q)).join(" ");return J===void 0?"":String(J)},i=(J,Q,X,Y)=>{let $=PQ({...Q,...Y}),G=J(X);return Object.keys($).length?I.annotateLogs(G,$):G},n=R.make((J)=>{let Q=PQ(J.fiber.getRef($J.CurrentLogAnnotations)),X=J.date.getTime();for(let[B,C]of J.fiber.getRef($J.CurrentLogSpans))Q[`logSpan.${B}`]=`${X-C}ms`;if(J.cause.reasons.length>0)Q.cause=_J.pretty(J.cause);let Y=typeof Q.service==="string"?Q.service:void 0;if(Y)delete Q.service;let $=Y?GJ.create({service:Y}):GJ.Default,G=qX(J.message);switch(J.logLevel){case"Trace":case"Debug":return $.debug(G,Q);case"Warn":return $.warn(G,Q);case"Error":case"Fatal":return $.error(G,Q);default:return $.info(G,Q)}}),qJ=R.layer([n],{mergeWithExisting:!1}),KQ=(J={})=>({debug:(Q,X)=>i((Y)=>I.logDebug(Y),J,Q,X),info:(Q,X)=>i((Y)=>I.logInfo(Y),J,Q,X),warn:(Q,X)=>i((Y)=>I.logWarning(Y),J,Q,X),error:(Q,X)=>i((Y)=>I.logError(Y),J,Q,X),with:(Q)=>KQ({...J,...Q})});var a=x.OTEL_EXPORTER_OTLP_ENDPOINT,OQ=!!a,BX=crypto.randomUUID(),TQ=x.OTEL_EXPORTER_OTLP_HEADERS?x.OTEL_EXPORTER_OTLP_HEADERS.split(",").reduce((J,Q)=>{let[X,...Y]=Q.split("=");return J[X]=Y.join("="),J},{}):void 0;function BJ(){let J=FQ("main"),Q=(()=>{let X=process.env.OTEL_RESOURCE_ATTRIBUTES;if(!X)return{};try{return Object.fromEntries(X.split(",").map((Y)=>{let $=Y.indexOf("=");if($<1)throw Error("Invalid OTEL_RESOURCE_ATTRIBUTES entry");return[decodeURIComponent(Y.slice(0,$)),decodeURIComponent(Y.slice($+1))]}))}catch{return{}}})();return{serviceName:"qitqode",serviceVersion:CQ,attributes:{...Q,"deployment.environment.name":DQ,"qitqode.client":x.QITQODE_CLIENT,"qitqode.process_role":J.processRole,"qitqode.run_id":J.runID,"service.instance.id":BX}}}function wX(){return R.layer([n,p.make({url:`${a}/v1/logs`,resource:BJ(),headers:TQ})],{mergeWithExisting:!1}).pipe(z.provide(c.layerJson),z.provide(AQ.layer))}var HX=async()=>{let J=await import("./chunk-sy76e7nr.js"),Q=await import("./chunk-bzh71a92.js"),X=await import("./chunk-96sra8g8.js"),{AsyncLocalStorageContextManager:Y}=await import("./chunk-zx63mepv.js").then((m)=>zQ(m.default,1)),{context:$}=await import("./chunk-kzkb4648.js").then((m)=>zQ(m.default,1)),G=new Y;return G.enable(),$.setGlobalContextManager(G),J.layer(()=>({resource:BJ(),spanProcessor:new X.BatchSpanProcessor(new Q.OTLPTraceExporter({url:`${a}/v1/traces`,headers:TQ}))}))},EQ=!a?qJ:z.unwrap(I.gen(function*(){let J=yield*I.promise(HX);return z.mergeAll(J,wX())})),WX={enabled:OQ,layer:EQ};var aX=z.makeMemoMapUnsafe();
|
|
3
|
+
export{qJ as Er,UQ as Fr,EQ as Gr,WX as Hr,IX as Ir,aX as Jr};
|