opensource-showcase 0.1.1 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/dist/commands/main.js +2 -2
- package/dist/commands/main.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/repo/generate-site.d.ts +6 -0
- package/dist/repo/generate-site.d.ts.map +1 -0
- package/dist/repo/generate-site.js +37 -0
- package/dist/repo/generate-site.js.map +1 -0
- package/dist/repo/manage-repo.d.ts +7 -1
- package/dist/repo/manage-repo.d.ts.map +1 -1
- package/dist/repo/manage-repo.js +82 -32
- package/dist/repo/manage-repo.js.map +1 -1
- package/dist/repo/site/assets.d.ts +3 -0
- package/dist/repo/site/assets.d.ts.map +1 -0
- package/dist/repo/site/assets.js +245 -0
- package/dist/repo/site/assets.js.map +1 -0
- package/dist/repo/site/components.d.ts +8 -0
- package/dist/repo/site/components.d.ts.map +1 -0
- package/dist/repo/site/components.js +111 -0
- package/dist/repo/site/components.js.map +1 -0
- package/dist/repo/site/utils.d.ts +17 -0
- package/dist/repo/site/utils.d.ts.map +1 -0
- package/dist/repo/site/utils.js +162 -0
- package/dist/repo/site/utils.js.map +1 -0
- package/dist/templates/project-section.js +37 -37
- package/dist/templates/project-section.js.map +1 -1
- package/dist/templates/readme-header.d.ts +1 -1
- package/dist/templates/readme-header.d.ts.map +1 -1
- package/dist/templates/readme-header.js +96 -28
- package/dist/templates/readme-header.js.map +1 -1
- package/dist/ui/interactive.d.ts +2 -1
- package/dist/ui/interactive.d.ts.map +1 -1
- package/dist/ui/interactive.js +16 -3
- package/dist/ui/interactive.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Contributor, EnrichedContribution } from '../../types/index.js';
|
|
2
|
+
import type { SiteStats } from './utils.js';
|
|
3
|
+
export declare function renderHero(contributor: Contributor, _stats: SiteStats): string;
|
|
4
|
+
export declare function renderMainContent(grouped: Array<[string, EnrichedContribution[]]>): string;
|
|
5
|
+
export declare function renderRepositorySection(repo: string, contributions: EnrichedContribution[]): string;
|
|
6
|
+
export declare function renderContributionCard(contribution: EnrichedContribution): string;
|
|
7
|
+
export declare function renderFooter(updatedAt: string): string;
|
|
8
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAkB9E;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,GAC/C,MAAM,CAOR;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,oBAAoB,EAAE,GACpC,MAAM,CA8BR;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,CA0DjF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMtD"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { escapeHtml, formatDate, renderRichDescription, } from './utils.js';
|
|
2
|
+
export function renderHero(contributor, _stats) {
|
|
3
|
+
const displayName = contributor.name || contributor.username;
|
|
4
|
+
return `<nav class="navbar">
|
|
5
|
+
<div class="shell navbar-inner">
|
|
6
|
+
<div class="nav-identity">
|
|
7
|
+
<img class="nav-avatar" src="https://github.com/${escapeHtml(contributor.username)}.png" alt="${escapeHtml(displayName)}" />
|
|
8
|
+
<div class="nav-info">
|
|
9
|
+
<span class="nav-name">${escapeHtml(displayName)}</span>
|
|
10
|
+
<span class="nav-handle"><a href="${escapeHtml(contributor.profile_url)}">@${escapeHtml(contributor.username)}</a></span>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="nav-controls">
|
|
14
|
+
<input class="search" id="search" type="search" placeholder="Search contributions..." />
|
|
15
|
+
<div class="filters" id="filters-container"></div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</nav>`;
|
|
19
|
+
}
|
|
20
|
+
export function renderMainContent(grouped) {
|
|
21
|
+
return `<main class="shell">
|
|
22
|
+
<div id="results">
|
|
23
|
+
${grouped.map(([repo, contributions]) => renderRepositorySection(repo, contributions)).join('')}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="empty" id="empty" hidden>No matching contributions found.</div>
|
|
26
|
+
</main>`;
|
|
27
|
+
}
|
|
28
|
+
export function renderRepositorySection(repo, contributions) {
|
|
29
|
+
const first = contributions[0];
|
|
30
|
+
if (!first)
|
|
31
|
+
return '';
|
|
32
|
+
const sorted = [...contributions].sort((a, b) => new Date(b.merged_at).getTime() - new Date(a.merged_at).getTime());
|
|
33
|
+
const [owner] = repo.split('/');
|
|
34
|
+
const languages = new Set(sorted.map((contribution) => contribution.language ?? 'Unknown'));
|
|
35
|
+
return `<section class="repo-section" data-repo="${escapeHtml(repo)}" data-languages="${escapeHtml([...languages].join('|'))}">
|
|
36
|
+
<header class="repo-header">
|
|
37
|
+
<div>
|
|
38
|
+
<a class="repo-name" href="https://github.com/${escapeHtml(repo)}">
|
|
39
|
+
<img src="https://github.com/${escapeHtml(owner)}.png" alt="" width="28" height="28" />
|
|
40
|
+
${escapeHtml(repo)}
|
|
41
|
+
</a>
|
|
42
|
+
${first.repo_description ? `<p>${escapeHtml(first.repo_description)}</p>` : ''}
|
|
43
|
+
</div>
|
|
44
|
+
<div class="repo-stats">
|
|
45
|
+
<span>${first.repo_stars.toLocaleString()} stars</span>
|
|
46
|
+
<span>${sorted.length} PR${sorted.length === 1 ? '' : 's'}</span>
|
|
47
|
+
</div>
|
|
48
|
+
</header>
|
|
49
|
+
<div class="contribution-list">
|
|
50
|
+
${sorted.map(renderContributionCard).join('')}
|
|
51
|
+
</div>
|
|
52
|
+
</section>`;
|
|
53
|
+
}
|
|
54
|
+
export function renderContributionCard(contribution) {
|
|
55
|
+
const description = renderRichDescription(contribution.pr_body);
|
|
56
|
+
const labels = contribution.labels.slice(0, 5);
|
|
57
|
+
const language = contribution.language ?? 'Unknown';
|
|
58
|
+
const reviewers = contribution.reviewers?.slice(0, 5) ?? [];
|
|
59
|
+
// Simplified reviewer display
|
|
60
|
+
const reviewHtml = reviewers.length > 0
|
|
61
|
+
? `<div class="reviewed-by">
|
|
62
|
+
<span>✅ Approved by</span>
|
|
63
|
+
<div class="reviewers">${reviewers
|
|
64
|
+
.map((reviewer) => `<a href="https://github.com/${escapeHtml(reviewer.login)}" title="${escapeHtml(reviewer.login)}"><img src="${escapeHtml(reviewer.avatar_url)}" alt="${escapeHtml(reviewer.login)}" width="24" height="24" /></a>`)
|
|
65
|
+
.join('')}</div>
|
|
66
|
+
</div>`
|
|
67
|
+
: contribution.merged_by
|
|
68
|
+
? `<div class="reviewed-by">
|
|
69
|
+
<span>✅ Merged by</span>
|
|
70
|
+
<a class="merged-by" href="https://github.com/${escapeHtml(contribution.merged_by)}">@${escapeHtml(contribution.merged_by)}</a>
|
|
71
|
+
</div>`
|
|
72
|
+
: '';
|
|
73
|
+
// Personal impact note
|
|
74
|
+
const noteHtml = contribution.note
|
|
75
|
+
? `<div class="impact-note">
|
|
76
|
+
<span>💡 <strong>My Impact:</strong> ${escapeHtml(contribution.note)}</span>
|
|
77
|
+
</div>`
|
|
78
|
+
: '';
|
|
79
|
+
return `<article class="contribution" data-title="${escapeHtml(contribution.pr_title)}" data-language="${escapeHtml(language)}">
|
|
80
|
+
<a class="pr-title" href="${escapeHtml(contribution.pr_url)}">${escapeHtml(contribution.pr_title)}</a>
|
|
81
|
+
|
|
82
|
+
${description ? `<details class="description-details">
|
|
83
|
+
<summary>📝 <strong>See description</strong></summary>
|
|
84
|
+
<div class="description">${description}</div>
|
|
85
|
+
</details>` : ''}
|
|
86
|
+
|
|
87
|
+
${reviewHtml}
|
|
88
|
+
${noteHtml}
|
|
89
|
+
|
|
90
|
+
<div class="meta-row">
|
|
91
|
+
<span><strong>Merged</strong>${escapeHtml(formatDate(contribution.merged_at))}</span>
|
|
92
|
+
<span><strong>Language</strong>${escapeHtml(language)}</span>
|
|
93
|
+
<span><strong>Changes</strong>+${contribution.additions.toLocaleString()} / -${contribution.deletions.toLocaleString()}</span>
|
|
94
|
+
<span><strong>Files</strong>${contribution.files_changed.toLocaleString()}</span>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
${labels.length > 0
|
|
98
|
+
? `<div class="labels">${labels
|
|
99
|
+
.map((label) => `<span>${escapeHtml(label)}</span>`)
|
|
100
|
+
.join('')}</div>`
|
|
101
|
+
: ''}
|
|
102
|
+
</article>`;
|
|
103
|
+
}
|
|
104
|
+
export function renderFooter(updatedAt) {
|
|
105
|
+
return `<footer>
|
|
106
|
+
<div class="shell">
|
|
107
|
+
Updated ${escapeHtml(formatDate(updatedAt))}. Data available in <a href="contributions.json">contributions.json</a>.
|
|
108
|
+
</div>
|
|
109
|
+
</footer>`;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EACV,UAAU,EACV,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,UAAU,CAAC,WAAwB,EAAE,MAAiB;IACpE,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,CAAC;IAE7D,OAAO;;;4DAGmD,U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
+
import type { EnrichedContribution } from '../../types/index.js';
|
|
2
|
+
export interface SiteStats {
|
|
3
|
+
totalContributions: number;
|
|
4
|
+
totalProjects: number;
|
|
5
|
+
totalLanguages: number;
|
|
6
|
+
languages: Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
count: number;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare function escapeHtml(value: string | number | null | undefined): string;
|
|
12
|
+
export declare function cleanDescription(value: string | null | undefined, maxLength?: number): string;
|
|
13
|
+
export declare function renderRichDescription(value: string | null | undefined, maxLength?: number): string;
|
|
14
|
+
export declare function formatDate(value: string): string;
|
|
15
|
+
export declare function calculateStats(contributions: EnrichedContribution[]): SiteStats;
|
|
16
|
+
export declare function groupByRepository(contributions: EnrichedContribution[]): Array<[string, EnrichedContribution[]]>;
|
|
17
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/repo/site/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,SAAS;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAO5E;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,SAAS,SAAM,GACd,MAAM,CAeR;AA8ED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,SAAS,SAAQ,GAChB,MAAM,CAqDR;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMhD;AAED,wBAAgB,cAAc,CAAC,aAAa,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAuB/E;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,oBAAoB,EAAE,GACpC,KAAK,CAAC,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAczC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
export function escapeHtml(value) {
|
|
2
|
+
return String(value ?? '')
|
|
3
|
+
.replace(/&/g, '&')
|
|
4
|
+
.replace(/</g, '<')
|
|
5
|
+
.replace(/>/g, '>')
|
|
6
|
+
.replace(/"/g, '"')
|
|
7
|
+
.replace(/'/g, ''');
|
|
8
|
+
}
|
|
9
|
+
export function cleanDescription(value, maxLength = 220) {
|
|
10
|
+
if (!value)
|
|
11
|
+
return '';
|
|
12
|
+
const cleaned = value
|
|
13
|
+
.replace(/<!--[\s\S]*?-->/g, '')
|
|
14
|
+
.replace(/```[\s\S]*?```/g, '')
|
|
15
|
+
.replace(/#{1,6}\s+/g, '')
|
|
16
|
+
.replace(/\*\*([^*]+)\*\*/g, '$1')
|
|
17
|
+
.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
|
|
18
|
+
.replace(/\s+/g, ' ')
|
|
19
|
+
.trim();
|
|
20
|
+
return cleaned.length > maxLength
|
|
21
|
+
? `${cleaned.slice(0, maxLength).trim()}...`
|
|
22
|
+
: cleaned;
|
|
23
|
+
}
|
|
24
|
+
function escapeAttribute(value) {
|
|
25
|
+
return escapeHtml(value).replace(/`/g, '`');
|
|
26
|
+
}
|
|
27
|
+
function renderInlineMarkdown(value) {
|
|
28
|
+
let rendered = escapeHtml(value);
|
|
29
|
+
rendered = rendered.replace(/<img\b([\s\S]*?)\/?>/g, (_match, attrs) => {
|
|
30
|
+
const src = attrs.match(/src="(https?:\/\/[^&]+)"/)?.[1];
|
|
31
|
+
if (!src)
|
|
32
|
+
return '';
|
|
33
|
+
const alt = attrs.match(/alt="([^&]*)"/)?.[1] ?? '';
|
|
34
|
+
const width = attrs.match(/width="(\d+)"/)?.[1];
|
|
35
|
+
const height = attrs.match(/height="(\d+)"/)?.[1];
|
|
36
|
+
const dimensions = [
|
|
37
|
+
width ? `width="${width}"` : '',
|
|
38
|
+
height ? `height="${height}"` : '',
|
|
39
|
+
]
|
|
40
|
+
.filter(Boolean)
|
|
41
|
+
.join(' ');
|
|
42
|
+
return `<img src="${src}" alt="${alt}" ${dimensions} loading="lazy" />`;
|
|
43
|
+
});
|
|
44
|
+
rendered = rendered.replace(/!\[([^\]]*)\]\((https?:\/\/[^)\s]+)\)/g, '<img src="$2" alt="$1" loading="lazy" />');
|
|
45
|
+
rendered = rendered.replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, '<a href="$2">$1</a>');
|
|
46
|
+
rendered = rendered.replace(/`([^`]+)`/g, '<code>$1</code>');
|
|
47
|
+
rendered = rendered.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>');
|
|
48
|
+
return rendered;
|
|
49
|
+
}
|
|
50
|
+
function splitMarkdownTableRow(row) {
|
|
51
|
+
return row
|
|
52
|
+
.trim()
|
|
53
|
+
.replace(/^\|/, '')
|
|
54
|
+
.replace(/\|$/, '')
|
|
55
|
+
.split('|')
|
|
56
|
+
.map((cell) => cell.trim());
|
|
57
|
+
}
|
|
58
|
+
function isMarkdownTable(block) {
|
|
59
|
+
const lines = block.split('\n').map((line) => line.trim());
|
|
60
|
+
if (lines.length < 3)
|
|
61
|
+
return false;
|
|
62
|
+
return (lines[0]?.startsWith('|') === true &&
|
|
63
|
+
/^\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?$/.test(lines[1] ?? ''));
|
|
64
|
+
}
|
|
65
|
+
function renderMarkdownTable(block) {
|
|
66
|
+
const lines = block.split('\n').map((line) => line.trim()).filter(Boolean);
|
|
67
|
+
const headers = splitMarkdownTableRow(lines[0] ?? '');
|
|
68
|
+
const rows = lines.slice(2).map(splitMarkdownTableRow);
|
|
69
|
+
return `<div class="markdown-table-wrap"><table class="markdown-table">
|
|
70
|
+
<thead><tr>${headers
|
|
71
|
+
.map((header) => `<th>${renderInlineMarkdown(header)}</th>`)
|
|
72
|
+
.join('')}</tr></thead>
|
|
73
|
+
<tbody>${rows
|
|
74
|
+
.map((row) => `<tr>${row
|
|
75
|
+
.map((cell) => `<td>${renderInlineMarkdown(cell)}</td>`)
|
|
76
|
+
.join('')}</tr>`)
|
|
77
|
+
.join('')}</tbody>
|
|
78
|
+
</table></div>`;
|
|
79
|
+
}
|
|
80
|
+
export function renderRichDescription(value, maxLength = 12000) {
|
|
81
|
+
if (!value)
|
|
82
|
+
return '';
|
|
83
|
+
const withoutComments = value
|
|
84
|
+
.replace(/<!--[\s\S]*?-->/g, '')
|
|
85
|
+
.replace(/```[\s\S]*?```/g, '')
|
|
86
|
+
.trim();
|
|
87
|
+
const blocks = withoutComments
|
|
88
|
+
.split(/\n{2,}/)
|
|
89
|
+
.map((block) => block.trim())
|
|
90
|
+
.filter(Boolean);
|
|
91
|
+
let remainingLength = maxLength;
|
|
92
|
+
return blocks
|
|
93
|
+
.map((block) => {
|
|
94
|
+
if (isMarkdownTable(block)) {
|
|
95
|
+
return renderMarkdownTable(block);
|
|
96
|
+
}
|
|
97
|
+
if (remainingLength <= 0)
|
|
98
|
+
return '';
|
|
99
|
+
const blockToRender = block.length > remainingLength
|
|
100
|
+
? `${block.slice(0, remainingLength).trim()}\n\n...`
|
|
101
|
+
: block;
|
|
102
|
+
remainingLength -= block.length;
|
|
103
|
+
const heading = blockToRender.match(/^#{1,3}\s+(.+)$/);
|
|
104
|
+
if (heading) {
|
|
105
|
+
return `<h4>${renderInlineMarkdown(heading[1] ?? '')}</h4>`;
|
|
106
|
+
}
|
|
107
|
+
const image = blockToRender.match(/^!\[([^\]]*)\]\((https?:\/\/[^)\s]+)\)$/);
|
|
108
|
+
if (image) {
|
|
109
|
+
return `<figure><img src="${escapeAttribute(image[2] ?? '')}" alt="${escapeAttribute(image[1] ?? '')}" loading="lazy" /></figure>`;
|
|
110
|
+
}
|
|
111
|
+
const listItems = blockToRender
|
|
112
|
+
.split('\n')
|
|
113
|
+
.map((line) => line.match(/^\s*[-*]\s+(.+)$/)?.[1])
|
|
114
|
+
.filter((line) => Boolean(line));
|
|
115
|
+
if (listItems.length > 0) {
|
|
116
|
+
return `<ul>${listItems
|
|
117
|
+
.map((item) => `<li>${renderInlineMarkdown(item)}</li>`)
|
|
118
|
+
.join('')}</ul>`;
|
|
119
|
+
}
|
|
120
|
+
return `<p>${renderInlineMarkdown(blockToRender).replace(/\n/g, '<br />')}</p>`;
|
|
121
|
+
})
|
|
122
|
+
.join('');
|
|
123
|
+
}
|
|
124
|
+
export function formatDate(value) {
|
|
125
|
+
return new Date(value).toLocaleDateString('en-US', {
|
|
126
|
+
month: 'short',
|
|
127
|
+
day: 'numeric',
|
|
128
|
+
year: 'numeric',
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export function calculateStats(contributions) {
|
|
132
|
+
const repos = new Set();
|
|
133
|
+
const languages = new Map();
|
|
134
|
+
contributions.forEach((contribution) => {
|
|
135
|
+
repos.add(contribution.repo);
|
|
136
|
+
if (contribution.language) {
|
|
137
|
+
languages.set(contribution.language, (languages.get(contribution.language) ?? 0) + 1);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return {
|
|
141
|
+
totalContributions: contributions.length,
|
|
142
|
+
totalProjects: repos.size,
|
|
143
|
+
totalLanguages: languages.size,
|
|
144
|
+
languages: [...languages.entries()]
|
|
145
|
+
.map(([name, count]) => ({ name, count }))
|
|
146
|
+
.sort((a, b) => b.count - a.count || a.name.localeCompare(b.name)),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export function groupByRepository(contributions) {
|
|
150
|
+
const grouped = new Map();
|
|
151
|
+
contributions.forEach((contribution) => {
|
|
152
|
+
const existing = grouped.get(contribution.repo) ?? [];
|
|
153
|
+
existing.push(contribution);
|
|
154
|
+
grouped.set(contribution.repo, existing);
|
|
155
|
+
});
|
|
156
|
+
return [...grouped.entries()].sort((a, b) => {
|
|
157
|
+
const aStars = a[1][0]?.repo_stars ?? 0;
|
|
158
|
+
const bStars = b[1][0]?.repo_stars ?? 0;
|
|
159
|
+
return bStars - aStars || a[0].localeCompare(b[0]);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/repo/site/utils.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,UAAU,CAAC,KAAyC;IAClE,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAAgC,EAChC,SAAS,GAAG,GAAG;IAEf,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,OAAO,GAAG,KAAK;SAClB,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAC/B,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;SAC9B,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC;SACjC,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC;SACvC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;IAEV,OAAO,OAAO,CAAC,MAAM,GAAG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K,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KACrE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,aAAqC;IAErC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkC,CAAC;IAE1D,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;QACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC;QACxC,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC;QACxC,OAAO,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -45,66 +45,66 @@ function generatePRCard(pr) {
|
|
|
45
45
|
});
|
|
46
46
|
const changes = `+${pr.additions || 0} −${pr.deletions || 0}`;
|
|
47
47
|
const files = pr.files_changed ? `${pr.files_changed} files` : '';
|
|
48
|
-
// Clean
|
|
49
|
-
let
|
|
48
|
+
// Clean description properly
|
|
49
|
+
let cleanedDescription = '';
|
|
50
50
|
if (pr.pr_body) {
|
|
51
|
-
|
|
52
|
-
.replace(/<!--[\s\S]*?-->/g, '')
|
|
53
|
-
.replace(/```[\s\S]*?```/g, '')
|
|
54
|
-
.replace(/#{1,6}\s+/g, '')
|
|
55
|
-
.replace(/\*\*([^*]+)\*\*/g, '$1')
|
|
56
|
-
.replace(/\[([^\]]+)\]\([^\)]+\)/g, '$1')
|
|
57
|
-
.replace(/\n+/g, '
|
|
58
|
-
.replace(/\s+/g, ' ')
|
|
51
|
+
cleanedDescription = pr.pr_body
|
|
52
|
+
.replace(/<!--[\s\S]*?-->/g, '') // Remove HTML comments
|
|
53
|
+
.replace(/```[\s\S]*?```/g, '') // Remove code blocks
|
|
54
|
+
.replace(/#{1,6}\s+/g, '') // Remove markdown headers
|
|
55
|
+
.replace(/\*\*([^*]+)\*\*/g, '$1') // Remove bold
|
|
56
|
+
.replace(/\[([^\]]+)\]\([^\)]+\)/g, '$1') // Remove links but keep text
|
|
57
|
+
.replace(/\n+/g, '\n') // Normalize line breaks
|
|
59
58
|
.trim();
|
|
60
|
-
description = cleaned.length > 300
|
|
61
|
-
? cleaned.substring(0, 300) + '...'
|
|
62
|
-
: cleaned;
|
|
63
59
|
}
|
|
64
|
-
//
|
|
60
|
+
// Description with collapsible details
|
|
61
|
+
const descriptionHtml = cleanedDescription ? `
|
|
62
|
+
<details>
|
|
63
|
+
<summary><strong>📝 See description</strong></summary>
|
|
64
|
+
<blockquote>
|
|
65
|
+
<p>${cleanedDescription}</p>
|
|
66
|
+
</blockquote>
|
|
67
|
+
</details>` : '';
|
|
68
|
+
// Reviewers section - more compact
|
|
65
69
|
let reviewersHtml = '';
|
|
66
70
|
if (pr.reviewers && pr.reviewers.length > 0) {
|
|
67
71
|
const reviewerBadges = pr.reviewers
|
|
68
72
|
.map(r => `<a href="https://github.com/${r.login}"><img src="${r.avatar_url}" width="20" height="20" style="border-radius: 50%; vertical-align: middle;" alt="${r.login}" title="${r.login}"/></a>`)
|
|
69
73
|
.join(' ');
|
|
70
|
-
reviewersHtml =
|
|
71
|
-
<p>
|
|
72
|
-
<sub>✅ <strong>Reviewed by:</strong> ${reviewerBadges}</sub>
|
|
73
|
-
</p>`;
|
|
74
|
+
reviewersHtml = `<sub>✅ Reviewed by: ${reviewerBadges}</sub>`;
|
|
74
75
|
}
|
|
75
76
|
else if (pr.merged_by) {
|
|
76
|
-
reviewersHtml =
|
|
77
|
-
<p>
|
|
78
|
-
<sub>✅ <strong>Merged by:</strong> <a href="https://github.com/${pr.merged_by}">@${pr.merged_by}</a></sub>
|
|
79
|
-
</p>`;
|
|
77
|
+
reviewersHtml = `<sub>✅ Merged by: <a href="https://github.com/${pr.merged_by}">@${pr.merged_by}</a></sub>`;
|
|
80
78
|
}
|
|
81
79
|
// Personal note
|
|
82
80
|
const noteHtml = pr.note ? `
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// Labels
|
|
81
|
+
<blockquote>
|
|
82
|
+
<p>💡 <strong>My Impact:</strong> ${pr.note}</p>
|
|
83
|
+
</blockquote>` : '';
|
|
84
|
+
// Labels - more compact
|
|
87
85
|
const labelsHtml = pr.labels && pr.labels.length > 0
|
|
88
|
-
?
|
|
86
|
+
? pr.labels.slice(0, 5).map(l => `<img src="https://img.shields.io/badge/${encodeURIComponent(l.replace(/-/g, '--'))}-gray?style=flat-square" alt="${l}"/>`).join(' ')
|
|
89
87
|
: '';
|
|
90
88
|
return `
|
|
91
|
-
<div style="padding: 16px; border-left:
|
|
92
|
-
|
|
93
|
-
#### [${pr.pr_title}](${pr.pr_url})
|
|
89
|
+
<div style="padding: 12px 16px; border-left: 3px solid #0969da; margin: 10px 0; background: #f6f8fa; border-radius: 6px;">
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
<h4 style="margin: 0 0 8px 0;">
|
|
92
|
+
<a href="${pr.pr_url}">${pr.pr_title}</a>
|
|
93
|
+
</h4>
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
${reviewersHtml}
|
|
99
|
-
|
|
100
|
-
<p>
|
|
95
|
+
<p style="margin: 4px 0; font-size: 0.9em;">
|
|
101
96
|
<img src="https://img.shields.io/badge/📅_${encodeURIComponent(date)}-blue?style=flat-square" alt="Merged ${date}"/>
|
|
102
97
|
<img src="https://img.shields.io/badge/📊_${encodeURIComponent(changes)}-success?style=flat-square" alt="Changes"/>
|
|
103
98
|
${files ? `<img src="https://img.shields.io/badge/📁_${encodeURIComponent(files)}-orange?style=flat-square" alt="${files}"/>` : ''}
|
|
104
|
-
<a href="${pr.pr_url}"><img src="https://img.shields.io/badge/View_PR-→-purple?style=flat-square" alt="View PR"/></a>
|
|
105
99
|
</p>
|
|
106
100
|
|
|
107
|
-
${
|
|
101
|
+
${reviewersHtml ? `<p style="margin: 4px 0;">${reviewersHtml}</p>` : ''}
|
|
102
|
+
|
|
103
|
+
${labelsHtml ? `<p style="margin: 4px 0;">${labelsHtml}</p>` : ''}
|
|
104
|
+
|
|
105
|
+
${descriptionHtml}
|
|
106
|
+
|
|
107
|
+
${noteHtml}
|
|
108
108
|
|
|
109
109
|
</div>
|
|
110
110
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-section.js","sourceRoot":"","sources":["../../src/templates/project-section.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,aAAqC;IAErC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IAC9C,MAAM,KAAK,GAAG,UAAU,CAAC,cAAc,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,cAA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;;;CAGT,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-header.d.ts","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE;IAC9D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"readme-header.d.ts","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE;IAC9D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CAgHT"}
|
|
@@ -1,47 +1,115 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Professional README header template
|
|
2
|
+
* Professional README header template with responsive navigation
|
|
3
3
|
*/
|
|
4
4
|
export function generateHeader(contributor, stats) {
|
|
5
|
-
const { username, name, profile_url
|
|
5
|
+
const { username, name, profile_url } = contributor;
|
|
6
6
|
const displayName = name || username;
|
|
7
|
+
const avatarUrl = `https://github.com/${username}.png`;
|
|
7
8
|
return `
|
|
8
9
|
<div align="center">
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
<!-- Hero Section with Full-Width Responsive Design -->
|
|
12
|
+
<picture>
|
|
13
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png">
|
|
14
|
+
<img alt="Open Source Contributions Banner" src="https://user-images.githubusercontent.com/25423296/163456776-7fe0f349-c08d-4b11-b41a-8e40061992f8.png" width="100%" style="max-width: 100%;">
|
|
15
|
+
</picture>
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
</div>
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
<!-- Navigation Bar - Full Width, Responsive -->
|
|
20
|
+
<table width="100%" style="border: none; margin: 0; padding: 0;">
|
|
21
|
+
<tr>
|
|
22
|
+
<td width="100%" style="border: none; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); padding: 20px; border-radius: 10px;">
|
|
23
|
+
<table width="100%" style="border: none;">
|
|
24
|
+
<tr>
|
|
25
|
+
<td style="border: none; vertical-align: middle; padding: 0;">
|
|
26
|
+
<a href="${profile_url}">
|
|
27
|
+
<img src="${avatarUrl}" width="80" height="80" alt="${username}" style="border-radius: 50%; border: 4px solid white; box-shadow: 0 4px 6px rgba(0,0,0,0.1);"/>
|
|
28
|
+
</a>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="border: none; vertical-align: middle; padding-left: 20px;">
|
|
31
|
+
<h1 style="margin: 0; color: white; font-size: 28px;">
|
|
32
|
+
${displayName}
|
|
33
|
+
</h1>
|
|
34
|
+
<p style="margin: 5px 0 0 0; color: rgba(255,255,255,0.9); font-size: 18px;">
|
|
35
|
+
<a href="${profile_url}" style="color: white; text-decoration: none;">@${username}</a>
|
|
36
|
+
</p>
|
|
37
|
+
</td>
|
|
38
|
+
<td align="right" style="border: none; vertical-align: middle; padding: 0;">
|
|
39
|
+
<table style="border: none;">
|
|
40
|
+
<tr>
|
|
41
|
+
<td align="center" style="border: none; padding: 10px;">
|
|
42
|
+
<div style="background: rgba(255,255,255,0.2); padding: 15px; border-radius: 10px; backdrop-filter: blur(10px);">
|
|
43
|
+
<div style="font-size: 32px; font-weight: bold; color: white;">${stats.totalContributions}</div>
|
|
44
|
+
<div style="font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 5px;">CONTRIBUTIONS</div>
|
|
45
|
+
</div>
|
|
46
|
+
</td>
|
|
47
|
+
<td align="center" style="border: none; padding: 10px;">
|
|
48
|
+
<div style="background: rgba(255,255,255,0.2); padding: 15px; border-radius: 10px; backdrop-filter: blur(10px);">
|
|
49
|
+
<div style="font-size: 32px; font-weight: bold; color: white;">${stats.totalProjects}</div>
|
|
50
|
+
<div style="font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 5px;">PROJECTS</div>
|
|
51
|
+
</div>
|
|
52
|
+
</td>
|
|
53
|
+
<td align="center" style="border: none; padding: 10px;">
|
|
54
|
+
<div style="background: rgba(255,255,255,0.2); padding: 15px; border-radius: 10px; backdrop-filter: blur(10px);">
|
|
55
|
+
<div style="font-size: 32px; font-weight: bold; color: white;">${stats.totalLanguages}</div>
|
|
56
|
+
<div style="font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 5px;">LANGUAGES</div>
|
|
57
|
+
</div>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</table>
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</table>
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
</table>
|
|
16
67
|
|
|
17
|
-
|
|
68
|
+
<!-- Mobile-Friendly Version (Shows on narrow screens) -->
|
|
69
|
+
<div align="center" style="display: none;">
|
|
70
|
+
<a href="${profile_url}">
|
|
71
|
+
<img src="${avatarUrl}" width="120" height="120" alt="${username}" style="border-radius: 60px; border: 5px solid #667eea; margin: 20px 0;"/>
|
|
72
|
+
</a>
|
|
73
|
+
<h1 style="margin: 10px 0;">${displayName}</h1>
|
|
74
|
+
<p style="margin: 5px 0;">
|
|
75
|
+
<a href="${profile_url}" style="color: #667eea; text-decoration: none; font-size: 18px;">@${username}</a>
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
<table align="center" style="margin: 20px 0;">
|
|
79
|
+
<tr>
|
|
80
|
+
<td align="center" style="padding: 15px;">
|
|
81
|
+
<div style="font-size: 28px; font-weight: bold; color: #667eea;">${stats.totalContributions}</div>
|
|
82
|
+
<div style="font-size: 11px; color: #666; margin-top: 5px;">CONTRIBUTIONS</div>
|
|
83
|
+
</td>
|
|
84
|
+
<td align="center" style="padding: 15px;">
|
|
85
|
+
<div style="font-size: 28px; font-weight: bold; color: #764ba2;">${stats.totalProjects}</div>
|
|
86
|
+
<div style="font-size: 11px; color: #666; margin-top: 5px;">PROJECTS</div>
|
|
87
|
+
</td>
|
|
88
|
+
<td align="center" style="padding: 15px;">
|
|
89
|
+
<div style="font-size: 28px; font-weight: bold; color: #667eea;">${stats.totalLanguages}</div>
|
|
90
|
+
<div style="font-size: 11px; color: #666; margin-top: 5px;">LANGUAGES</div>
|
|
91
|
+
</td>
|
|
92
|
+
</tr>
|
|
93
|
+
</table>
|
|
94
|
+
</div>
|
|
18
95
|
|
|
19
96
|
<br/>
|
|
20
97
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</table>
|
|
98
|
+
<!-- Quick Navigation -->
|
|
99
|
+
<div align="center">
|
|
100
|
+
<a href="#-featured-projects">
|
|
101
|
+
<img src="https://img.shields.io/badge/🌟_Featured_Projects-blue?style=for-the-badge" alt="Featured Projects"/>
|
|
102
|
+
</a>
|
|
103
|
+
<a href="#-contributions-by-project">
|
|
104
|
+
<img src="https://img.shields.io/badge/📦_All_Contributions-purple?style=for-the-badge" alt="All Contributions"/>
|
|
105
|
+
</a>
|
|
106
|
+
<a href="contributions.json">
|
|
107
|
+
<img src="https://img.shields.io/badge/📄_Raw_Data-gray?style=for-the-badge" alt="Raw Data"/>
|
|
108
|
+
</a>
|
|
109
|
+
</div>
|
|
34
110
|
|
|
35
111
|
<br/>
|
|
36
112
|
|
|
37
|
-
<p>
|
|
38
|
-
<a href="#-featured-projects">Featured Projects</a> •
|
|
39
|
-
<a href="#-contributions-by-project">Contributions</a> •
|
|
40
|
-
<a href="contributions.json">Raw Data</a>
|
|
41
|
-
</p>
|
|
42
|
-
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
113
|
---
|
|
46
114
|
`;
|
|
47
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-header.js","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,cAAc,CAAC,WAAwB,EAAE,KAIxD;IACC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"readme-header.js","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,cAAc,CAAC,WAAwB,EAAE,KAIxD;IACC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IACpD,MAAM,WAAW,GAAG,IAAI,IAAI,QAAQ,CAAC;IACrC,MAAM,SAAS,GAAG,sBAAsB,QAAQ,MAAM,CAAC;IAEvD,OAAO;;;;;;;;;;;;;;;;;;mBAkBU,WAAW;sBACR,SAAS,iCAAiC,QAAQ;;;;;YAK5D,WAAW;;;qBAGF,WAAW,mDAAmD,QAAQ;;;;;;;;iFAQV,KAAK,CAAC,kBAAkB;;;;;;iFAMxB,KAAK,CAAC,aAAa;;;;;;iFAMnB,KAAK,CAAC,cAAc;;;;;;;;;;;;;;;aAexF,WAAW;gBACR,SAAS,mCAAmC,QAAQ;;gCAEpC,WAAW;;eAE5B,WAAW,sEAAsE,QAAQ;;;;;;2EAM7B,KAAK,CAAC,kBAAkB;;;;2EAIxB,KAAK,CAAC,aAAa;;;;2EAInB,KAAK,CAAC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;CAyB9F,CAAC;AACF,CAAC"}
|