@axium/server 0.19.8 → 0.19.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/assets/3.B53jfNY9.css +1 -0
- package/build/client/_app/immutable/assets/3.B53jfNY9.css.br +0 -0
- package/build/client/_app/immutable/assets/3.B53jfNY9.css.gz +0 -0
- package/build/client/_app/immutable/assets/_page.dJj6MsMM.css +1 -0
- package/build/client/_app/immutable/assets/_page.dJj6MsMM.css.br +0 -0
- package/build/client/_app/immutable/assets/_page.dJj6MsMM.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BJss2F7v.js +31 -0
- package/build/client/_app/immutable/chunks/BJss2F7v.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJss2F7v.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BYEtX5Az.js → BK1-xGGj.js} +1 -1
- package/build/client/_app/immutable/chunks/BK1-xGGj.js.br +0 -0
- package/build/client/_app/immutable/chunks/BK1-xGGj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{IgiyYk6u.js → BZOe2Jko.js} +1 -1
- package/build/client/_app/immutable/chunks/BZOe2Jko.js.br +0 -0
- package/build/client/_app/immutable/chunks/BZOe2Jko.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DY1x3fBx.js → DEcO6BQR.js} +1 -1
- package/build/client/_app/immutable/chunks/DEcO6BQR.js.br +5 -0
- package/build/client/_app/immutable/chunks/DEcO6BQR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{FWeOBoAM.js → DGhIdZ_j.js} +1 -1
- package/build/client/_app/immutable/chunks/DGhIdZ_j.js.br +0 -0
- package/build/client/_app/immutable/chunks/DGhIdZ_j.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQaZ7GJF.js +3 -0
- package/build/client/_app/immutable/chunks/DQaZ7GJF.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQaZ7GJF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{p-F-zYzk.js → sfKJ2mhH.js} +1 -1
- package/build/client/_app/immutable/chunks/sfKJ2mhH.js.br +0 -0
- package/build/client/_app/immutable/chunks/sfKJ2mhH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uU8Mt6Mg.js +1 -0
- package/build/client/_app/immutable/chunks/uU8Mt6Mg.js.br +0 -0
- package/build/client/_app/immutable/chunks/uU8Mt6Mg.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.8Nmyrt2W.js → app.CtLxdB3j.js} +2 -2
- package/build/client/_app/immutable/entry/app.CtLxdB3j.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CtLxdB3j.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BHoGWGCr.js +1 -0
- package/build/client/_app/immutable/entry/start.BHoGWGCr.js.br +0 -0
- package/build/client/_app/immutable/entry/start.BHoGWGCr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.fU2Fkia3.js → 0.DuvLHQ5N.js} +1 -1
- package/build/client/_app/immutable/nodes/0.DuvLHQ5N.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DuvLHQ5N.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.BJk095a1.js → 1.wyN-TXT3.js} +1 -1
- package/build/client/_app/immutable/nodes/1.wyN-TXT3.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.wyN-TXT3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.Cczp5_pl.js → 2.CiWhhaCq.js} +1 -1
- package/build/client/_app/immutable/nodes/2.CiWhhaCq.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CiWhhaCq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.Cs-6XQLG.js +1 -0
- package/build/client/_app/immutable/nodes/3.Cs-6XQLG.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Cs-6XQLG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.DFZa97F0.js → 4.CYhOOrTZ.js} +1 -1
- package/build/client/_app/immutable/nodes/4.CYhOOrTZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CYhOOrTZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CZtEsvvr.js +1 -0
- package/build/client/_app/immutable/nodes/5.CZtEsvvr.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CZtEsvvr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.ezb4muQm.js → 6.DpkTCLEe.js} +1 -1
- package/build/client/_app/immutable/nodes/6.DpkTCLEe.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DpkTCLEe.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/server/chunks/{0-BwO1RCtn.js → 0-B8fDicB8.js} +2 -2
- package/build/server/chunks/{0-BwO1RCtn.js.map → 0-B8fDicB8.js.map} +1 -1
- package/build/server/chunks/1-CZaQz0kM.js +9 -0
- package/build/server/chunks/{1-BKxrwtT_.js.map → 1-CZaQz0kM.js.map} +1 -1
- package/build/server/chunks/{2-BwMXZ3uH.js → 2-CVTt4PZM.js} +2 -2
- package/build/server/chunks/{2-BwMXZ3uH.js.map → 2-CVTt4PZM.js.map} +1 -1
- package/build/server/chunks/3-CYzzOoBn.js +13 -0
- package/build/server/chunks/3-CYzzOoBn.js.map +1 -0
- package/build/server/chunks/4-jbfAhnSm.js +9 -0
- package/build/server/chunks/4-jbfAhnSm.js.map +1 -0
- package/build/server/chunks/5-CfXowMzQ.js +9 -0
- package/build/server/chunks/5-CfXowMzQ.js.map +1 -0
- package/build/server/chunks/6-BRekt1OA.js +9 -0
- package/build/server/chunks/6-BRekt1OA.js.map +1 -0
- package/build/server/chunks/{user-BxKya_IG.js → FormDialog-qGzPcWE3.js} +779 -806
- package/build/server/chunks/FormDialog-qGzPcWE3.js.map +1 -0
- package/build/server/chunks/{Logout-Bn4ION8s.js → Logout-DWwALPvt.js} +3 -3
- package/build/server/chunks/Logout-DWwALPvt.js.map +1 -0
- package/build/server/chunks/{_page.svelte-C5WDLp_N.js → _page.svelte-BypU2Yzj.js} +3 -3
- package/build/server/chunks/_page.svelte-BypU2Yzj.js.map +1 -0
- package/build/server/chunks/{_page.svelte-Cajk6qyo.js → _page.svelte-CYPwBw0g.js} +3 -3
- package/build/server/chunks/_page.svelte-CYPwBw0g.js.map +1 -0
- package/build/server/chunks/_page.svelte-Dz_KPYcN.js +299 -0
- package/build/server/chunks/_page.svelte-Dz_KPYcN.js.map +1 -0
- package/build/server/chunks/_page.svelte-Fe_xIcJF.js +11 -0
- package/build/server/chunks/{_page.svelte-DfGguJ-z.js.map → _page.svelte-Fe_xIcJF.js.map} +1 -1
- package/build/server/chunks/{error.svelte-DkJRpKga.js → error.svelte-CZg-BdYa.js} +3 -3
- package/build/server/chunks/error.svelte-CZg-BdYa.js.map +1 -0
- package/build/server/chunks/{exports-Cc9yggiy.js → exports-Cy4FWdYs.js} +27 -4
- package/build/server/chunks/exports-Cy4FWdYs.js.map +1 -0
- package/build/server/chunks/{hooks.server-KNf9qJX2.js → hooks.server-Cpa72VJw.js} +3 -3
- package/build/server/chunks/{hooks.server-KNf9qJX2.js.map → hooks.server-Cpa72VJw.js.map} +1 -1
- package/build/server/chunks/{index-CBVFb-Fk.js → index-CNBqpMEu.js} +4 -42
- package/build/server/chunks/index-CNBqpMEu.js.map +1 -0
- package/build/server/index.js +3206 -2745
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +11 -8
- package/build/server/manifest.js.map +1 -1
- package/dist/requests.d.ts +1 -2
- package/package.json +1 -1
- package/routes/account/+page.svelte +156 -177
- package/routes/account/+page.ts +20 -0
- package/build/client/_app/immutable/assets/3.C2J9FN5q.css +0 -1
- package/build/client/_app/immutable/assets/3.C2J9FN5q.css.br +0 -0
- package/build/client/_app/immutable/assets/3.C2J9FN5q.css.gz +0 -0
- package/build/client/_app/immutable/assets/_page.CAgJ6UBm.css +0 -1
- package/build/client/_app/immutable/assets/_page.CAgJ6UBm.css.br +0 -0
- package/build/client/_app/immutable/assets/_page.CAgJ6UBm.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BYEtX5Az.js.br +0 -0
- package/build/client/_app/immutable/chunks/BYEtX5Az.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CvAQmxmx.js +0 -3
- package/build/client/_app/immutable/chunks/CvAQmxmx.js.br +0 -0
- package/build/client/_app/immutable/chunks/CvAQmxmx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DCUM25og.js +0 -1
- package/build/client/_app/immutable/chunks/DCUM25og.js.br +0 -0
- package/build/client/_app/immutable/chunks/DCUM25og.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DY1x3fBx.js.br +0 -0
- package/build/client/_app/immutable/chunks/DY1x3fBx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DYZBB-Ix.js +0 -31
- package/build/client/_app/immutable/chunks/DYZBB-Ix.js.br +0 -0
- package/build/client/_app/immutable/chunks/DYZBB-Ix.js.gz +0 -0
- package/build/client/_app/immutable/chunks/FWeOBoAM.js.br +0 -0
- package/build/client/_app/immutable/chunks/FWeOBoAM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/IgiyYk6u.js.br +0 -0
- package/build/client/_app/immutable/chunks/IgiyYk6u.js.gz +0 -0
- package/build/client/_app/immutable/chunks/p-F-zYzk.js.br +0 -0
- package/build/client/_app/immutable/chunks/p-F-zYzk.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.8Nmyrt2W.js.br +0 -0
- package/build/client/_app/immutable/entry/app.8Nmyrt2W.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Dhk026uj.js +0 -1
- package/build/client/_app/immutable/entry/start.Dhk026uj.js.br +0 -2
- package/build/client/_app/immutable/entry/start.Dhk026uj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.fU2Fkia3.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.fU2Fkia3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BJk095a1.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BJk095a1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.Cczp5_pl.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Cczp5_pl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BDbljB1E.js +0 -1
- package/build/client/_app/immutable/nodes/3.BDbljB1E.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BDbljB1E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DFZa97F0.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DFZa97F0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CObFvODa.js +0 -1
- package/build/client/_app/immutable/nodes/5.CObFvODa.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CObFvODa.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.ezb4muQm.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.ezb4muQm.js.gz +0 -0
- package/build/server/chunks/1-BKxrwtT_.js +0 -9
- package/build/server/chunks/3-Ct18gbtX.js +0 -9
- package/build/server/chunks/3-Ct18gbtX.js.map +0 -1
- package/build/server/chunks/4-B4PHWuxx.js +0 -9
- package/build/server/chunks/4-B4PHWuxx.js.map +0 -1
- package/build/server/chunks/5-CIWzJq4D.js +0 -9
- package/build/server/chunks/5-CIWzJq4D.js.map +0 -1
- package/build/server/chunks/6-BQsBMa_q.js +0 -9
- package/build/server/chunks/6-BQsBMa_q.js.map +0 -1
- package/build/server/chunks/Logout-Bn4ION8s.js.map +0 -1
- package/build/server/chunks/_page.svelte-C5WDLp_N.js.map +0 -1
- package/build/server/chunks/_page.svelte-Cajk6qyo.js.map +0 -1
- package/build/server/chunks/_page.svelte-DfGguJ-z.js +0 -11
- package/build/server/chunks/_page.svelte-WTcgrDKD.js +0 -312
- package/build/server/chunks/_page.svelte-WTcgrDKD.js.map +0 -1
- package/build/server/chunks/error.svelte-DkJRpKga.js.map +0 -1
- package/build/server/chunks/exports-Cc9yggiy.js.map +0 -1
- package/build/server/chunks/index-CBVFb-Fk.js.map +0 -1
- package/build/server/chunks/user-BxKya_IG.js.map +0 -1
- /package/build/client/_app/immutable/assets/{user.Cbakz6hh.css → FormDialog.Cbakz6hh.css} +0 -0
- /package/build/client/_app/immutable/assets/{user.Cbakz6hh.css.br → FormDialog.Cbakz6hh.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{user.Cbakz6hh.css.gz → FormDialog.Cbakz6hh.css.gz} +0 -0
package/build/server/manifest.js
CHANGED
|
@@ -10,16 +10,19 @@ return {
|
|
|
10
10
|
assets: new Set(["icons/brands.svg","icons/light.svg","icons/regular.svg","icons/solid.svg","styles.css"]),
|
|
11
11
|
mimeTypes: {".svg":"image/svg+xml",".css":"text/css"},
|
|
12
12
|
_: {
|
|
13
|
-
client: {start:"_app/immutable/entry/start.
|
|
13
|
+
client: {start:"_app/immutable/entry/start.BHoGWGCr.js",app:"_app/immutable/entry/app.CtLxdB3j.js",imports:["_app/immutable/entry/start.BHoGWGCr.js","_app/immutable/chunks/DQaZ7GJF.js","_app/immutable/chunks/BZOe2Jko.js","_app/immutable/chunks/uU8Mt6Mg.js","_app/immutable/chunks/BK1-xGGj.js","_app/immutable/chunks/sfKJ2mhH.js","_app/immutable/entry/app.CtLxdB3j.js","_app/immutable/chunks/uU8Mt6Mg.js","_app/immutable/chunks/BK1-xGGj.js","_app/immutable/chunks/DsnmJJEf.js","_app/immutable/chunks/BZOe2Jko.js","_app/immutable/chunks/sfKJ2mhH.js","_app/immutable/chunks/DGhIdZ_j.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
14
|
nodes: [
|
|
15
|
-
__memo(() => import('./chunks/0-
|
|
16
|
-
__memo(() => import('./chunks/1-
|
|
17
|
-
__memo(() => import('./chunks/2-
|
|
18
|
-
__memo(() => import('./chunks/3-
|
|
19
|
-
__memo(() => import('./chunks/4-
|
|
20
|
-
__memo(() => import('./chunks/5-
|
|
21
|
-
__memo(() => import('./chunks/6-
|
|
15
|
+
__memo(() => import('./chunks/0-B8fDicB8.js')),
|
|
16
|
+
__memo(() => import('./chunks/1-CZaQz0kM.js')),
|
|
17
|
+
__memo(() => import('./chunks/2-CVTt4PZM.js')),
|
|
18
|
+
__memo(() => import('./chunks/3-CYzzOoBn.js')),
|
|
19
|
+
__memo(() => import('./chunks/4-jbfAhnSm.js')),
|
|
20
|
+
__memo(() => import('./chunks/5-CfXowMzQ.js')),
|
|
21
|
+
__memo(() => import('./chunks/6-BRekt1OA.js'))
|
|
22
22
|
],
|
|
23
|
+
remotes: {
|
|
24
|
+
|
|
25
|
+
},
|
|
23
26
|
routes: [
|
|
24
27
|
{
|
|
25
28
|
id: "/_axium/default",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"icons/brands.svg\",\"icons/light.svg\",\"icons/regular.svg\",\"icons/solid.svg\",\"styles.css\"]),\n\tmimeTypes: {\".svg\":\"image/svg+xml\",\".css\":\"text/css\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.
|
|
1
|
+
{"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"icons/brands.svg\",\"icons/light.svg\",\"icons/regular.svg\",\"icons/solid.svg\",\"styles.css\"]),\n\tmimeTypes: {\".svg\":\"image/svg+xml\",\".css\":\"text/css\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.BHoGWGCr.js\",app:\"_app/immutable/entry/app.CtLxdB3j.js\",imports:[\"_app/immutable/entry/start.BHoGWGCr.js\",\"_app/immutable/chunks/DQaZ7GJF.js\",\"_app/immutable/chunks/BZOe2Jko.js\",\"_app/immutable/chunks/uU8Mt6Mg.js\",\"_app/immutable/chunks/BK1-xGGj.js\",\"_app/immutable/chunks/sfKJ2mhH.js\",\"_app/immutable/entry/app.CtLxdB3j.js\",\"_app/immutable/chunks/uU8Mt6Mg.js\",\"_app/immutable/chunks/BK1-xGGj.js\",\"_app/immutable/chunks/DsnmJJEf.js\",\"_app/immutable/chunks/BZOe2Jko.js\",\"_app/immutable/chunks/sfKJ2mhH.js\",\"_app/immutable/chunks/DGhIdZ_j.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js')),\n\t\t\t__memo(() => import('./nodes/4.js')),\n\t\t\t__memo(() => import('./nodes/5.js')),\n\t\t\t__memo(() => import('./nodes/6.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/_axium/default\",\n\t\t\t\tpattern: /^\\/_axium\\/default\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/account\",\n\t\t\t\tpattern: /^\\/account\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/login\",\n\t\t\t\tpattern: /^\\/login\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 4 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/logout\",\n\t\t\t\tpattern: /^\\/logout\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 5 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/register\",\n\t\t\t\tpattern: /^\\/register\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 6 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n\nexport const prerendered = new Set([]);\n\nexport const base = \"\";"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3G,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;AACtD,CAAC,CAAC,EAAE;AACJ,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,GAAG,CAAC,sCAAsC,CAAC,OAAO,CAAC,CAAC,wCAAwC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,sCAAsC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC;AACjoB,EAAE,KAAK,EAAE;AACT,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC,CAAC;AACvC,GAAG,MAAM,CAAC,MAAM,OAAO,wBAAc,CAAC;AACtC,GAAG;AACH,EAAE,OAAO,EAAE;AACX;AACA,GAAG;AACH,EAAE,MAAM,EAAE;AACV,GAAG;AACH,IAAI,EAAE,EAAE,iBAAiB;AACzB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,UAAU;AAClB,IAAI,OAAO,EAAE,gBAAgB;AAC7B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,QAAQ;AAChB,IAAI,OAAO,EAAE,cAAc;AAC3B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,SAAS;AACjB,IAAI,OAAO,EAAE,eAAe;AAC5B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,WAAW;AACnB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
|
package/dist/requests.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type User } from '@axium/core/user';
|
|
2
|
-
import type { Cookies as SK_Cookies } from '@sveltejs/kit';
|
|
3
2
|
import * as z from 'zod';
|
|
4
3
|
import { type UserInternal } from './auth.js';
|
|
5
4
|
import type { ServerRoute } from './routes.js';
|
|
@@ -14,7 +13,7 @@ export interface RequestEvent<Params extends Partial<Record<string, string>> = P
|
|
|
14
13
|
request: Request;
|
|
15
14
|
url: URL;
|
|
16
15
|
params: Params;
|
|
17
|
-
cookies:
|
|
16
|
+
cookies: any;
|
|
18
17
|
}
|
|
19
18
|
export interface ResponseError extends Error {
|
|
20
19
|
status: number;
|
package/package.json
CHANGED
|
@@ -1,44 +1,28 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ClipboardCopy, FormDialog, Icon, Logout } from '@axium/server/components';
|
|
3
2
|
import {
|
|
4
3
|
createPasskey,
|
|
5
4
|
deletePasskey,
|
|
6
5
|
deleteUser,
|
|
7
|
-
emailVerificationEnabled,
|
|
8
|
-
getCurrentSession,
|
|
9
|
-
getPasskeys,
|
|
10
|
-
getSessions,
|
|
11
6
|
logout,
|
|
12
7
|
logoutAll,
|
|
13
8
|
sendVerificationEmail,
|
|
14
9
|
updatePasskey,
|
|
15
10
|
updateUser,
|
|
16
11
|
} from '@axium/client/user';
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
12
|
+
import { getUserImage } from '@axium/core/user';
|
|
13
|
+
import { ClipboardCopy, FormDialog, Icon, Logout } from '@axium/server/components';
|
|
14
|
+
import type { PageProps } from './$types';
|
|
15
|
+
|
|
16
|
+
const { data }: PageProps = $props();
|
|
17
|
+
const { canVerify } = data;
|
|
19
18
|
|
|
20
19
|
const dialogs = $state<Record<string, HTMLDialogElement>>({});
|
|
21
20
|
|
|
22
21
|
let verificationSent = $state(false);
|
|
23
|
-
let currentSession = $state
|
|
24
|
-
let user = $state
|
|
25
|
-
let
|
|
26
|
-
let
|
|
27
|
-
let sessions = $state<Session[]>([]);
|
|
28
|
-
|
|
29
|
-
async function ready() {
|
|
30
|
-
currentSession = await getCurrentSession().catch(() => {
|
|
31
|
-
window.location.href = '/login?after=/account';
|
|
32
|
-
return null;
|
|
33
|
-
})!;
|
|
34
|
-
user = currentSession.user;
|
|
35
|
-
|
|
36
|
-
passkeys = await getPasskeys(user.id);
|
|
37
|
-
|
|
38
|
-
sessions = await getSessions(user.id);
|
|
39
|
-
|
|
40
|
-
canVerify = await emailVerificationEnabled(user.id);
|
|
41
|
-
}
|
|
22
|
+
let currentSession = $state(data.currentSession);
|
|
23
|
+
let user = $state(data.user);
|
|
24
|
+
let passkeys = $state(data.passkeys);
|
|
25
|
+
let sessions = $state(data.sessions);
|
|
42
26
|
|
|
43
27
|
async function _editUser(data) {
|
|
44
28
|
const result = await updateUser(user.id, data);
|
|
@@ -56,171 +40,164 @@
|
|
|
56
40
|
</button>
|
|
57
41
|
{/snippet}
|
|
58
42
|
|
|
59
|
-
|
|
60
|
-
<div
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<p class="greeting">Welcome, {user.name}</p>
|
|
43
|
+
<div class="Account flex-content">
|
|
44
|
+
<div id="pfp-container">
|
|
45
|
+
<img id="pfp" src={getUserImage(user)} alt="User profile" width="100px" height="100px" />
|
|
46
|
+
</div>
|
|
47
|
+
<p class="greeting">Welcome, {user.name}</p>
|
|
65
48
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
<div class="section main">
|
|
50
|
+
<h3>Personal Information</h3>
|
|
51
|
+
<div class="item info">
|
|
52
|
+
<p class="subtle">Name</p>
|
|
53
|
+
<p>{user.name}</p>
|
|
54
|
+
{@render action('edit_name')}
|
|
55
|
+
</div>
|
|
56
|
+
<FormDialog bind:dialog={dialogs.edit_name} submit={_editUser} submitText="Change">
|
|
57
|
+
<div>
|
|
58
|
+
<label for="name">What do you want to be called?</label>
|
|
59
|
+
<input name="name" type="text" value={user.name || ''} required />
|
|
72
60
|
</div>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
61
|
+
</FormDialog>
|
|
62
|
+
<div class="item info">
|
|
63
|
+
<p class="subtle">Email</p>
|
|
64
|
+
<p>
|
|
65
|
+
{user.email}
|
|
66
|
+
{#if user.emailVerified}
|
|
67
|
+
<dfn title="Email verified on {user.emailVerified.toLocaleDateString()}">
|
|
68
|
+
<Icon i="regular/circle-check" />
|
|
69
|
+
</dfn>
|
|
70
|
+
{:else if canVerify}
|
|
71
|
+
<button onclick={() => sendVerificationEmail(user.id).then(() => (verificationSent = true))}>
|
|
72
|
+
{verificationSent ? 'Verification email sent' : 'Verify'}
|
|
73
|
+
</button>
|
|
74
|
+
{/if}
|
|
75
|
+
</p>
|
|
76
|
+
{@render action('edit_email')}
|
|
77
|
+
</div>
|
|
78
|
+
<FormDialog bind:dialog={dialogs.edit_email} submit={_editUser} submitText="Change">
|
|
79
|
+
<div>
|
|
80
|
+
<label for="email">Email Address</label>
|
|
81
|
+
<input name="email" type="email" value={user.email || ''} required />
|
|
82
|
+
</div>
|
|
83
|
+
</FormDialog>
|
|
84
|
+
|
|
85
|
+
<div class="item info">
|
|
86
|
+
<p class="subtle">User ID <dfn title="This is your UUID. It can't be changed."><Icon i="regular/circle-info" /></dfn></p>
|
|
87
|
+
<p>{user.id}</p>
|
|
88
|
+
<ClipboardCopy value={user.id} --size="16px" />
|
|
89
|
+
</div>
|
|
90
|
+
<span>
|
|
91
|
+
<button class="signout" onclick={() => dialogs.logout.showModal()}>Sign Out</button>
|
|
92
|
+
<button style:cursor="pointer" onclick={() => dialogs.delete.showModal()} class="danger">Delete Account</button>
|
|
93
|
+
<Logout bind:dialog={dialogs.logout} />
|
|
94
|
+
<FormDialog
|
|
95
|
+
bind:dialog={dialogs.delete}
|
|
96
|
+
submit={() => deleteUser(user.id).then(() => (window.location.href = '/'))}
|
|
97
|
+
submitText="Delete Account"
|
|
98
|
+
submitDanger
|
|
99
|
+
>
|
|
100
|
+
<p>Are you sure you want to delete your account?<br />This action can't be undone.</p>
|
|
78
101
|
</FormDialog>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
</span>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="section main">
|
|
106
|
+
<h3>Passkeys</h3>
|
|
107
|
+
{#each passkeys as passkey}
|
|
108
|
+
<div class="item passkey">
|
|
109
|
+
<dfn title={passkey.deviceType == 'multiDevice' ? 'Multiple devices' : 'Single device'}>
|
|
110
|
+
<Icon i={passkey.deviceType == 'multiDevice' ? 'laptop-mobile' : 'mobile'} --size="16px" />
|
|
111
|
+
</dfn>
|
|
112
|
+
<dfn title="This passkey is {passkey.backedUp ? '' : 'not '}backed up">
|
|
113
|
+
<Icon i={passkey.backedUp ? 'circle-check' : 'circle-xmark'} --size="16px" />
|
|
114
|
+
</dfn>
|
|
115
|
+
{#if passkey.name}
|
|
116
|
+
<p>{passkey.name}</p>
|
|
117
|
+
{:else}
|
|
118
|
+
<p class="subtle"><i>Unnamed</i></p>
|
|
119
|
+
{/if}
|
|
120
|
+
<p>Created {passkey.createdAt.toLocaleString()}</p>
|
|
121
|
+
{@render action('edit_passkey#' + passkey.id)}
|
|
122
|
+
{#if passkeys.length > 1}
|
|
123
|
+
{@render action('delete_passkey#' + passkey.id, 'trash')}
|
|
124
|
+
{:else}
|
|
125
|
+
<dfn title="You must have at least one passkey" class="disabled">
|
|
126
|
+
<Icon i="trash-slash" --fill="#888" --size="16px" />
|
|
127
|
+
</dfn>
|
|
128
|
+
{/if}
|
|
94
129
|
</div>
|
|
95
|
-
<FormDialog
|
|
130
|
+
<FormDialog
|
|
131
|
+
bind:dialog={dialogs['edit_passkey#' + passkey.id]}
|
|
132
|
+
submit={data => {
|
|
133
|
+
if (typeof data.name != 'string') throw 'Passkey name must be a string';
|
|
134
|
+
passkey.name = data.name;
|
|
135
|
+
return updatePasskey(passkey.id, data);
|
|
136
|
+
}}
|
|
137
|
+
submitText="Change"
|
|
138
|
+
>
|
|
96
139
|
<div>
|
|
97
|
-
<label for="
|
|
98
|
-
<input name="
|
|
140
|
+
<label for="name">Passkey Name</label>
|
|
141
|
+
<input name="name" type="text" value={passkey.name || ''} />
|
|
99
142
|
</div>
|
|
100
143
|
</FormDialog>
|
|
144
|
+
<FormDialog
|
|
145
|
+
bind:dialog={dialogs['delete_passkey#' + passkey.id]}
|
|
146
|
+
submit={() => deletePasskey(passkey.id).then(() => passkeys.splice(passkeys.indexOf(passkey), 1))}
|
|
147
|
+
submitText="Delete"
|
|
148
|
+
submitDanger={true}
|
|
149
|
+
>
|
|
150
|
+
<p>Are you sure you want to delete this passkey?<br />This action can't be undone.</p>
|
|
151
|
+
</FormDialog>
|
|
152
|
+
{/each}
|
|
153
|
+
<span>
|
|
154
|
+
<button onclick={() => createPasskey(user.id).then(passkeys.push.bind(passkeys))}><Icon i="plus" /> Create</button>
|
|
155
|
+
</span>
|
|
156
|
+
</div>
|
|
101
157
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<Logout bind:dialog={dialogs.logout} />
|
|
111
|
-
<FormDialog
|
|
112
|
-
bind:dialog={dialogs.delete}
|
|
113
|
-
submit={() => deleteUser(user.id).then(() => (window.location.href = '/'))}
|
|
114
|
-
submitText="Delete Account"
|
|
115
|
-
submitDanger
|
|
116
|
-
>
|
|
117
|
-
<p>Are you sure you want to delete your account?<br />This action can't be undone.</p>
|
|
118
|
-
</FormDialog>
|
|
119
|
-
</span>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
<div class="section main">
|
|
123
|
-
<h3>Passkeys</h3>
|
|
124
|
-
{#each passkeys as passkey}
|
|
125
|
-
<div class="item passkey">
|
|
126
|
-
<dfn title={passkey.deviceType == 'multiDevice' ? 'Multiple devices' : 'Single device'}>
|
|
127
|
-
<Icon i={passkey.deviceType == 'multiDevice' ? 'laptop-mobile' : 'mobile'} --size="16px" />
|
|
128
|
-
</dfn>
|
|
129
|
-
<dfn title="This passkey is {passkey.backedUp ? '' : 'not '}backed up">
|
|
130
|
-
<Icon i={passkey.backedUp ? 'circle-check' : 'circle-xmark'} --size="16px" />
|
|
131
|
-
</dfn>
|
|
132
|
-
{#if passkey.name}
|
|
133
|
-
<p>{passkey.name}</p>
|
|
134
|
-
{:else}
|
|
135
|
-
<p class="subtle"><i>Unnamed</i></p>
|
|
158
|
+
<div class="section main">
|
|
159
|
+
<h3>Sessions</h3>
|
|
160
|
+
{#each sessions as session}
|
|
161
|
+
<div class="item session">
|
|
162
|
+
<p>
|
|
163
|
+
{session.id.slice(0, 4)}...{session.id.slice(-4)}
|
|
164
|
+
{#if session.id == currentSession.id}
|
|
165
|
+
<span class="current">Current</span>
|
|
136
166
|
{/if}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{#if passkeys.length > 1}
|
|
140
|
-
{@render action('delete_passkey#' + passkey.id, 'trash')}
|
|
141
|
-
{:else}
|
|
142
|
-
<dfn title="You must have at least one passkey" class="disabled">
|
|
143
|
-
<Icon i="trash-slash" --fill="#888" --size="16px" />
|
|
144
|
-
</dfn>
|
|
167
|
+
{#if session.elevated}
|
|
168
|
+
<span class="elevated">Elevated</span>
|
|
145
169
|
{/if}
|
|
146
|
-
</
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
passkey.name = data.name;
|
|
152
|
-
return updatePasskey(passkey.id, data);
|
|
153
|
-
}}
|
|
154
|
-
submitText="Change"
|
|
155
|
-
>
|
|
156
|
-
<div>
|
|
157
|
-
<label for="name">Passkey Name</label>
|
|
158
|
-
<input name="name" type="text" value={passkey.name || ''} />
|
|
159
|
-
</div>
|
|
160
|
-
</FormDialog>
|
|
161
|
-
<FormDialog
|
|
162
|
-
bind:dialog={dialogs['delete_passkey#' + passkey.id]}
|
|
163
|
-
submit={() => deletePasskey(passkey.id).then(() => passkeys.splice(passkeys.indexOf(passkey), 1))}
|
|
164
|
-
submitText="Delete"
|
|
165
|
-
submitDanger={true}
|
|
166
|
-
>
|
|
167
|
-
<p>Are you sure you want to delete this passkey?<br />This action can't be undone.</p>
|
|
168
|
-
</FormDialog>
|
|
169
|
-
{/each}
|
|
170
|
-
<span>
|
|
171
|
-
<button onclick={() => createPasskey(user.id).then(passkeys.push.bind(passkeys))}><Icon i="plus" /> Create</button>
|
|
172
|
-
</span>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<div class="section main">
|
|
176
|
-
<h3>Sessions</h3>
|
|
177
|
-
{#each sessions as session}
|
|
178
|
-
<div class="item session">
|
|
179
|
-
<p>
|
|
180
|
-
{session.id.slice(0, 4)}...{session.id.slice(-4)}
|
|
181
|
-
{#if session.id == currentSession.id}
|
|
182
|
-
<span class="current">Current</span>
|
|
183
|
-
{/if}
|
|
184
|
-
{#if session.elevated}
|
|
185
|
-
<span class="elevated">Elevated</span>
|
|
186
|
-
{/if}
|
|
187
|
-
</p>
|
|
188
|
-
<p>Created {session.created.toLocaleString()}</p>
|
|
189
|
-
<p>Expires {session.expires.toLocaleString()}</p>
|
|
190
|
-
{@render action('logout#' + session.id, 'right-from-bracket')}
|
|
191
|
-
</div>
|
|
192
|
-
<FormDialog
|
|
193
|
-
bind:dialog={dialogs['logout#' + session.id]}
|
|
194
|
-
submit={async () => {
|
|
195
|
-
await logout(user.id, session.id);
|
|
196
|
-
dialogs['logout#' + session.id].remove();
|
|
197
|
-
sessions.splice(sessions.indexOf(session), 1);
|
|
198
|
-
if (session.id == currentSession.id) window.location.href = '/';
|
|
199
|
-
}}
|
|
200
|
-
submitText="Logout"
|
|
201
|
-
>
|
|
202
|
-
<p>Are you sure you want to log out this session?</p>
|
|
203
|
-
</FormDialog>
|
|
204
|
-
{/each}
|
|
205
|
-
<span>
|
|
206
|
-
<button onclick={() => dialogs.logout_all.showModal()} class="danger">Logout All</button>
|
|
207
|
-
</span>
|
|
170
|
+
</p>
|
|
171
|
+
<p>Created {session.created.toLocaleString()}</p>
|
|
172
|
+
<p>Expires {session.expires.toLocaleString()}</p>
|
|
173
|
+
{@render action('logout#' + session.id, 'right-from-bracket')}
|
|
174
|
+
</div>
|
|
208
175
|
<FormDialog
|
|
209
|
-
bind:dialog={dialogs['
|
|
210
|
-
submit={
|
|
211
|
-
|
|
212
|
-
|
|
176
|
+
bind:dialog={dialogs['logout#' + session.id]}
|
|
177
|
+
submit={async () => {
|
|
178
|
+
await logout(user.id, session.id);
|
|
179
|
+
dialogs['logout#' + session.id].remove();
|
|
180
|
+
sessions.splice(sessions.indexOf(session), 1);
|
|
181
|
+
if (session.id == currentSession.id) window.location.href = '/';
|
|
182
|
+
}}
|
|
183
|
+
submitText="Logout"
|
|
213
184
|
>
|
|
214
|
-
<p>Are you sure you want to log out
|
|
185
|
+
<p>Are you sure you want to log out this session?</p>
|
|
215
186
|
</FormDialog>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
{
|
|
219
|
-
|
|
220
|
-
<
|
|
221
|
-
|
|
187
|
+
{/each}
|
|
188
|
+
<span>
|
|
189
|
+
<button onclick={() => dialogs.logout_all.showModal()} class="danger">Logout All</button>
|
|
190
|
+
</span>
|
|
191
|
+
<FormDialog
|
|
192
|
+
bind:dialog={dialogs['logout_all']}
|
|
193
|
+
submit={() => logoutAll(user.id).then(() => (window.location.href = '/'))}
|
|
194
|
+
submitText="Logout All Sessions"
|
|
195
|
+
submitDanger
|
|
196
|
+
>
|
|
197
|
+
<p>Are you sure you want to log out all sessions?</p>
|
|
198
|
+
</FormDialog>
|
|
222
199
|
</div>
|
|
223
|
-
|
|
200
|
+
</div>
|
|
224
201
|
|
|
225
202
|
<style>
|
|
226
203
|
#pfp-container {
|
|
@@ -254,9 +231,11 @@
|
|
|
254
231
|
width: 50%;
|
|
255
232
|
padding-top: 4em;
|
|
256
233
|
|
|
234
|
+
/* This is causing duplicate separators when removing sessions/passkeys
|
|
257
235
|
> div:has(+ div) {
|
|
258
236
|
border-bottom: 1px solid #8888;
|
|
259
237
|
}
|
|
238
|
+
*/
|
|
260
239
|
}
|
|
261
240
|
|
|
262
241
|
.section .item {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { emailVerificationEnabled, getCurrentSession, getPasskeys, getSessions } from '@axium/client/user';
|
|
2
|
+
|
|
3
|
+
export const ssr = false;
|
|
4
|
+
|
|
5
|
+
export async function load() {
|
|
6
|
+
const currentSession = await getCurrentSession().catch(() => {
|
|
7
|
+
window.location.href = '/login?after=/account';
|
|
8
|
+
return null;
|
|
9
|
+
})!;
|
|
10
|
+
|
|
11
|
+
const user = currentSession.user;
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
currentSession,
|
|
15
|
+
user,
|
|
16
|
+
passkeys: await getPasskeys(user.id),
|
|
17
|
+
sessions: await getSessions(user.id),
|
|
18
|
+
canVerify: await emailVerificationEnabled(user.id),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg.svelte-ylmrta{width:var(--size, 1em);height:var(--size, 1em);display:inline-block;fill:var(--fill, #bbb)}button.svelte-g409dh{position:relative;display:inline-block;width:1em;height:1em;border:none;background:transparent}span.svelte-g409dh{position:absolute;inset:0}#pfp-container.svelte-11mz0yj{width:100px;height:100px;margin-top:3em}#pfp-container.svelte-11mz0yj .MenuToggle{float:right;position:relative;top:-24px}#pfp.svelte-11mz0yj{width:100px;height:100px;border-radius:50%;border:1px solid #8888}.greeting.svelte-11mz0yj{font-size:2em}.signout.svelte-11mz0yj{margin-top:2em}.section.svelte-11mz0yj{width:50%;padding-top:4em}.section.svelte-11mz0yj>div:where(.svelte-11mz0yj):has(+div:where(.svelte-11mz0yj)){border-bottom:1px solid #8888}.section.svelte-11mz0yj .item:where(.svelte-11mz0yj){display:grid;align-items:center;width:100%;gap:1em;text-wrap:nowrap;border-top:1px solid #8888;padding-bottom:1em}.info.svelte-11mz0yj{grid-template-columns:10em 1fr 2em}.info.svelte-11mz0yj>:where(.svelte-11mz0yj):first-child{margin-left:1em}.info.svelte-11mz0yj>:where(.svelte-11mz0yj):nth-child(2){text-overflow:ellipsis;overflow:hidden}.passkey.svelte-11mz0yj{grid-template-columns:1em 1em 1fr 1fr 1em 1em}.passkey.svelte-11mz0yj dfn:where(.svelte-11mz0yj):not(.disabled){cursor:help}.session.svelte-11mz0yj{grid-template-columns:1fr 1fr 1fr 1em}.session.svelte-11mz0yj .current:where(.svelte-11mz0yj){border-radius:2em;padding:0 .5em;background-color:#337}.session.svelte-11mz0yj .elevated:where(.svelte-11mz0yj){border-radius:2em;padding:0 .5em;background-color:#733}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg.svelte-ylmrta{width:var(--size, 1em);height:var(--size, 1em);display:inline-block;fill:var(--fill, #bbb)}button.svelte-g409dh{position:relative;display:inline-block;width:1em;height:1em;border:none;background:transparent}span.svelte-g409dh{position:absolute;inset:0}#pfp-container.svelte-11mz0yj{width:100px;height:100px;margin-top:3em;.MenuToggle{float:right;position:relative;top:-24px}}#pfp.svelte-11mz0yj{width:100px;height:100px;border-radius:50%;border:1px solid #8888}.greeting.svelte-11mz0yj{font-size:2em}.signout.svelte-11mz0yj{margin-top:2em}.section.svelte-11mz0yj{width:50%;padding-top:4em;>div:where(.svelte-11mz0yj):has(+div:where(.svelte-11mz0yj)){border-bottom:1px solid #8888}}.section.svelte-11mz0yj .item:where(.svelte-11mz0yj){display:grid;align-items:center;width:100%;gap:1em;text-wrap:nowrap;border-top:1px solid #8888;padding-bottom:1em}.info.svelte-11mz0yj{grid-template-columns:10em 1fr 2em;>:where(.svelte-11mz0yj):first-child{margin-left:1em}>:where(.svelte-11mz0yj):nth-child(2){text-overflow:ellipsis;overflow:hidden}}.passkey.svelte-11mz0yj{grid-template-columns:1em 1em 1fr 1fr 1em 1em;dfn:where(.svelte-11mz0yj):not(.disabled){cursor:help}}.session.svelte-11mz0yj{grid-template-columns:1fr 1fr 1fr 1em;.current:where(.svelte-11mz0yj){border-radius:2em;padding:0 .5em;background-color:#337}.elevated:where(.svelte-11mz0yj){border-radius:2em;padding:0 .5em;background-color:#733}}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as De,s as yt}from"./IgiyYk6u.js";import{D as me,aZ as wt,ax as T,a3 as x,a5 as P}from"./DCUM25og.js";const B=[];function Re(e,t=me){let n=null;const r=new Set;function a(o){if(wt(e,o)&&(e=o,n)){const c=!B.length;for(const l of r)l[1](),B.push(l,e);if(c){for(let l=0;l<B.length;l+=2)B[l][0](B[l+1]);B.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 vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function bt(e){return e.split("%25").map(decodeURI).join("%25")}function At(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function St(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 kt(...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)}function Et(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.buffer}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&H.delete(Le(e)),Rt(e,t));const H=new Map;function It(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){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=Et(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ut(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="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Tt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Pt(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(m=>parseInt(m,16))));const d=Lt.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 xt(e){return!/^\([^)]+\)$/.test(e)}function Pt(e){return e.slice(1).split("/").filter(xt)}function Ct(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 Ot({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}=Tt(o),f={id:o,exec:p=>{const m=h.exec(p);if(m)return Ct(m,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 Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_v4gtx8?.base??"",Nt=globalThis.__sveltekit_v4gtx8?.assets??U,jt="1754589518336",ze="sveltekit:snapshot",Je="sveltekit:scroll",Xe="sveltekit:states",$t="sveltekit:pageurl",V="sveltekit:history",z="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},fe=location.origin;function Ze(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 F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function Ae(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=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=Qe(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[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 tt={v:()=>{}};function Dt(){const{set:e,subscribe:t}=Re(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==jt;return i&&(e(!0),tt.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 Sn(e){}function qe(e){const t=Ft(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 Bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ft(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|=Bt.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 Vt=-1,qt=-2,Mt=-3,Gt=-4,Ht=-5,Kt=-6;function Wt(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===Vt)return;if(s===Mt)return NaN;if(s===Gt)return 1/0;if(s===Ht)return-1/0;if(s===Kt)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],m=qe(p),_=new f(m);r[s]=_;break}case"ArrayBuffer":{const f=o[1],p=qe(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!==qt&&(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 nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const Yt=new Set([...nt]);[...Yt];function zt(e){return e.filter(t=>t!=null)}const Jt="x-sveltekit-invalidated",Xt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Ue?e.status:500}function Zt(e){return e instanceof Ue?e.text:"Internal Error"}let k,J,ve;const Qt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());Qt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ve={current:!1}):(k=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)}},tt.v=()=>ve.current=!0);function en(e){Object.assign(k,e)}const tn="/__data.json",nn=".html__data.json";function rn(e){return e.endsWith(".html")?e.replace(/\.html$/,nn):e.replace(/\/$/,"")+tn}const{tick:an}=yt,on=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ye(Je)??{},X=Ye(ze)??{},N={url:Ve({}),page:Ve({}),navigating:Re(null),updated:Dt()};function Te(e){D[e]=ue()}function sn(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 rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function Me(){}let xe,Se,re,C,ke,v;const ae=[],oe=[];let O=null;const ee=new Map,at=new Set,cn=new Set,K=new Set;let w={branch:[],error:null,url:null},Pe=!1,se=!1,Ge=!0,Z=!1,G=!1,ot=!1,Ce=!1,st,A,I,$;const W=new Set;async function In(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),xe=Ot(e),C=document.documentElement,ke=t,Se=e.nodes[0],re=e.nodes[1],Se(),re(),A=history.state?.[V],I=history.state?.[z],A||(A=I=Date.now(),history.replaceState({...history.state,[V]:A,[z]:I},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await yn(ke,n)):(await Y({type:"enter",url:Ze(v.hash?vn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function ln(){ae.length=0,Ce=!1}function it(e){oe.some(t=>t?.snapshot)&&(X[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){X[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function He(){Te(A),Be(Je,D),it(I),Be(ze,X)}async function lt(e,t,n,r){return Y({type:"goto",url:Ze(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),t.invalidate&&t.invalidate.forEach(_n)}})}async function fn(e){if(e.id!==O?.id){const t={};W.add(t),O={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(W.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.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 ft(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),ct(I),n){const a={from:null,to:{params:w.params,route:{id:w.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(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const f of n)f?.slash!==void 0&&(o=f.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:zt(n).map(f=>f.node.component),page:$e(k)}};i!==void 0&&(c.props.form=i);let l={},d=!k,h=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const p=n[f],m=w.branch[f];p?.data!==m?.data&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==k.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:k.data}),c}async function Oe({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={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:St(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:m}=ut(u,f,n);return o&&d(p.href),m},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 ut(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?Ut(r,a.href,t):It(r,t);return{resolved:a,promise:s}}function Ke(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]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function un(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 We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(k),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return W.delete(O.token),O.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=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,f=un(w.url,n);let p=!1;const m=l.map((g,y)=>{const b=w.branch[y],S=!!g?.[0]&&(b?.loader!==g[1]||Ke(p,u,h,f,b.server?.uses,r));return S&&(p=!0),S});if(m.some(Boolean)){try{d=await gt(n,m)}catch(g){const y=await q(g,{url:n,params:r,route:{id:e}});return W.has(s)?We({error:y,url:n,params:r,route:a}):he({status:ne(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let R=!1;const E=l.map(async(g,y)=>{if(!g)return;const b=w.branch[y],S=_?.[y];if((!S||S.type==="skip")&&g[1]===b?.loader&&!Ke(R,u,h,f,b.universal?.uses,r))return b;if(R=!0,S?.type==="error")throw S;return Oe({loader:g[1],url:n,params:r,route:a,parent:async()=>{const ge={};for(let _e=0;_e<y;_e+=1)Object.assign(ge,(await E[_e])?.data);return ge},server_data_node:Ne(S===void 0&&g[0]?{type:"skip"}:S??null,g[0]?b?.server:void 0)})});for(const g of E)g.catch(()=>{});const L=[];for(let g=0;g<l.length;g+=1)if(l[g])try{L.push(await E[g])}catch(y){if(y instanceof Ie)return{type:"redirect",location:y.location};if(W.has(s))return We({error:await q(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(y),S;if(_?.includes(y))b=y.status??b,S=y.error;else if(y instanceof le)S=y.body;else{if(await N.updated.check())return await rt(),await M(n);S=await q(y,{params:r,url:n,route:{id:a.id}})}const Q=await dn(g,L,i);return Q?ie({url:n,params:r,branch:L.slice(0,Q.idx).concat(Q.node),status:b,error:S,route:a}):await pt(n,{id:a.id},S,b)}else L.push(void 0);return ie({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function dn(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 gt(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 Oe({loader:Se,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(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 lt(new URL(o.location,location.href),{},0);throw o}}async function hn(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)=>ut(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,U,v.hash)){const n=await hn(e);if(!n)return;const r=pn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:At(s),url:e}}}}function pn(e){return bt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(w,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||at.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=Me,block:d=Me}){const h=$;$=c;const u=await pe(t,!1),f=e==="enter"?je(w,u,t,e):ht({url:t,type:e,delta:n?.delta,intent:u});if(!f){d(),$===c&&($=h);return}const p=A,m=I;l(),Z=!0,se&&f.navigation.type!=="enter"&&N.navigating.set(J.current=f.navigation);let _=u&&await dt(u);if(!_){if(de(t,U,v.hash))return await M(t);_=await pt(t,{id:null},await q(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 q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await lt(new URL(_.location,t).href,{},o+1,c),!1;else _.props.page.status>=400&&await N.updated.check()&&(await rt(),await M(t));if(ln(),Te(p),it(m),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[V]:A+=g,[z]:I+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||sn(A,I)}if(O=null,_.props.page.state=i,se){w=_.state,_.props.page&&(_.props.page.url=t);const g=(await Promise.all(Array.from(cn,y=>y(f.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{K.delete(b)})};g.push(y),g.forEach(b=>{K.add(b)})}st.$set(_.props),en(_.props.page),ot=!0}else ft(_,ke,!1);const{activeElement:R}=document;await an();const E=n?n.scroll:a?ue():null;if(Ge){const g=t.hash&&document.getElementById(mt(t));E?scrollTo(E.x,E.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&wn(t),Ge=!0,_.props.page&&Object.assign(k,_.props.page),Z=!1,e==="popstate"&&ct(I),f.fulfil(void 0),K.forEach(g=>g(f.navigation)),N.navigating.set(J.current=null)}async function pt(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 gn(){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=et(o,C),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:u,download:f}=Ae(l,U,v.hash);if(u||f)return;const p=te(l),m=h&&ce(w.url)===ce(h);if(!(p.reload||m))if(c<=p.preload_data){t=l,n=j.tap;const _=await pe(h,!1);if(!_)return;fn(_)}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}=Ae(o,U,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 q(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Zt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function _n(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function mn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(He(),!Z){const r=je(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&He()}),navigator.connection?.saveData||gn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=Ae(n,U,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)){ht({url:r,type:"link"})?Z=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.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(A),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,U,!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(!Ee){if(t.state?.[V]){const n=t.state[V];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[$t]??location.href),i=t.state[z],o=w.url?ye(location)===ye(w.url):!1;if(i===I&&(ot||o)){a!==k.state&&(k.state=a),e(s),D[A]=ue(),r&&scrollTo(r.x,r.y),A=n;return}const l=n-A;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{A=n,I=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,[V]:++A,[z]:I},"",location.href))});for(const t of document.querySelectorAll("link"))on.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){w.url=k.url=t,N.page.set($e(k)),N.page.notify()}}async function yn(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(m,_)=>{const R=o[_];return R?.uses&&(R.uses=_t(R.uses)),Oe({loader:v.nodes[m],url:l,params:a,route:s,parent:async()=>{const E={};for(let L=0;L<_;L+=1)Object.assign(E,(await f[L]).data);return E},server_data_node:Ne(R)})}),p=await Promise.all(f);if(d){const m=d.layouts;for(let _=0;_<m.length;_++)m[_]||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 q(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ft(h,e,u)}async function gt(e,t){const n=new URL(e);n.pathname=rn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Xt,"1"),n.searchParams.append(Jt,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(),c=new TextDecoder;function l(h){return Wt(h,{...v.decoders,Promise:u=>new Promise((f,p)=>{i.set(u,{fulfil:f,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
|
|
2
|
-
`:c.decode(u,{stream:!0});;){const f=d.indexOf(`
|
|
3
|
-
`);if(f===-1)break;const p=JSON.parse(d.slice(0,f));if(d=d.slice(f+1),p.type==="redirect")return s(p);if(p.type==="data")p.nodes?.forEach(m=>{m?.type==="data"&&(m.uses=_t(m.uses),m.data=l(m.data))}),s(p);else if(p.type==="chunk"){const{id:m,data:_,error:R}=p,E=i.get(m);i.delete(m),R?E.reject(l(R)):E.fulfil(l(_))}}}})}function _t(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 Ee=!1;function wn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=mt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=ue();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!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 vn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{In as a,Sn as l,k as p,N as s};
|
|
Binary file
|
|
Binary file
|