@quantica-apps/create-quantica-app 0.1.3
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/dist/doctor.d.ts +21 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +218 -0
- package/dist/doctor.js.map +1 -0
- package/dist/generateApp.d.ts +33 -0
- package/dist/generateApp.d.ts.map +1 -0
- package/dist/generateApp.js +632 -0
- package/dist/generateApp.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +108 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive.d.ts +19 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +109 -0
- package/dist/interactive.js.map +1 -0
- package/dist/platformRoot.d.ts +3 -0
- package/dist/platformRoot.d.ts.map +1 -0
- package/dist/platformRoot.js +37 -0
- package/dist/platformRoot.js.map +1 -0
- package/dist/smoke.d.ts +2 -0
- package/dist/smoke.d.ts.map +1 -0
- package/dist/smoke.js +96 -0
- package/dist/smoke.js.map +1 -0
- package/package.json +31 -0
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type DoctorStatus = 'OK' | 'WARN' | 'FAIL';
|
|
2
|
+
export interface DoctorIssue {
|
|
3
|
+
readonly status: DoctorStatus;
|
|
4
|
+
readonly check: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly suggestion?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DoctorOptions {
|
|
9
|
+
readonly cwd: string;
|
|
10
|
+
readonly expectedPlatformVersion?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DoctorResult {
|
|
13
|
+
readonly appRoot: string;
|
|
14
|
+
readonly dependencyMode: 'local' | 'registry' | 'mixed' | 'unknown';
|
|
15
|
+
readonly issues: readonly DoctorIssue[];
|
|
16
|
+
}
|
|
17
|
+
export declare function inspectApp(options: DoctorOptions): DoctorResult;
|
|
18
|
+
export declare function printDoctorResult(result: DoctorResult): void;
|
|
19
|
+
export declare function runDoctor(options: DoctorOptions): 1 | 0;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAkCA,KAAK,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;IACpE,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;CACzC;AAqGD,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CA2G/D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,QAiBrD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,SAK/C"}
|
package/dist/doctor.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
const platformPackages = [
|
|
4
|
+
'@quantica-apps/platform-app-core',
|
|
5
|
+
'@quantica-apps/platform-auth',
|
|
6
|
+
'@quantica-apps/platform-i18n',
|
|
7
|
+
'@quantica-apps/platform-shell',
|
|
8
|
+
'@quantica-apps/platform-theme',
|
|
9
|
+
];
|
|
10
|
+
const requiredEnvKeys = [
|
|
11
|
+
'VITE_APP_DISPLAY_NAME',
|
|
12
|
+
'VITE_APP_ID',
|
|
13
|
+
'VITE_HUB_URL',
|
|
14
|
+
'VITE_KEYCLOAK_URL',
|
|
15
|
+
'VITE_KEYCLOAK_REALM',
|
|
16
|
+
'VITE_KEYCLOAK_CLIENT_ID',
|
|
17
|
+
'VITE_KEYCLOAK_PERMISSIONS_CLIENT_ID',
|
|
18
|
+
'VITE_SKIP_AUTH',
|
|
19
|
+
];
|
|
20
|
+
const requiredFiles = [
|
|
21
|
+
'package.json',
|
|
22
|
+
'.github/workflows/ci.yml',
|
|
23
|
+
'frontend/package.json',
|
|
24
|
+
'frontend/.env.example',
|
|
25
|
+
'frontend/src/App.tsx',
|
|
26
|
+
'frontend/src/app.manifest.ts',
|
|
27
|
+
'frontend/src/config/env.ts',
|
|
28
|
+
'frontend/src/index.css',
|
|
29
|
+
'frontend/src/main.tsx',
|
|
30
|
+
];
|
|
31
|
+
const readJson = (targetPath) => JSON.parse(readFileSync(targetPath, 'utf8'));
|
|
32
|
+
const readEnvFile = (targetPath) => {
|
|
33
|
+
const values = new Map();
|
|
34
|
+
if (!existsSync(targetPath)) {
|
|
35
|
+
return values;
|
|
36
|
+
}
|
|
37
|
+
const lines = readFileSync(targetPath, 'utf8').split(/\r?\n/);
|
|
38
|
+
for (const line of lines) {
|
|
39
|
+
const trimmed = line.trim();
|
|
40
|
+
if (!trimmed || trimmed.startsWith('#')) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const separatorIndex = trimmed.indexOf('=');
|
|
44
|
+
if (separatorIndex < 0) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
values.set(trimmed.slice(0, separatorIndex), trimmed.slice(separatorIndex + 1));
|
|
48
|
+
}
|
|
49
|
+
return values;
|
|
50
|
+
};
|
|
51
|
+
const getDependencies = (packageJson) => {
|
|
52
|
+
const dependencies = packageJson.dependencies;
|
|
53
|
+
if (!dependencies || typeof dependencies !== 'object' || Array.isArray(dependencies)) {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
return dependencies;
|
|
57
|
+
};
|
|
58
|
+
const inferDependencyMode = (dependencies) => {
|
|
59
|
+
const platformDependencyValues = platformPackages
|
|
60
|
+
.map((packageName) => dependencies[packageName])
|
|
61
|
+
.filter((value) => typeof value === 'string');
|
|
62
|
+
if (!platformDependencyValues.length) {
|
|
63
|
+
return 'unknown';
|
|
64
|
+
}
|
|
65
|
+
const localCount = platformDependencyValues.filter((value) => value.startsWith('file:')).length;
|
|
66
|
+
if (localCount === platformDependencyValues.length) {
|
|
67
|
+
return 'local';
|
|
68
|
+
}
|
|
69
|
+
if (localCount === 0) {
|
|
70
|
+
return 'registry';
|
|
71
|
+
}
|
|
72
|
+
return 'mixed';
|
|
73
|
+
};
|
|
74
|
+
const getPlatformVersions = (dependencies) => platformPackages
|
|
75
|
+
.map((packageName) => dependencies[packageName])
|
|
76
|
+
.filter((value) => typeof value === 'string' && !value.startsWith('file:'));
|
|
77
|
+
const checkLocalDependencyPaths = (appRoot, dependencies) => {
|
|
78
|
+
const issues = [];
|
|
79
|
+
for (const packageName of platformPackages) {
|
|
80
|
+
const dependencyValue = dependencies[packageName];
|
|
81
|
+
if (!dependencyValue?.startsWith('file:')) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const dependencyPath = dependencyValue.slice('file:'.length);
|
|
85
|
+
const resolvedPath = path.resolve(appRoot, 'frontend', dependencyPath);
|
|
86
|
+
if (existsSync(resolvedPath)) {
|
|
87
|
+
issues.push({
|
|
88
|
+
status: 'OK',
|
|
89
|
+
check: `dependency:${packageName}`,
|
|
90
|
+
message: `Local dependency path exists: ${dependencyValue}`,
|
|
91
|
+
});
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
issues.push({
|
|
95
|
+
status: 'FAIL',
|
|
96
|
+
check: `dependency:${packageName}`,
|
|
97
|
+
message: `Local dependency path does not exist: ${dependencyValue}`,
|
|
98
|
+
suggestion: 'Generate production apps with --dependency-mode registry, or keep quantica-app-platform at the expected relative path.',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return issues;
|
|
102
|
+
};
|
|
103
|
+
export function inspectApp(options) {
|
|
104
|
+
const appRoot = path.resolve(options.cwd);
|
|
105
|
+
const issues = [];
|
|
106
|
+
for (const relativePath of requiredFiles) {
|
|
107
|
+
const targetPath = path.join(appRoot, relativePath);
|
|
108
|
+
issues.push({
|
|
109
|
+
status: existsSync(targetPath) ? 'OK' : 'FAIL',
|
|
110
|
+
check: `file:${relativePath}`,
|
|
111
|
+
message: existsSync(targetPath)
|
|
112
|
+
? `Required file exists: ${relativePath}`
|
|
113
|
+
: `Required file is missing: ${relativePath}`,
|
|
114
|
+
suggestion: existsSync(targetPath)
|
|
115
|
+
? undefined
|
|
116
|
+
: 'Regenerate the app with the current create-quantica-app template or add the missing file.',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
const frontendPackagePath = path.join(appRoot, 'frontend', 'package.json');
|
|
120
|
+
if (!existsSync(frontendPackagePath)) {
|
|
121
|
+
return {
|
|
122
|
+
appRoot,
|
|
123
|
+
dependencyMode: 'unknown',
|
|
124
|
+
issues,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const frontendPackageJson = readJson(frontendPackagePath);
|
|
128
|
+
const dependencies = getDependencies(frontendPackageJson);
|
|
129
|
+
const dependencyMode = inferDependencyMode(dependencies);
|
|
130
|
+
issues.push({
|
|
131
|
+
status: dependencyMode === 'unknown' || dependencyMode === 'mixed' ? 'FAIL' : 'OK',
|
|
132
|
+
check: 'platform-dependency-mode',
|
|
133
|
+
message: `Detected platform dependency mode: ${dependencyMode}`,
|
|
134
|
+
suggestion: dependencyMode === 'mixed'
|
|
135
|
+
? 'Use either all local file: dependencies or all registry versions for @quantica-apps/platform-* packages.'
|
|
136
|
+
: dependencyMode === 'unknown'
|
|
137
|
+
? 'Add the required @quantica-apps/platform-* dependencies to frontend/package.json.'
|
|
138
|
+
: undefined,
|
|
139
|
+
});
|
|
140
|
+
if (dependencyMode === 'local') {
|
|
141
|
+
issues.push(...checkLocalDependencyPaths(appRoot, dependencies));
|
|
142
|
+
}
|
|
143
|
+
if (dependencyMode === 'registry') {
|
|
144
|
+
const versions = getPlatformVersions(dependencies);
|
|
145
|
+
const uniqueVersions = new Set(versions);
|
|
146
|
+
const expectedVersion = options.expectedPlatformVersion;
|
|
147
|
+
issues.push({
|
|
148
|
+
status: uniqueVersions.size === 1 ? 'OK' : 'FAIL',
|
|
149
|
+
check: 'platform-version-consistency',
|
|
150
|
+
message: `Detected registry platform versions: ${versions.join(', ') || 'none'}`,
|
|
151
|
+
suggestion: uniqueVersions.size === 1
|
|
152
|
+
? undefined
|
|
153
|
+
: 'Keep all @quantica-apps/platform-* packages on the same internal platform version.',
|
|
154
|
+
});
|
|
155
|
+
if (expectedVersion) {
|
|
156
|
+
const matchesExpected = versions.every((version) => version === expectedVersion);
|
|
157
|
+
issues.push({
|
|
158
|
+
status: matchesExpected ? 'OK' : 'FAIL',
|
|
159
|
+
check: 'platform-version-expected',
|
|
160
|
+
message: `Expected platform version: ${expectedVersion}`,
|
|
161
|
+
suggestion: matchesExpected
|
|
162
|
+
? undefined
|
|
163
|
+
: `Update @quantica-apps/platform-* dependencies to ${expectedVersion}.`,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const envExamplePath = path.join(appRoot, 'frontend', '.env.example');
|
|
168
|
+
const envExample = readEnvFile(envExamplePath);
|
|
169
|
+
for (const envKey of requiredEnvKeys) {
|
|
170
|
+
issues.push({
|
|
171
|
+
status: envExample.has(envKey) ? 'OK' : 'FAIL',
|
|
172
|
+
check: `env-example:${envKey}`,
|
|
173
|
+
message: envExample.has(envKey)
|
|
174
|
+
? `frontend/.env.example declares ${envKey}`
|
|
175
|
+
: `frontend/.env.example is missing ${envKey}`,
|
|
176
|
+
suggestion: envExample.has(envKey)
|
|
177
|
+
? undefined
|
|
178
|
+
: `Add ${envKey} to frontend/.env.example and document its runtime source.`,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
const envPath = path.join(appRoot, 'frontend', '.env');
|
|
182
|
+
const envLocalPath = path.join(appRoot, 'frontend', '.env.local');
|
|
183
|
+
if (!existsSync(envPath) && !existsSync(envLocalPath)) {
|
|
184
|
+
issues.push({
|
|
185
|
+
status: 'WARN',
|
|
186
|
+
check: 'runtime-env',
|
|
187
|
+
message: 'No frontend/.env or frontend/.env.local file found.',
|
|
188
|
+
suggestion: 'Create one locally or configure these variables in the deployment environment before running against real Keycloak.',
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
appRoot,
|
|
193
|
+
dependencyMode,
|
|
194
|
+
issues,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
export function printDoctorResult(result) {
|
|
198
|
+
console.log(`\nQuantica App Doctor`);
|
|
199
|
+
console.log(`- app root: ${result.appRoot}`);
|
|
200
|
+
console.log(`- dependency mode: ${result.dependencyMode}`);
|
|
201
|
+
console.log('');
|
|
202
|
+
for (const issue of result.issues) {
|
|
203
|
+
console.log(`[${issue.status}] ${issue.check} - ${issue.message}`);
|
|
204
|
+
if (issue.suggestion) {
|
|
205
|
+
console.log(` suggestion: ${issue.suggestion}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const failures = result.issues.filter((issue) => issue.status === 'FAIL').length;
|
|
209
|
+
const warnings = result.issues.filter((issue) => issue.status === 'WARN').length;
|
|
210
|
+
console.log('');
|
|
211
|
+
console.log(`Summary: ${failures} failure(s), ${warnings} warning(s)`);
|
|
212
|
+
}
|
|
213
|
+
export function runDoctor(options) {
|
|
214
|
+
const result = inspectApp(options);
|
|
215
|
+
printDoctorResult(result);
|
|
216
|
+
return result.issues.some((issue) => issue.status === 'FAIL') ? 1 : 0;
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,gBAAgB,GAAG;IACvB,kCAAkC;IAClC,8BAA8B;IAC9B,8BAA8B;IAC9B,+BAA+B;IAC/B,+BAA+B;CACvB,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,uBAAuB;IACvB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,qBAAqB;IACrB,yBAAyB;IACzB,qCAAqC;IACrC,gBAAgB;CACR,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,cAAc;IACd,0BAA0B;IAC1B,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,8BAA8B;IAC9B,4BAA4B;IAC5B,wBAAwB;IACxB,uBAAuB;CACf,CAAC;AAsBX,MAAM,QAAQ,GAAG,CAAC,UAAkB,EAAE,EAAE,CACtC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAA4B,CAAC;AAE1E,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEzC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAA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,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAsB;IAC9C,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE1B,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type IconName } from '@quantica-apps/platform-app-core';
|
|
2
|
+
export interface SidebarAnswer {
|
|
3
|
+
readonly icon: IconName;
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly requiredClientRoles: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
export interface GenerateAppOptions {
|
|
10
|
+
readonly appDisplayName: string;
|
|
11
|
+
readonly appSlug: string;
|
|
12
|
+
readonly dependencyMode: 'local' | 'registry';
|
|
13
|
+
readonly defaultRoute: string;
|
|
14
|
+
readonly frontendPort: number;
|
|
15
|
+
readonly hubOrigin: string;
|
|
16
|
+
readonly includeExamplePages: boolean;
|
|
17
|
+
readonly installDependencies: boolean;
|
|
18
|
+
readonly outDir: string;
|
|
19
|
+
readonly platformPackageVersion: string;
|
|
20
|
+
readonly platformRoot: string;
|
|
21
|
+
readonly sidebarItems: readonly SidebarAnswer[];
|
|
22
|
+
}
|
|
23
|
+
export interface GenerateAppResult {
|
|
24
|
+
readonly appId: string;
|
|
25
|
+
readonly appRoot: string;
|
|
26
|
+
readonly frontendRoot: string;
|
|
27
|
+
readonly generatedFiles: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
export declare function printGenerationPreview(options: GenerateAppOptions): void;
|
|
30
|
+
export declare function generateApp(options: GenerateAppOptions): GenerateAppResult;
|
|
31
|
+
export declare function cleanupGeneratedApp(appRoot: string): void;
|
|
32
|
+
export declare const supportedIcons: ("house" | "users" | "list" | "key" | "pulse" | "file-text" | "chart-bar" | "gear" | "squares-four" | "database" | "folders" | "cards")[];
|
|
33
|
+
//# sourceMappingURL=generateApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateApp.d.ts","sourceRoot":"","sources":["../src/generateApp.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,SAAS,aAAa,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CA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