watch-tail 0.6.2 → 0.7.1
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/README.md +22 -6
- package/build/client/_app/immutable/assets/0.DKleCc0-.css +2 -0
- package/build/client/_app/immutable/assets/0.DKleCc0-.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DKleCc0-.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{CBRk0OGa.js → 1mB5Ee1Q.js} +1 -1
- package/build/client/_app/immutable/chunks/1mB5Ee1Q.js.br +0 -0
- package/build/client/_app/immutable/chunks/1mB5Ee1Q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DWm-CGbg.js → 3fFVdy92.js} +1 -1
- package/build/client/_app/immutable/chunks/3fFVdy92.js.br +0 -0
- package/build/client/_app/immutable/chunks/3fFVdy92.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{w7c5E2ms.js → 8mpn3Xst.js} +1 -1
- package/build/client/_app/immutable/chunks/8mpn3Xst.js.br +0 -0
- package/build/client/_app/immutable/chunks/8mpn3Xst.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{OoMmWNOu.js → B78Vj1az.js} +1 -1
- package/build/client/_app/immutable/chunks/B78Vj1az.js.br +0 -0
- package/build/client/_app/immutable/chunks/B78Vj1az.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D0IrjYE5.js → B7aS9tS2.js} +1 -1
- package/build/client/_app/immutable/chunks/B7aS9tS2.js.br +0 -0
- package/build/client/_app/immutable/chunks/B7aS9tS2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{8x_7TBuS.js → BF84Orj8.js} +1 -1
- package/build/client/_app/immutable/chunks/BF84Orj8.js.br +0 -0
- package/build/client/_app/immutable/chunks/BF84Orj8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BIdvnjrP.js +1 -0
- package/build/client/_app/immutable/chunks/BIdvnjrP.js.br +1 -0
- package/build/client/_app/immutable/chunks/BIdvnjrP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{UsO0MS14.js → BPoZrXrH.js} +1 -1
- package/build/client/_app/immutable/chunks/BPoZrXrH.js.br +0 -0
- package/build/client/_app/immutable/chunks/BPoZrXrH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D1Hr4tKw.js → BSy__Jrd.js} +1 -1
- package/build/client/_app/immutable/chunks/BSy__Jrd.js.br +0 -0
- package/build/client/_app/immutable/chunks/BSy__Jrd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{KsLFdNDs.js → BdW_yBQU.js} +1 -1
- package/build/client/_app/immutable/chunks/BdW_yBQU.js.br +0 -0
- package/build/client/_app/immutable/chunks/BdW_yBQU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{F4LqKrLs.js → BnRQs9nz.js} +5 -5
- package/build/client/_app/immutable/chunks/BnRQs9nz.js.br +0 -0
- package/build/client/_app/immutable/chunks/BnRQs9nz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{AAWh0-tL.js → C6r7NvtG.js} +1 -1
- package/build/client/_app/immutable/chunks/C6r7NvtG.js.br +0 -0
- package/build/client/_app/immutable/chunks/C6r7NvtG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{KA1QvXmu.js → CEw1go7g.js} +1 -1
- package/build/client/_app/immutable/chunks/CEw1go7g.js.br +0 -0
- package/build/client/_app/immutable/chunks/CEw1go7g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BNDRPiSt.js → CFJEGo4j.js} +1 -1
- package/build/client/_app/immutable/chunks/CFJEGo4j.js.br +0 -0
- package/build/client/_app/immutable/chunks/CFJEGo4j.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CGnVqaBL.js +1 -0
- package/build/client/_app/immutable/chunks/CGnVqaBL.js.br +0 -0
- package/build/client/_app/immutable/chunks/CGnVqaBL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CfPyeeq3.js → CY8zQ4KM.js} +1 -1
- package/build/client/_app/immutable/chunks/CY8zQ4KM.js.br +0 -0
- package/build/client/_app/immutable/chunks/CY8zQ4KM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DYDQbI6D.js → CZ3S843d.js} +1 -1
- package/build/client/_app/immutable/chunks/CZ3S843d.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZ3S843d.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DtV-MjyX.js → CgAZPeK7.js} +1 -1
- package/build/client/_app/immutable/chunks/CgAZPeK7.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgAZPeK7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dc9It0QB.js → CrmB4MvE.js} +1 -1
- package/build/client/_app/immutable/chunks/CrmB4MvE.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrmB4MvE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DznDQzx1.js → CtWwlW0t.js} +1 -1
- package/build/client/_app/immutable/chunks/CtWwlW0t.js.br +0 -0
- package/build/client/_app/immutable/chunks/CtWwlW0t.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CG0TPRkn.js → D-AkVRH7.js} +1 -1
- package/build/client/_app/immutable/chunks/D-AkVRH7.js.br +0 -0
- package/build/client/_app/immutable/chunks/D-AkVRH7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D6rwn6Ed.js → D0CZlpgd.js} +1 -1
- package/build/client/_app/immutable/chunks/D0CZlpgd.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0CZlpgd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CpeJ2iPd.js → D0IZin0e.js} +1 -1
- package/build/client/_app/immutable/chunks/D0IZin0e.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0IZin0e.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DQCjzVyz.js → DI6o1zMC.js} +1 -1
- package/build/client/_app/immutable/chunks/DI6o1zMC.js.br +0 -0
- package/build/client/_app/immutable/chunks/DI6o1zMC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{sf5kQ3yV.js → DbWb9_dK.js} +1 -1
- package/build/client/_app/immutable/chunks/DbWb9_dK.js.br +0 -0
- package/build/client/_app/immutable/chunks/DbWb9_dK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{1cmfrS0o.js → Dh3ZWuG8.js} +1 -1
- package/build/client/_app/immutable/chunks/Dh3ZWuG8.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dh3ZWuG8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CIDBs8t6.js → Dp3OTI-g.js} +1 -1
- package/build/client/_app/immutable/chunks/Dp3OTI-g.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dp3OTI-g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BKpsnTLG.js → DtdjxckD.js} +1 -1
- package/build/client/_app/immutable/chunks/DtdjxckD.js.br +0 -0
- package/build/client/_app/immutable/chunks/DtdjxckD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/YehCS1lO.js +5 -0
- package/build/client/_app/immutable/chunks/YehCS1lO.js.br +0 -0
- package/build/client/_app/immutable/chunks/YehCS1lO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DqJI6J5U.js → g-7YfdwH.js} +1 -1
- package/build/client/_app/immutable/chunks/g-7YfdwH.js.br +0 -0
- package/build/client/_app/immutable/chunks/g-7YfdwH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BWDKMHXq.js → zfc2KyIr.js} +1 -1
- package/build/client/_app/immutable/chunks/zfc2KyIr.js.br +0 -0
- package/build/client/_app/immutable/chunks/zfc2KyIr.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.FQLd-NC-.js → app.C-KKyvGI.js} +2 -2
- package/build/client/_app/immutable/entry/app.C-KKyvGI.js.br +0 -0
- package/build/client/_app/immutable/entry/app.C-KKyvGI.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.obx3dQT_.js +1 -0
- package/build/client/_app/immutable/entry/start.obx3dQT_.js.br +1 -0
- package/build/client/_app/immutable/entry/start.obx3dQT_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.BN3NguWs.js → 0.2dnHMwE1.js} +1 -1
- package/build/client/_app/immutable/nodes/0.2dnHMwE1.js.br +0 -0
- package/build/client/_app/immutable/nodes/{0.BN3NguWs.js.gz → 0.2dnHMwE1.js.gz} +0 -0
- package/build/client/_app/immutable/nodes/{1.5EZfoLCg.js → 1.D5nbnmDb.js} +1 -1
- package/build/client/_app/immutable/nodes/1.D5nbnmDb.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.D5nbnmDb.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DAQ4mvAt.js +5 -0
- package/build/client/_app/immutable/nodes/2.DAQ4mvAt.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DAQ4mvAt.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{EventScatter.js-D3Jaw_Cw.js → EventScatter.js-Du7AJN9m.js} +50 -17
- package/build/server/chunks/chunks/{EventScatter.js-D3Jaw_Cw.js.map → EventScatter.js-Du7AJN9m.js.map} +1 -1
- package/build/server/chunks/chunks/{archive.js-C2D-5edp.js → archive.js-D2jtMmDo.js} +134 -26
- package/build/server/chunks/chunks/archive.js-D2jtMmDo.js.map +1 -0
- package/build/server/chunks/chunks/{aws.js-DkPqAybc.js → env2.js-C5BgBJDY.js} +63 -6
- package/build/server/chunks/chunks/env2.js-C5BgBJDY.js.map +1 -0
- package/build/server/chunks/chunks/identity.js-NmGXxBz3.js +22 -0
- package/build/server/chunks/chunks/identity.js-NmGXxBz3.js.map +1 -0
- package/build/server/chunks/chunks/{internal2.js-627EG4am.js → internal2.js--RCssYze.js} +2 -2
- package/build/server/chunks/chunks/{internal2.js-627EG4am.js.map → internal2.js--RCssYze.js.map} +1 -1
- package/build/server/chunks/chunks/{level-filter.js-B3o2hyWD.js → level-filter.js-D9MNrew3.js} +2 -2
- package/build/server/chunks/chunks/{level-filter.js-B3o2hyWD.js.map → level-filter.js-D9MNrew3.js.map} +1 -1
- package/build/server/chunks/chunks/{log-buffer.js-BI_gQOls.js → log-buffer.js-A9FA-Qv8.js} +18 -3
- package/build/server/chunks/chunks/log-buffer.js-A9FA-Qv8.js.map +1 -0
- package/build/server/chunks/chunks/{regions.js-IQPMyP5C.js → regions.js-COf7DgnH.js} +3 -3
- package/build/server/chunks/chunks/regions.js-COf7DgnH.js.map +1 -0
- package/build/server/chunks/chunks/{series-buckets.js-BjigySff.js → series-buckets.js-BmCYga3F.js} +28 -3
- package/build/server/chunks/chunks/series-buckets.js-BmCYga3F.js.map +1 -0
- package/build/server/chunks/chunks/{state.js-DbqJPX0Y.js → state.js-CI2ef6Vi.js} +2 -2
- package/build/server/chunks/chunks/{state.js-DbqJPX0Y.js.map → state.js-CI2ef6Vi.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/archive/{_server.ts.js-83Ch7djd.js → _server.ts.js-C4hWyXuu.js} +17 -9
- package/build/server/chunks/entries/endpoints/api/archive/_server.ts.js-C4hWyXuu.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-VctnBhIJ.js → _server.ts.js-C5tfrpmC.js} +4 -5
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-C5tfrpmC.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/identity/{_server.ts.js-Dt540Sio.js → _server.ts.js-PWRPScuN.js} +6 -24
- package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-PWRPScuN.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/log-groups/{_server.ts.js-drLgUdvB.js → _server.ts.js-D4y43Vwe.js} +14 -11
- package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D4y43Vwe.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/regions/{_server.ts.js-CBqfN6Pg.js → _server.ts.js-9_g0ojki.js} +8 -9
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-9_g0ojki.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/series/{_server.ts.js-DOvBhEDU.js → _server.ts.js-DibT3Hjc.js} +34 -16
- package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DibT3Hjc.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/stream/{_server.ts.js-B9_-4ssJ.js → _server.ts.js-3ZYI-Za9.js} +15 -12
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-3ZYI-Za9.js.map +1 -0
- package/build/server/chunks/entries/fallbacks/{error.svelte.js-B8dLO9gT.js → error.svelte.js-DP0OULWi.js} +3 -3
- package/build/server/chunks/entries/fallbacks/{error.svelte.js-B8dLO9gT.js.map → error.svelte.js-DP0OULWi.js.map} +1 -1
- package/build/server/chunks/entries/pages/{_layout.svelte.js-CBQpEToy.js → _layout.svelte.js-8U7ZeKYO.js} +3 -3
- package/build/server/chunks/entries/pages/_layout.svelte.js-8U7ZeKYO.js.map +1 -0
- package/build/server/chunks/entries/pages/{_page.svelte.js-BwuzE25P.js → _page.svelte.js-hG1agdw-.js} +82 -33
- package/build/server/chunks/entries/pages/_page.svelte.js-hG1agdw-.js.map +1 -0
- package/build/server/chunks/{handler-hlKcUyVP.js → handler-_dxqeJJj.js} +3 -3
- package/build/server/chunks/{handler-hlKcUyVP.js.map → handler-_dxqeJJj.js.map} +1 -1
- package/build/server/chunks/{index.js-BfPWKsz6.js → index.js-arX1nCCw.js} +2 -2
- package/build/server/chunks/{index.js-BfPWKsz6.js.map → index.js-arX1nCCw.js.map} +1 -1
- package/build/server/chunks/{manifest.js-uuijI5lm.js → manifest.js-D3447-0_.js} +12 -12
- package/build/server/chunks/{manifest.js-uuijI5lm.js.map → manifest.js-D3447-0_.js.map} +1 -1
- package/build/server/chunks/nodes/{0.js-CNFDDPj5.js → 0.js-XM75fTfb.js} +4 -4
- package/build/server/chunks/nodes/{0.js-CNFDDPj5.js.map → 0.js-XM75fTfb.js.map} +1 -1
- package/build/server/chunks/nodes/{1.js-bi9PXX_2.js → 1.js-CRIDfcrR.js} +3 -3
- package/build/server/chunks/nodes/{1.js-bi9PXX_2.js.map → 1.js-CRIDfcrR.js.map} +1 -1
- package/build/server/chunks/nodes/{2.js-3MYCPEqM.js → 2.js-1qmqKlMg.js} +3 -3
- package/build/server/chunks/nodes/{2.js-3MYCPEqM.js.map → 2.js-1qmqKlMg.js.map} +1 -1
- package/dist/cli/options.js +1 -1
- package/dist/lib/cli/aws.js +4 -4
- package/dist/lib/log-buffer.js +1 -1
- package/package.json +5 -5
- package/build/client/_app/immutable/assets/0.Dfts6BC4.css +0 -2
- package/build/client/_app/immutable/assets/0.Dfts6BC4.css.br +0 -0
- package/build/client/_app/immutable/assets/0.Dfts6BC4.css.gz +0 -0
- package/build/client/_app/immutable/chunks/1cmfrS0o.js.br +0 -0
- package/build/client/_app/immutable/chunks/1cmfrS0o.js.gz +0 -0
- package/build/client/_app/immutable/chunks/8x_7TBuS.js.br +0 -0
- package/build/client/_app/immutable/chunks/8x_7TBuS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/AAWh0-tL.js.br +0 -0
- package/build/client/_app/immutable/chunks/AAWh0-tL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BKpsnTLG.js.br +0 -0
- package/build/client/_app/immutable/chunks/BKpsnTLG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNDRPiSt.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNDRPiSt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BWDKMHXq.js.br +0 -0
- package/build/client/_app/immutable/chunks/BWDKMHXq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js +0 -5
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBRk0OGa.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBRk0OGa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CG0TPRkn.js.br +0 -0
- package/build/client/_app/immutable/chunks/CG0TPRkn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CGReuhGk.js +0 -1
- package/build/client/_app/immutable/chunks/CGReuhGk.js.br +0 -1
- package/build/client/_app/immutable/chunks/CGReuhGk.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CIDBs8t6.js.br +0 -0
- package/build/client/_app/immutable/chunks/CIDBs8t6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CfPyeeq3.js.br +0 -0
- package/build/client/_app/immutable/chunks/CfPyeeq3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CpeJ2iPd.js.br +0 -0
- package/build/client/_app/immutable/chunks/CpeJ2iPd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D0IrjYE5.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0IrjYE5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D1Hr4tKw.js.br +0 -0
- package/build/client/_app/immutable/chunks/D1Hr4tKw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D6rwn6Ed.js.br +0 -1
- package/build/client/_app/immutable/chunks/D6rwn6Ed.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQCjzVyz.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQCjzVyz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DWm-CGbg.js.br +0 -0
- package/build/client/_app/immutable/chunks/DWm-CGbg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DYDQbI6D.js.br +0 -0
- package/build/client/_app/immutable/chunks/DYDQbI6D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dc9It0QB.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dc9It0QB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkQY3T0m.js +0 -1
- package/build/client/_app/immutable/chunks/DkQY3T0m.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkQY3T0m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DqJI6J5U.js.br +0 -0
- package/build/client/_app/immutable/chunks/DqJI6J5U.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DtV-MjyX.js.br +0 -0
- package/build/client/_app/immutable/chunks/DtV-MjyX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DznDQzx1.js.br +0 -0
- package/build/client/_app/immutable/chunks/DznDQzx1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/F4LqKrLs.js.br +0 -0
- package/build/client/_app/immutable/chunks/F4LqKrLs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/KA1QvXmu.js.br +0 -0
- package/build/client/_app/immutable/chunks/KA1QvXmu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/KsLFdNDs.js.br +0 -0
- package/build/client/_app/immutable/chunks/KsLFdNDs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/OoMmWNOu.js.br +0 -0
- package/build/client/_app/immutable/chunks/OoMmWNOu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/UsO0MS14.js.br +0 -0
- package/build/client/_app/immutable/chunks/UsO0MS14.js.gz +0 -0
- package/build/client/_app/immutable/chunks/sf5kQ3yV.js.br +0 -0
- package/build/client/_app/immutable/chunks/sf5kQ3yV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/w7c5E2ms.js.br +0 -0
- package/build/client/_app/immutable/chunks/w7c5E2ms.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.FQLd-NC-.js.br +0 -0
- package/build/client/_app/immutable/entry/app.FQLd-NC-.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DqW_lChD.js +0 -1
- package/build/client/_app/immutable/entry/start.DqW_lChD.js.br +0 -1
- package/build/client/_app/immutable/entry/start.DqW_lChD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.BN3NguWs.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.5EZfoLCg.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.5EZfoLCg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CbcDv2oO.js +0 -4
- package/build/client/_app/immutable/nodes/2.CbcDv2oO.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CbcDv2oO.js.gz +0 -0
- package/build/server/chunks/chunks/archive.js-C2D-5edp.js.map +0 -1
- package/build/server/chunks/chunks/aws.js-DkPqAybc.js.map +0 -1
- package/build/server/chunks/chunks/env2.js-CcIskxOZ.js +0 -60
- package/build/server/chunks/chunks/env2.js-CcIskxOZ.js.map +0 -1
- package/build/server/chunks/chunks/log-buffer.js-BI_gQOls.js.map +0 -1
- package/build/server/chunks/chunks/regions.js-IQPMyP5C.js.map +0 -1
- package/build/server/chunks/chunks/series-buckets.js-BjigySff.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/archive/_server.ts.js-83Ch7djd.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-VctnBhIJ.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-Dt540Sio.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-drLgUdvB.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-CBqfN6Pg.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DOvBhEDU.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-B9_-4ssJ.js.map +0 -1
- package/build/server/chunks/entries/pages/_layout.svelte.js-CBQpEToy.js.map +0 -1
- package/build/server/chunks/entries/pages/_page.svelte.js-BwuzE25P.js.map +0 -1
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t}from"../chunks/DkQY3T0m.js";export{e as load_css,t as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
�(�import{a as e,n as t}from"../chunks/DkQY3T0m.js";export{e as load_css,t as start};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/F4LqKrLs.js","../chunks/pqiPC7Y8.js","../chunks/HclGiUj8.js","../chunks/xihTtKlq.js","../chunks/BjxZ_neZ.js","../chunks/CIDBs8t6.js","../chunks/DkQY3T0m.js","../chunks/DWm-CGbg.js","../chunks/sf5kQ3yV.js","../chunks/CpeJ2iPd.js","../chunks/w7c5E2ms.js","../chunks/Db0q5_zr.js","../chunks/CCch3uox.js","../chunks/8x_7TBuS.js","../chunks/DQCjzVyz.js","../chunks/DtV-MjyX.js","../chunks/KA1QvXmu.js","../chunks/Dc9It0QB.js","../chunks/BNDRPiSt.js","../chunks/C58PZtCD.js","../assets/Path.B0wDzTrn.css","../chunks/BR2LaRms.js","../chunks/RobXhXPM.js","../chunks/1cmfrS0o.js","../chunks/CBRk0OGa.js","../chunks/OoMmWNOu.js","../assets/Circle.C5MKzgk2.css","../chunks/Dfvzj6n2.js","../assets/EventScatter.DA5sZ1c0.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{At as e,B as t,Et as n,G as r,I as i,J as a,K as o,M as s,N as c,P as l,R as u,Tt as d,U as f,W as p,_ as m,b as h,bt as g,ct as _,ft as v,g as y,h as b,ht as x,i as S,j as C,k as w,l as T,lt as E,m as D,mt as O,n as k,nt as A,ot as j,p as M,rt as N,s as P,st as F,ut as I,v as L,x as R,y as z,yt as ee,z as B}from"../chunks/pqiPC7Y8.js";import{t as V}from"../chunks/DkQY3T0m.js";import{t as H}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";import{t as U}from"../chunks/D6rwn6Ed.js";import{_ as te,a as ne,c as W,d as G,f as K,g as re,h as ie,i as ae,l as oe,m as se,n as ce,o as le,p as q,r as ue,t as de,u as fe}from"../chunks/BjxZ_neZ.js";var pe=`--:--:--.---`;function me(e,t=2){return String(Math.trunc(Math.abs(e))).padStart(t,`0`)}function he(e){if(typeof e!=`number`||!Number.isFinite(e))return pe;let t=new Date(e);return Number.isNaN(t.getTime())?pe:`${`${me(t.getUTCHours())}:${me(t.getUTCMinutes())}:${me(t.getUTCSeconds())}`}.${me(t.getUTCMilliseconds(),3)}`}function ge(e){if(typeof e!=`number`||!Number.isFinite(e))return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toISOString()}function _e(e){let t=e>=100?e.toFixed(0):e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function ve(e){if(typeof e!=`number`||!Number.isFinite(e)||e<0)return`—`;let t=Math.round(e);if(t<1e3)return`${t}ms`;let n=t/1e3;if(n<60)return`${_e(n)}s`;let r=Math.floor(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0?`${i}m`:`${i}m ${a}s`;let o=Math.floor(i/60),s=i%60;return s===0?`${o}h`:`${o}h ${s}m`}function ye(e){if(typeof e!=`number`||!Number.isFinite(e)||e<0)return`—`;if(e<1024)return`${Math.trunc(e)} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=t[0];for(let e=1;e<t.length&&n>=1024;e+=1)n/=1024,r=t[e];return`${_e(n)} ${r}`}function J(e){if(typeof e!=`number`||!Number.isFinite(e))return`0`;let t=Math.trunc(e);return(t<0?`-`:``)+String(Math.abs(t)).replace(/\B(?=(\d{3})+(?!\d))/g,`,`)}function be(e){let t=typeof e==`string`?e.trim():``;if(t===``)return null;let n=t.toLowerCase();return n.includes(`floci`)?`floci`:n.includes(`localstack`)?`localstack`:xe(t)===`4566`?`floci`:`local emulator`}function xe(e){return Se(e)?.port||null}function Se(e){try{return new URL(e)}catch{return null}}function Ce(e){let t=typeof e==`string`?e.trim():``;if(t===``)return null;let n=be(t);return n===null?null:(Se(t)?.hostname.toLowerCase()??t.toLowerCase()).startsWith(n)?t:`${n} ${t}`}var we=t(`<span data-testid="credentials-hint" class="text-[0.6875rem] text-neutral-500">dev creds</span>`),Te=t(`<span class="inline-flex items-center gap-1.5"><span data-testid="endpoint-badge" class="rounded-full border border-violet-900 bg-violet-950/60 px-2.5 py-1 text-xs font-medium text-violet-300"> </span> <!></span>`);function Y(e,t){g(t,!0);let r=S(t,`endpoint`,3,null),o=S(t,`credentials`,3,null),s=x(()=>Ce(r())),c=x(()=>o()===`emulator-default`),d=x(()=>a(c)?`Local emulator endpoint - using floci's throwaway credentials (no ambient AWS credentials found)`:`Local emulator endpoint`);var f=B(),p=F(f),m=e=>{var t=Te(),r=j(t),o=_(r,!0),f=E(r,2),p=e=>{var t=we();u(e,t)};l(f,e=>{a(c)&&e(p)}),n(t),A(()=>{D(t,`title`,a(d)),D(r,`title`,a(d)),i(o,a(s))}),u(e,t)};l(p,e=>{a(s)!==null&&e(m)}),u(e,f),ee()}var X={sidebarWidth:`watch-stream:sidebar-width`,prefixWidth:`watch-stream:prefix-width`,wrap:`watch-stream:wrap`,jsonView:`watch-stream:json-view`,chartOpen:`watch-stream:chart-open`,groupRequests:`watch-stream:group-requests`},Z={defaultRem:22,minRem:16,maxVw:44},Ee={defaultRem:14,minRem:4,maxRem:40};function De(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return Number.isNaN(e)?r:Math.min(Math.max(e,r),i)}function Oe(e,t,n,r){if(typeof e!=`string`||e.trim()===``)return De(t,n,r);let i=Number(e);return De(Number.isFinite(i)?i:t,n,r)}function ke(e){let{startWidth:t,startX:n,currentX:r,min:i,max:a}=e;return De(t+(r-n),i,a)}function Ae(e){let{width:t,key:n,step:r=16,min:i,max:a}=e;return De(n!==`ArrowLeft`&&n!==`ArrowRight`?t:t+(n===`ArrowLeft`?-r:r),i,a)}function je(e,t=16){let n=e/t;return`${Number.isInteger(n)?n:Number(n.toFixed(3))}rem`}function Q(e,t=16){return e*t}var Me=t(`<span class="text-neutral-500" data-testid="scatter-groups"> </span>`),Ne=t(`<span class="flex items-center gap-1 text-neutral-400"><span class="inline-block h-2 w-2 rounded-full"></span> <span class="text-neutral-500"> </span></span>`),$=t(`<span class="text-amber-300" data-testid="scatter-loading">counting…</span>`),Pe=t(`<span class="ml-auto text-sky-300" data-testid="scatter-brush-preview"> </span>`),Fe=t(`<span class="ml-auto text-neutral-500" data-testid="scatter-hint">drag to zoom · click to clear</span>`),Ie=t(`<p class="px-1 py-4 text-xs text-amber-300" data-testid="scatter-error">The chart could not be loaded. The log view is unaffected.</p>`),Le=t(`<div class="w-full animate-pulse rounded bg-neutral-900/60"></div>`),Re=t(`<p class="px-1 py-6 text-xs text-neutral-500" data-testid="scatter-empty">No events in this window yet.</p>`),ze=t(`<section class="flex min-w-0 flex-col gap-1 rounded-lg border border-neutral-800 bg-neutral-950/60 p-2" data-testid="event-scatter" aria-label="Events over time"><div class="flex flex-wrap items-center gap-x-3 gap-y-1 px-1 text-[0.6875rem]"><button type="button" data-testid="scatter-toggle" class="flex items-center gap-1 rounded-md border border-neutral-800 bg-neutral-900 px-2 py-0.5 font-semibold uppercase tracking-wider text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-200"><span aria-hidden="true"> </span> Events over time</button> <span class="text-neutral-400" data-testid="scatter-summary"> </span> <!> <!> <!> <!></div> <!></section>`);function Be(e,t){g(t,!0);let o=()=>H(()=>import(`../chunks/F4LqKrLs.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url),s=S(t,`points`,19,()=>[]),f=S(t,`from`,3,0),p=S(t,`to`,3,0);S(t,`bucketMs`,3,0);let m=S(t,`groups`,19,()=>[]),h=S(t,`loading`,3,!1),y=S(t,`byRequest`,3,!0),b=S(t,`height`,3,200),T=S(t,`open`,3,!0),k=S(t,`loadChart`,3,o),M=O(null),P=x(()=>a(M)??T()),I=O(null),L=O(!1),R=O(null),V=O(0);N(()=>{if(typeof localStorage>`u`)return;let e=localStorage.getItem(X.chartOpen);e===`0`&&v(M,!1),e===`1`&&v(M,!0)}),N(()=>{if(!a(P)||a(I)!==null||a(L))return;let e=!1;return k()().then(t=>{e||v(I,t.default,!0)}).catch(()=>{e||v(L,!0)}),()=>{e=!0}});function U(){v(M,!a(P));try{localStorage?.setItem(X.chartOpen,a(P)?`1`:`0`)}catch{}}function te(e){return new Date(e).toISOString().slice(11,19)}let ne=x(()=>ae(s())),W=x(()=>a(ne).reduce((e,t)=>e+t.events,0)),G=x(()=>new Set(s().map(e=>e.t)).size),K=x(()=>s().length>0),re=x(()=>y()?`requests`:`events`);function ie(){v(V,a(V)+1),t.onBrush?.(null)}var oe={reset:ie},se=ze(),le=j(se),q=j(le),ue=j(q),de=_(ue,!0);d(),n(q);var fe=E(q,2),pe=_(fe),me=E(fe,2),he=e=>{var t=Me(),n=_(t);A(()=>i(n,`across ${m().length??``} groups`)),u(e,t)};l(me,e=>{m().length>1&&e(he)});var ge=E(me,2);C(ge,17,()=>a(ne),e=>e.level,(e,t)=>{var r=Ne(),o=j(r),s=E(o),c=E(s),l=_(c,!0);n(r),A(e=>{D(r,`data-testid`,`scatter-legend-${a(t).level??``}`),z(o,`background-color: ${ce[a(t).level]??``}`),i(s,` ${a(t).label??``} `),i(l,e)},[()=>J(a(t).events)]),u(e,r)});var _e=E(ge,2),ve=e=>{var t=$();u(e,t)};l(_e,e=>{h()&&a(P)&&e(ve)});var ye=E(_e,2),be=e=>{var t=B(),n=F(t),r=e=>{var t=Pe(),n=_(t);A((e,t)=>i(n,`release to zoom to ${e??``} – ${t??``}`),[()=>te(a(R).from),()=>te(a(R).to)]),u(e,t)},o=e=>{var t=Fe();u(e,t)};l(n,e=>{a(R)===null?e(o,-1):e(r)}),u(e,t)};l(ye,e=>{a(P)&&e(be)}),n(le);var xe=E(le,2),Se=e=>{var n=B(),r=F(n),i=e=>{var t=Ie();u(e,t)},o=e=>{var n=B(),r=F(n),i=e=>{var n=B(),r=F(n);c(r,()=>a(V),e=>{var n=B(),r=F(n);w(r,()=>a(I),(e,n)=>{n(e,{get points(){return s()},get from(){return f()},get to(){return p()},get height(){return b()},onBrush:e=>{v(R,null),t.onBrush?.(e)},onBrushPreview:e=>v(R,e,!0)})}),u(e,n)}),u(e,n)},o=e=>{var t=Le();A(()=>z(t,`height: ${b()??``}px`)),u(e,t)};l(r,e=>{a(I)===null?e(o,-1):e(i)}),u(e,n)},d=e=>{var t=Re();u(e,t)};l(r,e=>{a(L)?e(i):a(K)?e(o,1):h()||e(d,2)}),u(e,n)};return l(xe,e=>{a(P)&&e(Se)}),n(se),A((e,t)=>{D(q,`aria-expanded`,a(P)),D(q,`title`,a(P)?`Hide the chart`:`Show the chart`),i(de,a(P)?`▾`:`▸`),i(pe,`${e??``}
|
|
3
|
-
${a(re)??``} in ${t??``} buckets`)},[()=>J(a(W)),()=>J(a(G))]),r(`click`,q,U),u(e,se),ee(oe)}p([`click`]);var Ve=t(`<div role="separator" aria-orientation="vertical" tabindex="0"></div>`);function He(e,t){g(t,!0);let n=S(t,`class`,3,``),i=S(t,`style`,3,``),a=null;function s(e){a={x:e.clientX,width:t.width},e.currentTarget.setPointerCapture?.(e.pointerId),e.preventDefault()}function c(e){a!==null&&(t.onChange(ke({startWidth:a.width,startX:a.x,currentX:e.clientX,min:t.min,max:t.max})),e.preventDefault())}function l(e){a!==null&&(a=null,e.currentTarget.releasePointerCapture?.(e.pointerId),t.onCommit?.(t.width))}function d(e){let n=Ae({width:t.width,key:e.key,min:t.min,max:t.max});n!==t.width&&(e.preventDefault(),t.onChange(n),t.onCommit?.(n))}var f=Ve();A(e=>{D(f,`aria-label`,t.label),D(f,`aria-valuemin`,t.min),D(f,`aria-valuemax`,t.max),D(f,`aria-valuenow`,e),D(f,`title`,`${t.label??``} (drag or use the arrow keys)`),D(f,`data-testid`,t.testId),h(f,1,`cursor-col-resize touch-none bg-transparent hover:bg-sky-500/30 focus:bg-sky-500/50 focus:outline-none ${n()??``}`),z(f,i())},[()=>Math.round(t.width)]),r(`pointerdown`,f,s),r(`pointermove`,f,c),r(`pointerup`,f,l),o(`pointercancel`,f,l),r(`keydown`,f,d),u(e,f),ee()}p([`pointerdown`,`pointermove`,`pointerup`,`keydown`]);var Ue=[`15m`,`1h`,`3h`,`12h`,`24h`,`5d`],We={"15m":`15 min`,"1h":`1 hour`,"3h":`3 hours`,"12h":`12 hours`,"24h":`24 hours`,"5d":`5 days`};function Ge(e){return Ue.includes(e)}function Ke(e){return Ge(e)?We[e]:e}function qe(e){return String(e).padStart(2,`0`)}function Je(e){let t=new Date(e);return`${t.getFullYear()}-${qe(t.getMonth()+1)}-${qe(t.getDate())}T${qe(t.getHours())}:${qe(t.getMinutes())}`}function Ye(e){if(typeof e!=`string`||e.trim()===``)return null;let t=Date.parse(e);return Number.isNaN(t)?null:t}function Xe(e,t){let n=new Date(e),r=`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}`;return new Date(t).toDateString()===n.toDateString()?r:`${n.toLocaleDateString(void 0,{day:`numeric`,month:`short`})} ${r}`}function Ze(e,t){if(e===null||e.startTime===void 0)return{mode:`live`,label:`live`,title:`Tailing new events`,clamped:!1};let n=e.clamped===!0;if(e.mode!==`historic`||e.endTime===null||e.endTime===void 0)return{mode:`live`,label:`live`,title:`Live since ${Xe(e.startTime,t)}`,clamped:n};let r=Xe(e.startTime,t),i=Xe(e.endTime,t),a=e.preset===null||e.preset===void 0?null:Ke(e.preset);return{mode:`historic`,label:a===null?`${r} → ${i}`:`${a} · ${r} → ${i}`,title:n?`Historic window, clamped to the last 14 days that CloudWatch Logs keeps`:`Historic window`,clamped:n}}var Qe=t(`<button type="button"> </button>`),$e=t(`<div class="flex flex-wrap items-center gap-1" role="group" aria-label="Historic range"><!> <button type="button" data-testid="preset-custom"> </button></div>`),et=t(`<span class="text-xs text-amber-300" data-testid="range-loading">loading window…</span>`),tt=t(`<span class="text-xs text-neutral-500"> </span>`),nt=t(`<span class="text-xs text-red-300" role="alert" data-testid="custom-error"> </span>`),rt=t(`<div class="flex flex-wrap items-center gap-2 rounded-lg border border-neutral-800 bg-neutral-900/70 p-2" data-testid="custom-window"><label class="flex items-center gap-1 text-xs text-neutral-400">From <input type="datetime-local" data-testid="custom-from" class="rounded-md border border-neutral-800 bg-neutral-950 px-2 py-1 text-xs text-neutral-100"/></label> <label class="flex items-center gap-1 text-xs text-neutral-400">To <input type="datetime-local" data-testid="custom-to" class="rounded-md border border-neutral-800 bg-neutral-950 px-2 py-1 text-xs text-neutral-100"/></label> <button type="button" data-testid="custom-apply" class="rounded-md border border-sky-800 bg-sky-950/60 px-2 py-1 text-xs font-medium text-sky-200 hover:border-sky-600">Apply</button> <!></div>`),it=t(`<div class="flex flex-wrap items-center gap-2" data-testid="range-controls"><div class="flex items-center gap-1 rounded-lg border border-neutral-800 bg-neutral-900 p-0.5" role="group" aria-label="Tail mode"><button type="button" data-testid="mode-live">Live</button> <button type="button" data-testid="mode-historic">Historic</button></div> <!> <!> <!></div>`);function at(e,t){g(t,!0);let o=S(t,`mode`,3,`live`),s=S(t,`range`,3,`15m`),c=S(t,`from`,3,null),d=S(t,`to`,3,null),f=S(t,`disabled`,3,!1),p=S(t,`loading`,3,!1),m=S(t,`liveDisabled`,3,!1),y=O(!1),b=O(``),w=O(``),k=O(null);N(()=>{let e=c()??(d()??Date.now())-36e5,t=d()??Date.now();v(b,Je(e),!0),v(w,Je(t),!0),v(y,o()===`historic`&&s()===``&&c()!==null&&d()!==null,!0)});function P(e){e!==o()&&(e===`live`&&m()||t.onApply?.({mode:e,range:e===`live`?``:s()===``?`15m`:s(),from:null,to:null}))}function F(e){v(k,null),t.onApply?.({mode:`historic`,range:e,from:null,to:null})}function I(){v(k,null),v(y,!0)}function L(){let e=Ye(a(b)),n=Ye(a(w));if(e===null||n===null){v(k,`Pick both a start and an end time.`);return}if(n<=e){v(k,`The end must be after the start.`);return}if(n-e>12096e5){v(k,`CloudWatch Logs only keeps 14 days.`);return}v(k,null),t.onApply?.({mode:`historic`,range:``,from:e,to:n})}let R=x(()=>o()===`historic`&&s()===``&&c()!==null&&d()!==null?`${Je(c()).replace(`T`,` `)} → ${Je(d()).replace(`T`,` `)}`:`Custom…`);var z=it(),B=j(z),V=j(B),H=E(V,2);n(B);var U=E(B,2),te=e=>{var t=$e(),o=j(t);C(o,16,()=>Ue,e=>e,(e,t)=>{var n=Qe(),a=_(n,!0);A(()=>{D(n,`aria-pressed`,s()===t),D(n,`data-testid`,`preset-${t??``}`),n.disabled=f(),h(n,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${s()===t?`border-amber-700 bg-amber-950/50 text-amber-200`:`border-neutral-800 bg-neutral-900 text-neutral-300 hover:border-neutral-700`} disabled:opacity-40`),i(a,We[t])}),r(`click`,n,()=>F(t)),u(e,n)});var c=E(o,2),l=_(c,!0);n(t),A(()=>{D(c,`aria-pressed`,s()===``),c.disabled=f(),h(c,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${s()===``?`border-amber-700 bg-amber-950/50 text-amber-200`:`border-neutral-800 bg-neutral-900 text-neutral-300 hover:border-neutral-700`}`),i(l,a(R))}),r(`click`,c,I),u(e,t)};l(U,e=>{o()===`historic`&&e(te)});var ne=E(U,2),W=e=>{var t=et();u(e,t)},G=e=>{var t=tt(),n=_(t);A(e=>i(n,`last ${e??``}`),[()=>Ke(s())]),u(e,t)};l(ne,e=>{p()?e(W):o()===`historic`&&s()!==``&&e(G,1)});var K=E(ne,2),re=e=>{var t=rt(),o=j(t),s=E(j(o));M(s),n(o);var c=E(o,2),d=E(j(c));M(d),n(c);var f=E(c,2),p=E(f,2),m=e=>{var t=nt(),n=_(t,!0);A(()=>i(n,a(k))),u(e,t)};l(p,e=>{a(k)!==null&&e(m)}),n(t),T(s,()=>a(b),e=>v(b,e)),T(d,()=>a(w),e=>v(w,e)),r(`click`,f,L),u(e,t)};l(K,e=>{a(y)&&o()===`historic`&&e(re)}),n(z),A(()=>{D(V,`aria-pressed`,o()===`live`),V.disabled=m(),D(V,`title`,m()?`There is nothing to tail: the local archive holds historic windows`:void 0),h(V,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`live`?`border-sky-700 bg-sky-950/60 text-sky-300`:`border-transparent text-neutral-400 hover:text-neutral-200`} disabled:opacity-40`),D(H,`aria-pressed`,o()===`historic`),h(H,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`historic`?`border-amber-700 bg-amber-950/50 text-amber-300`:`border-transparent text-neutral-400 hover:text-neutral-200`}`)}),r(`click`,V,()=>P(`live`)),r(`click`,H,()=>P(`historic`)),u(e,z),ee()}p([`click`]);var ot=`us-east-1.us-east-2.us-west-1.us-west-2.ca-central-1.ca-west-1.mx-central-1.sa-east-1.eu-west-1.eu-west-2.eu-west-3.eu-central-1.eu-central-2.eu-north-1.eu-south-1.eu-south-2.af-south-1.me-south-1.me-central-1.il-central-1.ap-east-1.ap-south-1.ap-south-2.ap-southeast-1.ap-southeast-2.ap-southeast-3.ap-southeast-4.ap-southeast-5.ap-southeast-6.ap-southeast-7.ap-northeast-1.ap-northeast-2.ap-northeast-3`.split(`.`),st=class extends Error{status;code;details;constructor(e,t={}){super(e,{cause:t.cause}),this.name=`ApiError`,this.status=t.status??0,this.code=t.code,this.details=t.details}};function ct(e,t){if(typeof e!=`object`||!e)return;let n=e[t];return typeof n==`string`?n:void 0}function lt(e,t=`Unexpected API error`){return ct(e,`error`)??t}function ut(e){let t=new URLSearchParams;e.region&&t.set(`region`,e.region),e.source&&t.set(`source`,e.source),e.prefix&&t.set(`prefix`,e.prefix),typeof e.limit==`number`&&Number.isFinite(e.limit)&&t.set(`limit`,String(e.limit));let n=t.toString();return n===``?`/api/log-groups`:`/api/log-groups?${n}`}function dt(e){let t=new URLSearchParams;e.region&&t.set(`region`,e.region),t.set(`source`,`archive`);let n=(e.groups??[]).filter(e=>e.length>0);n.length>0&&t.set(`groups`,n.join(`,`)),typeof e.from==`number`&&Number.isFinite(e.from)&&t.set(`from`,String(Math.round(e.from))),typeof e.to==`number`&&Number.isFinite(e.to)&&t.set(`to`,String(Math.round(e.to)));let r=(e.levels??[]).filter(e=>e.length>0);return r.length>0&&t.set(`level`,r.join(`,`)),(e.by===`request`||e.by===`event`)&&t.set(`by`,e.by),typeof e.bucketMs==`number`&&Number.isFinite(e.bucketMs)&&e.bucketMs>0&&t.set(`bucket`,String(Math.round(e.bucketMs))),`/api/series?${t.toString()}`}function ft(e){return mt(dt(e),e)}function pt(e){return e instanceof Error&&e.name===`AbortError`}async function mt(e,t){let n=t.fetchImpl??fetch,r;try{r=await n(e,{headers:{accept:`application/json`},signal:t.signal})}catch(t){throw pt(t)?t:new st(`Could not reach ${e}.`,{cause:t})}let i=await r.text(),a=null;if(i.trim()!==``)try{a=JSON.parse(i)}catch{a=null}if(!r.ok)throw new st(lt(a,`Request to ${e} failed with ${r.status}.`),{status:r.status,code:ct(a,`code`),details:ct(a,`details`)});return a}function ht(e={}){return mt(`/api/regions`,e)}function gt(e={}){return mt(`/api/health`,e)}function _t(e){return mt(ut(e),e)}function vt(e={}){return mt(`/api/archive`,e)}function yt(e){return`No log groups found in ${e}. Start floci and run \`pnpm seed\` to create sample groups.`}var bt=`Locally archived events - read from the local DuckDB file, no CloudWatch credentials, historic windows only.`;function xt(e){let t=typeof e==`string`?e.trim():``,n=`Locally archived events instead of live CloudWatch data`;return t===``?n:`${n} (${t})`}function St(e){return`Nothing archived for ${e===``?`this region`:e} yet - stream a group from CloudWatch once and it will appear here.`}function Ct(e){return e.trim().replace(/\.+$/,``)}function wt(e,t){if(t instanceof st){let n=t.details?` ${t.details}`:``;return`Could not list log groups in ${e}: ${Ct(t.message)}.${n}`}return`Could not reach the watch-stream API for ${e}. ${t instanceof Error&&t.message!==``?t.message:String(t)}`}function Tt(e,t,n){return`${n} (${t===null||t===``?e:`${t} in ${e}`})`}var Et=t(`<span class="text-xs font-medium text-sky-400" data-testid="selected-count"> </span>`),Dt=t(`<span class="rounded-full border border-teal-900 bg-teal-950/50 px-1.5 py-0.5 text-[0.625rem] font-medium text-teal-300" data-testid="group-source-badge">local</span>`),Ot=t(`<p role="alert" data-testid="group-error" class="rounded-md border border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),kt=t(`<div class="h-5 animate-pulse rounded bg-neutral-800/80"></div>`),At=t(`<div class="flex flex-col gap-2" data-testid="group-loading" aria-busy="true"><!> <p class="text-xs text-neutral-500">Loading log groups…</p></div>`),jt=t(`<p data-testid="group-empty" class="rounded-md border border-neutral-800 bg-neutral-900/60 px-3 py-2 text-xs leading-5 text-neutral-400"> </p>`),Mt=t(`<p data-testid="group-no-match" class="px-1 py-2 text-xs text-neutral-500"> </p>`),Nt=t(`<span data-testid="group-archived-count" class="rounded-full border border-teal-900 bg-teal-950/50 px-1.5 py-0.5 text-[0.625rem] font-medium text-teal-300"> </span>`),Pt=t(`<span class="hidden text-[0.6875rem] text-neutral-500 xl:inline" data-testid="group-archived-span"> </span>`),Ft=t(`<span class="flex shrink-0 items-center gap-1.5"><!> <!></span>`),It=t(`<span class="shrink-0 text-[0.6875rem] text-neutral-500"> </span>`),Lt=t(`<li class="flex items-center gap-1.5"><input type="checkbox" class="size-3.5 shrink-0 cursor-pointer accent-sky-500"/> <button type="button" data-testid="group-row"><span class="truncate font-mono"> </span> <!></button></li>`),Rt=t(`<p class="text-[0.6875rem] text-neutral-500" data-testid="group-truncated"> </p>`),zt=t(`<ul class="flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto pr-1"></ul> <!>`,1),Bt=t(`<section class="flex min-h-0 flex-1 flex-col gap-3"><div class="flex items-center justify-between gap-2"><div class="flex items-baseline gap-2"><h2 class="text-sm font-semibold text-neutral-200"> </h2> <span class="text-xs text-neutral-500" data-testid="group-count"> </span> <!> <!></div> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100 disabled:cursor-not-allowed disabled:opacity-50"> </button></div> <div class="flex flex-col gap-1.5"><label class="sr-only" for="group-search">Search log groups</label> <input id="group-search" type="search" placeholder="Search log groups" class="w-full rounded-md border border-neutral-800 bg-neutral-900 px-2.5 py-1.5 text-sm text-neutral-100 outline-none transition-colors placeholder:text-neutral-600 hover:border-neutral-700 focus:border-sky-600"/></div> <!></section>`);function Vt(e,t){g(t,!0);let o=S(t,`groups`,19,()=>[]),c=S(t,`source`,3,`cloudwatch`),f=S(t,`region`,3,``),p=S(t,`selected`,19,()=>[]),m=S(t,`loading`,3,!1),w=S(t,`error`,3,null),T=S(t,`maxRows`,3,500),k=O(``),N=x(()=>c()===`archive`);function P(e){return e.archivedEvents===void 0?null:`${J(e.archivedEvents)} archived`}function I(e){return e.archivedOldest===void 0||e.archivedNewest===void 0?null:`${ge(e.archivedOldest)} \u2192 ${ge(e.archivedNewest)}`}let L=x(()=>o().filter(e=>e.name.toLowerCase().includes(a(k).trim().toLowerCase()))),R=x(()=>a(L).slice(0,T())),z=x(()=>a(L).length>a(R).length),B=x(()=>a(k).trim());function V(e){return e==null?[]:Array.isArray(e)?e:[e]}let H=x(()=>V(p()));function U(e){return a(H).includes(e)}function te(e){return U(e)?`border-sky-800 bg-sky-950/50 text-sky-200`:`border-transparent bg-neutral-900/60 text-neutral-300 hover:border-neutral-800 hover:text-neutral-100`}var ne=Bt(),W=j(ne),G=j(W),K=j(G),re=_(K,!0),ie=E(K,2),ae=_(ie),oe=E(ie,2),se=e=>{var t=Et(),n=_(t);A(e=>i(n,`${e??``} selected`),[()=>J(a(H).length)]),u(e,t)};l(oe,e=>{a(H).length>1&&e(se)});var ce=E(oe,2),le=e=>{var t=Dt();u(e,t)};l(ce,e=>{a(N)&&e(le)}),n(G);var q=E(G,2),ue=_(q,!0);n(W);var de=E(W,2),fe=E(j(de),2);M(fe),n(de);var pe=E(de,2),me=e=>{var t=Ot(),n=_(t,!0);A(()=>i(n,w())),u(e,t)},he=e=>{var t=At(),r=j(t);C(r,16,()=>Array.from({length:5}),s,(e,t)=>{var n=kt();u(e,n)}),d(2),n(t),u(e,t)},_e=e=>{var t=jt(),n=_(t,!0);A(e=>i(n,e),[()=>a(N)?St(f()):yt(f())]),u(e,t)},ve=e=>{var t=Mt(),n=_(t);A(()=>i(n,`No log groups match “${a(B)??``}”.`)),u(e,t)},be=e=>{var o=zt(),s=F(o);C(s,21,()=>a(R),e=>e.arn??e.name,(e,o)=>{var s=Lt(),c=j(s);M(c);var d=E(c,2),f=j(d),p=_(f,!0),m=E(f,2),g=e=>{var t=Ft(),r=j(t),s=e=>{var t=Nt(),n=_(t,!0);A((e,r)=>{D(t,`title`,e),i(n,r)},[()=>I(a(o))??`Events held in the local DuckDB archive`,()=>P(a(o))]),u(e,t)},c=x(()=>P(a(o))!==null);l(r,e=>{a(c)&&e(s)});var d=E(r,2),f=e=>{var t=Pt(),n=_(t,!0);A(e=>i(n,e),[()=>I(a(o))]),u(e,t)},p=x(()=>I(a(o))!==null);l(d,e=>{a(p)&&e(f)}),n(t),u(e,t)},v=e=>{var t=It(),n=_(t,!0);A(e=>i(n,e),[()=>ye(a(o).storedBytes)]),u(e,t)};l(m,e=>{a(N)?e(g):a(o).storedBytes!==void 0&&e(v,1)}),n(d),n(s),A((e,t,n)=>{D(c,`data-testid`,`group-check-${a(o).name??``}`),D(c,`aria-label`,`Include ${a(o).name} in the selection`),b(c,e),D(d,`aria-current`,t),h(d,1,`flex min-w-0 flex-1 items-center justify-between gap-2 rounded-md border px-2.5 py-1.5 text-left text-xs transition-colors ${n??``}`),i(p,a(o).name)},[()=>U(a(o).name),()=>U(a(o).name)?`true`:void 0,()=>te(a(o).name)]),r(`change`,c,()=>t.onToggle?.(a(o).name)),r(`click`,d,()=>t.onSelect?.(a(o).name)),u(e,s)}),n(s);var c=E(s,2),d=e=>{var t=Rt(),n=_(t);A((e,t)=>i(n,`Showing first ${e??``} of ${t??``} groups.`),[()=>J(T()),()=>J(a(L).length)]),u(e,t)};l(c,e=>{a(z)&&e(d)}),u(e,o)};l(pe,e=>{w()!==null&&w()!==``?e(me):m()&&o().length===0?e(he,1):o().length===0?e(_e,2):a(R).length===0?e(ve,3):e(be,-1)}),n(ne),A((e,t)=>{i(re,a(N)?`Archived groups`:`Log groups`),i(ae,`${e??``} of ${t??``}`),q.disabled=m(),i(ue,m()?`Refreshing…`:`Refresh`),y(fe,a(k))},[()=>J(a(L).length),()=>J(o().length)]),r(`click`,q,()=>t.onRefresh?.()),r(`input`,fe,e=>v(k,e.currentTarget.value,!0)),u(e,ne),ee()}p([`click`,`input`,`change`]);var Ht=t(`<span data-testid="status-badge"><span aria-hidden="true"></span> </span>`);function Ut(e,t){let r={idle:`idle`,connecting:`connecting`,live:`live`,reconnecting:`reconnecting`,error:`error`,ended:`ended`},o={idle:`border-neutral-700 bg-neutral-800/60 text-neutral-400`,connecting:`border-sky-900 bg-sky-950/70 text-sky-300`,live:`border-emerald-900 bg-emerald-950/70 text-emerald-300`,reconnecting:`border-amber-900 bg-amber-950/70 text-amber-300`,error:`border-red-900 bg-red-950/70 text-red-300`,ended:`border-neutral-700 bg-neutral-800/60 text-neutral-400`},s={idle:`bg-neutral-500`,connecting:`bg-sky-400 animate-pulse`,live:`bg-emerald-400`,reconnecting:`bg-amber-400 animate-pulse`,error:`bg-red-400`,ended:`bg-neutral-500`},c=x(()=>o[t.status]),l=x(()=>s[t.status]),d=x(()=>r[t.status]);var f=Ht(),p=j(f),m=E(p);n(f),A(()=>{D(f,`data-status`,t.status),h(f,1,`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium ${a(c)??``}`),h(p,1,`size-1.5 rounded-full ${a(l)??``}`),i(m,` ${a(d)??``}`)}),u(e,f)}var Wt=t(`<span data-testid="archive-badge" class="rounded-full border border-teal-900 bg-teal-950/60 px-2 py-0.5 text-[0.6875rem] font-medium text-teal-300">local archive</span>`),Gt=t(`<span class="text-xs text-neutral-400" data-testid="request-count"> </span>`),Kt=t(`<span class="text-xs text-amber-300" data-testid="pending-count"> </span>`),qt=t(`<span class="text-xs text-amber-300/80" data-testid="dropped-count"> </span>`),Jt=t(`<span class="text-[0.6875rem] text-amber-400/80" data-testid="window-clamped">14-day limit</span>`),Yt=t(`<span class="text-[0.6875rem] text-emerald-400/80" data-testid="window-complete">window complete</span>`),Xt=t(`<span class="ml-1 opacity-70"> </span>`),Zt=t(`<button type="button"> <!></button>`),Qt=t(`<p role="alert" data-testid="stream-error" class="border-b border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),$t=t(`<p class="px-3 py-6 text-sm text-neutral-500" data-testid="viewer-idle">Select a log group to start tailing.</p>`),en=t(`<p class="px-3 py-6 text-sm text-neutral-500" data-testid="viewer-empty"> </p>`),tn=t(`<span class="w-[9rem] shrink-0 truncate text-teal-400/80" data-testid="log-group"> </span>`),nn=t(`<span class="shrink-0 text-neutral-600" aria-hidden="true"> </span>`),rn=t(`<span> </span>`),an=t(`<span class="w-full whitespace-pre text-xs text-neutral-300" data-testid="log-json-expanded"></span>`),on=t(`<li data-testid="log-line"><span class="w-[7.5rem] shrink-0 text-neutral-500"> </span> <!> <span class="shrink-0 truncate text-sky-400/80" data-testid="log-stream"> </span> <!> <span data-testid="log-message"><!></span> <!></li>`),sn=t(`<span class="min-w-0 truncate text-neutral-500" data-testid="request-group-preview"> </span>`),cn=t(`<ul class="contents"></ul>`),ln=t(`<li data-testid="log-request-group"><button type="button" class="flex w-full flex-wrap items-baseline gap-2 px-3 py-0.5 text-left hover:bg-neutral-900/60" data-testid="request-group-summary"><span class="w-[7.5rem] shrink-0 text-neutral-500"> </span> <!> <span class="shrink-0 truncate text-sky-400/80" data-testid="log-stream"> </span> <span class="shrink-0 text-neutral-600" aria-hidden="true"> </span> <span class="shrink-0 rounded border border-neutral-700 bg-neutral-900 px-1.5 font-mono text-[0.6875rem] text-sky-200" data-testid="request-group-id" title="Request id shared by these lines"> </span> <span class="shrink-0 text-neutral-400" data-testid="request-group-count"> </span> <span class="shrink-0 text-neutral-500" data-testid="request-group-span"> </span> <span data-testid="request-group-level"> </span> <!></button> <!></li>`),un=t(`<div data-testid="log-canvas"><ol class="font-mono text-xs leading-5" data-testid="log-lines"></ol> <!></div>`),dn=t(`<section class="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-neutral-800 bg-neutral-950"><div class="flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-neutral-800 bg-neutral-900/40 px-3 py-2"><!> <!> <span class="text-xs text-neutral-400" data-testid="visible-count"> </span> <!> <span class="text-xs text-neutral-500" data-testid="received-count"> </span> <!> <!> <span data-testid="window-chip"> </span> <!> <!> <div class="ml-auto flex flex-wrap items-center gap-2"><div class="flex items-center gap-1" role="group" aria-label="Filter by level"><button type="button" title="Show every level, including lines with no level" data-testid="level-all">All</button> <!></div> <input type="search" aria-label="Filter log lines" placeholder="Filter lines" class="w-40 rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs text-neutral-100 outline-none transition-colors placeholder:text-neutral-600 hover:border-neutral-700 focus:border-sky-600"/> <button type="button" title="Wrap long lines instead of scrolling sideways" data-testid="wrap-toggle">Wrap</button> <button type="button" title="Pretty-print JSON log entries (off: click a line to open its JSON)" data-testid="json-toggle">JSON</button> <button type="button" title="Group the lines of one request into a single row, coloured by its most critical line (off: one row per line)" data-testid="group-toggle">By request</button> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100"> </button> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100">Clear</button> <button type="button">Auto-scroll</button></div></div> <!> <div class="min-h-0 min-w-0 flex-1 overflow-auto bg-neutral-950" data-testid="log-scroller"><!></div></section>`);function fn(t,o){g(o,!0);let s=S(o,`lines`,19,()=>[]),c=S(o,`status`,3,`idle`),d=S(o,`error`,3,null),p=S(o,`region`,3,``),m=S(o,`group`,3,null),b=S(o,`filter`,3,``),w=S(o,`paused`,3,!1),T=S(o,`autoScroll`,3,!0),L=S(o,`pendingCount`,3,0),V=S(o,`droppedCount`,3,0),H=S(o,`receivedCount`,3,0),U=S(o,`mode`,3,`live`),ne=S(o,`ready`,3,null),W=S(o,`endReason`,3,null),ae=S(o,`archivePath`,3,null),ce=S(o,`groups`,19,()=>[]),ue=S(o,`level`,3,void 0),pe=S(o,`groupRequests`,3,!0),me=Q(7.5),_e=Q(.75),ye=Q(.5),be=Q(Ee.minRem),xe=Q(Ee.maxRem),Se=Q(Ee.defaultRem);function Ce(e){try{return typeof localStorage>`u`?null:localStorage.getItem(e)}catch{return null}}function we(e,t){try{if(typeof localStorage>`u`)return;localStorage.setItem(e,t)}catch{}}let Te=O(!1),Y=O(!0),Z=O(I(Se));k(()=>{v(Te,Ce(X.wrap)===`true`),v(Y,Ce(X.jsonView)!==`false`),v(Z,Oe(Ce(X.prefixWidth),Se,be,xe),!0)});let De=O(null),ke=x(()=>ue()===void 0?a(De):ue());function Ae(e){ue()===void 0?v(De,e,!0):o.onLevelChange?.(e)}let Me=[{level:`error`,label:`Error`,activeClass:`border-red-800 bg-red-950/50 text-red-300`},{level:`warn`,label:`Warn`,activeClass:`border-amber-800 bg-amber-950/40 text-amber-300`},{level:`info`,label:`Info`,activeClass:`border-neutral-700 bg-neutral-800 text-neutral-100`},{level:`debug`,label:`Debug`,activeClass:`border-neutral-700 bg-neutral-800 text-neutral-400`}],Ne=x(()=>K(q(s(),b()),a(ke))),$=x(()=>{let e={error:0,warn:0,info:0,debug:0,unknown:0};for(let t of s()){let n=fe(t);e[n??`unknown`]=(e[n??`unknown`]??0)+1}return e}),Pe=x(()=>a(Ne).map((e,t)=>{let n=e.level===void 0?oe(e.message):e.level,r=re(e.message,{prettyJson:a(Y)}),i=se(n),o=null;if(!a(Y)){let t=ie(e.message);t!==null&&(o=JSON.stringify(t,null,2))}return{key:G(e,t),time:he(e.timestamp),timestamp:ge(e.timestamp),streamName:e.streamName,group:e.group??null,message:r.text,tokens:a(Y)&&r.isJson?te(r.text):null,expandable:o,level:n,levelClass:i}}));function Fe(e){return{kind:`line`,...e}}function Ie(e){let t=e.request.events.map(e=>a(Pe)[e.index]).filter(e=>e!==void 0),n=e.request.level,r=t[0];return{kind:`request`,key:e.key,id:e.request.id,time:r?.time??``,timestamp:r?.timestamp??``,count:t.length,span:ve(e.request.last-e.request.first),level:n,levelLabel:de[n],levelClass:se(n===`unknown`?null:n),group:Le(t.map(e=>e.group)),streamName:Le(t.map(e=>e.streamName)),preview:Re(e.request),children:t}}function Le(e){let t=e[0];return t==null?null:e.every(e=>e===t)?t:null}function Re(e){let t=e.events.find(t=>fe(a(Ne)[t.index]??{message:``})===e.level)??e.events[0],[n=``]=(a(Ne)[t?.index??-1]?.message??``).split(`
|
|
4
|
-
`);return n.replace(/\s+/g,` `).trim().slice(0,160)}let ze=x(()=>{if(!pe())return a(Pe).map(Fe);let e=[];for(let t of le(a(Ne))){if(t.kind===`line`){e.push(Fe(a(Pe)[t.index]));continue}if(t.request.events.length===1){let n=a(Pe)[t.request.events[0]?.index??-1];n!==void 0&&e.push(Fe(n));continue}e.push(Ie(t))}return e}),Be=x(()=>a(ze).some(e=>e.kind===`request`)),Ve=x(()=>a(ze).filter(e=>e.kind===`request`).length),Ue=O(null);N(()=>{let e=a(ze).length;T()&&a(Ue)!==null&&e!==0&&(a(Ue).scrollTop=a(Ue).scrollHeight)});let We=x(()=>d()===null?null:Tt(p(),m(),d().message)),Ge=x(()=>ne()?.source===`archive`),Ke=x(()=>a(Ge)&&(c()===`connecting`||c()===`live`||c()===`reconnecting`)?`idle`:c()),qe=x(()=>xt(ae())),Je=x(()=>m()===null||m()===``?`Select a log group to start tailing.`:b().trim()===``?a(Ge)?`No archived events for ${m()} in this window.`:`Waiting for events from ${m()}\u2026`:`No lines match the filter.`),Ye=x(()=>T()?`text-sky-300`:`text-neutral-400`),Xe=x(()=>Ze(ne(),Date.now())),Qe=x(()=>U()===`historic`&&W()===`window-complete`),$e=x(()=>a(Te)?`text-sky-300`:`text-neutral-400`),et=x(()=>a(Y)?`text-sky-300`:`text-neutral-400`),tt=x(()=>pe()?`text-sky-300`:`text-neutral-400`),nt=x(()=>a(Te)?`w-full`:`w-max min-w-full`),rt=x(()=>a(Te)?`whitespace-pre-wrap break-words`:`whitespace-pre`),it=x(()=>_e+me+ye+a(Z)),at=x(()=>`max-width: ${je(a(Z))}`),ot=O(I({}));function st(e){return a(ot)[e]===!0}function ct(e){if(a(ot)[e]===!0){let{[e]:t,...n}=a(ot);v(ot,n,!0);return}v(ot,{...a(ot),[e]:!0},!0)}function lt(e){switch(e){case`key`:return`text-sky-300`;case`string`:return`text-emerald-300`;case`number`:return`text-amber-300`;case`boolean`:return`text-fuchsia-300`;case`null`:return`text-neutral-500`;case`punctuation`:return`text-neutral-600`;default:return``}}function ut(){we(X.prefixWidth,String(Math.round(a(Z))))}function dt(){v(Te,!a(Te)),we(X.wrap,String(a(Te)))}function ft(){v(Y,!a(Y)),we(X.jsonView,String(a(Y)))}var pt=dn(),mt=j(pt),ht=j(mt);Ut(ht,{get status(){return a(Ke)}});var gt=E(ht,2),_t=e=>{var t=Wt();A(()=>D(t,`title`,a(qe))),u(e,t)};l(gt,e=>{a(Ge)&&e(_t)});var vt=E(gt,2),yt=_(vt),bt=E(vt,2),St=e=>{var t=Gt(),n=_(t);A(e=>i(n,`${e??``} requests`),[()=>J(a(Ve))]),u(e,t)};l(bt,e=>{a(Be)&&e(St)});var Ct=E(bt,2),wt=_(Ct),Et=E(Ct,2),Dt=e=>{var t=Kt(),n=_(t);A(e=>i(n,`${e??``} buffered`),[()=>J(L())]),u(e,t)};l(Et,e=>{L()>0&&e(Dt)});var Ot=E(Et,2),kt=e=>{var t=qt(),n=_(t);A(e=>i(n,`${e??``} dropped`),[()=>J(V())]),u(e,t)};l(Ot,e=>{V()>0&&e(kt)});var At=E(Ot,2),jt=_(At,!0),Mt=E(At,2),Nt=e=>{var t=Jt();u(e,t)};l(Mt,e=>{a(Xe).clamped&&e(Nt)});var Pt=E(Mt,2),Ft=e=>{var t=Yt();u(e,t)};l(Pt,e=>{a(Qe)&&e(Ft)});var It=E(Pt,2),Lt=j(It),Rt=j(Lt),zt=E(Rt,2);C(zt,17,()=>Me,e=>e.level,(e,t)=>{var o=Zt(),s=j(o),c=E(s),d=e=>{var n=Xt(),r=_(n,!0);A(e=>i(r,e),[()=>J(a($)[a(t).level]??0)]),u(e,n)};l(c,e=>{(a($)[a(t).level]??0)>0&&e(d)}),n(o),A(()=>{D(o,`aria-pressed`,a(ke)===a(t).level),D(o,`title`,`Show only ${a(t).label??``} lines (${a($)[a(t).level]??0??``} loaded)`),D(o,`data-testid`,`level-${a(t).level??``}`),h(o,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${(a(ke)===a(t).level?a(t).activeClass:`border-neutral-800 bg-neutral-900 text-neutral-400 hover:border-neutral-700`)??``}`),i(s,`${a(t).label??``} `)}),r(`click`,o,()=>Ae(a(ke)===a(t).level?null:a(t).level)),u(e,o)}),n(Lt);var Bt=E(Lt,2);M(Bt);var Vt=E(Bt,2),Ht=E(Vt,2),fn=E(Ht,2),pn=E(fn,2),mn=_(pn,!0),hn=E(pn,2),gn=E(hn,2);n(It),n(mt);var _n=E(mt,2),vn=e=>{var t=Qt(),n=_(t,!0);A(()=>i(n,a(We))),u(e,t)};l(_n,e=>{a(We)!==null&&e(vn)});var yn=E(_n,2),bn=j(yn),xn=e=>{var t=$t();u(e,t)},Sn=e=>{var t=en(),n=_(t,!0);A(()=>i(n,a(Je))),u(e,t)},Cn=t=>{var o=un(),s=j(o);{let t=(t,o=e,s=e)=>{let c=x(()=>o().expandable!==null),d=x(()=>a(c)&&st(o().key));var p=on(),m=j(p),g=_(m,!0),v=E(m,2),y=e=>{var t=tn(),n=_(t,!0);A(()=>{D(t,`title`,o().group??``),i(n,o().group??``)}),u(e,t)};l(v,e=>{ce().length>1&&e(y)});var b=E(v,2),S=_(b,!0),w=E(b,2),T=e=>{var t=nn(),n=_(t,!0);A(()=>i(n,a(d)?`▾`:`▸`)),u(e,t)};l(w,e=>{a(c)&&e(T)});var O=E(w,2),k=j(O),M=e=>{var t=B(),n=F(t);C(n,19,()=>o().tokens,(e,t)=>`${o().key}-${t}`,(e,t)=>{var n=rn(),r=_(n,!0);A(e=>{h(n,1,e),i(r,a(t).text)},[()=>R(lt(a(t).type))]),u(e,n)}),u(e,t)},N=e=>{var t=f();A(()=>i(t,o().message)),u(e,t)};l(k,e=>{o().tokens===null?e(N,-1):e(M)}),n(O);var P=E(O,2),I=e=>{var t=an();C(t,23,()=>te(o().expandable),(e,t)=>`${o().key}-json-${t}`,(e,t)=>{var n=rn(),r=_(n,!0);A(e=>{h(n,1,e),i(r,a(t).text)},[()=>R(lt(a(t).type))]),u(e,n)}),n(t),u(e,t)};l(P,e=>{a(d)&&o().expandable!==null&&e(I)}),n(p),A(()=>{h(p,1,`flex flex-wrap items-baseline gap-2 ${s()?`pl-8`:`px-3`} py-0.5 hover:bg-neutral-900/60 ${a(nt)??``} ${a(c)?`cursor-pointer`:``}`),D(p,`data-request-child`,s()?`true`:void 0),D(p,`data-level`,o().level??`unknown`),D(p,`data-expandable`,a(c)?`true`:void 0),D(p,`data-expanded`,a(d)?`true`:void 0),D(p,`role`,a(c)?`button`:void 0),D(p,`tabindex`,a(c)?0:void 0),D(p,`aria-expanded`,a(c)?a(d):void 0),D(p,`title`,a(c)?a(d)?`Hide the JSON in this line`:`Show this line as JSON`:void 0),D(m,`title`,o().timestamp),i(g,o().time),z(b,a(at)),D(b,`title`,o().streamName??``),i(S,o().streamName??``),h(O,1,`${a(rt)??``} ${o().levelClass??``}`)}),r(`click`,p,function(...e){(a(c)?()=>ct(o().key):void 0)?.apply(this,e)}),r(`keydown`,p,function(...e){(a(c)?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ct(o().key))}:void 0)?.apply(this,e)}),u(t,p)};C(s,21,()=>a(ze),e=>e.key,(e,o)=>{var s=B(),c=F(s),d=e=>{let s=x(()=>st(a(o).key));var c=ln(),d=j(c),f=j(d),p=_(f,!0),m=E(f,2),g=e=>{var t=tn(),n=_(t,!0);A(()=>{D(t,`title`,a(o).group??``),i(n,a(o).group??``)}),u(e,t)};l(m,e=>{ce().length>1&&e(g)});var v=E(m,2),y=_(v,!0),b=E(v,2),S=_(b,!0),w=E(b,2),T=_(w,!0),O=E(w,2),k=_(O),M=E(O,2),N=_(M,!0),P=E(M,2),F=_(P,!0),I=E(P,2),L=e=>{var t=sn(),n=_(t,!0);A(()=>i(n,a(o).preview)),u(e,t)};l(I,e=>{a(s)||e(L)}),n(d);var ee=E(d,2),B=e=>{var r=cn();C(r,21,()=>a(o).children,e=>e.key,(e,n)=>{t(e,()=>a(n),()=>!0)}),n(r),u(e,r)};l(ee,e=>{a(s)&&e(B)}),n(c),A(e=>{h(c,1,R(a(nt))),D(c,`data-request-id`,a(o).id),D(c,`data-level`,a(o).level),D(c,`data-expanded`,a(s)?`true`:void 0),D(c,`data-lines`,a(o).count),D(d,`aria-expanded`,a(s)),D(d,`title`,a(s)?`Hide the lines of this request`:`Show every line of this request`),D(f,`title`,a(o).timestamp),i(p,a(o).time),z(v,a(at)),D(v,`title`,a(o).streamName??``),i(y,a(o).streamName??``),i(S,a(s)?`▾`:`▸`),i(T,a(o).id),i(k,`${e??``} lines`),i(N,a(o).span),h(P,1,`shrink-0 font-medium ${a(o).levelClass??``}`),i(F,a(o).levelLabel)},[()=>J(a(o).count)]),r(`click`,d,()=>ct(a(o).key)),u(e,c)},f=e=>{t(e,()=>a(o),()=>!1)};l(c,e=>{a(o).kind===`request`?e(d):e(f,-1)}),u(e,s)}),n(s)}var c=E(s,2);{let e=x(()=>a(it)-4);He(c,{label:`Resize prefix column`,get width(){return a(Z)},get min(){return be},get max(){return xe},testId:`prefix-resizer`,onChange:e=>v(Z,e,!0),onCommit:()=>ut(),class:`absolute inset-y-0 w-2`,get style(){return`left: ${a(e)??``}px`}})}n(o),A(()=>h(o,1,`relative min-h-full ${a(nt)??``}`)),u(t,o)};l(bn,e=>{m()===null||m()===``?e(xn):a(ze).length===0?e(Sn,1):e(Cn,-1)}),n(yn),P(yn,e=>v(Ue,e),()=>a(Ue)),n(pt),A((e,t)=>{i(yt,`${e??``} shown`),i(wt,`${t??``} received`),h(At,1,`rounded-full border px-2 py-0.5 text-[0.6875rem] font-medium ${a(Xe).mode===`historic`?`border-amber-900 bg-amber-950/40 text-amber-300`:`border-neutral-800 bg-neutral-900 text-neutral-400`}`),D(At,`title`,a(Xe).title),i(jt,a(Xe).label),D(Rt,`aria-pressed`,a(ke)===null),h(Rt,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${a(ke)===null?`border-sky-700 bg-sky-950/60 text-sky-200`:`border-neutral-800 bg-neutral-900 text-neutral-400 hover:border-neutral-700`}`),y(Bt,b()),D(Vt,`aria-pressed`,a(Te)),h(Vt,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${a($e)??``}`),D(Ht,`aria-pressed`,a(Y)),h(Ht,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${a(et)??``}`),D(fn,`aria-pressed`,pe()),h(fn,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${a(tt)??``}`),D(pn,`aria-pressed`,w()),i(mn,w()?`Resume`:`Pause`),D(gn,`aria-pressed`,T()),h(gn,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${a(Ye)??``}`)},[()=>J(a(Ne).length),()=>J(H())]),r(`click`,Rt,()=>Ae(null)),r(`input`,Bt,e=>o.onFilterChange?.(e.currentTarget.value)),r(`click`,Vt,dt),r(`click`,Ht,ft),r(`click`,fn,()=>o.onGroupToggle?.()),r(`click`,pn,()=>o.onPauseToggle?.()),r(`click`,hn,()=>o.onClear?.()),r(`click`,gn,()=>o.onAutoScrollToggle?.()),u(t,pt),ee()}p([`click`,`input`,`keydown`]);var pn=t(`<option> </option>`),mn=t(`<div class="flex flex-col gap-1.5"><label class="text-[0.6875rem] font-semibold uppercase tracking-wider text-neutral-500"> </label> <select class="w-full rounded-md border border-neutral-800 bg-neutral-900 px-2.5 py-1.5 text-sm text-neutral-100 outline-none transition-colors hover:border-neutral-700 focus:border-sky-600 disabled:cursor-not-allowed disabled:opacity-50"></select></div>`);function hn(e,t){g(t,!0);let o=S(t,`regions`,3,ot),s=S(t,`value`,3,``),c=S(t,`disabled`,3,!1),l=S(t,`label`,3,`Region`),d=S(t,`id`,3,`region-select`),f=x(()=>s()!==``&&!o().includes(s())?[s(),...o()]:[...o()]);var p=mn(),h=j(p),v=_(h,!0),y=E(h,2);C(y,20,()=>a(f),e=>e,(e,t)=>{var n=pn(),r=_(n,!0),a={};A(()=>{i(r,t),a!==(a=t)&&(n.value=(n.__value=a)??``)}),u(e,n)}),n(y);var b;m(y),n(p),A(()=>{D(h,`for`,d()),i(v,l()),D(y,`id`,d()),y.disabled=c(),b!==(b=s())&&(y.value=(y.__value=b)??``,L(y,b))}),r(`change`,y,e=>t.onchange?.(e.currentTarget.value)),u(e,p),ee()}p([`change`]);var gn=t(`<p class="text-[0.6875rem] leading-4 text-teal-300/80" data-testid="archive-note"> </p>`),_n=t(`<div class="flex flex-col gap-1.5"><div class="flex items-center gap-1 rounded-lg border border-neutral-800 bg-neutral-900 p-0.5" role="group" aria-label="Log source"><button type="button" title="Stream from CloudWatch Logs with your AWS credentials" data-testid="source-cloudwatch">CloudWatch</button> <button type="button" data-testid="source-archive">Local archive</button></div> <!></div>`);function vn(e,t){g(t,!0);let o=S(t,`source`,3,`cloudwatch`),s=S(t,`archiveAvailable`,3,!1),c=S(t,`archivePath`,3,null),d=x(()=>xt(c()));function f(e){e!==o()&&t.onChange?.(e)}var p=B(),m=F(p),v=e=>{var t=_n(),s=j(t),c=j(s),p=E(c,2);n(s);var m=E(s,2),g=e=>{var t=gn(),n=_(t,!0);A(()=>{D(t,`title`,a(d)),i(n,bt)}),u(e,t)};l(m,e=>{o()===`archive`&&e(g)}),n(t),A(()=>{D(c,`aria-pressed`,o()===`cloudwatch`),h(c,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`cloudwatch`?`border-sky-700 bg-sky-950/60 text-sky-300`:`border-transparent text-neutral-400 hover:text-neutral-200`}`),D(p,`aria-pressed`,o()===`archive`),D(p,`title`,a(d)),h(p,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`archive`?`border-teal-700 bg-teal-950/60 text-teal-300`:`border-transparent text-neutral-400 hover:text-neutral-200`}`)}),r(`click`,c,()=>f(`cloudwatch`)),r(`click`,p,()=>f(`archive`)),u(e,t)};l(m,e=>{s()&&e(v)}),u(e,p),ee()}p([`click`]);function yn(e){return new EventSource(e)}function bn(e,t=``){let n=new URLSearchParams;n.set(`region`,e.region);let r=(e.groups??[]).filter(e=>e.length>0);return r.length>1?n.set(`groups`,r.join(`,`)):n.set(`group`,r[0]??e.group),e.source===`archive`&&n.set(`source`,`archive`),e.filterPattern&&n.set(`filterPattern`,e.filterPattern),e.mode===`historic`?(n.set(`mode`,`historic`),e.range&&n.set(`range`,e.range),e.from!==void 0&&e.from!==``&&n.set(`from`,String(e.from)),e.to!==void 0&&e.to!==``&&n.set(`to`,String(e.to))):e.mode===`live`&&n.set(`mode`,`live`),e.startTime!==void 0&&e.startTime!==``&&n.set(`startTime`,String(e.startTime)),e.lookback&&n.set(`lookback`,e.lookback),typeof e.poll==`number`&&Number.isFinite(e.poll)&&n.set(`poll`,String(e.poll)),`${t}/api/stream?${n.toString()}`}function xn(e){try{return JSON.parse(e)}catch{return null}}var Sn=class{#e=O(`idle`);get status(){return a(this.#e)}set status(e){v(this.#e,e,!0)}#t=O(null);get lastError(){return a(this.#t)}set lastError(e){v(this.#t,e,!0)}#n=O(null);get ready(){return a(this.#n)}set ready(e){v(this.#n,e,!0)}#r=O(null);get target(){return a(this.#r)}set target(e){v(this.#r,e,!0)}#i=O([]);get lines(){return a(this.#i)}set lines(e){v(this.#i,e)}#a=O(0);get receivedCount(){return a(this.#a)}set receivedCount(e){v(this.#a,e,!0)}#o=O(0);get droppedCount(){return a(this.#o)}set droppedCount(e){v(this.#o,e,!0)}#s=O(0);get pendingCount(){return a(this.#s)}set pendingCount(e){v(this.#s,e,!0)}#c=O(!1);get paused(){return a(this.#c)}set paused(e){v(this.#c,e,!0)}#l=O(null);get lastEventAt(){return a(this.#l)}set lastEventAt(e){v(this.#l,e,!0)}#u=O(null);get endReason(){return a(this.#u)}set endReason(e){v(this.#u,e,!0)}#d;#f=null;#p=[];#m=null;#h;#g;#_;#v;#y;constructor(e={}){this.#d=new W(e.capacity??5e3),this.#h=e.createEventSource??yn,this.#g=e.reconnectDelayMs??1e3,this.#_=e.url??(e=>bn(e)),this.#v=e.schedule??((e,t)=>setTimeout(e,t)),this.#y=e.cancel??(e=>clearTimeout(e))}start(e){this.#S(),this.#E(),this.clear(),this.status=`connecting`,this.lastError=null,this.ready=null,this.endReason=null,this.target={...e},this.#b(!1)}stop(){this.#E(),this.#S(),this.target=null,this.status=`idle`}pause(){this.#d.pause(),this.paused=!0}resume(){this.#d.resume(),this.paused=!1,this.#O()}togglePause(){this.paused?this.resume():this.pause()}clear(){this.#d.clear(),this.paused=!1,this.lines=[],this.receivedCount=0,this.droppedCount=0,this.pendingCount=0}get size(){return this.#d.size}#b(e){let t=this.target;if(t===null)return;this.#S(),this.status=e?`reconnecting`:`connecting`;let n;try{n=this.#h(this.#_(t))}catch(e){this.status=`error`,this.lastError={message:e instanceof Error?e.message:String(e)};return}this.#f=n,this.#x(n,`open`,()=>{this.status=`live`,this.lastError=null}),this.#x(n,`error`,e=>this.#C(e)),this.#x(n,`ready`,e=>this.#k(e)),this.#x(n,`log`,e=>this.#A(e)),this.#x(n,`ping`,e=>this.#j(e)),this.#x(n,`end`,e=>this.#M(e))}#x(e,t,n){e.addEventListener(t,n),this.#p.push({source:e,type:t,handler:n})}#S(){for(let e of this.#p)e.source.removeEventListener(e.type,e.handler);this.#p=[],this.#f?.close(),this.#f=null}#C(e){let t=typeof e.data==`string`?e.data.trim():``;if(t===``){this.#w();return}this.lastError=xn(t)??{message:t},this.status=`error`}#w(){let e=this.#f;e!==null&&(this.status=`reconnecting`,e.readyState===2&&this.#T())}#T(){this.#m===null&&(this.#m=this.#v(()=>{this.#m=null,this.target!==null&&this.#b(!0)},this.#g))}#E(){this.#m!==null&&(this.#y(this.#m),this.#m=null)}#D(){this.lastEventAt=Date.now(),this.status!==`ended`&&(this.status=`live`)}#O(){this.lines=this.#d.toArray(),this.pendingCount=this.#d.pendingCount,this.droppedCount=this.#d.droppedCount}#k(e){let t=xn(e.data);t!==null&&(this.ready=t),this.#D()}#A(e){let t=xn(e.data),n=t!==null&&Array.isArray(t.events)?t.events:[];n.length!==0&&(this.#d.push(n),this.#O(),this.receivedCount+=n.length,this.#D())}#j(e){let t=xn(e.data);this.lastEventAt=t?.at??Date.now(),this.status!==`ended`&&(this.status=`live`)}#M(e){let t=xn(e.data);this.endReason=t?.reason??null,this.status=`ended`,this.#E(),this.#S()}},Cn=t(`<!> <span data-testid="archive-source-badge" class="rounded-full border border-teal-900 bg-teal-950/60 px-2.5 py-1 text-xs font-medium text-teal-300">local archive</span>`,1),wn=t(`<span class="text-xs text-emerald-400/80">API ok</span>`),Tn=t(`<p role="alert" data-testid="boot-error" class="rounded-md border border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),En=t(`<div class="flex flex-wrap items-center gap-2 text-[0.6875rem] text-neutral-500"><span data-testid="brush-window"> </span> <button type="button" data-testid="brush-clear" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-0.5 font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100">Reset zoom</button></div>`),Dn=t(`<div class="flex flex-wrap items-center gap-x-3 gap-y-2"><span class="text-[0.6875rem] font-semibold uppercase tracking-wider text-neutral-500">Watching</span> <span class="max-w-[22rem] truncate rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 font-mono text-xs text-neutral-200"> </span> <span class="text-xs text-neutral-500">in</span> <span class="font-mono text-xs text-neutral-300"> </span> <!> <!></div> <!> <!> <div class="flex min-h-0 min-w-0 flex-1 flex-col gap-3 lg:flex-row"><div class="flex min-h-0 w-full flex-col gap-3 rounded-lg border border-neutral-800 bg-neutral-950/60 p-3 lg:shrink-0" data-testid="sidebar"><!> <!> <!></div> <!> <div class="flex min-h-0 min-w-0 flex-1 flex-col"><!> <!> <!></div></div>`,1);function On(e,t){g(t,!0);let o=new Sn,s=O(I(U.url.searchParams.get(`region`)??``)),c=O(I(U.url.searchParams.get(`source`)===`archive`?`archive`:`cloudwatch`)),d=O(I(U.url.searchParams.get(`mode`)===`historic`?`historic`:`live`)),f=O(I(U.url.searchParams.get(`range`)??`15m`)),p=O(I(ye(U.url.searchParams.get(`from`)))),m=O(I(ye(U.url.searchParams.get(`to`)))),h=O(!1),y=O(I([...ot])),b=O(I([])),S=O(!1),C=O(null),w=O(null),T=O(null),M=O(null),L=O(null),R=O(``),B=O(!0),H=O(I(Pe(U.url.searchParams))),te=x(()=>a(H)[0]??null),W=O(null),G=O(!0),K=O(I([])),re=O(!1),ie=O(null),ae=x(()=>a(M)?.available===!0),oe=x(()=>a(M)?.path??null),se=x(()=>xt(a(oe))),ce=O(0),le=O(I(Q(Z.defaultRem))),q=x(()=>a(ce)===0?Q(Z.defaultRem):Math.max(Q(Z.minRem),a(ce)*Z.maxVw/100)),de=Q(Z.minRem),fe=x(()=>`width: min(${a(le)}px, ${Z.maxVw}vw)`);function pe(e){try{return typeof localStorage>`u`?null:localStorage.getItem(e)}catch{return null}}function me(){try{if(typeof localStorage>`u`)return;localStorage.setItem(X.sidebarWidth,String(Math.round(a(le))))}catch{}}k(()=>{v(G,pe(X.groupRequests)!==`false`),he();let e=()=>{v(ce,window.innerWidth,!0)};return e(),v(le,De(Oe(pe(X.sidebarWidth),Q(Z.defaultRem),Q(Z.minRem),window.innerWidth*Z.maxVw/100),Q(Z.minRem),Math.max(Q(Z.minRem),window.innerWidth*Z.maxVw/100)),!0),window.addEventListener(`resize`,e),()=>{o.stop(),window.removeEventListener(`resize`,e)}});async function he(){let e=Pe(U.url.searchParams);await _e(),await ge(),a(c)===`archive`&&!a(ae)&&(v(c,`cloudwatch`),v(T,a(w)?.endpoint??null,!0)),a(c)===`archive`&&v(d,`historic`),await ve(a(s)),e.length>0?(v(h,a(d)===`historic`),v(H,e,!0),xe(),$(a(s),a(H))):$(a(s),a(H))}async function ge(){try{v(M,await vt(),!0)}catch{v(M,null)}}async function _e(){try{let[e,t]=await Promise.all([ht(),gt()]);e.regions.length>0&&v(y,e.regions,!0),a(s)===``&&v(s,e.defaultRegion||a(y)[0]||ot[0],!0),v(w,t,!0),v(T,t.endpoint,!0)}catch(e){v(L,`Could not reach the watch-stream API. ${Re(e)}`),a(s)===``&&v(s,ot[0],!0)}}async function ve(e){v(S,!0),v(C,null);let t=a(c),n=t===`archive`?{region:e,source:t}:{region:e};try{let r=await _t(n);if(e!==a(s)||t!==a(c))return;r.endpoint!==null&&v(T,r.endpoint,!0),v(b,r.groups,!0)}catch(n){if(e!==a(s)||t!==a(c))return;v(b,[],!0),v(C,wt(e,n),!0)}finally{e===a(s)&&t===a(c)&&v(S,!1)}}function ye(e){if(e===null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?t:null}function J(){return a(d)===`live`&&a(c)!==`archive`?{mode:`live`}:a(f)===``&&a(p)!==null&&a(m)!==null?{mode:`historic`,from:a(p),to:a(m)}:{mode:`historic`,range:a(f)===``?`15m`:a(f)}}function be(){let e=J(),[t,...n]=a(H),r={region:a(s),group:t??``,groups:[...a(H)],...e};return a(c)===`archive`&&(r.source=`archive`),r}function xe(){if(a(s)===``||a(H).length===0){o.stop();return}v(h,a(d)===`historic`),o.start(be()),Le()}function Se(e){a(s)!==``&&e!==``&&(v(H,[e],!0),$(a(s),a(H)),xe())}function Ce(e){if(a(s)!==``&&e!==``){if(v(H,a(H).includes(e)?a(H).filter(t=>t!==e):[...a(H),e],!0),$(a(s),a(H)),a(H).length===0){o.stop(),v(K,[],!0);return}xe()}}function we(e){(a(c)!==`archive`||e.mode!==`live`)&&(v(d,e.mode,!0),v(f,e.range,!0),v(p,e.from,!0),v(m,e.to,!0),$(a(s),a(H)),a(H).length!==0&&(v(h,e.mode===`historic`),o.start(be()),Le()))}function Te(e){if(e===null)return;let t=Ie();if(!ne(e,t,Fe(t.from,t.to))){a(ie)?.reset();return}we({mode:`historic`,range:``,from:e.from,to:e.to})}function Ee(){v(G,!a(G));try{localStorage?.setItem(X.groupRequests,a(G)?`true`:`false`)}catch{}}function ke(){a(ie)?.reset(),we({mode:`historic`,range:a(f)===``?`15m`:a(f),from:null,to:null})}function Ae(e){e!==a(c)&&(e!==`archive`||a(ae))&&(v(c,e,!0),e===`archive`&&a(d)!==`historic`&&(v(d,`historic`),a(f)===``&&(v(f,`15m`),v(p,null),v(m,null))),a(H).length>0&&(v(h,a(d)===`historic`),o.start(be())),v(b,[],!0),$(a(s),a(H)),ve(a(s)),Le())}async function je(){await ge(),!(a(c)!==`archive`||a(ae))&&(v(c,`cloudwatch`),a(H).length>0&&o.start(be()),v(b,[],!0),$(a(s),a(H)),ve(a(s)),Le())}function Me(e){e!==``&&e!==a(s)&&(v(s,e,!0),o.stop(),v(b,[],!0),v(H,[],!0),v(K,[],!0),$(e,[]),ve(e))}function Ne(){ve(a(s))}function $(e,t){let n=new URL(U.url);e===``?n.searchParams.delete(`region`):n.searchParams.set(`region`,e),a(c)===`archive`?n.searchParams.set(`source`,`archive`):n.searchParams.delete(`source`),n.searchParams.delete(`group`),n.searchParams.delete(`groups`);let r=t.filter(e=>e.length>0);r.length===1?n.searchParams.set(`group`,r[0]):r.length>1&&n.searchParams.set(`groups`,r.join(`,`)),a(d)===`live`?(n.searchParams.delete(`mode`),n.searchParams.delete(`range`),n.searchParams.delete(`from`),n.searchParams.delete(`to`)):(n.searchParams.set(`mode`,`historic`),n.searchParams.delete(`from`),n.searchParams.delete(`to`),n.searchParams.delete(`range`),a(f)===``&&a(p)!==null&&a(m)!==null?(n.searchParams.set(`from`,String(a(p))),n.searchParams.set(`to`,String(a(m)))):n.searchParams.set(`range`,a(f)===``?`15m`:a(f))),n.href!==U.url.href&&V(n,{})}N(()=>{(o.ready!==null||o.status===`error`)&&v(h,!1)}),N(()=>{[a(c),a(s),a(H).join(`,`),a(d),a(f),a(p)??``,a(m)??``,a(W)??``,a(G)?`request`:`event`,o.receivedCount,o.ready?.startTime??``,o.ready?.endTime??``].join(`|`).length!==0&&Le()}),N(()=>{o.lastError?.code===`archive-unavailable`&&je()});function Pe(e){let t=(e.get(`groups`)??``).split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length>0)return[...new Set(t)];let n=e.get(`group`)?.trim()??``;return n.length>0?[n]:[]}function Fe(e,t){let n=Math.max(1,t-e);return[1e3,5e3,1e4,3e4,6e4,3e5,9e5,18e5].find(e=>n/e<=90)??36e5}function Ie(){if(a(d)===`historic`){let e=a(m)??o.ready?.endTime??Date.now(),t=a(p)??o.ready?.startTime??e-9e5;return{from:Math.min(t,e-1e3),to:e}}let e=Date.now();return{from:e-9e5,to:e}}async function Le(){if(a(H).length===0||a(s)===``){v(K,[],!0);return}let{from:e,to:t}=Ie();if(a(c)!==`archive`){v(K,ue(o.lines,{from:e,to:t,bucketMs:Fe(e,t),level:a(W),fallbackGroup:a(te)??``,byRequest:a(G)}),!0);return}v(re,!0);try{let n=await ft({region:a(s),groups:a(H),from:e,to:t,levels:a(W)===null?[]:[a(W)],by:a(G)?`request`:`event`});v(K,n.points,!0)}catch{v(K,[],!0)}finally{v(re,!1)}}function Re(e){return e instanceof Error&&e.message!==``?e.message:String(e)}var ze=Dn(),Ve=F(ze),Ue=E(j(Ve),2),We=_(Ue,!0),Ge=E(Ue,4),Ke=_(Ge,!0),qe=E(Ge,2),Je=e=>{var t=Cn(),n=F(t);Y(n,{endpoint:null,credentials:null});var r=E(n,2);A(()=>D(r,`title`,a(se))),u(e,t)},Ye=e=>{{let t=x(()=>a(w)?.credentials??null);Y(e,{get endpoint(){return a(T)},get credentials(){return a(t)}})}};l(qe,e=>{a(c)===`archive`?e(Je):e(Ye,-1)});var Xe=E(qe,2),Ze=e=>{var t=wn();u(e,t)};l(Xe,e=>{a(w)!==null&&a(w).ok&&e(Ze)}),n(Ve);var Qe=E(Ve,2),$e=e=>{var t=Tn(),n=_(t,!0);A(()=>i(n,a(L))),u(e,t)};l(Qe,e=>{a(L)!==null&&e($e)});var et=E(Qe,2);{let e=x(()=>a(te)===null),t=x(()=>a(c)===`archive`);at(et,{get mode(){return a(d)},get range(){return a(f)},get from(){return a(p)},get to(){return a(m)},get loading(){return a(h)},get disabled(){return a(e)},get liveDisabled(){return a(t)},onApply:we})}var tt=E(et,2),nt=j(tt),rt=j(nt);vn(rt,{get source(){return a(c)},get archiveAvailable(){return a(ae)},get archivePath(){return a(oe)},onChange:Ae});var it=E(rt,2);hn(it,{get regions(){return a(y)},get value(){return a(s)},onchange:Me}),Vt(E(it,2),{get groups(){return a(b)},get source(){return a(c)},get region(){return a(s)},get selected(){return a(H)},get loading(){return a(S)},get error(){return a(C)},onSelect:Se,onToggle:Ce,onRefresh:Ne}),n(nt);var st=E(nt,2);He(st,{label:`Resize group list`,get width(){return a(le)},get min(){return de},get max(){return a(q)},testId:`sidebar-resizer`,onChange:e=>v(le,e,!0),onCommit:()=>me(),class:`hidden lg:block lg:w-2`});var ct=E(st,2),lt=j(ct);{let e=x(()=>Ie().from),t=x(()=>Ie().to),n=x(()=>Fe(Ie().from,Ie().to));P(Be(lt,{get points(){return a(K)},get from(){return a(e)},get to(){return a(t)},get bucketMs(){return a(n)},get groups(){return a(H)},get byRequest(){return a(G)},get loading(){return a(re)},onBrush:Te}),e=>v(ie,e,!0),()=>a(ie))}var ut=E(lt,2),dt=e=>{var t=En(),o=j(t),s=_(o),c=E(o,2);n(t),A((e,t)=>i(s,`zoomed to ${e??``} – ${t??``}`),[()=>new Date(a(p)).toLocaleTimeString(),()=>new Date(a(m)).toLocaleTimeString()]),r(`click`,c,ke),u(e,t)};l(ut,e=>{a(p)!==null&&a(m)!==null&&a(d)===`historic`&&e(dt)}),fn(E(ut,2),{get lines(){return o.lines},get status(){return o.status},get error(){return o.lastError},get mode(){return a(d)},get ready(){return o.ready},get endReason(){return o.endReason},get archivePath(){return a(oe)},get region(){return a(s)},get group(){return a(te)},get groups(){return a(H)},get level(){return a(W)},onLevelChange:e=>v(W,e,!0),get groupRequests(){return a(G)},onGroupToggle:Ee,get filter(){return a(R)},get paused(){return o.paused},get autoScroll(){return a(B)},get pendingCount(){return o.pendingCount},get droppedCount(){return o.droppedCount},get receivedCount(){return o.receivedCount},onFilterChange:e=>v(R,e,!0),onPauseToggle:()=>o.togglePause(),onClear:()=>o.clear(),onAutoScrollToggle:()=>v(B,!a(B))}),n(ct),n(tt),A(()=>{i(We,a(te)??`no group selected`),i(Ke,a(s)===``?`resolving region…`:a(s)),z(nt,a(fe))}),u(e,ze),ee()}p([`click`]);export{On as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js-C2D-5edp.js","sources":["../../../../.svelte-kit/output/server/chunks/archive.js"],"sourcesContent":["import { a as detectLevelWithSource, d as isLogLevel, n as LEVEL_RANK, o as detectRequestId } from \"./log-buffer.js\";\nimport { mkdirSync, statSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport { setTimeout } from \"node:timers/promises\";\nimport { createHash } from \"node:crypto\";\n//#region src/lib/server/archive-sql.ts\n/**\n* SQL and row mapping for the local DuckDB archive.\n*\n* DuckDB is a native dependency and is loaded lazily by `archive.ts`; everything\n* in this file is plain text and pure functions so the archive can be unit\n* tested without the driver. Column order matters: {@link ARCHIVE_INSERT_COLUMNS}\n* is the contract with {@link toArchiveParams}, and the `SELECT` in\n* {@link buildPageQuery} uses the same names as {@link rowsToPage}.\n*\n* `level` and `request_id` are both derived from the message on the way in, and\n* both may be NULL in an archive written by an older build. NULL does not mean\n* the same thing for the two columns: for `level` it is a verdict (\"this line\n* carries no level\"), while for `request_id` it means \"not looked at yet\", since\n* the client can still detect an id in the message it renders. {@link rowsToPage}\n* and the request-id backfill below are written from that difference.\n*/\n/**\n* Statements that bring a database file up to the current schema.\n*\n* Every statement is idempotent so an existing archive can be opened by a newer\n* build without a migration step. `seq` orders events by arrival, which keeps\n* paging stable when many events share a millisecond timestamp.\n*/\nvar ARCHIVE_SCHEMA = [\n\t`CREATE SEQUENCE IF NOT EXISTS log_events_seq`,\n\t`CREATE TABLE IF NOT EXISTS log_events (\n\t\tregion VARCHAR NOT NULL,\n\t\tlog_group VARCHAR NOT NULL,\n\t\tlog_stream VARCHAR,\n\t\tevent_key VARCHAR NOT NULL,\n\t\tevent_id VARCHAR,\n\t\ttimestamp_ms BIGINT NOT NULL,\n\t\tingestion_time_ms BIGINT,\n\t\tmessage VARCHAR NOT NULL,\n\t\tlevel VARCHAR,\n\t\tlevel_source VARCHAR,\n\t\trequest_id VARCHAR,\n\t\tseq BIGINT NOT NULL DEFAULT nextval('log_events_seq'),\n\t\tarchived_at TIMESTAMP NOT NULL DEFAULT now()\n\t)`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level VARCHAR`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level_source VARCHAR`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS request_id VARCHAR`,\n\t`CREATE TABLE IF NOT EXISTS archive_meta (key VARCHAR PRIMARY KEY, value VARCHAR)`,\n\t`CREATE UNIQUE INDEX IF NOT EXISTS log_events_unique ON log_events (region, log_group, event_key)`,\n\t`CREATE INDEX IF NOT EXISTS log_events_time ON log_events (region, log_group, timestamp_ms)`\n];\n/** Columns written by {@link buildInsertSql}, in binding order. */\nvar ARCHIVE_INSERT_COLUMNS = [\n\t\"region\",\n\t\"log_group\",\n\t\"log_stream\",\n\t\"event_key\",\n\t\"event_id\",\n\t\"timestamp_ms\",\n\t\"ingestion_time_ms\",\n\t\"message\",\n\t\"level\",\n\t\"level_source\",\n\t\"request_id\"\n];\n/** Escape character used with `LIKE`/`ILIKE` so user input cannot inject wildcards. */\nvar LIKE_ESCAPE = \"\\\\\";\n/**\n* Stable identity of an event inside one log group.\n*\n* CloudWatch event ids are unique per log group and are reused as the key;\n* events without an id (floci and LocalStack omit them) get a deterministic\n* hash of timestamp, stream and message, so re-scanning the same window is\n* idempotent instead of duplicating rows.\n*/\nfunction archiveEventKey(event) {\n\tif (event.id !== null && event.id.length > 0) return event.id;\n\treturn `h:${createHash(\"sha256\").update(`${event.timestamp}\\u0000${event.streamName ?? \"\"}\\u0000${event.message}`).digest(\"hex\").slice(0, 32)}`;\n}\n/** Renders `count` placeholder rows, one group of columns per row. */\nfunction placeholderRows(count) {\n\tconst row = `(${ARCHIVE_INSERT_COLUMNS.map(() => \"?\").join(\", \")})`;\n\treturn Array.from({ length: count }, () => row).join(\", \");\n}\n/**\n* Builds a multi-row `INSERT OR IGNORE`, so events already archived are skipped\n* by the unique index instead of raising.\n*/\nfunction buildInsertSql(rowCount) {\n\tif (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);\n\treturn `INSERT OR IGNORE INTO log_events (${ARCHIVE_INSERT_COLUMNS.join(\", \")}) VALUES ${placeholderRows(rowCount)}`;\n}\n/**\n* Flattens events into the parameter list {@link buildInsertSql} expects.\n*\n* The request id is detected here, exactly like the level, so the archive holds\n* what a reader of the line would see rather than whatever a writer claimed.\n*/\nfunction toArchiveParams(region, logGroup, events) {\n\tconst params = [];\n\tfor (const event of events) {\n\t\tconst detected = detectLevelWithSource(event.message);\n\t\tparams.push(region, logGroup, event.streamName ?? null, archiveEventKey(event), event.id ?? null, BigInt(Math.round(event.timestamp)), event.ingestionTime === void 0 ? null : BigInt(Math.round(event.ingestionTime)), event.message, detected.level, detected.source, detectRequestId(event.message));\n\t}\n\treturn params;\n}\n/** Column list shared by {@link buildPageQuery} and {@link rowsToPage}. */\nvar PAGE_COLUMNS = `region, log_group, log_stream, event_key, event_id, timestamp_ms, ingestion_time_ms, message, level, level_source, request_id, seq`;\n/** Escapes `LIKE` metacharacters so a search term is matched literally. */\nfunction escapeLike(value) {\n\treturn value.replace(/[\\\\%_]/g, (match) => `${LIKE_ESCAPE}${match}`);\n}\n/**\n* Builds one keyset page of archived events.\n*\n* Ordering is `(timestamp_ms, seq)`, and the cursor compares the same tuple, so\n* pages never repeat or skip a row even when thousands of events share a\n* timestamp.\n*/\nfunction buildPageQuery(request) {\n\tconst limit = Math.max(1, Math.round(request.limit));\n\tconst groups = request.logGroups.length > 0 ? request.logGroups : [\"\"];\n\tconst where = [\n\t\t\"region = ?\",\n\t\t`log_group IN (${groups.map(() => \"?\").join(\", \")})`,\n\t\t\"timestamp_ms >= ?\",\n\t\t\"timestamp_ms <= ?\"\n\t];\n\tconst params = [\n\t\trequest.region,\n\t\t...groups,\n\t\tBigInt(Math.round(request.startTime)),\n\t\tBigInt(Math.round(request.endTime))\n\t];\n\tconst search = request.search?.trim() ?? \"\";\n\tif (search.length > 0) {\n\t\twhere.push(`message ILIKE ? ESCAPE '${LIKE_ESCAPE}'`);\n\t\tparams.push(`%${escapeLike(search)}%`);\n\t}\n\tconst prefix = request.streamPrefix?.trim() ?? \"\";\n\tif (prefix.length > 0) {\n\t\twhere.push(`log_stream LIKE ? ESCAPE '${LIKE_ESCAPE}'`);\n\t\tparams.push(`${escapeLike(prefix)}%`);\n\t}\n\tconst levels = request.levels ?? [];\n\tif (levels.length > 0) {\n\t\twhere.push(`level IN (${levels.map(() => \"?\").join(\", \")})`);\n\t\tparams.push(...levels);\n\t}\n\tconst after = request.after ?? null;\n\tif (after !== null) {\n\t\twhere.push(\"(timestamp_ms > ? OR (timestamp_ms = ? AND seq > ?))\");\n\t\tparams.push(BigInt(Math.round(after.timestamp)), BigInt(Math.round(after.timestamp)), BigInt(Math.round(after.seq)));\n\t}\n\tparams.push(BigInt(limit));\n\treturn {\n\t\tsql: `SELECT ${PAGE_COLUMNS} FROM log_events WHERE ${where.join(\" AND \")} ORDER BY timestamp_ms, seq LIMIT ?`,\n\t\tparams\n\t};\n}\n/** Converts a DuckDB value (which may be a bigint) into a JS number. */\nfunction toNumber(value) {\n\tif (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n\tif (typeof value === \"bigint\") return Number(value);\n\tif (typeof value === \"string\" && value.trim().length > 0) {\n\t\tconst parsed = Number(value);\n\t\treturn Number.isFinite(parsed) ? parsed : null;\n\t}\n\treturn null;\n}\n/** Converts a nullable DuckDB string column into `string` or `null`. */\nfunction toNullableString(value) {\n\tif (typeof value === \"string\") return value.length > 0 ? value : null;\n\treturn null;\n}\n/** Reads one column from a row object, tolerating case differences. */\nfunction pick(row, column) {\n\tif (column in row) return row[column];\n\tconst upper = column.toUpperCase();\n\tif (upper in row) return row[upper];\n}\n/**\n* Maps query rows onto wire events plus the cursor of the last row.\n*\n* Rows without a usable timestamp are dropped rather than rendered as 1970.\n*/\nfunction rowsToPage(rows) {\n\tconst events = [];\n\tlet last = null;\n\tfor (const row of rows) {\n\t\tconst timestamp = toNumber(pick(row, \"timestamp_ms\"));\n\t\tconst seq = toNumber(pick(row, \"seq\"));\n\t\tif (timestamp === null || seq === null) continue;\n\t\tconst rawLevel = pick(row, \"level\");\n\t\tconst group = toNullableString(pick(row, \"log_group\"));\n\t\tconst event = {\n\t\t\tid: toNullableString(pick(row, \"event_key\")),\n\t\t\ttimestamp,\n\t\t\tmessage: typeof pick(row, \"message\") === \"string\" ? pick(row, \"message\") : \"\",\n\t\t\tlevel: isLogLevel(rawLevel) ? rawLevel : null\n\t\t};\n\t\tif (group !== null) event.group = group;\n\t\tconst requestId = toNullableString(pick(row, \"request_id\"));\n\t\tif (requestId !== null) event.requestId = requestId;\n\t\tconst streamName = toNullableString(pick(row, \"log_stream\"));\n\t\tif (streamName !== null) event.streamName = streamName;\n\t\tconst ingestionTime = toNumber(pick(row, \"ingestion_time_ms\"));\n\t\tif (ingestionTime !== null) event.ingestionTime = ingestionTime;\n\t\tevents.push(event);\n\t\tlast = {\n\t\t\ttimestamp,\n\t\t\tseq\n\t\t};\n\t}\n\treturn {\n\t\tevents,\n\t\tlast\n\t};\n}\n/** Aggregate query behind {@link ArchiveTotals}. */\nvar ARCHIVE_TOTALS_SQL = `SELECT count(*) AS rows, count(DISTINCT log_group) AS groups, count(DISTINCT region) AS regions, min(timestamp_ms) AS oldest, max(timestamp_ms) AS newest FROM log_events`;\n/** Log groups held by the archive, optionally limited to one region. */\nfunction buildGroupsQuery(region) {\n\tconst where = region === null || region.length === 0 ? \"\" : \"WHERE region = ?\";\n\treturn {\n\t\tsql: `SELECT region, log_group, count(*) AS events, min(timestamp_ms) AS oldest, max(timestamp_ms) AS newest FROM log_events ${where} GROUP BY region, log_group ORDER BY region, log_group`,\n\t\tparams: where === \"\" ? [] : [region]\n\t};\n}\n/** Maps the single row of {@link ARCHIVE_TOTALS_SQL}. */\nfunction rowToTotals(row) {\n\tif (row === void 0) return {\n\t\trows: 0,\n\t\tgroups: 0,\n\t\tregions: 0,\n\t\toldest: null,\n\t\tnewest: null\n\t};\n\treturn {\n\t\trows: toNumber(pick(row, \"rows\")) ?? 0,\n\t\tgroups: toNumber(pick(row, \"groups\")) ?? 0,\n\t\tregions: toNumber(pick(row, \"regions\")) ?? 0,\n\t\toldest: toNumber(pick(row, \"oldest\")),\n\t\tnewest: toNumber(pick(row, \"newest\"))\n\t};\n}\n/** Maps the rows of {@link buildGroupsQuery}. */\nfunction rowsToGroups(rows) {\n\tconst groups = [];\n\tfor (const row of rows) {\n\t\tconst region = pick(row, \"region\");\n\t\tconst logGroup = pick(row, \"log_group\");\n\t\tif (typeof region !== \"string\" || typeof logGroup !== \"string\") continue;\n\t\tgroups.push({\n\t\t\tregion,\n\t\t\tlogGroup,\n\t\t\tevents: toNumber(pick(row, \"events\")) ?? 0,\n\t\t\toldest: toNumber(pick(row, \"oldest\")),\n\t\t\tnewest: toNumber(pick(row, \"newest\"))\n\t\t});\n\t}\n\treturn groups;\n}\n/**\n* Row budget of one request-id backfill pass.\n*\n* The pass runs on every open, so it has to stay cheap. 20000 messages is a\n* fraction of a second of regex work, and an archive with more than that scans\n* the rest on the next open, because the watermark moves.\n*/\nvar REQUEST_ID_BACKFILL_LIMIT = 2e4;\n/** `archive_meta` key holding the request-id backfill watermark. */\nvar REQUEST_ID_BACKFILL_KEY = \"request_id_backfill\";\n/** Highest `seq` in the archive: the ceiling of a backfill pass. */\nvar ARCHIVE_MAX_SEQ_SQL = `SELECT max(seq) AS maxSeq FROM log_events`;\n/** Reads the single row of {@link ARCHIVE_MAX_SEQ_SQL}; `null` for an empty archive. */\nfunction rowToMaxSeq(row) {\n\treturn row === void 0 ? null : toNumber(pick(row, \"maxSeq\"));\n}\n/** Statement that reads the backfill watermark; no row means it never ran. */\nfunction buildRequestIdBackfillStateQuery() {\n\treturn `SELECT value FROM archive_meta WHERE key = '${REQUEST_ID_BACKFILL_KEY}'`;\n}\n/** Statement that stores the backfill watermark, which is the highest scanned `seq`. */\nfunction buildRequestIdBackfillStateWrite() {\n\treturn `INSERT OR REPLACE INTO archive_meta (key, value) VALUES ('${REQUEST_ID_BACKFILL_KEY}', ?)`;\n}\n/** Reads the watermark row; an absent row or junk means \"scan from the start\". */\nfunction rowToBackfillWatermark(row) {\n\tconst value = row === void 0 ? null : toNumber(pick(row, \"value\"));\n\treturn value === null || value < 0 ? null : value;\n}\n/**\n* Builds the scan that finds rows archived before `request_id` existed.\n*\n* `seq` is selected although the update does not need it: the caller stores\n* where the pass stopped. `afterSeq` skips the range a previous pass already\n* looked at, which is what lets a capped pass resume - a message with no request\n* id stays NULL for ever, so without the lower bound every pass would start on\n* the same id-less rows and never reach the rows above them.\n*/\nfunction buildRequestIdBackfillQuery(request) {\n\tconst limit = Math.max(1, Math.round(request.limit));\n\tconst scanned = request.afterSeq ?? 0;\n\tconst after = scanned > 0 ? \" AND seq > ?\" : \"\";\n\tconst params = [BigInt(Math.round(request.maxSeq))];\n\tif (scanned > 0) params.push(BigInt(Math.round(scanned)));\n\tparams.push(BigInt(limit));\n\treturn {\n\t\tsql: `SELECT event_key, log_group, region, message, seq FROM log_events WHERE seq <= ?${after} AND request_id IS NULL ORDER BY seq LIMIT ?`,\n\t\tparams\n\t};\n}\n/** Maps the rows of {@link buildRequestIdBackfillQuery}, dropping unusable ones. */\nfunction rowsToBackfillCandidates(rows) {\n\tconst candidates = [];\n\tfor (const row of rows) {\n\t\tconst seq = toNumber(pick(row, \"seq\"));\n\t\tconst region = pick(row, \"region\");\n\t\tconst logGroup = pick(row, \"log_group\");\n\t\tconst eventKey = pick(row, \"event_key\");\n\t\tconst message = pick(row, \"message\");\n\t\tif (seq === null || typeof region !== \"string\" || typeof logGroup !== \"string\" || typeof eventKey !== \"string\" || typeof message !== \"string\") continue;\n\t\tcandidates.push({\n\t\t\tseq,\n\t\t\tregion,\n\t\t\tlogGroup,\n\t\t\teventKey,\n\t\t\tmessage\n\t\t});\n\t}\n\treturn candidates;\n}\n/** Highest `seq` of a scanned set, or `null` when nothing was scanned. */\nfunction maxSeqOf(candidates) {\n\tlet highest = null;\n\tfor (const candidate of candidates) if (highest === null || candidate.seq > highest) highest = candidate.seq;\n\treturn highest;\n}\n/**\n* Detects the request id of every candidate.\n*\n* A message that yields no id is dropped rather than written as an empty string:\n* it is a finished row, not a failure, and the watermark moves past it so it is\n* never looked at again.\n*/\nfunction planRequestIdBackfill(candidates) {\n\tconst updates = [];\n\tfor (const candidate of candidates) {\n\t\tconst requestId = detectRequestId(candidate.message);\n\t\tif (requestId === null) continue;\n\t\tupdates.push({\n\t\t\tregion: candidate.region,\n\t\t\tlogGroup: candidate.logGroup,\n\t\t\teventKey: candidate.eventKey,\n\t\t\trequestId\n\t\t});\n\t}\n\treturn updates;\n}\n/**\n* Builds one `UPDATE ... FROM (VALUES ...)` that writes many ids at once.\n*\n* One statement per chunk instead of one per row keeps a 20000-row pass down to\n* a handful of statements, and the predicate is an exact row match on the unique\n* index (`region`, `log_group`, `event_key`).\n*/\nfunction buildRequestIdBackfillUpdate(rowCount) {\n\tif (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);\n\treturn `UPDATE log_events SET request_id = v.request_id FROM (VALUES ${Array.from({ length: rowCount }, () => \"(?, ?, ?, ?)\").join(\", \")}) AS v(region, log_group, event_key, request_id) WHERE log_events.region = v.region AND log_events.log_group = v.log_group AND log_events.event_key = v.event_key`;\n}\n/** Flattens updates into the parameter list {@link buildRequestIdBackfillUpdate} expects. */\nfunction toRequestIdBackfillParams(updates) {\n\tconst params = [];\n\tfor (const update of updates) params.push(update.region, update.logGroup, update.eventKey, update.requestId);\n\treturn params;\n}\n/** Levels and their rank, highest first; `unknown` is left to the `ELSE` branch. */\nfunction rankArms() {\n\treturn Object.entries(LEVEL_RANK).filter(([level]) => level !== \"unknown\");\n}\n/**\n* SQL `CASE` that turns a level into its severity rank.\n*\n* Generated from {@link LEVEL_RANK} so the ranks have one source of truth: the\n* statement and the UI cannot disagree about which level is worse.\n*/\nfunction levelRankCase(expression) {\n\treturn `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN '${level}' THEN ${rank}`).join(\" \")} ELSE ${LEVEL_RANK.unknown} END`;\n}\n/** SQL `CASE` that turns a severity rank back into a level name. */\nfunction levelNameCase(expression) {\n\treturn `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN ${rank} THEN '${level}'`).join(\" \")} ELSE 'unknown' END`;\n}\n/** The `WHERE` clause both series forms share: one region, one window, one or more groups. */\nfunction seriesScope(request, groups) {\n\treturn {\n\t\twhere: [\n\t\t\t\"region = ?\",\n\t\t\t`log_group IN (${groups.map(() => \"?\").join(\", \")})`,\n\t\t\t\"timestamp_ms >= ?\",\n\t\t\t\"timestamp_ms <= ?\"\n\t\t],\n\t\tparams: [\n\t\t\trequest.region,\n\t\t\t...groups,\n\t\t\tBigInt(Math.round(request.startTime)),\n\t\t\tBigInt(Math.round(request.endTime))\n\t\t]\n\t};\n}\n/**\n* Builds the bucketed counts behind the chart.\n*\n* One statement returns every series. The bucket is plain integer arithmetic on\n* `timestamp_ms`, so it cannot drift with a time zone; NULL levels are reported\n* as `unknown` rather than dropped; and a level filter matches only rows that\n* carry one of the requested levels.\n*\n* `by: 'request'` selects the request form below; `by: 'event'` (the default)\n* keeps the event form unchanged.\n*/\nfunction buildSeriesQuery(request) {\n\tconst bucketMs = Math.max(1, Math.round(request.bucketMs));\n\tconst scope = seriesScope(request, request.logGroups.length > 0 ? request.logGroups : [\"\"]);\n\tif (request.by === \"request\") return buildRequestSeriesQuery(request, bucketMs, scope.where, scope.params);\n\tconst params = [\n\t\tBigInt(bucketMs),\n\t\tBigInt(bucketMs),\n\t\t...scope.params\n\t];\n\tconst where = scope.where.slice();\n\tconst levels = request.levels ?? [];\n\tif (levels.length > 0) {\n\t\twhere.push(`level IN (${levels.map(() => \"?\").join(\", \")})`);\n\t\tparams.push(...levels);\n\t}\n\treturn {\n\t\tsql: `SELECT CAST(floor(timestamp_ms / ?) * ? AS BIGINT) AS bucket, log_group, coalesce(level, 'unknown') AS level, count(*) AS events FROM log_events WHERE ${where.join(\" AND \")} GROUP BY bucket, log_group, level ORDER BY bucket, log_group, level`,\n\t\tparams\n\t};\n}\n/**\n* Builds the request form: one mark per request instead of one per line.\n*\n* `coalesce(request_id, event_key)` makes a line with no request id a request of\n* its own, so no line is dropped. A request is placed at its FIRST line\n* (`min(timestamp_ms)`) and counted once, and it takes the WORST level of its\n* lines (`max` of the ranks). A level filter selects on that same worst level in\n* the `HAVING`: asking for errors keeps every request that logged one, whatever\n* else it logged, and drops the requests that stayed below it.\n*\n* BIND ORDER: DuckDB binds `?` positionally in statement text order, and the CTE\n* comes first, so the parameters are the scope ones, then one rank per requested\n* level (the RANKS, not the level names), and the bucket width LAST - the\n* opposite of the event form above.\n*/\nfunction buildRequestSeriesQuery(request, bucketMs, where, scopeParams) {\n\tconst levels = request.levels ?? [];\n\tconst having = levels.length > 0 ? ` HAVING level_rank IN (${levels.map(() => \"?\").join(\", \")})` : \"\";\n\tconst params = [\n\t\t...scopeParams,\n\t\t...levels.map((level) => LEVEL_RANK[level]),\n\t\tBigInt(bucketMs),\n\t\tBigInt(bucketMs)\n\t];\n\treturn {\n\t\tsql: [\n\t\t\t\"WITH requests AS (\",\n\t\t\t`SELECT coalesce(request_id, event_key) AS request_key, log_group, min(timestamp_ms) AS start_ms, max(${levelRankCase(`coalesce(level, 'unknown')`)}) AS level_rank`,\n\t\t\t`FROM log_events WHERE ${where.join(\" AND \")}`,\n\t\t\t`GROUP BY request_key, log_group${having})`,\n\t\t\t`SELECT CAST(floor(start_ms / ?) * ? AS BIGINT) AS bucket, log_group, ${levelNameCase(\"level_rank\")} AS level, count(*) AS events`,\n\t\t\t\"FROM requests GROUP BY bucket, log_group, level ORDER BY bucket, log_group, level\"\n\t\t].join(\" \"),\n\t\tparams\n\t};\n}\n/** Maps the rows of {@link buildSeriesQuery} onto chart points. */\nfunction rowsToSeries(rows) {\n\tconst points = [];\n\tfor (const row of rows) {\n\t\tconst t = toNumber(pick(row, \"bucket\"));\n\t\tconst group = pick(row, \"log_group\");\n\t\tconst level = pick(row, \"level\");\n\t\tif (t === null || typeof group !== \"string\") continue;\n\t\tpoints.push({\n\t\t\tt,\n\t\t\tgroup,\n\t\t\tlevel: typeof level === \"string\" && level.length > 0 ? level : \"unknown\",\n\t\t\tevents: toNumber(pick(row, \"events\")) ?? 0\n\t\t});\n\t}\n\treturn points;\n}\n//#endregion\n//#region src/lib/server/archive.ts\n/**\n* Local DuckDB archive of the events the app has streamed.\n*\n* The driver (`@duckdb/node-api` plus its per-platform native binding) is an\n* optional dependency: it is imported lazily, on the first request that needs\n* it, and every failure is turned into an unavailable archive instead of an\n* error. The rest of the app therefore works unchanged on platforms where the\n* binding is missing.\n*\n* One process owns the file: DuckDB allows a single writer, and the SvelteKit\n* server is that writer. Statements are serialised through an internal queue so\n* a stream writing while another request reads cannot interleave on the\n* connection.\n*/\n/** Package name of the optional DuckDB driver. */\nvar DUCKDB_MODULE = \"@duckdb/node-api\";\n/** Directory name used under the platform data directory. */\nvar ARCHIVE_DIR_NAME = \"watch-tail\";\n/** File name of the archive inside {@link ARCHIVE_DIR_NAME}. */\nvar ARCHIVE_FILE_NAME = \"archive.duckdb\";\n/**\n* Imports the optional DuckDB driver.\n*\n* The specifier is held in a variable on purpose: bundlers must leave the\n* import alone so Node resolves it at run time, where a missing binding can be\n* reported as an unavailable archive rather than a build error.\n*/\nasync function loadDuckDbDriver() {\n\tconst loaded = await import(DUCKDB_MODULE);\n\tif (typeof loaded.DuckDBInstance?.create !== \"function\") throw new Error(`${DUCKDB_MODULE} did not expose DuckDBInstance.create`);\n\treturn loaded;\n}\nvar DISABLED_VALUES = /* @__PURE__ */ new Set([\n\t\"0\",\n\t\"false\",\n\t\"no\",\n\t\"off\"\n]);\n/** True when an environment value means \"off\". */\nfunction isDisabled(value) {\n\treturn value !== void 0 && DISABLED_VALUES.has(value.trim().toLowerCase());\n}\n/**\n* True when this process is a test runner.\n*\n* Vitest sets `VITEST`, and `NODE_ENV=test` covers other harnesses. Tests must\n* not append to the archive of the machine they run on, so the archive is off\n* unless a test asks for it through `WATCH_STREAM_ARCHIVE_DB` or\n* `WATCH_STREAM_ARCHIVE=on`.\n*/\nfunction isTestProcess(env) {\n\treturn env.VITEST !== void 0 || env.NODE_ENV === \"test\";\n}\n/**\n* Resolves the archive file path.\n*\n* `WATCH_STREAM_ARCHIVE_DB` wins; otherwise the file lives in the platform's\n* data directory (`XDG_DATA_HOME`, `%LOCALAPPDATA%` or\n* `~/Library/Application Support`), never in the current directory, so history\n* survives running the CLI from a different folder.\n*/\nfunction resolveArchiveConfig(env, platform = process.platform, home = homedir()) {\n\tconst path = env.WATCH_STREAM_ARCHIVE_DB?.trim() ?? \"\";\n\tconst dataDir = env.XDG_DATA_HOME?.trim() ?? (platform === \"darwin\" ? join(home, \"Library\", \"Application Support\") : platform === \"win32\" ? env.LOCALAPPDATA?.trim() ?? join(home, \"AppData\", \"Local\") : join(home, \".local\", \"share\"));\n\tconst requested = env.WATCH_STREAM_ARCHIVE?.trim() ?? \"\";\n\treturn {\n\t\tenabled: isDisabled(requested) ? false : path.length > 0 || requested.length > 0 ? true : !isTestProcess(env),\n\t\tpath: path.length > 0 ? path : join(dataDir, ARCHIVE_DIR_NAME, ARCHIVE_FILE_NAME)\n\t};\n}\n/**\n* A short, non-throwing description of an unknown failure.\n*\n* A conflicting lock is the one failure a user can act on, and DuckDB's own\n* message buries the reason in a pid and a documentation link, so it is\n* reported as what it means for this app.\n*/\nfunction describeOpenError(error, path) {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tif (/Could not set lock|Conflicting lock/i.test(message)) return `the archive file ${path} is locked by another process (another watch-tail is using it); use --db to keep a separate file`;\n\treturn message;\n}\n/** True when the failure is the exclusive file lock. */\nfunction isLockError(error) {\n\tconst message = error instanceof Error ? error.message : String(error);\n\treturn /Could not set lock|Conflicting lock/i.test(message);\n}\n/**\n* One DuckDB file holding every event the app has streamed.\n*\n* `open` never throws: a missing driver, a locked file or a corrupt database all\n* produce an instance with `available === false` and the reason on `error`. The\n* read and write methods then behave as no-ops, so callers never have to guard\n* their happy path.\n*/\nvar LogArchive = class LogArchive {\n\t/** Database file this archive uses. */\n\tpath;\n\t#connection = null;\n\t#available = false;\n\t#error = null;\n\t#queue = Promise.resolve();\n\tconstructor(path) {\n\t\tthis.path = path;\n\t}\n\t/**\n\t* Opens (and creates) the archive.\n\t*\n\t* Statements are executed in order: the sequence first, then the table, then\n\t* the indexes, so an existing file from an older build is upgraded in place.\n\t* The request-id backfill runs last, inside the same serialised path, and\n\t* cannot fail the open.\n\t*/\n\tstatic async open(options) {\n\t\tconst archive = new LogArchive(options.path);\n\t\tconst load = options.load ?? loadDuckDbDriver;\n\t\tconst ensureDir = options.ensureDir ?? ((dir) => mkdirSync(dir, { recursive: true }));\n\t\ttry {\n\t\t\tensureDir(dirname(options.path));\n\t\t\tconst driver = await load();\n\t\t\tfor (let attempt = 1;; attempt += 1) try {\n\t\t\t\tconst connection = await (await driver.DuckDBInstance.create(options.path)).connect();\n\t\t\t\tfor (const statement of ARCHIVE_SCHEMA) await connection.run(statement);\n\t\t\t\tarchive.#connection = connection;\n\t\t\t\tarchive.#available = true;\n\t\t\t\tawait archive.#backfillRequestIds();\n\t\t\t\tbreak;\n\t\t\t} catch (error) {\n\t\t\t\tif (attempt >= 3 || !isLockError(error)) throw error;\n\t\t\t\tawait setTimeout(150);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tarchive.#available = false;\n\t\t\tarchive.#error = describeOpenError(error, options.path);\n\t\t}\n\t\treturn archive;\n\t}\n\t/**\n\t* An archive that is off by configuration or could not be opened.\n\t*\n\t* Every method degrades to a no-op, so callers can use one code path for\n\t* \"no DuckDB on this machine\" and \"the user asked for no archive\".\n\t*/\n\tstatic unavailable(path, error = null) {\n\t\tconst archive = new LogArchive(path);\n\t\tarchive.#available = false;\n\t\tarchive.#error = error;\n\t\treturn archive;\n\t}\n\t/** True when the archive can be read and written. */\n\tget available() {\n\t\treturn this.#available;\n\t}\n\t/** Why the archive is unavailable, or the last failure, or `null`. */\n\tget error() {\n\t\treturn this.#error;\n\t}\n\t/** Runs one task after every task queued before it. */\n\t#enqueue(task) {\n\t\tconst next = this.#queue.then(task, task);\n\t\tthis.#queue = next.then(() => void 0, () => void 0);\n\t\treturn next;\n\t}\n\t/** Runs a statement, returning the failure instead of throwing. */\n\tasync #guard(fallback, task) {\n\t\tif (this.#connection === null) return fallback;\n\t\treturn this.#enqueue(async () => {\n\t\t\ttry {\n\t\t\t\treturn await task();\n\t\t\t} catch (error) {\n\t\t\t\tthis.#error = error instanceof Error ? error.message : String(error);\n\t\t\t\treturn fallback;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Migrates the request id of rows written before the column existed.\n\t*\n\t* It runs inside {@link LogArchive.#guard}, so it shares the serialised\n\t* statement queue with every other write and reports a failure on `error`\n\t* instead of letting it escape `open`. The watermark is the highest `seq` the\n\t* migration has looked at, so a capped or interrupted pass carries on from\n\t* there on the next open and no row is scanned twice; a row whose message\n\t* holds no id stays NULL, which is the archive's answer for that row.\n\t*/\n\tasync #backfillRequestIds() {\n\t\tawait this.#guard(void 0, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return;\n\t\t\tconst ceiling = rowToMaxSeq((await connection.runAndReadAll(ARCHIVE_MAX_SEQ_SQL)).getRowObjects()[0]);\n\t\t\tif (ceiling === null) return;\n\t\t\tconst watermark = rowToBackfillWatermark((await connection.runAndReadAll(buildRequestIdBackfillStateQuery())).getRowObjects()[0]);\n\t\t\tif (watermark !== null && watermark >= ceiling) return;\n\t\t\tconst { sql, params } = buildRequestIdBackfillQuery({\n\t\t\t\tmaxSeq: ceiling,\n\t\t\t\tafterSeq: watermark,\n\t\t\t\tlimit: REQUEST_ID_BACKFILL_LIMIT\n\t\t\t});\n\t\t\tconst candidates = rowsToBackfillCandidates((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t\tconst updates = planRequestIdBackfill(candidates);\n\t\t\tfor (let start = 0; start < updates.length; start += 500) {\n\t\t\t\tconst chunk = updates.slice(start, start + 500);\n\t\t\t\tawait connection.run(buildRequestIdBackfillUpdate(chunk.length), toRequestIdBackfillParams(chunk));\n\t\t\t}\n\t\t\tconst scanned = candidates.length < 2e4 ? ceiling : maxSeqOf(candidates);\n\t\t\tawait connection.run(buildRequestIdBackfillStateWrite(), [String(scanned ?? ceiling)]);\n\t\t});\n\t}\n\t/**\n\t* Writes one batch of streamed events.\n\t*\n\t* Batches are split into chunks of {@link ARCHIVE_INSERT_CHUNK} rows, and\n\t* `INSERT OR IGNORE` plus the unique index make a repeated scan idempotent.\n\t* Failures never propagate: a full disk must not interrupt a log stream.\n\t*/\n\tasync record(region, logGroup, events) {\n\t\tif (events.length === 0) return 0;\n\t\treturn this.#guard(0, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return 0;\n\t\t\tlet written = 0;\n\t\t\tfor (let start = 0; start < events.length; start += 500) {\n\t\t\t\tconst chunk = events.slice(start, start + 500);\n\t\t\t\tawait connection.run(buildInsertSql(chunk.length), toArchiveParams(region, logGroup, chunk));\n\t\t\t\twritten += chunk.length;\n\t\t\t}\n\t\t\treturn written;\n\t\t});\n\t}\n\t/** Reads one page of archived events. */\n\tasync page(request) {\n\t\tconst empty = {\n\t\t\tevents: [],\n\t\t\tlast: null\n\t\t};\n\t\treturn this.#guard(empty, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return empty;\n\t\t\tconst { sql, params } = buildPageQuery(request);\n\t\t\treturn rowsToPage((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/**\n\t* Bucketed counts for the chart, per group and level.\n\t*\n\t* The request is forwarded as it arrives: it carries the grouping that says\n\t* whether a mark counts an event or a request.\n\t*/\n\tasync seriesQuery(request) {\n\t\treturn this.#guard([], async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return [];\n\t\t\tconst { sql, params } = buildSeriesQuery(request);\n\t\t\treturn rowsToSeries((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/** Aggregate row count and time bounds. */\n\tasync totals() {\n\t\treturn this.#guard(rowToTotals(void 0), async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return rowToTotals(void 0);\n\t\t\treturn rowToTotals((await connection.runAndReadAll(ARCHIVE_TOTALS_SQL)).getRowObjects()[0]);\n\t\t});\n\t}\n\t/** Log groups held by the archive, optionally limited to one region. */\n\tasync groups(region = null) {\n\t\treturn this.#guard([], async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return [];\n\t\t\tconst { sql, params } = buildGroupsQuery(region);\n\t\t\treturn rowsToGroups((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/** Status for `GET /api/archive`, including the file size on disk. */\n\tasync status() {\n\t\tconst totals = await this.totals();\n\t\tlet bytes = null;\n\t\tif (this.#available) try {\n\t\t\tbytes = statSync(this.path).size;\n\t\t} catch {\n\t\t\tbytes = null;\n\t\t}\n\t\treturn {\n\t\t\tpath: this.path,\n\t\t\tavailable: this.#available,\n\t\t\terror: this.#error,\n\t\t\tbytes,\n\t\t\ttotals\n\t\t};\n\t}\n\t/** Closes the connection. Safe to call twice. */\n\tasync close() {\n\t\tconst connection = this.#connection;\n\t\tthis.#connection = null;\n\t\tthis.#available = false;\n\t\tif (connection?.closeSync === void 0) return;\n\t\tawait this.#enqueue(async () => {\n\t\t\tconnection.closeSync?.();\n\t\t});\n\t}\n};\n/** The archive for the running server, opened once per process. */\nvar sharedArchive = null;\n/**\n* Returns the process-wide archive for `env`, opening it on first use.\n*\n* The same file is never opened twice per process; a disabled archive\n* (`WATCH_STREAM_ARCHIVE=off`) is remembered so no driver import is attempted.\n*/\nfunction getArchive(env, load) {\n\tif (sharedArchive === null) {\n\t\tconst config = resolveArchiveConfig(env);\n\t\tsharedArchive = config.enabled ? LogArchive.open({\n\t\t\tpath: config.path,\n\t\t\t...load === void 0 ? {} : { load }\n\t\t}) : Promise.resolve(LogArchive.unavailable(config.path));\n\t}\n\treturn sharedArchive;\n}\n//#endregion\nexport { getArchive as t };\n"],"names":[],"mappings":";;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc,GAAG;AACrB,CAAC,CA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G,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC;AACnD,GAAG,IAAI,EAAE,MAAM,CAAC,IAAI;AACpB,GAAG,GAAqB,EAAE;AAC1B,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AACD,CAAC,OAAO,aAAa;AACrB;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aws.js-DkPqAybc.js","sources":["../../../../.svelte-kit/output/server/chunks/aws.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { CloudWatchLogsClient } from \"@aws-sdk/client-cloudwatch-logs\";\nimport { STSClient } from \"@aws-sdk/client-sts\";\n//#region src/lib/server/api.ts\n/**\n* Builds a JSON error response that never leaks stack traces.\n*\n* Use 400 for bad input, 502 for upstream CloudWatch Logs failures and 499\n* when the client aborted the request.\n*/\nfunction apiError(status, message, code, details) {\n\tconst body = { error: message };\n\tif (code !== void 0) body.code = code;\n\tif (details !== void 0 && details.length > 0) body.details = details;\n\treturn json(body, { status });\n}\n//#endregion\n//#region src/lib/server/aws.ts\n/**\n* Throwaway credentials for local emulators only.\n*\n* floci and LocalStack verify the request signature but accept any non-empty\n* key pair, so these keys make a local endpoint work out of the box.\n*/\nvar EMULATOR_CREDENTIALS = {\n\taccessKeyId: \"test\",\n\tsecretAccessKey: \"test\"\n};\n/** Environment variables that indicate that ambient credentials are configured. */\nvar CREDENTIAL_ENV_KEYS = [\n\t\"AWS_ACCESS_KEY_ID\",\n\t\"AWS_PROFILE\",\n\t\"AWS_SHARED_CREDENTIALS_FILE\",\n\t\"AWS_CONFIG_FILE\",\n\t\"AWS_WEB_IDENTITY_TOKEN_FILE\",\n\t\"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\",\n\t\"AWS_CONTAINER_CREDENTIALS_FULL_URI\",\n\t\"AWS_ROLE_ARN\"\n];\n/**\n* Display-only region used when nothing else can be resolved. It is never sent\n* to the SDK.\n*/\nvar FALLBACK_REGION = \"us-east-1\";\n/** User-facing hint for a malformed `region` query parameter. */\nvar REGION_PARAM_HINT = \"Invalid region: expected a region code such as us-east-1 or us-west-2-lax-1a\";\n/** Region codes and local-zone codes only: lowercase letters, digits and dashes. */\nvar REGION_PATTERN = /^[a-z0-9-]{1,64}$/;\n/** Hosts that are always considered local, including the IPv6 loopback form. */\nvar LOCAL_HOSTS = /* @__PURE__ */ new Set([\n\t\"localhost\",\n\t\"127.0.0.1\",\n\t\"0.0.0.0\",\n\t\"::1\",\n\t\"[::1]\"\n]);\n/** Substrings that identify a known local AWS emulator. */\nvar LOCAL_HINTS = [\"floci\", \"localstack\"];\nvar MAX_DETAIL_LENGTH = 300;\n/** Trims a value and treats blank strings as absent. */\nfunction normalize(value) {\n\tif (typeof value !== \"string\") return null;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : null;\n}\n/** Extracts a lowercase host from an endpoint, tolerating missing schemes. */\nfunction hostOf(endpoint) {\n\ttry {\n\t\treturn new URL(endpoint).hostname.toLowerCase();\n\t} catch {\n\t\treturn (/^[a-z][a-z0-9+.-]*:\\/\\/([^/?#]+)/i.exec(endpoint)?.[1] ?? endpoint).toLowerCase();\n\t}\n}\n/** True when the endpoint targets a local emulator such as floci or LocalStack. */\nfunction isLocalEndpoint(endpoint) {\n\tconst host = hostOf(endpoint);\n\tif (LOCAL_HOSTS.has(host)) return true;\n\treturn LOCAL_HINTS.some((hint) => host.includes(hint));\n}\n/** True when any ambient credential source is configured (non-blank) in the environment. */\nfunction hasAmbientCredentials(env) {\n\treturn CREDENTIAL_ENV_KEYS.some((key) => normalize(env[key]) !== null);\n}\n/**\n* Resolves the region, endpoint, local flag and credential source for CloudWatch Logs.\n*\n* Region precedence: an explicit region parameter, then `AWS_REGION`, then\n* `AWS_DEFAULT_REGION`. When none of them is set the result is `null`, which\n* lets the SDK resolve the region from the ambient AWS configuration (profile,\n* SSO, instance metadata) instead of this app inventing one.\n*\n* Credentials stay `ambient` unless the endpoint is local and no ambient\n* credential source is configured at all, in which case the emulator's\n* throwaway keys are used.\n*/\nfunction resolveAwsConfig(env, regionParam) {\n\tconst endpoint = normalize(env.AWS_ENDPOINT_URL_LOGS) ?? normalize(env.AWS_ENDPOINT_URL);\n\tconst region = normalize(regionParam) ?? normalize(env.AWS_REGION) ?? normalize(env.AWS_DEFAULT_REGION);\n\tconst local = endpoint !== null && isLocalEndpoint(endpoint);\n\treturn {\n\t\tregion,\n\t\tendpoint,\n\t\tlocal,\n\t\tcredentials: local && !hasAmbientCredentials(env) ? \"emulator-default\" : \"ambient\"\n\t};\n}\n/**\n* Validates the optional `region` query parameter.\n*\n* A blank value means \"not supplied\" and is accepted as `null`. Any other\n* value must look like a region code or a local-zone code.\n*/\nfunction parseRegionParam(value) {\n\tconst trimmed = typeof value === \"string\" ? value.trim() : \"\";\n\tif (trimmed.length === 0) return {\n\t\tok: true,\n\t\tregion: null\n\t};\n\tif (!REGION_PATTERN.test(trimmed)) return {\n\t\tok: false,\n\t\tregion: null\n\t};\n\treturn {\n\t\tok: true,\n\t\tregion: trimmed\n\t};\n}\n/**\n* Creates a CloudWatch Logs client.\n*\n* Credentials stay ambient unless {@link AwsConfig.credentials} asks for the\n* emulator defaults: this never reads key material from the environment and\n* never sets `credentials` for a real AWS endpoint, so the SDK default provider\n* chain is used unchanged. The region is only set when the caller asked for\n* one, so the SDK can otherwise resolve it from `AWS_REGION`, the shared\n* profile or SSO.\n*/\nfunction createLogsClient(config) {\n\tconst options = { maxAttempts: 3 };\n\tif (config.region !== null) options.region = config.region;\n\tif (config.endpoint !== null) options.endpoint = config.endpoint;\n\tif (config.credentials === \"emulator-default\") options.credentials = EMULATOR_CREDENTIALS;\n\treturn new CloudWatchLogsClient(options);\n}\nasync function resolveEffectiveRegion(client, config) {\n\tif (config.region !== null) return config.region;\n\ttry {\n\t\tconst region = await client.config.region();\n\t\treturn typeof region === \"string\" && region.trim().length > 0 ? region.trim() : FALLBACK_REGION;\n\t} catch {\n\t\treturn FALLBACK_REGION;\n\t}\n}\nvar ERROR_MESSAGES = {\n\taborted: \"The CloudWatch Logs request was aborted\",\n\t\"missing-credentials\": \"AWS credentials are missing or expired\",\n\t\"missing-region\": \"No AWS region is configured. Set AWS_REGION or add a region to your AWS profile.\",\n\t\"access-denied\": \"Access denied by CloudWatch Logs\",\n\t\"not-found\": \"The CloudWatch Logs resource was not found\",\n\tunreachable: \"The CloudWatch Logs endpoint is unreachable\",\n\tthrottled: \"CloudWatch Logs is throttling requests\",\n\tunknown: \"CloudWatch Logs request failed\"\n};\n/** Codes whose message is user guidance and must not be amended with SDK text. */\nvar FIXED_MESSAGE_CODES = /* @__PURE__ */ new Set([\"missing-region\"]);\n/** Collects name, message, status and a lowercase search haystack from an error chain. */\nfunction readErrorFacts(error) {\n\tconst parts = [];\n\tlet name = \"\";\n\tlet message = \"\";\n\tlet code = \"\";\n\tlet status = null;\n\tlet current = error;\n\tfor (let depth = 0; depth < 4 && current !== null && current !== void 0; depth += 1) {\n\t\tif (current instanceof Error) {\n\t\t\tif (name === \"\") name = current.name;\n\t\t\tif (message === \"\") message = current.message;\n\t\t\tparts.push(current.name, current.message);\n\t\t} else if (typeof current === \"string\") {\n\t\t\tif (message === \"\") message = current;\n\t\t\tparts.push(current);\n\t\t} else if (typeof current === \"object\") {\n\t\t\tconst like = current;\n\t\t\tif (name === \"\" && typeof like.name === \"string\") name = like.name;\n\t\t\tif (message === \"\" && typeof like.message === \"string\") message = like.message;\n\t\t\tif (code === \"\" && typeof like.code === \"string\") code = like.code;\n\t\t\tif (status === null && typeof like.$metadata?.httpStatusCode === \"number\") status = like.$metadata.httpStatusCode;\n\t\t\tif (typeof like.name === \"string\") parts.push(like.name);\n\t\t\tif (typeof like.message === \"string\") parts.push(like.message);\n\t\t\tif (typeof like.code === \"string\") parts.push(like.code);\n\t\t\tcurrent = like.cause;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\treturn {\n\t\tname,\n\t\tmessage: message.trim(),\n\t\tcode,\n\t\tstatus,\n\t\thaystack: parts.join(\" \").toLowerCase()\n\t};\n}\n/** True when the error says that no AWS region could be resolved. */\nfunction isRegionFailure(loweredName, haystack) {\n\treturn loweredName.includes(\"regionprovider\") || loweredName.includes(\"regionnotset\") || loweredName.includes(\"missingregion\") || haystack.includes(\"region is missing\") || haystack.includes(\"region is not configured\") || haystack.includes(\"region is required\") || haystack.includes(\"missing region\") || haystack.includes(\"no region is configured\") || haystack.includes(\"region not set\") || haystack.includes(\"region must be specified\") || haystack.includes(\"region not accepted\") || haystack.includes(\"is not a valid hostname component\");\n}\n/** Maps a thrown value to a machine-readable error code. */\nfunction classify(facts) {\n\tconst { name, code, status, haystack } = facts;\n\tconst loweredName = name.toLowerCase();\n\tif (loweredName === \"aborterror\" || code === \"ABORT_ERR\" || code === \"ERR_CANCELED\") return \"aborted\";\n\tif (loweredName.includes(\"credentialsprovider\") || loweredName.includes(\"expiredtoken\") || haystack.includes(\"could not load credentials\") || haystack.includes(\"credential is expired\") || haystack.includes(\"token has expired\") || haystack.includes(\"resolve credentials\")) return \"missing-credentials\";\n\tif (isRegionFailure(loweredName, haystack)) return \"missing-region\";\n\tif (loweredName.includes(\"accessdenied\") || loweredName.includes(\"invalidclienttokenid\") || loweredName.includes(\"invalidsignature\") || loweredName.includes(\"unrecognizedclient\") || loweredName.includes(\"unauthorized\") || loweredName.includes(\"signaturedoesnotmatch\") || status === 401 || status === 403) return \"access-denied\";\n\tif (loweredName.includes(\"resourcenotfound\") || loweredName.includes(\"loggroupnotfound\") || haystack.includes(\"does not exist\") || status === 404) return \"not-found\";\n\tif (loweredName.includes(\"throttl\") || loweredName.includes(\"toomanyrequests\") || loweredName.includes(\"requestlimitexceeded\") || status === 429) return \"throttled\";\n\tif ([\n\t\t\"econnrefused\",\n\t\t\"econnreset\",\n\t\t\"enotfound\",\n\t\t\"eaiagain\",\n\t\t\"etimedout\",\n\t\t\"ehostunreach\",\n\t\t\"enetunreach\"\n\t].some((token) => haystack.includes(token)) || haystack.includes(\"connection refused\") || haystack.includes(\"socket hang up\") || haystack.includes(\"fetch failed\") || haystack.includes(\"getaddrinfo\") || haystack.includes(\"network error\") || haystack.includes(\"timeout\") || haystack.includes(\"unreachable\")) return \"unreachable\";\n\treturn \"unknown\";\n}\n/**\n* Turns a thrown SDK or network error into a short human message plus a\n* machine-readable code such as `missing-credentials`, `missing-region` or\n* `unreachable`.\n*/\nfunction describeAwsError(error) {\n\tconst facts = readErrorFacts(error);\n\tconst code = classify(facts);\n\tconst base = ERROR_MESSAGES[code] ?? ERROR_MESSAGES.unknown;\n\tif (FIXED_MESSAGE_CODES.has(code)) return {\n\t\tmessage: base,\n\t\tcode\n\t};\n\tconst detail = facts.message.length > MAX_DETAIL_LENGTH ? `${facts.message.slice(0, MAX_DETAIL_LENGTH)}...` : facts.message;\n\treturn {\n\t\tmessage: detail.length > 0 && !base.toLowerCase().includes(detail.toLowerCase()) ? `${base}: ${detail}` : base,\n\t\tcode\n\t};\n}\n/**\n* Creates an STS client with the same resolved settings as the Logs client.\n*\n* Used for `GetCallerIdentity`, which answers the question the UI cannot: whose\n* credentials are these, if they work at all.\n*/\nfunction createStsClient(config) {\n\tconst options = {\n\t\tregion: config.region ?? void 0,\n\t\tmaxAttempts: 2\n\t};\n\tif (config.endpoint !== null) options.endpoint = config.endpoint;\n\tif (config.credentials === \"emulator-default\") options.credentials = EMULATOR_CREDENTIALS;\n\treturn new STSClient(options);\n}\n//#endregion\nexport { describeAwsError as a, resolveEffectiveRegion as c, createStsClient as i, apiError as l, REGION_PARAM_HINT as n, parseRegionParam as o, createLogsClient as r, resolveAwsConfig as s, FALLBACK_REGION as t };\n"],"names":[],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;AAClD,CAAC,MAAM,IAAI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AAG;AACjB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,MAAM;AACjC,EAAE,WAAW,EAAE;AACf,EAAE;AACF,CAAC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;AACjE,CAAC,IAAI,MAAM,CAAC,WAAW,KAAK,kBAAkB,EAAE,OAAO,CAAC,WAAW,GAAG,oBAAoB;AAC1F,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC;AAC9B;;"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { b as private_env } from './shared-server.js-Dn5XheXH.js';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
|
|
5
|
-
//#region src/lib/server/env.ts
|
|
6
|
-
/** Name of the git-ignored file that holds local (floci) connection settings. */
|
|
7
|
-
var LOCAL_ENV_FILE = ".env.local";
|
|
8
|
-
var localEnvChecked = false;
|
|
9
|
-
/** Reads `process.env` through `globalThis`, so this file needs no `@types/node`. */
|
|
10
|
-
function processEnv() {
|
|
11
|
-
return globalThis.process?.env ?? {};
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Loads a dotenv file into `process.env`.
|
|
15
|
-
*
|
|
16
|
-
* Existing environment variables win, matching `node --env-file` semantics.
|
|
17
|
-
* Returns true only when a file was found and parsed.
|
|
18
|
-
*/
|
|
19
|
-
function loadEnvFile(path) {
|
|
20
|
-
const runtime = globalThis;
|
|
21
|
-
const loader = runtime.process?.loadEnvFile;
|
|
22
|
-
if (typeof loader !== "function" || !existsSync(path)) return false;
|
|
23
|
-
try {
|
|
24
|
-
loader.call(runtime.process, path);
|
|
25
|
-
return true;
|
|
26
|
-
} catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Loads `<cwd>/.env.local` once.
|
|
32
|
-
*
|
|
33
|
-
* SvelteKit exposes `.env` values through `$env/dynamic/private`, but the AWS
|
|
34
|
-
* SDK's credential and region providers read `process.env` directly, so the
|
|
35
|
-
* file has to be applied to the process too. Run `pnpm floci:up` to create it.
|
|
36
|
-
*/
|
|
37
|
-
function ensureLocalEnv(cwd) {
|
|
38
|
-
if (localEnvChecked) return false;
|
|
39
|
-
localEnvChecked = true;
|
|
40
|
-
const base = globalThis.process?.cwd?.();
|
|
41
|
-
if (base === void 0) return false;
|
|
42
|
-
return loadEnvFile(join(base, LOCAL_ENV_FILE));
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Reads the effective server environment.
|
|
46
|
-
*
|
|
47
|
-
* `$env/dynamic/private` does resolve under vitest, but it is a snapshot taken
|
|
48
|
-
* when the module is first evaluated, so the live `process.env` map is merged
|
|
49
|
-
* last and wins.
|
|
50
|
-
*/
|
|
51
|
-
function readEnv() {
|
|
52
|
-
ensureLocalEnv();
|
|
53
|
-
return {
|
|
54
|
-
...private_env,
|
|
55
|
-
...processEnv()
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export { readEnv as r };
|
|
60
|
-
//# sourceMappingURL=env2.js-CcIskxOZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env2.js-CcIskxOZ.js","sources":["../../../../.svelte-kit/output/server/chunks/env2.js"],"sourcesContent":["import { t as private_env } from \"./shared-server.js\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\n//#region src/lib/server/env.ts\n/** Name of the git-ignored file that holds local (floci) connection settings. */\nvar LOCAL_ENV_FILE = \".env.local\";\nvar localEnvChecked = false;\n/** Reads `process.env` through `globalThis`, so this file needs no `@types/node`. */\nfunction processEnv() {\n\treturn globalThis.process?.env ?? {};\n}\n/**\n* Loads a dotenv file into `process.env`.\n*\n* Existing environment variables win, matching `node --env-file` semantics.\n* Returns true only when a file was found and parsed.\n*/\nfunction loadEnvFile(path) {\n\tconst runtime = globalThis;\n\tconst loader = runtime.process?.loadEnvFile;\n\tif (typeof loader !== \"function\" || !existsSync(path)) return false;\n\ttry {\n\t\tloader.call(runtime.process, path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n/**\n* Loads `<cwd>/.env.local` once.\n*\n* SvelteKit exposes `.env` values through `$env/dynamic/private`, but the AWS\n* SDK's credential and region providers read `process.env` directly, so the\n* file has to be applied to the process too. Run `pnpm floci:up` to create it.\n*/\nfunction ensureLocalEnv(cwd) {\n\tif (localEnvChecked) return false;\n\tlocalEnvChecked = true;\n\tconst base = cwd ?? globalThis.process?.cwd?.();\n\tif (base === void 0) return false;\n\treturn loadEnvFile(join(base, LOCAL_ENV_FILE));\n}\n/**\n* Reads the effective server environment.\n*\n* `$env/dynamic/private` does resolve under vitest, but it is a snapshot taken\n* when the module is first evaluated, so the live `process.env` map is merged\n* last and wins.\n*/\nfunction readEnv() {\n\tensureLocalEnv();\n\treturn {\n\t\t...private_env,\n\t\t...processEnv()\n\t};\n}\n//#endregion\nexport { readEnv as t };\n"],"names":[],"mappings":";;;;AAGA;AACA;AACA,IAAI,cAAc,GAAG,YAAY;AACjC,IAAI,eAAe,GAAG,KAAK;AAC3B;AACA,SAAS,UAAU,GAAG;AACtB,CAAC,OAAO,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,IAAI,EAAE;AAC3B,CAAC,MAAM,OAAO,GAAG,UAAU;AAC3B,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW;AAC5C,CAAC,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK;AACpE,CAAC,IAAI;AACL,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;AACpC,EAAE,OAAO,IAAI;AACb,CAAC,CAAC,CAAC,MAAM;AACT,EAAE,OAAO,KAAK;AACd,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,CAAC,IAAI,eAAe,EAAE,OAAO,KAAK;AAClC,CAAC,eAAe,GAAG,IAAI;AACvB,CAAC,MAAM,IAAI,GAAU,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI;AAChD,CAAC,IAAI,IAAI,KAAK,MAAM,EAAE,OAAO,KAAK;AAClC,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO,GAAG;AACnB,CAAC,cAAc,EAAE;AACjB,CAAC,OAAO;AACR,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,UAAU;AACf,EAAE;AACF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-buffer.js-BI_gQOls.js","sources":["../../../../.svelte-kit/output/server/chunks/log-buffer.js"],"sourcesContent":["//#region src/lib/log-format.ts\n/**\n* Parses a log message that is entirely JSON.\n*\n* Only objects and arrays count: a message that happens to be `42` or `\"ok\"` is\n* left alone, and anything that does not parse is not JSON. Leading and trailing\n* whitespace is ignored.\n*/\nfunction detectJson(message) {\n\tif (typeof message !== \"string\") return null;\n\tconst trimmed = message.trim();\n\tif (trimmed.length === 0) return null;\n\tconst first = trimmed[0];\n\tif (first !== \"{\" && first !== \"[\") return null;\n\ttry {\n\t\tconst parsed = JSON.parse(trimmed);\n\t\tif (parsed === null || typeof parsed !== \"object\") return null;\n\t\treturn parsed;\n\t} catch {\n\t\treturn null;\n\t}\n}\n/**\n* Returns the text to render for a log message.\n*\n* `prettyJson` is normally true: JSON messages are re-serialised with two-space\n* indentation. With `prettyJson` false the raw message is returned unchanged,\n* which is what the viewer's JSON toggle switches to.\n*/\nfunction formatLogMessage(message, options = {}) {\n\tconst { prettyJson = true } = options;\n\tconst value = detectJson(message);\n\tif (value === null || !prettyJson) return {\n\t\ttext: message,\n\t\tisJson: value !== null,\n\t\tvalue\n\t};\n\treturn {\n\t\ttext: JSON.stringify(value, null, 2),\n\t\tisJson: true,\n\t\tvalue\n\t};\n}\nvar NUMBER_PATTERN = /^-?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;\n/**\n* Splits pretty-printed JSON into coloured tokens.\n*\n* The concatenation of every token's `text` is always identical to the input, so\n* rendering tokens can never lose or alter a character. This is a display-only\n* scanner: it assumes well-formed JSON produced by `JSON.stringify`.\n*/\nfunction tokenizeJson(text) {\n\tconst tokens = [];\n\tlet index = 0;\n\tconst push = (type, value) => {\n\t\tif (value.length > 0) tokens.push({\n\t\t\ttype,\n\t\t\ttext: value\n\t\t});\n\t};\n\twhile (index < text.length) {\n\t\tconst char = text[index];\n\t\tif (char === \" \" || char === \"\\n\" || char === \"\t\" || char === \"\\r\") {\n\t\t\tlet end = index;\n\t\t\twhile (end < text.length && \" \\n\t\\r\".includes(text[end])) end += 1;\n\t\t\tpush(\"whitespace\", text.slice(index, end));\n\t\t\tindex = end;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tlet end = index + 1;\n\t\t\twhile (end < text.length) {\n\t\t\t\tif (text[end] === \"\\\\\") {\n\t\t\t\t\tend += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (text[end] === \"\\\"\") break;\n\t\t\t\tend += 1;\n\t\t\t}\n\t\t\tconst raw = text.slice(index, Math.min(end + 1, text.length));\n\t\t\tlet lookahead = index + raw.length;\n\t\t\twhile (lookahead < text.length && \" \\n\t\\r\".includes(text[lookahead])) lookahead += 1;\n\t\t\tpush(text[lookahead] === \":\" ? \"key\" : \"string\", raw);\n\t\t\tindex += raw.length;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"{\" || char === \"}\" || char === \"[\" || char === \"]\" || char === \",\" || char === \":\") {\n\t\t\tpush(\"punctuation\", char);\n\t\t\tindex += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (text.startsWith(\"true\", index) || text.startsWith(\"false\", index)) {\n\t\t\tconst literal = text.startsWith(\"true\", index) ? \"true\" : \"false\";\n\t\t\tpush(\"boolean\", literal);\n\t\t\tindex += literal.length;\n\t\t\tcontinue;\n\t\t}\n\t\tif (text.startsWith(\"null\", index)) {\n\t\t\tpush(\"null\", \"null\");\n\t\t\tindex += 4;\n\t\t\tcontinue;\n\t\t}\n\t\tlet end = index;\n\t\twhile (end < text.length && !\"{}[],:\\\" \\n\t\\r\".includes(text[end])) end += 1;\n\t\tconst raw = text.slice(index, Math.max(end, index + 1));\n\t\tpush(NUMBER_PATTERN.test(raw) ? \"number\" : \"other\", raw);\n\t\tindex += raw.length;\n\t}\n\treturn tokens;\n}\n/**\n* Finds the first JSON object or array inside a log message.\n*\n* Whole messages are handled by {@link detectJson}; this also copes with the\n* common \"prefix then payload\" shape (`2026-01-01 INFO {\"level\":\"info\"}`), which\n* is what the viewer expands when pretty-printing is switched off.\n*\n* Strings and escapes are respected while matching brackets, so a `}` inside a\n* message value cannot end the scan early.\n*/\nfunction findJsonInMessage(message) {\n\tif (typeof message !== \"string\") return null;\n\tconst whole = detectJson(message);\n\tif (whole !== null) return whole;\n\tfor (let index = 0; index < message.length; index += 1) {\n\t\tconst opener = message[index];\n\t\tif (opener !== \"{\" && opener !== \"[\") continue;\n\t\tconst closer = opener === \"{\" ? \"}\" : \"]\";\n\t\tlet depth = 0;\n\t\tlet inString = false;\n\t\tlet escaped = false;\n\t\tfor (let scan = index; scan < message.length; scan += 1) {\n\t\t\tconst char = message[scan];\n\t\t\tif (inString) {\n\t\t\t\tif (escaped) escaped = false;\n\t\t\t\telse if (char === \"\\\\\") escaped = true;\n\t\t\t\telse if (char === \"\\\"\") inString = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\"\") {\n\t\t\t\tinString = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === opener) depth += 1;\n\t\t\telse if (char === closer) {\n\t\t\t\tdepth -= 1;\n\t\t\t\tif (depth === 0) {\n\t\t\t\t\tconst candidate = message.slice(index, scan + 1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst parsed = JSON.parse(candidate);\n\t\t\t\t\t\tif (parsed !== null && typeof parsed === \"object\") return parsed;\n\t\t\t\t\t} catch {}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n//#endregion\n//#region src/lib/log-buffer.ts\n/**\n* Pure client-side log storage and filtering for the watch-stream UI.\n*\n* Design decisions (kept in one place so the UI stays predictable):\n*\n* - The visible buffer is a fixed-capacity ring buffer. When it is full the oldest line is\n* dropped, so memory stays bounded while tailing a busy group.\n* - Pausing keeps the SSE connection open and keeps receiving events. Incoming events are held in\n* a bounded pending buffer instead of the visible buffer, and are flushed in arrival order when\n* the user resumes.\n*/\n/** Maximum number of lines kept in the visible client buffer. */\nvar DEFAULT_CAPACITY = 5e3;\nvar ERROR_PATTERN = /\\b(ERROR|FATAL|CRITICAL|CRIT|PANIC|EXCEPTION|TRACEBACK|SEVERE|FAILED|FAILURE)\\b/;\nvar WARN_PATTERN = /\\b(WARN|WARNING)\\b/;\nvar DEBUG_PATTERN = /\\b(DEBUG|TRACE|VERBOSE)\\b/;\n/** Payload keys checked, in order, for a level the producer declared. */\nvar LEVEL_KEYS = [\n\t\"level\",\n\t\"severity\",\n\t\"lvl\",\n\t\"logLevel\",\n\t\"log_level\"\n];\n/**\n* Declared level words mapped onto the four levels the UI knows.\n*\n* The vocabulary is deliberately small: `fatal` and `critical` are errors to\n* everyone reading a log, and collapsing them keeps the filter and the colours\n* honest instead of inventing levels nothing else understands.\n*/\nvar LEVEL_WORDS = {\n\ttrace: \"debug\",\n\tverbose: \"debug\",\n\tdebug: \"debug\",\n\tinfo: \"info\",\n\tinformation: \"info\",\n\tnotice: \"info\",\n\tnote: \"info\",\n\twarn: \"warn\",\n\twarning: \"warn\",\n\terror: \"error\",\n\terr: \"error\",\n\texception: \"error\",\n\tfatal: \"error\",\n\tcritical: \"error\",\n\tcrit: \"error\",\n\tpanic: \"error\",\n\tsevere: \"error\",\n\talert: \"error\",\n\temergency: \"error\"\n};\n/**\n* Bunyan/pino style numeric levels.\n*\n* Only exact known values are mapped: a bare number such as `{\"level\":0}` means\n* different things in different loggers, so an unknown number falls through to\n* the text heuristic instead of being guessed at.\n*/\nvar NUMERIC_LEVELS = {\n\t10: \"debug\",\n\t20: \"debug\",\n\t30: \"info\",\n\t40: \"warn\",\n\t50: \"error\",\n\t60: \"error\"\n};\n/** True when a value is one of the four known levels. */\nfunction isLogLevel(value) {\n\treturn value === \"error\" || value === \"warn\" || value === \"info\" || value === \"debug\";\n}\n/** Converts one declared JSON value into a level, or `null` when unrecognised. */\nfunction levelFromDeclared(value) {\n\tif (typeof value === \"number\" && Number.isFinite(value)) return NUMERIC_LEVELS[value] ?? null;\n\tif (typeof value !== \"string\") return null;\n\tconst word = value.trim().toLowerCase();\n\tif (word.length === 0) return null;\n\treturn LEVEL_WORDS[word] ?? null;\n}\n/**\n* Level the payload declares, when the line carries a JSON object with a known\n* level key. Whole messages and \"prefix then payload\" lines are both handled,\n* by the same parser the viewer uses to pretty-print JSON.\n*/\nfunction declaredLevel(message) {\n\tconst payload = findJsonInMessage(message);\n\tif (payload === null || typeof payload !== \"object\" || Array.isArray(payload)) return null;\n\tconst record = payload;\n\tfor (const key of LEVEL_KEYS) {\n\t\tconst level = levelFromDeclared(record[key]);\n\t\tif (level !== null) return level;\n\t}\n\treturn null;\n}\n/**\n* Severity ranks, highest first, with `unknown` below every real level.\n*\n* One ordered table feeds the JavaScript helpers and the SQL the archive runs,\n* so \"most critical\" means exactly the same thing in the chart, in the log view\n* and in DuckDB. Insertion order is severity order.\n*/\nvar LEVEL_RANK = {\n\terror: 4,\n\twarn: 3,\n\tinfo: 2,\n\tdebug: 1,\n\tunknown: 0\n};\n/**\n* Worst level in a set of levels, or `null` when none of them has a level.\n*\n* This is what a request id group is coloured by: a group with one error line\n* and twenty info lines is an error, because that is what a reader needs to see.\n*/\nfunction mostCriticalLevel(levels) {\n\tlet best = null;\n\tlet bestRank = -1;\n\tfor (const level of levels) {\n\t\tif (level === null || level === void 0 || level === \"unknown\") continue;\n\t\tconst rank = LEVEL_RANK[level];\n\t\tif (rank > bestRank) {\n\t\t\tbestRank = rank;\n\t\t\tbest = level;\n\t\t}\n\t}\n\treturn best;\n}\n/**\n* Payload keys checked, in order, for a request id the producer declared.\n*\n* The list is deliberately about the *request*: a trace id, a session id or a\n* tenant id names something else and must not collapse unrelated lines.\n*/\nvar REQUEST_ID_KEYS = [\n\t\"requestId\",\n\t\"request_id\",\n\t\"requestID\",\n\t\"reqId\",\n\t\"req_id\",\n\t\"awsRequestId\",\n\t\"aws_request_id\",\n\t\"xRequestId\",\n\t\"x_request_id\",\n\t\"x-request-id\",\n\t\"X-Request-Id\"\n];\n/** Values that look like an id but mean \"there is none\". */\nvar REQUEST_ID_PLACEHOLDERS = /* @__PURE__ */ new Set([\n\t\"none\",\n\t\"null\",\n\t\"undefined\",\n\t\"n/a\",\n\t\"na\",\n\t\"unknown\",\n\t\"test\",\n\t\"-\",\n\t\"{{requestid}}\",\n\t\"${requestid}\"\n]);\n/** Shortest value treated as a request id, so `id: 1` is not a grouping key. */\nvar REQUEST_ID_MIN_LENGTH = 4;\n/** Characters a request id is made of; anything with a space is not an id. */\nvar REQUEST_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:=-]*$/;\n/**\n* `RequestId: 1234-abcd`, `request_id=abc.def`, `x-request-id: 8f2c`: the\n* separators and the casing both vary, so one pattern covers them.\n*\n* A bare UUID is deliberately *not* matched. Plenty of log lines carry a\n* correlation id, a span id or an uploaded file's id, and grouping by one of\n* those would invent requests that never existed.\n*/\nvar REQUEST_ID_TEXT = /\\brequest[\\s_-]?id\\b\\s*[:=]\\s*\"?([A-Za-z0-9][A-Za-z0-9._:=-]*)\"?/i;\n/** Trims trailing punctuation a sentence adds after an id. */\nfunction cleanRequestId(value) {\n\tconst trimmed = value.replace(/[.,;:]+$/, \"\").trim();\n\tif (trimmed.length < REQUEST_ID_MIN_LENGTH) return null;\n\tif (REQUEST_ID_PLACEHOLDERS.has(trimmed.toLowerCase())) return null;\n\treturn REQUEST_ID_PATTERN.test(trimmed) ? trimmed : null;\n}\n/** Request id the payload declares, when the line carries a JSON object. */\nfunction declaredRequestId(message) {\n\tconst payload = findJsonInMessage(message);\n\tif (payload === null || typeof payload !== \"object\" || Array.isArray(payload)) return null;\n\tconst record = payload;\n\tfor (const key of REQUEST_ID_KEYS) {\n\t\tconst value = record[key];\n\t\tif (typeof value === \"string\") {\n\t\t\tconst cleaned = cleanRequestId(value);\n\t\t\tif (cleaned !== null) return cleaned;\n\t\t}\n\t\tif (typeof value === \"number\" && Number.isFinite(value)) return String(value);\n\t}\n\treturn null;\n}\n/**\n* Detects the request id of a log line, or returns `null` when it has none.\n*\n* A declared payload key wins; the text form is the fallback for the many logs\n* that print their id instead of emitting JSON. Both paths return the id\n* verbatim, because it is an identifier - folding case would merge distinct ids\n* on the one hand and lie about what the log said on the other.\n*/\nfunction detectRequestId(message) {\n\tconst text = message ?? \"\";\n\tif (text === \"\") return null;\n\tconst declared = declaredRequestId(text);\n\tif (declared !== null) return declared;\n\tconst match = REQUEST_ID_TEXT.exec(text);\n\treturn match === null ? null : cleanRequestId(match[1] ?? \"\");\n}\n/**\n* Detects the severity of a log line.\n*\n* A level the payload declares wins, because it is a statement of fact; the\n* text heuristic is the fallback for the many logs that declare nothing. The\n* heuristic matches level words anywhere in the line, so\n* `{\"level\":\"info\",\"msg\":\"retry after error count 0\"}` is `info`, not `error`.\n*/\nfunction detectLevelWithSource(message) {\n\tconst declared = declaredLevel(message ?? \"\");\n\tif (declared !== null) return {\n\t\tlevel: declared,\n\t\tsource: \"json\"\n\t};\n\tconst upper = (message ?? \"\").toUpperCase();\n\tif (ERROR_PATTERN.test(upper)) return {\n\t\tlevel: \"error\",\n\t\tsource: \"text\"\n\t};\n\tif (WARN_PATTERN.test(upper)) return {\n\t\tlevel: \"warn\",\n\t\tsource: \"text\"\n\t};\n\tif (DEBUG_PATTERN.test(upper)) return {\n\t\tlevel: \"debug\",\n\t\tsource: \"text\"\n\t};\n\treturn {\n\t\tlevel: null,\n\t\tsource: null\n\t};\n}\n/**\n* Guesses the severity of a log line from its text, or returns `null` when the\n* line carries no signal at all (a stack-trace continuation, for example).\n*/\nfunction detectLevel(message) {\n\treturn detectLevelWithSource(message).level;\n}\n/** Level of an event: what the server detected, else a guess from the text. */\nfunction effectiveLevel(event) {\n\treturn event.level !== void 0 ? event.level : detectLevel(event.message);\n}\n/** True when an event passes a level filter; a `null` filter accepts every line. */\nfunction matchesLevel(event, level) {\n\treturn level === null || effectiveLevel(event) === level;\n}\n/** Filters events by level, keeping every line when `level` is `null`. */\nfunction filterByLevel(events, level) {\n\tif (level === null) return events.slice();\n\treturn events.filter((event) => matchesLevel(event, level));\n}\n/** Tailwind text colour class for a severity; an unknown level stays neutral. */\nfunction levelColorClass(level) {\n\tswitch (level) {\n\t\tcase \"error\": return \"text-red-400\";\n\t\tcase \"warn\": return \"text-amber-300\";\n\t\tcase \"debug\": return \"text-neutral-500\";\n\t\tdefault: return \"text-neutral-200\";\n\t}\n}\n/** Stable key for rendering a log line, since event ids can repeat or be missing. */\nfunction eventKey(event, index) {\n\treturn `${event.id ?? \"no-id\"}:${event.timestamp}:${index}`;\n}\n/** Case-insensitive substring match over the message and the stream name. */\nfunction matchesFilter(event, query) {\n\tconst needle = (query ?? \"\").trim().toLowerCase();\n\tif (needle === \"\") return true;\n\treturn `${event.message ?? \"\"} ${event.streamName ?? \"\"}`.toLowerCase().includes(needle);\n}\n/** Returns the events matching `query`, in arrival order. */\nfunction filterEvents(events, query) {\n\tif ((query ?? \"\").trim() === \"\") return events.slice();\n\treturn events.filter((event) => matchesFilter(event, query));\n}\n/** Creates an array of `length` undefined slots. */\nfunction emptySlots(length) {\n\treturn Array.from({ length });\n}\n/**\n* Fixed-capacity ring buffer that overwrites the oldest item once it is full.\n*/\nvar LogRingBuffer = class {\n\t/** Maximum number of items kept. */\n\tcapacity;\n\t#items;\n\t#start = 0;\n\t#size = 0;\n\t#dropped = 0;\n\tconstructor(capacity = DEFAULT_CAPACITY) {\n\t\tif (!Number.isInteger(capacity) || capacity <= 0) throw new RangeError(`capacity must be a positive integer, received ${capacity}`);\n\t\tthis.capacity = capacity;\n\t\tthis.#items = emptySlots(capacity);\n\t}\n\t/** Number of items currently stored. */\n\tget size() {\n\t\treturn this.#size;\n\t}\n\t/** Number of items discarded because the buffer was full. */\n\tget dropped() {\n\t\treturn this.#dropped;\n\t}\n\t/** True when the buffer holds `capacity` items. */\n\tget full() {\n\t\treturn this.#size === this.capacity;\n\t}\n\t/** Appends one item, dropping the oldest item when the buffer is full. */\n\tpush(item) {\n\t\tif (this.#size === this.capacity) {\n\t\t\tthis.#dropped += 1;\n\t\t\tthis.#start = (this.#start + 1) % this.capacity;\n\t\t\tthis.#size -= 1;\n\t\t}\n\t\tconst index = (this.#start + this.#size) % this.capacity;\n\t\tthis.#items[index] = item;\n\t\tthis.#size += 1;\n\t}\n\t/** Appends several items in order. */\n\tpushMany(items) {\n\t\tfor (const item of items) this.push(item);\n\t}\n\t/** Copies the stored items into an array ordered oldest to newest. */\n\ttoArray() {\n\t\tconst output = emptySlots(this.#size);\n\t\tfor (let offset = 0; offset < this.#size; offset += 1) output[offset] = this.#items[(this.#start + offset) % this.capacity];\n\t\treturn output;\n\t}\n\t/** Oldest stored item, or `undefined` when empty. */\n\tfirst() {\n\t\treturn this.#size === 0 ? void 0 : this.#items[this.#start];\n\t}\n\t/** Newest stored item, or `undefined` when empty. */\n\tlast() {\n\t\treturn this.#size === 0 ? void 0 : this.#items[(this.#start + this.#size - 1) % this.capacity];\n\t}\n\t/** Removes every item and resets the dropped counter. */\n\tclear() {\n\t\tthis.#items = emptySlots(this.capacity);\n\t\tthis.#start = 0;\n\t\tthis.#size = 0;\n\t\tthis.#dropped = 0;\n\t}\n};\n/**\n* Log store used by the UI: a visible ring buffer plus a pending buffer that fills up while the\n* view is paused. `push()` never drops silent data, it either appends to the visible buffer or to\n* the pending buffer; `resume()` moves the pending events into the visible buffer in order.\n*/\nvar LogStore = class {\n\tbuffer;\n\t#pending;\n\t#paused = false;\n\tconstructor(capacity = DEFAULT_CAPACITY) {\n\t\tthis.buffer = new LogRingBuffer(capacity);\n\t\tthis.#pending = new LogRingBuffer(capacity);\n\t}\n\t/** True when incoming events are buffered instead of appended to the visible buffer. */\n\tget paused() {\n\t\treturn this.#paused;\n\t}\n\t/** Number of visible lines. */\n\tget size() {\n\t\treturn this.buffer.size;\n\t}\n\t/** Number of lines held back while paused. */\n\tget pendingCount() {\n\t\treturn this.#pending.size;\n\t}\n\t/** Number of visible lines dropped because the buffer was full. */\n\tget droppedCount() {\n\t\treturn this.buffer.dropped;\n\t}\n\t/** Appends events to the visible buffer, or holds them back while paused. */\n\tpush(events) {\n\t\tif (this.#paused) {\n\t\t\tthis.#pending.pushMany(events);\n\t\t\treturn;\n\t\t}\n\t\tthis.buffer.pushMany(events);\n\t}\n\t/** Pauses or resumes appending. Resuming flushes the pending events immediately. */\n\tsetPaused(paused) {\n\t\tif (paused === this.#paused) return [];\n\t\tthis.#paused = paused;\n\t\treturn paused ? [] : this.flush();\n\t}\n\t/** Pauses appending to the visible buffer. */\n\tpause() {\n\t\tthis.#paused = true;\n\t}\n\t/** Resumes appending and returns the events flushed from the pending buffer. */\n\tresume() {\n\t\tthis.#paused = false;\n\t\treturn this.flush();\n\t}\n\t/** Moves every pending event into the visible buffer, oldest first. */\n\tflush() {\n\t\tconst flushed = this.#pending.toArray();\n\t\tthis.#pending.clear();\n\t\tthis.buffer.pushMany(flushed);\n\t\treturn flushed;\n\t}\n\t/** Copies the visible lines, oldest first. */\n\ttoArray() {\n\t\treturn this.buffer.toArray();\n\t}\n\t/** Empties the visible buffer and discards pending events. */\n\tclear() {\n\t\tthis.buffer.clear();\n\t\tthis.#pending.clear();\n\t}\n};\n//#endregion\nexport { detectLevelWithSource as a, eventKey as c, isLogLevel as d, levelColorClass as f, tokenizeJson as g, formatLogMessage as h, detectLevel as i, filterByLevel as l, findJsonInMessage as m, LEVEL_RANK as n, detectRequestId as o, mostCriticalLevel as p, LogStore as r, effectiveLevel as s, DEFAULT_CAPACITY as t, filterEvents as u };\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,OAAO,EAAE;AAC7B,CAAC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,OAAO,IAAI;AAC7C,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE;AAC/B,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;AACtC,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;AACzB,CAAC,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI;AAChD,CAAC,IAAI;AACL,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AACpC,EAAE,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,OAAO,IAAI;AAChE,EAAE,OAAO,MAAM;AACf,CAAC,CAAC,CAAC,MAAM;AACT,EAAE,OAAO,IAAI;AACb,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AACjD,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,OAAO;AACtC,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;AAClC,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE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OAAO,EAAE;AACpB,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;AACjC,GAAG;AACH,EAAE;AACF,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;AAC9B,CAAC;AACD;AACA,CAAC,SAAS,CAAC,MAAM,EAAE;AACnB,EAAE,IAAI,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;AACxC,EAAE,IAAI,CAAC,OAAO,GAAG,MAAM;AACvB,EAAE,OAAO,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;AACnC,CAAC;AACD;AACA,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI;AACrB,CAAC;AACD;AACA,CAAC,MAAM,GAAG;AACV,EAAE,IAAI,CAAC,OAAO,GAAG,KAAK;AACtB,EAAE,OAAO,IAAI,CAAC,KAAK,EAAE;AACrB,CAAC;AACD;AACA,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;AACzC,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;AACvB,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/B,EAAE,OAAO,OAAO;AAChB,CAAC;AACD;AACA,CAAC,OAAO,GAAG;AACX,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC9B,CAAC;AACD;AACA,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;AACrB,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;AACvB,CAAC;AACD;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regions.js-IQPMyP5C.js","sources":["../../../../.svelte-kit/output/server/chunks/regions.js"],"sourcesContent":["//#region src/lib/regions.ts\n/**\n* Regions offered by the picker when `WATCH_STREAM_REGIONS` is not set.\n*\n* The list is every AWS region in the standard `aws` partition that publishes a\n* CloudWatch Logs endpoint, taken from the AWS CLI's own endpoint data\n* (`botocore/data/endpoints.json`, filtered to the `aws` partition and with the\n* FIPS pseudo-regions removed). `af-south-1` (Africa, Cape Town) is included.\n* The China, GovCloud and secret partitions are excluded on purpose.\n*\n* Shared by the server (`src/lib/server/regions.ts`) and the browser\n* (`src/lib/groups-client.ts`) so both agree on the same set.\n* Narrow it per deployment with `WATCH_STREAM_REGIONS=eu-west-1,af-south-1`.\n*/\nvar REGION_CODES = [\n\t\"us-east-1\",\n\t\"us-east-2\",\n\t\"us-west-1\",\n\t\"us-west-2\",\n\t\"ca-central-1\",\n\t\"ca-west-1\",\n\t\"mx-central-1\",\n\t\"sa-east-1\",\n\t\"eu-west-1\",\n\t\"eu-west-2\",\n\t\"eu-west-3\",\n\t\"eu-central-1\",\n\t\"eu-central-2\",\n\t\"eu-north-1\",\n\t\"eu-south-1\",\n\t\"eu-south-2\",\n\t\"af-south-1\",\n\t\"me-south-1\",\n\t\"me-central-1\",\n\t\"il-central-1\",\n\t\"ap-east-1\",\n\t\"ap-south-1\",\n\t\"ap-south-2\",\n\t\"ap-southeast-1\",\n\t\"ap-southeast-2\",\n\t\"ap-southeast-3\",\n\t\"ap-southeast-4\",\n\t\"ap-southeast-5\",\n\t\"ap-southeast-6\",\n\t\"ap-southeast-7\",\n\t\"ap-northeast-1\",\n\t\"ap-northeast-2\",\n\t\"ap-northeast-3\"\n];\n//#endregion\nexport { REGION_CODES as t };\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACG,IAAC,YAAY,GAAG;AACnB,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,cAAc;AACf,CAAC,WAAW;AACZ,CAAC,cAAc;AACf,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,WAAW;AACZ,CAAC,cAAc;AACf,CAAC,cAAc;AACf,CAAC,YAAY;AACb,CAAC,YAAY;AACb,CAAC,YAAY;AACb,CAAC,YAAY;AACb,CAAC,YAAY;AACb,CAAC,cAAc;AACf,CAAC,cAAc;AACf,CAAC,WAAW;AACZ,CAAC,YAAY;AACb,CAAC,YAAY;AACb,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC,gBAAgB;AACjB,CAAC;AACD;;"}
|