@mcp-graph-workflow/mcp-graph 5.24.1 → 5.26.0

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.
Files changed (135) hide show
  1. package/dist/api/router.d.ts.map +1 -1
  2. package/dist/api/router.js +2 -0
  3. package/dist/api/router.js.map +1 -1
  4. package/dist/api/routes/translation-project.d.ts +8 -0
  5. package/dist/api/routes/translation-project.d.ts.map +1 -0
  6. package/dist/api/routes/translation-project.js +338 -0
  7. package/dist/api/routes/translation-project.js.map +1 -0
  8. package/dist/api/routes/translation.d.ts.map +1 -1
  9. package/dist/api/routes/translation.js +105 -1
  10. package/dist/api/routes/translation.js.map +1 -1
  11. package/dist/core/code/code-indexer.d.ts +2 -0
  12. package/dist/core/code/code-indexer.d.ts.map +1 -1
  13. package/dist/core/code/code-indexer.js +9 -3
  14. package/dist/core/code/code-indexer.js.map +1 -1
  15. package/dist/core/code/code-types.d.ts +4 -0
  16. package/dist/core/code/code-types.d.ts.map +1 -1
  17. package/dist/core/code/code-types.js +1 -0
  18. package/dist/core/code/code-types.js.map +1 -1
  19. package/dist/core/code/ts-analyzer.d.ts.map +1 -1
  20. package/dist/core/code/ts-analyzer.js +77 -6
  21. package/dist/core/code/ts-analyzer.js.map +1 -1
  22. package/dist/core/knowledge/knowledge-packager.d.ts +44 -0
  23. package/dist/core/knowledge/knowledge-packager.d.ts.map +1 -0
  24. package/dist/core/knowledge/knowledge-packager.js +311 -0
  25. package/dist/core/knowledge/knowledge-packager.js.map +1 -0
  26. package/dist/core/store/migrations.d.ts.map +1 -1
  27. package/dist/core/store/migrations.js +41 -0
  28. package/dist/core/store/migrations.js.map +1 -1
  29. package/dist/core/translation/parsers/cpp-parser-adapter.d.ts +9 -0
  30. package/dist/core/translation/parsers/cpp-parser-adapter.d.ts.map +1 -0
  31. package/dist/core/translation/parsers/cpp-parser-adapter.js +45 -0
  32. package/dist/core/translation/parsers/cpp-parser-adapter.js.map +1 -0
  33. package/dist/core/translation/parsers/dart-parser-adapter.d.ts +9 -0
  34. package/dist/core/translation/parsers/dart-parser-adapter.d.ts.map +1 -0
  35. package/dist/core/translation/parsers/dart-parser-adapter.js +44 -0
  36. package/dist/core/translation/parsers/dart-parser-adapter.js.map +1 -0
  37. package/dist/core/translation/parsers/elixir-parser-adapter.d.ts +9 -0
  38. package/dist/core/translation/parsers/elixir-parser-adapter.d.ts.map +1 -0
  39. package/dist/core/translation/parsers/elixir-parser-adapter.js +45 -0
  40. package/dist/core/translation/parsers/elixir-parser-adapter.js.map +1 -0
  41. package/dist/core/translation/parsers/haskell-parser-adapter.d.ts +9 -0
  42. package/dist/core/translation/parsers/haskell-parser-adapter.d.ts.map +1 -0
  43. package/dist/core/translation/parsers/haskell-parser-adapter.js +38 -0
  44. package/dist/core/translation/parsers/haskell-parser-adapter.js.map +1 -0
  45. package/dist/core/translation/parsers/kotlin-parser-adapter.d.ts +9 -0
  46. package/dist/core/translation/parsers/kotlin-parser-adapter.d.ts.map +1 -0
  47. package/dist/core/translation/parsers/kotlin-parser-adapter.js +43 -0
  48. package/dist/core/translation/parsers/kotlin-parser-adapter.js.map +1 -0
  49. package/dist/core/translation/parsers/lua-parser-adapter.d.ts +9 -0
  50. package/dist/core/translation/parsers/lua-parser-adapter.d.ts.map +1 -0
  51. package/dist/core/translation/parsers/lua-parser-adapter.js +42 -0
  52. package/dist/core/translation/parsers/lua-parser-adapter.js.map +1 -0
  53. package/dist/core/translation/parsers/php-parser-adapter.d.ts +9 -0
  54. package/dist/core/translation/parsers/php-parser-adapter.d.ts.map +1 -0
  55. package/dist/core/translation/parsers/php-parser-adapter.js +44 -0
  56. package/dist/core/translation/parsers/php-parser-adapter.js.map +1 -0
  57. package/dist/core/translation/parsers/scala-parser-adapter.d.ts +9 -0
  58. package/dist/core/translation/parsers/scala-parser-adapter.d.ts.map +1 -0
  59. package/dist/core/translation/parsers/scala-parser-adapter.js +43 -0
  60. package/dist/core/translation/parsers/scala-parser-adapter.js.map +1 -0
  61. package/dist/core/translation/parsers/swift-parser-adapter.d.ts +9 -0
  62. package/dist/core/translation/parsers/swift-parser-adapter.d.ts.map +1 -0
  63. package/dist/core/translation/parsers/swift-parser-adapter.js +44 -0
  64. package/dist/core/translation/parsers/swift-parser-adapter.js.map +1 -0
  65. package/dist/core/translation/project-translation-orchestrator.d.ts +65 -0
  66. package/dist/core/translation/project-translation-orchestrator.d.ts.map +1 -0
  67. package/dist/core/translation/project-translation-orchestrator.js +336 -0
  68. package/dist/core/translation/project-translation-orchestrator.js.map +1 -0
  69. package/dist/core/translation/translation-orchestrator.d.ts +6 -2
  70. package/dist/core/translation/translation-orchestrator.d.ts.map +1 -1
  71. package/dist/core/translation/translation-orchestrator.js +35 -2
  72. package/dist/core/translation/translation-orchestrator.js.map +1 -1
  73. package/dist/core/translation/translation-project-store.d.ts +40 -0
  74. package/dist/core/translation/translation-project-store.d.ts.map +1 -0
  75. package/dist/core/translation/translation-project-store.js +195 -0
  76. package/dist/core/translation/translation-project-store.js.map +1 -0
  77. package/dist/core/translation/translation-project-types.d.ts +98 -0
  78. package/dist/core/translation/translation-project-types.d.ts.map +1 -0
  79. package/dist/core/translation/translation-project-types.js +84 -0
  80. package/dist/core/translation/translation-project-types.js.map +1 -0
  81. package/dist/core/translation/zip-extractor.d.ts +4 -0
  82. package/dist/core/translation/zip-extractor.d.ts.map +1 -0
  83. package/dist/core/translation/zip-extractor.js +194 -0
  84. package/dist/core/translation/zip-extractor.js.map +1 -0
  85. package/dist/mcp/tools/analyze-translation.d.ts.map +1 -1
  86. package/dist/mcp/tools/analyze-translation.js +5 -5
  87. package/dist/mcp/tools/analyze-translation.js.map +1 -1
  88. package/dist/mcp/tools/index.d.ts.map +1 -1
  89. package/dist/mcp/tools/index.js +2 -0
  90. package/dist/mcp/tools/index.js.map +1 -1
  91. package/dist/mcp/tools/knowledge-export.d.ts +8 -0
  92. package/dist/mcp/tools/knowledge-export.d.ts.map +1 -0
  93. package/dist/mcp/tools/knowledge-export.js +100 -0
  94. package/dist/mcp/tools/knowledge-export.js.map +1 -0
  95. package/dist/mcp/tools/reindex-knowledge.js +1 -1
  96. package/dist/mcp/tools/reindex-knowledge.js.map +1 -1
  97. package/dist/mcp/tools/translate-code.d.ts.map +1 -1
  98. package/dist/mcp/tools/translate-code.js +7 -2
  99. package/dist/mcp/tools/translate-code.js.map +1 -1
  100. package/dist/mcp/tools/translation-jobs.d.ts.map +1 -1
  101. package/dist/mcp/tools/translation-jobs.js +4 -1
  102. package/dist/mcp/tools/translation-jobs.js.map +1 -1
  103. package/dist/schemas/knowledge-package.schema.d.ts +87 -0
  104. package/dist/schemas/knowledge-package.schema.d.ts.map +1 -0
  105. package/dist/schemas/knowledge-package.schema.js +48 -0
  106. package/dist/schemas/knowledge-package.schema.js.map +1 -0
  107. package/dist/web/dashboard/dist/assets/{benchmark-tab-sjsZBd-4.js → benchmark-tab-BAfHRc8R.js} +1 -1
  108. package/dist/web/dashboard/dist/assets/{circle-alert-DcTbCUEa.js → circle-alert-Xp4yHA83.js} +1 -1
  109. package/dist/web/dashboard/dist/assets/{context-tab-DNMJ2Pv-.js → context-tab-WZWpYE4Q.js} +1 -1
  110. package/dist/web/dashboard/dist/assets/{gitnexus-tab-CZ9LJbwz.js → gitnexus-tab-BL3gMYaZ.js} +1 -1
  111. package/dist/web/dashboard/dist/assets/{graph-section-BdcXKKoS.js → graph-section-B-cObR6x.js} +1 -1
  112. package/dist/web/dashboard/dist/assets/{graph-tab-CFzux3kf.js → graph-tab-DC5Iama3.js} +1 -1
  113. package/dist/web/dashboard/dist/assets/{graph-utils-_8jpWA5z.js → graph-utils-CdV9peLO.js} +1 -1
  114. package/dist/web/dashboard/dist/assets/index-CTdsOcRa.css +1 -0
  115. package/dist/web/dashboard/dist/assets/{index-CITYTuX5.js → index-DfEJaZLA.js} +46 -46
  116. package/dist/web/dashboard/dist/assets/{index-DSI2SYWO.js → index-iWhfMJa8.js} +1 -1
  117. package/dist/web/dashboard/dist/assets/{index-Bny20bel.js → index-z9HSPrpH.js} +1 -1
  118. package/dist/web/dashboard/dist/assets/{insights-tab-DUA76KUY.js → insights-tab-Cu1cH-bN.js} +1 -1
  119. package/dist/web/dashboard/dist/assets/{journey-tab-FTd6jBta.js → journey-tab-BtqgC4Wj.js} +1 -1
  120. package/dist/web/dashboard/dist/assets/languages-tab-BeJF5wPH.js +128 -0
  121. package/dist/web/dashboard/dist/assets/{loader-circle-D1DpGd2u.js → loader-circle-MkZSJbxU.js} +1 -1
  122. package/dist/web/dashboard/dist/assets/{logs-tab-CzL36_Qy.js → logs-tab-CA2dPs0v.js} +1 -1
  123. package/dist/web/dashboard/dist/assets/{lsp-tab-DdHhJq_H.js → lsp-tab-DuF6UV_3.js} +9 -19
  124. package/dist/web/dashboard/dist/assets/{memories-tab-CzgCahnV.js → memories-tab-blOtravG.js} +1 -1
  125. package/dist/web/dashboard/dist/assets/{prd-backlog-tab-C8Cl7swI.js → prd-backlog-tab-DtwzxFyr.js} +1 -1
  126. package/dist/web/dashboard/dist/assets/{refresh-cw-DSYiHmbh.js → refresh-cw-VhHh0g7N.js} +1 -1
  127. package/dist/web/dashboard/dist/assets/{siebel-tab-B4XOaUGz.js → siebel-tab-DP6xoWD8.js} +3 -3
  128. package/dist/web/dashboard/dist/assets/{skills-tab-CkpnwPJY.js → skills-tab-Tspln3N1.js} +1 -1
  129. package/dist/web/dashboard/dist/assets/{style-BOQDk6qp.js → style-CsU39IOg.js} +1 -1
  130. package/dist/web/dashboard/dist/assets/triangle-alert-ZnXg11jO.js +26 -0
  131. package/dist/web/dashboard/dist/index.html +2 -2
  132. package/package.json +4 -2
  133. package/dist/web/dashboard/dist/assets/index-CvAguK65.css +0 -1
  134. package/dist/web/dashboard/dist/assets/languages-tab-B_nhFL2q.js +0 -70
  135. package/dist/web/dashboard/dist/assets/triangle-alert-Bf6Ly19h.js +0 -16
@@ -0,0 +1,38 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*import\s+/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*module\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
4
+ { pattern: /^\s*class\s+(\w+)/, constructId: "uc_interface", nameGroup: 1 },
5
+ { pattern: /^\s*data\s+(\w+)/, constructId: "uc_type_enum", nameGroup: 1 },
6
+ { pattern: /^\s*newtype\s+(\w+)/, constructId: "uc_type_enum", nameGroup: 1 },
7
+ { pattern: /^\s*type\s+(\w+)/, constructId: "uc_type_enum", nameGroup: 1 },
8
+ { pattern: /^\s*(\w+)\s*::/, constructId: "uc_fn_def", nameGroup: 1 },
9
+ { pattern: /^\s*case\s+.+\s+of/, constructId: "uc_switch" },
10
+ { pattern: /^\s*if\s+.+\s+then/, constructId: "uc_if_else" },
11
+ ];
12
+ export class HaskellParserAdapter {
13
+ languageId = "haskell";
14
+ parseSnippet(code) {
15
+ if (!code.trim())
16
+ return [];
17
+ const lines = code.split("\n");
18
+ const constructs = [];
19
+ for (let i = 0; i < lines.length; i++) {
20
+ const line = lines[i];
21
+ const lineNum = i + 1;
22
+ for (const rule of LINE_RULES) {
23
+ const match = rule.pattern.exec(line);
24
+ if (!match)
25
+ continue;
26
+ constructs.push({
27
+ constructId: rule.constructId,
28
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
29
+ startLine: lineNum,
30
+ endLine: lineNum,
31
+ });
32
+ break;
33
+ }
34
+ }
35
+ return constructs;
36
+ }
37
+ }
38
+ //# sourceMappingURL=haskell-parser-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haskell-parser-adapter.js","sourceRoot":"","sources":["../../../../src/core/translation/parsers/haskell-parser-adapter.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,GAAW;IACzB,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE;IAC5D,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;IAC5E,EAAE,OAAO,EAAE,mBAAmB,EA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AAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Kotlin Parser Adapter — heuristic regex-based parser for Kotlin code.
3
+ */
4
+ import type { ParserAdapter, ParsedConstruct } from "./parser-adapter.js";
5
+ export declare class KotlinParserAdapter implements ParserAdapter {
6
+ readonly languageId = "kotlin";
7
+ parseSnippet(code: string): ParsedConstruct[];
8
+ }
9
+ //# sourceMappingURL=kotlin-parser-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kotlin-parser-adapter.d.ts","sourceRoot":"","sources":["../../../../src/core/translation/parsers/kotlin-parser-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAyB1E,qBAAa,mBAAoB,YAAW,aAAa;IACvD,QAAQ,CAAC,UAAU,YAAY;IAE/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE;CAsB9C"}
@@ -0,0 +1,43 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*import\s+/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*enum\s+class\s+(\w+)/, constructId: "uc_type_enum", nameGroup: 1 },
4
+ { pattern: /^\s*suspend\s+fun\s+(\w+)\s*\(/, constructId: "uc_async_fn", nameGroup: 1 },
5
+ { pattern: /^\s*(?:data\s+)?class\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
6
+ { pattern: /^\s*object\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
7
+ { pattern: /^\s*interface\s+(\w+)/, constructId: "uc_interface", nameGroup: 1 },
8
+ { pattern: /^\s*(?:override\s+)?fun\s+(\w+)\s*\(/, constructId: "uc_fn_def", nameGroup: 1 },
9
+ { pattern: /^\s*try\s*\{/, constructId: "uc_try_catch" },
10
+ { pattern: /^\s*throw\s+/, constructId: "uc_throw" },
11
+ { pattern: /^\s*if\s*\(/, constructId: "uc_if_else" },
12
+ { pattern: /^\s*when\s*\(/, constructId: "uc_switch" },
13
+ { pattern: /^\s*for\s*\(/, constructId: "uc_for_each" },
14
+ { pattern: /^\s*while\s*\(/, constructId: "uc_while" },
15
+ { pattern: /^\s*return\b/, constructId: "uc_return" },
16
+ ];
17
+ export class KotlinParserAdapter {
18
+ languageId = "kotlin";
19
+ parseSnippet(code) {
20
+ if (!code.trim())
21
+ return [];
22
+ const lines = code.split("\n");
23
+ const constructs = [];
24
+ for (let i = 0; i < lines.length; i++) {
25
+ const line = lines[i];
26
+ const lineNum = i + 1;
27
+ for (const rule of LINE_RULES) {
28
+ const match = rule.pattern.exec(line);
29
+ if (!match)
30
+ continue;
31
+ constructs.push({
32
+ constructId: rule.constructId,
33
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
34
+ startLine: lineNum,
35
+ endLine: lineNum,
36
+ });
37
+ break;
38
+ }
39
+ }
40
+ return constructs;
41
+ }
42
+ }
43
+ //# sourceMappingURL=kotlin-parser-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kotlin-parser-adapter.js","sourceRoot":"","sources":["../../../../src/core/translation/parsers/kotlin-parser-adapter.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,GAAW;IACzB,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE;IAC5D,EAAE,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;IAClF,EAAE,OAAO,EAAE,gCAAgC,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,EA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GAAG,CAAC,CAAC;YACtB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK;oBAAE,SAAS;gBACrB,UAAU,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Lua Parser Adapter — heuristic regex-based parser for Lua code.
3
+ */
4
+ import type { ParserAdapter, ParsedConstruct } from "./parser-adapter.js";
5
+ export declare class LuaParserAdapter implements ParserAdapter {
6
+ readonly languageId = "lua";
7
+ parseSnippet(code: string): ParsedConstruct[];
8
+ }
9
+ //# sourceMappingURL=lua-parser-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lua-parser-adapter.d.ts","sourceRoot":"","sources":["../../../../src/core/translation/parsers/lua-parser-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwB1E,qBAAa,gBAAiB,YAAW,aAAa;IACpD,QAAQ,CAAC,UAAU,SAAS;IAE5B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE;CAsB9C"}
@@ -0,0 +1,42 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*(?:local\s+)?(\w+)\s*=\s*require\s*[('"]+/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*require\s*[('"]+/, constructId: "uc_import_named" },
4
+ { pattern: /^\s*local\s+function\s+(\w+)\s*\(/, constructId: "uc_fn_def", nameGroup: 1 },
5
+ { pattern: /^\s*function\s+([.\w:]+)\s*\(/, constructId: "uc_fn_def", nameGroup: 1 },
6
+ { pattern: /\bpcall\s*\(/, constructId: "uc_try_catch" },
7
+ { pattern: /\bxpcall\s*\(/, constructId: "uc_try_catch" },
8
+ { pattern: /\berror\s*\(/, constructId: "uc_throw" },
9
+ { pattern: /\bfunction\s*\(/, constructId: "uc_fn_def" },
10
+ { pattern: /^\s*if\s+.+\s+then/, constructId: "uc_if_else" },
11
+ { pattern: /^\s*for\s+.+\s+do/, constructId: "uc_for_each" },
12
+ { pattern: /^\s*while\s+.+\s+do/, constructId: "uc_while" },
13
+ { pattern: /^\s*repeat\s*$/, constructId: "uc_while" },
14
+ { pattern: /^\s*return\b/, constructId: "uc_return" },
15
+ ];
16
+ export class LuaParserAdapter {
17
+ languageId = "lua";
18
+ parseSnippet(code) {
19
+ if (!code.trim())
20
+ return [];
21
+ const lines = code.split("\n");
22
+ const constructs = [];
23
+ for (let i = 0; i < lines.length; i++) {
24
+ const line = lines[i];
25
+ const lineNum = i + 1;
26
+ for (const rule of LINE_RULES) {
27
+ const match = rule.pattern.exec(line);
28
+ if (!match)
29
+ continue;
30
+ constructs.push({
31
+ constructId: rule.constructId,
32
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
33
+ startLine: lineNum,
34
+ endLine: lineNum,
35
+ });
36
+ break;
37
+ }
38
+ }
39
+ return constructs;
40
+ }
41
+ }
42
+ //# sourceMappingURL=lua-parser-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lua-parser-adapter.js","sourceRoot":"","sources":["../../../../src/core/translation/parsers/lua-parser-adapter.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,GAAW;IACzB,EAAE,OAAO,EAAE,+CAA+C,EAAE,WAAW,EAAE,iBAAiB,EAAE;IAC5F,EAAE,OAAO,EAAE,s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AC,CAAC;YACtB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK;oBAAE,SAAS;gBACrB,UAAU,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * PHP Parser Adapter — heuristic regex-based parser for PHP code.
3
+ */
4
+ import type { ParserAdapter, ParsedConstruct } from "./parser-adapter.js";
5
+ export declare class PhpParserAdapter implements ParserAdapter {
6
+ readonly languageId = "php";
7
+ parseSnippet(code: string): ParsedConstruct[];
8
+ }
9
+ //# sourceMappingURL=php-parser-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"php-parser-adapter.d.ts","sourceRoot":"","sources":["../../../../src/core/translation/parsers/php-parser-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA0B1E,qBAAa,gBAAiB,YAAW,aAAa;IACpD,QAAQ,CAAC,UAAU,SAAS;IAE5B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE;CAsB9C"}
@@ -0,0 +1,44 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*<\?php\b/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*namespace\s+/, constructId: "uc_import_named" },
4
+ { pattern: /^\s*use\s+/, constructId: "uc_import_named" },
5
+ { pattern: /^\s*class\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
6
+ { pattern: /^\s*interface\s+(\w+)/, constructId: "uc_interface", nameGroup: 1 },
7
+ { pattern: /^\s*(?:(?:public|private|protected|static)\s+)*function\s+(\w+)\s*\(/, constructId: "uc_fn_def", nameGroup: 1 },
8
+ { pattern: /^\s*try\s*\{/, constructId: "uc_try_catch" },
9
+ { pattern: /^\s*catch\b/, constructId: "uc_try_catch" },
10
+ { pattern: /^\s*throw\s+/, constructId: "uc_throw" },
11
+ { pattern: /^\s*if\s*\(/, constructId: "uc_if_else" },
12
+ { pattern: /^\s*foreach\s*\(/, constructId: "uc_for_each" },
13
+ { pattern: /^\s*for\s*\(/, constructId: "uc_for_loop" },
14
+ { pattern: /^\s*while\s*\(/, constructId: "uc_while" },
15
+ { pattern: /^\s*return\b/, constructId: "uc_return" },
16
+ { pattern: /^\s*switch\s*\(/, constructId: "uc_switch" },
17
+ ];
18
+ export class PhpParserAdapter {
19
+ languageId = "php";
20
+ parseSnippet(code) {
21
+ if (!code.trim())
22
+ return [];
23
+ const lines = code.split("\n");
24
+ const constructs = [];
25
+ for (let i = 0; i < lines.length; i++) {
26
+ const line = lines[i];
27
+ const lineNum = i + 1;
28
+ for (const rule of LINE_RULES) {
29
+ const match = rule.pattern.exec(line);
30
+ if (!match)
31
+ continue;
32
+ constructs.push({
33
+ constructId: rule.constructId,
34
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
35
+ startLine: lineNum,
36
+ endLine: lineNum,
37
+ });
38
+ break;
39
+ }
40
+ }
41
+ return constructs;
42
+ }
43
+ }
44
+ //# sourceMappingURL=php-parser-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"php-parser-adapter.js","sourceRoot":"","sources":["../../../../src/core/translation/parsers/php-parser-adapter.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,GAAW;IACzB,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,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AAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;YACtB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK;oBAAE,SAAS;gBACrB,UAAU,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Scala Parser Adapter — heuristic regex-based parser for Scala code.
3
+ */
4
+ import type { ParserAdapter, ParsedConstruct } from "./parser-adapter.js";
5
+ export declare class ScalaParserAdapter implements ParserAdapter {
6
+ readonly languageId = "scala";
7
+ parseSnippet(code: string): ParsedConstruct[];
8
+ }
9
+ //# sourceMappingURL=scala-parser-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scala-parser-adapter.d.ts","sourceRoot":"","sources":["../../../../src/core/translation/parsers/scala-parser-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAyB1E,qBAAa,kBAAmB,YAAW,aAAa;IACtD,QAAQ,CAAC,UAAU,WAAW;IAE9B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE;CAsB9C"}
@@ -0,0 +1,43 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*import\s+/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*case\s+class\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
4
+ { pattern: /^\s*class\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
5
+ { pattern: /^\s*object\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
6
+ { pattern: /^\s*trait\s+(\w+)/, constructId: "uc_interface", nameGroup: 1 },
7
+ { pattern: /^\s*def\s+(\w+)\s*[:(]/, constructId: "uc_fn_def", nameGroup: 1 },
8
+ { pattern: /^\s*try\s*\{/, constructId: "uc_try_catch" },
9
+ { pattern: /^\s*throw\s+/, constructId: "uc_throw" },
10
+ { pattern: /^\s*if\s*\(/, constructId: "uc_if_else" },
11
+ { pattern: /\bmatch\s*\{/, constructId: "uc_switch" },
12
+ { pattern: /^\s*for\s*[({]/, constructId: "uc_for_each" },
13
+ { pattern: /^\s*while\s*\(/, constructId: "uc_while" },
14
+ { pattern: /^\s*return\b/, constructId: "uc_return" },
15
+ { pattern: /^\s*sealed\s+/, constructId: "uc_type_enum" },
16
+ ];
17
+ export class ScalaParserAdapter {
18
+ languageId = "scala";
19
+ parseSnippet(code) {
20
+ if (!code.trim())
21
+ return [];
22
+ const lines = code.split("\n");
23
+ const constructs = [];
24
+ for (let i = 0; i < lines.length; i++) {
25
+ const line = lines[i];
26
+ const lineNum = i + 1;
27
+ for (const rule of LINE_RULES) {
28
+ const match = rule.pattern.exec(line);
29
+ if (!match)
30
+ continue;
31
+ constructs.push({
32
+ constructId: rule.constructId,
33
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
34
+ startLine: lineNum,
35
+ endLine: lineNum,
36
+ });
37
+ break;
38
+ }
39
+ }
40
+ return constructs;
41
+ }
42
+ }
43
+ //# sourceMappingURL=scala-parser-adapter.js.map
@@ -0,0 +1 @@
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IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,UAAU,GAAsB,EAAE,CAAC;QAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;YACtB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK;oBAAE,SAAS;gBACrB,UAAU,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Swift Parser Adapter — heuristic regex-based parser for Swift code.
3
+ */
4
+ import type { ParserAdapter, ParsedConstruct } from "./parser-adapter.js";
5
+ export declare class SwiftParserAdapter implements ParserAdapter {
6
+ readonly languageId = "swift";
7
+ parseSnippet(code: string): ParsedConstruct[];
8
+ }
9
+ //# sourceMappingURL=swift-parser-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift-parser-adapter.d.ts","sourceRoot":"","sources":["../../../../src/core/translation/parsers/swift-parser-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA0B1E,qBAAa,kBAAmB,YAAW,aAAa;IACtD,QAAQ,CAAC,UAAU,WAAW;IAE9B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE;CAsB9C"}
@@ -0,0 +1,44 @@
1
+ const LINE_RULES = [
2
+ { pattern: /^\s*import\s+/, constructId: "uc_import_named" },
3
+ { pattern: /^\s*class\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
4
+ { pattern: /^\s*struct\s+(\w+)/, constructId: "uc_class_def", nameGroup: 1 },
5
+ { pattern: /^\s*protocol\s+(\w+)/, constructId: "uc_interface", nameGroup: 1 },
6
+ { pattern: /^\s*func\s+(\w+)\s*\(/, constructId: "uc_fn_def", nameGroup: 1 },
7
+ { pattern: /^\s*do\s*\{/, constructId: "uc_try_catch" },
8
+ { pattern: /^\s*catch\b/, constructId: "uc_try_catch" },
9
+ { pattern: /^\s*throw\s+/, constructId: "uc_throw" },
10
+ { pattern: /^\s*if\b/, constructId: "uc_if_else" },
11
+ { pattern: /^\s*guard\b/, constructId: "uc_if_else" },
12
+ { pattern: /^\s*for\s+\w+\s+in\s+/, constructId: "uc_for_each" },
13
+ { pattern: /^\s*while\b/, constructId: "uc_while" },
14
+ { pattern: /^\s*return\b/, constructId: "uc_return" },
15
+ { pattern: /^\s*switch\b/, constructId: "uc_switch" },
16
+ { pattern: /^\s*enum\s+(\w+)/, constructId: "uc_type_enum", nameGroup: 1 },
17
+ ];
18
+ export class SwiftParserAdapter {
19
+ languageId = "swift";
20
+ parseSnippet(code) {
21
+ if (!code.trim())
22
+ return [];
23
+ const lines = code.split("\n");
24
+ const constructs = [];
25
+ for (let i = 0; i < lines.length; i++) {
26
+ const line = lines[i];
27
+ const lineNum = i + 1;
28
+ for (const rule of LINE_RULES) {
29
+ const match = rule.pattern.exec(line);
30
+ if (!match)
31
+ continue;
32
+ constructs.push({
33
+ constructId: rule.constructId,
34
+ name: rule.nameGroup ? match[rule.nameGroup] : undefined,
35
+ startLine: lineNum,
36
+ endLine: lineNum,
37
+ });
38
+ break;
39
+ }
40
+ }
41
+ return constructs;
42
+ }
43
+ }
44
+ //# sourceMappingURL=swift-parser-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift-parser-adapter.js","sourceRoot":"","sources":["../../../../src/core/translation/parsers/swift-parser-adapter.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,GAAW;IACzB,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE;IAC5D,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;IAC3E,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;IAC5E,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;IAC9E,EAAE,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,EAAE;IAC5E,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE;IACvD,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE;IACvD,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE;IACpD,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE;IAClD,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE;IACrD,EAAE,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,aAAa,EAAE;IAChE,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE;IACnD,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE;IACrD,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE;IACrD,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE;CAC3E,CAAC;AAEF,MAAM,OAAO,kBAAkB;IACpB,UAAU,GAAG,OAAO,CAAC;IAE9B,YAAY,CAAC,IAAY;QACvB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,UAAU,GAAsB,EAAE,CAAC;QAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;YACtB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK;oBAAE,SAAS;gBACrB,UAAU,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;oBACxD,SAAS,EAAE,OAAO;oBAClB,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;gBACH,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Project Translation Orchestrator — coordinates full project translation
3
+ * by delegating to TranslationOrchestrator for each file.
4
+ *
5
+ * Flow: createFromZip → analyzeProject → prepareFile → (AI generates) → finalizeFile → generateDownloadZip
6
+ */
7
+ import { TranslationOrchestrator } from "./translation-orchestrator.js";
8
+ import { TranslationProjectStore } from "./translation-project-store.js";
9
+ import { TranslationStore } from "./translation-store.js";
10
+ import type { TranslationProject, TranslationProjectSummary } from "./translation-project-types.js";
11
+ export declare class ProjectTranslationOrchestrator {
12
+ private readonly orchestrator;
13
+ private readonly projectStore;
14
+ private readonly translationStore;
15
+ constructor(orchestrator: TranslationOrchestrator, projectStore: TranslationProjectStore, translationStore: TranslationStore);
16
+ /**
17
+ * Create a translation project from a ZIP file.
18
+ * Extracts files, creates the project, and adds each file to the store.
19
+ */
20
+ createFromZip(projectId: string, zipPath: string, targetLanguage: string, name?: string): TranslationProject;
21
+ /**
22
+ * Analyze all files in the project, processing in batches.
23
+ * Updates each file with analysis results and computes project-level confidence.
24
+ */
25
+ analyzeProject(translationProjectId: string): TranslationProject;
26
+ /**
27
+ * Prepare a single file for translation.
28
+ * Validates file status, creates a translation job, and returns the prompt.
29
+ */
30
+ prepareFile(translationProjectId: string, fileId: string): {
31
+ jobId: string;
32
+ prompt: string;
33
+ };
34
+ /**
35
+ * Finalize a translated file with the AI-generated code.
36
+ * Updates file status to done and recomputes project confidence.
37
+ */
38
+ finalizeFile(translationProjectId: string, fileId: string, generatedCode: string): {
39
+ job: {
40
+ id: string;
41
+ status: string;
42
+ targetCode?: string;
43
+ confidenceScore?: number;
44
+ };
45
+ evidence: unknown;
46
+ };
47
+ /**
48
+ * Compute and return a summary of the translation project.
49
+ */
50
+ getProjectSummary(translationProjectId: string): TranslationProjectSummary;
51
+ /**
52
+ * Generate a downloadable ZIP with translated files and prompts for untranslated ones.
53
+ */
54
+ generateDownloadZip(translationProjectId: string): Buffer;
55
+ /**
56
+ * Determine if a file is fully deterministic based on analysis results.
57
+ * A file is deterministic if it has no ambiguous constructs.
58
+ */
59
+ private isFileDeterministic;
60
+ /**
61
+ * Replace the file extension in a path.
62
+ */
63
+ private replaceExtension;
64
+ }
65
+ //# sourceMappingURL=project-translation-orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-translation-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/core/translation/project-translation-orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AAsCxC,qBAAa,8BAA8B;IAEvC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAFhB,YAAY,EAAE,uBAAuB,EACrC,YAAY,EAAE,uBAAuB,EACrC,gBAAgB,EAAE,gBAAgB;IAGrD;;;OAGG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB;IAsCrB;;;OAGG;IACH,cAAc,CAAC,oBAAoB,EAAE,MAAM,GAAG,kBAAkB;IAwFhE;;;OAGG;IACH,WAAW,CACT,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAuCpC;;;OAGG;IACH,YAAY,CACV,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACpB;QAAE,GAAG,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,CAAC;YAAC,eAAe,CAAC,EAAE,MAAM,CAAA;SAAE,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