@qoretechnologies/ts-toolkit 0.5.43 → 0.5.44
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.
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { TQoreAppActionFunctionContext, TQoreResponseType } from './actions';
|
|
2
|
+
import { IQoreApp } from './apps';
|
|
3
|
+
import { IQoreConnectionOption, TQoreAppActionOption } from './options';
|
|
4
|
+
import { TQoreTypeObject } from './types';
|
|
5
|
+
export type TQoreSearchRecordsExpressions = Record<TExpressionKey, TQoreSearchRecordsExpressionDefinition>;
|
|
6
|
+
export type TQoreSearchRecordsExpressionDefinition = {
|
|
7
|
+
/** The type of expression: operator or function */
|
|
8
|
+
type: 'operator' | 'function';
|
|
9
|
+
/** The subtype of the expression */
|
|
10
|
+
subtype: 'generic' | 'logic-operator';
|
|
11
|
+
/** The name of the expression */
|
|
12
|
+
name: string;
|
|
13
|
+
/** User-friendly display name */
|
|
14
|
+
display_name: string;
|
|
15
|
+
/** Short plain-text description */
|
|
16
|
+
short_desc: string;
|
|
17
|
+
/** Longer description supporting markdown formatting */
|
|
18
|
+
desc: string;
|
|
19
|
+
/** The symbol or text to use when rendering the expression */
|
|
20
|
+
symbol: string;
|
|
21
|
+
/** Expression role codes determining where it can be used: 'search' for search filters, 'field' for field lists or update values */
|
|
22
|
+
roles: Array<'search' | 'field'>;
|
|
23
|
+
/** If true, the last argument can be repeated indefinitely */
|
|
24
|
+
varargs?: boolean;
|
|
25
|
+
/** The return type of the expression */
|
|
26
|
+
return_type: TQoreResponseType;
|
|
27
|
+
/** The arguments the expression takes */
|
|
28
|
+
args: TExpressionArg[];
|
|
29
|
+
};
|
|
30
|
+
export type TExpressionKey = 'AND' | 'OR' | 'regex' | '<' | '<=' | '=' | '!=' | '>=' | '>' | 'in' | 'not' | 'like' | 'between' | 'string' | string;
|
|
31
|
+
type OmitFromUnion<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
32
|
+
/**
|
|
33
|
+
* Expression argument configuration
|
|
34
|
+
*
|
|
35
|
+
* Defines an argument that can be used in expressions with type validation,
|
|
36
|
+
* allowed values, and display configuration.
|
|
37
|
+
*/
|
|
38
|
+
export type TExpressionArg = OmitFromUnion<TQoreAppActionOption, 'required' | 'preselected' | 'get_dependent_options' | 'rest_get_allowed_values' | 'depends_on' | 'validation_regex' | 'attr' | 'required_groups' | 'on_change' | 'get_dynamic_type' | 'get_allowed_values' | 'get_default_value' | 'get_element_allowed_values' | 'rest_get_element_allowed_values'> & {
|
|
39
|
+
/**
|
|
40
|
+
* Determines how the argument value is provided:
|
|
41
|
+
* - `'any'`: Can be an expression, immediate value, or field reference
|
|
42
|
+
* - `'value'`: Must be an immediate value
|
|
43
|
+
* - `'field reference'`: Must be a field reference
|
|
44
|
+
*/
|
|
45
|
+
type_code: 'any' | 'value' | 'field reference';
|
|
46
|
+
/**
|
|
47
|
+
* If the argument is sensitive (password, API key, etc.)
|
|
48
|
+
*/
|
|
49
|
+
sensitive?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Can be true if the argument has a list type and allowed_values are the
|
|
52
|
+
* allowed values for the list elements
|
|
53
|
+
*/
|
|
54
|
+
multiselect?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Record-based application interface for Qore
|
|
58
|
+
*
|
|
59
|
+
* Provides support for record-based operations including table management,
|
|
60
|
+
* transactions, record types, expressions, and search functionality.
|
|
61
|
+
*
|
|
62
|
+
* @template RestModifierOptions - Connection options configuration
|
|
63
|
+
*/
|
|
64
|
+
export interface TQoreRecordBasedApp<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> extends IQoreApp<RestModifierOptions> {
|
|
65
|
+
/**
|
|
66
|
+
* Required for record-based action support. Returns a list of available table names.
|
|
67
|
+
*
|
|
68
|
+
* @param context - Context object containing:
|
|
69
|
+
* - `conn_name`: The connection name, if any is defined
|
|
70
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
71
|
+
* @returns A list of table names
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* get_table_list: async function(ctx) {
|
|
76
|
+
* return ["users", "orders", "products"];
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
get_table_list: TQoreGetTableListFunction<RestModifierOptions>;
|
|
81
|
+
/**
|
|
82
|
+
* Allows an explicit transaction to be started.
|
|
83
|
+
*
|
|
84
|
+
* @param context - Context object containing:
|
|
85
|
+
* - `conn_name`: The connection name, if any is defined
|
|
86
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* begin_transaction: async function(ctx) {
|
|
91
|
+
* // Start transaction logic
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
begin_transaction?: (context: Omit<TQoreAppActionFunctionContext<RestModifierOptions>, 'opts'>) => Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Allows a transaction to be committed.
|
|
98
|
+
*
|
|
99
|
+
* @param context - Context object containing:
|
|
100
|
+
* - `conn_name`: The connection name, if any is defined
|
|
101
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* commit: async function(ctx) {
|
|
106
|
+
* // Commit transaction logic
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
commit?: (context: Omit<TQoreAppActionFunctionContext<RestModifierOptions>, 'opts'>) => Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Allows a transaction to be rolled back.
|
|
113
|
+
*
|
|
114
|
+
* @param context - Context object containing:
|
|
115
|
+
* - `conn_name`: The connection name, if any is defined
|
|
116
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* rollback: async function(ctx) {
|
|
121
|
+
* // Rollback transaction logic
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
rollback?: (context: Omit<TQoreAppActionFunctionContext<RestModifierOptions>, 'opts'>) => Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Required for record-based action support. Returns the record type definition for a given table.
|
|
128
|
+
*
|
|
129
|
+
* @param context - Context object containing:
|
|
130
|
+
* - `conn_name`: The connection name, if any is defined
|
|
131
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
132
|
+
* @param tableName - The name of the table to get the record type for
|
|
133
|
+
* @returns The record type for the given table; must be a type hash defining a "hash" type
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* get_record_type: async function(ctx, table_name) {
|
|
138
|
+
* return {
|
|
139
|
+
* "type": "hash",
|
|
140
|
+
* "fields": {
|
|
141
|
+
* "id": {
|
|
142
|
+
* "type": "int",
|
|
143
|
+
* "display_name": "ID",
|
|
144
|
+
* "short_desc": "The ID",
|
|
145
|
+
* "required": true,
|
|
146
|
+
* },
|
|
147
|
+
* "name": {
|
|
148
|
+
* "type": "string",
|
|
149
|
+
* "display_name": "Name",
|
|
150
|
+
* "required": true,
|
|
151
|
+
* },
|
|
152
|
+
* },
|
|
153
|
+
* };
|
|
154
|
+
* }
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
get_record_type: TQoreGetRecordTypeFunction<RestModifierOptions>;
|
|
158
|
+
/**
|
|
159
|
+
* Defines global expressions for record-based action support.
|
|
160
|
+
*
|
|
161
|
+
* Expressions can be operators (like AND, OR, =, <, >) or functions that can be used
|
|
162
|
+
* in search filters and field operations.
|
|
163
|
+
*
|
|
164
|
+
* Standard operator names include:
|
|
165
|
+
* - `"AND"`: Logical and
|
|
166
|
+
* - `"OR"`: Logical or
|
|
167
|
+
* - `"regex"`: Regular expression match
|
|
168
|
+
* - `"<"`: Less than
|
|
169
|
+
* - `"<="`: Less than or equal
|
|
170
|
+
* - `">"`: Greater than
|
|
171
|
+
* - `">="`: Greater than or equal
|
|
172
|
+
* - `"="`: Equal
|
|
173
|
+
* - `"!="`: Not equal
|
|
174
|
+
* - `"in"`: In operator
|
|
175
|
+
* - `"not"`: Logical negation
|
|
176
|
+
* - `"like"`: SQL-like "like" operator with "%" as wildcard
|
|
177
|
+
* - `"between"`: Between operator
|
|
178
|
+
*
|
|
179
|
+
* @param context - Context object containing:
|
|
180
|
+
* - `conn_name`: The connection name, if any is defined
|
|
181
|
+
* - `conn_opts`: Connection options + processed options from the auth response + the auth response itself
|
|
182
|
+
* @returns An object defining global expressions with their configurations
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* get_expressions: async function(ctx) {
|
|
187
|
+
* return {
|
|
188
|
+
* "AND": {
|
|
189
|
+
* "type": "operator",
|
|
190
|
+
* "subtype": "logic-operator",
|
|
191
|
+
* "name": "AND",
|
|
192
|
+
* "display_name": "and (&&)",
|
|
193
|
+
* "short_desc": "Returns True if all arguments are True",
|
|
194
|
+
* "desc": "Returns `True` if all arguments are `True` with logic short-circuiting",
|
|
195
|
+
* "symbol": "&&",
|
|
196
|
+
* "roles": ["search", "field"],
|
|
197
|
+
* "args": [
|
|
198
|
+
* {
|
|
199
|
+
* "type_code": "any",
|
|
200
|
+
* "type": "bool",
|
|
201
|
+
* },
|
|
202
|
+
* ],
|
|
203
|
+
* "varargs": true,
|
|
204
|
+
* "return_type": "bool",
|
|
205
|
+
* },
|
|
206
|
+
* };
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
get_expressions: TQoreGetExpressionsFunction<RestModifierOptions>;
|
|
211
|
+
/**
|
|
212
|
+
* Executes a search query and returns matching records.
|
|
213
|
+
*
|
|
214
|
+
* Returns a callable function that can be invoked to retrieve record sets in blocks.
|
|
215
|
+
* The returned function yields records as an object with field names as keys and
|
|
216
|
+
* arrays of field values as values.
|
|
217
|
+
*
|
|
218
|
+
* @param context - Context object containing:
|
|
219
|
+
* - `conn_name`: The connection name, if any is defined
|
|
220
|
+
* - `conn_opts`: Connection options; for REST connections, see the 'rest' object definition
|
|
221
|
+
* - `opts`: A data object with option values set for the current action
|
|
222
|
+
* @param where_cond - Optional search expression tree defining the filter conditions
|
|
223
|
+
* @param search_opts - Search options; the table name will be provided as `search_opts.table`
|
|
224
|
+
* @returns A callable function `get_records(ctx, block_size)` that returns a record set.
|
|
225
|
+
* The record set is an object with keys corresponding to field names and values that
|
|
226
|
+
* are arrays of field values. Each record must match the record type for the table.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* search_records: async function(ctx, where_cond, search_opts) {
|
|
231
|
+
* if (search_opts.table !== 'test') {
|
|
232
|
+
* throw new Error('Unknown table ' + search_opts.table);
|
|
233
|
+
* }
|
|
234
|
+
* let done = false;
|
|
235
|
+
* function get_records(ctx, block_size) {
|
|
236
|
+
* if (!done) {
|
|
237
|
+
* done = true;
|
|
238
|
+
* return {
|
|
239
|
+
* "id": [1, 2],
|
|
240
|
+
* "name": ["a", "b"],
|
|
241
|
+
* };
|
|
242
|
+
* }
|
|
243
|
+
* }
|
|
244
|
+
* return get_records;
|
|
245
|
+
* }
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
search_records?: TQoreSearchRecordsFunction<RestModifierOptions>;
|
|
249
|
+
update_records?: TQoreUpdateRecordsFunction<RestModifierOptions>;
|
|
250
|
+
delete_records?: TQoreDeleteRecordsFunction<RestModifierOptions>;
|
|
251
|
+
create_records?: TQoreCreateRecordsFunction<RestModifierOptions>;
|
|
252
|
+
upsert_records?: TQoreUpsertRecordsFunction<RestModifierOptions>;
|
|
253
|
+
get_search_options?: TQoreGetSearchOptionsFunction<RestModifierOptions>;
|
|
254
|
+
}
|
|
255
|
+
export type TQoreSearchOption = Omit<TQoreAppActionOption, 'get_allowed_values' | 'get_default_value' | 'get_element_allowed_values' | 'get_dependent_options' | 'get_dynamic_type' | 'rest_get_allowed_values'>;
|
|
256
|
+
export type TQoreSearchOptions = Record<string, TQoreSearchOption>;
|
|
257
|
+
export type TQoreGetSearchOptionsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>) => Promise<TQoreSearchOptions> | TQoreSearchOptions;
|
|
258
|
+
export type TQoreCreateRecordsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, records: Record<string, any[]>, create_opts?: {
|
|
259
|
+
table: string;
|
|
260
|
+
[key: string]: unknown;
|
|
261
|
+
}) => Promise<Record<string, any[]>>;
|
|
262
|
+
export type TQoreUpdateRecordsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, update_fields: Record<string, any>, where_cond?: TQoreSearchRecordsWhereConditions, update_opts?: {
|
|
263
|
+
table: string;
|
|
264
|
+
[key: string]: unknown;
|
|
265
|
+
}) => Promise<number>;
|
|
266
|
+
export type TQoreUpsertRecordsResultCode = 'inserted' | 'updated' | 'verified' | 'unchanged' | 'deleted';
|
|
267
|
+
export type TQoreUpsertRecordsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, records: Record<string, any[]>, upsert_opts?: {
|
|
268
|
+
table: string;
|
|
269
|
+
[key: string]: unknown;
|
|
270
|
+
}) => Promise<TQoreUpsertRecordsResultCode[]>;
|
|
271
|
+
export type TQoreDeleteRecordsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, where_cond?: TQoreSearchRecordsWhereConditions, delete_opts?: {
|
|
272
|
+
table: string;
|
|
273
|
+
[key: string]: unknown;
|
|
274
|
+
}) => Promise<number>;
|
|
275
|
+
export type TQoreGetTableListFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>) => Promise<string[]>;
|
|
276
|
+
export type TQoreGetRecordTypeFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, tableName: string) => Promise<TQoreTypeObject>;
|
|
277
|
+
export type TQoreGetExpressionsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>) => Promise<TQoreSearchRecordsExpressions> | TQoreSearchRecordsExpressions;
|
|
278
|
+
export type TQoreSearchRecordsFunction<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, where_cond?: TQoreSearchRecordsWhereConditions, search_opts?: {
|
|
279
|
+
table: string;
|
|
280
|
+
[key: string]: unknown;
|
|
281
|
+
}) => Promise<TQoreSearchRecordsIterator<RestModifierOptions>>;
|
|
282
|
+
export declare const isQoreRecordSearchFieldReference: (arg: unknown) => arg is TQoreSearchRecordsFieldReference;
|
|
283
|
+
export declare const isQoreRecordSearchExpression: (arg: unknown) => arg is TQoreSearchRecordsWhereConditions;
|
|
284
|
+
export type TQoreRecordSearchValue = TQoreSearchRecordsExpression | TQoreSearchRecordsFieldReference | TQoreSearchRecordsValue;
|
|
285
|
+
export type TQoreSearchRecordsWhereConditions = {
|
|
286
|
+
exp: string;
|
|
287
|
+
args: Array<TQoreRecordSearchValue>;
|
|
288
|
+
};
|
|
289
|
+
export type TQoreSearchRecordsExpression = TQoreSearchRecordsWhereConditions;
|
|
290
|
+
export type TQoreSearchRecordsFieldReference = {
|
|
291
|
+
field: string;
|
|
292
|
+
};
|
|
293
|
+
export type TQoreSearchRecordsValue = any;
|
|
294
|
+
export type TQoreSearchRecordsIterator<RestModifierOptions extends Record<string, IQoreConnectionOption> = Record<string, IQoreConnectionOption>> = (context: TQoreAppActionFunctionContext<RestModifierOptions>, block_size: number) => Promise<Record<string, any[]> | null> | Record<string, any[]> | null;
|
|
295
|
+
export declare const EQoreRecordBasedAppErrorCodes: {
|
|
296
|
+
readonly DUPLICATE_RECORD: "DUPLICATE-RECORD";
|
|
297
|
+
};
|
|
298
|
+
export {};
|
|
299
|
+
//# sourceMappingURL=record-based-apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-based-apps.d.ts","sourceRoot":"","sources":["../../../src/types/qore/record-based-apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,cAAc,EAAE,sCAAsC,CAAC,CAAC;AAE3G,MAAM,MAAM,sCAAsC,GAAG;IACnD,mDAAmD;IACnD,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,oCAAoC;IACpC,OAAO,EAAE,SAAS,GAAG,gBAAgB,CAAC;IACtC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,oIAAoI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C,MAAM,MAAM,0BAA0B,CACpC,mBAAmB,SAAS,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,IACvG,CACF,OAAO,EAAE,6BAA6B,CAAC,mBAAmB,CAAC,EAC3D,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;AAE1E,eAAO,MAAM,6BAA6B;;CAEhC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EQoreRecordBasedAppErrorCodes = exports.isQoreRecordSearchExpression = exports.isQoreRecordSearchFieldReference = void 0;
|
|
4
|
+
const isQoreRecordSearchFieldReference = (arg) => {
|
|
5
|
+
return arg !== null && typeof arg === 'object' && 'field' in arg;
|
|
6
|
+
};
|
|
7
|
+
exports.isQoreRecordSearchFieldReference = isQoreRecordSearchFieldReference;
|
|
8
|
+
const isQoreRecordSearchExpression = (arg) => {
|
|
9
|
+
return arg !== null && typeof arg === 'object' && 'exp' in arg && 'args' in arg;
|
|
10
|
+
};
|
|
11
|
+
exports.isQoreRecordSearchExpression = isQoreRecordSearchExpression;
|
|
12
|
+
exports.EQoreRecordBasedAppErrorCodes = {
|
|
13
|
+
DUPLICATE_RECORD: 'DUPLICATE-RECORD',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=record-based-apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-based-apps.js","sourceRoot":"","sources":["../../../src/types/qore/record-based-apps.ts"],"names":[],"mappings":";;;AAuXO,MAAM,gCAAgC,GAAG,CAAC,GAAY,EAA2C,EAAE;IACxG,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,GAAG,CAAC;AACnE,CAAC,CAAC;AAFW,QAAA,gCAAgC,oCAE3C;AAEK,MAAM,4BAA4B,GAAG,CAAC,GAAY,EAA4C,EAAE;IACrG,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,CAAC;AAClF,CAAC,CAAC;AAFW,QAAA,4BAA4B,gCAEvC;AA2BW,QAAA,6BAA6B,GAAG;IAC3C,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC"}
|