generaltranslation 8.2.18 → 8.2.19
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/CHANGELOG.md +6 -0
- package/dist/id/hashSource.d.ts +1 -1
- package/dist/id/hashSource.js +2 -2
- package/dist/id/types.d.ts +1 -0
- package/dist/{id-DEaFhGqX.mjs → id-BS-dC63I.mjs} +3 -2
- package/dist/id-BS-dC63I.mjs.map +1 -0
- package/dist/{id-C2orn1MA.cjs → id-BrGkL9bC.cjs} +3 -2
- package/dist/id-BrGkL9bC.cjs.map +1 -0
- package/dist/id.cjs +1 -1
- package/dist/id.d.cts +2 -1
- package/dist/id.d.mts +2 -1
- package/dist/id.mjs +1 -1
- package/dist/index.cjs +26 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.js +20 -0
- package/dist/index.mjs +26 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/translate/enqueueFiles.d.ts +0 -1
- package/dist/translate/enqueueFiles.js +0 -1
- package/dist/translate/getProjectInfo.d.ts +11 -0
- package/dist/translate/getProjectInfo.js +54 -0
- package/dist/translate/queryFileData.d.ts +0 -1
- package/dist/{types-CdRgQtET.d.cts → types-Czjib__7.d.cts} +4 -7
- package/dist/{types-Db2Dn3oN.d.mts → types-Dr51dZ5s.d.mts} +4 -7
- package/dist/types-dir/api/checkFileTranslations.d.ts +0 -1
- package/dist/types-dir/api/enqueueEntries.d.ts +0 -2
- package/dist/types-dir/api/enqueueFiles.d.ts +1 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/id-C2orn1MA.cjs.map +0 -1
- package/dist/id-DEaFhGqX.mjs.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as Variable$1, It as RuntimeTranslateManyOptions, N as VariableTransformationSuffix, O as VariableType, _ as JsxElement, c as GTProp, g as JsxChildren, h as JsxChild, k as _Content, vt as FileFormat, y as LocaleProperties } from "./types-
|
|
1
|
+
import { D as Variable$1, It as RuntimeTranslateManyOptions, N as VariableTransformationSuffix, O as VariableType, _ as JsxElement, c as GTProp, g as JsxChildren, h as JsxChild, k as _Content, vt as FileFormat, y as LocaleProperties } from "./types-Czjib__7.cjs";
|
|
2
2
|
import { IcuMessage } from "@generaltranslation/format/types";
|
|
3
3
|
|
|
4
4
|
//#region src/settings/settingsUrls.d.ts
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as Variable$1, It as RuntimeTranslateManyOptions, N as VariableTransformationSuffix, O as VariableType, _ as JsxElement, c as GTProp, g as JsxChildren, h as JsxChild, k as _Content, vt as FileFormat, y as LocaleProperties } from "./types-
|
|
1
|
+
import { D as Variable$1, It as RuntimeTranslateManyOptions, N as VariableTransformationSuffix, O as VariableType, _ as JsxElement, c as GTProp, g as JsxChildren, h as JsxChild, k as _Content, vt as FileFormat, y as LocaleProperties } from "./types-Dr51dZ5s.mjs";
|
|
2
2
|
import { IcuMessage } from "@generaltranslation/format/types";
|
|
3
3
|
|
|
4
4
|
//#region src/settings/settingsUrls.d.ts
|
|
@@ -68,7 +68,6 @@ export default function _enqueueFiles(files, options, config) {
|
|
|
68
68
|
}); }),
|
|
69
69
|
targetLocales: options.targetLocales,
|
|
70
70
|
sourceLocale: options.sourceLocale,
|
|
71
|
-
requireApproval: options.requireApproval,
|
|
72
71
|
modelProvider: options.modelProvider,
|
|
73
72
|
force: options.force,
|
|
74
73
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import apiRequest from './utils/apiRequest';
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* Fetches project info (name, locales, review settings) for a project.
|
|
41
|
+
* @param options - The options for the API call.
|
|
42
|
+
* @param config - The configuration for the API call.
|
|
43
|
+
* @returns The project info.
|
|
44
|
+
*/
|
|
45
|
+
export default function _getProjectInfo(options, config) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
47
|
+
return __generator(this, function (_a) {
|
|
48
|
+
return [2 /*return*/, apiRequest(config, "/v2/project/info/".concat(config.projectId), {
|
|
49
|
+
method: 'GET',
|
|
50
|
+
timeout: options.timeout,
|
|
51
|
+
})];
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -45,6 +45,7 @@ type HashMetadata = {
|
|
|
45
45
|
context?: string;
|
|
46
46
|
id?: string;
|
|
47
47
|
maxChars?: number;
|
|
48
|
+
requiresReview?: boolean;
|
|
48
49
|
dataFormat?: DataFormat;
|
|
49
50
|
};
|
|
50
51
|
//#endregion
|
|
@@ -89,7 +90,6 @@ type FileQueryResult = {
|
|
|
89
90
|
dataFormat: string | null;
|
|
90
91
|
createdAt: string;
|
|
91
92
|
updatedAt: string;
|
|
92
|
-
approvalRequiredAt: string | null;
|
|
93
93
|
locales: string[];
|
|
94
94
|
};
|
|
95
95
|
translations: {
|
|
@@ -108,6 +108,7 @@ type UpdateMetadata = {
|
|
|
108
108
|
hash?: string;
|
|
109
109
|
context?: string;
|
|
110
110
|
maxChars?: number;
|
|
111
|
+
requiresReview?: boolean;
|
|
111
112
|
dataFormat?: DataFormat;
|
|
112
113
|
actionType?: 'standard' | 'fast' | string;
|
|
113
114
|
staticId?: string;
|
|
@@ -135,7 +136,6 @@ type Updates = ({
|
|
|
135
136
|
}))[];
|
|
136
137
|
/**
|
|
137
138
|
* Options for enqueueing files
|
|
138
|
-
* @param requireApproval - Whether to require approval for the files.
|
|
139
139
|
* @param description - Optional description for the project.
|
|
140
140
|
* @param sourceLocale - The project's source locale.
|
|
141
141
|
* @param targetLocales - The locales to translate the files to.
|
|
@@ -144,7 +144,6 @@ type Updates = ({
|
|
|
144
144
|
* @param modelProvider - Optional model provider to use.
|
|
145
145
|
*/
|
|
146
146
|
type EnqueueFilesOptions = {
|
|
147
|
-
requireApproval?: boolean;
|
|
148
147
|
description?: string;
|
|
149
148
|
sourceLocale?: string;
|
|
150
149
|
targetLocales: string[];
|
|
@@ -339,7 +338,6 @@ type EnqueueEntriesOptions = {
|
|
|
339
338
|
dataFormat?: DataFormat;
|
|
340
339
|
version?: string;
|
|
341
340
|
description?: string;
|
|
342
|
-
requireApproval?: boolean;
|
|
343
341
|
modelProvider?: string;
|
|
344
342
|
};
|
|
345
343
|
type EnqueueEntriesResult = {
|
|
@@ -348,7 +346,6 @@ type EnqueueEntriesResult = {
|
|
|
348
346
|
message: string;
|
|
349
347
|
projectSettings: {
|
|
350
348
|
cdnEnabled: boolean;
|
|
351
|
-
requireApproval: boolean;
|
|
352
349
|
};
|
|
353
350
|
};
|
|
354
351
|
//#endregion
|
|
@@ -458,7 +455,6 @@ type FileDataResult = {
|
|
|
458
455
|
dataFormat: string | null;
|
|
459
456
|
createdAt: string;
|
|
460
457
|
updatedAt: string;
|
|
461
|
-
approvalRequiredAt: string | null;
|
|
462
458
|
publishedAt: string | null;
|
|
463
459
|
locales: string[];
|
|
464
460
|
sourceLocale: string;
|
|
@@ -577,6 +573,7 @@ type Metadata = {
|
|
|
577
573
|
id?: string;
|
|
578
574
|
hash?: string;
|
|
579
575
|
format?: string;
|
|
576
|
+
requiresReview?: boolean;
|
|
580
577
|
dataFormat?: DataFormat;
|
|
581
578
|
sourceLocale?: string;
|
|
582
579
|
actionType?: 'standard' | 'fast' | string;
|
|
@@ -664,4 +661,4 @@ type TranslationRequestConfig = {
|
|
|
664
661
|
};
|
|
665
662
|
//#endregion
|
|
666
663
|
export { TranslationResult as $, InjectionType as A, JsonPrimitive as At, JobStatus as B, StringFormat$1 as C, EnqueueFilesResult as Ct, Variable$1 as D, FileQueryResult as Dt, Update as E, FileQuery as Et, SubmitUserEditDiffsPayload as F, EntryMetadata as Ft, GetOrphanedFilesResult as G, MoveResult as H, AwaitJobsOptions as I, RuntimeTranslateManyOptions as It, FileDataResult as J, OrphanedFile as K, AwaitJobsResult as L, TranslateManyEntry as Lt, TransformationPrefix as M, TranslationStatusResult as Mt, VariableTransformationSuffix as N, HashMetadata as Nt, VariableType as O, FileTranslationQuery as Ot, SubmitUserEditDiff as P, ActionType as Pt, TranslationError as Q, JobResult as R, TranslateOptions as Rt, StringContent as S, EnqueueFilesOptions as St, TranslationRequestConfig as T, CheckFileTranslationsOptions as Tt, ProcessMovesOptions as U, MoveMapping as V, ProcessMovesResponse as W, BranchDataResult as X, BranchQuery as Y, TranslateManyResult as Z, JsxElement as _, DownloadedFile as _t, CutoffFormatOptions$1 as a, EnqueueEntriesResult as at, Metadata as b, FileReferenceIds as bt, GTProp as c, UploadFilesResponse as ct, HtmlContentPropValuesRecord as d, FetchTranslationsOptions as dt, TranslationResultReference as et, I18nextMessage$1 as f, FetchTranslationsResult as ft, JsxChildren$1 as g, DownloadFileBatchResult as gt, JsxChild as h, DownloadFileBatchRequest as ht, CustomRegionMapping$1 as i, EnqueueEntriesOptions as it, Transformation as j, JsonValue as jt, _Content as k, JsonObject as kt, HTML_CONTENT_PROPS as l, CreateTagOptions as lt, IcuTranslationResult as m, DownloadFileBatchOptions as mt, ContentTranslationResult as n, PublishFileEntry as nt, DataFormat$1 as o, FileUpload as ot, IcuMessage$1 as p, RetrievedTranslations as pt, FileDataQuery as q, CustomMapping$1 as r, PublishFilesResult as rt, FormatVariables$1 as s, UploadFilesOptions as st, Content$1 as t, DownloadFileOptions as tt, HtmlContentPropKeysRecord as u, CreateTagResult as ut, JsxTranslationResult as v, FileFormat as vt, StringMessage$1 as w, Updates as wt, Request as x, FileToUpload as xt, LocaleProperties$1 as y, FileReference as yt, CheckJobStatusResult as z };
|
|
667
|
-
//# sourceMappingURL=types-
|
|
664
|
+
//# sourceMappingURL=types-Czjib__7.d.cts.map
|
|
@@ -45,6 +45,7 @@ type HashMetadata = {
|
|
|
45
45
|
context?: string;
|
|
46
46
|
id?: string;
|
|
47
47
|
maxChars?: number;
|
|
48
|
+
requiresReview?: boolean;
|
|
48
49
|
dataFormat?: DataFormat;
|
|
49
50
|
};
|
|
50
51
|
//#endregion
|
|
@@ -89,7 +90,6 @@ type FileQueryResult = {
|
|
|
89
90
|
dataFormat: string | null;
|
|
90
91
|
createdAt: string;
|
|
91
92
|
updatedAt: string;
|
|
92
|
-
approvalRequiredAt: string | null;
|
|
93
93
|
locales: string[];
|
|
94
94
|
};
|
|
95
95
|
translations: {
|
|
@@ -108,6 +108,7 @@ type UpdateMetadata = {
|
|
|
108
108
|
hash?: string;
|
|
109
109
|
context?: string;
|
|
110
110
|
maxChars?: number;
|
|
111
|
+
requiresReview?: boolean;
|
|
111
112
|
dataFormat?: DataFormat;
|
|
112
113
|
actionType?: 'standard' | 'fast' | string;
|
|
113
114
|
staticId?: string;
|
|
@@ -135,7 +136,6 @@ type Updates = ({
|
|
|
135
136
|
}))[];
|
|
136
137
|
/**
|
|
137
138
|
* Options for enqueueing files
|
|
138
|
-
* @param requireApproval - Whether to require approval for the files.
|
|
139
139
|
* @param description - Optional description for the project.
|
|
140
140
|
* @param sourceLocale - The project's source locale.
|
|
141
141
|
* @param targetLocales - The locales to translate the files to.
|
|
@@ -144,7 +144,6 @@ type Updates = ({
|
|
|
144
144
|
* @param modelProvider - Optional model provider to use.
|
|
145
145
|
*/
|
|
146
146
|
type EnqueueFilesOptions = {
|
|
147
|
-
requireApproval?: boolean;
|
|
148
147
|
description?: string;
|
|
149
148
|
sourceLocale?: string;
|
|
150
149
|
targetLocales: string[];
|
|
@@ -339,7 +338,6 @@ type EnqueueEntriesOptions = {
|
|
|
339
338
|
dataFormat?: DataFormat;
|
|
340
339
|
version?: string;
|
|
341
340
|
description?: string;
|
|
342
|
-
requireApproval?: boolean;
|
|
343
341
|
modelProvider?: string;
|
|
344
342
|
};
|
|
345
343
|
type EnqueueEntriesResult = {
|
|
@@ -348,7 +346,6 @@ type EnqueueEntriesResult = {
|
|
|
348
346
|
message: string;
|
|
349
347
|
projectSettings: {
|
|
350
348
|
cdnEnabled: boolean;
|
|
351
|
-
requireApproval: boolean;
|
|
352
349
|
};
|
|
353
350
|
};
|
|
354
351
|
//#endregion
|
|
@@ -458,7 +455,6 @@ type FileDataResult = {
|
|
|
458
455
|
dataFormat: string | null;
|
|
459
456
|
createdAt: string;
|
|
460
457
|
updatedAt: string;
|
|
461
|
-
approvalRequiredAt: string | null;
|
|
462
458
|
publishedAt: string | null;
|
|
463
459
|
locales: string[];
|
|
464
460
|
sourceLocale: string;
|
|
@@ -577,6 +573,7 @@ type Metadata = {
|
|
|
577
573
|
id?: string;
|
|
578
574
|
hash?: string;
|
|
579
575
|
format?: string;
|
|
576
|
+
requiresReview?: boolean;
|
|
580
577
|
dataFormat?: DataFormat;
|
|
581
578
|
sourceLocale?: string;
|
|
582
579
|
actionType?: 'standard' | 'fast' | string;
|
|
@@ -664,4 +661,4 @@ type TranslationRequestConfig = {
|
|
|
664
661
|
};
|
|
665
662
|
//#endregion
|
|
666
663
|
export { TranslationResult as $, InjectionType as A, JsonPrimitive as At, JobStatus as B, StringFormat$1 as C, EnqueueFilesResult as Ct, Variable$1 as D, FileQueryResult as Dt, Update as E, FileQuery as Et, SubmitUserEditDiffsPayload as F, EntryMetadata as Ft, GetOrphanedFilesResult as G, MoveResult as H, AwaitJobsOptions as I, RuntimeTranslateManyOptions as It, FileDataResult as J, OrphanedFile as K, AwaitJobsResult as L, TranslateManyEntry as Lt, TransformationPrefix as M, TranslationStatusResult as Mt, VariableTransformationSuffix as N, HashMetadata as Nt, VariableType as O, FileTranslationQuery as Ot, SubmitUserEditDiff as P, ActionType as Pt, TranslationError as Q, JobResult as R, TranslateOptions as Rt, StringContent as S, EnqueueFilesOptions as St, TranslationRequestConfig as T, CheckFileTranslationsOptions as Tt, ProcessMovesOptions as U, MoveMapping as V, ProcessMovesResponse as W, BranchDataResult as X, BranchQuery as Y, TranslateManyResult as Z, JsxElement as _, DownloadedFile as _t, CutoffFormatOptions$1 as a, EnqueueEntriesResult as at, Metadata as b, FileReferenceIds as bt, GTProp as c, UploadFilesResponse as ct, HtmlContentPropValuesRecord as d, FetchTranslationsOptions as dt, TranslationResultReference as et, I18nextMessage$1 as f, FetchTranslationsResult as ft, JsxChildren$1 as g, DownloadFileBatchResult as gt, JsxChild as h, DownloadFileBatchRequest as ht, CustomRegionMapping$1 as i, EnqueueEntriesOptions as it, Transformation as j, JsonValue as jt, _Content as k, JsonObject as kt, HTML_CONTENT_PROPS as l, CreateTagOptions as lt, IcuTranslationResult as m, DownloadFileBatchOptions as mt, ContentTranslationResult as n, PublishFileEntry as nt, DataFormat$1 as o, FileUpload as ot, IcuMessage$1 as p, RetrievedTranslations as pt, FileDataQuery as q, CustomMapping$1 as r, PublishFilesResult as rt, FormatVariables$1 as s, UploadFilesOptions as st, Content$1 as t, DownloadFileOptions as tt, HtmlContentPropKeysRecord as u, CreateTagResult as ut, JsxTranslationResult as v, FileFormat as vt, StringMessage$1 as w, Updates as wt, Request as x, FileToUpload as xt, LocaleProperties$1 as y, FileReference as yt, CheckJobStatusResult as z };
|
|
667
|
-
//# sourceMappingURL=types-
|
|
664
|
+
//# sourceMappingURL=types-Dr51dZ5s.d.mts.map
|
|
@@ -7,7 +7,6 @@ export type EnqueueEntriesOptions = {
|
|
|
7
7
|
dataFormat?: DataFormat;
|
|
8
8
|
version?: string;
|
|
9
9
|
description?: string;
|
|
10
|
-
requireApproval?: boolean;
|
|
11
10
|
modelProvider?: string;
|
|
12
11
|
};
|
|
13
12
|
export type EnqueueEntriesResult = {
|
|
@@ -16,6 +15,5 @@ export type EnqueueEntriesResult = {
|
|
|
16
15
|
message: string;
|
|
17
16
|
projectSettings: {
|
|
18
17
|
cdnEnabled: boolean;
|
|
19
|
-
requireApproval: boolean;
|
|
20
18
|
};
|
|
21
19
|
};
|
|
@@ -4,6 +4,7 @@ type UpdateMetadata = {
|
|
|
4
4
|
hash?: string;
|
|
5
5
|
context?: string;
|
|
6
6
|
maxChars?: number;
|
|
7
|
+
requiresReview?: boolean;
|
|
7
8
|
dataFormat?: DataFormat;
|
|
8
9
|
actionType?: 'standard' | 'fast' | string;
|
|
9
10
|
staticId?: string;
|
|
@@ -31,7 +32,6 @@ export type Updates = ({
|
|
|
31
32
|
}))[];
|
|
32
33
|
/**
|
|
33
34
|
* Options for enqueueing files
|
|
34
|
-
* @param requireApproval - Whether to require approval for the files.
|
|
35
35
|
* @param description - Optional description for the project.
|
|
36
36
|
* @param sourceLocale - The project's source locale.
|
|
37
37
|
* @param targetLocales - The locales to translate the files to.
|
|
@@ -40,7 +40,6 @@ export type Updates = ({
|
|
|
40
40
|
* @param modelProvider - Optional model provider to use.
|
|
41
41
|
*/
|
|
42
42
|
export type EnqueueFilesOptions = {
|
|
43
|
-
requireApproval?: boolean;
|
|
44
43
|
description?: string;
|
|
45
44
|
sourceLocale?: string;
|
|
46
45
|
targetLocales: string[];
|
package/dist/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as TranslationResult, A as InjectionType, At as JsonPrimitive, B as JobStatus, C as StringFormat, Ct as EnqueueFilesResult, D as Variable, E as Update, F as SubmitUserEditDiffsPayload, Ft as EntryMetadata, G as GetOrphanedFilesResult, H as MoveResult, I as AwaitJobsOptions, J as FileDataResult, K as OrphanedFile, L as AwaitJobsResult, Lt as TranslateManyEntry, M as TransformationPrefix, Mt as TranslationStatusResult, N as VariableTransformationSuffix, Nt as HashMetadata, O as VariableType, Ot as FileTranslationQuery, P as SubmitUserEditDiff, Pt as ActionType, Q as TranslationError, R as JobResult, S as StringContent, St as EnqueueFilesOptions, T as TranslationRequestConfig, Tt as CheckFileTranslationsOptions, U as ProcessMovesOptions, V as MoveMapping, W as ProcessMovesResponse, X as BranchDataResult, Y as BranchQuery, Z as TranslateManyResult, _ as JsxElement, _t as DownloadedFile, a as CutoffFormatOptions, at as EnqueueEntriesResult, b as Metadata, c as GTProp, d as HtmlContentPropValuesRecord, dt as FetchTranslationsOptions, et as TranslationResultReference, f as I18nextMessage, ft as FetchTranslationsResult, g as JsxChildren, gt as DownloadFileBatchResult, h as JsxChild, i as CustomRegionMapping, it as EnqueueEntriesOptions, j as Transformation, jt as JsonValue, k as _Content, kt as JsonObject, l as HTML_CONTENT_PROPS, lt as CreateTagOptions, m as IcuTranslationResult, mt as DownloadFileBatchOptions, n as ContentTranslationResult, nt as PublishFileEntry, o as DataFormat, ot as FileUpload, p as IcuMessage, pt as RetrievedTranslations, q as FileDataQuery, r as CustomMapping, rt as PublishFilesResult, s as FormatVariables, t as Content, tt as DownloadFileOptions, u as HtmlContentPropKeysRecord, ut as CreateTagResult, v as JsxTranslationResult, vt as FileFormat, w as StringMessage, wt as Updates, x as Request, xt as FileToUpload, y as LocaleProperties, yt as FileReference, z as CheckJobStatusResult } from "./types-
|
|
1
|
+
import { $ as TranslationResult, A as InjectionType, At as JsonPrimitive, B as JobStatus, C as StringFormat, Ct as EnqueueFilesResult, D as Variable, E as Update, F as SubmitUserEditDiffsPayload, Ft as EntryMetadata, G as GetOrphanedFilesResult, H as MoveResult, I as AwaitJobsOptions, J as FileDataResult, K as OrphanedFile, L as AwaitJobsResult, Lt as TranslateManyEntry, M as TransformationPrefix, Mt as TranslationStatusResult, N as VariableTransformationSuffix, Nt as HashMetadata, O as VariableType, Ot as FileTranslationQuery, P as SubmitUserEditDiff, Pt as ActionType, Q as TranslationError, R as JobResult, S as StringContent, St as EnqueueFilesOptions, T as TranslationRequestConfig, Tt as CheckFileTranslationsOptions, U as ProcessMovesOptions, V as MoveMapping, W as ProcessMovesResponse, X as BranchDataResult, Y as BranchQuery, Z as TranslateManyResult, _ as JsxElement, _t as DownloadedFile, a as CutoffFormatOptions, at as EnqueueEntriesResult, b as Metadata, c as GTProp, d as HtmlContentPropValuesRecord, dt as FetchTranslationsOptions, et as TranslationResultReference, f as I18nextMessage, ft as FetchTranslationsResult, g as JsxChildren, gt as DownloadFileBatchResult, h as JsxChild, i as CustomRegionMapping, it as EnqueueEntriesOptions, j as Transformation, jt as JsonValue, k as _Content, kt as JsonObject, l as HTML_CONTENT_PROPS, lt as CreateTagOptions, m as IcuTranslationResult, mt as DownloadFileBatchOptions, n as ContentTranslationResult, nt as PublishFileEntry, o as DataFormat, ot as FileUpload, p as IcuMessage, pt as RetrievedTranslations, q as FileDataQuery, r as CustomMapping, rt as PublishFilesResult, s as FormatVariables, t as Content, tt as DownloadFileOptions, u as HtmlContentPropKeysRecord, ut as CreateTagResult, v as JsxTranslationResult, vt as FileFormat, w as StringMessage, wt as Updates, x as Request, xt as FileToUpload, y as LocaleProperties, yt as FileReference, z as CheckJobStatusResult } from "./types-Czjib__7.cjs";
|
|
2
2
|
export { AwaitJobsOptions, AwaitJobsResult, BranchDataResult, BranchQuery, CheckFileTranslationsOptions, CheckJobStatusResult, Content, ContentTranslationResult, CreateTagOptions, CreateTagResult, CustomMapping, CustomRegionMapping, CutoffFormatOptions, DataFormat, DownloadFileBatchOptions, DownloadFileBatchResult, DownloadFileOptions, DownloadedFile, EnqueueEntriesOptions, EnqueueEntriesResult, EnqueueFilesOptions, EnqueueFilesResult, ActionType as EntryActionType, EntryMetadata, FetchTranslationsOptions, FetchTranslationsResult, FileDataQuery, FileDataResult, FileFormat, FileReference, FileToUpload, FileTranslationQuery, FileUpload, FormatVariables, GTProp, GetOrphanedFilesResult, HTML_CONTENT_PROPS, HashMetadata, HtmlContentPropKeysRecord, HtmlContentPropValuesRecord, I18nextMessage, IcuMessage, IcuTranslationResult, InjectionType, JobResult, JobStatus, JsonObject, JsonPrimitive, JsonValue, JsxChild, JsxChildren, JsxElement, JsxTranslationResult, LocaleProperties, Metadata, MoveMapping, MoveResult, OrphanedFile, ProcessMovesOptions, ProcessMovesResponse, PublishFileEntry, PublishFilesResult, Request, RetrievedTranslations, StringContent, StringFormat, StringMessage, SubmitUserEditDiff, SubmitUserEditDiffsPayload, Transformation, TransformationPrefix, TranslateManyEntry, TranslateManyResult, TranslationError, TranslationRequestConfig, TranslationResult, TranslationResultReference, TranslationStatusResult, Update, Updates, Variable, VariableTransformationSuffix, VariableType, _Content };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as TranslationResult, A as InjectionType, At as JsonPrimitive, B as JobStatus, C as StringFormat, Ct as EnqueueFilesResult, D as Variable, E as Update, F as SubmitUserEditDiffsPayload, Ft as EntryMetadata, G as GetOrphanedFilesResult, H as MoveResult, I as AwaitJobsOptions, J as FileDataResult, K as OrphanedFile, L as AwaitJobsResult, Lt as TranslateManyEntry, M as TransformationPrefix, Mt as TranslationStatusResult, N as VariableTransformationSuffix, Nt as HashMetadata, O as VariableType, Ot as FileTranslationQuery, P as SubmitUserEditDiff, Pt as ActionType, Q as TranslationError, R as JobResult, S as StringContent, St as EnqueueFilesOptions, T as TranslationRequestConfig, Tt as CheckFileTranslationsOptions, U as ProcessMovesOptions, V as MoveMapping, W as ProcessMovesResponse, X as BranchDataResult, Y as BranchQuery, Z as TranslateManyResult, _ as JsxElement, _t as DownloadedFile, a as CutoffFormatOptions, at as EnqueueEntriesResult, b as Metadata, c as GTProp, d as HtmlContentPropValuesRecord, dt as FetchTranslationsOptions, et as TranslationResultReference, f as I18nextMessage, ft as FetchTranslationsResult, g as JsxChildren, gt as DownloadFileBatchResult, h as JsxChild, i as CustomRegionMapping, it as EnqueueEntriesOptions, j as Transformation, jt as JsonValue, k as _Content, kt as JsonObject, l as HTML_CONTENT_PROPS, lt as CreateTagOptions, m as IcuTranslationResult, mt as DownloadFileBatchOptions, n as ContentTranslationResult, nt as PublishFileEntry, o as DataFormat, ot as FileUpload, p as IcuMessage, pt as RetrievedTranslations, q as FileDataQuery, r as CustomMapping, rt as PublishFilesResult, s as FormatVariables, t as Content, tt as DownloadFileOptions, u as HtmlContentPropKeysRecord, ut as CreateTagResult, v as JsxTranslationResult, vt as FileFormat, w as StringMessage, wt as Updates, x as Request, xt as FileToUpload, y as LocaleProperties, yt as FileReference, z as CheckJobStatusResult } from "./types-
|
|
1
|
+
import { $ as TranslationResult, A as InjectionType, At as JsonPrimitive, B as JobStatus, C as StringFormat, Ct as EnqueueFilesResult, D as Variable, E as Update, F as SubmitUserEditDiffsPayload, Ft as EntryMetadata, G as GetOrphanedFilesResult, H as MoveResult, I as AwaitJobsOptions, J as FileDataResult, K as OrphanedFile, L as AwaitJobsResult, Lt as TranslateManyEntry, M as TransformationPrefix, Mt as TranslationStatusResult, N as VariableTransformationSuffix, Nt as HashMetadata, O as VariableType, Ot as FileTranslationQuery, P as SubmitUserEditDiff, Pt as ActionType, Q as TranslationError, R as JobResult, S as StringContent, St as EnqueueFilesOptions, T as TranslationRequestConfig, Tt as CheckFileTranslationsOptions, U as ProcessMovesOptions, V as MoveMapping, W as ProcessMovesResponse, X as BranchDataResult, Y as BranchQuery, Z as TranslateManyResult, _ as JsxElement, _t as DownloadedFile, a as CutoffFormatOptions, at as EnqueueEntriesResult, b as Metadata, c as GTProp, d as HtmlContentPropValuesRecord, dt as FetchTranslationsOptions, et as TranslationResultReference, f as I18nextMessage, ft as FetchTranslationsResult, g as JsxChildren, gt as DownloadFileBatchResult, h as JsxChild, i as CustomRegionMapping, it as EnqueueEntriesOptions, j as Transformation, jt as JsonValue, k as _Content, kt as JsonObject, l as HTML_CONTENT_PROPS, lt as CreateTagOptions, m as IcuTranslationResult, mt as DownloadFileBatchOptions, n as ContentTranslationResult, nt as PublishFileEntry, o as DataFormat, ot as FileUpload, p as IcuMessage, pt as RetrievedTranslations, q as FileDataQuery, r as CustomMapping, rt as PublishFilesResult, s as FormatVariables, t as Content, tt as DownloadFileOptions, u as HtmlContentPropKeysRecord, ut as CreateTagResult, v as JsxTranslationResult, vt as FileFormat, w as StringMessage, wt as Updates, x as Request, xt as FileToUpload, y as LocaleProperties, yt as FileReference, z as CheckJobStatusResult } from "./types-Dr51dZ5s.mjs";
|
|
2
2
|
export { AwaitJobsOptions, AwaitJobsResult, BranchDataResult, BranchQuery, CheckFileTranslationsOptions, CheckJobStatusResult, Content, ContentTranslationResult, CreateTagOptions, CreateTagResult, CustomMapping, CustomRegionMapping, CutoffFormatOptions, DataFormat, DownloadFileBatchOptions, DownloadFileBatchResult, DownloadFileOptions, DownloadedFile, EnqueueEntriesOptions, EnqueueEntriesResult, EnqueueFilesOptions, EnqueueFilesResult, ActionType as EntryActionType, EntryMetadata, FetchTranslationsOptions, FetchTranslationsResult, FileDataQuery, FileDataResult, FileFormat, FileReference, FileToUpload, FileTranslationQuery, FileUpload, FormatVariables, GTProp, GetOrphanedFilesResult, HTML_CONTENT_PROPS, HashMetadata, HtmlContentPropKeysRecord, HtmlContentPropValuesRecord, I18nextMessage, IcuMessage, IcuTranslationResult, InjectionType, JobResult, JobStatus, JsonObject, JsonPrimitive, JsonValue, JsxChild, JsxChildren, JsxElement, JsxTranslationResult, LocaleProperties, Metadata, MoveMapping, MoveResult, OrphanedFile, ProcessMovesOptions, ProcessMovesResponse, PublishFileEntry, PublishFilesResult, Request, RetrievedTranslations, StringContent, StringFormat, StringMessage, SubmitUserEditDiff, SubmitUserEditDiffsPayload, Transformation, TransformationPrefix, TranslateManyEntry, TranslateManyResult, TranslationError, TranslationRequestConfig, TranslationResult, TranslationResultReference, TranslationStatusResult, Update, Updates, Variable, VariableTransformationSuffix, VariableType, _Content };
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/dist/id-C2orn1MA.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-C2orn1MA.cjs","names":["bytesToHex","sha256","utf8ToBytes","stringify","isVariable","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using SHA-256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children.\n * @param {string} [id] - The ID for the JSX children object.\n * @param {number} [maxChars] - The maxChars limit for the JSX children object.\n * @param {string} [dataFormat] - The data format of the sources.\n * @param {function} [hashFunction] - Custom hash function.\n * @returns {string} - The unique hash of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAOA,mBAAAA,WAAWC,mBAAAA,OAAOC,mBAAAA,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBC,mBAAAA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAIC,mBAAAA,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,mBAAAA,gBAAU,SAAS,CAAC"}
|
package/dist/id-DEaFhGqX.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-DEaFhGqX.mjs","names":["stringify","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using SHA-256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children.\n * @param {string} [id] - The ID for the JSX children object.\n * @param {number} [maxChars] - The maxChars limit for the JSX children object.\n * @param {string} [dataFormat] - The data format of the sources.\n * @param {function} [hashFunction] - Custom hash function.\n * @returns {string} - The unique hash of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAO,WAAW,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAI,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,gBAAU,SAAS,CAAC"}
|