@axium/server 0.24.1 → 0.26.0
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/build/client/_app/immutable/assets/account.dAAx7bby.css +1 -0
- package/build/client/_app/immutable/assets/account.dAAx7bby.css.br +0 -0
- package/build/client/_app/immutable/assets/account.dAAx7bby.css.gz +0 -0
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css +1 -0
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css.br +0 -0
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css.gz +0 -0
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css +1 -0
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css.br +2 -0
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css.gz +0 -0
- package/build/client/_app/immutable/chunks/46qGscyh.js +2 -0
- package/build/client/_app/immutable/chunks/46qGscyh.js.br +0 -0
- package/build/client/_app/immutable/chunks/46qGscyh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js +2 -0
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js.br +0 -0
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BKixenYx.js +1 -0
- package/build/client/_app/immutable/chunks/BKixenYx.js.br +0 -0
- package/build/client/_app/immutable/chunks/BKixenYx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BLtAtlP3.js +1 -0
- package/build/client/_app/immutable/chunks/BLtAtlP3.js.br +2 -0
- package/build/client/_app/immutable/chunks/BLtAtlP3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNTlty5m.js +1 -0
- package/build/client/_app/immutable/chunks/BNTlty5m.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNTlty5m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js +1 -0
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js.br +0 -0
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BrUe-Qen.js +1 -0
- package/build/client/_app/immutable/chunks/BrUe-Qen.js.br +0 -0
- package/build/client/_app/immutable/chunks/BrUe-Qen.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js +1 -0
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C62F-tXu.js +1 -0
- package/build/client/_app/immutable/chunks/C62F-tXu.js.br +1 -0
- package/build/client/_app/immutable/chunks/C62F-tXu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CUBtP2L9.js +23 -0
- package/build/client/_app/immutable/chunks/CUBtP2L9.js.br +0 -0
- package/build/client/_app/immutable/chunks/CUBtP2L9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ch16TNvP.js +1 -0
- package/build/client/_app/immutable/chunks/Ch16TNvP.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ch16TNvP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CoYD6HNm.js +1 -0
- package/build/client/_app/immutable/chunks/CoYD6HNm.js.br +0 -0
- package/build/client/_app/immutable/chunks/CoYD6HNm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D40Zn55h.js +1 -0
- package/build/client/_app/immutable/chunks/D40Zn55h.js.br +0 -0
- package/build/client/_app/immutable/chunks/D40Zn55h.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW7-1esk.js +21 -0
- package/build/client/_app/immutable/chunks/DW7-1esk.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW7-1esk.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DY4fWHx_.js +1 -0
- package/build/client/_app/immutable/chunks/DY4fWHx_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DY4fWHx_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DvOBbqVY.js +1 -0
- package/build/client/_app/immutable/chunks/DvOBbqVY.js.br +0 -0
- package/build/client/_app/immutable/chunks/DvOBbqVY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DwZYWemd.js +1 -0
- package/build/client/_app/immutable/chunks/DwZYWemd.js.br +0 -0
- package/build/client/_app/immutable/chunks/DwZYWemd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js +1 -0
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/FTv0qR3w.js +1 -0
- package/build/client/_app/immutable/chunks/FTv0qR3w.js.br +0 -0
- package/build/client/_app/immutable/chunks/FTv0qR3w.js.gz +0 -0
- package/build/client/_app/immutable/chunks/NeK0YGoY.js +1 -0
- package/build/client/_app/immutable/chunks/NeK0YGoY.js.br +0 -0
- package/build/client/_app/immutable/chunks/NeK0YGoY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/aArGsq9c.js +1 -0
- package/build/client/_app/immutable/chunks/aArGsq9c.js.br +0 -0
- package/build/client/_app/immutable/chunks/aArGsq9c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/lH47zGKU.js +1 -0
- package/build/client/_app/immutable/chunks/lH47zGKU.js.br +0 -0
- package/build/client/_app/immutable/chunks/lH47zGKU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/sMHjBQqw.js +1 -0
- package/build/client/_app/immutable/chunks/sMHjBQqw.js.br +0 -0
- package/build/client/_app/immutable/chunks/sMHjBQqw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/vQfHcJV6.js +2 -0
- package/build/client/_app/immutable/chunks/vQfHcJV6.js.br +0 -0
- package/build/client/_app/immutable/chunks/vQfHcJV6.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js +2 -0
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js.br +0 -0
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js +1 -0
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js.br +2 -0
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js +1 -0
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js +1 -0
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js.br +2 -0
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js +1 -0
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js +1 -0
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js +1 -0
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.CuICShck.js +1 -0
- package/build/client/_app/immutable/nodes/13.CuICShck.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.CuICShck.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js +1 -0
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js +1 -0
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js +1 -0
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js +1 -0
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js +1 -0
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js +1 -0
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js +2 -0
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js +1 -0
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js +1 -0
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.js +1 -0
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.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/client/styles.css +28 -0
- package/build/client/styles.css.br +0 -0
- package/build/client/styles.css.gz +0 -0
- package/build/handler.js +20 -3
- package/build/server/chunks/0-CNbALTKz.js +9 -0
- package/build/server/chunks/0-CNbALTKz.js.map +1 -0
- package/build/server/chunks/1-Dgxy393u.js +9 -0
- package/build/server/chunks/1-Dgxy393u.js.map +1 -0
- package/build/server/chunks/10-DovmbqKa.js +14 -0
- package/build/server/chunks/10-DovmbqKa.js.map +1 -0
- package/build/server/chunks/11-CRK_ubcl.js +14 -0
- package/build/server/chunks/11-CRK_ubcl.js.map +1 -0
- package/build/server/chunks/12-SbQlwMfe.js +9 -0
- package/build/server/chunks/12-SbQlwMfe.js.map +1 -0
- package/build/server/chunks/13-CbniIW7F.js +14 -0
- package/build/server/chunks/13-CbniIW7F.js.map +1 -0
- package/build/server/chunks/14-D9Vb_8Yx.js +9 -0
- package/build/server/chunks/14-D9Vb_8Yx.js.map +1 -0
- package/build/server/chunks/15-D-75Hdef.js +9 -0
- package/build/server/chunks/15-D-75Hdef.js.map +1 -0
- package/build/server/chunks/2-57exN8ae.js +14 -0
- package/build/server/chunks/2-57exN8ae.js.map +1 -0
- package/build/server/chunks/3-DNQft-pY.js +9 -0
- package/build/server/chunks/{2-CXlrhpR6.js.map → 3-DNQft-pY.js.map} +1 -1
- package/build/server/chunks/4-D9Bwp-f8.js +14 -0
- package/build/server/chunks/4-D9Bwp-f8.js.map +1 -0
- package/build/server/chunks/5-COEQwZNP.js +14 -0
- package/build/server/chunks/5-COEQwZNP.js.map +1 -0
- package/build/server/chunks/6-RT4yiDcP.js +14 -0
- package/build/server/chunks/6-RT4yiDcP.js.map +1 -0
- package/build/server/chunks/7-CVqF_r5D.js +14 -0
- package/build/server/chunks/7-CVqF_r5D.js.map +1 -0
- package/build/server/chunks/8-C5SO-sVH.js +14 -0
- package/build/server/chunks/8-C5SO-sVH.js.map +1 -0
- package/build/server/chunks/9-DoCOKtY-.js +14 -0
- package/build/server/chunks/9-DoCOKtY-.js.map +1 -0
- package/build/server/chunks/FormDialog-ZCY0chY1.js +102 -0
- package/build/server/chunks/FormDialog-ZCY0chY1.js.map +1 -0
- package/build/server/chunks/Icon-BVo9qbDf.js +30 -0
- package/build/server/chunks/Icon-BVo9qbDf.js.map +1 -0
- package/build/server/chunks/Logout-CmBZgu0j.js +46 -0
- package/build/server/chunks/Logout-CmBZgu0j.js.map +1 -0
- package/build/server/chunks/_layout.svelte-DuS006VZ.js +33 -0
- package/build/server/chunks/_layout.svelte-DuS006VZ.js.map +1 -0
- package/build/server/chunks/_page.svelte-BFVobcI7.js +14 -0
- package/build/server/chunks/_page.svelte-BFVobcI7.js.map +1 -0
- package/build/server/chunks/_page.svelte-B_cvhWJS.js +66 -0
- package/build/server/chunks/_page.svelte-B_cvhWJS.js.map +1 -0
- package/build/server/chunks/_page.svelte-BriaBR9l.js +28 -0
- package/build/server/chunks/_page.svelte-BriaBR9l.js.map +1 -0
- package/build/server/chunks/_page.svelte-BtQQzT7H.js +72 -0
- package/build/server/chunks/_page.svelte-BtQQzT7H.js.map +1 -0
- package/build/server/chunks/_page.svelte-C8D3c3yB.js +64 -0
- package/build/server/chunks/_page.svelte-C8D3c3yB.js.map +1 -0
- package/build/server/chunks/_page.svelte-CVSb9eHQ.js +24 -0
- package/build/server/chunks/_page.svelte-CVSb9eHQ.js.map +1 -0
- package/build/server/chunks/_page.svelte-CwRjZqL7.js +107 -0
- package/build/server/chunks/_page.svelte-CwRjZqL7.js.map +1 -0
- package/build/server/chunks/_page.svelte-D9A9RYjx.js +233 -0
- package/build/server/chunks/_page.svelte-D9A9RYjx.js.map +1 -0
- package/build/server/chunks/_page.svelte-DGhwqWMM.js +34 -0
- package/build/server/chunks/_page.svelte-DGhwqWMM.js.map +1 -0
- package/build/server/chunks/_page.svelte-DTvnX95_.js +75 -0
- package/build/server/chunks/_page.svelte-DTvnX95_.js.map +1 -0
- package/build/server/chunks/_page.svelte-DUfwpXfC.js +122 -0
- package/build/server/chunks/_page.svelte-DUfwpXfC.js.map +1 -0
- package/build/server/chunks/_page.svelte-DxDoD3rZ.js +37 -0
- package/build/server/chunks/_page.svelte-DxDoD3rZ.js.map +1 -0
- package/build/server/chunks/_page.svelte-VDBvShZ8.js +6 -0
- package/build/server/chunks/_page.svelte-VDBvShZ8.js.map +1 -0
- package/build/server/chunks/account-Bf_llRe2.js +446 -0
- package/build/server/chunks/account-Bf_llRe2.js.map +1 -0
- package/build/server/chunks/auth_redirect-olBYiIF2.js +24 -0
- package/build/server/chunks/auth_redirect-olBYiIF2.js.map +1 -0
- package/build/server/chunks/color-K_MR7m8s.js +14 -0
- package/build/server/chunks/color-K_MR7m8s.js.map +1 -0
- package/build/server/chunks/context-R2425nfV.js +64 -0
- package/build/server/chunks/context-R2425nfV.js.map +1 -0
- package/build/server/chunks/{error.svelte-DNQXZmIO.js → error.svelte-CkSCwrMJ.js} +7 -6
- package/build/server/chunks/error.svelte-CkSCwrMJ.js.map +1 -0
- package/build/server/chunks/index-CIEcmmdN.js +890 -0
- package/build/server/chunks/index-CIEcmmdN.js.map +1 -0
- package/build/server/chunks/{index-CvHf_GW2.js → index-Tt4zVDIZ.js} +843 -438
- package/build/server/chunks/index-Tt4zVDIZ.js.map +1 -0
- package/build/server/chunks/layout.svelte-UxsTmhKc.js +8 -0
- package/build/server/chunks/layout.svelte-UxsTmhKc.js.map +1 -0
- package/build/server/chunks/{string-DLbvtT1R.js → numbers-DL8C9q4W.js} +1 -71
- package/build/server/chunks/numbers-DL8C9q4W.js.map +1 -0
- package/build/server/chunks/{FormDialog-CB-2YGWi.js → user2-CRfK67II.js} +12 -206
- package/build/server/chunks/user2-CRfK67II.js.map +1 -0
- package/build/server/chunks/utils-h74ns7K6.js.map +1 -1
- package/build/server/index.js +2304 -1140
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +78 -13
- package/build/server/manifest.js.map +1 -1
- package/dist/acl.d.ts +1 -2
- package/dist/acl.js +1 -1
- package/dist/api/acl.js +4 -4
- package/dist/api/admin.d.ts +1 -0
- package/dist/api/admin.js +152 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/metadata.js +5 -5
- package/dist/api/passkeys.js +10 -10
- package/dist/api/register.js +4 -4
- package/dist/api/session.js +5 -5
- package/dist/api/users.js +52 -49
- package/dist/audit.d.ts +8 -39
- package/dist/audit.js +13 -16
- package/dist/auth.d.ts +4 -11
- package/dist/auth.js +4 -4
- package/dist/cli.js +515 -559
- package/dist/config.d.ts +26 -16
- package/dist/config.js +65 -36
- package/dist/database.d.ts +3 -4
- package/dist/database.js +19 -18
- package/dist/internal_requests.d.ts +3 -0
- package/dist/internal_requests.js +119 -0
- package/dist/io.d.ts +0 -49
- package/dist/io.js +23 -171
- package/dist/linking.d.ts +0 -1
- package/dist/linking.js +5 -8
- package/dist/requests.d.ts +10 -6
- package/dist/requests.js +17 -15
- package/dist/routes.d.ts +6 -10
- package/dist/routes.js +7 -8
- package/dist/serve.d.ts +7 -2
- package/dist/serve.js +170 -13
- package/dist/state.js +2 -1
- package/package.json +8 -7
- package/routes/account/+page.svelte +5 -109
- package/routes/admin/+layout.svelte +56 -0
- package/routes/admin/+layout.ts +31 -0
- package/routes/admin/+page.svelte +39 -0
- package/routes/admin/+page.ts +7 -0
- package/routes/admin/audit/+page.svelte +158 -0
- package/routes/admin/audit/+page.ts +22 -0
- package/routes/admin/audit/[id]/+page.svelte +43 -0
- package/routes/admin/audit/[id]/+page.ts +9 -0
- package/routes/admin/audit/styles.css +31 -0
- package/routes/admin/config/+page.svelte +28 -0
- package/routes/admin/config/+page.ts +9 -0
- package/routes/admin/plugins/+page.svelte +23 -0
- package/routes/admin/plugins/+page.ts +7 -0
- package/routes/admin/users/+page.svelte +60 -0
- package/routes/admin/users/+page.ts +9 -0
- package/routes/admin/users/[id]/+page.svelte +108 -0
- package/routes/admin/users/[id]/+page.ts +17 -0
- package/routes/login/client/+page.svelte +72 -0
- package/routes/login/client/+page.ts +27 -0
- package/routes/tsconfig.json +1 -1
- package/svelte.config.js +4 -10
- package/{web/template.html → template.html} +1 -1
- package/{web/tsconfig.json → web.tsconfig.json} +2 -2
- package/build/client/_app/immutable/chunks/B1E1cVbi.js +0 -1
- package/build/client/_app/immutable/chunks/B1E1cVbi.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1E1cVbi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CIywFg5g.js +0 -3
- package/build/client/_app/immutable/chunks/CIywFg5g.js.br +0 -0
- package/build/client/_app/immutable/chunks/CIywFg5g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D3hk2v8y.js +0 -1
- package/build/client/_app/immutable/chunks/D3hk2v8y.js.br +0 -2
- package/build/client/_app/immutable/chunks/D3hk2v8y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D4Bce_hb.js +0 -1
- package/build/client/_app/immutable/chunks/D4Bce_hb.js.br +0 -0
- package/build/client/_app/immutable/chunks/D4Bce_hb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D9TfJrfD.js +0 -1
- package/build/client/_app/immutable/chunks/D9TfJrfD.js.br +0 -0
- package/build/client/_app/immutable/chunks/D9TfJrfD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DJeR1n-B.js +0 -51
- package/build/client/_app/immutable/chunks/DJeR1n-B.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJeR1n-B.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DsnmJJEf.js +0 -1
- package/build/client/_app/immutable/chunks/DsnmJJEf.js.br +0 -2
- package/build/client/_app/immutable/chunks/DsnmJJEf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dy1O3iBu.js +0 -2
- package/build/client/_app/immutable/chunks/Dy1O3iBu.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dy1O3iBu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/pba7IodQ.js +0 -1
- package/build/client/_app/immutable/chunks/pba7IodQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/pba7IodQ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.ChtScU8h.js +0 -2
- package/build/client/_app/immutable/entry/app.ChtScU8h.js.br +0 -0
- package/build/client/_app/immutable/entry/app.ChtScU8h.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DdjgBKiR.js +0 -1
- package/build/client/_app/immutable/entry/start.DdjgBKiR.js.br +0 -2
- package/build/client/_app/immutable/entry/start.DdjgBKiR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.DlE8ZTIF.js +0 -1
- package/build/client/_app/immutable/nodes/0.DlE8ZTIF.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DlE8ZTIF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DRjfV_5C.js +0 -1
- package/build/client/_app/immutable/nodes/1.DRjfV_5C.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DRjfV_5C.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CvEpuMc7.js +0 -1
- package/build/client/_app/immutable/nodes/2.CvEpuMc7.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CvEpuMc7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CVudd8x2.js +0 -7
- package/build/client/_app/immutable/nodes/3.CVudd8x2.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CVudd8x2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.Dhj0R0r7.js +0 -1
- package/build/client/_app/immutable/nodes/4.Dhj0R0r7.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.Dhj0R0r7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CGoBaVII.js +0 -1
- package/build/client/_app/immutable/nodes/5.CGoBaVII.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CGoBaVII.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BtB2uWXy.js +0 -1
- package/build/client/_app/immutable/nodes/6.BtB2uWXy.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BtB2uWXy.js.gz +0 -0
- package/build/server/chunks/0-DgHTujtC.js +0 -9
- package/build/server/chunks/0-DgHTujtC.js.map +0 -1
- package/build/server/chunks/1-B3zVLOO8.js +0 -9
- package/build/server/chunks/1-B3zVLOO8.js.map +0 -1
- package/build/server/chunks/2-CXlrhpR6.js +0 -9
- package/build/server/chunks/3-CGT4Ugys.js +0 -13
- package/build/server/chunks/3-CGT4Ugys.js.map +0 -1
- package/build/server/chunks/4-BscEiwUk.js +0 -9
- package/build/server/chunks/4-BscEiwUk.js.map +0 -1
- package/build/server/chunks/5-H0ePIJBE.js +0 -9
- package/build/server/chunks/5-H0ePIJBE.js.map +0 -1
- package/build/server/chunks/6-BrPpcagX.js +0 -9
- package/build/server/chunks/6-BrPpcagX.js.map +0 -1
- package/build/server/chunks/FormDialog-CB-2YGWi.js.map +0 -1
- package/build/server/chunks/Logout-LKOt-AST.js +0 -45
- package/build/server/chunks/Logout-LKOt-AST.js.map +0 -1
- package/build/server/chunks/_page.svelte-B1LK5J87.js +0 -11
- package/build/server/chunks/_page.svelte-B1LK5J87.js.map +0 -1
- package/build/server/chunks/_page.svelte-CMtkwvbP.js +0 -68
- package/build/server/chunks/_page.svelte-CMtkwvbP.js.map +0 -1
- package/build/server/chunks/_page.svelte-CbI2KxeA.js +0 -62
- package/build/server/chunks/_page.svelte-CbI2KxeA.js.map +0 -1
- package/build/server/chunks/_page.svelte-D1_WJoyP.js +0 -6
- package/build/server/chunks/_page.svelte-D1_WJoyP.js.map +0 -1
- package/build/server/chunks/_page.svelte-d01Hl2Ia.js +0 -639
- package/build/server/chunks/_page.svelte-d01Hl2Ia.js.map +0 -1
- package/build/server/chunks/error.svelte-DNQXZmIO.js.map +0 -1
- package/build/server/chunks/hooks.server-CQhG9POo.js +0 -17298
- package/build/server/chunks/hooks.server-CQhG9POo.js.map +0 -1
- package/build/server/chunks/index-CvHf_GW2.js.map +0 -1
- package/build/server/chunks/index-RTKpMYZ1.js +0 -397
- package/build/server/chunks/index-RTKpMYZ1.js.map +0 -1
- package/build/server/chunks/layout.svelte-BSvrn-4a.js +0 -8
- package/build/server/chunks/layout.svelte-BSvrn-4a.js.map +0 -1
- package/build/server/chunks/string-DLbvtT1R.js.map +0 -1
- package/dist/apps.d.ts +0 -6
- package/dist/apps.js +0 -6
- package/dist/plugins.d.ts +0 -49
- package/dist/plugins.js +0 -80
- package/dist/sveltekit.d.ts +0 -8
- package/dist/sveltekit.js +0 -60
- package/web/hooks.server.ts +0 -4
- /package/{axiumd.service → axium.service} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { fetchAPI } from '@axium/client/requests';
|
|
2
|
+
import { AuditFilter } from '@axium/core';
|
|
3
|
+
import { prettifyError, type input } from 'zod';
|
|
4
|
+
|
|
5
|
+
export const ssr = false;
|
|
6
|
+
|
|
7
|
+
const configured = await fetchAPI('OPTIONS', 'admin/audit/events').catch(() => false as const);
|
|
8
|
+
|
|
9
|
+
export async function load({ url }) {
|
|
10
|
+
let filterError = null;
|
|
11
|
+
try {
|
|
12
|
+
AuditFilter.parse(Object.fromEntries(url.searchParams));
|
|
13
|
+
} catch (e: any) {
|
|
14
|
+
filterError = prettifyError(e);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const filter: input<typeof AuditFilter> = filterError ? {} : Object.fromEntries(url.searchParams);
|
|
18
|
+
|
|
19
|
+
const events = await fetchAPI('GET', 'admin/audit/events', filter);
|
|
20
|
+
|
|
21
|
+
return { events, filterError, filter, configured };
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Severity } from '@axium/core/audit';
|
|
3
|
+
import '../styles.css';
|
|
4
|
+
import UserCard from '@axium/client/components/UserCard';
|
|
5
|
+
|
|
6
|
+
const { data } = $props();
|
|
7
|
+
const { event } = data;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<svelte:head>
|
|
11
|
+
<title>Admin — Audit Log Event #{event.id}</title>
|
|
12
|
+
</svelte:head>
|
|
13
|
+
|
|
14
|
+
<h2>Audit Event</h2>
|
|
15
|
+
|
|
16
|
+
<h4>UUID</h4>
|
|
17
|
+
<p>{event.id}</p>
|
|
18
|
+
|
|
19
|
+
<h4>Severity</h4>
|
|
20
|
+
<p class="severity--{Severity[event.severity].toLowerCase()}">{Severity[event.severity]}</p>
|
|
21
|
+
|
|
22
|
+
<h4>Name</h4>
|
|
23
|
+
<p>{event.name}</p>
|
|
24
|
+
|
|
25
|
+
<h4>Timestamp</h4>
|
|
26
|
+
<p>{new Date(event.timestamp).toLocaleString()}</p>
|
|
27
|
+
|
|
28
|
+
<h4>Source</h4>
|
|
29
|
+
<p>{event.source}</p>
|
|
30
|
+
|
|
31
|
+
<h4>Tags</h4>
|
|
32
|
+
<p>{event.tags.join(', ')}</p>
|
|
33
|
+
|
|
34
|
+
<h4>User</h4>
|
|
35
|
+
{#if event.user}
|
|
36
|
+
<UserCard user={event.user} href="/admin/users/{event.user.id}" />
|
|
37
|
+
{:else}
|
|
38
|
+
<i>Unknown</i>
|
|
39
|
+
{/if}
|
|
40
|
+
|
|
41
|
+
<h4>Extra Data</h4>
|
|
42
|
+
|
|
43
|
+
<pre>{JSON.stringify(event.extra, null, 4)}</pre>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.severity--emergency {
|
|
2
|
+
background-color: red;
|
|
3
|
+
color: white;
|
|
4
|
+
text-decoration: underline;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.severity--alert {
|
|
8
|
+
background-color: red;
|
|
9
|
+
color: white;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.severity--critical {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
color: red;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.severity--error {
|
|
18
|
+
color: red;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.severity--warning {
|
|
22
|
+
color: yellow;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.severity--notice {
|
|
26
|
+
color: cyan;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.severity--debug {
|
|
30
|
+
opacity: 0.7;
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const { data } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svelte:head>
|
|
6
|
+
<title>Admin — Configuration</title>
|
|
7
|
+
</svelte:head>
|
|
8
|
+
|
|
9
|
+
<h2>Active Configuration</h2>
|
|
10
|
+
|
|
11
|
+
<pre>{JSON.stringify(data.config, null, 4)}</pre>
|
|
12
|
+
|
|
13
|
+
<h2>Loaded Files</h2>
|
|
14
|
+
|
|
15
|
+
{#each Object.entries(data.files) as [path, config]}
|
|
16
|
+
<details>
|
|
17
|
+
<summary>{path}</summary>
|
|
18
|
+
<pre>{JSON.stringify(config, null, 4)}</pre>
|
|
19
|
+
</details>
|
|
20
|
+
{/each}
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
summary {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
padding: 1em 0;
|
|
26
|
+
font-size: large;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const { data } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svelte:head>
|
|
6
|
+
<title>Admin — Plugins</title>
|
|
7
|
+
</svelte:head>
|
|
8
|
+
|
|
9
|
+
<h2>Plugins</h2>
|
|
10
|
+
|
|
11
|
+
{#each data.plugins as plugin}
|
|
12
|
+
<h4>{plugin.name}</h4>
|
|
13
|
+
<p><strong>Loaded from</strong> {plugin.path} by {plugin._loadedBy ?? '<unknown>'}</p>
|
|
14
|
+
<p><strong>Version:</strong> {plugin.version}</p>
|
|
15
|
+
<p><strong>Author:</strong> {plugin.author}</p>
|
|
16
|
+
<p>
|
|
17
|
+
<strong>Provided apps:</strong>
|
|
18
|
+
{#if plugin.apps?.length}{plugin.apps?.map(a => a.name).join(', ')}{:else}<i>None</i>{/if}
|
|
19
|
+
</p>
|
|
20
|
+
<p>{plugin.description}</p>
|
|
21
|
+
{:else}
|
|
22
|
+
<i>No plugins loaded.</i>
|
|
23
|
+
{/each}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Icon from '@axium/client/components/Icon';
|
|
3
|
+
import '@axium/client/styles/list';
|
|
4
|
+
import { colorHash } from '@axium/core/color';
|
|
5
|
+
|
|
6
|
+
const { data } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<svelte:head>
|
|
10
|
+
<title>Admin - Users</title>
|
|
11
|
+
</svelte:head>
|
|
12
|
+
|
|
13
|
+
<h2>Users</h2>
|
|
14
|
+
|
|
15
|
+
{#snippet attr(i: string, text: string, color: string = colorHash(text))}
|
|
16
|
+
<span class="attribute" style:background-color={color}><Icon {i} />{text}</span>
|
|
17
|
+
{/snippet}
|
|
18
|
+
|
|
19
|
+
<div id="user-list" class="list">
|
|
20
|
+
<div class="list-item list-header">
|
|
21
|
+
<span>Name</span>
|
|
22
|
+
<span>Email</span>
|
|
23
|
+
<span>Attributes</span>
|
|
24
|
+
</div>
|
|
25
|
+
{#each data.users as user}
|
|
26
|
+
<div class="user list-item" onclick={e => e.currentTarget === e.target && (location.href = '/admin/users/' + user.id)}>
|
|
27
|
+
<span>{user.name}</span>
|
|
28
|
+
<span>{user.email}</span>
|
|
29
|
+
<span>
|
|
30
|
+
{#if user.isAdmin}
|
|
31
|
+
{@render attr('crown', 'Admin', '#710')}
|
|
32
|
+
{/if}
|
|
33
|
+
{#each user.tags as tag}
|
|
34
|
+
{@render attr('hashtag', tag)}
|
|
35
|
+
{/each}
|
|
36
|
+
{#each user.roles as role}
|
|
37
|
+
{@render attr('at', role)}
|
|
38
|
+
{/each}
|
|
39
|
+
</span>
|
|
40
|
+
<a href="/admin/audit?user={user.id}"><Icon i="file-shield" /></a>
|
|
41
|
+
<a href="/admin/users/{user.id}"><Icon i="chevron-right" /></a>
|
|
42
|
+
</div>
|
|
43
|
+
{:else}
|
|
44
|
+
<div class="error">No users!</div>
|
|
45
|
+
{/each}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
.list-item {
|
|
50
|
+
grid-template-columns: 1fr 1fr 3fr repeat(2, 2em);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.attribute {
|
|
54
|
+
border-radius: 1em;
|
|
55
|
+
padding: 0.25em 0.75em;
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 0.25em;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ClipboardCopy, Preferences, SessionList, Icon } from '@axium/client/components';
|
|
3
|
+
import '@axium/client/styles/account';
|
|
4
|
+
import { formatDateRange } from '@axium/core/format';
|
|
5
|
+
|
|
6
|
+
const { data } = $props();
|
|
7
|
+
const { user } = data;
|
|
8
|
+
|
|
9
|
+
let sessions = $state(user.sessions);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<svelte:head>
|
|
13
|
+
<title>Admin — User Management</title>
|
|
14
|
+
</svelte:head>
|
|
15
|
+
|
|
16
|
+
<a href="/admin/users">
|
|
17
|
+
<button class="icon-text">
|
|
18
|
+
<Icon i="up-left" /> Back to all users
|
|
19
|
+
</button>
|
|
20
|
+
</a>
|
|
21
|
+
|
|
22
|
+
<h2>User Management</h2>
|
|
23
|
+
|
|
24
|
+
<div class="section main">
|
|
25
|
+
<div class="item info">
|
|
26
|
+
<p>UUID</p>
|
|
27
|
+
<p>{user.id}</p>
|
|
28
|
+
<ClipboardCopy value={user.id} --size="16px" />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="item info">
|
|
32
|
+
<p>Display Name</p>
|
|
33
|
+
<p>{user.name}</p>
|
|
34
|
+
<ClipboardCopy value={user.name} --size="16px" />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="item info">
|
|
38
|
+
<p>Email</p>
|
|
39
|
+
<p>
|
|
40
|
+
<a href="mailto:{user.email}">{user.email}</a>, {user.emailVerified
|
|
41
|
+
? 'verified ' + user.emailVerified.toLocaleString()
|
|
42
|
+
: 'not verified'}
|
|
43
|
+
</p>
|
|
44
|
+
<ClipboardCopy value={user.email} --size="16px" />
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="item info">
|
|
48
|
+
<p>Registered</p>
|
|
49
|
+
<p>{formatDateRange(user.registeredAt)}</p>
|
|
50
|
+
<ClipboardCopy value={user.registeredAt.toISOString()} --size="16px" />
|
|
51
|
+
</div>
|
|
52
|
+
<div class="item info">
|
|
53
|
+
<p>Administrator</p>
|
|
54
|
+
{#if user.isAdmin}
|
|
55
|
+
<strong>Yes</strong>
|
|
56
|
+
{:else}
|
|
57
|
+
<p>No</p>
|
|
58
|
+
{/if}
|
|
59
|
+
<p></p>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="item info">
|
|
62
|
+
<p>Suspended</p>
|
|
63
|
+
{#if user.isSuspended}
|
|
64
|
+
<strong>Yes</strong>
|
|
65
|
+
{:else}
|
|
66
|
+
<p>No</p>
|
|
67
|
+
{/if}
|
|
68
|
+
<button>{user.isSuspended ? 'Unsuspend' : 'Suspend'}</button>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="item info">
|
|
71
|
+
<p>Profile Image</p>
|
|
72
|
+
{#if user.image}
|
|
73
|
+
<a href={user.image} target="_blank" rel="noopener noreferrer">{user.image}</a>
|
|
74
|
+
<ClipboardCopy value={user.image} --size="16px" />
|
|
75
|
+
{:else}
|
|
76
|
+
<i>Default</i>
|
|
77
|
+
<p></p>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
<div class="item info">
|
|
81
|
+
<p>Roles</p>
|
|
82
|
+
<p>{user.roles.join(', ')}</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="item info">
|
|
85
|
+
<p>Tags</p>
|
|
86
|
+
<p>{user.tags.join(', ')}</p>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div class="section main">
|
|
91
|
+
<h3>Sessions</h3>
|
|
92
|
+
<SessionList {sessions} {user} />
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div class="section main">
|
|
96
|
+
<h3>Preferences</h3>
|
|
97
|
+
<Preferences userId={user.id} bind:preferences={user.preferences} />
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
div.info {
|
|
102
|
+
grid-template-columns: 10em 1fr 6em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.section {
|
|
106
|
+
margin-bottom: 2em;
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { fetchAPI } from '@axium/client/requests';
|
|
2
|
+
|
|
3
|
+
export const ssr = false;
|
|
4
|
+
|
|
5
|
+
export async function load({ params }) {
|
|
6
|
+
const user = await fetchAPI('GET', 'admin/users/:userId', null, params.id);
|
|
7
|
+
|
|
8
|
+
for (const session of user.sessions) {
|
|
9
|
+
session.created = new Date(session.created);
|
|
10
|
+
session.expires = new Date(session.expires);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
user.registeredAt = new Date(user.registeredAt);
|
|
14
|
+
user.emailVerified = user.emailVerified ? new Date(user.emailVerified) : null;
|
|
15
|
+
|
|
16
|
+
return { user };
|
|
17
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Icon from '@axium/client/components/Icon';
|
|
3
|
+
import { fetchAPI } from '@axium/client/requests';
|
|
4
|
+
import { startAuthentication } from '@simplewebauthn/browser';
|
|
5
|
+
|
|
6
|
+
const { data } = $props();
|
|
7
|
+
|
|
8
|
+
let error = $state(data.error);
|
|
9
|
+
let authDone = $state(false);
|
|
10
|
+
|
|
11
|
+
async function loginFlow() {
|
|
12
|
+
const response = await startAuthentication({ optionsJSON: data.options! });
|
|
13
|
+
const newSession = await fetchAPI('POST', 'users/:id/auth', response, data.session.userId);
|
|
14
|
+
await fetch(data.localCallback, {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
headers: { 'Content-Type': 'application/json' },
|
|
17
|
+
body: JSON.stringify(newSession),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function onclick() {
|
|
22
|
+
loginFlow()
|
|
23
|
+
.then(() => (authDone = true))
|
|
24
|
+
.catch(e => {
|
|
25
|
+
error = e.message;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<svelte:head>
|
|
31
|
+
<title>Local Client Login</title>
|
|
32
|
+
</svelte:head>
|
|
33
|
+
|
|
34
|
+
{#if error}
|
|
35
|
+
<div class="error center">{error}</div>
|
|
36
|
+
{:else if authDone}
|
|
37
|
+
<div class="center success">
|
|
38
|
+
<h1><Icon i="check" /></h1>
|
|
39
|
+
<p>Login successful! You can close this tab.</p>
|
|
40
|
+
</div>
|
|
41
|
+
{:else}
|
|
42
|
+
<div id="local-login" class="center">
|
|
43
|
+
<h2>Local Client Login</h2>
|
|
44
|
+
<p>Are you sure you want to log in to this local client?</p>
|
|
45
|
+
<div>
|
|
46
|
+
<button>Cancel</button>
|
|
47
|
+
<button class="danger" {onclick}>Authorize</button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
{/if}
|
|
51
|
+
|
|
52
|
+
<style>
|
|
53
|
+
div.center {
|
|
54
|
+
width: fit-content;
|
|
55
|
+
height: fit-content;
|
|
56
|
+
top: 50%;
|
|
57
|
+
left: 50%;
|
|
58
|
+
transform: translate(-50%, -50%);
|
|
59
|
+
position: fixed;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
padding: 2em;
|
|
65
|
+
border-radius: 1em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#local-login {
|
|
69
|
+
background-color: var(--bg-menu);
|
|
70
|
+
border: 1px solid var(--border-accent);
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getCurrentSession } from '@axium/client/user';
|
|
2
|
+
import type { PageLoadEvent } from './$types';
|
|
3
|
+
import type { SessionAndUser } from '@axium/server/auth';
|
|
4
|
+
import { fetchAPI } from '@axium/client/requests';
|
|
5
|
+
|
|
6
|
+
export const ssr = false;
|
|
7
|
+
|
|
8
|
+
export async function load({ parent, url }: Omit<PageLoadEvent, 'parent'> & { parent?(): Promise<{ session: SessionAndUser }> }) {
|
|
9
|
+
const { session = await getCurrentSession() } = (await parent?.()) ?? {};
|
|
10
|
+
|
|
11
|
+
if (!session) location.href = '/login?after=/login/client' + location.search;
|
|
12
|
+
|
|
13
|
+
const port = parseInt(url.searchParams.get('port') ?? '!');
|
|
14
|
+
const localCallback = new URL('http://localhost');
|
|
15
|
+
|
|
16
|
+
let options,
|
|
17
|
+
error: string | null = null;
|
|
18
|
+
try {
|
|
19
|
+
if (Number.isNaN(port)) throw new Error('Invalid port number provided by local client');
|
|
20
|
+
localCallback.port = port.toString();
|
|
21
|
+
options = await fetchAPI('OPTIONS', 'users/:id/auth', { type: 'client_login' }, session.userId);
|
|
22
|
+
} catch (e: any) {
|
|
23
|
+
error = e.message;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return { options, error, session, localCallback };
|
|
27
|
+
}
|
package/routes/tsconfig.json
CHANGED
package/svelte.config.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import config from '@axium/server/config';
|
|
2
1
|
import node from '@sveltejs/adapter-node';
|
|
3
2
|
import { join } from 'node:path/posix';
|
|
4
3
|
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Paths relative to the directory of this file.
|
|
8
|
-
* This allows this file to be imported from other projects and still resolve to the correct paths.
|
|
9
|
-
*/
|
|
10
|
-
const fixed = p => join(import.meta.dirname, p);
|
|
4
|
+
import config from '@axium/server/config';
|
|
11
5
|
|
|
12
6
|
/** @type {import('@sveltejs/kit').Config} */
|
|
13
7
|
export default {
|
|
@@ -20,11 +14,11 @@ export default {
|
|
|
20
14
|
kit: {
|
|
21
15
|
adapter: node(),
|
|
22
16
|
files: {
|
|
23
|
-
routes: config.web.routes,
|
|
24
17
|
assets: join(fileURLToPath(new URL(import.meta.resolve('@axium/client'))), '../../assets'),
|
|
25
|
-
appTemplate:
|
|
18
|
+
appTemplate: join(import.meta.dirname, 'template.html'),
|
|
19
|
+
routes: config.web.routes,
|
|
26
20
|
hooks: {
|
|
27
|
-
|
|
21
|
+
universal: '/dev/null',
|
|
28
22
|
},
|
|
29
23
|
},
|
|
30
24
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
|
|
5
|
+
<link rel="icon" href="%sveltekit.assets%/favicon.svg" type="image/svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
<meta name="color-scheme" content="dark light" />
|
|
8
8
|
<link rel="stylesheet" href="%sveltekit.assets%/theme.css" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./DsnmJJEf.js";import{q as p,r as c,p as f,v as d,f as b,a as u}from"./D9TfJrfD.js";import{d as v}from"./Dy1O3iBu.js";import{p as n,i as _}from"./pba7IodQ.js";import{F as h,l as k}from"./DJeR1n-B.js";var w=(t,o)=>{t.preventDefault(),o().close(),history.back()},y=f("<button>Take me back</button>"),L=f("<p>Are you sure you want to log out?</p> <!>",1);function A(t,o){p(o,!0);let a=n(o,"dialog",15),l=n(o,"fullPage",3,!1);h(t,{get pageMode(){return l()},submitText:"Log Out",submit:()=>k().then(()=>window.location.href="/"),get dialog(){return a()},set dialog(r){a(r)},children:(r,P)=>{var i=L(),g=d(b(i),2);{var m=e=>{var s=y();s.__click=[w,a],u(e,s)};_(g,e=>{l()&&e(m)})}u(r,i)},$$slots:{default:!0}}),c()}v(["click"]);export{A as L};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as De,s as bt}from"./D4Bce_hb.js";import{D as me,b2 as kt,ay as T,a3 as x,a5 as P,t as Fe}from"./D9TfJrfD.js";const F=[];function Re(e,t=me){let n=null;const r=new Set;function a(o){if(kt(e,o)&&(e=o,n)){const c=!F.length;for(const l of r)l[1](),F.push(l,e);if(c){for(let l=0;l<F.length;l+=2)F[l][0](F[l+1]);F.length=0}}}function s(o){a(o(e))}function i(o,c=me){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||me),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ie{constructor(t,n){this.status=t,this.location=n}}class Ue extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function At(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Et(e){return e.split("%25").map(decodeURI).join("%25")}function St(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function Rt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function It(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const Ut=new TextDecoder;function Lt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Tt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&H.delete(Le(e)),Tt(e,t));const H=new Map;function xt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&H.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Lt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Pt(e,t,n){if(H.size>0){const r=Le(e,n),a=H.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);H.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${It(...a)}"]`}return r}const Ct=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Nt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${jt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return we(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return we(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Ct.exec(c),[,h,u,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!u,chained:u?l===1&&i[0]==="":!1}),u?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return we(c)}).join("")}).join("")}/?$`),params:t}}function Ot(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ot)}function $t(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function we(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Dt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:u}=Nt(o),f={id:o,exec:p=>{const w=h.exec(p);if(w)return $t(w,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function qe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const I=globalThis.__sveltekit_1mhgepf?.base??"",Ft=globalThis.__sveltekit_1mhgepf?.assets??I,qt="1756502069830",Ze="sveltekit:snapshot",Qe="sveltekit:scroll",et="sveltekit:states",Bt="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},fe=location.origin;function tt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ue(){return{x:pageXOffset,y:pageYOffset}}function q(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Be={...j,"":j.hover};function nt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function rt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=nt(e)}}function ke(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||de(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===fe&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),t===null&&(t=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=nt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Be[r??"off"],preload_data:Be[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Re(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const at={v:()=>{}};function Vt(){const{set:e,subscribe:t}=Re(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ft}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==qt;return i&&(e(!0),at.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function de(e,t,n){return e.origin!==fe||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Un(e){}function Me(e){const t=Gt(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const Mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Gt(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=Mt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Ht=-1,Kt=-2,Wt=-3,Yt=-4,zt=-5,Jt=-6;function Xt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Ht)return;if(s===Wt)return NaN;if(s===Yt)return 1/0;if(s===zt)return-1/0;if(s===Jt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t?.[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let f=1;f<o.length;f+=2)u[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=o[1],w=Me(p),_=new f(w);r[s]=_;break}case"ArrayBuffer":{const f=o[1],p=Me(f);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==Kt&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const ot=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ot];const Zt=new Set([...ot]);[...Zt];function Qt(e){return e.filter(t=>t!=null)}const en="x-sveltekit-invalidated",tn="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Ue?e.status:500}function nn(e){return e instanceof Ue?e.text:"Internal Error"}let E,J,ve;const rn=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());rn?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ve={current:!1}):(E=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},at.v=()=>ve.current=!0);function an(e){Object.assign(E,e)}const on="/__data.json",sn=".html__data.json";function cn(e){return e.endsWith(".html")?e.replace(/\.html$/,sn):e.replace(/\/$/,"")+on}const Ge={spanContext(){return ln},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},ln={traceId:"",spanId:"",traceFlags:0},{tick:fn}=bt,un=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Xe(Qe)??{},X=Xe(Ze)??{},O={url:Ve({}),page:Ve({}),navigating:Re(null),updated:Vt()};function Te(e){D[e]=ue()}function dn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function M(e){return location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(I||"/");e&&await e.update()}}function He(){}let xe,Ae,re,C,Ee,v;globalThis.__sveltekit_1mhgepf.data;const ae=[],oe=[];let N=null;const ee=new Map,it=new Set,hn=new Set,K=new Set;let y={branch:[],error:null,url:null},Pe=!1,se=!1,Ke=!0,Z=!1,G=!1,ct=!1,Ce=!1,lt,k,R,$;const W=new Set,We=new Map;async function Pn(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),xe=Dt(e),C=document.documentElement,Ee=t,Ae=e.nodes[0],re=e.nodes[1],Ae(),re(),k=history.state?.[B],R=history.state?.[z],k||(k=R=Date.now(),history.replaceState({...history.state,[B]:k,[z]:R},""));const r=D[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await An(Ee,n)):(await Y({type:"enter",url:tt(v.hash?Sn(new URL(location.href)):location.href),replace_state:!0}),a()),kn()}function pn(){ae.length=0,Ce=!1}function ft(e){oe.some(t=>t?.snapshot)&&(X[e]=oe.map(t=>t?.snapshot?.capture()))}function ut(e){X[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ye(){Te(k),qe(Qe,D),ft(R),qe(Ze,X)}async function dt(e,t,n,r){let a;const s=await Y({type:"goto",url:tt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ce=!0,a=[...We.keys()]),t.invalidate&&t.invalidate.forEach(bn)}});return t.invalidateAll&&Fe().then(Fe).then(()=>{We.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})}),s}async function gn(e){if(e.id!==N?.id){const t={};W.add(t),N={id:e.id,token:t,promise:gt({...e,preload:t}).then(n=>(W.delete(t),n.type==="loaded"&&n.state.error&&(N=null),n))}}return N.promise}async function be(e){const t=(await pe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ht(e,t,n){y=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(E,e.props.page),lt=new v.root({target:t,props:{...e.props,stores:O,components:oe},hydrate:n,sync:!1}),ut(R),n){const a={from:null,to:{params:y.params,route:{id:y.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};K.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(I&&(e.pathname===I||e.pathname===I+"/"))o="always";else for(const f of n)f?.slash!==void 0&&(o=f.slash);e.pathname=At(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Qt(n).map(f=>f.node.component),page:$e(E)}};i!==void 0&&(c.props.form=i);let l={},d=!E,h=0;for(let f=0;f<Math.max(n.length,y.branch.length);f+=1){const p=n[f],w=y.branch[f];p?.data!==w?.data&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||i!==void 0&&i!==E.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:E.data}),c}async function Ne({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){let d=function(...u){for(const f of u){const{href:p}=new URL(f,n);c.dependencies.add(p)}};const h={tracing:{enabled:!1,root:Ge,current:Ge},route:new Proxy(a,{get:(u,f)=>(o&&(c.route=!0),u[f])}),params:new Proxy(r,{get:(u,f)=>(o&&c.params.add(f),u[f])}),data:s?.data??null,url:Rt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,f){u instanceof Request&&(f={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...f});const{resolved:p,promise:w}=pt(u,f,n);return o&&d(p.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,h)??null}return{node:l,loader:e,server:s,universal:l.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:l.universal?.trailingSlash??s?.slash}}function pt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?Pt(r,a.href,t):xt(r,t);return{resolved:a,promise:s}}function ze(e,t,n,r,a,s){if(Ce)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function _n(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(E),constructors:[]}}}async function gt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(N?.id===e)return W.delete(N.token),N.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g?.().catch(()=>{})),l.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=y.url?e!==ce(y.url):!1,u=y.route?a.id!==y.route.id:!1,f=_n(y.url,n);let p=!1;const w=l.map((g,m)=>{const b=y.branch[m],A=!!g?.[0]&&(b?.loader!==g[1]||ze(p,u,h,f,b.server?.uses,r));return A&&(p=!0),A});if(w.some(Boolean)){try{d=await yt(n,w)}catch(g){const m=await V(g,{url:n,params:r,route:{id:e}});return W.has(s)?Je({error:m,url:n,params:r,route:a}):he({status:ne(g),error:m,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let S=!1;const L=l.map(async(g,m)=>{if(!g)return;const b=y.branch[m],A=_?.[m];if((!A||A.type==="skip")&&g[1]===b?.loader&&!ze(S,u,h,f,b.universal?.uses,r))return b;if(S=!0,A?.type==="error")throw A;return Ne({loader:g[1],url:n,params:r,route:a,parent:async()=>{const ge={};for(let _e=0;_e<m;_e+=1)Object.assign(ge,(await L[_e])?.data);return ge},server_data_node:Oe(A===void 0&&g[0]?{type:"skip"}:A??null,g[0]?b?.server:void 0)})});for(const g of L)g.catch(()=>{});const U=[];for(let g=0;g<l.length;g+=1)if(l[g])try{U.push(await L[g])}catch(m){if(m instanceof Ie)return{type:"redirect",location:m.location};if(W.has(s))return Je({error:await V(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(m),A;if(_?.includes(m))b=m.status??b,A=m.error;else if(m instanceof le)A=m.body;else{if(await O.updated.check())return await st(),await M(n);A=await V(m,{params:r,url:n,route:{id:a.id}})}const Q=await mn(g,U,i);return Q?ie({url:n,params:r,branch:U.slice(0,Q.idx).concat(Q.node),status:b,error:A,route:a}):await mt(n,{id:a.id},A,b)}else U.push(void 0);return ie({url:n,params:r,branch:U,status:200,error:null,route:a,form:t?void 0:null})}async function mn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function he({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await yt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==fe||n.pathname!==location.pathname||Pe)&&await M(n)}try{const o=await Ne({loader:Ae,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Oe(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Ie)return dt(new URL(o.location,location.href),{},0);throw o}}async function yn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>pt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function pe(e,t){if(e&&!de(e,I,v.hash)){const n=await yn(e);if(!n)return;const r=wn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:St(s),url:e}}}}function wn(e){return Et(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(I.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function _t({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(y,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Z||it.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=He,block:d=He}){const h=$;$=c;const u=await pe(t,!1),f=e==="enter"?je(y,u,t,e):_t({url:t,type:e,delta:n?.delta,intent:u});if(!f){d(),$===c&&($=h);return}const p=k,w=R;l(),Z=!0,se&&f.navigation.type!=="enter"&&O.navigating.set(J.current=f.navigation);let _=u&&await gt(u);if(!_){if(de(t,I,v.hash))return await M(t);_=await mt(t,{id:null},await V(new Ue(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect")if(o>=20)_=await he({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await dt(new URL(_.location,t).href,{},o+1,c),!1;else _.props.page.status>=400&&await O.updated.check()&&(await st(),await M(t));if(pn(),Te(p),ft(w),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,m={[B]:k+=g,[z]:R+=g,[et]:i};(s?history.replaceState:history.pushState).call(history,m,"",t),s||dn(k,R)}if(N=null,_.props.page.state=i,se){const g=(await Promise.all(Array.from(hn,m=>m(f.navigation)))).filter(m=>typeof m=="function");if(g.length>0){let m=function(){g.forEach(b=>{K.delete(b)})};g.push(m),g.forEach(b=>{K.add(b)})}y=_.state,_.props.page&&(_.props.page.url=t),lt.$set(_.props),an(_.props.page),ct=!0}else ht(_,Ee,!1);const{activeElement:S}=document;await fn();const L=n?n.scroll:a?ue():null;if(Ke){const g=t.hash&&document.getElementById(vt(t));L?scrollTo(L.x,L.y):g?g.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==S&&document.activeElement!==document.body;!r&&!U&&En(t),Ke=!0,_.props.page&&Object.assign(E,_.props.page),Z=!1,e==="popstate"&&ut(R),f.fulfil(void 0),K.forEach(g=>g(f.navigation)),O.navigating.set(J.current=null)}async function mt(e,t,n,r){return e.origin===fe&&e.pathname===location.pathname&&!Pe?await he({status:r,error:n,url:e,route:t}):await M(e)}function vn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(be(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=rt(o,C),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:u,download:f}=ke(l,I,v.hash);if(u||f)return;const p=te(l),w=h&&ce(y.url)===ce(h);if(!(p.reload||w))if(c<=p.preload_data){t=l,n=j.tap;const _=await pe(h,!1);if(!_)return;gn(_)}else c<=p.preload_code&&(t=l,n=c,be(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:l,download:d}=ke(o,I,v.hash);if(l||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&be(c))}}K.add(i),i()}function V(e,t){if(e instanceof le)return e.body;const n=ne(e),r=nn(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function bn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function kn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ye(),!Z){const r=je(y,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ye()}),navigator.connection?.saveData||vn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=rt(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ke(n,I,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[l,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=l===ye(location);if(a||o.reload&&(!h||!d)){_t({url:r,type:"link"})?Z=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=y.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const f=n.ownerDocument.getElementById(decodeURIComponent(d));f&&(f.scrollIntoView(),f.focus())}return}if(G=!0,Te(k),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(de(i,I,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(o),d=r?.getAttribute("name");d&&l.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(l).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Se){if(t.state?.[B]){const n=t.state[B];if($={},n===k)return;const r=D[n],a=t.state[et]??{},s=new URL(t.state[Bt]??location.href),i=t.state[z],o=y.url?ye(location)===ye(y.url):!1;if(i===R&&(ct||o)){a!==E.state&&(E.state=a),e(s),D[k]=ue(),r&&scrollTo(r.x,r.y),k=n;return}const l=n-k;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{k=n,R=i},block:()=>{history.go(-l)},nav_token:$})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++k,[z]:R},"",location.href))});for(const t of document.querySelectorAll("link"))un.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&O.navigating.set(J.current=null)});function e(t){y.url=E.url=t,O.page.set($e(E)),O.page.notify()}}async function An(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Pe=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await pe(l,!1)||{}),d=xe.find(({id:f})=>f===s.id);let h,u=!0;try{const f=r.map(async(w,_)=>{const S=o[_];return S?.uses&&(S.uses=wt(S.uses)),Ne({loader:v.nodes[w],url:l,params:a,route:s,parent:async()=>{const L={};for(let U=0;U<_;U+=1)Object.assign(L,(await f[U]).data);return L},server_data_node:Oe(S)})}),p=await Promise.all(f);if(d){const w=d.layouts;for(let _=0;_<w.length;_++)w[_]||p.splice(_,0,void 0)}h=ie({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Ie){await M(new URL(f.location,location.href));return}h=await he({status:ne(f),error:await V(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ht(h,e,u)}async function yt(e,t){const n=new URL(e);n.pathname=cn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(tn,"1"),n.searchParams.append(en,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader();function c(d){return Xt(d,{...v.decoders,Promise:h=>new Promise((u,f)=>{i.set(h,{fulfil:u,reject:f})})})}let l="";for(;;){const{done:d,value:h}=await o.read();if(d&&!l)break;for(l+=!h&&l?`
|
|
2
|
-
`:Ut.decode(h,{stream:!0});;){const u=l.indexOf(`
|
|
3
|
-
`);if(u===-1)break;const f=JSON.parse(l.slice(0,u));if(l=l.slice(u+1),f.type==="redirect")return s(f);if(f.type==="data")f.nodes?.forEach(p=>{p?.type==="data"&&(p.uses=wt(p.uses),p.data=c(p.data))}),s(f);else if(f.type==="chunk"){const{id:p,data:w,error:_}=f,S=i.get(p);i.delete(p),_?S.reject(c(_)):S.fulfil(c(w))}}}})}function wt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Se=!1;function En(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=vt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=ue();setTimeout(()=>{const i=history.state;Se=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Se=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,r){let a,s;const i=new Promise((c,l)=>{a=c,s=l});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function $e(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function vt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Pn as a,Un as l,E as p,O as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as c,x as f,y as _,z as d,A as l,B as u,E as h,C as m,D as v,F as y,G as o,H as g}from"./D9TfJrfD.js";function b(r,s,...n){var t=r,e=v,a;c(()=>{e!==(e=s())&&(a&&(y(a),a=null),a=m(()=>e(t,...n)))},h),f&&(t=o)}function w(r){return(s,...n)=>{var t=r(...n),e;if(f)e=o,_();else{var a=t.render().trim(),p=d(a);e=g(p),s.before(e)}const i=t.setup?.(e);l(e,e),typeof i=="function"&&u(i)}}export{w as c,b as s};
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,u as b,g as d,b as u,d as n,i as v,e as i,h as c,j as g,k as y,m as h,n as x,s as C,o as k,t as S}from"./D9TfJrfD.js";import{h as j,m as w,u as A}from"./Dy1O3iBu.js";import{c as D}from"./D3hk2v8y.js";function E(){return u===null&&d(),(u.ac??=new AbortController).signal}function f(t){n===null&&o(),b(()=>{const e=c(t);if(typeof e=="function")return e})}function M(t){n===null&&o(),f(()=>()=>c(t))}function O(t,e,{bubbles:s=!1,cancelable:l=!1}={}){return new CustomEvent(t,{detail:e,bubbles:s,cancelable:l})}function P(){const t=n;return t===null&&o(),(e,s,l)=>{const a=t.s.$$events?.[e];if(a){const p=v(a)?a.slice():[a],r=O(e,s,l);for(const m of p)m.call(t.x,r);return!r.defaultPrevented}return!0}}function U(t){n===null&&o(),n.l===null&&i(),_(n).b.push(t)}function $(t){n===null&&o(),n.l===null&&i(),_(n).a.push(t)}function _(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const q=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:$,beforeUpdate:U,createEventDispatcher:P,createRawSnippet:D,flushSync:g,getAbortSignal:E,getAllContexts:y,getContext:h,hasContext:x,hydrate:j,mount:w,onDestroy:M,onMount:f,setContext:C,settled:k,tick:S,unmount:A,untrack:c},Symbol.toStringTag,{value:"Module"}));export{f as o,q as s};
|
|
Binary file
|