configforge 1.0.0-beta.10 → 1.0.0-beta.12
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 +143 -2
- package/dist/core/Converter.d.ts +27 -0
- package/dist/core/Converter.d.ts.map +1 -1
- package/dist/core/Converter.js +91 -21
- package/dist/core/Converter.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/Plugin.d.ts +95 -0
- package/dist/plugins/Plugin.d.ts.map +1 -0
- package/dist/plugins/Plugin.js +3 -0
- package/dist/plugins/Plugin.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +73 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -0
- package/dist/plugins/PluginManager.js +220 -0
- package/dist/plugins/PluginManager.js.map +1 -0
- package/dist/plugins/PluginRegistry.d.ts +122 -0
- package/dist/plugins/PluginRegistry.d.ts.map +1 -0
- package/dist/plugins/PluginRegistry.js +385 -0
- package/dist/plugins/PluginRegistry.js.map +1 -0
- package/dist/plugins/built-in/AuditPlugin.d.ts +81 -0
- package/dist/plugins/built-in/AuditPlugin.d.ts.map +1 -0
- package/dist/plugins/built-in/AuditPlugin.js +235 -0
- package/dist/plugins/built-in/AuditPlugin.js.map +1 -0
- package/dist/plugins/built-in/BackupPlugin.d.ts +38 -0
- package/dist/plugins/built-in/BackupPlugin.d.ts.map +1 -0
- package/dist/plugins/built-in/BackupPlugin.js +105 -0
- package/dist/plugins/built-in/BackupPlugin.js.map +1 -0
- package/dist/plugins/built-in/ValidationPlugin.d.ts +61 -0
- package/dist/plugins/built-in/ValidationPlugin.d.ts.map +1 -0
- package/dist/plugins/built-in/ValidationPlugin.js +235 -0
- package/dist/plugins/built-in/ValidationPlugin.js.map +1 -0
- package/dist/plugins/built-in/index.d.ts +7 -0
- package/dist/plugins/built-in/index.d.ts.map +1 -0
- package/dist/plugins/built-in/index.js +14 -0
- package/dist/plugins/built-in/index.js.map +1 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +25 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/scripts/CLIGenerator.d.ts +109 -0
- package/dist/scripts/CLIGenerator.d.ts.map +1 -0
- package/dist/scripts/CLIGenerator.js +440 -0
- package/dist/scripts/CLIGenerator.js.map +1 -0
- package/dist/scripts/CLIUtils.d.ts +136 -0
- package/dist/scripts/CLIUtils.d.ts.map +1 -0
- package/dist/scripts/CLIUtils.js +361 -0
- package/dist/scripts/CLIUtils.js.map +1 -0
- package/dist/scripts/CommandBuilder.d.ts +72 -0
- package/dist/scripts/CommandBuilder.d.ts.map +1 -0
- package/dist/scripts/CommandBuilder.js +280 -0
- package/dist/scripts/CommandBuilder.js.map +1 -0
- package/dist/scripts/index.d.ts +23 -0
- package/dist/scripts/index.d.ts.map +1 -0
- package/dist/scripts/index.js +43 -0
- package/dist/scripts/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandBuilder = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Fluent builder for creating CLI commands
|
|
6
|
+
*/
|
|
7
|
+
class CommandBuilder {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.command = {};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Set command name
|
|
13
|
+
*/
|
|
14
|
+
name(name) {
|
|
15
|
+
this.command.name = name;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Set command description
|
|
20
|
+
*/
|
|
21
|
+
description(description) {
|
|
22
|
+
this.command.description = description;
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Add an option to the command
|
|
27
|
+
*/
|
|
28
|
+
option(flags, description, defaultValue) {
|
|
29
|
+
if (!this.command.options) {
|
|
30
|
+
this.command.options = [];
|
|
31
|
+
}
|
|
32
|
+
this.command.options.push({
|
|
33
|
+
flags,
|
|
34
|
+
description,
|
|
35
|
+
defaultValue,
|
|
36
|
+
});
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Add multiple options at once
|
|
41
|
+
*/
|
|
42
|
+
options(options) {
|
|
43
|
+
if (!this.command.options) {
|
|
44
|
+
this.command.options = [];
|
|
45
|
+
}
|
|
46
|
+
this.command.options.push(...options);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Set command action
|
|
51
|
+
*/
|
|
52
|
+
action(action) {
|
|
53
|
+
this.command.action = action;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build the command
|
|
58
|
+
*/
|
|
59
|
+
build() {
|
|
60
|
+
if (!this.command.name) {
|
|
61
|
+
throw new Error('Command name is required');
|
|
62
|
+
}
|
|
63
|
+
if (!this.command.description) {
|
|
64
|
+
throw new Error('Command description is required');
|
|
65
|
+
}
|
|
66
|
+
if (!this.command.action) {
|
|
67
|
+
throw new Error('Command action is required');
|
|
68
|
+
}
|
|
69
|
+
return this.command;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a new command builder
|
|
73
|
+
*/
|
|
74
|
+
static create() {
|
|
75
|
+
return new CommandBuilder();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Create a convert command with common options
|
|
79
|
+
*/
|
|
80
|
+
static createConvertCommand(action) {
|
|
81
|
+
return CommandBuilder.create()
|
|
82
|
+
.name('convert')
|
|
83
|
+
.description('Convert configuration files')
|
|
84
|
+
.option('-o, --output <path>', 'Output file path')
|
|
85
|
+
.option('-f, --format <format>', 'Output format (json, yaml, yml)')
|
|
86
|
+
.option('--dry-run', 'Show preview without writing output')
|
|
87
|
+
.option('--verbose', 'Show detailed information')
|
|
88
|
+
.option('--backup', 'Create backup of input file')
|
|
89
|
+
.action(async (options) => {
|
|
90
|
+
// Extract input from arguments (would be handled by commander)
|
|
91
|
+
const input = options.input || process.argv[3];
|
|
92
|
+
const output = options.output;
|
|
93
|
+
await action(input, output, options);
|
|
94
|
+
})
|
|
95
|
+
.build();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Create a validate command with common options
|
|
99
|
+
*/
|
|
100
|
+
static createValidateCommand(action) {
|
|
101
|
+
return CommandBuilder.create()
|
|
102
|
+
.name('validate')
|
|
103
|
+
.description('Validate configuration files')
|
|
104
|
+
.option('--verbose', 'Show detailed validation information')
|
|
105
|
+
.option('--strict', 'Use strict validation mode')
|
|
106
|
+
.action(async (options) => {
|
|
107
|
+
const input = options.input || process.argv[3];
|
|
108
|
+
await action(input, options);
|
|
109
|
+
})
|
|
110
|
+
.build();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Create a batch command for processing multiple files
|
|
114
|
+
*/
|
|
115
|
+
static createBatchCommand(action) {
|
|
116
|
+
return CommandBuilder.create()
|
|
117
|
+
.name('batch')
|
|
118
|
+
.description('Process multiple files matching a pattern')
|
|
119
|
+
.option('-p, --pattern <pattern>', 'File pattern to match', '**/*.{json,yml,yaml}')
|
|
120
|
+
.option('-o, --output-dir <dir>', 'Output directory')
|
|
121
|
+
.option('-f, --format <format>', 'Output format for all files')
|
|
122
|
+
.option('--parallel <count>', 'Number of parallel processes', '4')
|
|
123
|
+
.option('--dry-run', 'Show what would be processed')
|
|
124
|
+
.option('--verbose', 'Show detailed information')
|
|
125
|
+
.action(async (options) => {
|
|
126
|
+
const pattern = options.pattern;
|
|
127
|
+
await action(pattern, options);
|
|
128
|
+
})
|
|
129
|
+
.build();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Create a profile command group
|
|
133
|
+
*/
|
|
134
|
+
static createProfileCommands() {
|
|
135
|
+
return [
|
|
136
|
+
CommandBuilder.create()
|
|
137
|
+
.name('profile:list')
|
|
138
|
+
.description('List all saved converter profiles')
|
|
139
|
+
.option('--format <format>', 'Output format (table, json)', 'table')
|
|
140
|
+
.action(async (_options) => {
|
|
141
|
+
// Implementation would list profiles
|
|
142
|
+
console.log('Listing profiles...');
|
|
143
|
+
})
|
|
144
|
+
.build(),
|
|
145
|
+
CommandBuilder.create()
|
|
146
|
+
.name('profile:save')
|
|
147
|
+
.description('Save a converter configuration as a profile')
|
|
148
|
+
.option('-n, --name <name>', 'Profile name (required)')
|
|
149
|
+
.option('-d, --description <desc>', 'Profile description')
|
|
150
|
+
.option('-c, --config <path>', 'Path to converter configuration file')
|
|
151
|
+
.action(async (options) => {
|
|
152
|
+
if (!options.name) {
|
|
153
|
+
throw new Error('Profile name is required');
|
|
154
|
+
}
|
|
155
|
+
console.log(`Saving profile: ${options.name}`);
|
|
156
|
+
})
|
|
157
|
+
.build(),
|
|
158
|
+
CommandBuilder.create()
|
|
159
|
+
.name('profile:delete')
|
|
160
|
+
.description('Delete a converter profile')
|
|
161
|
+
.option('-n, --name <name>', 'Profile name (required)')
|
|
162
|
+
.option('--force', 'Skip confirmation prompt')
|
|
163
|
+
.action(async (options) => {
|
|
164
|
+
if (!options.name) {
|
|
165
|
+
throw new Error('Profile name is required');
|
|
166
|
+
}
|
|
167
|
+
console.log(`Deleting profile: ${options.name}`);
|
|
168
|
+
})
|
|
169
|
+
.build(),
|
|
170
|
+
CommandBuilder.create()
|
|
171
|
+
.name('profile:show')
|
|
172
|
+
.description('Show details of a converter profile')
|
|
173
|
+
.option('-n, --name <name>', 'Profile name (required)')
|
|
174
|
+
.option('--format <format>', 'Output format (json, yaml)', 'json')
|
|
175
|
+
.action(async (options) => {
|
|
176
|
+
if (!options.name) {
|
|
177
|
+
throw new Error('Profile name is required');
|
|
178
|
+
}
|
|
179
|
+
console.log(`Showing profile: ${options.name}`);
|
|
180
|
+
})
|
|
181
|
+
.build(),
|
|
182
|
+
];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Create common global options
|
|
186
|
+
*/
|
|
187
|
+
static getGlobalOptions() {
|
|
188
|
+
return [
|
|
189
|
+
{ flags: '--config <path>', description: 'Path to configuration file' },
|
|
190
|
+
{ flags: '--verbose', description: 'Enable verbose output' },
|
|
191
|
+
{ flags: '--quiet', description: 'Suppress non-error output' },
|
|
192
|
+
{ flags: '--no-color', description: 'Disable colored output' },
|
|
193
|
+
{
|
|
194
|
+
flags: '--log-level <level>',
|
|
195
|
+
description: 'Set log level (error, warn, info, debug)',
|
|
196
|
+
defaultValue: 'info',
|
|
197
|
+
},
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a help command
|
|
202
|
+
*/
|
|
203
|
+
static createHelpCommand() {
|
|
204
|
+
return CommandBuilder.create()
|
|
205
|
+
.name('help')
|
|
206
|
+
.description('Show help information')
|
|
207
|
+
.option('-c, --command <name>', 'Show help for specific command')
|
|
208
|
+
.action(async (options) => {
|
|
209
|
+
if (options.command) {
|
|
210
|
+
console.log(`Help for command: ${options.command}`);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
console.log('General help information');
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
.build();
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Create a version command
|
|
220
|
+
*/
|
|
221
|
+
static createVersionCommand(version) {
|
|
222
|
+
return CommandBuilder.create()
|
|
223
|
+
.name('version')
|
|
224
|
+
.description('Show version information')
|
|
225
|
+
.option('--json', 'Output version as JSON')
|
|
226
|
+
.action(async (options) => {
|
|
227
|
+
if (options.json) {
|
|
228
|
+
console.log(JSON.stringify({ version }, null, 2));
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
console.log(version);
|
|
232
|
+
}
|
|
233
|
+
})
|
|
234
|
+
.build();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Create an init command for setting up new projects
|
|
238
|
+
*/
|
|
239
|
+
static createInitCommand() {
|
|
240
|
+
return CommandBuilder.create()
|
|
241
|
+
.name('init')
|
|
242
|
+
.description('Initialize a new ConfigForge project')
|
|
243
|
+
.option('-t, --template <name>', 'Project template to use')
|
|
244
|
+
.option('-d, --directory <path>', 'Target directory', '.')
|
|
245
|
+
.option('--force', 'Overwrite existing files')
|
|
246
|
+
.action(async (options) => {
|
|
247
|
+
console.log(`Initializing project in: ${options.directory}`);
|
|
248
|
+
if (options.template) {
|
|
249
|
+
console.log(`Using template: ${options.template}`);
|
|
250
|
+
}
|
|
251
|
+
})
|
|
252
|
+
.build();
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Create a config command for managing configuration
|
|
256
|
+
*/
|
|
257
|
+
static createConfigCommand() {
|
|
258
|
+
return CommandBuilder.create()
|
|
259
|
+
.name('config')
|
|
260
|
+
.description('Manage ConfigForge configuration')
|
|
261
|
+
.option('-g, --get <key>', 'Get configuration value')
|
|
262
|
+
.option('-s, --set <key=value>', 'Set configuration value')
|
|
263
|
+
.option('-l, --list', 'List all configuration values')
|
|
264
|
+
.option('--global', 'Use global configuration')
|
|
265
|
+
.action(async (options) => {
|
|
266
|
+
if (options.get) {
|
|
267
|
+
console.log(`Getting config: ${options.get}`);
|
|
268
|
+
}
|
|
269
|
+
else if (options.set) {
|
|
270
|
+
console.log(`Setting config: ${options.set}`);
|
|
271
|
+
}
|
|
272
|
+
else if (options.list) {
|
|
273
|
+
console.log('Listing all configuration values');
|
|
274
|
+
}
|
|
275
|
+
})
|
|
276
|
+
.build();
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
exports.CommandBuilder = CommandBuilder;
|
|
280
|
+
//# sourceMappingURL=CommandBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandBuilder.js","sourceRoot":"","sources":["../../src/scripts/CommandBuilder.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,cAAc;IAA3B;QACU,YAAO,GAAw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,kCAAkC,CAAC;aAC/C,MAAM,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;aACpD,MAAM,CAAC,uBAAuB,EAAE,yBAAyB,CAAC;aAC1D,MAAM,CAAC,YAAY,EAAE,+BAA+B,CAAC;aACrD,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;aAC9C,MAAM,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;YACtB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAChD,CAAC;iBAAM,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAChD,CAAC;iBAAM,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;IACb,CAAC;CACF;AA5SD,wCA4SC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Generation System
|
|
3
|
+
*
|
|
4
|
+
* This module provides tools for creating command-line interfaces for ConfigForge converters.
|
|
5
|
+
* It includes utilities for generating CLIs, managing profiles, and handling common CLI operations.
|
|
6
|
+
*/
|
|
7
|
+
export { CLIGenerator, CLICommand, CLIOption, CLIGeneratorOptions, ConverterProfile, } from './CLIGenerator';
|
|
8
|
+
export { CLIUtils, ProgressTracker, OutputOptions, FileInfo } from './CLIUtils';
|
|
9
|
+
export { CommandBuilder } from './CommandBuilder';
|
|
10
|
+
export { Command } from 'commander';
|
|
11
|
+
/**
|
|
12
|
+
* Create a CLI generator with default configuration
|
|
13
|
+
*/
|
|
14
|
+
export declare function createCLI(options?: Partial<import('./CLIGenerator').CLIGeneratorOptions>): any;
|
|
15
|
+
/**
|
|
16
|
+
* Create a command builder
|
|
17
|
+
*/
|
|
18
|
+
export declare function createCommand(): any;
|
|
19
|
+
/**
|
|
20
|
+
* Quick CLI creation for a converter
|
|
21
|
+
*/
|
|
22
|
+
export declare function quickCLI(converter: any, name?: string): any;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,wBAAgB,SAAS,CACvB,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,gBAAgB,EAAE,mBAAmB,CAAC,OAIhE;AAED;;GAEG;AACH,wBAAgB,aAAa,QAG5B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,OAGrD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CLI Generation System
|
|
4
|
+
*
|
|
5
|
+
* This module provides tools for creating command-line interfaces for ConfigForge converters.
|
|
6
|
+
* It includes utilities for generating CLIs, managing profiles, and handling common CLI operations.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Command = exports.CommandBuilder = exports.CLIUtils = exports.CLIGenerator = void 0;
|
|
10
|
+
exports.createCLI = createCLI;
|
|
11
|
+
exports.createCommand = createCommand;
|
|
12
|
+
exports.quickCLI = quickCLI;
|
|
13
|
+
var CLIGenerator_1 = require("./CLIGenerator");
|
|
14
|
+
Object.defineProperty(exports, "CLIGenerator", { enumerable: true, get: function () { return CLIGenerator_1.CLIGenerator; } });
|
|
15
|
+
var CLIUtils_1 = require("./CLIUtils");
|
|
16
|
+
Object.defineProperty(exports, "CLIUtils", { enumerable: true, get: function () { return CLIUtils_1.CLIUtils; } });
|
|
17
|
+
var CommandBuilder_1 = require("./CommandBuilder");
|
|
18
|
+
Object.defineProperty(exports, "CommandBuilder", { enumerable: true, get: function () { return CommandBuilder_1.CommandBuilder; } });
|
|
19
|
+
// Re-export commonly used types from commander
|
|
20
|
+
var commander_1 = require("commander");
|
|
21
|
+
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return commander_1.Command; } });
|
|
22
|
+
/**
|
|
23
|
+
* Create a CLI generator with default configuration
|
|
24
|
+
*/
|
|
25
|
+
function createCLI(options) {
|
|
26
|
+
const { CLIGenerator } = require('./CLIGenerator');
|
|
27
|
+
return new CLIGenerator(options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create a command builder
|
|
31
|
+
*/
|
|
32
|
+
function createCommand() {
|
|
33
|
+
const { CommandBuilder } = require('./CommandBuilder');
|
|
34
|
+
return CommandBuilder.create();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Quick CLI creation for a converter
|
|
38
|
+
*/
|
|
39
|
+
function quickCLI(converter, name) {
|
|
40
|
+
const { CLIGenerator } = require('./CLIGenerator');
|
|
41
|
+
return CLIGenerator.forConverter(converter, { name });
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAkBH,8BAKC;AAKD,sCAGC;AAKD,4BAGC;AArCD,+CAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,uCAAgF;AAAvE,oGAAA,QAAQ,OAAA;AACjB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,+CAA+C;AAC/C,uCAAoC;AAA3B,oGAAA,OAAO,OAAA;AAEhB;;GAEG;AACH,SAAgB,SAAS,CACvB,OAA+D;IAE/D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnD,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvD,OAAO,cAAc,CAAC,MAAM,EAAE,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,SAAc,EAAE,IAAa;IACpD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnD,OAAO,YAAY,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC"}
|