helixlife-expert-cli 0.1.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.
- package/README.md +159 -0
- package/cli/bin/helixlife-expert.js +3 -0
- package/cli/dist/core/api/client.d.ts +31 -0
- package/cli/dist/core/api/client.d.ts.map +1 -0
- package/cli/dist/core/api/client.js +183 -0
- package/cli/dist/core/api/client.js.map +1 -0
- package/cli/dist/core/api/http.d.ts +3 -0
- package/cli/dist/core/api/http.d.ts.map +1 -0
- package/cli/dist/core/api/http.js +22 -0
- package/cli/dist/core/api/http.js.map +1 -0
- package/cli/dist/core/api/response.d.ts +48 -0
- package/cli/dist/core/api/response.d.ts.map +1 -0
- package/cli/dist/core/api/response.js +84 -0
- package/cli/dist/core/api/response.js.map +1 -0
- package/cli/dist/core/api/sse.d.ts +6 -0
- package/cli/dist/core/api/sse.d.ts.map +1 -0
- package/cli/dist/core/api/sse.js +60 -0
- package/cli/dist/core/api/sse.js.map +1 -0
- package/cli/dist/core/auth/index.d.ts +35 -0
- package/cli/dist/core/auth/index.d.ts.map +1 -0
- package/cli/dist/core/auth/index.js +150 -0
- package/cli/dist/core/auth/index.js.map +1 -0
- package/cli/dist/core/env-config.d.ts +16 -0
- package/cli/dist/core/env-config.d.ts.map +1 -0
- package/cli/dist/core/env-config.js +80 -0
- package/cli/dist/core/env-config.js.map +1 -0
- package/cli/dist/core/errors.d.ts +20 -0
- package/cli/dist/core/errors.d.ts.map +1 -0
- package/cli/dist/core/errors.js +28 -0
- package/cli/dist/core/errors.js.map +1 -0
- package/cli/dist/core/index.d.ts +16 -0
- package/cli/dist/core/index.d.ts.map +1 -0
- package/cli/dist/core/index.js +16 -0
- package/cli/dist/core/index.js.map +1 -0
- package/cli/dist/core/interactive.d.ts +18 -0
- package/cli/dist/core/interactive.d.ts.map +1 -0
- package/cli/dist/core/interactive.js +74 -0
- package/cli/dist/core/interactive.js.map +1 -0
- package/cli/dist/core/output/index.d.ts +29 -0
- package/cli/dist/core/output/index.d.ts.map +1 -0
- package/cli/dist/core/output/index.js +153 -0
- package/cli/dist/core/output/index.js.map +1 -0
- package/cli/dist/core/parse.d.ts +9 -0
- package/cli/dist/core/parse.d.ts.map +1 -0
- package/cli/dist/core/parse.js +31 -0
- package/cli/dist/core/parse.js.map +1 -0
- package/cli/dist/core/paths.d.ts +21 -0
- package/cli/dist/core/paths.d.ts.map +1 -0
- package/cli/dist/core/paths.js +65 -0
- package/cli/dist/core/paths.js.map +1 -0
- package/cli/dist/core/sse-utils.d.ts +49 -0
- package/cli/dist/core/sse-utils.d.ts.map +1 -0
- package/cli/dist/core/sse-utils.js +181 -0
- package/cli/dist/core/sse-utils.js.map +1 -0
- package/cli/dist/core/terminal.d.ts +2 -0
- package/cli/dist/core/terminal.d.ts.map +1 -0
- package/cli/dist/core/terminal.js +6 -0
- package/cli/dist/core/terminal.js.map +1 -0
- package/cli/dist/core/token/index.d.ts +5 -0
- package/cli/dist/core/token/index.d.ts.map +1 -0
- package/cli/dist/core/token/index.js +26 -0
- package/cli/dist/core/token/index.js.map +1 -0
- package/cli/dist/core/types/config.d.ts +8 -0
- package/cli/dist/core/types/config.d.ts.map +1 -0
- package/cli/dist/core/types/config.js +30 -0
- package/cli/dist/core/types/config.js.map +1 -0
- package/cli/dist/core/version.d.ts +2 -0
- package/cli/dist/core/version.d.ts.map +1 -0
- package/cli/dist/core/version.js +10 -0
- package/cli/dist/core/version.js.map +1 -0
- package/cli/dist/index.d.ts +2 -0
- package/cli/dist/index.d.ts.map +1 -0
- package/cli/dist/index.js +23 -0
- package/cli/dist/index.js.map +1 -0
- package/cli/dist/modules/analysis/constants.d.ts +3 -0
- package/cli/dist/modules/analysis/constants.d.ts.map +1 -0
- package/cli/dist/modules/analysis/constants.js +3 -0
- package/cli/dist/modules/analysis/constants.js.map +1 -0
- package/cli/dist/modules/analysis/index.d.ts +3 -0
- package/cli/dist/modules/analysis/index.d.ts.map +1 -0
- package/cli/dist/modules/analysis/index.js +23 -0
- package/cli/dist/modules/analysis/index.js.map +1 -0
- package/cli/dist/modules/auth/index.d.ts +3 -0
- package/cli/dist/modules/auth/index.d.ts.map +1 -0
- package/cli/dist/modules/auth/index.js +76 -0
- package/cli/dist/modules/auth/index.js.map +1 -0
- package/cli/dist/modules/expert-scaffold.d.ts +27 -0
- package/cli/dist/modules/expert-scaffold.d.ts.map +1 -0
- package/cli/dist/modules/expert-scaffold.js +25 -0
- package/cli/dist/modules/expert-scaffold.js.map +1 -0
- package/cli/dist/modules/fund/clinical/apps.d.ts +19 -0
- package/cli/dist/modules/fund/clinical/apps.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/apps.js +14 -0
- package/cli/dist/modules/fund/clinical/apps.js.map +1 -0
- package/cli/dist/modules/fund/clinical/command-utils.d.ts +4 -0
- package/cli/dist/modules/fund/clinical/command-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/command-utils.js +40 -0
- package/cli/dist/modules/fund/clinical/command-utils.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.d.ts +9 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.js +99 -0
- package/cli/dist/modules/fund/clinical/commands/article-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.d.ts +30 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.js +153 -0
- package/cli/dist/modules/fund/clinical/commands/article-download.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts +7 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.js +81 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts +7 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js +76 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-precheck.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts +16 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.js +108 -0
- package/cli/dist/modules/fund/clinical/commands/four-elements-update.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts +14 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.js +164 -0
- package/cli/dist/modules/fund/clinical/commands/sample-size.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts +25 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js +228 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-create.js.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts +45 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js +211 -0
- package/cli/dist/modules/fund/clinical/commands/topic-evaluation-parameters.js.map +1 -0
- package/cli/dist/modules/fund/clinical/constants.d.ts +85 -0
- package/cli/dist/modules/fund/clinical/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/constants.js +161 -0
- package/cli/dist/modules/fund/clinical/constants.js.map +1 -0
- package/cli/dist/modules/fund/clinical/form-rules.d.ts +56 -0
- package/cli/dist/modules/fund/clinical/form-rules.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/form-rules.js +542 -0
- package/cli/dist/modules/fund/clinical/form-rules.js.map +1 -0
- package/cli/dist/modules/fund/clinical/four-elements.d.ts +46 -0
- package/cli/dist/modules/fund/clinical/four-elements.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/four-elements.js +190 -0
- package/cli/dist/modules/fund/clinical/four-elements.js.map +1 -0
- package/cli/dist/modules/fund/clinical/index.d.ts +3 -0
- package/cli/dist/modules/fund/clinical/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/index.js +176 -0
- package/cli/dist/modules/fund/clinical/index.js.map +1 -0
- package/cli/dist/modules/fund/clinical/parameters.d.ts +51 -0
- package/cli/dist/modules/fund/clinical/parameters.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/parameters.js +145 -0
- package/cli/dist/modules/fund/clinical/parameters.js.map +1 -0
- package/cli/dist/modules/fund/clinical/sample-size.d.ts +130 -0
- package/cli/dist/modules/fund/clinical/sample-size.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/sample-size.js +356 -0
- package/cli/dist/modules/fund/clinical/sample-size.js.map +1 -0
- package/cli/dist/modules/fund/clinical/session-cache.d.ts +25 -0
- package/cli/dist/modules/fund/clinical/session-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/session-cache.js +100 -0
- package/cli/dist/modules/fund/clinical/session-cache.js.map +1 -0
- package/cli/dist/modules/fund/clinical/sse-utils.d.ts +22 -0
- package/cli/dist/modules/fund/clinical/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/clinical/sse-utils.js +80 -0
- package/cli/dist/modules/fund/clinical/sse-utils.js.map +1 -0
- package/cli/dist/modules/fund/constants.d.ts +3 -0
- package/cli/dist/modules/fund/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/constants.js +3 -0
- package/cli/dist/modules/fund/constants.js.map +1 -0
- package/cli/dist/modules/fund/index.d.ts +3 -0
- package/cli/dist/modules/fund/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/index.js +28 -0
- package/cli/dist/modules/fund/index.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/apps.d.ts +54 -0
- package/cli/dist/modules/fund/nsfc/apps.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/apps.js +76 -0
- package/cli/dist/modules/fund/nsfc/apps.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/article-cache.d.ts +14 -0
- package/cli/dist/modules/fund/nsfc/article-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/article-cache.js +79 -0
- package/cli/dist/modules/fund/nsfc/article-cache.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts +8 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.js +108 -0
- package/cli/dist/modules/fund/nsfc/commands/article-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts +42 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.js +189 -0
- package/cli/dist/modules/fund/nsfc/commands/article-download.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.js +98 -0
- package/cli/dist/modules/fund/nsfc/commands/format-convert.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts +12 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js +351 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-analyze.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts +21 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js +197 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js +120 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-figure.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts +11 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js +125 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-genes-select.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts +11 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js +109 -0
- package/cli/dist/modules/fund/nsfc/commands/hypothesis-pick.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js +64 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-confirm.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts +8 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.js +103 -0
- package/cli/dist/modules/fund/nsfc/commands/outline-create.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js +176 -0
- package/cli/dist/modules/fund/nsfc/commands/research-path-confirm.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts +9 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js +190 -0
- package/cli/dist/modules/fund/nsfc/commands/tech-roadmap.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/constants.d.ts +96 -0
- package/cli/dist/modules/fund/nsfc/constants.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/constants.js +156 -0
- package/cli/dist/modules/fund/nsfc/constants.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/graph-render.d.ts +25 -0
- package/cli/dist/modules/fund/nsfc/graph-render.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/graph-render.js +212 -0
- package/cli/dist/modules/fund/nsfc/graph-render.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/index.d.ts +4 -0
- package/cli/dist/modules/fund/nsfc/index.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/index.js +238 -0
- package/cli/dist/modules/fund/nsfc/index.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts +18 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.js +47 -0
- package/cli/dist/modules/fund/nsfc/mermaid-render.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts +76 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.js +278 -0
- package/cli/dist/modules/fund/nsfc/parse-hypothesis.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.d.ts +23 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.js +91 -0
- package/cli/dist/modules/fund/nsfc/parse-outline.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.d.ts +24 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.js +78 -0
- package/cli/dist/modules/fund/nsfc/png-watermark.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts +20 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js +107 -0
- package/cli/dist/modules/fund/nsfc/prompt-hypothesis.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts +18 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.js +107 -0
- package/cli/dist/modules/fund/nsfc/prompt-step2.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/request-body.d.ts +47 -0
- package/cli/dist/modules/fund/nsfc/request-body.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/request-body.js +38 -0
- package/cli/dist/modules/fund/nsfc/request-body.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/session-cache.d.ts +48 -0
- package/cli/dist/modules/fund/nsfc/session-cache.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/session-cache.js +90 -0
- package/cli/dist/modules/fund/nsfc/session-cache.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.d.ts +22 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.js +81 -0
- package/cli/dist/modules/fund/nsfc/sse-utils.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/upload.d.ts +3 -0
- package/cli/dist/modules/fund/nsfc/upload.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/upload.js +59 -0
- package/cli/dist/modules/fund/nsfc/upload.js.map +1 -0
- package/cli/dist/modules/fund/nsfc/validate.d.ts +30 -0
- package/cli/dist/modules/fund/nsfc/validate.d.ts.map +1 -0
- package/cli/dist/modules/fund/nsfc/validate.js +91 -0
- package/cli/dist/modules/fund/nsfc/validate.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-list.d.ts +5 -0
- package/cli/dist/modules/literature/commands/workflow-list.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-list.js +9 -0
- package/cli/dist/modules/literature/commands/workflow-list.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-params.d.ts +6 -0
- package/cli/dist/modules/literature/commands/workflow-params.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-params.js +9 -0
- package/cli/dist/modules/literature/commands/workflow-params.js.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-run.d.ts +7 -0
- package/cli/dist/modules/literature/commands/workflow-run.d.ts.map +1 -0
- package/cli/dist/modules/literature/commands/workflow-run.js +10 -0
- package/cli/dist/modules/literature/commands/workflow-run.js.map +1 -0
- package/cli/dist/modules/literature/constants.d.ts +20 -0
- package/cli/dist/modules/literature/constants.d.ts.map +1 -0
- package/cli/dist/modules/literature/constants.js +56 -0
- package/cli/dist/modules/literature/constants.js.map +1 -0
- package/cli/dist/modules/literature/index.d.ts +3 -0
- package/cli/dist/modules/literature/index.d.ts.map +1 -0
- package/cli/dist/modules/literature/index.js +63 -0
- package/cli/dist/modules/literature/index.js.map +1 -0
- package/cli/dist/modules/meta/analysis.d.ts +127 -0
- package/cli/dist/modules/meta/analysis.d.ts.map +1 -0
- package/cli/dist/modules/meta/analysis.js +1165 -0
- package/cli/dist/modules/meta/analysis.js.map +1 -0
- package/cli/dist/modules/meta/api.d.ts +11 -0
- package/cli/dist/modules/meta/api.d.ts.map +1 -0
- package/cli/dist/modules/meta/api.js +40 -0
- package/cli/dist/modules/meta/api.js.map +1 -0
- package/cli/dist/modules/meta/commands.d.ts +3 -0
- package/cli/dist/modules/meta/commands.d.ts.map +1 -0
- package/cli/dist/modules/meta/commands.js +1185 -0
- package/cli/dist/modules/meta/commands.js.map +1 -0
- package/cli/dist/modules/meta/constants.d.ts +8 -0
- package/cli/dist/modules/meta/constants.d.ts.map +1 -0
- package/cli/dist/modules/meta/constants.js +9 -0
- package/cli/dist/modules/meta/constants.js.map +1 -0
- package/cli/dist/modules/meta/extraction.d.ts +206 -0
- package/cli/dist/modules/meta/extraction.d.ts.map +1 -0
- package/cli/dist/modules/meta/extraction.js +1248 -0
- package/cli/dist/modules/meta/extraction.js.map +1 -0
- package/cli/dist/modules/meta/index.d.ts +3 -0
- package/cli/dist/modules/meta/index.d.ts.map +1 -0
- package/cli/dist/modules/meta/index.js +19 -0
- package/cli/dist/modules/meta/index.js.map +1 -0
- package/cli/dist/modules/meta/node.d.ts +70 -0
- package/cli/dist/modules/meta/node.d.ts.map +1 -0
- package/cli/dist/modules/meta/node.js +167 -0
- package/cli/dist/modules/meta/node.js.map +1 -0
- package/cli/dist/modules/meta/plot-params.d.ts +82 -0
- package/cli/dist/modules/meta/plot-params.d.ts.map +1 -0
- package/cli/dist/modules/meta/plot-params.js +1179 -0
- package/cli/dist/modules/meta/plot-params.js.map +1 -0
- package/cli/dist/modules/meta/prisma-flow-docx.d.ts +23 -0
- package/cli/dist/modules/meta/prisma-flow-docx.d.ts.map +1 -0
- package/cli/dist/modules/meta/prisma-flow-docx.js +302 -0
- package/cli/dist/modules/meta/prisma-flow-docx.js.map +1 -0
- package/cli/dist/modules/meta/retrieve.d.ts +113 -0
- package/cli/dist/modules/meta/retrieve.d.ts.map +1 -0
- package/cli/dist/modules/meta/retrieve.js +913 -0
- package/cli/dist/modules/meta/retrieve.js.map +1 -0
- package/cli/dist/modules/meta/screening.d.ts +179 -0
- package/cli/dist/modules/meta/screening.d.ts.map +1 -0
- package/cli/dist/modules/meta/screening.js +1255 -0
- package/cli/dist/modules/meta/screening.js.map +1 -0
- package/cli/dist/modules/meta/topic.d.ts +110 -0
- package/cli/dist/modules/meta/topic.d.ts.map +1 -0
- package/cli/dist/modules/meta/topic.js +865 -0
- package/cli/dist/modules/meta/topic.js.map +1 -0
- package/cli/dist/modules/meta/types.d.ts +49 -0
- package/cli/dist/modules/meta/types.d.ts.map +1 -0
- package/cli/dist/modules/meta/types.js +2 -0
- package/cli/dist/modules/meta/types.js.map +1 -0
- package/cli/dist/modules/meta/workflow.d.ts +154 -0
- package/cli/dist/modules/meta/workflow.d.ts.map +1 -0
- package/cli/dist/modules/meta/workflow.js +956 -0
- package/cli/dist/modules/meta/workflow.js.map +1 -0
- package/cli/dist/modules/meta/writing.d.ts +83 -0
- package/cli/dist/modules/meta/writing.d.ts.map +1 -0
- package/cli/dist/modules/meta/writing.js +1077 -0
- package/cli/dist/modules/meta/writing.js.map +1 -0
- package/cli/dist/modules/proposal/artifacts.d.ts +18 -0
- package/cli/dist/modules/proposal/artifacts.d.ts.map +1 -0
- package/cli/dist/modules/proposal/artifacts.js +43 -0
- package/cli/dist/modules/proposal/artifacts.js.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-create.d.ts +22 -0
- package/cli/dist/modules/proposal/commands/basic-create.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-create.js +81 -0
- package/cli/dist/modules/proposal/commands/basic-create.js.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-result.d.ts +24 -0
- package/cli/dist/modules/proposal/commands/basic-result.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/basic-result.js +96 -0
- package/cli/dist/modules/proposal/commands/basic-result.js.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts +5 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.js +9 -0
- package/cli/dist/modules/proposal/commands/bioinfo-params.js.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts +6 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.js +10 -0
- package/cli/dist/modules/proposal/commands/bioinfo-run.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-list.d.ts +5 -0
- package/cli/dist/modules/proposal/commands/clinical-list.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-list.js +9 -0
- package/cli/dist/modules/proposal/commands/clinical-list.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-params.d.ts +6 -0
- package/cli/dist/modules/proposal/commands/clinical-params.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-params.js +9 -0
- package/cli/dist/modules/proposal/commands/clinical-params.js.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-run.d.ts +7 -0
- package/cli/dist/modules/proposal/commands/clinical-run.d.ts.map +1 -0
- package/cli/dist/modules/proposal/commands/clinical-run.js +10 -0
- package/cli/dist/modules/proposal/commands/clinical-run.js.map +1 -0
- package/cli/dist/modules/proposal/constants.d.ts +34 -0
- package/cli/dist/modules/proposal/constants.d.ts.map +1 -0
- package/cli/dist/modules/proposal/constants.js +75 -0
- package/cli/dist/modules/proposal/constants.js.map +1 -0
- package/cli/dist/modules/proposal/index.d.ts +3 -0
- package/cli/dist/modules/proposal/index.d.ts.map +1 -0
- package/cli/dist/modules/proposal/index.js +95 -0
- package/cli/dist/modules/proposal/index.js.map +1 -0
- package/cli/dist/modules/proposal/newidea-env.d.ts +28 -0
- package/cli/dist/modules/proposal/newidea-env.d.ts.map +1 -0
- package/cli/dist/modules/proposal/newidea-env.js +69 -0
- package/cli/dist/modules/proposal/newidea-env.js.map +1 -0
- package/cli/dist/modules/proposal/newidea-runner.d.ts +25 -0
- package/cli/dist/modules/proposal/newidea-runner.d.ts.map +1 -0
- package/cli/dist/modules/proposal/newidea-runner.js +158 -0
- package/cli/dist/modules/proposal/newidea-runner.js.map +1 -0
- package/cli/dist/modules/proposal/parse.d.ts +25 -0
- package/cli/dist/modules/proposal/parse.d.ts.map +1 -0
- package/cli/dist/modules/proposal/parse.js +173 -0
- package/cli/dist/modules/proposal/parse.js.map +1 -0
- package/cli/dist/modules/sci/apps.d.ts +48 -0
- package/cli/dist/modules/sci/apps.d.ts.map +1 -0
- package/cli/dist/modules/sci/apps.js +43 -0
- package/cli/dist/modules/sci/apps.js.map +1 -0
- package/cli/dist/modules/sci/article-cache.d.ts +32 -0
- package/cli/dist/modules/sci/article-cache.d.ts.map +1 -0
- package/cli/dist/modules/sci/article-cache.js +163 -0
- package/cli/dist/modules/sci/article-cache.js.map +1 -0
- package/cli/dist/modules/sci/article-validate.d.ts +11 -0
- package/cli/dist/modules/sci/article-validate.d.ts.map +1 -0
- package/cli/dist/modules/sci/article-validate.js +43 -0
- package/cli/dist/modules/sci/article-validate.js.map +1 -0
- package/cli/dist/modules/sci/commands/article-create.d.ts +46 -0
- package/cli/dist/modules/sci/commands/article-create.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/article-create.js +315 -0
- package/cli/dist/modules/sci/commands/article-create.js.map +1 -0
- package/cli/dist/modules/sci/commands/article-download.d.ts +50 -0
- package/cli/dist/modules/sci/commands/article-download.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/article-download.js +281 -0
- package/cli/dist/modules/sci/commands/article-download.js.map +1 -0
- package/cli/dist/modules/sci/commands/outline.d.ts +36 -0
- package/cli/dist/modules/sci/commands/outline.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/outline.js +491 -0
- package/cli/dist/modules/sci/commands/outline.js.map +1 -0
- package/cli/dist/modules/sci/commands/template.d.ts +9 -0
- package/cli/dist/modules/sci/commands/template.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands/template.js +12 -0
- package/cli/dist/modules/sci/commands/template.js.map +1 -0
- package/cli/dist/modules/sci/commands.d.ts +3 -0
- package/cli/dist/modules/sci/commands.d.ts.map +1 -0
- package/cli/dist/modules/sci/commands.js +108 -0
- package/cli/dist/modules/sci/commands.js.map +1 -0
- package/cli/dist/modules/sci/constants.d.ts +117 -0
- package/cli/dist/modules/sci/constants.d.ts.map +1 -0
- package/cli/dist/modules/sci/constants.js +152 -0
- package/cli/dist/modules/sci/constants.js.map +1 -0
- package/cli/dist/modules/sci/content-source.d.ts +18 -0
- package/cli/dist/modules/sci/content-source.d.ts.map +1 -0
- package/cli/dist/modules/sci/content-source.js +54 -0
- package/cli/dist/modules/sci/content-source.js.map +1 -0
- package/cli/dist/modules/sci/index.d.ts +3 -0
- package/cli/dist/modules/sci/index.d.ts.map +1 -0
- package/cli/dist/modules/sci/index.js +19 -0
- package/cli/dist/modules/sci/index.js.map +1 -0
- package/cli/dist/modules/sci/outline-transform.d.ts +16 -0
- package/cli/dist/modules/sci/outline-transform.d.ts.map +1 -0
- package/cli/dist/modules/sci/outline-transform.js +67 -0
- package/cli/dist/modules/sci/outline-transform.js.map +1 -0
- package/cli/dist/modules/sci/precheck-cache.d.ts +23 -0
- package/cli/dist/modules/sci/precheck-cache.d.ts.map +1 -0
- package/cli/dist/modules/sci/precheck-cache.js +141 -0
- package/cli/dist/modules/sci/precheck-cache.js.map +1 -0
- package/cli/dist/modules/sci/prompt-article.d.ts +12 -0
- package/cli/dist/modules/sci/prompt-article.d.ts.map +1 -0
- package/cli/dist/modules/sci/prompt-article.js +37 -0
- package/cli/dist/modules/sci/prompt-article.js.map +1 -0
- package/cli/dist/modules/sci/prompt-precheck.d.ts +16 -0
- package/cli/dist/modules/sci/prompt-precheck.d.ts.map +1 -0
- package/cli/dist/modules/sci/prompt-precheck.js +61 -0
- package/cli/dist/modules/sci/prompt-precheck.js.map +1 -0
- package/cli/dist/modules/sci/sse-utils.d.ts +50 -0
- package/cli/dist/modules/sci/sse-utils.d.ts.map +1 -0
- package/cli/dist/modules/sci/sse-utils.js +207 -0
- package/cli/dist/modules/sci/sse-utils.js.map +1 -0
- package/cli/dist/modules/shared/result-wrapper.d.ts +71 -0
- package/cli/dist/modules/shared/result-wrapper.d.ts.map +1 -0
- package/cli/dist/modules/shared/result-wrapper.js +95 -0
- package/cli/dist/modules/shared/result-wrapper.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/api.d.ts +6 -0
- package/cli/dist/modules/shared/workflow-app/api.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/api.js +31 -0
- package/cli/dist/modules/shared/workflow-app/api.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/command.d.ts +30 -0
- package/cli/dist/modules/shared/workflow-app/command.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/command.js +183 -0
- package/cli/dist/modules/shared/workflow-app/command.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/constants.d.ts +12 -0
- package/cli/dist/modules/shared/workflow-app/constants.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/constants.js +21 -0
- package/cli/dist/modules/shared/workflow-app/constants.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/form.d.ts +21 -0
- package/cli/dist/modules/shared/workflow-app/form.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/form.js +123 -0
- package/cli/dist/modules/shared/workflow-app/form.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/index.d.ts +8 -0
- package/cli/dist/modules/shared/workflow-app/index.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/index.js +7 -0
- package/cli/dist/modules/shared/workflow-app/index.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/run.d.ts +15 -0
- package/cli/dist/modules/shared/workflow-app/run.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/run.js +71 -0
- package/cli/dist/modules/shared/workflow-app/run.js.map +1 -0
- package/cli/dist/modules/shared/workflow-app/types.d.ts +74 -0
- package/cli/dist/modules/shared/workflow-app/types.d.ts.map +1 -0
- package/cli/dist/modules/shared/workflow-app/types.js +3 -0
- package/cli/dist/modules/shared/workflow-app/types.js.map +1 -0
- package/cli/dist/modules/site-configs.d.ts +4 -0
- package/cli/dist/modules/site-configs.d.ts.map +1 -0
- package/cli/dist/modules/site-configs.js +21 -0
- package/cli/dist/modules/site-configs.js.map +1 -0
- package/cli/dist/modules/upgrade/index.d.ts +6 -0
- package/cli/dist/modules/upgrade/index.d.ts.map +1 -0
- package/cli/dist/modules/upgrade/index.js +105 -0
- package/cli/dist/modules/upgrade/index.js.map +1 -0
- package/cli/dist/program.d.ts +3 -0
- package/cli/dist/program.d.ts.map +1 -0
- package/cli/dist/program.js +69 -0
- package/cli/dist/program.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// 基金工作台(nsfc-v2)常量:枚举、文案、上传约束
|
|
2
|
+
import { helixlifeError, helixlifeErrorCode } from "../../../core/index.js";
|
|
3
|
+
/** 后台模块类型(API 路径用 nsfc-v2;CLI 命名空间仍为 nsfc) */
|
|
4
|
+
export const NSFC_MODULE_TYPE = "nsfc-v2";
|
|
5
|
+
/** 上传接口 source,对齐前端 FileUploadItem */
|
|
6
|
+
export const NSFC_UPLOAD_SOURCE = "helixlife5-newidea-completion";
|
|
7
|
+
export const NSFC_UPLOAD_EXT = [".pdf", ".docx"];
|
|
8
|
+
export const NSFC_UPLOAD_MAX_MB = 30;
|
|
9
|
+
export const NSFC_HAS_HYPOTHESIS_OPTIONS = [
|
|
10
|
+
{
|
|
11
|
+
value: "blank",
|
|
12
|
+
label: "我没有科学假说,请帮我生成",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "existing",
|
|
16
|
+
label: "我已有科学假说,立即填写",
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
export const NSFC_PROJECT_LEVEL_OPTIONS = [
|
|
20
|
+
"国家级",
|
|
21
|
+
"省部级",
|
|
22
|
+
];
|
|
23
|
+
export const NSFC_PROJECT_TYPE_OPTIONS = [
|
|
24
|
+
"面上项目",
|
|
25
|
+
"地区项目",
|
|
26
|
+
"青年项目",
|
|
27
|
+
];
|
|
28
|
+
export const NSFC_PRIOR_RESULT_LABEL = {
|
|
29
|
+
yes: "我有前期研究结果",
|
|
30
|
+
no: "我没有前期研究结果",
|
|
31
|
+
};
|
|
32
|
+
export const NSFC_PRIOR_RESULT_OPTIONS = [
|
|
33
|
+
{ value: "yes", label: NSFC_PRIOR_RESULT_LABEL.yes },
|
|
34
|
+
{ value: "no", label: NSFC_PRIOR_RESULT_LABEL.no },
|
|
35
|
+
];
|
|
36
|
+
export const NSFC_QUERY_MAX_BLANK_DISEASE = 50;
|
|
37
|
+
export const NSFC_QUERY_MAX_BLANK_THEME = 500;
|
|
38
|
+
export const NSFC_QUERY_MAX_EXISTING_HYPOTHESIS = 500;
|
|
39
|
+
export const NSFC_DISEASE_MAX = 50;
|
|
40
|
+
export function parseNsfcHasHypothesis(raw) {
|
|
41
|
+
const v = raw.trim().toLowerCase();
|
|
42
|
+
if (v === "blank" || v === "no" || v === "false" || v === "0") {
|
|
43
|
+
return "blank";
|
|
44
|
+
}
|
|
45
|
+
if (v === "existing" || v === "yes" || v === "true" || v === "1") {
|
|
46
|
+
return "existing";
|
|
47
|
+
}
|
|
48
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效的 --has-hypothesis: ${raw}(可选 blank | existing)`);
|
|
49
|
+
}
|
|
50
|
+
export function parseNsfcProjectLevel(raw) {
|
|
51
|
+
const v = raw.trim();
|
|
52
|
+
if (v === "国家级" || v === "national")
|
|
53
|
+
return "国家级";
|
|
54
|
+
if (v === "省部级" || v === "province" || v === "provincial")
|
|
55
|
+
return "省部级";
|
|
56
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效的 --project-level: ${raw}(可选 国家级 | 省部级)`);
|
|
57
|
+
}
|
|
58
|
+
export function parseNsfcProjectType(raw) {
|
|
59
|
+
const v = raw.trim();
|
|
60
|
+
if (NSFC_PROJECT_TYPE_OPTIONS.includes(v)) {
|
|
61
|
+
return v;
|
|
62
|
+
}
|
|
63
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效的 --project: ${raw}(可选 面上项目 | 地区项目 | 青年项目)`);
|
|
64
|
+
}
|
|
65
|
+
export function parseNsfcPriorResult(raw) {
|
|
66
|
+
const v = raw.trim().toLowerCase();
|
|
67
|
+
if (v === "yes" || v === "y" || v === "true" || v === "1" || v === "有") {
|
|
68
|
+
return "yes";
|
|
69
|
+
}
|
|
70
|
+
if (v === "no" || v === "n" || v === "false" || v === "0" || v === "无") {
|
|
71
|
+
return "no";
|
|
72
|
+
}
|
|
73
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效的 --prior-result: ${raw}(可选 yes | no)`);
|
|
74
|
+
}
|
|
75
|
+
export function resolveNextSubStep(hasHypothesis, priorResult) {
|
|
76
|
+
if (hasHypothesis === "existing")
|
|
77
|
+
return "research_path";
|
|
78
|
+
return priorResult === "yes" ? "background_genes" : "hypothesis_pick";
|
|
79
|
+
}
|
|
80
|
+
export function resolveOutlineAppSuffix(hasHypothesis) {
|
|
81
|
+
return hasHypothesis === "blank" ? "-none-hypothesis" : "";
|
|
82
|
+
}
|
|
83
|
+
/** API 路径 */
|
|
84
|
+
export const NSFC_ORDER_API_PATH = `agent/v1/ai/workbench/${NSFC_MODULE_TYPE}/apps/orders`;
|
|
85
|
+
export const NSFC_EXECUTE_API_PATH = `agent/v1/ai/workbench/${NSFC_MODULE_TYPE}/apps/execute`;
|
|
86
|
+
/** generate_hypothesis app_ids(对齐 site-nsfc-v2.ts) */
|
|
87
|
+
export const NSFC_HYPOTHESIS_APP_IDS = {
|
|
88
|
+
/** blank + 无前期 · 国家级 */
|
|
89
|
+
pickNoPriorNational: "d740eeb3-8343-4b2a-be00-020948b8d849",
|
|
90
|
+
/** unused in Step2 */
|
|
91
|
+
unused1: "b4120724-d46e-4e70-a996-012b4e985e86",
|
|
92
|
+
/** 文章/附件分析 */
|
|
93
|
+
articleAnalysis: "2d88d9c7-74ac-44d0-beae-1cafc9d3b264",
|
|
94
|
+
/** research_path · 国家级 */
|
|
95
|
+
researchPathNational: "27f6af3f-606c-4041-b535-d550adabb0b0",
|
|
96
|
+
/** blank + 有前期假说 · 国家级 */
|
|
97
|
+
pickFromGeneNational: "c0582318-ae12-449e-a64f-4b3519776d0c",
|
|
98
|
+
/** research_path 补假说(Step2 按 2B 跳过) */
|
|
99
|
+
ensureHypBeforeOutline: "09e78eac-7126-4fce-814c-61b4d9d5d7f6",
|
|
100
|
+
/** blank + 有前期假说 · 省部级 */
|
|
101
|
+
pickFromGeneProvince: "426aabbc-ed34-4058-b8ff-0cd50f82cdec",
|
|
102
|
+
/** blank + 无前期 · 省部级 */
|
|
103
|
+
pickNoPriorProvince: "6de35546-e610-4c77-8c91-ec4fb554019d",
|
|
104
|
+
/** research_path · 省部级 */
|
|
105
|
+
researchPathProvince: "e54f10e9-e41c-4aec-97d5-00d13a7029b7",
|
|
106
|
+
/** research_path 补假说省部级+text1(跳过) */
|
|
107
|
+
ensureHypProvinceWithText1: "0cb5678d-76f1-42e6-8d5b-bff583adc372",
|
|
108
|
+
};
|
|
109
|
+
/** 提纲(outline / outline-none-hypothesis 同 UUID) */
|
|
110
|
+
export const NSFC_OUTLINE_APP_ID = "a6e15414-a420-4ad4-9a01-264c0169ace0";
|
|
111
|
+
/** 全文 */
|
|
112
|
+
export const NSFC_ARTICLE_APP_ID = "c8c98d57-a273-49a7-b81f-ebade42b08e7";
|
|
113
|
+
/** Writing 侧工具 */
|
|
114
|
+
export const NSFC_TECH_ROADMAP_APP_ID = "a675b48a-1685-4f0e-84cc-8e4bec8d91dd";
|
|
115
|
+
export const NSFC_HYPOTHESIS_FIGURE_APP_ID = "51ce7631-8c81-4817-88c2-113002257e8a";
|
|
116
|
+
export const NSFC_FORMAT_CONVERT_APP_ID = "62d9ecb0-35d4-4c51-94bb-4bba0e5a6541";
|
|
117
|
+
export const NSFC_CONTENT_PRODUCER = "helixlife";
|
|
118
|
+
export const NSFC_HYPOTHESIS_FIGURE_STYLE = "简约图解风(用图形元素和清晰的箭头传达机制逻辑和因果关系)";
|
|
119
|
+
export const NSFC_APP_NAMES = {
|
|
120
|
+
generateHypothesis: "生成假说",
|
|
121
|
+
outline: "已有假说提纲",
|
|
122
|
+
outlineNoneHypothesis: "无假说提纲",
|
|
123
|
+
article: "全文",
|
|
124
|
+
techRoadmap: "技术路线图",
|
|
125
|
+
hypothesisFigure: "假说机制图",
|
|
126
|
+
formatConversion: "格式转换",
|
|
127
|
+
};
|
|
128
|
+
export const NSFC_PROVINCE_PROGRAM = "省市级别项目";
|
|
129
|
+
export function isNsfcProvince(projectLevel) {
|
|
130
|
+
return projectLevel === "省部级";
|
|
131
|
+
}
|
|
132
|
+
export function resolvePickNoPriorAppId(projectLevel) {
|
|
133
|
+
return isNsfcProvince(projectLevel)
|
|
134
|
+
? NSFC_HYPOTHESIS_APP_IDS.pickNoPriorProvince
|
|
135
|
+
: NSFC_HYPOTHESIS_APP_IDS.pickNoPriorNational;
|
|
136
|
+
}
|
|
137
|
+
export function resolvePickFromGeneAppId(projectLevel) {
|
|
138
|
+
return isNsfcProvince(projectLevel)
|
|
139
|
+
? NSFC_HYPOTHESIS_APP_IDS.pickFromGeneProvince
|
|
140
|
+
: NSFC_HYPOTHESIS_APP_IDS.pickFromGeneNational;
|
|
141
|
+
}
|
|
142
|
+
export function resolveResearchPathAppId(projectLevel) {
|
|
143
|
+
return isNsfcProvince(projectLevel)
|
|
144
|
+
? NSFC_HYPOTHESIS_APP_IDS.researchPathProvince
|
|
145
|
+
: NSFC_HYPOTHESIS_APP_IDS.researchPathNational;
|
|
146
|
+
}
|
|
147
|
+
export function parseNsfcNextSubStep(raw) {
|
|
148
|
+
const v = raw.trim();
|
|
149
|
+
if (v === "background_genes" ||
|
|
150
|
+
v === "hypothesis_pick" ||
|
|
151
|
+
v === "research_path") {
|
|
152
|
+
return v;
|
|
153
|
+
}
|
|
154
|
+
throw new helixlifeError(helixlifeErrorCode.INVALID_ARGUMENT, `无效的 --next-sub-step: ${raw}(可选 background_genes | hypothesis_pick | research_path)`);
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/constants.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,cAAc,EAAE,kBAAkB,E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,uBAAuB,CAAC,oBAAoB;QAC9C,CAAC,CAAC,uBAAuB,CAAC,oBAAoB,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,YAAqB;IAC5D,OAAO,cAAc,CAAC,YAAY,CAAC;QACjC,CAAC,CAAC,uBAAuB,CAAC,oBAAoB;QAC9C,CAAC,CAAC,uBAAuB,CAAC,oBAAoB,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACrB,IACE,CAAC,KAAK,kBAAkB;QACxB,CAAC,KAAK,iBAAiB;QACvB,CAAC,KAAK,eAAe,EACrB,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,IAAI,cAAc,CACtB,kBAAkB,CAAC,gBAAgB,EACnC,wBAAwB,GAAG,yDAAyD,CACrF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface GraphNode {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
shape?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GraphEdge {
|
|
11
|
+
source: string;
|
|
12
|
+
target: string;
|
|
13
|
+
left_head?: string | null;
|
|
14
|
+
right_head?: string | null;
|
|
15
|
+
message?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface GraphLayout {
|
|
18
|
+
nodes: GraphNode[];
|
|
19
|
+
edges: GraphEdge[];
|
|
20
|
+
}
|
|
21
|
+
export declare function fetchGraphLayout(mermaid: string, arrangementHorizontal?: boolean): Promise<GraphLayout>;
|
|
22
|
+
export declare function renderLayoutToSvg(layout: GraphLayout): string;
|
|
23
|
+
/** Mermaid → PNG(无浏览器)。返回 PNG buffer;任一步失败抛出。 */
|
|
24
|
+
export declare function renderMermaidViaGraphLayout(mermaid: string, arrangementHorizontal?: boolean): Promise<Buffer>;
|
|
25
|
+
//# sourceMappingURL=graph-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-render.d.ts","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/graph-render.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAUD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AA0CD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,qBAAqB,UAAQ,GAC5B,OAAO,CAAC,WAAW,CAAC,CA+BtB;AA2ED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CA2E7D;AAED,iDAAiD;AACjD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,MAAM,EACf,qBAAqB,UAAQ,GAC5B,OAAO,CAAC,MAAM,CAAC,CAajB"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 无浏览器出图:Mermaid → graph-layout(服务端布局,与原站同源)→ SVG → Resvg PNG。
|
|
3
|
+
* 不依赖 Chrome / puppeteer / mmdc,只要有网络与 token 即可(与工作流同前提)。
|
|
4
|
+
*/
|
|
5
|
+
import { Resvg } from "@resvg/resvg-js";
|
|
6
|
+
import { ApiClient, getDefaultNewideaBaseUrl } from "../../../core/index.js";
|
|
7
|
+
const GRAPH_LAYOUT_PATH = "graph-layout/v1/mermaid";
|
|
8
|
+
const FONT_FAMILY = "Microsoft YaHei, PingFang SC, Noto Sans CJK SC, Source Han Sans SC, WenQuanYi Micro Hei, sans-serif";
|
|
9
|
+
/** 对齐原站 DrawBoard 技术路线图观感 */
|
|
10
|
+
const STYLE = {
|
|
11
|
+
canvasBg: "#FFFFFF",
|
|
12
|
+
nodeFill: "#FFFFFF",
|
|
13
|
+
nodeStroke: "#333333",
|
|
14
|
+
nodeStrokeWidth: 1.25,
|
|
15
|
+
nodeRadius: 2,
|
|
16
|
+
edgeStroke: "#333333",
|
|
17
|
+
edgeStrokeWidth: 1.25,
|
|
18
|
+
arrowFill: "#333333",
|
|
19
|
+
textFill: "#333333",
|
|
20
|
+
fontSize: 13,
|
|
21
|
+
};
|
|
22
|
+
function escapeXml(s) {
|
|
23
|
+
return s
|
|
24
|
+
.replace(/&/g, "&")
|
|
25
|
+
.replace(/</g, "<")
|
|
26
|
+
.replace(/>/g, ">")
|
|
27
|
+
.replace(/"/g, """);
|
|
28
|
+
}
|
|
29
|
+
/** 估算字符宽度:CJK 约 1em,其它约 0.6em */
|
|
30
|
+
function charWidth(ch, fontSize) {
|
|
31
|
+
return /[\u2E80-\u9FFF\uF900-\uFAFF\uFF00-\uFFEF]/.test(ch)
|
|
32
|
+
? fontSize
|
|
33
|
+
: fontSize * 0.6;
|
|
34
|
+
}
|
|
35
|
+
/** 按节点可用宽度换行(CJK 无空格,逐字断行;英文尽量按空格) */
|
|
36
|
+
function wrapLabel(label, maxWidth, fontSize) {
|
|
37
|
+
const lines = [];
|
|
38
|
+
for (const rawLine of label.split(/\r?\n/)) {
|
|
39
|
+
let cur = "";
|
|
40
|
+
let curW = 0;
|
|
41
|
+
for (const ch of rawLine) {
|
|
42
|
+
const w = charWidth(ch, fontSize);
|
|
43
|
+
if (curW + w > maxWidth && cur) {
|
|
44
|
+
lines.push(cur);
|
|
45
|
+
cur = "";
|
|
46
|
+
curW = 0;
|
|
47
|
+
}
|
|
48
|
+
cur += ch;
|
|
49
|
+
curW += w;
|
|
50
|
+
}
|
|
51
|
+
lines.push(cur);
|
|
52
|
+
}
|
|
53
|
+
return lines.length ? lines : [""];
|
|
54
|
+
}
|
|
55
|
+
export async function fetchGraphLayout(mermaid, arrangementHorizontal = false) {
|
|
56
|
+
const client = new ApiClient();
|
|
57
|
+
const body = [
|
|
58
|
+
{
|
|
59
|
+
graph_id: "",
|
|
60
|
+
mermaid,
|
|
61
|
+
subgraph_distance: 100,
|
|
62
|
+
config: { line_spacing: "2", chart_width: 16, chart_height: 32 },
|
|
63
|
+
...(arrangementHorizontal
|
|
64
|
+
? { arrangement_direction: "horizontal" }
|
|
65
|
+
: {}),
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
const res = await client.request(GRAPH_LAYOUT_PATH, {
|
|
69
|
+
method: "POST",
|
|
70
|
+
baseUrl: getDefaultNewideaBaseUrl(),
|
|
71
|
+
headers: { "Content-Type": "application/json" },
|
|
72
|
+
body,
|
|
73
|
+
});
|
|
74
|
+
if (res.code !== 2000 || !res.data?.[0]?.layout) {
|
|
75
|
+
throw new Error(`graph-layout 返回异常:code=${res.code ?? "?"}(可能为 Mermaid 语法错误或非流程图)`);
|
|
76
|
+
}
|
|
77
|
+
const layout = res.data[0].layout;
|
|
78
|
+
const nodes = layout.nodes ?? [];
|
|
79
|
+
const edges = layout.edges ?? [];
|
|
80
|
+
if (!nodes.length) {
|
|
81
|
+
throw new Error("graph-layout 未返回节点,无法出图");
|
|
82
|
+
}
|
|
83
|
+
return { nodes, edges };
|
|
84
|
+
}
|
|
85
|
+
/** 正交折线起止点(贴节点边中点,对齐原站水平/垂直指向线) */
|
|
86
|
+
function edgeEndpoints(s, t) {
|
|
87
|
+
const scx = s.x + s.width / 2;
|
|
88
|
+
const scy = s.y + s.height / 2;
|
|
89
|
+
const tcx = t.x + t.width / 2;
|
|
90
|
+
const tcy = t.y + t.height / 2;
|
|
91
|
+
const dx = tcx - scx;
|
|
92
|
+
const dy = tcy - scy;
|
|
93
|
+
if (Math.abs(dy) >= Math.abs(dx)) {
|
|
94
|
+
if (dy >= 0) {
|
|
95
|
+
return { x1: scx, y1: s.y + s.height, x2: tcx, y2: t.y, vertical: true };
|
|
96
|
+
}
|
|
97
|
+
return { x1: scx, y1: s.y, x2: tcx, y2: t.y + t.height, vertical: true };
|
|
98
|
+
}
|
|
99
|
+
if (dx >= 0) {
|
|
100
|
+
return { x1: s.x + s.width, y1: scy, x2: t.x, y2: tcy, vertical: false };
|
|
101
|
+
}
|
|
102
|
+
return { x1: s.x, y1: scy, x2: t.x + t.width, y2: tcy, vertical: false };
|
|
103
|
+
}
|
|
104
|
+
/** 正交折线路径:先横后竖 / 先竖后横,避免斜线 */
|
|
105
|
+
function orthogonalPath(g) {
|
|
106
|
+
if (Math.abs(g.x1 - g.x2) < 0.5 || Math.abs(g.y1 - g.y2) < 0.5) {
|
|
107
|
+
return `M ${g.x1} ${g.y1} L ${g.x2} ${g.y2}`;
|
|
108
|
+
}
|
|
109
|
+
if (g.vertical) {
|
|
110
|
+
// 先竖到目标 y 中段,再横到目标 x,再竖入点
|
|
111
|
+
const midY = (g.y1 + g.y2) / 2;
|
|
112
|
+
return `M ${g.x1} ${g.y1} L ${g.x1} ${midY} L ${g.x2} ${midY} L ${g.x2} ${g.y2}`;
|
|
113
|
+
}
|
|
114
|
+
const midX = (g.x1 + g.x2) / 2;
|
|
115
|
+
return `M ${g.x1} ${g.y1} L ${midX} ${g.y1} L ${midX} ${g.y2} L ${g.x2} ${g.y2}`;
|
|
116
|
+
}
|
|
117
|
+
function arrowHead(x2, y2, x1, y1) {
|
|
118
|
+
// 箭头沿最后一段直线方向(正交路径的最后一段)
|
|
119
|
+
const angle = Math.atan2(y2 - y1, x2 - x1);
|
|
120
|
+
const size = 7;
|
|
121
|
+
const a1 = angle - Math.PI / 7;
|
|
122
|
+
const a2 = angle + Math.PI / 7;
|
|
123
|
+
const p1x = x2 - size * Math.cos(a1);
|
|
124
|
+
const p1y = y2 - size * Math.sin(a1);
|
|
125
|
+
const p2x = x2 - size * Math.cos(a2);
|
|
126
|
+
const p2y = y2 - size * Math.sin(a2);
|
|
127
|
+
return `<polygon points="${x2},${y2} ${p1x.toFixed(1)},${p1y.toFixed(1)} ${p2x.toFixed(1)},${p2y.toFixed(1)}" fill="${STYLE.arrowFill}"/>`;
|
|
128
|
+
}
|
|
129
|
+
/** 正交路径最后一段的起点(用于箭头朝向) */
|
|
130
|
+
function lastSegmentStart(g) {
|
|
131
|
+
if (Math.abs(g.x1 - g.x2) < 0.5 || Math.abs(g.y1 - g.y2) < 0.5) {
|
|
132
|
+
return { x: g.x1, y: g.y1 };
|
|
133
|
+
}
|
|
134
|
+
if (g.vertical) {
|
|
135
|
+
return { x: g.x2, y: (g.y1 + g.y2) / 2 };
|
|
136
|
+
}
|
|
137
|
+
return { x: (g.x1 + g.x2) / 2, y: g.y2 };
|
|
138
|
+
}
|
|
139
|
+
export function renderLayoutToSvg(layout) {
|
|
140
|
+
const fontSize = STYLE.fontSize;
|
|
141
|
+
const lineHeight = fontSize * 1.25;
|
|
142
|
+
const margin = 24;
|
|
143
|
+
const maxX = Math.max(...layout.nodes.map((n) => n.x + n.width));
|
|
144
|
+
const maxY = Math.max(...layout.nodes.map((n) => n.y + n.height));
|
|
145
|
+
const width = Math.ceil(maxX + margin * 2);
|
|
146
|
+
const height = Math.ceil(maxY + margin * 2);
|
|
147
|
+
const byId = new Map(layout.nodes.map((n) => [n.id, n]));
|
|
148
|
+
const parts = [];
|
|
149
|
+
parts.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}">`);
|
|
150
|
+
parts.push(`<rect width="100%" height="100%" fill="${STYLE.canvasBg}"/>`);
|
|
151
|
+
parts.push(`<g transform="translate(${margin},${margin})">`);
|
|
152
|
+
// 先画边(在节点下方);线端预留箭头长度,避免被节点盖住
|
|
153
|
+
const arrowClearance = 7;
|
|
154
|
+
for (const e of layout.edges) {
|
|
155
|
+
const s = byId.get(e.source);
|
|
156
|
+
const t = byId.get(e.target);
|
|
157
|
+
if (!s || !t)
|
|
158
|
+
continue;
|
|
159
|
+
const g = edgeEndpoints(s, t);
|
|
160
|
+
const last = lastSegmentStart(g);
|
|
161
|
+
// 缩短终点,给箭头腾位置
|
|
162
|
+
const dx = g.x2 - last.x;
|
|
163
|
+
const dy = g.y2 - last.y;
|
|
164
|
+
const len = Math.hypot(dx, dy) || 1;
|
|
165
|
+
const tipX = g.x2 - (dx / len) * arrowClearance;
|
|
166
|
+
const tipY = g.y2 - (dy / len) * arrowClearance;
|
|
167
|
+
const gDraw = { ...g, x2: tipX, y2: tipY };
|
|
168
|
+
const d = orthogonalPath(gDraw);
|
|
169
|
+
parts.push(`<path d="${d}" fill="none" stroke="${STYLE.edgeStroke}" stroke-width="${STYLE.edgeStrokeWidth}"/>`);
|
|
170
|
+
// 指向目标节点的箭头(对齐原站有向折线)
|
|
171
|
+
parts.push(arrowHead(tipX, tipY, last.x, last.y));
|
|
172
|
+
if (e.left_head) {
|
|
173
|
+
parts.push(arrowHead(g.x1, g.y1, tipX, tipY));
|
|
174
|
+
}
|
|
175
|
+
if (e.message) {
|
|
176
|
+
const mx = (g.x1 + g.x2) / 2;
|
|
177
|
+
const my = (g.y1 + g.y2) / 2;
|
|
178
|
+
const label = escapeXml(e.message);
|
|
179
|
+
const w = label.length * fontSize * 0.6 + 8;
|
|
180
|
+
parts.push(`<rect x="${(mx - w / 2).toFixed(1)}" y="${(my - fontSize).toFixed(1)}" width="${w.toFixed(1)}" height="${(fontSize + 6).toFixed(1)}" fill="#FFFFFF" rx="2"/>`, `<text x="${mx.toFixed(1)}" y="${(my - 1).toFixed(1)}" font-family="${FONT_FAMILY}" font-size="${fontSize}" fill="${STYLE.textFill}" text-anchor="middle">${label}</text>`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// 再画节点(白底黑框,对齐原站)
|
|
184
|
+
for (const n of layout.nodes) {
|
|
185
|
+
parts.push(`<rect x="${n.x}" y="${n.y}" width="${n.width}" height="${n.height}" rx="${STYLE.nodeRadius}" ry="${STYLE.nodeRadius}" fill="${STYLE.nodeFill}" stroke="${STYLE.nodeStroke}" stroke-width="${STYLE.nodeStrokeWidth}"/>`);
|
|
186
|
+
const lines = wrapLabel(n.label ?? "", n.width - 12, fontSize);
|
|
187
|
+
const totalH = lines.length * lineHeight;
|
|
188
|
+
const startY = n.y + n.height / 2 - totalH / 2 + fontSize;
|
|
189
|
+
const cx = n.x + n.width / 2;
|
|
190
|
+
lines.forEach((ln, i) => {
|
|
191
|
+
parts.push(`<text x="${cx.toFixed(1)}" y="${(startY + i * lineHeight).toFixed(1)}" font-family="${FONT_FAMILY}" font-size="${fontSize}" fill="${STYLE.textFill}" text-anchor="middle">${escapeXml(ln)}</text>`);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
parts.push(`</g></svg>`);
|
|
195
|
+
return parts.join("\n");
|
|
196
|
+
}
|
|
197
|
+
/** Mermaid → PNG(无浏览器)。返回 PNG buffer;任一步失败抛出。 */
|
|
198
|
+
export async function renderMermaidViaGraphLayout(mermaid, arrangementHorizontal = false) {
|
|
199
|
+
const layout = await fetchGraphLayout(mermaid, arrangementHorizontal);
|
|
200
|
+
const svg = renderLayoutToSvg(layout);
|
|
201
|
+
const resvg = new Resvg(svg, {
|
|
202
|
+
fitTo: { mode: "zoom", value: 2 },
|
|
203
|
+
font: { loadSystemFonts: true, defaultFontFamily: "Microsoft YaHei" },
|
|
204
|
+
background: STYLE.canvasBg,
|
|
205
|
+
});
|
|
206
|
+
const png = Buffer.from(resvg.render().asPng());
|
|
207
|
+
if (png.length < 100) {
|
|
208
|
+
throw new Error("Resvg 输出异常(PNG 过小)");
|
|
209
|
+
}
|
|
210
|
+
return png;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=graph-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-render.js","sourceRoot":"","sources":["../../../../src/modules/fund/nsfc/graph-render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AACpD,MAAM,WAAW,GACf,qGAAqG,CAAC;AAExG,6BAA6B;AAC7B,MAAM,KAAK,GAAG;IACZ,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,EAAE;CACJ,CAAC;AAiCX,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,CAAC;SACL,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAED,iCAAiC;AACjC,SAAS,SAAS,CAAC,EAAU,EAAE,QAAgB;IAC7C,OAAO,2CAA2C,CAAC,IAAI,CAAC,EAAE,CAAC;QACzD,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC;AACrB,CAAC;AAED,sCAAsC;AACtC,SAAS,SAAS,CAChB,KAAa,EACb,QAAgB,EAChB,QAAgB;IAEhB,MAAM,KAAK,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