@caspian2026/agent-sdk 0.0.19 → 0.0.20
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/dist/{chunk-ggg97179.js → chunk-09nzqj0f.js} +2927 -764
- package/dist/{chunk-c073acgz.js → chunk-0a8jb5c8.js} +9 -9
- package/dist/{chunk-b9t57m67.js → chunk-0b85d7q0.js} +7 -7
- package/dist/{chunk-py5ytxp4.js → chunk-0dwdg9bz.js} +9 -9
- package/dist/{chunk-yvvgfb9f.js → chunk-0f84wjjc.js} +79 -79
- package/dist/chunk-0fw1mz8s.js +27 -0
- package/dist/{chunk-kwekc97v.js → chunk-0pbwcm8b.js} +1 -1
- package/dist/chunk-0pqv68xt.js +133 -0
- package/dist/chunk-0pv13fxq.js +1684 -0
- package/dist/chunk-0tgn1431.js +38 -0
- package/dist/{chunk-bg4x9ex0.js → chunk-0tja7d1y.js} +6 -6
- package/dist/{chunk-t5jqejqk.js → chunk-0w2ntzwz.js} +92 -92
- package/dist/chunk-0yshjsxt.js +122 -0
- package/dist/chunk-0z9s957c.js +94 -0
- package/dist/{chunk-fyc5fepv.js → chunk-0zscb6c7.js} +1 -1
- package/dist/{chunk-x8d2ehd7.js → chunk-13pmg16e.js} +1 -1
- package/dist/{chunk-v4t6dyyh.js → chunk-15f7ee0j.js} +245 -158
- package/dist/{chunk-7yp1ra14.js → chunk-1ehn6qdp.js} +13 -13
- package/dist/chunk-1gt45dyg.js +101 -0
- package/dist/{chunk-bdb81673.js → chunk-1s9jxpjm.js} +7 -7
- package/dist/{chunk-3c25bcsw.js → chunk-1t3cyn1k.js} +1 -1
- package/dist/{chunk-v8twrmnw.js → chunk-1ycd7t0f.js} +88 -88
- package/dist/{chunk-t300xs2e.js → chunk-1ytng03p.js} +12 -12
- package/dist/{chunk-jqn60wdn.js → chunk-25jhz0br.js} +16 -16
- package/dist/{chunk-j03zh8dy.js → chunk-26kp0k1t.js} +79 -79
- package/dist/{chunk-6mqmk16a.js → chunk-2b00k9ep.js} +78 -78
- package/dist/{chunk-ywhmg8xp.js → chunk-2bh7f2wa.js} +13 -13
- package/dist/{chunk-eady4fzn.js → chunk-2bk4jvse.js} +7 -7
- package/dist/{chunk-0vkfrmqm.js → chunk-2mfzqkzn.js} +69 -29
- package/dist/{chunk-szj5wvdy.js → chunk-2qpy8kne.js} +1 -1
- package/dist/{chunk-pwwa7s62.js → chunk-2vc3fyp9.js} +2 -2
- package/dist/{chunk-c2nnhgr2.js → chunk-37j24srh.js} +6 -6
- package/dist/{chunk-5gjwp5bc.js → chunk-39r7sh1h.js} +90 -90
- package/dist/{chunk-t4khqff1.js → chunk-3hcfwedh.js} +5 -5
- package/dist/{chunk-w6m6trzq.js → chunk-3hxr3x9d.js} +2 -2
- package/dist/{chunk-4xwfsejb.js → chunk-3jbxhytz.js} +8 -8
- package/dist/{chunk-qwa7xy95.js → chunk-3k8ecscj.js} +78 -78
- package/dist/chunk-3kx7brrn.js +55 -0
- package/dist/{chunk-gg55fns0.js → chunk-3w4xq6cv.js} +92 -92
- package/dist/{chunk-pywnxth6.js → chunk-3xamk0n1.js} +25 -25
- package/dist/{chunk-89vrm4ae.js → chunk-41wn5eqw.js} +10 -10
- package/dist/{chunk-cxrktb5g.js → chunk-44bqv91d.js} +3 -3
- package/dist/{chunk-cgfdkzhb.js → chunk-4bcx2a3p.js} +1 -1
- package/dist/{chunk-mswx2nma.js → chunk-4e1j46k0.js} +3 -3
- package/dist/{chunk-rshp5b43.js → chunk-4fwzreqj.js} +6 -6
- package/dist/{chunk-txn11vtv.js → chunk-4kfhh3aw.js} +4 -4
- package/dist/chunk-4kfs8ymb.js +92 -0
- package/dist/{chunk-t29a6zb5.js → chunk-4nqm22j3.js} +6 -4
- package/dist/{chunk-hz31bs21.js → chunk-4v1mr2x2.js} +41 -41
- package/dist/{chunk-a2hq2yt9.js → chunk-4yq5zz3m.js} +9 -9
- package/dist/{chunk-0r04e4ap.js → chunk-52pp0dbk.js} +4 -4
- package/dist/{chunk-3nk79af8.js → chunk-568q88qz.js} +1 -1
- package/dist/{chunk-ase86y73.js → chunk-5f57qtf9.js} +1 -1
- package/dist/{chunk-07069jq1.js → chunk-5gr6ekgm.js} +4 -4
- package/dist/{chunk-ppwjyveh.js → chunk-5nqrdqz5.js} +1 -1
- package/dist/chunk-5rhmrt2j.js +121 -0
- package/dist/{chunk-1e1rjstz.js → chunk-5sd5fz78.js} +78 -78
- package/dist/{chunk-5n1jc02d.js → chunk-5v6wr1z4.js} +2 -2
- package/dist/{chunk-69n11zng.js → chunk-5vavvf6y.js} +5 -5
- package/dist/{chunk-kwp6116t.js → chunk-60a647ty.js} +81 -81
- package/dist/{chunk-zxh62ved.js → chunk-61x3akfa.js} +2 -2
- package/dist/chunk-626watky.js +50 -0
- package/dist/{chunk-6s68m1dg.js → chunk-62jrhytw.js} +10 -10
- package/dist/{chunk-fkr3tfcs.js → chunk-638qz5y7.js} +5 -5
- package/dist/{chunk-tz9r44d9.js → chunk-657k4mef.js} +78 -78
- package/dist/chunk-6aqa0ec5.js +145 -0
- package/dist/{chunk-7d24zw5w.js → chunk-6c22q39e.js} +78 -78
- package/dist/{chunk-b0kf00ff.js → chunk-6d05fvxz.js} +2 -2
- package/dist/{chunk-q9t2n7d1.js → chunk-6fe0an4e.js} +79 -79
- package/dist/{chunk-vc12yftf.js → chunk-6fx36a3s.js} +5 -5
- package/dist/{chunk-qzf23s30.js → chunk-6hs3wed5.js} +7 -7
- package/dist/{chunk-1hg8ktay.js → chunk-6qb753r5.js} +79 -79
- package/dist/{chunk-0xjaqda8.js → chunk-6rcf54zd.js} +48 -27
- package/dist/{chunk-bamjc1k5.js → chunk-6twsw69m.js} +7 -7
- package/dist/{chunk-arhmkw0v.js → chunk-6vp8zen2.js} +79 -79
- package/dist/chunk-6zfb4n08.js +91 -0
- package/dist/chunk-73bgy356.js +90 -0
- package/dist/{chunk-f9wnty9x.js → chunk-7ba45tqg.js} +5 -5
- package/dist/{chunk-f98yad99.js → chunk-7dc9d8fy.js} +7 -7
- package/dist/{chunk-ngc2r6jc.js → chunk-7deqmrby.js} +5 -5
- package/dist/{chunk-9x5zgy22.js → chunk-7e9xcw77.js} +1 -1
- package/dist/{chunk-w2qjc4dy.js → chunk-7gbe6ftc.js} +9 -9
- package/dist/{chunk-xhfmdq1y.js → chunk-7gte8zc4.js} +1 -1
- package/dist/{chunk-6nsd9606.js → chunk-7kp42hzq.js} +2 -2
- package/dist/{chunk-hakdhagh.js → chunk-7njkaxjp.js} +39 -120
- package/dist/chunk-7nphjzve.js +105 -0
- package/dist/chunk-7sp9dk6d.js +20 -0
- package/dist/{chunk-wgk9sxk7.js → chunk-7tdk9ypw.js} +10 -10
- package/dist/{chunk-6dj5t602.js → chunk-7wegz81g.js} +1 -1
- package/dist/{chunk-7wm5s02e.js → chunk-7yexhdjs.js} +1 -1
- package/dist/{chunk-eert2day.js → chunk-88k0rgdp.js} +11 -11
- package/dist/{chunk-fcynwjpm.js → chunk-8a1jee0e.js} +2 -2
- package/dist/{chunk-3vy1jt9p.js → chunk-8ady2sm4.js} +8 -8
- package/dist/chunk-8jmkpx1h.js +123 -0
- package/dist/{chunk-mccjtnrw.js → chunk-8m1gfrme.js} +14 -14
- package/dist/{chunk-7sgtxrsc.js → chunk-8q5fzyem.js} +10 -8
- package/dist/{chunk-zzm33q8x.js → chunk-8r1napm7.js} +1 -1
- package/dist/{chunk-cdz5yb0r.js → chunk-9029sbq1.js} +1 -1
- package/dist/{chunk-y1784krc.js → chunk-92wwx9vf.js} +2 -2
- package/dist/{chunk-0zprysa2.js → chunk-93hxjnkb.js} +78 -78
- package/dist/{chunk-qh5p43j4.js → chunk-93kvs6fh.js} +6 -6
- package/dist/{chunk-gw9291xk.js → chunk-9b71sn2g.js} +41 -41
- package/dist/{chunk-zt86q6j5.js → chunk-9drwsb3g.js} +80 -80
- package/dist/{chunk-0075f5sb.js → chunk-9p62r6he.js} +6 -6
- package/dist/{chunk-5c980jax.js → chunk-9re786wa.js} +40 -40
- package/dist/{chunk-s7x8ajv3.js → chunk-9rhy5vt7.js} +9 -9
- package/dist/chunk-9xq7ef8y.js +100 -0
- package/dist/chunk-9ydxqdhe.js +121 -0
- package/dist/{chunk-rmbbmd3s.js → chunk-a00gfn8e.js} +2 -2
- package/dist/{chunk-2vj1ta7d.js → chunk-a1mewckj.js} +78 -78
- package/dist/{chunk-k8vp0atq.js → chunk-a3qtafgw.js} +79 -79
- package/dist/chunk-ab6apbd2.js +140 -0
- package/dist/{chunk-d4mdda98.js → chunk-apjnwens.js} +8 -8
- package/dist/{chunk-ddsjkqs4.js → chunk-b1hygym1.js} +8 -8
- package/dist/{chunk-qatfdxvd.js → chunk-b610qrvk.js} +3 -3
- package/dist/{chunk-qpaeatmf.js → chunk-bbhg7m1a.js} +79 -79
- package/dist/{chunk-83hfzbx3.js → chunk-bdhdmkya.js} +1 -1
- package/dist/chunk-bdrsheny.js +35 -0
- package/dist/{chunk-vyjeh50y.js → chunk-bktmgb4n.js} +68 -39
- package/dist/{chunk-feyzykye.js → chunk-bq0wp28e.js} +1 -1
- package/dist/{chunk-0vp3wfab.js → chunk-bs9rn85s.js} +1 -1
- package/dist/{chunk-ft4dxnwq.js → chunk-bstyysxw.js} +3 -3
- package/dist/{chunk-yyex5gsf.js → chunk-bta8w8ge.js} +10 -10
- package/dist/chunk-bvfqg3cg.js +131 -0
- package/dist/{chunk-p1sn36ax.js → chunk-bw8y1msy.js} +5 -5
- package/dist/{chunk-7n6tk7rw.js → chunk-c2k1n6yb.js} +13 -13
- package/dist/{chunk-rtbar3a1.js → chunk-c6gpdd2c.js} +78 -78
- package/dist/{chunk-f84vvk41.js → chunk-cajjdb7j.js} +4 -4
- package/dist/{chunk-8svj497n.js → chunk-ccdh8eh2.js} +38 -38
- package/dist/{chunk-mys37bb4.js → chunk-cfpnb7x4.js} +78 -78
- package/dist/{chunk-21jaw3mt.js → chunk-cgzq4zww.js} +4 -4
- package/dist/chunk-cj0j4n23.js +71 -0
- package/dist/{chunk-0731m51q.js → chunk-ckrs789w.js} +1 -1
- package/dist/{chunk-rnxctq9p.js → chunk-cqb31tfg.js} +6 -6
- package/dist/{chunk-v6qvcajp.js → chunk-cx21etb2.js} +2 -2
- package/dist/chunk-cynnhyy3.js +103 -0
- package/dist/chunk-d0zx5hba.js +85 -0
- package/dist/{chunk-rn7w9k0a.js → chunk-d2cypdsx.js} +23 -23
- package/dist/{chunk-1h2famwb.js → chunk-d99k9r9g.js} +1 -1
- package/dist/{chunk-qatqd4rk.js → chunk-dg2k597k.js} +9 -9
- package/dist/{chunk-ewadzrm8.js → chunk-dh01e4bp.js} +2 -2
- package/dist/{chunk-d564dtpq.js → chunk-dmp3nd67.js} +90 -90
- package/dist/{chunk-1j0n05rf.js → chunk-dv38yqdn.js} +3 -3
- package/dist/{chunk-fqak69ft.js → chunk-dy8278wt.js} +7 -7
- package/dist/{chunk-36akc07b.js → chunk-dzcb2ekz.js} +4 -4
- package/dist/{chunk-z2npjf0h.js → chunk-e01rphq3.js} +108 -109
- package/dist/{chunk-dfszv6kn.js → chunk-e22at2jn.js} +4 -4
- package/dist/chunk-e6s584g7.js +77 -0
- package/dist/{chunk-v4162e76.js → chunk-e7j6g62d.js} +9 -9
- package/dist/chunk-e90dyenj.js +127 -0
- package/dist/{chunk-z0pmdn8s.js → chunk-eb4t4ehh.js} +6 -6
- package/dist/{chunk-5h1wfdk2.js → chunk-ej882sb5.js} +26 -26
- package/dist/{chunk-fvm8gehr.js → chunk-ekewg3tj.js} +4 -4
- package/dist/chunk-em5s71j6.js +89 -0
- package/dist/chunk-eqcgr89w.js +646 -0
- package/dist/{chunk-4ce75svs.js → chunk-et3jfht8.js} +13 -13
- package/dist/{chunk-qp2qdcda.js → chunk-eta5aekm.js} +9 -30
- package/dist/{chunk-f3ychkjd.js → chunk-ewsvbzhz.js} +3 -3
- package/dist/{chunk-7wg82yq4.js → chunk-eynfddhq.js} +143 -144
- package/dist/{chunk-66zry909.js → chunk-f517h74h.js} +1 -1
- package/dist/{chunk-4pbx3g7s.js → chunk-f79jyxwd.js} +4 -4
- package/dist/{chunk-hwfknpxv.js → chunk-f9ybfyyp.js} +2 -2
- package/dist/chunk-f9zvs66e.js +105 -0
- package/dist/{chunk-7aw745vx.js → chunk-fdwtd6s9.js} +3 -3
- package/dist/{chunk-gmdt7w5d.js → chunk-fefs2xby.js} +25 -25
- package/dist/{chunk-jzthz1bx.js → chunk-fpq87r80.js} +1 -1
- package/dist/{chunk-s8gy4ky9.js → chunk-fqr6n9z6.js} +3 -3
- package/dist/{chunk-s8kj6ajy.js → chunk-fr5s5ceq.js} +2 -2
- package/dist/chunk-gaf31961.js +81 -0
- package/dist/{chunk-64c1avct.js → chunk-gbvmks09.js} +1 -1
- package/dist/{chunk-y4ca9kqz.js → chunk-ggk84sc5.js} +4 -4
- package/dist/chunk-gkz2djp0.js +121 -0
- package/dist/{chunk-rjsfkzty.js → chunk-gm8ht8g9.js} +6 -6
- package/dist/{chunk-wn3zb71r.js → chunk-gt43z5zd.js} +81 -81
- package/dist/chunk-gwktnbeg.js +90 -0
- package/dist/{chunk-xv3era3s.js → chunk-gxsrvxjn.js} +1 -1
- package/dist/chunk-h0bgwz9v.js +55 -0
- package/dist/{chunk-gy4se0z5.js → chunk-h1tv19q0.js} +80 -80
- package/dist/chunk-h3v46eky.js +105 -0
- package/dist/{chunk-e8s2e141.js → chunk-h4tnp6dw.js} +7 -7
- package/dist/{chunk-5bs3xf11.js → chunk-h8n0a991.js} +79 -79
- package/dist/{chunk-nc0ve25x.js → chunk-hbz8xggv.js} +11 -11
- package/dist/{chunk-v78fj8by.js → chunk-he9zw1gh.js} +2 -2
- package/dist/{chunk-1cpeddhv.js → chunk-hgb8024k.js} +8 -8
- package/dist/{chunk-m2yqqry6.js → chunk-hhvf84fa.js} +183 -185
- package/dist/chunk-hycm92ss.js +52 -0
- package/dist/{chunk-670trxyg.js → chunk-j0bfbce5.js} +36 -36
- package/dist/{chunk-srkc8pwp.js → chunk-j15xyew5.js} +4 -4
- package/dist/chunk-j3c5r08n.js +87 -0
- package/dist/chunk-j3q2sbhc.js +107 -0
- package/dist/{chunk-dhfag5m0.js → chunk-j77g2v22.js} +5 -5
- package/dist/{chunk-ps49ymvj.js → chunk-ja1nqz5q.js} +2 -2
- package/dist/{chunk-3t7kecay.js → chunk-ja23mty8.js} +83 -83
- package/dist/{chunk-e83tfqyt.js → chunk-jrqjxhxj.js} +2 -2
- package/dist/{chunk-x47h283a.js → chunk-jsvsnqkn.js} +2 -2
- package/dist/{chunk-rs4yayw6.js → chunk-jw9zwgea.js} +4 -4
- package/dist/{chunk-xq0q4bky.js → chunk-jwqveqpr.js} +9 -9
- package/dist/{chunk-844zmnw6.js → chunk-k0dprbnn.js} +78 -78
- package/dist/{chunk-e0abab5b.js → chunk-k3gvjjm9.js} +5 -5
- package/dist/{chunk-2fwze72g.js → chunk-k6cq3j7z.js} +1 -1
- package/dist/{chunk-x7fdwq3d.js → chunk-k6wmp81y.js} +1 -1
- package/dist/{chunk-xtanrzac.js → chunk-k8by1vfd.js} +19 -19
- package/dist/chunk-k9h7kjf6.js +8 -0
- package/dist/chunk-karea2z2.js +89 -0
- package/dist/{chunk-wa8yn2p0.js → chunk-kcp41jcn.js} +2 -2
- package/dist/{chunk-a5cj5yk1.js → chunk-khwhppzs.js} +2 -2
- package/dist/{chunk-68ffk5qa.js → chunk-kjx9a9p4.js} +2 -2
- package/dist/chunk-kra9y8qb.js +97 -0
- package/dist/{chunk-j5bth84e.js → chunk-kt25n52f.js} +4 -4
- package/dist/{chunk-eqj42wkk.js → chunk-m12e2wq3.js} +80 -80
- package/dist/{chunk-h9n54swm.js → chunk-m13ptmf2.js} +2 -2
- package/dist/{chunk-4jm600zv.js → chunk-m6vs965c.js} +1 -1
- package/dist/{chunk-03jc62cq.js → chunk-m82ketm1.js} +78 -78
- package/dist/{chunk-y9bhjjdz.js → chunk-m8qvkabg.js} +4 -4
- package/dist/{chunk-d9e7ndag.js → chunk-ma6x4ws8.js} +46 -46
- package/dist/{chunk-rtbrh4ac.js → chunk-mbfzfg56.js} +85 -85
- package/dist/{chunk-8457y05z.js → chunk-mtstpt1e.js} +43 -43
- package/dist/chunk-mwzwm2z2.js +60 -0
- package/dist/{chunk-vkhrrvfq.js → chunk-myac8yfs.js} +5 -5
- package/dist/{chunk-110c7hek.js → chunk-n3vmrzcy.js} +5 -5
- package/dist/chunk-n535j168.js +131 -0
- package/dist/{chunk-v9smspw2.js → chunk-n9ne98cj.js} +5 -4
- package/dist/{chunk-c0vhnnct.js → chunk-n9xhrzxs.js} +78 -78
- package/dist/{chunk-sqckd5nx.js → chunk-ngde5k9k.js} +79 -79
- package/dist/{chunk-ksq6zjys.js → chunk-nsxw4b3j.js} +8 -8
- package/dist/{chunk-d4q90j1w.js → chunk-nwdpjkrw.js} +78 -78
- package/dist/{chunk-sd36yzx8.js → chunk-nztayqyx.js} +1 -1
- package/dist/{chunk-byfawrfx.js → chunk-p0n9ew4x.js} +4 -4
- package/dist/{chunk-ehtwnxpg.js → chunk-p4e5ymdw.js} +1 -1
- package/dist/{chunk-cnsj3vq2.js → chunk-p8hn07q2.js} +1 -1
- package/dist/chunk-p9nkqgej.js +19 -0
- package/dist/{chunk-pe3rkfp2.js → chunk-pg4fbhbm.js} +11 -11
- package/dist/{chunk-e9w9zc0g.js → chunk-pg8asjpk.js} +20 -20
- package/dist/chunk-pgptefy1.js +114 -0
- package/dist/chunk-pjn0s3j1.js +111 -0
- package/dist/chunk-pkwv0q5q.js +91 -0
- package/dist/{chunk-netzwgv1.js → chunk-pnc7q9rt.js} +1 -1
- package/dist/{chunk-xeb6075z.js → chunk-pnrdvxhy.js} +2 -2
- package/dist/{chunk-9ed7v1qq.js → chunk-pp5zbnpr.js} +80 -80
- package/dist/{chunk-dmahh26f.js → chunk-pqf2bjy1.js} +4 -4
- package/dist/{chunk-hgdxffqr.js → chunk-pqxyft7d.js} +8 -8
- package/dist/{chunk-v8kjswxt.js → chunk-pt1jzmkv.js} +2 -2
- package/dist/{chunk-a1s9n17m.js → chunk-pt6vj628.js} +9 -9
- package/dist/{chunk-c7jwbe76.js → chunk-pyn4ry36.js} +103 -57
- package/dist/{chunk-2ewarpza.js → chunk-q53kkzhr.js} +80 -80
- package/dist/chunk-q6m9qgaa.js +88 -0
- package/dist/{chunk-p8na2wwp.js → chunk-q74fcthe.js} +2 -2
- package/dist/{chunk-v311af96.js → chunk-q8t0ym9s.js} +83 -83
- package/dist/{chunk-mcws22k3.js → chunk-q9y73cmh.js} +1 -1
- package/dist/{chunk-fajg8x36.js → chunk-qbbf7rr5.js} +1818 -727
- package/dist/{chunk-qb6k2afy.js → chunk-qka6pqrq.js} +11 -11
- package/dist/{chunk-0paqc2yw.js → chunk-qqc3b97c.js} +1 -1
- package/dist/{chunk-t9p85zff.js → chunk-qrdbqeve.js} +2 -2
- package/dist/{chunk-p81gg65v.js → chunk-qrgxbrs9.js} +930 -1057
- package/dist/{chunk-ky1z78ve.js → chunk-qs4stpt5.js} +14 -14
- package/dist/{chunk-b1kcd3ss.js → chunk-r055z03k.js} +1 -1
- package/dist/{chunk-ns7x6xam.js → chunk-r1q9s5hs.js} +13 -10
- package/dist/{chunk-drqk484j.js → chunk-r27tskss.js} +11 -9
- package/dist/{chunk-etdt1xz3.js → chunk-r4pq77kb.js} +3 -3
- package/dist/{chunk-5z28bqne.js → chunk-r585pc0g.js} +4 -3
- package/dist/chunk-r82c7gfc.js +58 -0
- package/dist/{chunk-0rs4m3ya.js → chunk-ra9hbfyz.js} +3 -3
- package/dist/{chunk-xk89d6vy.js → chunk-rfj6gjwh.js} +14 -14
- package/dist/{chunk-qkczt8cr.js → chunk-rgaedd84.js} +5 -5
- package/dist/chunk-rgshryeb.js +93 -0
- package/dist/chunk-rk2kb2ec.js +101 -0
- package/dist/{chunk-x6r4v44b.js → chunk-rpta0rqz.js} +1 -1
- package/dist/{chunk-2gzv8nrw.js → chunk-rrtpbztr.js} +4 -3
- package/dist/{chunk-dfzkwynj.js → chunk-rx9ypbjy.js} +8 -8
- package/dist/{chunk-hpd100ja.js → chunk-rzk001ay.js} +85 -85
- package/dist/{chunk-c33r7wby.js → chunk-rzn9w8p2.js} +3 -3
- package/dist/chunk-s0p653k2.js +93 -0
- package/dist/{chunk-2e8ybf05.js → chunk-s13y3w7e.js} +36 -36
- package/dist/{chunk-vj9segre.js → chunk-s201s689.js} +18 -18
- package/dist/{chunk-a5ry85ct.js → chunk-s5arr49c.js} +11 -200
- package/dist/{chunk-3jh2z27c.js → chunk-s7tq4e5g.js} +78 -78
- package/dist/{chunk-brqy29g9.js → chunk-s9906sac.js} +83 -83
- package/dist/{chunk-302xme7e.js → chunk-s9jxtj04.js} +92 -92
- package/dist/{chunk-pgtnj1mt.js → chunk-sbe9zd56.js} +6 -6
- package/dist/chunk-skypjdyc.js +147 -0
- package/dist/{chunk-fbv4apne.js → chunk-snd4pbkp.js} +1 -1
- package/dist/{chunk-nc7kjfxk.js → chunk-sthmb4xf.js} +78 -78
- package/dist/{chunk-1gx78081.js → chunk-t3yc7m07.js} +1 -1
- package/dist/{chunk-0r5bb9j4.js → chunk-t83amzhd.js} +12 -12
- package/dist/{chunk-5h5kx2jd.js → chunk-t8chhacb.js} +2 -2
- package/dist/{chunk-k0p9w03v.js → chunk-taqr0qw1.js} +3 -3
- package/dist/{chunk-nzdz8raj.js → chunk-tdf3ha9b.js} +79 -79
- package/dist/{chunk-8g5pe1gr.js → chunk-tevzn1xp.js} +1 -1
- package/dist/chunk-tgayhxvz.js +41 -0
- package/dist/{chunk-j64ga6ta.js → chunk-tkbwrjte.js} +325 -284
- package/dist/{chunk-4wx02mba.js → chunk-tmye4d2k.js} +15 -15
- package/dist/{chunk-55raexh7.js → chunk-tnpk0ne1.js} +2458 -1002
- package/dist/{chunk-sa1pvh58.js → chunk-tnv92c5m.js} +80 -80
- package/dist/{chunk-jd32zbps.js → chunk-trm02xde.js} +2 -2
- package/dist/{chunk-y6x9kgba.js → chunk-tyc5c0q4.js} +8 -8
- package/dist/{chunk-4k9d7gxv.js → chunk-v2szqm5g.js} +5 -5
- package/dist/{chunk-bbc9f5q9.js → chunk-v8k67zfz.js} +1123 -388
- package/dist/{chunk-hr9c2w99.js → chunk-v9sy0cj3.js} +10 -10
- package/dist/{chunk-p7vkh4wx.js → chunk-vbe1ersf.js} +1 -1
- package/dist/{chunk-ntztbz5t.js → chunk-vd5dh925.js} +78 -78
- package/dist/{chunk-6dngjwkh.js → chunk-vnrevqdf.js} +4 -4
- package/dist/{chunk-7s3g2nbw.js → chunk-vq4k182g.js} +5 -5
- package/dist/chunk-vr5vyt2h.js +107 -0
- package/dist/{chunk-a2v77s0p.js → chunk-vv84k232.js} +5 -5
- package/dist/chunk-vvjhax8n.js +114 -0
- package/dist/chunk-vvsts2t9.js +30 -0
- package/dist/{chunk-mq451b1k.js → chunk-vwkb146r.js} +90 -90
- package/dist/{chunk-a6328ts5.js → chunk-vwt2fv6j.js} +3 -3
- package/dist/{chunk-6fes9049.js → chunk-vx28ztc7.js} +20 -20
- package/dist/{chunk-g9f19ttm.js → chunk-vxsad4bw.js} +2 -2
- package/dist/chunk-w287mz4p.js +146 -0
- package/dist/{chunk-1ts9qapj.js → chunk-w2bff8pq.js} +12 -12
- package/dist/{chunk-q3w82drt.js → chunk-w60c0dkw.js} +5 -5
- package/dist/chunk-wa852b5b.js +113 -0
- package/dist/{chunk-7xyswgjh.js → chunk-wfh12nzh.js} +1 -1
- package/dist/{chunk-vf612n57.js → chunk-wt799fvk.js} +34 -34
- package/dist/{chunk-qajrkk97.js → chunk-wwrswxg1.js} +1 -1
- package/dist/{chunk-1fb0jqty.js → chunk-wyyd1qfn.js} +81 -81
- package/dist/{chunk-40gj4vgn.js → chunk-x09aacvx.js} +5 -5
- package/dist/{chunk-m8wxbjg3.js → chunk-x4x3691j.js} +12 -12
- package/dist/chunk-xbpt4dv8.js +155 -0
- package/dist/{chunk-rn0v1hk8.js → chunk-xdxdztxa.js} +1 -1
- package/dist/{chunk-wc67aegv.js → chunk-xggbj4j9.js} +3 -3
- package/dist/chunk-xj72jfpd.js +33 -0
- package/dist/{chunk-8yhf030a.js → chunk-xj8tk3d7.js} +3 -3
- package/dist/{chunk-5cj7yfg1.js → chunk-xkra2684.js} +85 -86
- package/dist/{chunk-hav5hw2k.js → chunk-xm9zf0tv.js} +78 -78
- package/dist/chunk-xwbh3j1x.js +107 -0
- package/dist/chunk-xwrar1c5.js +97 -0
- package/dist/{chunk-nsbtda9y.js → chunk-xygy5v97.js} +27 -27
- package/dist/{chunk-3jp8zgek.js → chunk-xyzbgjpv.js} +2 -2
- package/dist/{chunk-1ae3nt9j.js → chunk-y83gxqvc.js} +3 -3
- package/dist/{chunk-64r16v22.js → chunk-y8b45mt2.js} +4 -4
- package/dist/{chunk-65j4q40b.js → chunk-ycpdfeya.js} +79 -79
- package/dist/{chunk-k6bpr2zz.js → chunk-yh46f77t.js} +78 -78
- package/dist/{chunk-6g0hnb1k.js → chunk-ykvf93ft.js} +79 -79
- package/dist/{chunk-26wtxbdc.js → chunk-ynx3fetd.js} +1222 -463
- package/dist/{chunk-d5eckc42.js → chunk-yp64t9je.js} +8 -8
- package/dist/{chunk-eqp1rfft.js → chunk-ysfam81t.js} +2 -2
- package/dist/chunk-yt9mady7.js +36 -0
- package/dist/{chunk-bpkpy613.js → chunk-yteprw63.js} +26 -26
- package/dist/{chunk-8bxm9bv1.js → chunk-ytt8da3v.js} +81 -81
- package/dist/{chunk-hnwg3k83.js → chunk-yvm9t98e.js} +7 -18
- package/dist/{chunk-3f2ryn4p.js → chunk-z7yj7dfh.js} +10 -10
- package/dist/{chunk-d6eym4sa.js → chunk-z8b8f2n3.js} +79 -79
- package/dist/{chunk-1vyfr81c.js → chunk-z8n8cjhz.js} +2 -2
- package/dist/{chunk-5ccdsxgy.js → chunk-z9v4bxrj.js} +3 -3
- package/dist/{chunk-k737m0z6.js → chunk-zat7q2e0.js} +79 -79
- package/dist/chunk-zfxp82tk.js +24 -0
- package/dist/chunk-zgkngrp4.js +54 -0
- package/dist/{chunk-brjd9zmk.js → chunk-zhnnzkzm.js} +14 -14
- package/dist/{chunk-7hfzfe98.js → chunk-zp5nvg44.js} +2 -2
- package/dist/{chunk-5ekyhb1w.js → chunk-zqajmq38.js} +6 -6
- package/dist/{chunk-v1kzp02e.js → chunk-zx9r7a23.js} +1 -1
- package/dist/cli.js +11 -11
- package/dist/gateway/worker.js +17902 -12387
- package/dist/sdk/query.cjs +8 -18
- package/dist/sdk/query.js +1 -1
- package/package.json +128 -128
- package/dist/chunk-0e495v4y.js +0 -103
- package/dist/chunk-0n4n14c1.js +0 -55
- package/dist/chunk-0t81d427.js +0 -41
- package/dist/chunk-1pjgxfeq.js +0 -105
- package/dist/chunk-2tb0e476.js +0 -121
- package/dist/chunk-3dx4h9pq.js +0 -114
- package/dist/chunk-3kf30xba.js +0 -121
- package/dist/chunk-3mgywd32.js +0 -8
- package/dist/chunk-3t2pkmek.js +0 -77
- package/dist/chunk-4e708nwk.js +0 -50
- package/dist/chunk-5h4berfm.js +0 -30
- package/dist/chunk-5xkp0tnb.js +0 -97
- package/dist/chunk-6rvr3wwq.js +0 -55
- package/dist/chunk-7eb2qp91.js +0 -90
- package/dist/chunk-7m3a6kb8.js +0 -93
- package/dist/chunk-9hd3p970.js +0 -88
- package/dist/chunk-a1gwg4fx.js +0 -87
- package/dist/chunk-adtgferq.js +0 -107
- package/dist/chunk-ahxpxdqg.js +0 -105
- package/dist/chunk-ajrrg4t1.js +0 -131
- package/dist/chunk-b3q5g3x5.js +0 -71
- package/dist/chunk-bh5zqvyc.js +0 -36
- package/dist/chunk-bjwdqabf.js +0 -113
- package/dist/chunk-by2e46kd.js +0 -92
- package/dist/chunk-c6sjhj89.js +0 -1284
- package/dist/chunk-cdef9v7b.js +0 -27
- package/dist/chunk-czsjnagp.js +0 -114
- package/dist/chunk-dn00fcy7.js +0 -54
- package/dist/chunk-dnb45dhp.js +0 -97
- package/dist/chunk-e2nwdr09.js +0 -127
- package/dist/chunk-e4vx828d.js +0 -91
- package/dist/chunk-f0eqte4j.js +0 -105
- package/dist/chunk-f6xzr8q2.js +0 -101
- package/dist/chunk-g0x0gksg.js +0 -91
- package/dist/chunk-gdwdqewd.js +0 -19
- package/dist/chunk-gz1e8y1w.js +0 -33
- package/dist/chunk-hca6b2e5.js +0 -133
- package/dist/chunk-hszdxe8f.js +0 -146
- package/dist/chunk-k2p273gs.js +0 -107
- package/dist/chunk-kc8am0nn.js +0 -111
- package/dist/chunk-kde61fqf.js +0 -148
- package/dist/chunk-knbjqnc7.js +0 -52
- package/dist/chunk-m626yecd.js +0 -107
- package/dist/chunk-m86p6rs2.js +0 -121
- package/dist/chunk-nmgj86tt.js +0 -24
- package/dist/chunk-pd0yqtm8.js +0 -122
- package/dist/chunk-pgs47kqs.js +0 -155
- package/dist/chunk-py7pm42n.js +0 -60
- package/dist/chunk-pzxz2an7.js +0 -145
- package/dist/chunk-q0kafg58.js +0 -89
- package/dist/chunk-qnfx3qtx.js +0 -617
- package/dist/chunk-qs3g8f9e.js +0 -20
- package/dist/chunk-readr4t2.js +0 -89
- package/dist/chunk-rnajq3vk.js +0 -140
- package/dist/chunk-s6cxke3j.js +0 -100
- package/dist/chunk-sgpmpn90.js +0 -35
- package/dist/chunk-sh02d2qn.js +0 -38
- package/dist/chunk-t04tpqda.js +0 -130
- package/dist/chunk-t3se5crr.js +0 -85
- package/dist/chunk-vffwxpad.js +0 -101
- package/dist/chunk-vtjgsgyf.js +0 -123
- package/dist/chunk-w022zpyz.js +0 -81
- package/dist/chunk-w28zrffk.js +0 -94
- package/dist/chunk-w328d3yn.js +0 -71
- package/dist/chunk-xrb6mn8j.js +0 -93
- package/dist/chunk-ypsecc1v.js +0 -90
- package/dist/chunk-yrr23vr1.js +0 -58
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__esm
|
|
4
|
+
} from "./chunk-eta5aekm.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/.bun/lru-cache@11.5.2/node_modules/lru-cache/dist/esm/node/index.min.js
|
|
7
|
+
import { tracingChannel as G, channel as P } from "diagnostics_channel";
|
|
8
|
+
var S, W, L, R = () => S.hasSubscribers || W.hasSubscribers, U, M, k = (d, e, t, i) => {
|
|
9
|
+
typeof M.emitWarning == "function" ? M.emitWarning(d, e, t, i) : console.error(`[${t}] ${e}: ${d}`);
|
|
10
|
+
}, H = (d) => !U.has(d), T = (d) => !!d && d === Math.floor(d) && d > 0 && isFinite(d), j = (d) => T(d) ? d <= Math.pow(2, 8) ? Uint8Array : d <= Math.pow(2, 16) ? Uint16Array : d <= Math.pow(2, 32) ? Uint32Array : d <= Number.MAX_SAFE_INTEGER ? O : null : null, O, x = class d {
|
|
11
|
+
heap;
|
|
12
|
+
length;
|
|
13
|
+
static #o = false;
|
|
14
|
+
static create(e) {
|
|
15
|
+
let t = j(e);
|
|
16
|
+
if (!t)
|
|
17
|
+
return [];
|
|
18
|
+
d.#o = true;
|
|
19
|
+
let i = new d(e, t);
|
|
20
|
+
return d.#o = false, i;
|
|
21
|
+
}
|
|
22
|
+
constructor(e, t) {
|
|
23
|
+
if (!d.#o)
|
|
24
|
+
throw new TypeError("instantiate Stack using Stack.create(n)");
|
|
25
|
+
this.heap = new t(e), this.length = 0;
|
|
26
|
+
}
|
|
27
|
+
push(e) {
|
|
28
|
+
this.heap[this.length++] = e;
|
|
29
|
+
}
|
|
30
|
+
pop() {
|
|
31
|
+
return this.heap[--this.length];
|
|
32
|
+
}
|
|
33
|
+
}, I;
|
|
34
|
+
var init_index_min = __esm(() => {
|
|
35
|
+
S = P("lru-cache:metrics");
|
|
36
|
+
W = G("lru-cache");
|
|
37
|
+
L = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
38
|
+
U = new Set;
|
|
39
|
+
M = typeof process == "object" && process ? process : {};
|
|
40
|
+
O = class extends Array {
|
|
41
|
+
constructor(e) {
|
|
42
|
+
super(e), this.fill(0);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
I = class d2 {
|
|
46
|
+
#o;
|
|
47
|
+
#c;
|
|
48
|
+
#S;
|
|
49
|
+
#O;
|
|
50
|
+
#w;
|
|
51
|
+
#M;
|
|
52
|
+
#I;
|
|
53
|
+
#m;
|
|
54
|
+
get perf() {
|
|
55
|
+
return this.#m;
|
|
56
|
+
}
|
|
57
|
+
ttl;
|
|
58
|
+
ttlResolution;
|
|
59
|
+
ttlAutopurge;
|
|
60
|
+
updateAgeOnGet;
|
|
61
|
+
updateAgeOnHas;
|
|
62
|
+
allowStale;
|
|
63
|
+
noDisposeOnSet;
|
|
64
|
+
noUpdateTTL;
|
|
65
|
+
maxEntrySize;
|
|
66
|
+
sizeCalculation;
|
|
67
|
+
noDeleteOnFetchRejection;
|
|
68
|
+
noDeleteOnStaleGet;
|
|
69
|
+
allowStaleOnFetchAbort;
|
|
70
|
+
allowStaleOnFetchRejection;
|
|
71
|
+
ignoreFetchAbort;
|
|
72
|
+
backgroundFetchSize;
|
|
73
|
+
#n;
|
|
74
|
+
#b;
|
|
75
|
+
#s;
|
|
76
|
+
#i;
|
|
77
|
+
#t;
|
|
78
|
+
#l;
|
|
79
|
+
#u;
|
|
80
|
+
#a;
|
|
81
|
+
#h;
|
|
82
|
+
#y;
|
|
83
|
+
#r;
|
|
84
|
+
#_;
|
|
85
|
+
#F;
|
|
86
|
+
#d;
|
|
87
|
+
#g;
|
|
88
|
+
#T;
|
|
89
|
+
#U;
|
|
90
|
+
#f;
|
|
91
|
+
#D;
|
|
92
|
+
static unsafeExposeInternals(e) {
|
|
93
|
+
return { starts: e.#F, ttls: e.#d, autopurgeTimers: e.#g, sizes: e.#_, keyMap: e.#s, keyList: e.#i, valList: e.#t, next: e.#l, prev: e.#u, get head() {
|
|
94
|
+
return e.#a;
|
|
95
|
+
}, get tail() {
|
|
96
|
+
return e.#h;
|
|
97
|
+
}, free: e.#y, isBackgroundFetch: (t) => e.#e(t), backgroundFetch: (t, i, s, n) => e.#P(t, i, s, n), moveToTail: (t) => e.#L(t), indexes: (t) => e.#A(t), rindexes: (t) => e.#z(t), isStale: (t) => e.#p(t) };
|
|
98
|
+
}
|
|
99
|
+
get max() {
|
|
100
|
+
return this.#o;
|
|
101
|
+
}
|
|
102
|
+
get maxSize() {
|
|
103
|
+
return this.#c;
|
|
104
|
+
}
|
|
105
|
+
get calculatedSize() {
|
|
106
|
+
return this.#b;
|
|
107
|
+
}
|
|
108
|
+
get size() {
|
|
109
|
+
return this.#n;
|
|
110
|
+
}
|
|
111
|
+
get fetchMethod() {
|
|
112
|
+
return this.#M;
|
|
113
|
+
}
|
|
114
|
+
get memoMethod() {
|
|
115
|
+
return this.#I;
|
|
116
|
+
}
|
|
117
|
+
get dispose() {
|
|
118
|
+
return this.#S;
|
|
119
|
+
}
|
|
120
|
+
get onInsert() {
|
|
121
|
+
return this.#O;
|
|
122
|
+
}
|
|
123
|
+
get disposeAfter() {
|
|
124
|
+
return this.#w;
|
|
125
|
+
}
|
|
126
|
+
constructor(e) {
|
|
127
|
+
let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: l, allowStale: h, dispose: r, onInsert: c, disposeAfter: m, noDisposeOnSet: _, noUpdateTTL: u, maxSize: g = 0, maxEntrySize: f = 0, sizeCalculation: y, fetchMethod: a, memoMethod: w, noDeleteOnFetchRejection: F, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: p, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, backgroundFetchSize: C = 1, perf: E } = e;
|
|
128
|
+
if (this.backgroundFetchSize = C, E !== undefined && typeof E?.now != "function")
|
|
129
|
+
throw new TypeError("perf option must have a now() method if specified");
|
|
130
|
+
if (this.#m = E ?? L, t !== 0 && !T(t))
|
|
131
|
+
throw new TypeError("max option must be a nonnegative integer");
|
|
132
|
+
let v = t ? j(t) : Array;
|
|
133
|
+
if (!v)
|
|
134
|
+
throw new Error("invalid max value: " + t);
|
|
135
|
+
if (this.#o = t, this.#c = g, this.maxEntrySize = f || this.#c, this.sizeCalculation = y, this.sizeCalculation) {
|
|
136
|
+
if (!this.#c && !this.maxEntrySize)
|
|
137
|
+
throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
138
|
+
if (typeof this.sizeCalculation != "function")
|
|
139
|
+
throw new TypeError("sizeCalculation set to non-function");
|
|
140
|
+
}
|
|
141
|
+
if (w !== undefined && typeof w != "function")
|
|
142
|
+
throw new TypeError("memoMethod must be a function if defined");
|
|
143
|
+
if (this.#I = w, a !== undefined && typeof a != "function")
|
|
144
|
+
throw new TypeError("fetchMethod must be a function if specified");
|
|
145
|
+
if (this.#M = a, this.#U = !!a, this.#s = new Map, this.#i = Array.from({ length: t }).fill(undefined), this.#t = Array.from({ length: t }).fill(undefined), this.#l = new v(t), this.#u = new v(t), this.#a = 0, this.#h = 0, this.#y = x.create(t), this.#n = 0, this.#b = 0, typeof r == "function" && (this.#S = r), typeof c == "function" && (this.#O = c), typeof m == "function" ? (this.#w = m, this.#r = []) : (this.#w = undefined, this.#r = undefined), this.#T = !!this.#S, this.#D = !!this.#O, this.#f = !!this.#w, this.noDisposeOnSet = !!_, this.noUpdateTTL = !!u, this.noDeleteOnFetchRejection = !!F, this.allowStaleOnFetchRejection = !!p, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
|
|
146
|
+
if (this.#c !== 0 && !T(this.#c))
|
|
147
|
+
throw new TypeError("maxSize must be a positive integer if specified");
|
|
148
|
+
if (!T(this.maxEntrySize))
|
|
149
|
+
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
150
|
+
this.#X();
|
|
151
|
+
}
|
|
152
|
+
if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!l, this.ttlResolution = T(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
153
|
+
if (!T(this.ttl))
|
|
154
|
+
throw new TypeError("ttl must be a positive integer if specified");
|
|
155
|
+
this.#k();
|
|
156
|
+
}
|
|
157
|
+
if (this.#o === 0 && this.ttl === 0 && this.#c === 0)
|
|
158
|
+
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
159
|
+
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
160
|
+
let D = "LRU_CACHE_UNBOUNDED";
|
|
161
|
+
H(D) && (U.add(D), k("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", D, d2));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
getRemainingTTL(e) {
|
|
165
|
+
return this.#s.has(e) ? 1 / 0 : 0;
|
|
166
|
+
}
|
|
167
|
+
#k() {
|
|
168
|
+
let e = new O(this.#o), t = new O(this.#o);
|
|
169
|
+
this.#d = e, this.#F = t;
|
|
170
|
+
let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : undefined;
|
|
171
|
+
this.#g = i, this.#H = (h, r, c = this.#m.now()) => {
|
|
172
|
+
t[h] = r !== 0 ? c : 0, e[h] = r, s(h, r);
|
|
173
|
+
}, this.#R = (h) => {
|
|
174
|
+
t[h] = e[h] !== 0 ? this.#m.now() : 0, s(h, e[h]);
|
|
175
|
+
};
|
|
176
|
+
let s = this.ttlAutopurge ? (h, r) => {
|
|
177
|
+
if (i?.[h] && (clearTimeout(i[h]), i[h] = undefined), r && r !== 0 && i) {
|
|
178
|
+
let c = setTimeout(() => {
|
|
179
|
+
this.#p(h) ? (this.#E(this.#i[h], "expire"), i[h] = undefined) : s(h, l(h));
|
|
180
|
+
}, r + 1);
|
|
181
|
+
c.unref && c.unref(), i[h] = c;
|
|
182
|
+
}
|
|
183
|
+
} : () => {};
|
|
184
|
+
this.#v = (h, r) => {
|
|
185
|
+
if (e[r]) {
|
|
186
|
+
let c = e[r], m = t[r];
|
|
187
|
+
if (!c || !m)
|
|
188
|
+
return;
|
|
189
|
+
h.ttl = c, h.start = m, h.now = n || o();
|
|
190
|
+
let _ = h.now - m;
|
|
191
|
+
h.remainingTTL = c - _;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
let n = 0, o = () => {
|
|
195
|
+
let h = this.#m.now();
|
|
196
|
+
if (this.ttlResolution > 0) {
|
|
197
|
+
n = h;
|
|
198
|
+
let r = setTimeout(() => n = 0, this.ttlResolution);
|
|
199
|
+
r.unref && r.unref();
|
|
200
|
+
}
|
|
201
|
+
return h;
|
|
202
|
+
};
|
|
203
|
+
this.getRemainingTTL = (h) => {
|
|
204
|
+
let r = this.#s.get(h);
|
|
205
|
+
return r === undefined ? 0 : l(r);
|
|
206
|
+
};
|
|
207
|
+
let l = (h) => {
|
|
208
|
+
let r = e[h], c = t[h];
|
|
209
|
+
if (!r || !c)
|
|
210
|
+
return 1 / 0;
|
|
211
|
+
let m = (n || o()) - c;
|
|
212
|
+
return r - m;
|
|
213
|
+
};
|
|
214
|
+
this.#p = (h) => {
|
|
215
|
+
let r = t[h], c = e[h];
|
|
216
|
+
return !!c && !!r && (n || o()) - r > c;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
#R = () => {};
|
|
220
|
+
#v = () => {};
|
|
221
|
+
#H = () => {};
|
|
222
|
+
#p = () => false;
|
|
223
|
+
#X() {
|
|
224
|
+
let e = new O(this.#o);
|
|
225
|
+
this.#b = 0, this.#_ = e, this.#x = (t) => {
|
|
226
|
+
this.#b -= e[t], e[t] = 0;
|
|
227
|
+
}, this.#N = (t, i, s, n) => {
|
|
228
|
+
if (!T(s)) {
|
|
229
|
+
if (this.#e(i))
|
|
230
|
+
return this.backgroundFetchSize;
|
|
231
|
+
if (n) {
|
|
232
|
+
if (typeof n != "function")
|
|
233
|
+
throw new TypeError("sizeCalculation must be a function");
|
|
234
|
+
if (s = n(i, t), !T(s))
|
|
235
|
+
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
236
|
+
} else
|
|
237
|
+
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
238
|
+
}
|
|
239
|
+
return s;
|
|
240
|
+
}, this.#j = (t, i, s) => {
|
|
241
|
+
if (e[t] = i, this.#c) {
|
|
242
|
+
let n = this.#c - e[t];
|
|
243
|
+
for (;this.#b > n; )
|
|
244
|
+
this.#G(true);
|
|
245
|
+
}
|
|
246
|
+
this.#b += e[t], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
#x = (e) => {};
|
|
250
|
+
#j = (e, t, i) => {};
|
|
251
|
+
#N = (e, t, i, s) => {
|
|
252
|
+
if (i || s)
|
|
253
|
+
throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
254
|
+
return 0;
|
|
255
|
+
};
|
|
256
|
+
*#A({ allowStale: e = this.allowStale } = {}) {
|
|
257
|
+
if (this.#n)
|
|
258
|
+
for (let t = this.#h;this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#a); )
|
|
259
|
+
t = this.#u[t];
|
|
260
|
+
}
|
|
261
|
+
*#z({ allowStale: e = this.allowStale } = {}) {
|
|
262
|
+
if (this.#n)
|
|
263
|
+
for (let t = this.#a;this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h); )
|
|
264
|
+
t = this.#l[t];
|
|
265
|
+
}
|
|
266
|
+
#V(e) {
|
|
267
|
+
return e !== undefined && this.#s.get(this.#i[e]) === e;
|
|
268
|
+
}
|
|
269
|
+
*entries() {
|
|
270
|
+
for (let e of this.#A())
|
|
271
|
+
this.#t[e] !== undefined && this.#i[e] !== undefined && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
|
|
272
|
+
}
|
|
273
|
+
*rentries() {
|
|
274
|
+
for (let e of this.#z())
|
|
275
|
+
this.#t[e] !== undefined && this.#i[e] !== undefined && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
|
|
276
|
+
}
|
|
277
|
+
*keys() {
|
|
278
|
+
for (let e of this.#A()) {
|
|
279
|
+
let t = this.#i[e];
|
|
280
|
+
t !== undefined && !this.#e(this.#t[e]) && (yield t);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
*rkeys() {
|
|
284
|
+
for (let e of this.#z()) {
|
|
285
|
+
let t = this.#i[e];
|
|
286
|
+
t !== undefined && !this.#e(this.#t[e]) && (yield t);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
*values() {
|
|
290
|
+
for (let e of this.#A())
|
|
291
|
+
this.#t[e] !== undefined && !this.#e(this.#t[e]) && (yield this.#t[e]);
|
|
292
|
+
}
|
|
293
|
+
*rvalues() {
|
|
294
|
+
for (let e of this.#z())
|
|
295
|
+
this.#t[e] !== undefined && !this.#e(this.#t[e]) && (yield this.#t[e]);
|
|
296
|
+
}
|
|
297
|
+
[Symbol.iterator]() {
|
|
298
|
+
return this.entries();
|
|
299
|
+
}
|
|
300
|
+
[Symbol.toStringTag] = "LRUCache";
|
|
301
|
+
find(e, t = {}) {
|
|
302
|
+
for (let i of this.#A()) {
|
|
303
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
304
|
+
if (n !== undefined && e(n, this.#i[i], this))
|
|
305
|
+
return this.#C(this.#i[i], t);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
forEach(e, t = this) {
|
|
309
|
+
for (let i of this.#A()) {
|
|
310
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
311
|
+
n !== undefined && e.call(t, n, this.#i[i], this);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
rforEach(e, t = this) {
|
|
315
|
+
for (let i of this.#z()) {
|
|
316
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
317
|
+
n !== undefined && e.call(t, n, this.#i[i], this);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
purgeStale() {
|
|
321
|
+
let e = false;
|
|
322
|
+
for (let t of this.#z({ allowStale: true }))
|
|
323
|
+
this.#p(t) && (this.#E(this.#i[t], "expire"), e = true);
|
|
324
|
+
return e;
|
|
325
|
+
}
|
|
326
|
+
info(e) {
|
|
327
|
+
let t = this.#s.get(e);
|
|
328
|
+
if (t === undefined)
|
|
329
|
+
return;
|
|
330
|
+
let i = this.#t[t], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
331
|
+
if (s === undefined)
|
|
332
|
+
return;
|
|
333
|
+
let n = { value: s };
|
|
334
|
+
if (this.#d && this.#F) {
|
|
335
|
+
let o = this.#d[t], l = this.#F[t];
|
|
336
|
+
if (o && l) {
|
|
337
|
+
let h = o - (this.#m.now() - l);
|
|
338
|
+
n.ttl = h, n.start = Date.now();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return this.#_ && (n.size = this.#_[t]), n;
|
|
342
|
+
}
|
|
343
|
+
dump() {
|
|
344
|
+
let e = [];
|
|
345
|
+
for (let t of this.#A({ allowStale: true })) {
|
|
346
|
+
let i = this.#i[t], s = this.#t[t], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
347
|
+
if (n === undefined || i === undefined)
|
|
348
|
+
continue;
|
|
349
|
+
let o = { value: n };
|
|
350
|
+
if (this.#d && this.#F) {
|
|
351
|
+
o.ttl = this.#d[t];
|
|
352
|
+
let l = this.#m.now() - this.#F[t];
|
|
353
|
+
o.start = Math.floor(Date.now() - l);
|
|
354
|
+
}
|
|
355
|
+
this.#_ && (o.size = this.#_[t]), e.unshift([i, o]);
|
|
356
|
+
}
|
|
357
|
+
return e;
|
|
358
|
+
}
|
|
359
|
+
load(e) {
|
|
360
|
+
this.clear();
|
|
361
|
+
for (let [t, i] of e) {
|
|
362
|
+
if (i.start) {
|
|
363
|
+
let s = Date.now() - i.start;
|
|
364
|
+
i.start = this.#m.now() - s;
|
|
365
|
+
}
|
|
366
|
+
this.#W(t, i.value, i);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
set(e, t, i = {}) {
|
|
370
|
+
let { status: s = S.hasSubscribers ? {} : undefined } = i;
|
|
371
|
+
i.status = s, s && (s.op = "set", s.key = e, t !== undefined && (s.value = t), s.cache = this);
|
|
372
|
+
let n = this.#W(e, t, i);
|
|
373
|
+
return s && S.hasSubscribers && S.publish(s), n;
|
|
374
|
+
}
|
|
375
|
+
#W(e, t, i, s) {
|
|
376
|
+
let { ttl: n = this.ttl, start: o, noDisposeOnSet: l = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: r } = i, c = this.#e(t);
|
|
377
|
+
if (t === undefined)
|
|
378
|
+
return r && (r.set = "deleted"), this.delete(e), this;
|
|
379
|
+
let { noUpdateTTL: m = this.noUpdateTTL } = i;
|
|
380
|
+
r && !c && (r.value = t);
|
|
381
|
+
let _ = this.#N(e, t, i.size || 0, h, r);
|
|
382
|
+
if (this.maxEntrySize && _ > this.maxEntrySize)
|
|
383
|
+
return this.#E(e, "set"), r && (r.set = "miss", r.maxEntrySizeExceeded = true), this;
|
|
384
|
+
let u = this.#n === 0 ? undefined : this.#s.get(e);
|
|
385
|
+
if (u === undefined)
|
|
386
|
+
u = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[u] = e, this.#t[u] = t, this.#s.set(e, u), this.#l[this.#h] = u, this.#u[u] = this.#h, this.#h = u, this.#n++, this.#j(u, _, r), r && (r.set = "add"), m = false, this.#D && !c && this.#O?.(t, e, "add");
|
|
387
|
+
else {
|
|
388
|
+
this.#L(u);
|
|
389
|
+
let g = this.#t[u];
|
|
390
|
+
if (t !== g) {
|
|
391
|
+
if (!l)
|
|
392
|
+
if (this.#e(g)) {
|
|
393
|
+
g !== s && g.__abortController.abort(new Error("replaced"));
|
|
394
|
+
let { __staleWhileFetching: f } = g;
|
|
395
|
+
f !== undefined && f !== t && (this.#T && this.#S?.(f, e, "set"), this.#f && this.#r?.push([f, e, "set"]));
|
|
396
|
+
} else
|
|
397
|
+
this.#T && this.#S?.(g, e, "set"), this.#f && this.#r?.push([g, e, "set"]);
|
|
398
|
+
if (this.#x(u), this.#j(u, _, r), this.#t[u] = t, !c) {
|
|
399
|
+
let f = g && this.#e(g) ? g.__staleWhileFetching : g, y = f === undefined ? "add" : t !== f ? "replace" : "update";
|
|
400
|
+
r && (r.set = y, f !== undefined && (r.oldValue = f)), this.#D && this.onInsert?.(t, e, y);
|
|
401
|
+
}
|
|
402
|
+
} else
|
|
403
|
+
c || (r && (r.set = "update"), this.#D && this.onInsert?.(t, e, "update"));
|
|
404
|
+
}
|
|
405
|
+
if (n !== 0 && !this.#d && this.#k(), this.#d && (m || this.#H(u, n, o), r && this.#v(r, u)), !l && this.#f && this.#r) {
|
|
406
|
+
let g = this.#r, f;
|
|
407
|
+
for (;f = g?.shift(); )
|
|
408
|
+
this.#w?.(...f);
|
|
409
|
+
}
|
|
410
|
+
return this;
|
|
411
|
+
}
|
|
412
|
+
pop() {
|
|
413
|
+
try {
|
|
414
|
+
for (;this.#n; ) {
|
|
415
|
+
let e = this.#t[this.#a];
|
|
416
|
+
if (this.#G(true), this.#e(e)) {
|
|
417
|
+
if (e.__staleWhileFetching)
|
|
418
|
+
return e.__staleWhileFetching;
|
|
419
|
+
} else if (e !== undefined)
|
|
420
|
+
return e;
|
|
421
|
+
}
|
|
422
|
+
} finally {
|
|
423
|
+
if (this.#f && this.#r) {
|
|
424
|
+
let e = this.#r, t;
|
|
425
|
+
for (;t = e?.shift(); )
|
|
426
|
+
this.#w?.(...t);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
#G(e) {
|
|
431
|
+
let t = this.#a, i = this.#i[t], s = this.#t[t], n = this.#e(s);
|
|
432
|
+
n && s.__abortController.abort(new Error("evicted"));
|
|
433
|
+
let o = n ? s.__staleWhileFetching : s;
|
|
434
|
+
return (this.#T || this.#f) && o !== undefined && (this.#T && this.#S?.(o, i, "evict"), this.#f && this.#r?.push([o, i, "evict"])), this.#x(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = undefined), e && (this.#i[t] = undefined, this.#t[t] = undefined, this.#y.push(t)), this.#n === 1 ? (this.#a = this.#h = 0, this.#y.length = 0) : this.#a = this.#l[t], this.#s.delete(i), this.#n--, t;
|
|
435
|
+
}
|
|
436
|
+
has(e, t = {}) {
|
|
437
|
+
let { status: i = S.hasSubscribers ? {} : undefined } = t;
|
|
438
|
+
t.status = i, i && (i.op = "has", i.key = e, i.cache = this);
|
|
439
|
+
let s = this.#Y(e, t);
|
|
440
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
441
|
+
}
|
|
442
|
+
#Y(e, t = {}) {
|
|
443
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = t, n = this.#s.get(e);
|
|
444
|
+
if (n !== undefined) {
|
|
445
|
+
let o = this.#t[n];
|
|
446
|
+
if (this.#e(o) && o.__staleWhileFetching === undefined)
|
|
447
|
+
return false;
|
|
448
|
+
if (this.#p(n))
|
|
449
|
+
s && (s.has = "stale", this.#v(s, n));
|
|
450
|
+
else
|
|
451
|
+
return i && this.#R(n), s && (s.has = "hit", this.#v(s, n)), true;
|
|
452
|
+
} else
|
|
453
|
+
s && (s.has = "miss");
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
peek(e, t = {}) {
|
|
457
|
+
let { status: i = R() ? {} : undefined } = t;
|
|
458
|
+
i && (i.op = "peek", i.key = e, i.cache = this), t.status = i;
|
|
459
|
+
let s = this.#J(e, t);
|
|
460
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
461
|
+
}
|
|
462
|
+
#J(e, t) {
|
|
463
|
+
let { status: i, allowStale: s = this.allowStale } = t, n = this.#s.get(e);
|
|
464
|
+
if (n === undefined || !s && this.#p(n)) {
|
|
465
|
+
i && (i.peek = n === undefined ? "miss" : "stale");
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
let o = this.#t[n], l = this.#e(o) ? o.__staleWhileFetching : o;
|
|
469
|
+
return i && (l !== undefined ? (i.peek = "hit", i.value = l) : i.peek = "miss"), l;
|
|
470
|
+
}
|
|
471
|
+
#P(e, t, i, s) {
|
|
472
|
+
let n = t === undefined ? undefined : this.#t[t];
|
|
473
|
+
if (this.#e(n))
|
|
474
|
+
return n;
|
|
475
|
+
let o = new AbortController, { signal: l } = i;
|
|
476
|
+
l?.addEventListener("abort", () => o.abort(l.reason), { signal: o.signal });
|
|
477
|
+
let h = { signal: o.signal, options: i, context: s }, r = (f, y = false) => {
|
|
478
|
+
let { aborted: a } = o.signal, w = i.ignoreFetchAbort && f !== undefined, F = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && f !== undefined);
|
|
479
|
+
if (i.status && (a && !y ? (i.status.fetchAborted = true, i.status.fetchError = o.signal.reason, w && (i.status.fetchAbortIgnored = true)) : i.status.fetchResolved = true), a && !w && !y)
|
|
480
|
+
return m(o.signal.reason, F);
|
|
481
|
+
let b = u, p = this.#t[t];
|
|
482
|
+
return (p === u || p === undefined && w && y) && (f === undefined ? b.__staleWhileFetching !== undefined ? this.#t[t] = b.__staleWhileFetching : this.#E(e, "fetch") : (i.status && (i.status.fetchUpdated = true), this.#W(e, f, h.options, b))), f;
|
|
483
|
+
}, c = (f) => (i.status && (i.status.fetchRejected = true, i.status.fetchError = f), m(f, false)), m = (f, y) => {
|
|
484
|
+
let { aborted: a } = o.signal, w = a && i.allowStaleOnFetchAbort, F = w || i.allowStaleOnFetchRejection, b = F || i.noDeleteOnFetchRejection, p = u;
|
|
485
|
+
if (this.#t[t] === u && (!b || !y && p.__staleWhileFetching === undefined ? this.#E(e, "fetch") : w || (this.#t[t] = p.__staleWhileFetching)), F)
|
|
486
|
+
return i.status && p.__staleWhileFetching !== undefined && (i.status.returnedStale = true), p.__staleWhileFetching;
|
|
487
|
+
if (p.__returned === p)
|
|
488
|
+
throw f;
|
|
489
|
+
}, _ = (f, y) => {
|
|
490
|
+
let a = this.#M?.(e, n, h);
|
|
491
|
+
o.signal.addEventListener("abort", () => {
|
|
492
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (f(undefined), i.allowStaleOnFetchAbort && (f = (w) => r(w, true)));
|
|
493
|
+
}), a && a instanceof Promise ? a.then((w) => f(w === undefined ? undefined : w), y) : a !== undefined && f(a);
|
|
494
|
+
};
|
|
495
|
+
i.status && (i.status.fetchDispatched = true);
|
|
496
|
+
let u = new Promise(_).then(r, c), g = Object.assign(u, { __abortController: o, __staleWhileFetching: n, __returned: undefined });
|
|
497
|
+
return t === undefined ? (this.#W(e, g, { ...h.options, status: undefined }), t = this.#s.get(e)) : this.#t[t] = g, g;
|
|
498
|
+
}
|
|
499
|
+
#e(e) {
|
|
500
|
+
if (!this.#U)
|
|
501
|
+
return false;
|
|
502
|
+
let t = e;
|
|
503
|
+
return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
|
|
504
|
+
}
|
|
505
|
+
fetch(e, t = {}) {
|
|
506
|
+
let i = W.hasSubscribers, { status: s = R() ? {} : undefined } = t;
|
|
507
|
+
t.status = s, s && t.context && (s.context = t.context);
|
|
508
|
+
let n = this.#B(e, t);
|
|
509
|
+
return s && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
|
|
510
|
+
}
|
|
511
|
+
async#B(e, t = {}) {
|
|
512
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: l = this.noDisposeOnSet, size: h = 0, sizeCalculation: r = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: m = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: _ = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: g = this.allowStaleOnFetchAbort, context: f, forceRefresh: y = false, status: a, signal: w } = t;
|
|
513
|
+
if (a && (a.op = "fetch", a.key = e, y && (a.forceRefresh = true), a.cache = this), !this.#U)
|
|
514
|
+
return a && (a.fetch = "get"), this.#C(e, { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, status: a });
|
|
515
|
+
let F = { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, ttl: o, noDisposeOnSet: l, size: h, sizeCalculation: r, noUpdateTTL: c, noDeleteOnFetchRejection: m, allowStaleOnFetchRejection: _, allowStaleOnFetchAbort: g, ignoreFetchAbort: u, status: a, signal: w }, b = this.#s.get(e);
|
|
516
|
+
if (b === undefined) {
|
|
517
|
+
a && (a.fetch = "miss");
|
|
518
|
+
let p = this.#P(e, b, F, f);
|
|
519
|
+
return p.__returned = p;
|
|
520
|
+
} else {
|
|
521
|
+
let p = this.#t[b];
|
|
522
|
+
if (this.#e(p)) {
|
|
523
|
+
let v = i && p.__staleWhileFetching !== undefined;
|
|
524
|
+
return a && (a.fetch = "inflight", v && (a.returnedStale = true)), v ? p.__staleWhileFetching : p.__returned = p;
|
|
525
|
+
}
|
|
526
|
+
let A = this.#p(b);
|
|
527
|
+
if (!y && !A)
|
|
528
|
+
return a && (a.fetch = "hit"), this.#L(b), s && this.#R(b), a && this.#v(a, b), p;
|
|
529
|
+
let z = this.#P(e, b, F, f), E = z.__staleWhileFetching !== undefined && i;
|
|
530
|
+
return a && (a.fetch = A ? "stale" : "refresh", E && A && (a.returnedStale = true)), E ? z.__staleWhileFetching : z.__returned = z;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
forceFetch(e, t = {}) {
|
|
534
|
+
let i = W.hasSubscribers, { status: s = R() ? {} : undefined } = t;
|
|
535
|
+
t.status = s, s && t.context && (s.context = t.context);
|
|
536
|
+
let n = this.#K(e, t);
|
|
537
|
+
return s && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
|
|
538
|
+
}
|
|
539
|
+
async#K(e, t = {}) {
|
|
540
|
+
let i = await this.#B(e, t);
|
|
541
|
+
if (i === undefined)
|
|
542
|
+
throw new Error("fetch() returned undefined");
|
|
543
|
+
return i;
|
|
544
|
+
}
|
|
545
|
+
memo(e, t = {}) {
|
|
546
|
+
let { status: i = S.hasSubscribers ? {} : undefined } = t;
|
|
547
|
+
t.status = i, i && (i.op = "memo", i.key = e, t.context && (i.context = t.context), i.cache = this);
|
|
548
|
+
let s = this.#Q(e, t);
|
|
549
|
+
return i && (i.value = s), S.hasSubscribers && S.publish(i), s;
|
|
550
|
+
}
|
|
551
|
+
#Q(e, t = {}) {
|
|
552
|
+
let i = this.#I;
|
|
553
|
+
if (!i)
|
|
554
|
+
throw new Error("no memoMethod provided to constructor");
|
|
555
|
+
let { context: s, status: n, forceRefresh: o, ...l } = t;
|
|
556
|
+
n && o && (n.forceRefresh = true);
|
|
557
|
+
let h = this.#C(e, l), r = o || h === undefined;
|
|
558
|
+
if (n && (n.memo = r ? "miss" : "hit", r || (n.value = h)), !r)
|
|
559
|
+
return h;
|
|
560
|
+
let c = i(e, h, { options: l, context: s });
|
|
561
|
+
return n && (n.value = c), this.#W(e, c, l), c;
|
|
562
|
+
}
|
|
563
|
+
get(e, t = {}) {
|
|
564
|
+
let { status: i = S.hasSubscribers ? {} : undefined } = t;
|
|
565
|
+
t.status = i, i && (i.op = "get", i.key = e, i.cache = this);
|
|
566
|
+
let s = this.#C(e, t);
|
|
567
|
+
return i && (s !== undefined && (i.value = s), S.hasSubscribers && S.publish(i)), s;
|
|
568
|
+
}
|
|
569
|
+
#C(e, t = {}) {
|
|
570
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = t, l = this.#s.get(e);
|
|
571
|
+
if (l === undefined) {
|
|
572
|
+
o && (o.get = "miss");
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
let h = this.#t[l], r = this.#e(h);
|
|
576
|
+
return o && this.#v(o, l), this.#p(l) ? r ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== undefined ? (o && (o.returnedStale = true), h.__staleWhileFetching) : undefined) : (n || this.#E(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = true), h) : undefined) : (o && (o.get = r ? "fetching" : "hit"), this.#L(l), s && this.#R(l), r ? h.__staleWhileFetching : h);
|
|
577
|
+
}
|
|
578
|
+
#$(e, t) {
|
|
579
|
+
this.#u[t] = e, this.#l[e] = t;
|
|
580
|
+
}
|
|
581
|
+
#L(e) {
|
|
582
|
+
e !== this.#h && (e === this.#a ? this.#a = this.#l[e] : this.#$(this.#u[e], this.#l[e]), this.#$(this.#h, e), this.#h = e);
|
|
583
|
+
}
|
|
584
|
+
delete(e) {
|
|
585
|
+
return this.#E(e, "delete");
|
|
586
|
+
}
|
|
587
|
+
#E(e, t) {
|
|
588
|
+
S.hasSubscribers && S.publish({ op: "delete", delete: t, key: e, cache: this });
|
|
589
|
+
let i = false;
|
|
590
|
+
if (this.#n !== 0) {
|
|
591
|
+
let s = this.#s.get(e);
|
|
592
|
+
if (s !== undefined)
|
|
593
|
+
if (this.#g?.[s] && (clearTimeout(this.#g[s]), this.#g[s] = undefined), i = true, this.#n === 1)
|
|
594
|
+
this.#q(t);
|
|
595
|
+
else {
|
|
596
|
+
this.#x(s);
|
|
597
|
+
let n = this.#t[s];
|
|
598
|
+
if (this.#e(n) ? n.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#S?.(n, e, t), this.#f && this.#r?.push([n, e, t])), this.#s.delete(e), this.#i[s] = undefined, this.#t[s] = undefined, s === this.#h)
|
|
599
|
+
this.#h = this.#u[s];
|
|
600
|
+
else if (s === this.#a)
|
|
601
|
+
this.#a = this.#l[s];
|
|
602
|
+
else {
|
|
603
|
+
let o = this.#u[s];
|
|
604
|
+
this.#l[o] = this.#l[s];
|
|
605
|
+
let l = this.#l[s];
|
|
606
|
+
this.#u[l] = this.#u[s];
|
|
607
|
+
}
|
|
608
|
+
this.#n--, this.#y.push(s);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
if (this.#f && this.#r?.length) {
|
|
612
|
+
let s = this.#r, n;
|
|
613
|
+
for (;n = s?.shift(); )
|
|
614
|
+
this.#w?.(...n);
|
|
615
|
+
}
|
|
616
|
+
return i;
|
|
617
|
+
}
|
|
618
|
+
clear() {
|
|
619
|
+
return this.#q("delete");
|
|
620
|
+
}
|
|
621
|
+
#q(e) {
|
|
622
|
+
for (let t of this.#z({ allowStale: true })) {
|
|
623
|
+
let i = this.#t[t];
|
|
624
|
+
if (this.#e(i))
|
|
625
|
+
i.__abortController.abort(new Error("deleted"));
|
|
626
|
+
else {
|
|
627
|
+
let s = this.#i[t];
|
|
628
|
+
this.#T && this.#S?.(i, s, e), this.#f && this.#r?.push([i, s, e]);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (this.#s.clear(), this.#t.fill(undefined), this.#i.fill(undefined), this.#d && this.#F) {
|
|
632
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
633
|
+
for (let t of this.#g ?? [])
|
|
634
|
+
t !== undefined && clearTimeout(t);
|
|
635
|
+
this.#g?.fill(undefined);
|
|
636
|
+
}
|
|
637
|
+
if (this.#_ && this.#_.fill(0), this.#a = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
638
|
+
let t = this.#r, i;
|
|
639
|
+
for (;i = t?.shift(); )
|
|
640
|
+
this.#w?.(...i);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
export { I, init_index_min };
|