@analogjs/router 2.8.0-beta.9 → 2.8.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/analogjs-router-debug.page-MFY2u07E.mjs +119 -0
- package/fesm2022/analogjs-router-debug.page-MFY2u07E.mjs.map +1 -0
- package/fesm2022/analogjs-router-i18n.mjs +82 -219
- package/fesm2022/analogjs-router-i18n.mjs.map +1 -1
- package/fesm2022/analogjs-router-routes-L2tt-0ms.mjs +263 -0
- package/fesm2022/analogjs-router-routes-L2tt-0ms.mjs.map +1 -0
- package/fesm2022/analogjs-router-server-actions.mjs +228 -463
- package/fesm2022/analogjs-router-server-actions.mjs.map +1 -1
- package/fesm2022/analogjs-router-server.mjs +608 -838
- package/fesm2022/analogjs-router-server.mjs.map +1 -1
- package/fesm2022/analogjs-router-tanstack-query-server.mjs +35 -85
- package/fesm2022/analogjs-router-tanstack-query-server.mjs.map +1 -1
- package/fesm2022/analogjs-router-tanstack-query.mjs +79 -127
- package/fesm2022/analogjs-router-tanstack-query.mjs.map +1 -1
- package/fesm2022/analogjs-router-tokens.mjs +14 -19
- package/fesm2022/analogjs-router-tokens.mjs.map +1 -1
- package/fesm2022/analogjs-router.mjs +882 -1324
- package/fesm2022/analogjs-router.mjs.map +1 -1
- package/package.json +2 -2
- package/types/analogjs-router-i18n.d.ts +55 -24
- package/types/analogjs-router-server-actions.d.ts +98 -107
- package/types/analogjs-router-server.d.ts +76 -116
- package/types/analogjs-router-tanstack-query-server.d.ts +33 -37
- package/types/analogjs-router-tanstack-query.d.ts +19 -24
- package/types/analogjs-router-tokens.d.ts +26 -22
- package/types/analogjs-router.d.ts +528 -348
- package/fesm2022/analogjs-router-debug.page-COcFkgRu.mjs +0 -91
- package/fesm2022/analogjs-router-debug.page-COcFkgRu.mjs.map +0 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { NavigationEnd, Router, UrlSegment } from "@angular/router";
|
|
2
|
+
import { InjectionToken, inject } from "@angular/core";
|
|
3
|
+
import { HttpClient } from "@angular/common/http";
|
|
4
|
+
import { firstValueFrom } from "rxjs";
|
|
5
|
+
import { Meta } from "@angular/platform-browser";
|
|
6
|
+
import { filter } from "rxjs/operators";
|
|
7
|
+
import { injectAPIPrefix, injectBaseURL } from "@analogjs/router/tokens";
|
|
8
|
+
const ROUTE_META_TAGS_KEY = Symbol("@analogjs/router Route Meta Tags Key");
|
|
9
|
+
const CHARSET_KEY = "charset";
|
|
10
|
+
const HTTP_EQUIV_SELECTOR_KEY = "http-equiv";
|
|
11
|
+
const NAME_KEY = "name";
|
|
12
|
+
const PROPERTY_KEY = "property";
|
|
13
|
+
const ITEMPROP_KEY = "itemprop";
|
|
14
|
+
function updateMetaTagsOnRouteChange() {
|
|
15
|
+
const router = inject(Router);
|
|
16
|
+
const metaService = inject(Meta);
|
|
17
|
+
router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe(() => {
|
|
18
|
+
const metaTagMap = getMetaTagMap(router.routerState.snapshot.root);
|
|
19
|
+
for (const metaTagSelector in metaTagMap) {
|
|
20
|
+
const metaTag = metaTagMap[metaTagSelector];
|
|
21
|
+
metaService.updateTag(metaTag, metaTagSelector);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function getMetaTagMap(route) {
|
|
26
|
+
const metaTagMap = {};
|
|
27
|
+
let currentRoute = route;
|
|
28
|
+
while (currentRoute) {
|
|
29
|
+
const metaTags = currentRoute.data[ROUTE_META_TAGS_KEY] ?? [];
|
|
30
|
+
for (const metaTag of metaTags) metaTagMap[getMetaTagSelector(metaTag)] = metaTag;
|
|
31
|
+
currentRoute = currentRoute.firstChild;
|
|
32
|
+
}
|
|
33
|
+
return metaTagMap;
|
|
34
|
+
}
|
|
35
|
+
function getMetaTagSelector(metaTag) {
|
|
36
|
+
if (metaTag.name) return `${NAME_KEY}="${metaTag.name}"`;
|
|
37
|
+
if (metaTag.property) return `${PROPERTY_KEY}="${metaTag.property}"`;
|
|
38
|
+
if (metaTag.httpEquiv) return `${HTTP_EQUIV_SELECTOR_KEY}="${metaTag.httpEquiv}"`;
|
|
39
|
+
if (metaTag.itemprop) return `${ITEMPROP_KEY}="${metaTag.itemprop}"`;
|
|
40
|
+
return CHARSET_KEY;
|
|
41
|
+
}
|
|
42
|
+
const ANALOG_META_KEY = Symbol("@analogjs/router Analog Route Metadata Key");
|
|
43
|
+
let ANALOG_PAGE_ENDPOINTS = {};
|
|
44
|
+
function injectRouteEndpointURL(route) {
|
|
45
|
+
const routeConfig = route.routeConfig;
|
|
46
|
+
const apiPrefix = injectAPIPrefix();
|
|
47
|
+
const baseUrl = injectBaseURL();
|
|
48
|
+
const { queryParams, fragment: hash, params, parent } = route;
|
|
49
|
+
const segment = parent?.url.map((segment) => segment.path).join("/") || "";
|
|
50
|
+
const url = new URL("", import.meta.env["VITE_ANALOG_PUBLIC_BASE_URL"] || baseUrl || (typeof window !== "undefined" && window.location.origin ? window.location.origin : ""));
|
|
51
|
+
url.pathname = `${url.pathname.endsWith("/") ? url.pathname : url.pathname + "/"}${apiPrefix}/_analog${routeConfig[ANALOG_META_KEY].endpoint}`;
|
|
52
|
+
url.search = `${new URLSearchParams(queryParams).toString()}`;
|
|
53
|
+
url.hash = hash ?? "";
|
|
54
|
+
Object.keys(params).forEach((param) => {
|
|
55
|
+
url.pathname = url.pathname.replace(`[${param}]`, params[param]);
|
|
56
|
+
});
|
|
57
|
+
url.pathname = url.pathname.replace("**", segment);
|
|
58
|
+
return url;
|
|
59
|
+
}
|
|
60
|
+
function toRouteConfig(routeMeta) {
|
|
61
|
+
if (routeMeta && isRedirectRouteMeta(routeMeta)) return routeMeta;
|
|
62
|
+
let { meta, ...routeConfig } = routeMeta ?? {};
|
|
63
|
+
if (Array.isArray(meta)) routeConfig.data = {
|
|
64
|
+
...routeConfig.data,
|
|
65
|
+
[ROUTE_META_TAGS_KEY]: meta
|
|
66
|
+
};
|
|
67
|
+
else if (typeof meta === "function") routeConfig.resolve = {
|
|
68
|
+
...routeConfig.resolve,
|
|
69
|
+
[ROUTE_META_TAGS_KEY]: meta
|
|
70
|
+
};
|
|
71
|
+
if (!routeConfig) routeConfig = {};
|
|
72
|
+
routeConfig.runGuardsAndResolvers = routeConfig.runGuardsAndResolvers ?? "paramsOrQueryParamsChange";
|
|
73
|
+
routeConfig.resolve = {
|
|
74
|
+
...routeConfig.resolve,
|
|
75
|
+
load: async (route) => {
|
|
76
|
+
const routeConfig = route.routeConfig;
|
|
77
|
+
if (ANALOG_PAGE_ENDPOINTS[routeConfig[ANALOG_META_KEY].endpointKey]) {
|
|
78
|
+
const http = inject(HttpClient);
|
|
79
|
+
const url = injectRouteEndpointURL(route);
|
|
80
|
+
if (!!import.meta.env["VITE_ANALOG_PUBLIC_BASE_URL"] && globalThis.$fetch) return globalThis.$fetch(`${url.pathname}${url.search}`);
|
|
81
|
+
return firstValueFrom(http.get(`${url.href}`));
|
|
82
|
+
}
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
return routeConfig;
|
|
87
|
+
}
|
|
88
|
+
function isRedirectRouteMeta(routeMeta) {
|
|
89
|
+
return !!routeMeta.redirectTo;
|
|
90
|
+
}
|
|
91
|
+
const isNgZoneEnabled = typeof Zone !== "undefined" && !!Zone.root;
|
|
92
|
+
function toMarkdownModule(markdownFileFactory) {
|
|
93
|
+
return async () => {
|
|
94
|
+
const createLoader = () => Promise.all([import("@analogjs/content"), markdownFileFactory()]);
|
|
95
|
+
const [{ parseRawContentFile, MarkdownRouteComponent, ContentRenderer }, markdownFile] = await (isNgZoneEnabled ? Zone.root.run(createLoader) : createLoader());
|
|
96
|
+
const { content, attributes } = parseRawContentFile(markdownFile);
|
|
97
|
+
const { title, meta } = attributes;
|
|
98
|
+
return {
|
|
99
|
+
default: MarkdownRouteComponent,
|
|
100
|
+
routeMeta: {
|
|
101
|
+
data: { _analogContent: content },
|
|
102
|
+
title,
|
|
103
|
+
meta,
|
|
104
|
+
resolve: { renderedAnalogContent: async () => {
|
|
105
|
+
const rendered = await inject(ContentRenderer).render(content);
|
|
106
|
+
return typeof rendered === "string" ? rendered : rendered.content;
|
|
107
|
+
} }
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const ENDPOINT_EXTENSION = ".server.ts";
|
|
113
|
+
let ANALOG_ROUTE_FILES = {};
|
|
114
|
+
let ANALOG_CONTENT_ROUTE_FILES = {};
|
|
115
|
+
function createRoutes(files, debug = false) {
|
|
116
|
+
const filenames = Object.keys(files);
|
|
117
|
+
if (filenames.length === 0) return [];
|
|
118
|
+
const rawRoutesByLevelMap = filenames.reduce((acc, filename) => {
|
|
119
|
+
const rawPath = toRawPath(filename);
|
|
120
|
+
const rawSegments = rawPath.split("/");
|
|
121
|
+
const level = rawSegments.length - 1;
|
|
122
|
+
const rawSegment = rawSegments[level];
|
|
123
|
+
const ancestorRawSegments = rawSegments.slice(0, level);
|
|
124
|
+
return {
|
|
125
|
+
...acc,
|
|
126
|
+
[level]: {
|
|
127
|
+
...acc[level],
|
|
128
|
+
[rawPath]: {
|
|
129
|
+
filename,
|
|
130
|
+
rawSegment,
|
|
131
|
+
ancestorRawSegments,
|
|
132
|
+
segment: toSegment(rawSegment),
|
|
133
|
+
level,
|
|
134
|
+
children: []
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}, {});
|
|
139
|
+
const allLevels = Object.keys(rawRoutesByLevelMap).map(Number);
|
|
140
|
+
const maxLevel = Math.max(...allLevels);
|
|
141
|
+
for (let level = maxLevel; level > 0; level--) {
|
|
142
|
+
const rawRoutesMap = rawRoutesByLevelMap[level];
|
|
143
|
+
const rawPaths = Object.keys(rawRoutesMap);
|
|
144
|
+
for (const rawPath of rawPaths) {
|
|
145
|
+
const rawRoute = rawRoutesMap[rawPath];
|
|
146
|
+
const parentRawPath = rawRoute.ancestorRawSegments.join("/");
|
|
147
|
+
const parentRawSegmentIndex = rawRoute.ancestorRawSegments.length - 1;
|
|
148
|
+
const parentRawSegment = rawRoute.ancestorRawSegments[parentRawSegmentIndex];
|
|
149
|
+
rawRoutesByLevelMap[level - 1] ||= {};
|
|
150
|
+
rawRoutesByLevelMap[level - 1][parentRawPath] ||= {
|
|
151
|
+
filename: null,
|
|
152
|
+
rawSegment: parentRawSegment,
|
|
153
|
+
ancestorRawSegments: rawRoute.ancestorRawSegments.slice(0, parentRawSegmentIndex),
|
|
154
|
+
segment: toSegment(parentRawSegment),
|
|
155
|
+
level: level - 1,
|
|
156
|
+
children: []
|
|
157
|
+
};
|
|
158
|
+
rawRoutesByLevelMap[level - 1][parentRawPath].children.push(rawRoute);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const rootRawRoutesMap = rawRoutesByLevelMap[0];
|
|
162
|
+
const rawRoutes = Object.keys(rootRawRoutesMap).map((segment) => rootRawRoutesMap[segment]);
|
|
163
|
+
sortRawRoutes(rawRoutes);
|
|
164
|
+
return toRoutes(rawRoutes, files, debug);
|
|
165
|
+
}
|
|
166
|
+
function toRawPath(filename) {
|
|
167
|
+
return filename.replace(/^(?:[a-zA-Z]:[\\/])?(.*?)[\\/](?:routes|pages)[\\/]|(?:[\\/](?:app[\\/](?:routes|pages)|src[\\/]content)[\\/])|(\.page\.(js|ts|analog|ag)$)|(\.(ts|md|analog|ag)$)/g, "").replace(/\[\[\.\.\.([^\]]+)\]\]/g, "(opt-$1)").replace(/\[\.{3}.+\]/, "**").replace(/\[([^\]]+)\]/g, ":$1");
|
|
168
|
+
}
|
|
169
|
+
function toSegment(rawSegment) {
|
|
170
|
+
return rawSegment.replace(/index|\(.*?\)/g, "").replace(/\.|\/+/g, "/").replace(/^\/+|\/+$/g, "");
|
|
171
|
+
}
|
|
172
|
+
function createOptionalCatchAllMatcher(paramName) {
|
|
173
|
+
return (segments) => {
|
|
174
|
+
if (segments.length === 0) return null;
|
|
175
|
+
const joined = segments.map((s) => s.path).join("/");
|
|
176
|
+
return {
|
|
177
|
+
consumed: segments,
|
|
178
|
+
posParams: { [paramName]: new UrlSegment(joined, {}) }
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function toRoutes(rawRoutes, files, debug = false) {
|
|
183
|
+
const routes = [];
|
|
184
|
+
for (const rawRoute of rawRoutes) {
|
|
185
|
+
const children = rawRoute.children.length > 0 ? toRoutes(rawRoute.children, files, debug) : void 0;
|
|
186
|
+
let module = void 0;
|
|
187
|
+
let analogMeta = void 0;
|
|
188
|
+
if (rawRoute.filename) {
|
|
189
|
+
const isMarkdownFile = rawRoute.filename.endsWith(".md");
|
|
190
|
+
if (!debug) module = isMarkdownFile ? toMarkdownModule(files[rawRoute.filename]) : files[rawRoute.filename];
|
|
191
|
+
const endpointKey = rawRoute.filename.replace(/\.page\.(ts|analog|ag)$/, ENDPOINT_EXTENSION);
|
|
192
|
+
analogMeta = {
|
|
193
|
+
endpoint: (rawRoute.filename.replace(/\.page\.(ts|analog|ag)$/, "").replace(/\[\[\.\.\..+\]\]/, "**").replace(/\[\.{3}.+\]/, "**").replace(/^(.*?)\/pages/, "/pages") || "").replace(/\./g, "/").replace(/\/\((.*?)\)$/, "/-$1-"),
|
|
194
|
+
endpointKey
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const optCatchAllMatch = rawRoute.filename?.match(/\[\[\.\.\.([^\]]+)\]\]/);
|
|
198
|
+
const optCatchAllParam = optCatchAllMatch ? optCatchAllMatch[1] : null;
|
|
199
|
+
const route = module ? {
|
|
200
|
+
path: rawRoute.segment,
|
|
201
|
+
loadChildren: () => module().then((m) => {
|
|
202
|
+
if (import.meta.env.DEV) {
|
|
203
|
+
const hasModuleDefault = !!m.default;
|
|
204
|
+
const hasRedirect = !!m.routeMeta?.redirectTo;
|
|
205
|
+
if (!hasModuleDefault && !hasRedirect) console.warn(`[Analog] Missing default export at ${rawRoute.filename}`);
|
|
206
|
+
}
|
|
207
|
+
return [{
|
|
208
|
+
path: "",
|
|
209
|
+
component: m.default,
|
|
210
|
+
...toRouteConfig(m.routeMeta),
|
|
211
|
+
children,
|
|
212
|
+
[ANALOG_META_KEY]: analogMeta
|
|
213
|
+
}, ...optCatchAllParam ? [{
|
|
214
|
+
matcher: createOptionalCatchAllMatcher(optCatchAllParam),
|
|
215
|
+
component: m.default,
|
|
216
|
+
...toRouteConfig(m.routeMeta),
|
|
217
|
+
[ANALOG_META_KEY]: analogMeta
|
|
218
|
+
}] : []];
|
|
219
|
+
})
|
|
220
|
+
} : {
|
|
221
|
+
path: rawRoute.segment,
|
|
222
|
+
...debug ? {
|
|
223
|
+
filename: rawRoute.filename ? rawRoute.filename : void 0,
|
|
224
|
+
isLayout: children && children.length > 0 ? true : false
|
|
225
|
+
} : {},
|
|
226
|
+
children
|
|
227
|
+
};
|
|
228
|
+
routes.push(route);
|
|
229
|
+
}
|
|
230
|
+
return routes;
|
|
231
|
+
}
|
|
232
|
+
function sortRawRoutes(rawRoutes) {
|
|
233
|
+
rawRoutes.sort((a, b) => {
|
|
234
|
+
let segmentA = deprioritizeSegment(a.segment);
|
|
235
|
+
let segmentB = deprioritizeSegment(b.segment);
|
|
236
|
+
if (a.children.length > b.children.length) segmentA = `~${segmentA}`;
|
|
237
|
+
else if (a.children.length < b.children.length) segmentB = `~${segmentB}`;
|
|
238
|
+
return segmentA > segmentB ? 1 : -1;
|
|
239
|
+
});
|
|
240
|
+
for (const rawRoute of rawRoutes) sortRawRoutes(rawRoute.children);
|
|
241
|
+
}
|
|
242
|
+
function deprioritizeSegment(segment) {
|
|
243
|
+
return segment.replace(":", "~~").replace("**", "~~~~");
|
|
244
|
+
}
|
|
245
|
+
const routes = createRoutes({
|
|
246
|
+
...ANALOG_ROUTE_FILES,
|
|
247
|
+
...ANALOG_CONTENT_ROUTE_FILES
|
|
248
|
+
});
|
|
249
|
+
const DEBUG_ROUTES = new InjectionToken("@analogjs/router debug routes", {
|
|
250
|
+
providedIn: "root",
|
|
251
|
+
factory() {
|
|
252
|
+
return createRoutes({
|
|
253
|
+
...ANALOG_ROUTE_FILES,
|
|
254
|
+
...ANALOG_CONTENT_ROUTE_FILES
|
|
255
|
+
}, true);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
function injectDebugRoutes() {
|
|
259
|
+
return inject(DEBUG_ROUTES);
|
|
260
|
+
}
|
|
261
|
+
export { ANALOG_META_KEY as a, injectRouteEndpointURL as i, createRoutes as n, updateMetaTagsOnRouteChange as o, routes as r, injectDebugRoutes as t };
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=analogjs-router-routes-L2tt-0ms.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analogjs-router-routes-L2tt-0ms.mjs","names":[],"sources":["../../../../packages/router/src/lib/meta-tags.ts","../../../../packages/router/src/lib/endpoints.ts","../../../../packages/router/src/lib/inject-route-endpoint-url.ts","../../../../packages/router/src/lib/route-config.ts","../../../../packages/router/src/lib/markdown-helpers.ts","../../../../packages/router/src/lib/constants.ts","../../../../packages/router/src/lib/routes.ts","../../../../packages/router/src/lib/debug/routes.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { Meta, MetaDefinition as NgMetaTag } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\nexport const ROUTE_META_TAGS_KEY = Symbol(\n '@analogjs/router Route Meta Tags Key',\n);\n\nconst CHARSET_KEY = 'charset';\nconst HTTP_EQUIV_KEY = 'httpEquiv';\n// httpEquiv selector key needs to be in kebab case format\nconst HTTP_EQUIV_SELECTOR_KEY = 'http-equiv';\nconst NAME_KEY = 'name';\nconst PROPERTY_KEY = 'property';\nconst CONTENT_KEY = 'content';\nconst ITEMPROP_KEY = 'itemprop';\n\nexport type MetaTag =\n | (CharsetMetaTag & ExcludeRestMetaTagKeys<typeof CHARSET_KEY>)\n | (HttpEquivMetaTag & ExcludeRestMetaTagKeys<typeof HTTP_EQUIV_KEY>)\n | (NameMetaTag & ExcludeRestMetaTagKeys<typeof NAME_KEY>)\n | (PropertyMetaTag & ExcludeRestMetaTagKeys<typeof PROPERTY_KEY>)\n | (ItempropMetaTag & ExcludeRestMetaTagKeys<typeof ITEMPROP_KEY>);\n\ntype CharsetMetaTag = { [CHARSET_KEY]: string };\ntype HttpEquivMetaTag = { [HTTP_EQUIV_KEY]: string; [CONTENT_KEY]: string };\ntype NameMetaTag = { [NAME_KEY]: string; [CONTENT_KEY]: string };\ntype PropertyMetaTag = { [PROPERTY_KEY]: string; [CONTENT_KEY]: string };\ntype ItempropMetaTag = { [ITEMPROP_KEY]: string; [CONTENT_KEY]: string };\n\ntype MetaTagKey =\n | typeof CHARSET_KEY\n | typeof HTTP_EQUIV_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY\n | typeof ITEMPROP_KEY;\ntype ExcludeRestMetaTagKeys<Key extends MetaTagKey> = {\n [K in Exclude<MetaTagKey, Key>]?: never;\n};\n\ntype MetaTagSelector =\n | typeof CHARSET_KEY\n | `${\n | typeof HTTP_EQUIV_SELECTOR_KEY\n | typeof NAME_KEY\n | typeof PROPERTY_KEY\n | typeof ITEMPROP_KEY}=\"${string}\"`;\ntype MetaTagMap = Record<MetaTagSelector, MetaTag>;\n\nexport function updateMetaTagsOnRouteChange(): void {\n const router = inject(Router);\n const metaService = inject(Meta);\n\n router.events\n .pipe(filter((event) => event instanceof NavigationEnd))\n .subscribe(() => {\n const metaTagMap = getMetaTagMap(router.routerState.snapshot.root);\n\n for (const metaTagSelector in metaTagMap) {\n const metaTag = metaTagMap[\n metaTagSelector as MetaTagSelector\n ] as NgMetaTag;\n metaService.updateTag(metaTag, metaTagSelector);\n }\n });\n}\n\nfunction getMetaTagMap(route: ActivatedRouteSnapshot): MetaTagMap {\n const metaTagMap = {} as MetaTagMap;\n let currentRoute: ActivatedRouteSnapshot | null = route;\n\n while (currentRoute) {\n const metaTags: MetaTag[] = currentRoute.data[ROUTE_META_TAGS_KEY] ?? [];\n for (const metaTag of metaTags) {\n metaTagMap[getMetaTagSelector(metaTag)] = metaTag;\n }\n\n currentRoute = currentRoute.firstChild;\n }\n\n return metaTagMap;\n}\n\nfunction getMetaTagSelector(metaTag: MetaTag): MetaTagSelector {\n if (metaTag.name) {\n return `${NAME_KEY}=\"${metaTag.name}\"`;\n }\n\n if (metaTag.property) {\n return `${PROPERTY_KEY}=\"${metaTag.property}\"`;\n }\n\n if (metaTag.httpEquiv) {\n return `${HTTP_EQUIV_SELECTOR_KEY}=\"${metaTag.httpEquiv}\"`;\n }\n\n if (metaTag.itemprop) {\n return `${ITEMPROP_KEY}=\"${metaTag.itemprop}\"`;\n }\n\n return CHARSET_KEY;\n}\n","export const ANALOG_META_KEY = Symbol(\n '@analogjs/router Analog Route Metadata Key',\n);\n\n/**\n * This variable reference is replaced with a glob of all route endpoints.\n */\nexport let ANALOG_PAGE_ENDPOINTS: any = {};\n","import type { ActivatedRouteSnapshot, Route } from '@angular/router';\nimport { injectBaseURL, injectAPIPrefix } from '@analogjs/router/tokens';\n\nimport { ANALOG_META_KEY } from './endpoints';\n\nexport function injectRouteEndpointURL(route: ActivatedRouteSnapshot) {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n const apiPrefix = injectAPIPrefix();\n const baseUrl = injectBaseURL();\n const { queryParams, fragment: hash, params, parent } = route;\n const segment = parent?.url.map((segment) => segment.path).join('/') || '';\n const url = new URL(\n '',\n import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] ||\n baseUrl ||\n (typeof window !== 'undefined' && window.location.origin\n ? window.location.origin\n : ''),\n );\n url.pathname = `${\n url.pathname.endsWith('/') ? url.pathname : url.pathname + '/'\n }${apiPrefix}/_analog${routeConfig[ANALOG_META_KEY].endpoint}`;\n url.search = `${new URLSearchParams(queryParams).toString()}`;\n url.hash = hash ?? '';\n\n Object.keys(params).forEach((param) => {\n url.pathname = url.pathname.replace(`[${param}]`, params[param]);\n });\n url.pathname = url.pathname.replace('**', segment);\n\n return url;\n}\n","import { inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Route } from '@angular/router';\nimport { firstValueFrom } from 'rxjs';\n\nimport { RedirectRouteMeta, RouteConfig, RouteMeta } from './models';\nimport { ROUTE_META_TAGS_KEY } from './meta-tags';\nimport { ANALOG_PAGE_ENDPOINTS, ANALOG_META_KEY } from './endpoints';\nimport { injectRouteEndpointURL } from './inject-route-endpoint-url';\n\nexport function toRouteConfig(routeMeta: RouteMeta | undefined): RouteConfig {\n if (routeMeta && isRedirectRouteMeta(routeMeta)) {\n return routeMeta;\n }\n\n let { meta, ...routeConfig } = routeMeta ?? {};\n\n if (Array.isArray(meta)) {\n routeConfig.data = { ...routeConfig.data, [ROUTE_META_TAGS_KEY]: meta };\n } else if (typeof meta === 'function') {\n routeConfig.resolve = {\n ...routeConfig.resolve,\n [ROUTE_META_TAGS_KEY]: meta,\n };\n }\n\n if (!routeConfig) {\n routeConfig = {};\n }\n\n routeConfig.runGuardsAndResolvers =\n routeConfig.runGuardsAndResolvers ?? 'paramsOrQueryParamsChange';\n routeConfig.resolve = {\n ...routeConfig.resolve,\n load: async (route) => {\n const routeConfig = route.routeConfig as Route & {\n [ANALOG_META_KEY]: { endpoint: string; endpointKey: string };\n };\n\n if (ANALOG_PAGE_ENDPOINTS[routeConfig[ANALOG_META_KEY].endpointKey]) {\n const http = inject(HttpClient);\n const url = injectRouteEndpointURL(route);\n\n if (\n !!import.meta.env['VITE_ANALOG_PUBLIC_BASE_URL'] &&\n (globalThis as any).$fetch\n ) {\n return (globalThis as any).$fetch(`${url.pathname}${url.search}`);\n }\n\n return firstValueFrom(http.get(`${url.href}`));\n }\n\n return {};\n },\n };\n\n return routeConfig;\n}\n\nfunction isRedirectRouteMeta(\n routeMeta: RouteMeta,\n): routeMeta is RedirectRouteMeta {\n return !!routeMeta.redirectTo;\n}\n","import { inject } from '@angular/core';\nimport { RouteExport } from './models';\n\ndeclare const Zone: any;\ntype RenderResult = string | { content: string };\ntype ContentRendererLike = {\n render: (content: string) => Promise<RenderResult>;\n};\n\n// The Zone is currently enabled by default, so we wouldn't need this check.\n// However, leaving this open space will be useful if zone.js becomes optional\n// in the future. This means we won't have to modify the current code, and it will\n// continue to work seamlessly.\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.root;\n\nexport function toMarkdownModule(\n markdownFileFactory: () => Promise<string>,\n): () => Promise<RouteExport> {\n return async () => {\n const createLoader = () =>\n Promise.all([import('@analogjs/content'), markdownFileFactory()]);\n\n const [\n { parseRawContentFile, MarkdownRouteComponent, ContentRenderer },\n markdownFile,\n ]: [typeof import('@analogjs/content'), string] = await (isNgZoneEnabled\n ? // We are not able to use `runOutsideAngular` because we are not inside\n // an injection context to retrieve the `NgZone` instance.\n // The `Zone.root.run` is required when the code is running in the\n // browser since asynchronous tasks being scheduled in the current context\n // are a reason for unnecessary change detection cycles.\n Zone.root.run(createLoader)\n : createLoader());\n\n const { content, attributes } = parseRawContentFile(markdownFile);\n const { title, meta } = attributes;\n\n return {\n default: MarkdownRouteComponent,\n routeMeta: {\n data: { _analogContent: content },\n title,\n meta,\n resolve: {\n renderedAnalogContent: async () => {\n const contentRenderer = inject<any>(\n ContentRenderer as any,\n ) as ContentRendererLike;\n const rendered = await contentRenderer.render(content);\n return typeof rendered === 'string'\n ? rendered\n : (rendered as any).content;\n },\n },\n },\n };\n };\n}\n","export const ENDPOINT_EXTENSION = '.server.ts';\nexport const APP_DIR = 'src/app';\n","import { UrlSegment } from '@angular/router';\nimport type { Route } from '@angular/router';\nimport type { UrlMatcher } from '@angular/router';\n\nimport type { RouteExport, RouteMeta } from './models';\nimport { toRouteConfig } from './route-config';\nimport { toMarkdownModule } from './markdown-helpers';\nimport { ENDPOINT_EXTENSION } from './constants';\nimport { ANALOG_META_KEY } from './endpoints';\n\n/**\n * This variable reference is replaced with a glob of all page routes.\n */\nexport let ANALOG_ROUTE_FILES = {};\n\n/**\n * This variable reference is replaced with a glob of all content routes.\n */\nexport let ANALOG_CONTENT_ROUTE_FILES = {};\n\nexport type Files = Record<string, () => Promise<RouteExport | string>>;\n\ntype RawRoute = {\n filename: string | null;\n rawSegment: string;\n ancestorRawSegments: string[];\n segment: string;\n level: number;\n children: RawRoute[];\n};\n\ntype RawRouteMap = Record<string, RawRoute>;\n\ntype RawRouteByLevelMap = Record<number, RawRouteMap>;\n\n/**\n * A function used to parse list of files and create configuration of routes.\n *\n * @param files\n * @returns Array of routes\n */\nexport function createRoutes(files: Files, debug = false): Route[] {\n const filenames = Object.keys(files);\n\n if (filenames.length === 0) {\n return [];\n }\n\n // map filenames to raw routes and group them by level\n const rawRoutesByLevelMap = filenames.reduce((acc, filename) => {\n const rawPath = toRawPath(filename);\n const rawSegments = rawPath.split('/');\n // nesting level starts at 0\n // rawPath: /products => level: 0\n // rawPath: /products/:id => level: 1\n const level = rawSegments.length - 1;\n const rawSegment = rawSegments[level];\n const ancestorRawSegments = rawSegments.slice(0, level);\n\n return {\n ...acc,\n [level]: {\n ...acc[level],\n [rawPath]: {\n filename,\n rawSegment,\n ancestorRawSegments,\n segment: toSegment(rawSegment),\n level,\n children: [],\n },\n },\n };\n }, {} as RawRouteByLevelMap);\n\n const allLevels = Object.keys(rawRoutesByLevelMap).map(Number);\n const maxLevel = Math.max(...allLevels);\n\n // add each raw route to its parent's children array\n for (let level = maxLevel; level > 0; level--) {\n const rawRoutesMap = rawRoutesByLevelMap[level];\n const rawPaths = Object.keys(rawRoutesMap);\n\n for (const rawPath of rawPaths) {\n const rawRoute = rawRoutesMap[rawPath];\n const parentRawPath = rawRoute.ancestorRawSegments.join('/');\n const parentRawSegmentIndex = rawRoute.ancestorRawSegments.length - 1;\n const parentRawSegment =\n rawRoute.ancestorRawSegments[parentRawSegmentIndex];\n\n // create the parent level and/or raw route if it does not exist\n // parent route won't exist for nested routes that don't have a layout route\n rawRoutesByLevelMap[level - 1] ||= {};\n rawRoutesByLevelMap[level - 1][parentRawPath] ||= {\n filename: null,\n rawSegment: parentRawSegment,\n ancestorRawSegments: rawRoute.ancestorRawSegments.slice(\n 0,\n parentRawSegmentIndex,\n ),\n segment: toSegment(parentRawSegment),\n level: level - 1,\n children: [],\n };\n\n rawRoutesByLevelMap[level - 1][parentRawPath].children.push(rawRoute);\n }\n }\n\n // only take raw routes from the root level\n // since they already contain nested routes as their children\n const rootRawRoutesMap = rawRoutesByLevelMap[0];\n const rawRoutes = Object.keys(rootRawRoutesMap).map(\n (segment) => rootRawRoutesMap[segment],\n );\n sortRawRoutes(rawRoutes);\n\n return toRoutes(rawRoutes, files, debug);\n}\n\nfunction toRawPath(filename: string): string {\n return (\n filename\n .replace(\n // convert to relative path and remove file extension\n /^(?:[a-zA-Z]:[\\\\/])?(.*?)[\\\\/](?:routes|pages)[\\\\/]|(?:[\\\\/](?:app[\\\\/](?:routes|pages)|src[\\\\/]content)[\\\\/])|(\\.page\\.(js|ts|analog|ag)$)|(\\.(ts|md|analog|ag)$)/g,\n '',\n )\n // [[...slug]] => placeholder (named empty) which is stripped by toSegment\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, '(opt-$1)')\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/\\[([^\\]]+)\\]/g, ':$1')\n ); // [id] => :id\n}\n\nfunction toSegment(rawSegment: string): string {\n return rawSegment\n .replace(/index|\\(.*?\\)/g, '') // replace named empty segments\n .replace(/\\.|\\/+/g, '/') // replace dots with slashes and remove redundant slashes\n .replace(/^\\/+|\\/+$/g, ''); // remove trailing slashes\n}\n\nfunction createOptionalCatchAllMatcher(paramName: string): UrlMatcher {\n return (segments) => {\n if (segments.length === 0) {\n return null;\n }\n const joined = segments.map((s) => s.path).join('/');\n return {\n consumed: segments,\n posParams: { [paramName]: new UrlSegment(joined, {}) },\n };\n };\n}\n\nfunction toRoutes(rawRoutes: RawRoute[], files: Files, debug = false): Route[] {\n const routes: Route[] = [];\n\n for (const rawRoute of rawRoutes) {\n const children: Route[] | undefined =\n rawRoute.children.length > 0\n ? toRoutes(rawRoute.children, files, debug)\n : undefined;\n let module: (() => Promise<RouteExport>) | undefined = undefined;\n let analogMeta: { endpoint: string; endpointKey: string } | undefined =\n undefined;\n\n if (rawRoute.filename) {\n const isMarkdownFile = rawRoute.filename.endsWith('.md');\n\n if (!debug) {\n module = isMarkdownFile\n ? toMarkdownModule(files[rawRoute.filename] as () => Promise<string>)\n : (files[rawRoute.filename] as () => Promise<RouteExport>);\n }\n\n const endpointKey = rawRoute.filename.replace(\n /\\.page\\.(ts|analog|ag)$/,\n ENDPOINT_EXTENSION,\n );\n\n // get endpoint path\n const rawEndpoint = rawRoute.filename\n .replace(/\\.page\\.(ts|analog|ag)$/, '')\n .replace(/\\[\\[\\.\\.\\..+\\]\\]/, '**')\n .replace(/\\[\\.{3}.+\\]/, '**') // [...not-found] => **\n .replace(/^(.*?)\\/pages/, '/pages');\n\n // replace periods, remove (index) paths\n const endpoint = (rawEndpoint || '')\n .replace(/\\./g, '/')\n .replace(/\\/\\((.*?)\\)$/, '/-$1-');\n\n analogMeta = {\n endpoint,\n endpointKey,\n };\n }\n\n // Detect Next.js-style optional catch-all at this node: [[...param]]\n const optCatchAllMatch = rawRoute.filename?.match(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/);\n const optCatchAllParam = optCatchAllMatch ? optCatchAllMatch[1] : null;\n\n type DebugRoute = Route & {\n filename?: string | null | undefined;\n isLayout?: boolean;\n };\n\n const route: Route & { meta?: typeof analogMeta } & DebugRoute = module\n ? {\n path: rawRoute.segment,\n loadChildren: () =>\n module!().then((m) => {\n if (import.meta.env.DEV) {\n const hasModuleDefault = !!m.default;\n const hasRedirect = !!m.routeMeta?.redirectTo;\n\n if (!hasModuleDefault && !hasRedirect) {\n console.warn(\n `[Analog] Missing default export at ${rawRoute.filename}`,\n );\n }\n }\n\n const baseChild = {\n path: '',\n component: m.default,\n ...toRouteConfig(m.routeMeta as RouteMeta | undefined),\n children,\n [ANALOG_META_KEY]: analogMeta,\n };\n\n // Base route first so static matches win, then optional catch-all matcher\n return [\n {\n ...baseChild,\n },\n ...(optCatchAllParam\n ? [\n {\n matcher:\n createOptionalCatchAllMatcher(optCatchAllParam),\n component: m.default,\n ...toRouteConfig(m.routeMeta as RouteMeta | undefined),\n [ANALOG_META_KEY]: analogMeta,\n },\n ]\n : []),\n ];\n }),\n }\n : {\n path: rawRoute.segment,\n ...(debug\n ? {\n filename: rawRoute.filename ? rawRoute.filename : undefined,\n isLayout: children && children.length > 0 ? true : false,\n }\n : {}),\n children,\n };\n\n routes.push(route);\n }\n\n return routes;\n}\n\nfunction sortRawRoutes(rawRoutes: RawRoute[]): void {\n rawRoutes.sort((a, b) => {\n let segmentA = deprioritizeSegment(a.segment);\n let segmentB = deprioritizeSegment(b.segment);\n\n // prioritize routes with fewer children\n if (a.children.length > b.children.length) {\n segmentA = `~${segmentA}`;\n } else if (a.children.length < b.children.length) {\n segmentB = `~${segmentB}`;\n }\n\n return segmentA > segmentB ? 1 : -1;\n });\n\n for (const rawRoute of rawRoutes) {\n sortRawRoutes(rawRoute.children);\n }\n}\n\nfunction deprioritizeSegment(segment: string): string {\n // deprioritize param and wildcard segments\n return segment.replace(':', '~~').replace('**', '~~~~');\n}\n\nexport const routes: Route[] = createRoutes({\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n});\n","import { inject, InjectionToken } from '@angular/core';\nimport { Route } from '@angular/router';\n\nimport {\n ANALOG_CONTENT_ROUTE_FILES,\n ANALOG_ROUTE_FILES,\n createRoutes,\n} from '../routes';\n\nexport const DEBUG_ROUTES = new InjectionToken(\n '@analogjs/router debug routes',\n {\n providedIn: 'root',\n factory() {\n const debugRoutes = createRoutes(\n {\n ...ANALOG_ROUTE_FILES,\n ...ANALOG_CONTENT_ROUTE_FILES,\n },\n true,\n );\n\n return debugRoutes as (Route & DebugRoute)[];\n },\n },\n);\n\nexport type DebugRoute = {\n path: string;\n filename: string;\n isLayout: boolean;\n children?: DebugRoute[];\n};\n\nexport function injectDebugRoutes() {\n return inject(DEBUG_ROUTES);\n}\n"],"mappings":";;;;;;;AAKA,MAAa,sBAAsB,OACjC,sCAAsC;AAGxC,MAAM,cAAc;AAGpB,MAAM,0BAA0B;AAChC,MAAM,WAAW;AACjB,MAAM,eAAe;AAErB,MAAM,eAAe;AAkCrB,SAAgB,8BAA2B;CACzC,MAAM,SAAS,OAAO,MAAM;CAC5B,MAAM,cAAc,OAAO,IAAI;CAE/B,OAAO,OACJ,KAAK,QAAQ,UAAU,iBAAiB,aAAa,CAAC,CAAC,CACvD,gBAAe;EACd,MAAM,aAAa,cAAc,OAAO,YAAY,SAAS,IAAI;EAEjE,KAAK,MAAM,mBAAmB,YAAY;GACxC,MAAM,UAAU,WACd;GAEF,YAAY,UAAU,SAAS,eAAe;EAChD;CACF,CAAC;AACL;AAEA,SAAS,cAAc,OAA6B;CAClD,MAAM,aAAa,CAAA;CACnB,IAAI,eAA8C;CAElD,OAAO,cAAc;EACnB,MAAM,WAAsB,aAAa,KAAK,wBAAwB,CAAA;EACtE,KAAK,MAAM,WAAW,UACpB,WAAW,mBAAmB,OAAO,KAAK;EAG5C,eAAe,aAAa;CAC9B;CAEA,OAAO;AACT;AAEA,SAAS,mBAAmB,SAAgB;CAC1C,IAAI,QAAQ,MACV,OAAO,GAAG,SAAQ,IAAK,QAAQ,KAAI;CAGrC,IAAI,QAAQ,UACV,OAAO,GAAG,aAAY,IAAK,QAAQ,SAAQ;CAG7C,IAAI,QAAQ,WACV,OAAO,GAAG,wBAAuB,IAAK,QAAQ,UAAS;CAGzD,IAAI,QAAQ,UACV,OAAO,GAAG,aAAY,IAAK,QAAQ,SAAQ;CAG7C,OAAO;AACT;ACtGA,MAAa,kBAAkB,OAC7B,4CAA4C;AAM9C,IAAW,wBAA6B,CAAA;ACFxC,SAAgB,uBAAuB,OAA6B;CAClE,MAAM,cAAc,MAAM;CAI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