ydb-embedded-ui 8.1.0 → 8.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/CellWithPopover/CellWithPopover.js +1 -1
- package/dist/components/CellWithPopover/CellWithPopover.js.map +1 -1
- package/dist/components/CellWithPopover/CellWithPopover.scss +5 -1
- package/dist/components/FullNodeViewer/FullNodeViewer.js +5 -1
- package/dist/components/FullNodeViewer/FullNodeViewer.js.map +1 -1
- package/dist/components/Stack/Stack.scss +1 -1
- package/dist/components/Table/Table.scss +1 -1
- package/dist/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.js +4 -2
- package/dist/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.js.map +1 -1
- package/dist/components/UptimeViewer/UptimeViewer.d.ts +10 -0
- package/dist/components/UptimeViewer/UptimeViewer.js +30 -0
- package/dist/components/UptimeViewer/UptimeViewer.js.map +1 -0
- package/dist/components/UptimeViewer/i18n/en.json +5 -0
- package/dist/components/UptimeViewer/i18n/index.d.ts +2 -0
- package/dist/components/UptimeViewer/i18n/index.js +5 -0
- package/dist/components/UptimeViewer/i18n/index.js.map +1 -0
- package/dist/components/nodesColumns/columns.d.ts +1 -1
- package/dist/components/nodesColumns/columns.js +4 -1
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/containers/Storage/Disks/Disks.scss +1 -1
- package/dist/containers/Storage/PDisk/PDisk.d.ts +2 -1
- package/dist/containers/Storage/PDisk/PDisk.js +7 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.scss +21 -7
- package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +5 -11
- package/dist/containers/Storage/StorageNodes/columns/columns.js +1 -1
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
- package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js +2 -2
- package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js.map +1 -1
- package/dist/containers/Tablet/components/TabletTable/TabletTable.js +5 -2
- package/dist/containers/Tablet/components/TabletTable/TabletTable.js.map +1 -1
- package/dist/containers/Tablets/TabletsTable.js +3 -2
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +2 -2
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +1 -1
- package/dist/store/reducers/nodes/types.d.ts +0 -1
- package/dist/store/reducers/storage/types.d.ts +1 -0
- package/dist/store/reducers/storage/utils.d.ts +2 -1
- package/dist/store/reducers/storage/utils.js +12 -3
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/types/api/nodes.d.ts +2 -0
- package/dist/types/api/nodes.js.map +1 -1
- package/dist/utils/dataFormatters/__test__/formatUptime.test.js +1 -2
- package/dist/utils/dataFormatters/__test__/formatUptime.test.js.map +1 -1
- package/dist/utils/dataFormatters/dataFormatters.d.ts +8 -5
- package/dist/utils/dataFormatters/dataFormatters.js +5 -4
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/monaco/insertSnippet.d.ts +1 -1
- package/dist/utils/monaco/insertSnippet.js +20 -2
- package/dist/utils/monaco/insertSnippet.js.map +1 -1
- package/dist/utils/nodes.d.ts +0 -1
- package/dist/utils/nodes.js +0 -9
- package/dist/utils/nodes.js.map +1 -1
- package/package.json +1 -1
- package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.d.ts +0 -1
- package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.js +0 -354
- package/dist/store/reducers/storage/__test__/prepareGroupsDisks.test.js.map +0 -1
@@ -159,7 +159,7 @@ export const dropTopicTemplate = (params) => {
|
|
159
159
|
return `DROP TOPIC ${path};`;
|
160
160
|
};
|
161
161
|
export const createViewTemplate = (params) => {
|
162
|
-
const path = (params === null || params === void 0 ? void 0 : params.relativePath) ? `\`${params === null || params === void 0 ? void 0 : params.relativePath}
|
162
|
+
const path = (params === null || params === void 0 ? void 0 : params.relativePath) ? `\`${params === null || params === void 0 ? void 0 : params.relativePath}/my_view\`` : '${1:my_view}';
|
163
163
|
return `CREATE VIEW ${path} WITH (security_invoker = TRUE) AS SELECT 1;`;
|
164
164
|
};
|
165
165
|
export const dropViewTemplate = (params) => {
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import type { TNodesInfo } from '../../../types/api/nodes';
|
1
|
+
import type { TNodeInfo, TNodesInfo } from '../../../types/api/nodes';
|
2
2
|
import type { StorageGroupsResponse, TStorageInfo } from '../../../types/api/storage';
|
3
3
|
import type { PreparedStorageResponse } from './types';
|
4
|
+
export declare const calculateMaximumSlotsPerDisk: (nodes: TNodeInfo[] | undefined, providedMaximumSlotsPerDisk?: string) => string;
|
4
5
|
export declare const prepareStorageNodesResponse: (data: TNodesInfo) => PreparedStorageResponse;
|
5
6
|
export declare const prepareStorageResponse: (data: TStorageInfo) => PreparedStorageResponse;
|
6
7
|
export declare function prepareGroupsResponse(data: StorageGroupsResponse): PreparedStorageResponse;
|
@@ -111,7 +111,7 @@ const prepareStorageGroups = (StorageGroups, StoragePools) => {
|
|
111
111
|
return preparedGroups;
|
112
112
|
};
|
113
113
|
// ==== Prepare nodes ====
|
114
|
-
const prepareStorageNodeData = (node) => {
|
114
|
+
const prepareStorageNodeData = (node, maximumSlotsPerDisk) => {
|
115
115
|
var _a, _b, _c;
|
116
116
|
const missing = ((_a = node.PDisks) === null || _a === void 0 ? void 0 : _a.filter((pDisk) => {
|
117
117
|
return pDisk.State !== TPDiskState.Normal;
|
@@ -135,11 +135,19 @@ const prepareStorageNodeData = (node) => {
|
|
135
135
|
PDisks: pDisks,
|
136
136
|
VDisks: vDisks,
|
137
137
|
Missing: missing,
|
138
|
+
MaximumSlotsPerDisk: maximumSlotsPerDisk,
|
138
139
|
};
|
139
140
|
};
|
141
|
+
export const calculateMaximumSlotsPerDisk = (nodes, providedMaximumSlotsPerDisk) => {
|
142
|
+
if (providedMaximumSlotsPerDisk) {
|
143
|
+
return providedMaximumSlotsPerDisk;
|
144
|
+
}
|
145
|
+
return String(Math.max(1, ...(nodes || []).flatMap((node) => (node.PDisks || []).map((pDisk) => (node.VDisks || []).filter((vDisk) => vDisk.PDiskId === pDisk.PDiskId)
|
146
|
+
.length || 0))));
|
147
|
+
};
|
140
148
|
// ==== Prepare responses ====
|
141
149
|
export const prepareStorageNodesResponse = (data) => {
|
142
|
-
const { Nodes, TotalNodes, FoundNodes, NodeGroups } = data;
|
150
|
+
const { Nodes, TotalNodes, FoundNodes, NodeGroups, MaximumSlotsPerDisk } = data;
|
143
151
|
const tableGroups = NodeGroups === null || NodeGroups === void 0 ? void 0 : NodeGroups.map(({ GroupName, NodeCount }) => {
|
144
152
|
if (GroupName && NodeCount) {
|
145
153
|
return {
|
@@ -149,7 +157,8 @@ export const prepareStorageNodesResponse = (data) => {
|
|
149
157
|
}
|
150
158
|
return undefined;
|
151
159
|
}).filter((group) => Boolean(group));
|
152
|
-
const
|
160
|
+
const maximumSlots = calculateMaximumSlotsPerDisk(Nodes, MaximumSlotsPerDisk);
|
161
|
+
const preparedNodes = Nodes === null || Nodes === void 0 ? void 0 : Nodes.map((node) => prepareStorageNodeData(node, maximumSlots));
|
153
162
|
return {
|
154
163
|
nodes: preparedNodes,
|
155
164
|
total: Number(TotalNodes) || (preparedNodes === null || preparedNodes === void 0 ? void 0 : preparedNodes.length),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/store/reducers/storage/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AASrD,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EACH,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,mC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api/nodes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/api/nodes.ts"],"names":[],"mappings":"AAgOA,IAAK,YAGJ;AAHD,WAAK,YAAY;IACb,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;AAC3B,CAAC,EAHI,YAAY,KAAZ,YAAY,QAGhB"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { EMPTY_DATA_PLACEHOLDER } from '../../constants';
|
2
1
|
import { UNBREAKABLE_GAP } from '../../utils';
|
3
2
|
import { formatUptimeInSeconds, getDowntimeFromDateFormatted, getUptimeFromDateFormatted, } from '../dataFormatters';
|
4
3
|
describe('getUptimeFromDateFormatted', () => {
|
@@ -53,7 +52,7 @@ describe('formatUptimeInSeconds', () => {
|
|
53
52
|
expect(formatUptimeInSeconds(-1 * (12 * D + 12 * H + 12 * M + 12))).toBe('-12d' + UNBREAKABLE_GAP + '12:12:12');
|
54
53
|
});
|
55
54
|
it('should return empty placeholder on NaN', () => {
|
56
|
-
expect(formatUptimeInSeconds(Number.NaN)).toBe(
|
55
|
+
expect(formatUptimeInSeconds(Number.NaN)).toBe(undefined);
|
57
56
|
});
|
58
57
|
});
|
59
58
|
//# sourceMappingURL=formatUptime.test.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formatUptime.test.js","sourceRoot":"","sources":["../../../../src/utils/dataFormatters/__test__/formatUptime.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"formatUptime.test.js","sourceRoot":"","sources":["../../../../src/utils/dataFormatters/__test__/formatUptime.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EACH,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,GAC7B,MAAM,mBAAmB,CAAC;AAE3B,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,oC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I,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
@@ -8,10 +8,10 @@ export declare const stringifyVdiskId: (id?: TVDiskID | TVSlotId) => string;
|
|
8
8
|
* It works well only with positive values,
|
9
9
|
* if you want to get negative formatted uptime, use some wrapper like getDowntimeFromDateFormatted
|
10
10
|
*/
|
11
|
-
export declare function formatUptimeInSeconds(seconds: number): string;
|
12
|
-
export declare const formatMsToUptime: (ms?: number) => string;
|
13
|
-
export declare function getUptimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string;
|
14
|
-
export declare function getDowntimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string;
|
11
|
+
export declare function formatUptimeInSeconds(seconds: number): string | undefined;
|
12
|
+
export declare const formatMsToUptime: (ms?: number) => string | undefined;
|
13
|
+
export declare function getUptimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string | undefined;
|
14
|
+
export declare function getDowntimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string | undefined;
|
15
15
|
export declare function formatStorageValues(value?: number, total?: number, size?: BytesSizes, delimiter?: string, withValueLabel?: boolean): string[];
|
16
16
|
export declare function formatNumericValues(value?: number, total?: number, size?: Digits, delimiter?: string, withValueLabel?: boolean): string[];
|
17
17
|
export declare const formatStorageValuesToGb: (value?: number, total?: number) => string[];
|
@@ -22,6 +22,9 @@ export declare const formatSecondsToHours: (seconds: number) => string;
|
|
22
22
|
export declare const roundToPrecision: (value: number | string, precision?: number) => number;
|
23
23
|
export declare const formatCPU: (value?: number | string) => string | undefined;
|
24
24
|
export declare const formatCPUWithLabel: (value?: number) => string | undefined;
|
25
|
-
export declare const formatDateTime: (value?: number | string, defaultValue?:
|
25
|
+
export declare const formatDateTime: (value?: number | string, { withTimeZone, defaultValue }?: {
|
26
|
+
withTimeZone?: boolean;
|
27
|
+
defaultValue?: string;
|
28
|
+
}) => string;
|
26
29
|
export declare const formatTimestamp: (value?: string | number, defaultValue?: string) => string;
|
27
30
|
export declare function getStringifiedData(value: unknown): string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { dateTimeParse, duration } from '@gravity-ui/date-utils';
|
2
2
|
import { formatBytes as formatBytesCustom, getSizeWithSignificantDigits, } from '../bytesParsers/formatBytes';
|
3
|
-
import {
|
3
|
+
import { HOUR_IN_SECONDS } from '../constants';
|
4
4
|
import { configuredNumeral } from '../numeral';
|
5
5
|
import { UNBREAKABLE_GAP, isNumeric } from '../utils';
|
6
6
|
import { formatValues } from './common';
|
@@ -31,7 +31,7 @@ export const stringifyVdiskId = (id) => {
|
|
31
31
|
*/
|
32
32
|
export function formatUptimeInSeconds(seconds) {
|
33
33
|
if (!isNumeric(seconds)) {
|
34
|
-
return
|
34
|
+
return undefined;
|
35
35
|
}
|
36
36
|
// duration.format() doesn't work well with negative values
|
37
37
|
// negative value will be displayed like -2d -12:-58:-21
|
@@ -141,9 +141,10 @@ export const formatCPUWithLabel = (value) => {
|
|
141
141
|
const localizedCores = configuredNumeral(cores).format('0.[000]');
|
142
142
|
return `${localizedCores} ${i18n('format-cpu.cores', { count: cores })}`;
|
143
143
|
};
|
144
|
-
export const formatDateTime = (value, defaultValue = '') => {
|
144
|
+
export const formatDateTime = (value, { withTimeZone, defaultValue = '' } = {}) => {
|
145
145
|
var _a;
|
146
|
-
const
|
146
|
+
const tz = withTimeZone ? ' z' : '';
|
147
|
+
const formattedData = (_a = dateTimeParse(Number(value))) === null || _a === void 0 ? void 0 : _a.format(`YYYY-MM-DD HH:mm${tz}`);
|
147
148
|
return formattedData !== null && formattedData !== void 0 ? formattedData : defaultValue;
|
148
149
|
};
|
149
150
|
export const formatTimestamp = (value, defaultValue = '') => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataFormatters.js","sourceRoot":"","sources":["../../../src/utils/dataFormatters/dataFormatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,wBAAwB,CA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CAAC,KAAc;IAC7C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACd,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
export declare function insertSnippetToEditor(input: string): void
|
1
|
+
export declare function insertSnippetToEditor(input: string): Promise<void>;
|
@@ -1,7 +1,25 @@
|
|
1
|
-
export function insertSnippetToEditor(input) {
|
1
|
+
export async function insertSnippetToEditor(input) {
|
2
2
|
var _a;
|
3
|
-
|
3
|
+
let retry = 1;
|
4
|
+
const checkEditor = async () => {
|
5
|
+
if (!window.ydbEditor) {
|
6
|
+
if (retry) {
|
7
|
+
await new Promise((r) => {
|
8
|
+
window.setTimeout(r, 100);
|
9
|
+
});
|
10
|
+
retry -= 1;
|
11
|
+
checkEditor();
|
12
|
+
}
|
13
|
+
else {
|
14
|
+
return false;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
return true;
|
18
|
+
};
|
19
|
+
const editor = await checkEditor();
|
20
|
+
if (!editor) {
|
4
21
|
console.error('Monaco editor not found');
|
22
|
+
return;
|
5
23
|
}
|
6
24
|
(_a = window.ydbEditor) === null || _a === void 0 ? void 0 : _a.trigger(undefined, 'insertSnippetToEditor', input);
|
7
25
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"insertSnippet.js","sourceRoot":"","sources":["../../../src/utils/monaco/insertSnippet.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,KAAa;;
|
1
|
+
{"version":3,"file":"insertSnippet.js","sourceRoot":"","sources":["../../../src/utils/monaco/insertSnippet.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAAa;;IACrD,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC3B,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,KAAK,EAAE,CAAC;gBACR,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;oBACpB,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;gBACH,KAAK,IAAI,CAAC,CAAC;gBACX,WAAW,EAAE,CAAC;YAClB,CAAC;iBAAM,CAAC;gBACJ,OAAO,KAAK,CAAC;YACjB,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,WAAW,EAAE,CAAC;IACnC,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACzC,OAAO;IACX,CAAC;IAED,MAAA,MAAM,CAAC,SAAS,0CAAE,OAAO,CAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,CAAC"}
|
package/dist/utils/nodes.d.ts
CHANGED
package/dist/utils/nodes.js
CHANGED
@@ -2,7 +2,6 @@ import { z } from 'zod';
|
|
2
2
|
import { ProblemFilterValues } from '../store/reducers/settings/settings';
|
3
3
|
import { EFlag } from '../types/api/enums';
|
4
4
|
import { HOUR_IN_SECONDS } from './constants';
|
5
|
-
import { getDowntimeFromDateFormatted, getUptimeFromDateFormatted, } from './dataFormatters/dataFormatters';
|
6
5
|
import { valueIsDefined } from '.';
|
7
6
|
export var NodesUptimeFilterValues;
|
8
7
|
(function (NodesUptimeFilterValues) {
|
@@ -40,13 +39,6 @@ export function prepareNodeSystemState(systemState = {}) {
|
|
40
39
|
const Rack = ((_a = systemState.Location) === null || _a === void 0 ? void 0 : _a.Rack) || systemState.Rack;
|
41
40
|
const DC = ((_b = systemState.Location) === null || _b === void 0 ? void 0 : _b.DataCenter) || systemState.DataCenter;
|
42
41
|
const TenantName = (_c = systemState === null || systemState === void 0 ? void 0 : systemState.Tenants) === null || _c === void 0 ? void 0 : _c[0];
|
43
|
-
let Uptime;
|
44
|
-
if (systemState.DisconnectTime) {
|
45
|
-
Uptime = getDowntimeFromDateFormatted(systemState.DisconnectTime);
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
Uptime = getUptimeFromDateFormatted(systemState.StartTime);
|
49
|
-
}
|
50
42
|
const LoadAveragePercents = calculateLoadAveragePercents(systemState);
|
51
43
|
// 0 limit means that limit is not set, so it should be undefined
|
52
44
|
const SharedCacheLimit = Number((_d = systemState.SharedCacheStats) === null || _d === void 0 ? void 0 : _d.LimitBytes) || undefined;
|
@@ -57,7 +49,6 @@ export function prepareNodeSystemState(systemState = {}) {
|
|
57
49
|
...systemState,
|
58
50
|
Rack,
|
59
51
|
DC,
|
60
|
-
Uptime,
|
61
52
|
LoadAveragePercents,
|
62
53
|
TenantName,
|
63
54
|
SharedCacheLimit,
|
package/dist/utils/nodes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAKzC,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAKzC,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