@ashx-j/lunr-dev 0.2.13-dev.8.1 → 0.2.19-dev.10.1
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 +60 -1
- package/README.md +7 -1
- package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -0
- package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js +44 -19
- package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +14 -0
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +37 -3
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts +1 -15
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +8 -21
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.js +157 -0
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +172 -171
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +50 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +131 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +276 -109
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
- package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +68 -15
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +6 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts +10 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js +38 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +3 -16
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +72 -31
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
- package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
- package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
- package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +259 -168
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
- package/dist/catalog/publication.json +12 -12
- package/dist/cli-runtime.d.ts +3 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +73 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -53
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +56 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/computer-use/adapter.d.ts +23 -0
- package/dist/core/computer-use/adapter.d.ts.map +1 -0
- package/dist/core/computer-use/adapter.js +116 -0
- package/dist/core/computer-use/adapter.js.map +1 -0
- package/dist/core/computer-use/lease.d.ts +18 -0
- package/dist/core/computer-use/lease.d.ts.map +1 -0
- package/dist/core/computer-use/lease.js +129 -0
- package/dist/core/computer-use/lease.js.map +1 -0
- package/dist/core/computer-use/macos-runtime.d.ts +14 -0
- package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
- package/dist/core/computer-use/macos-runtime.js +148 -0
- package/dist/core/computer-use/macos-runtime.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts +19 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -0
- package/dist/core/computer-use/policy.js +66 -0
- package/dist/core/computer-use/policy.js.map +1 -0
- package/dist/core/computer-use/release.generated.d.ts +31 -0
- package/dist/core/computer-use/release.generated.d.ts.map +1 -0
- package/dist/core/computer-use/release.generated.js +36 -0
- package/dist/core/computer-use/release.generated.js.map +1 -0
- package/dist/core/computer-use/runtime.d.ts +13 -0
- package/dist/core/computer-use/runtime.d.ts.map +1 -0
- package/dist/core/computer-use/runtime.js +158 -0
- package/dist/core/computer-use/runtime.js.map +1 -0
- package/dist/core/computer-use/schemas.d.ts +88 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -0
- package/dist/core/computer-use/schemas.js +80 -0
- package/dist/core/computer-use/schemas.js.map +1 -0
- package/dist/core/computer-use/windows-desktop.d.ts +3 -0
- package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
- package/dist/core/computer-use/windows-desktop.js +48 -0
- package/dist/core/computer-use/windows-desktop.js.map +1 -0
- package/dist/core/computer-use/workflow.d.ts +24 -0
- package/dist/core/computer-use/workflow.d.ts.map +1 -0
- package/dist/core/computer-use/workflow.js +330 -0
- package/dist/core/computer-use/workflow.js.map +1 -0
- package/dist/core/extensions/host-static.d.ts.map +1 -1
- package/dist/core/extensions/host-static.js +34 -12
- package/dist/core/extensions/host-static.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -2
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +10 -64
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +2 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-runtime.d.ts +0 -3
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +1 -10
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions.d.ts +1 -3
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +33 -25
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +9 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +13 -90
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +0 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +21 -79
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +19 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/timings.d.ts +2 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +17 -2
- package/dist/core/timings.js.map +1 -1
- package/dist/dev-cli.js +0 -0
- package/dist/gateway/agent-bridge.d.ts +6 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +23 -6
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +1 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +23 -7
- package/dist/gateway/cron.js.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +57 -48
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +4 -2
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +23 -32
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/processes-selector.d.ts +2 -3
- package/dist/modes/interactive/components/processes-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/processes-selector.js +5 -10
- package/dist/modes/interactive/components/processes-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +12 -21
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +138 -152
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +95 -84
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
- package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
- package/dist/modes/interactive/thinking-level-slash.js +23 -0
- package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
- package/dist/node-runtime/adapter-AZMY335J.js +279 -0
- package/dist/node-runtime/agent-session-services-RSGP5GDN.js +39 -0
- package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
- package/dist/node-runtime/brave-UWDA3I22.js +143 -0
- package/dist/node-runtime/builtin-extensions-7STLFW3A.js +29 -0
- package/dist/node-runtime/chunk-2IDTZAG5.js +1415 -0
- package/dist/node-runtime/chunk-3GHXVUAK.js +21 -0
- package/dist/node-runtime/chunk-3RCWXWAY.js +466 -0
- package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
- package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
- package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
- package/dist/node-runtime/chunk-4SJWFTUP.js +24 -0
- package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
- package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
- package/dist/node-runtime/chunk-5NWQCSKR.js +19218 -0
- package/dist/node-runtime/chunk-5OLJGVCB.js +68 -0
- package/dist/node-runtime/chunk-5Q45AVQG.js +108 -0
- package/dist/node-runtime/chunk-5SQDLSZJ.js +949 -0
- package/dist/node-runtime/chunk-6SPPH4FY.js +1269 -0
- package/dist/node-runtime/chunk-6UB6NKA3.js +860 -0
- package/dist/node-runtime/chunk-7AFOFSDY.js +105 -0
- package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
- package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
- package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
- package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
- package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
- package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
- package/dist/node-runtime/chunk-BKAZ6BKX.js +2185 -0
- package/dist/node-runtime/chunk-BR7YDUKA.js +109 -0
- package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
- package/dist/node-runtime/chunk-C4O2RSQQ.js +37 -0
- package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
- package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
- package/dist/node-runtime/chunk-CH6OL6P2.js +295 -0
- package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
- package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
- package/dist/node-runtime/chunk-DDGMHUOW.js +305 -0
- package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
- package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
- package/dist/node-runtime/chunk-EH2LJQPM.js +64 -0
- package/dist/node-runtime/chunk-EHMBW7FA.js +772 -0
- package/dist/node-runtime/chunk-FLYMHKCS.js +966 -0
- package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
- package/dist/node-runtime/chunk-GZQHMEWL.js +126 -0
- package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
- package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
- package/dist/node-runtime/chunk-HRS4HMDX.js +610 -0
- package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
- package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
- package/dist/node-runtime/chunk-ISQDQIZN.js +296 -0
- package/dist/node-runtime/chunk-J7QGQD45.js +24921 -0
- package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
- package/dist/node-runtime/chunk-JT6YCS5B.js +5648 -0
- package/dist/node-runtime/chunk-JZHEUQRL.js +180 -0
- package/dist/node-runtime/chunk-K72NVGUB.js +2834 -0
- package/dist/node-runtime/chunk-KKSIVROT.js +88 -0
- package/dist/node-runtime/chunk-LCACDWHJ.js +1743 -0
- package/dist/node-runtime/chunk-LTXUQJI4.js +173 -0
- package/dist/node-runtime/chunk-LWJXTA6Z.js +6814 -0
- package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
- package/dist/node-runtime/chunk-MGSB2C3M.js +46 -0
- package/dist/node-runtime/chunk-MGWCVY6Y.js +47 -0
- package/dist/node-runtime/chunk-MJQDX3BA.js +72 -0
- package/dist/node-runtime/chunk-MUMMMTW4.js +8392 -0
- package/dist/node-runtime/chunk-MX3GJNXJ.js +986 -0
- package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
- package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
- package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
- package/dist/node-runtime/chunk-OTT6JMPU.js +807 -0
- package/dist/node-runtime/chunk-PCIGF2XK.js +250 -0
- package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
- package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
- package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
- package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
- package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
- package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
- package/dist/node-runtime/chunk-RQ5DNUNG.js +429 -0
- package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
- package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
- package/dist/node-runtime/chunk-SWSN6HAB.js +53 -0
- package/dist/node-runtime/chunk-T5GM5BFH.js +7558 -0
- package/dist/node-runtime/chunk-TAP7QTUT.js +1346 -0
- package/dist/node-runtime/chunk-U6C7VTR5.js +2033 -0
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
- package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
- package/dist/node-runtime/chunk-W7S2REEG.js +9478 -0
- package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
- package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
- package/dist/node-runtime/chunk-ZCHMJ34K.js +130 -0
- package/dist/node-runtime/chunk-ZRDIMBEQ.js +651 -0
- package/dist/node-runtime/chunk-ZSEZY3II.js +247 -0
- package/dist/node-runtime/cli-runtime.js +81 -0
- package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
- package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
- package/dist/node-runtime/command-6UXQ6XZN.js +13 -0
- package/dist/node-runtime/commands-LGR5VT5X.js +293 -0
- package/dist/node-runtime/config-FMEOZSWE.js +77 -0
- package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
- package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
- package/dist/node-runtime/direct-tool-executor-TDJS7TBD.js +191 -0
- package/dist/node-runtime/exa-LL64QZR2.js +329 -0
- package/dist/node-runtime/export-html-E4DT6ZJQ.js +150 -0
- package/dist/node-runtime/extension-input-RV5N6APL.js +14 -0
- package/dist/node-runtime/extension-selector-CPD5LWDD.js +14 -0
- package/dist/node-runtime/extract-IUCVZCWC.js +17 -0
- package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
- package/dist/node-runtime/gateway-3OLC4GQN.js +2139 -0
- package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
- package/dist/node-runtime/gemini-search-NCIDF7NE.js +330 -0
- package/dist/node-runtime/gemini-url-context-OKIN7AIP.js +103 -0
- package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
- package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
- package/dist/node-runtime/goal-CZQ7FFQJ.js +1831 -0
- package/dist/node-runtime/image-resize-6ZPBFMWW.js +11 -0
- package/dist/node-runtime/index.js +863 -0
- package/dist/node-runtime/init-EKE277AG.js +30 -0
- package/dist/node-runtime/install-cli-TH7IJJQQ.js +308 -0
- package/dist/node-runtime/interactive-mode-S5M26CQ7.js +59 -0
- package/dist/node-runtime/interactive-view-N6F4KUIT.js +247 -0
- package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
- package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +206 -0
- package/dist/node-runtime/lunr-cron-KKBOGAEF.js +274 -0
- package/dist/node-runtime/main.js +57 -0
- package/dist/node-runtime/mcp-auth-flow-YL6RWPYG.js +33 -0
- package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
- package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
- package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
- package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
- package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
- package/dist/node-runtime/package-manager-cli-C4EJOO5Q.js +751 -0
- package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
- package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
- package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
- package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
- package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
- package/dist/node-runtime/pi-mcp-adapter-DPTJGAAL.js +428 -0
- package/dist/node-runtime/pi-ollama-cloud-4VZRMULP.js +1440 -0
- package/dist/node-runtime/pi-prompt-template-model-4QT4LLXF.js +3946 -0
- package/dist/node-runtime/pi-subagents-VKCLYIBY.js +6050 -0
- package/dist/node-runtime/pi-web-access-BV6DSZOP.js +1867 -0
- package/dist/node-runtime/print-mode-VWIRFDAC.js +12 -0
- package/dist/node-runtime/proxy-modes-R64LU6WZ.js +688 -0
- package/dist/node-runtime/rpc-entry.js +65 -0
- package/dist/node-runtime/rpc-mode-SJNSOA4G.js +13 -0
- package/dist/node-runtime/runtime-3SB5ATHQ.js +21 -0
- package/dist/node-runtime/runtime-bridges-UJ5WJJLN.js +14 -0
- package/dist/node-runtime/session-manager-QEMZBMTM.js +33 -0
- package/dist/node-runtime/session-selector-URVJLOTK.js +14 -0
- package/dist/node-runtime/settings-manager-K6IPIQTI.js +23 -0
- package/dist/node-runtime/src-GPFAU3N6.js +2427 -0
- package/dist/node-runtime/subagent-executor-EFLTO32A.js +8501 -0
- package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
- package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
- package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
- package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
- package/dist/node-runtime/update-cli-I6OVDRPL.js +75 -0
- package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
- package/dist/node-runtime/video-extract-ETA5RA7U.js +304 -0
- package/dist/node-runtime/workflow-SA34S4VX.js +325 -0
- package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
- package/dist/node-runtime/youtube-extract-SRVGNN26.js +264 -0
- package/dist/rpc.d.ts +3 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +18 -0
- package/dist/rpc.js.map +1 -0
- package/dist/startup/benchmark-request.d.ts +3 -0
- package/dist/startup/benchmark-request.d.ts.map +1 -0
- package/dist/startup/benchmark-request.js +65 -0
- package/dist/startup/benchmark-request.js.map +1 -0
- package/dist/startup/{interactive-shell.d.ts → interactive-view.d.ts} +18 -18
- package/dist/startup/interactive-view.d.ts.map +1 -0
- package/dist/startup/{interactive-shell.js → interactive-view.js} +119 -52
- package/dist/startup/interactive-view.js.map +1 -0
- package/dist/startup/launch-routing.d.ts.map +1 -1
- package/dist/startup/launch-routing.js +9 -10
- package/dist/startup/launch-routing.js.map +1 -1
- package/dist/startup/startup-milestones.d.ts +1 -1
- package/dist/startup/startup-milestones.d.ts.map +1 -1
- package/dist/startup/startup-milestones.js +3 -2
- package/dist/startup/startup-milestones.js.map +1 -1
- package/dist/utils/await-with-abort.d.ts +2 -0
- package/dist/utils/await-with-abort.d.ts.map +1 -0
- package/dist/utils/await-with-abort.js +19 -0
- package/dist/utils/await-with-abort.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +10 -4
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/docs/compaction.md +5 -3
- package/docs/computer-use.md +277 -0
- package/docs/development.md +5 -33
- package/docs/features.md +2 -3
- package/docs/interactive-startup.md +105 -0
- package/docs/keybindings.md +2 -2
- package/docs/terminal-setup.md +1 -1
- package/docs/usage.md +1 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/install-lock/package-lock.json +3827 -0
- package/install-lock/package.json +18 -0
- package/native/computer-use/LICENSE.md +21 -0
- package/npm-shrinkwrap.json +3808 -0
- package/package.json +30 -24
- package/dist/core/swarm.d.ts +0 -23
- package/dist/core/swarm.d.ts.map +0 -1
- package/dist/core/swarm.js +0 -45
- package/dist/core/swarm.js.map +0 -1
- package/dist/startup/interactive-shell.d.ts.map +0 -1
- package/dist/startup/interactive-shell.js.map +0 -1
|
@@ -0,0 +1,3622 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
__export
|
|
4
|
+
} from "./chunk-BRJX2PRC.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/@sinclair/typebox/build/typebox.mjs
|
|
7
|
+
var typebox_exports = {};
|
|
8
|
+
__export(typebox_exports, {
|
|
9
|
+
Any: () => Any,
|
|
10
|
+
Array: () => _Array_,
|
|
11
|
+
AsyncIterator: () => AsyncIterator,
|
|
12
|
+
Awaited: () => Awaited,
|
|
13
|
+
Base: () => Base,
|
|
14
|
+
BigInt: () => BigInt2,
|
|
15
|
+
Boolean: () => Boolean2,
|
|
16
|
+
Call: () => Call,
|
|
17
|
+
Capitalize: () => Capitalize,
|
|
18
|
+
Codec: () => Codec,
|
|
19
|
+
Conditional: () => Conditional,
|
|
20
|
+
Constructor: () => Constructor,
|
|
21
|
+
ConstructorParameters: () => ConstructorParameters,
|
|
22
|
+
Cyclic: () => Cyclic,
|
|
23
|
+
Decode: () => Decode,
|
|
24
|
+
DecodeBuilder: () => DecodeBuilder,
|
|
25
|
+
Encode: () => Encode,
|
|
26
|
+
EncodeBuilder: () => EncodeBuilder,
|
|
27
|
+
Enum: () => Enum,
|
|
28
|
+
Evaluate: () => Evaluate,
|
|
29
|
+
Exclude: () => Exclude,
|
|
30
|
+
Extends: () => Extends,
|
|
31
|
+
ExtendsResult: () => result_exports,
|
|
32
|
+
Extract: () => Extract,
|
|
33
|
+
Function: () => _Function_,
|
|
34
|
+
Generic: () => Generic,
|
|
35
|
+
Identifier: () => Identifier,
|
|
36
|
+
Immutable: () => Immutable,
|
|
37
|
+
Index: () => Index,
|
|
38
|
+
Infer: () => Infer,
|
|
39
|
+
InstanceType: () => InstanceType,
|
|
40
|
+
Instantiate: () => Instantiate,
|
|
41
|
+
Integer: () => Integer,
|
|
42
|
+
Interface: () => Interface,
|
|
43
|
+
Intersect: () => Intersect,
|
|
44
|
+
IsAny: () => IsAny,
|
|
45
|
+
IsArray: () => IsArray2,
|
|
46
|
+
IsAsyncIterator: () => IsAsyncIterator2,
|
|
47
|
+
IsBase: () => IsBase,
|
|
48
|
+
IsBigInt: () => IsBigInt2,
|
|
49
|
+
IsBoolean: () => IsBoolean2,
|
|
50
|
+
IsCall: () => IsCall,
|
|
51
|
+
IsCodec: () => IsCodec,
|
|
52
|
+
IsConstructor: () => IsConstructor2,
|
|
53
|
+
IsCyclic: () => IsCyclic,
|
|
54
|
+
IsEnum: () => IsEnum,
|
|
55
|
+
IsFunction: () => IsFunction2,
|
|
56
|
+
IsGeneric: () => IsGeneric,
|
|
57
|
+
IsIdentifier: () => IsIdentifier,
|
|
58
|
+
IsImmutable: () => IsImmutable,
|
|
59
|
+
IsInfer: () => IsInfer,
|
|
60
|
+
IsInteger: () => IsInteger2,
|
|
61
|
+
IsIntersect: () => IsIntersect,
|
|
62
|
+
IsIterator: () => IsIterator2,
|
|
63
|
+
IsKind: () => IsKind,
|
|
64
|
+
IsLiteral: () => IsLiteral,
|
|
65
|
+
IsNever: () => IsNever,
|
|
66
|
+
IsNull: () => IsNull2,
|
|
67
|
+
IsNumber: () => IsNumber2,
|
|
68
|
+
IsObject: () => IsObject2,
|
|
69
|
+
IsOptional: () => IsOptional,
|
|
70
|
+
IsParameter: () => IsParameter,
|
|
71
|
+
IsPromise: () => IsPromise,
|
|
72
|
+
IsReadonly: () => IsReadonly,
|
|
73
|
+
IsRecord: () => IsRecord,
|
|
74
|
+
IsRef: () => IsRef,
|
|
75
|
+
IsRefine: () => IsRefine,
|
|
76
|
+
IsRest: () => IsRest,
|
|
77
|
+
IsSchema: () => IsSchema,
|
|
78
|
+
IsString: () => IsString2,
|
|
79
|
+
IsSymbol: () => IsSymbol2,
|
|
80
|
+
IsTemplateLiteral: () => IsTemplateLiteral,
|
|
81
|
+
IsThis: () => IsThis,
|
|
82
|
+
IsTuple: () => IsTuple,
|
|
83
|
+
IsUndefined: () => IsUndefined2,
|
|
84
|
+
IsUnion: () => IsUnion,
|
|
85
|
+
IsUnknown: () => IsUnknown,
|
|
86
|
+
IsUnsafe: () => IsUnsafe,
|
|
87
|
+
IsVoid: () => IsVoid,
|
|
88
|
+
Iterator: () => Iterator,
|
|
89
|
+
KeyOf: () => KeyOf,
|
|
90
|
+
Literal: () => Literal,
|
|
91
|
+
Lowercase: () => Lowercase,
|
|
92
|
+
Mapped: () => Mapped,
|
|
93
|
+
Module: () => Module,
|
|
94
|
+
Never: () => Never,
|
|
95
|
+
NonNullable: () => NonNullable,
|
|
96
|
+
Null: () => Null,
|
|
97
|
+
Number: () => Number2,
|
|
98
|
+
Object: () => _Object_,
|
|
99
|
+
Omit: () => Omit,
|
|
100
|
+
Optional: () => Optional,
|
|
101
|
+
Options: () => Options,
|
|
102
|
+
Parameter: () => Parameter,
|
|
103
|
+
Parameters: () => Parameters,
|
|
104
|
+
Partial: () => Partial,
|
|
105
|
+
Pick: () => Pick,
|
|
106
|
+
Promise: () => _Promise_,
|
|
107
|
+
Readonly: () => Readonly,
|
|
108
|
+
ReadonlyObject: () => ReadonlyObject,
|
|
109
|
+
ReadonlyType: () => ReadonlyType,
|
|
110
|
+
Record: () => Record,
|
|
111
|
+
RecordKey: () => RecordKey,
|
|
112
|
+
RecordPattern: () => RecordPattern,
|
|
113
|
+
RecordValue: () => RecordValue,
|
|
114
|
+
Ref: () => Ref,
|
|
115
|
+
Refine: () => Refine,
|
|
116
|
+
Required: () => Required,
|
|
117
|
+
Rest: () => Rest,
|
|
118
|
+
ReturnType: () => ReturnType,
|
|
119
|
+
Script: () => Script2,
|
|
120
|
+
String: () => String2,
|
|
121
|
+
Symbol: () => Symbol2,
|
|
122
|
+
TemplateLiteral: () => TemplateLiteral2,
|
|
123
|
+
This: () => This,
|
|
124
|
+
Tuple: () => Tuple,
|
|
125
|
+
Uncapitalize: () => Uncapitalize,
|
|
126
|
+
Undefined: () => Undefined,
|
|
127
|
+
Union: () => Union,
|
|
128
|
+
Unknown: () => Unknown,
|
|
129
|
+
Unsafe: () => Unsafe,
|
|
130
|
+
Uppercase: () => Uppercase,
|
|
131
|
+
Void: () => Void
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// node_modules/@sinclair/typebox/build/guard/guard.mjs
|
|
135
|
+
var guard_exports = {};
|
|
136
|
+
__export(guard_exports, {
|
|
137
|
+
Entries: () => Entries,
|
|
138
|
+
EntriesRegExp: () => EntriesRegExp,
|
|
139
|
+
Every: () => Every,
|
|
140
|
+
EveryAll: () => EveryAll,
|
|
141
|
+
GraphemeCount: () => GraphemeCount2,
|
|
142
|
+
HasPropertyKey: () => HasPropertyKey,
|
|
143
|
+
IsArray: () => IsArray,
|
|
144
|
+
IsAsyncIterator: () => IsAsyncIterator,
|
|
145
|
+
IsBigInt: () => IsBigInt,
|
|
146
|
+
IsBoolean: () => IsBoolean,
|
|
147
|
+
IsClassInstance: () => IsClassInstance,
|
|
148
|
+
IsConstructor: () => IsConstructor,
|
|
149
|
+
IsDeepEqual: () => IsDeepEqual,
|
|
150
|
+
IsEqual: () => IsEqual,
|
|
151
|
+
IsFunction: () => IsFunction,
|
|
152
|
+
IsGreaterEqualThan: () => IsGreaterEqualThan,
|
|
153
|
+
IsGreaterThan: () => IsGreaterThan,
|
|
154
|
+
IsInteger: () => IsInteger,
|
|
155
|
+
IsIterator: () => IsIterator,
|
|
156
|
+
IsLessEqualThan: () => IsLessEqualThan,
|
|
157
|
+
IsLessThan: () => IsLessThan,
|
|
158
|
+
IsMaxLength: () => IsMaxLength2,
|
|
159
|
+
IsMinLength: () => IsMinLength2,
|
|
160
|
+
IsMultipleOf: () => IsMultipleOf,
|
|
161
|
+
IsNull: () => IsNull,
|
|
162
|
+
IsNumber: () => IsNumber,
|
|
163
|
+
IsObject: () => IsObject,
|
|
164
|
+
IsObjectNotArray: () => IsObjectNotArray,
|
|
165
|
+
IsString: () => IsString,
|
|
166
|
+
IsSymbol: () => IsSymbol,
|
|
167
|
+
IsUndefined: () => IsUndefined,
|
|
168
|
+
IsUnsafePropertyKey: () => IsUnsafePropertyKey,
|
|
169
|
+
IsValueLike: () => IsValueLike,
|
|
170
|
+
Keys: () => Keys,
|
|
171
|
+
Symbols: () => Symbols,
|
|
172
|
+
TakeLeft: () => TakeLeft,
|
|
173
|
+
Values: () => Values
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// node_modules/@sinclair/typebox/build/guard/string.mjs
|
|
177
|
+
function IsBetween(value, min, max) {
|
|
178
|
+
return value >= min && value <= max;
|
|
179
|
+
}
|
|
180
|
+
function IsRegionalIndicator(value) {
|
|
181
|
+
return IsBetween(value, 127462, 127487);
|
|
182
|
+
}
|
|
183
|
+
function IsVariationSelector(value) {
|
|
184
|
+
return IsBetween(value, 65024, 65039);
|
|
185
|
+
}
|
|
186
|
+
function IsCombiningMark(value) {
|
|
187
|
+
return IsBetween(value, 768, 879) || IsBetween(value, 6832, 6911) || IsBetween(value, 7616, 7679) || IsBetween(value, 65056, 65071);
|
|
188
|
+
}
|
|
189
|
+
function CodePointLength(value) {
|
|
190
|
+
return value > 65535 ? 2 : 1;
|
|
191
|
+
}
|
|
192
|
+
function ConsumeModifiers(value, index) {
|
|
193
|
+
for (; index < value.length; ) {
|
|
194
|
+
let point = value.codePointAt(index);
|
|
195
|
+
if (IsCombiningMark(point) || IsVariationSelector(point))
|
|
196
|
+
index += CodePointLength(point);
|
|
197
|
+
else
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
return index;
|
|
201
|
+
}
|
|
202
|
+
function NextGraphemeClusterIndex(value, clusterStart) {
|
|
203
|
+
let startCP = value.codePointAt(clusterStart), clusterEnd = clusterStart + CodePointLength(startCP);
|
|
204
|
+
for (clusterEnd = ConsumeModifiers(value, clusterEnd); clusterEnd < value.length - 1 && value[clusterEnd] === "\u200D"; ) {
|
|
205
|
+
let nextCP = value.codePointAt(clusterEnd + 1);
|
|
206
|
+
clusterEnd += 1 + CodePointLength(nextCP), clusterEnd = ConsumeModifiers(value, clusterEnd);
|
|
207
|
+
}
|
|
208
|
+
return IsRegionalIndicator(startCP) && clusterEnd < value.length && IsRegionalIndicator(value.codePointAt(clusterEnd)) && (clusterEnd += CodePointLength(value.codePointAt(clusterEnd))), clusterEnd;
|
|
209
|
+
}
|
|
210
|
+
function IsGraphemeCodePoint(value) {
|
|
211
|
+
return IsBetween(value, 55296, 56319) || // High surrogate
|
|
212
|
+
IsBetween(value, 768, 879) || // Combining diacritical marks
|
|
213
|
+
value === 8205;
|
|
214
|
+
}
|
|
215
|
+
function GraphemeCount(value) {
|
|
216
|
+
let count = 0, index = 0;
|
|
217
|
+
for (; index < value.length; )
|
|
218
|
+
index = NextGraphemeClusterIndex(value, index), count++;
|
|
219
|
+
return count;
|
|
220
|
+
}
|
|
221
|
+
function IsMinLength(value, minLength) {
|
|
222
|
+
if (minLength === 0)
|
|
223
|
+
return !0;
|
|
224
|
+
let count = 0, index = 0;
|
|
225
|
+
for (; index < value.length; )
|
|
226
|
+
if (index = NextGraphemeClusterIndex(value, index), count++, count >= minLength)
|
|
227
|
+
return !0;
|
|
228
|
+
return !1;
|
|
229
|
+
}
|
|
230
|
+
function IsMaxLength(value, maxLength) {
|
|
231
|
+
let count = 0, index = 0;
|
|
232
|
+
for (; index < value.length; )
|
|
233
|
+
if (index = NextGraphemeClusterIndex(value, index), count++, count > maxLength)
|
|
234
|
+
return !1;
|
|
235
|
+
return !0;
|
|
236
|
+
}
|
|
237
|
+
function IsMinLengthFast(value, minLength) {
|
|
238
|
+
if (minLength === 0)
|
|
239
|
+
return !0;
|
|
240
|
+
let index = 0;
|
|
241
|
+
for (; index < value.length; ) {
|
|
242
|
+
if (IsGraphemeCodePoint(value.charCodeAt(index)))
|
|
243
|
+
return IsMinLength(value, minLength);
|
|
244
|
+
if (index++, index >= minLength)
|
|
245
|
+
return !0;
|
|
246
|
+
}
|
|
247
|
+
return !1;
|
|
248
|
+
}
|
|
249
|
+
function IsMaxLengthFast(value, maxLength) {
|
|
250
|
+
let index = 0;
|
|
251
|
+
for (; index < value.length; ) {
|
|
252
|
+
if (IsGraphemeCodePoint(value.charCodeAt(index)))
|
|
253
|
+
return IsMaxLength(value, maxLength);
|
|
254
|
+
if (index++, index > maxLength)
|
|
255
|
+
return !1;
|
|
256
|
+
}
|
|
257
|
+
return !0;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// node_modules/@sinclair/typebox/build/guard/guard.mjs
|
|
261
|
+
function IsArray(value) {
|
|
262
|
+
return Array.isArray(value);
|
|
263
|
+
}
|
|
264
|
+
function IsAsyncIterator(value) {
|
|
265
|
+
return IsObject(value) && Symbol.asyncIterator in value;
|
|
266
|
+
}
|
|
267
|
+
function IsBigInt(value) {
|
|
268
|
+
return IsEqual(typeof value, "bigint");
|
|
269
|
+
}
|
|
270
|
+
function IsBoolean(value) {
|
|
271
|
+
return IsEqual(typeof value, "boolean");
|
|
272
|
+
}
|
|
273
|
+
function IsConstructor(value) {
|
|
274
|
+
if (IsUndefined(value) || !IsFunction(value))
|
|
275
|
+
return !1;
|
|
276
|
+
let result = Function.prototype.toString.call(value);
|
|
277
|
+
return !!(/^class\s/.test(result) || /\[native code\]/.test(result));
|
|
278
|
+
}
|
|
279
|
+
function IsFunction(value) {
|
|
280
|
+
return IsEqual(typeof value, "function");
|
|
281
|
+
}
|
|
282
|
+
function IsInteger(value) {
|
|
283
|
+
return Number.isInteger(value);
|
|
284
|
+
}
|
|
285
|
+
function IsIterator(value) {
|
|
286
|
+
return IsObject(value) && Symbol.iterator in value;
|
|
287
|
+
}
|
|
288
|
+
function IsNull(value) {
|
|
289
|
+
return IsEqual(value, null);
|
|
290
|
+
}
|
|
291
|
+
function IsNumber(value) {
|
|
292
|
+
return Number.isFinite(value);
|
|
293
|
+
}
|
|
294
|
+
function IsObjectNotArray(value) {
|
|
295
|
+
return IsObject(value) && !IsArray(value);
|
|
296
|
+
}
|
|
297
|
+
function IsObject(value) {
|
|
298
|
+
return IsEqual(typeof value, "object") && !IsNull(value);
|
|
299
|
+
}
|
|
300
|
+
function IsString(value) {
|
|
301
|
+
return IsEqual(typeof value, "string");
|
|
302
|
+
}
|
|
303
|
+
function IsSymbol(value) {
|
|
304
|
+
return IsEqual(typeof value, "symbol");
|
|
305
|
+
}
|
|
306
|
+
function IsUndefined(value) {
|
|
307
|
+
return IsEqual(value, void 0);
|
|
308
|
+
}
|
|
309
|
+
function IsEqual(left, right) {
|
|
310
|
+
return left === right;
|
|
311
|
+
}
|
|
312
|
+
function IsGreaterThan(left, right) {
|
|
313
|
+
return left > right;
|
|
314
|
+
}
|
|
315
|
+
function IsLessThan(left, right) {
|
|
316
|
+
return left < right;
|
|
317
|
+
}
|
|
318
|
+
function IsLessEqualThan(left, right) {
|
|
319
|
+
return left <= right;
|
|
320
|
+
}
|
|
321
|
+
function IsGreaterEqualThan(left, right) {
|
|
322
|
+
return left >= right;
|
|
323
|
+
}
|
|
324
|
+
function IsMultipleOf(dividend, divisor) {
|
|
325
|
+
if (IsBigInt(dividend) || IsBigInt(divisor))
|
|
326
|
+
return BigInt(dividend) % BigInt(divisor) === 0n;
|
|
327
|
+
let tolerance = 1e-10;
|
|
328
|
+
if (!IsNumber(dividend) || IsInteger(dividend) && 1 / divisor % 1 === 0)
|
|
329
|
+
return !0;
|
|
330
|
+
let mod = dividend % divisor;
|
|
331
|
+
return Math.min(Math.abs(mod), Math.abs(mod - divisor)) < tolerance;
|
|
332
|
+
}
|
|
333
|
+
function IsClassInstance(value) {
|
|
334
|
+
if (!IsObject(value))
|
|
335
|
+
return !1;
|
|
336
|
+
let proto = globalThis.Object.getPrototypeOf(value);
|
|
337
|
+
return IsNull(proto) ? !1 : IsEqual(typeof proto.constructor, "function") && !(IsEqual(proto.constructor, globalThis.Object) || IsEqual(proto.constructor.name, "Object"));
|
|
338
|
+
}
|
|
339
|
+
function IsValueLike(value) {
|
|
340
|
+
return IsBigInt(value) || IsBoolean(value) || IsNull(value) || IsNumber(value) || IsString(value) || IsUndefined(value);
|
|
341
|
+
}
|
|
342
|
+
function GraphemeCount2(value) {
|
|
343
|
+
return GraphemeCount(value);
|
|
344
|
+
}
|
|
345
|
+
function IsMaxLength2(value, length) {
|
|
346
|
+
return IsMaxLengthFast(value, length);
|
|
347
|
+
}
|
|
348
|
+
function IsMinLength2(value, length) {
|
|
349
|
+
return IsMinLengthFast(value, length);
|
|
350
|
+
}
|
|
351
|
+
function Every(value, offset, callback) {
|
|
352
|
+
for (let index = offset; index < value.length; index++)
|
|
353
|
+
if (!callback(value[index], index))
|
|
354
|
+
return !1;
|
|
355
|
+
return !0;
|
|
356
|
+
}
|
|
357
|
+
function EveryAll(value, offset, callback) {
|
|
358
|
+
let result = !0;
|
|
359
|
+
for (let index = offset; index < value.length; index++)
|
|
360
|
+
callback(value[index], index) || (result = !1);
|
|
361
|
+
return result;
|
|
362
|
+
}
|
|
363
|
+
function TakeLeft(array, true_, false_) {
|
|
364
|
+
return IsEqual(array.length, 0) ? false_() : true_(array[0], array.slice(1));
|
|
365
|
+
}
|
|
366
|
+
function IsUnsafePropertyKey(key) {
|
|
367
|
+
return IsEqual(key, "__proto__") || IsEqual(key, "constructor") || IsEqual(key, "prototype");
|
|
368
|
+
}
|
|
369
|
+
function HasPropertyKey(value, key) {
|
|
370
|
+
return IsUnsafePropertyKey(key) ? Object.prototype.hasOwnProperty.call(value, key) : key in value;
|
|
371
|
+
}
|
|
372
|
+
function EntriesRegExp(value) {
|
|
373
|
+
return Keys(value).map((key) => [new RegExp(`^${key}$`), value[key]]);
|
|
374
|
+
}
|
|
375
|
+
function Entries(value) {
|
|
376
|
+
return Object.entries(value);
|
|
377
|
+
}
|
|
378
|
+
function Keys(value) {
|
|
379
|
+
return Object.getOwnPropertyNames(value);
|
|
380
|
+
}
|
|
381
|
+
function Symbols(value) {
|
|
382
|
+
return Object.getOwnPropertySymbols(value);
|
|
383
|
+
}
|
|
384
|
+
function Values(value) {
|
|
385
|
+
return Object.values(value);
|
|
386
|
+
}
|
|
387
|
+
function DeepEqualObject(left, right) {
|
|
388
|
+
if (!IsObject(right))
|
|
389
|
+
return !1;
|
|
390
|
+
let keys = Keys(left);
|
|
391
|
+
return IsEqual(keys.length, Keys(right).length) && keys.every((key) => IsDeepEqual(left[key], right[key]));
|
|
392
|
+
}
|
|
393
|
+
function DeepEqualArray(left, right) {
|
|
394
|
+
return IsArray(right) && IsEqual(left.length, right.length) && left.every((_, index) => IsDeepEqual(left[index], right[index]));
|
|
395
|
+
}
|
|
396
|
+
function IsDeepEqual(left, right) {
|
|
397
|
+
return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// node_modules/@sinclair/typebox/build/system/memory/memory.mjs
|
|
401
|
+
var memory_exports = {};
|
|
402
|
+
__export(memory_exports, {
|
|
403
|
+
Assign: () => Assign,
|
|
404
|
+
Clone: () => Clone,
|
|
405
|
+
Create: () => Create,
|
|
406
|
+
Discard: () => Discard,
|
|
407
|
+
Metrics: () => Metrics,
|
|
408
|
+
Update: () => Update
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
// node_modules/@sinclair/typebox/build/system/memory/metrics.mjs
|
|
412
|
+
var Metrics = {
|
|
413
|
+
assign: 0,
|
|
414
|
+
create: 0,
|
|
415
|
+
clone: 0,
|
|
416
|
+
discard: 0,
|
|
417
|
+
update: 0
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
// node_modules/@sinclair/typebox/build/system/memory/assign.mjs
|
|
421
|
+
function Assign(left, right) {
|
|
422
|
+
return Metrics.assign += 1, { ...left, ...right };
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// node_modules/@sinclair/typebox/build/system/memory/clone.mjs
|
|
426
|
+
function IsGuard(value) {
|
|
427
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~guard");
|
|
428
|
+
}
|
|
429
|
+
function FromArray(value) {
|
|
430
|
+
return value.map((value2) => FromValue(value2));
|
|
431
|
+
}
|
|
432
|
+
function FromObject(value) {
|
|
433
|
+
let result = {}, descriptors = Object.getOwnPropertyDescriptors(value);
|
|
434
|
+
for (let key of Object.keys(descriptors)) {
|
|
435
|
+
let descriptor = descriptors[key];
|
|
436
|
+
guard_exports.HasPropertyKey(descriptor, "value") && Object.defineProperty(result, key, { ...descriptor, value: FromValue(descriptor.value) });
|
|
437
|
+
}
|
|
438
|
+
return result;
|
|
439
|
+
}
|
|
440
|
+
function FromRegExp(value) {
|
|
441
|
+
return new RegExp(value.source, value.flags);
|
|
442
|
+
}
|
|
443
|
+
function FromValue(value) {
|
|
444
|
+
return value instanceof RegExp ? FromRegExp(value) : IsGuard(value) ? value : guard_exports.IsArray(value) ? FromArray(value) : guard_exports.IsObject(value) ? FromObject(value) : value;
|
|
445
|
+
}
|
|
446
|
+
function Clone(value) {
|
|
447
|
+
return Metrics.clone += 1, FromValue(value);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// node_modules/@sinclair/typebox/build/system/settings/settings.mjs
|
|
451
|
+
var settings_exports = {};
|
|
452
|
+
__export(settings_exports, {
|
|
453
|
+
Get: () => Get,
|
|
454
|
+
Reset: () => Reset,
|
|
455
|
+
Set: () => Set2
|
|
456
|
+
});
|
|
457
|
+
var settings = {
|
|
458
|
+
immutableTypes: !1,
|
|
459
|
+
maxErrors: 8,
|
|
460
|
+
useAcceleration: !0,
|
|
461
|
+
exactOptionalPropertyTypes: !1,
|
|
462
|
+
enumerableKind: !1,
|
|
463
|
+
correctiveParse: !1
|
|
464
|
+
};
|
|
465
|
+
function Reset() {
|
|
466
|
+
settings.immutableTypes = !1, settings.maxErrors = 8, settings.useAcceleration = !0, settings.exactOptionalPropertyTypes = !1, settings.enumerableKind = !1, settings.correctiveParse = !1;
|
|
467
|
+
}
|
|
468
|
+
function Set2(options) {
|
|
469
|
+
for (let key of guard_exports.Keys(options)) {
|
|
470
|
+
let value = options[key];
|
|
471
|
+
value !== void 0 && Object.defineProperty(settings, key, { value });
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
function Get() {
|
|
475
|
+
return settings;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// node_modules/@sinclair/typebox/build/system/memory/create.mjs
|
|
479
|
+
function MergeHidden(left, right) {
|
|
480
|
+
for (let key of Object.keys(right))
|
|
481
|
+
Object.defineProperty(left, key, {
|
|
482
|
+
configurable: !0,
|
|
483
|
+
writable: !0,
|
|
484
|
+
enumerable: !1,
|
|
485
|
+
value: right[key]
|
|
486
|
+
});
|
|
487
|
+
return left;
|
|
488
|
+
}
|
|
489
|
+
function Merge(left, right) {
|
|
490
|
+
return { ...left, ...right };
|
|
491
|
+
}
|
|
492
|
+
function Create(hidden, enumerable, options = {}) {
|
|
493
|
+
Metrics.create += 1;
|
|
494
|
+
let settings2 = settings_exports.Get(), withOptions = Merge(enumerable, options), withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
|
|
495
|
+
return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// node_modules/@sinclair/typebox/build/system/memory/discard.mjs
|
|
499
|
+
function Discard(value, propertyKeys) {
|
|
500
|
+
Metrics.discard += 1;
|
|
501
|
+
let result = {}, descriptors = Object.getOwnPropertyDescriptors(Clone(value)), keysToDiscard = new Set(propertyKeys);
|
|
502
|
+
for (let key of Object.keys(descriptors))
|
|
503
|
+
keysToDiscard.has(key) || Object.defineProperty(result, key, descriptors[key]);
|
|
504
|
+
return result;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// node_modules/@sinclair/typebox/build/system/memory/update.mjs
|
|
508
|
+
function Update(current, hidden, enumerable) {
|
|
509
|
+
Metrics.update += 1;
|
|
510
|
+
let settings2 = settings_exports.Get(), result = Clone(current);
|
|
511
|
+
for (let key of Object.keys(hidden))
|
|
512
|
+
Object.defineProperty(result, key, {
|
|
513
|
+
configurable: !0,
|
|
514
|
+
writable: !0,
|
|
515
|
+
enumerable: settings2.enumerableKind,
|
|
516
|
+
value: hidden[key]
|
|
517
|
+
});
|
|
518
|
+
for (let key of Object.keys(enumerable))
|
|
519
|
+
Object.defineProperty(result, key, {
|
|
520
|
+
configurable: !0,
|
|
521
|
+
enumerable: !0,
|
|
522
|
+
writable: !0,
|
|
523
|
+
value: enumerable[key]
|
|
524
|
+
});
|
|
525
|
+
return result;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// node_modules/@sinclair/typebox/build/type/types/schema.mjs
|
|
529
|
+
function IsKind(value, kind) {
|
|
530
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.IsEqual(value["~kind"], kind);
|
|
531
|
+
}
|
|
532
|
+
function IsSchema(value) {
|
|
533
|
+
return guard_exports.IsObject(value);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// node_modules/@sinclair/typebox/build/type/types/_immutable.mjs
|
|
537
|
+
function ImmutableAdd(type) {
|
|
538
|
+
return memory_exports.Update(type, { "~immutable": !0 }, {});
|
|
539
|
+
}
|
|
540
|
+
function Immutable(type) {
|
|
541
|
+
return ImmutableAdd(type);
|
|
542
|
+
}
|
|
543
|
+
function IsImmutable(value) {
|
|
544
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "~immutable");
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// node_modules/@sinclair/typebox/build/type/types/_optional.mjs
|
|
548
|
+
function OptionalRemove(type) {
|
|
549
|
+
return memory_exports.Discard(type, ["~optional"]);
|
|
550
|
+
}
|
|
551
|
+
function OptionalAdd(type) {
|
|
552
|
+
return memory_exports.Update(type, { "~optional": !0 }, {});
|
|
553
|
+
}
|
|
554
|
+
function Optional(type) {
|
|
555
|
+
return OptionalAdd(type);
|
|
556
|
+
}
|
|
557
|
+
function IsOptional(value) {
|
|
558
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "~optional");
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// node_modules/@sinclair/typebox/build/type/types/_readonly.mjs
|
|
562
|
+
function ReadonlyRemove(type) {
|
|
563
|
+
return memory_exports.Discard(type, ["~readonly"]);
|
|
564
|
+
}
|
|
565
|
+
function ReadonlyAdd(type) {
|
|
566
|
+
return memory_exports.Update(type, { "~readonly": !0 }, {});
|
|
567
|
+
}
|
|
568
|
+
function Readonly(type) {
|
|
569
|
+
return ReadonlyAdd(type);
|
|
570
|
+
}
|
|
571
|
+
function IsReadonly(value) {
|
|
572
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "~readonly");
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// node_modules/@sinclair/typebox/build/type/types/base.mjs
|
|
576
|
+
function BaseProperty(value) {
|
|
577
|
+
return {
|
|
578
|
+
enumerable: settings_exports.Get().enumerableKind,
|
|
579
|
+
writable: !1,
|
|
580
|
+
configurable: !1,
|
|
581
|
+
value
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
var Base = class {
|
|
585
|
+
constructor() {
|
|
586
|
+
globalThis.Object.defineProperty(this, "~kind", BaseProperty("Base")), globalThis.Object.defineProperty(this, "~guard", BaseProperty({
|
|
587
|
+
check: (value) => this.Check(value),
|
|
588
|
+
errors: (value) => this.Errors(value)
|
|
589
|
+
}));
|
|
590
|
+
}
|
|
591
|
+
/** Checks a value or returns false if invalid */
|
|
592
|
+
Check(_value) {
|
|
593
|
+
return !0;
|
|
594
|
+
}
|
|
595
|
+
/** Returns errors for a value. Return an empty array if valid. */
|
|
596
|
+
Errors(_value) {
|
|
597
|
+
return [];
|
|
598
|
+
}
|
|
599
|
+
/** Converts a value into this type */
|
|
600
|
+
Convert(value) {
|
|
601
|
+
return value;
|
|
602
|
+
}
|
|
603
|
+
/** Cleans a value according to this type */
|
|
604
|
+
Clean(value) {
|
|
605
|
+
return value;
|
|
606
|
+
}
|
|
607
|
+
/** Returns a default value for this type */
|
|
608
|
+
Default(value) {
|
|
609
|
+
return value;
|
|
610
|
+
}
|
|
611
|
+
/** Creates a new instance of this type */
|
|
612
|
+
Create() {
|
|
613
|
+
throw new Error("Create not implemented");
|
|
614
|
+
}
|
|
615
|
+
/** Clones this type */
|
|
616
|
+
Clone() {
|
|
617
|
+
throw Error("Clone not implemented");
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
function IsBase(value) {
|
|
621
|
+
return IsKind(value, "Base");
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// node_modules/@sinclair/typebox/build/type/types/array.mjs
|
|
625
|
+
function _Array_(items, options) {
|
|
626
|
+
return memory_exports.Create({ "~kind": "Array" }, { type: "array", items }, options);
|
|
627
|
+
}
|
|
628
|
+
function IsArray2(value) {
|
|
629
|
+
return IsKind(value, "Array");
|
|
630
|
+
}
|
|
631
|
+
function ArrayOptions(type) {
|
|
632
|
+
return memory_exports.Discard(type, ["~kind", "type", "items"]);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// node_modules/@sinclair/typebox/build/type/types/async_iterator.mjs
|
|
636
|
+
function AsyncIterator(iteratorItems, options) {
|
|
637
|
+
return memory_exports.Create({ "~kind": "AsyncIterator" }, { type: "asyncIterator", iteratorItems }, options);
|
|
638
|
+
}
|
|
639
|
+
function IsAsyncIterator2(value) {
|
|
640
|
+
return IsKind(value, "AsyncIterator");
|
|
641
|
+
}
|
|
642
|
+
function AsyncIteratorOptions(type) {
|
|
643
|
+
return memory_exports.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// node_modules/@sinclair/typebox/build/type/types/constructor.mjs
|
|
647
|
+
function Constructor(parameters, instanceType, options = {}) {
|
|
648
|
+
return memory_exports.Create({ "~kind": "Constructor" }, { type: "constructor", parameters, instanceType }, options);
|
|
649
|
+
}
|
|
650
|
+
function IsConstructor2(value) {
|
|
651
|
+
return IsKind(value, "Constructor");
|
|
652
|
+
}
|
|
653
|
+
function ConstructorOptions(type) {
|
|
654
|
+
return memory_exports.Discard(type, ["~kind", "type", "parameters", "instanceType"]);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// node_modules/@sinclair/typebox/build/type/types/deferred.mjs
|
|
658
|
+
function Deferred(action, parameters, options) {
|
|
659
|
+
return memory_exports.Create({ "~kind": "Deferred" }, { action, parameters, options }, {});
|
|
660
|
+
}
|
|
661
|
+
function IsDeferred(value) {
|
|
662
|
+
return IsKind(value, "Deferred");
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
// node_modules/@sinclair/typebox/build/type/types/function.mjs
|
|
666
|
+
function _Function_(parameters, returnType, options = {}) {
|
|
667
|
+
return memory_exports.Create({ "~kind": "Function" }, { type: "function", parameters, returnType }, options);
|
|
668
|
+
}
|
|
669
|
+
function IsFunction2(value) {
|
|
670
|
+
return IsKind(value, "Function");
|
|
671
|
+
}
|
|
672
|
+
function FunctionOptions(type) {
|
|
673
|
+
return memory_exports.Discard(type, ["~kind", "type", "parameters", "returnType"]);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// node_modules/@sinclair/typebox/build/type/types/ref.mjs
|
|
677
|
+
function Ref(ref, options) {
|
|
678
|
+
return memory_exports.Create({ "~kind": "Ref" }, { $ref: ref }, options);
|
|
679
|
+
}
|
|
680
|
+
function IsRef(value) {
|
|
681
|
+
return IsKind(value, "Ref");
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// node_modules/@sinclair/typebox/build/type/types/generic.mjs
|
|
685
|
+
function Generic(parameters, expression) {
|
|
686
|
+
return memory_exports.Create({ "~kind": "Generic" }, { type: "generic", parameters, expression });
|
|
687
|
+
}
|
|
688
|
+
function IsGeneric(value) {
|
|
689
|
+
return IsKind(value, "Generic");
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// node_modules/@sinclair/typebox/build/type/types/any.mjs
|
|
693
|
+
function Any(options) {
|
|
694
|
+
return memory_exports.Create({ "~kind": "Any" }, {}, options);
|
|
695
|
+
}
|
|
696
|
+
function IsAny(value) {
|
|
697
|
+
return IsKind(value, "Any");
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// node_modules/@sinclair/typebox/build/type/types/never.mjs
|
|
701
|
+
var NeverPattern = "(?!)";
|
|
702
|
+
function Never(options) {
|
|
703
|
+
return memory_exports.Create({ "~kind": "Never" }, { not: {} }, options);
|
|
704
|
+
}
|
|
705
|
+
function IsNever(value) {
|
|
706
|
+
return IsKind(value, "Never");
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// node_modules/@sinclair/typebox/build/type/types/properties.mjs
|
|
710
|
+
function RequiredArray(properties) {
|
|
711
|
+
return guard_exports.Keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
712
|
+
}
|
|
713
|
+
function PropertyKeys(properties) {
|
|
714
|
+
return guard_exports.Keys(properties);
|
|
715
|
+
}
|
|
716
|
+
function PropertyValues(properties) {
|
|
717
|
+
return guard_exports.Values(properties);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// node_modules/@sinclair/typebox/build/type/types/object.mjs
|
|
721
|
+
function _Object_(properties, options = {}) {
|
|
722
|
+
let requiredKeys = RequiredArray(properties), required = requiredKeys.length > 0 ? { required: requiredKeys } : {};
|
|
723
|
+
return memory_exports.Create({ "~kind": "Object" }, { type: "object", ...required, properties }, options);
|
|
724
|
+
}
|
|
725
|
+
function IsObject2(value) {
|
|
726
|
+
return IsKind(value, "Object");
|
|
727
|
+
}
|
|
728
|
+
function ObjectOptions(type) {
|
|
729
|
+
return memory_exports.Discard(type, ["~kind", "type", "properties", "required"]);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
// node_modules/@sinclair/typebox/build/type/types/union.mjs
|
|
733
|
+
function Union(anyOf, options = {}) {
|
|
734
|
+
return memory_exports.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
735
|
+
}
|
|
736
|
+
function IsUnion(value) {
|
|
737
|
+
return IsKind(value, "Union");
|
|
738
|
+
}
|
|
739
|
+
function UnionOptions(type) {
|
|
740
|
+
return memory_exports.Discard(type, ["~kind", "anyOf"]);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
// node_modules/@sinclair/typebox/build/type/types/unknown.mjs
|
|
744
|
+
function Unknown(options) {
|
|
745
|
+
return memory_exports.Create({ "~kind": "Unknown" }, {}, options);
|
|
746
|
+
}
|
|
747
|
+
function IsUnknown(value) {
|
|
748
|
+
return IsKind(value, "Unknown");
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// node_modules/@sinclair/typebox/build/type/types/cyclic.mjs
|
|
752
|
+
function Cyclic($defs, $ref, options) {
|
|
753
|
+
let defs = guard_exports.Keys($defs).reduce((result, key) => ({ ...result, [key]: memory_exports.Update($defs[key], {}, { $id: key }) }), {});
|
|
754
|
+
return memory_exports.Create({ "~kind": "Cyclic" }, { $defs: defs, $ref }, options);
|
|
755
|
+
}
|
|
756
|
+
function IsCyclic(value) {
|
|
757
|
+
return IsKind(value, "Cyclic");
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
// node_modules/@sinclair/typebox/build/type/types/unsafe.mjs
|
|
761
|
+
function Unsafe(schema) {
|
|
762
|
+
return memory_exports.Update(schema, { "~unsafe": null }, {});
|
|
763
|
+
}
|
|
764
|
+
function IsUnsafe(value) {
|
|
765
|
+
return guard_exports.IsObjectNotArray(value) && guard_exports.HasPropertyKey(value, "~unsafe") && guard_exports.IsNull(value["~unsafe"]);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// node_modules/@sinclair/typebox/build/system/arguments/arguments.mjs
|
|
769
|
+
var arguments_exports = {};
|
|
770
|
+
__export(arguments_exports, {
|
|
771
|
+
Match: () => Match
|
|
772
|
+
});
|
|
773
|
+
function Match(args, match) {
|
|
774
|
+
return match[args.length]?.(...args) ?? (() => {
|
|
775
|
+
throw Error("Invalid Arguments");
|
|
776
|
+
})();
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// node_modules/@sinclair/typebox/build/type/types/infer.mjs
|
|
780
|
+
function Infer(...args) {
|
|
781
|
+
let [name, extends_] = arguments_exports.Match(args, {
|
|
782
|
+
2: (name2, extends_2) => [name2, extends_2, extends_2],
|
|
783
|
+
1: (name2) => [name2, Unknown(), Unknown()]
|
|
784
|
+
});
|
|
785
|
+
return memory_exports.Create({ "~kind": "Infer" }, { type: "infer", name, extends: extends_ }, {});
|
|
786
|
+
}
|
|
787
|
+
function IsInfer(value) {
|
|
788
|
+
return IsKind(value, "Infer");
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// node_modules/@sinclair/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
|
|
792
|
+
function IsTypeScriptEnumLike(value) {
|
|
793
|
+
return guard_exports.IsObjectNotArray(value);
|
|
794
|
+
}
|
|
795
|
+
function TypeScriptEnumToEnumValues(type) {
|
|
796
|
+
return guard_exports.Keys(type).filter((key) => isNaN(key)).reduce((result, key) => [...result, type[key]], []);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// node_modules/@sinclair/typebox/build/type/types/enum.mjs
|
|
800
|
+
function Enum(value, options) {
|
|
801
|
+
let values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;
|
|
802
|
+
return memory_exports.Create({ "~kind": "Enum" }, { enum: values }, options);
|
|
803
|
+
}
|
|
804
|
+
function IsEnum(value) {
|
|
805
|
+
return IsKind(value, "Enum");
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// node_modules/@sinclair/typebox/build/type/types/intersect.mjs
|
|
809
|
+
function Intersect(types, options = {}) {
|
|
810
|
+
return memory_exports.Create({ "~kind": "Intersect" }, { allOf: types }, options);
|
|
811
|
+
}
|
|
812
|
+
function IsIntersect(value) {
|
|
813
|
+
return IsKind(value, "Intersect");
|
|
814
|
+
}
|
|
815
|
+
function IntersectOptions(type) {
|
|
816
|
+
return memory_exports.Discard(type, ["~kind", "allOf"]);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// node_modules/@sinclair/typebox/build/system/unreachable/unreachable.mjs
|
|
820
|
+
function Unreachable() {
|
|
821
|
+
throw new Error("Unreachable");
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
// node_modules/@sinclair/typebox/build/system/hashing/hash.mjs
|
|
825
|
+
var ByteMarker;
|
|
826
|
+
(function(ByteMarker2) {
|
|
827
|
+
ByteMarker2[ByteMarker2.Array = 0] = "Array", ByteMarker2[ByteMarker2.BigInt = 1] = "BigInt", ByteMarker2[ByteMarker2.Boolean = 2] = "Boolean", ByteMarker2[ByteMarker2.Date = 3] = "Date", ByteMarker2[ByteMarker2.Constructor = 4] = "Constructor", ByteMarker2[ByteMarker2.Function = 5] = "Function", ByteMarker2[ByteMarker2.Null = 6] = "Null", ByteMarker2[ByteMarker2.Number = 7] = "Number", ByteMarker2[ByteMarker2.Object = 8] = "Object", ByteMarker2[ByteMarker2.RegExp = 9] = "RegExp", ByteMarker2[ByteMarker2.String = 10] = "String", ByteMarker2[ByteMarker2.Symbol = 11] = "Symbol", ByteMarker2[ByteMarker2.TypeArray = 12] = "TypeArray", ByteMarker2[ByteMarker2.Undefined = 13] = "Undefined";
|
|
828
|
+
})(ByteMarker || (ByteMarker = {}));
|
|
829
|
+
var Accumulator = BigInt("14695981039346656037"), [Prime, Size] = [BigInt("1099511628211"), BigInt(
|
|
830
|
+
"18446744073709551616"
|
|
831
|
+
/* 2 ^ 64 */
|
|
832
|
+
)], Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i)), F64 = new Float64Array(1), F64In = new DataView(F64.buffer), F64Out = new Uint8Array(F64.buffer);
|
|
833
|
+
var encoder = new TextEncoder();
|
|
834
|
+
|
|
835
|
+
// node_modules/@sinclair/typebox/build/type/action/_optional.mjs
|
|
836
|
+
function OptionalAddAction(type) {
|
|
837
|
+
return memory_exports.Create({ "~kind": "OptionalAddAction" }, { type }, {});
|
|
838
|
+
}
|
|
839
|
+
function IsOptionalAddAction(value) {
|
|
840
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "type") && guard_exports.IsEqual(value["~kind"], "OptionalAddAction") && IsSchema(value.type);
|
|
841
|
+
}
|
|
842
|
+
function OptionalRemoveAction(type) {
|
|
843
|
+
return memory_exports.Create({ "~kind": "OptionalRemoveAction" }, { type }, {});
|
|
844
|
+
}
|
|
845
|
+
function IsOptionalRemoveAction(value) {
|
|
846
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "type") && guard_exports.IsEqual(value["~kind"], "OptionalRemoveAction") && IsSchema(value.type);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// node_modules/@sinclair/typebox/build/type/action/_readonly.mjs
|
|
850
|
+
function ReadonlyAddAction(type) {
|
|
851
|
+
return memory_exports.Create({ "~kind": "ReadonlyAddAction" }, { type }, {});
|
|
852
|
+
}
|
|
853
|
+
function IsReadonlyAddAction(value) {
|
|
854
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "type") && guard_exports.IsEqual(value["~kind"], "ReadonlyAddAction") && IsSchema(value.type);
|
|
855
|
+
}
|
|
856
|
+
function ReadonlyRemoveAction(type) {
|
|
857
|
+
return memory_exports.Create({ "~kind": "ReadonlyRemoveAction" }, { type }, {});
|
|
858
|
+
}
|
|
859
|
+
function IsReadonlyRemoveAction(value) {
|
|
860
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "type") && guard_exports.IsEqual(value["~kind"], "ReadonlyRemoveAction") && IsSchema(value.type);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// node_modules/@sinclair/typebox/build/type/types/promise.mjs
|
|
864
|
+
function _Promise_(item, options) {
|
|
865
|
+
return memory_exports.Create({ "~kind": "Promise" }, { type: "promise", item }, options);
|
|
866
|
+
}
|
|
867
|
+
function IsPromise(value) {
|
|
868
|
+
return IsKind(value, "Promise");
|
|
869
|
+
}
|
|
870
|
+
function PromiseOptions(type) {
|
|
871
|
+
return memory_exports.Discard(type, ["~kind", "type", "item"]);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// node_modules/@sinclair/typebox/build/type/engine/awaited/instantiate.mjs
|
|
875
|
+
function AwaitedOperation(type) {
|
|
876
|
+
return IsPromise(type) ? AwaitedOperation(type.item) : type;
|
|
877
|
+
}
|
|
878
|
+
function AwaitedAction(type, options) {
|
|
879
|
+
return CanInstantiate([type]) ? memory_exports.Update(AwaitedOperation(type), {}, options) : AwaitedDeferred(type, options);
|
|
880
|
+
}
|
|
881
|
+
function AwaitedInstantiate(context, state, type, options) {
|
|
882
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
883
|
+
return AwaitedAction(instantiatedType, options);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// node_modules/@sinclair/typebox/build/type/action/awaited.mjs
|
|
887
|
+
function AwaitedDeferred(type, options = {}) {
|
|
888
|
+
return Deferred("Awaited", [type], options);
|
|
889
|
+
}
|
|
890
|
+
function Awaited(type, options = {}) {
|
|
891
|
+
return AwaitedAction(type, options);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
// node_modules/@sinclair/typebox/build/type/types/literal.mjs
|
|
895
|
+
var InvalidLiteralValue = class extends Error {
|
|
896
|
+
constructor(value) {
|
|
897
|
+
super("Invalid Literal value"), Object.defineProperty(this, "cause", {
|
|
898
|
+
value: { value },
|
|
899
|
+
writable: !1,
|
|
900
|
+
configurable: !1,
|
|
901
|
+
enumerable: !1
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
function LiteralTypeName(value) {
|
|
906
|
+
return guard_exports.IsBigInt(value) ? "bigint" : guard_exports.IsBoolean(value) ? "boolean" : guard_exports.IsNumber(value) ? "number" : guard_exports.IsString(value) ? "string" : (() => {
|
|
907
|
+
throw new InvalidLiteralValue(value);
|
|
908
|
+
})();
|
|
909
|
+
}
|
|
910
|
+
function Literal(value, options) {
|
|
911
|
+
return memory_exports.Create({ "~kind": "Literal" }, { type: LiteralTypeName(value), const: value }, options);
|
|
912
|
+
}
|
|
913
|
+
function IsLiteralValue(value) {
|
|
914
|
+
return guard_exports.IsBigInt(value) || guard_exports.IsBoolean(value) || guard_exports.IsNumber(value) || guard_exports.IsString(value);
|
|
915
|
+
}
|
|
916
|
+
function IsLiteralNumber(value) {
|
|
917
|
+
return IsLiteral(value) && guard_exports.IsNumber(value.const);
|
|
918
|
+
}
|
|
919
|
+
function IsLiteralString(value) {
|
|
920
|
+
return IsLiteral(value) && guard_exports.IsString(value.const);
|
|
921
|
+
}
|
|
922
|
+
function IsLiteral(value) {
|
|
923
|
+
return IsKind(value, "Literal");
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/mapping.mjs
|
|
927
|
+
function ApplyMapping(mapping, value) {
|
|
928
|
+
return mapping(value);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/from_literal.mjs
|
|
932
|
+
function FromLiteral(mapping, value) {
|
|
933
|
+
return guard_exports.IsString(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// node_modules/@sinclair/typebox/build/type/types/string.mjs
|
|
937
|
+
var StringPattern = ".*";
|
|
938
|
+
function String2(options) {
|
|
939
|
+
return memory_exports.Create({ "~kind": "String" }, { type: "string" }, options);
|
|
940
|
+
}
|
|
941
|
+
function IsString2(value) {
|
|
942
|
+
return IsKind(value, "String");
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// node_modules/@sinclair/typebox/build/type/engine/patterns/pattern.mjs
|
|
946
|
+
function ParsePatternIntoTypes(pattern) {
|
|
947
|
+
let parsed = Pattern(pattern);
|
|
948
|
+
return guard_exports.IsEqual(parsed.length, 2) ? parsed[0] : [];
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// node_modules/@sinclair/typebox/build/type/engine/template_literal/is_finite.mjs
|
|
952
|
+
function FromLiteral2(_value) {
|
|
953
|
+
return !0;
|
|
954
|
+
}
|
|
955
|
+
function FromTypesReduce(types) {
|
|
956
|
+
return guard_exports.TakeLeft(types, (left, right) => FromType(left) ? FromTypesReduce(right) : !1, () => !0);
|
|
957
|
+
}
|
|
958
|
+
function FromTypes(types) {
|
|
959
|
+
return guard_exports.IsEqual(types.length, 0) ? !1 : FromTypesReduce(types);
|
|
960
|
+
}
|
|
961
|
+
function FromType(type) {
|
|
962
|
+
return IsUnion(type) ? FromTypes(type.anyOf) : IsLiteral(type) ? FromLiteral2(type.const) : !1;
|
|
963
|
+
}
|
|
964
|
+
function IsTemplateLiteralFinite(types) {
|
|
965
|
+
return FromTypes(types);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
// node_modules/@sinclair/typebox/build/type/engine/template_literal/create.mjs
|
|
969
|
+
function TemplateLiteralCreate(pattern) {
|
|
970
|
+
return memory_exports.Create({ "~kind": "TemplateLiteral" }, { type: "string", pattern }, {});
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// node_modules/@sinclair/typebox/build/type/engine/template_literal/decode.mjs
|
|
974
|
+
function FromLiteralPush(variants, value, result = []) {
|
|
975
|
+
return guard_exports.TakeLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);
|
|
976
|
+
}
|
|
977
|
+
function FromLiteral3(variants, value) {
|
|
978
|
+
return guard_exports.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value);
|
|
979
|
+
}
|
|
980
|
+
function FromUnion(variants, types, result = []) {
|
|
981
|
+
return guard_exports.TakeLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType2(variants, left)]), () => result);
|
|
982
|
+
}
|
|
983
|
+
function FromType2(variants, type) {
|
|
984
|
+
return IsUnion(type) ? FromUnion(variants, type.anyOf) : IsLiteral(type) ? FromLiteral3(variants, type.const) : Unreachable();
|
|
985
|
+
}
|
|
986
|
+
function DecodeFromSpan(variants, types) {
|
|
987
|
+
return guard_exports.TakeLeft(types, (left, right) => DecodeFromSpan(FromType2(variants, left), right), () => variants);
|
|
988
|
+
}
|
|
989
|
+
function VariantsToLiterals(variants) {
|
|
990
|
+
return variants.map((variant) => Literal(variant));
|
|
991
|
+
}
|
|
992
|
+
function DecodeTypesAsUnion(types) {
|
|
993
|
+
let variants = DecodeFromSpan([], types), literals = VariantsToLiterals(variants);
|
|
994
|
+
return Union(literals);
|
|
995
|
+
}
|
|
996
|
+
function DecodeTypes(types) {
|
|
997
|
+
return guard_exports.IsEqual(types.length, 0) ? Unreachable() : (
|
|
998
|
+
// Literal('') :
|
|
999
|
+
guard_exports.IsEqual(types.length, 1) && IsLiteral(types[0]) ? types[0] : DecodeTypesAsUnion(types)
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
function TemplateLiteralDecodeUnsafe(pattern) {
|
|
1003
|
+
let types = ParsePatternIntoTypes(pattern);
|
|
1004
|
+
return guard_exports.IsEqual(types.length, 0) ? String2() : IsTemplateLiteralFinite(types) ? DecodeTypes(types) : TemplateLiteralCreate(pattern);
|
|
1005
|
+
}
|
|
1006
|
+
function TemplateLiteralDecode(pattern) {
|
|
1007
|
+
let decoded = TemplateLiteralDecodeUnsafe(pattern);
|
|
1008
|
+
return IsTemplateLiteral(decoded) ? String2() : decoded;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/from_template_literal.mjs
|
|
1012
|
+
function FromTemplateLiteral(mapping, pattern) {
|
|
1013
|
+
let decoded = TemplateLiteralDecode(pattern);
|
|
1014
|
+
return FromType3(mapping, decoded);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/from_union.mjs
|
|
1018
|
+
function FromUnion2(mapping, types) {
|
|
1019
|
+
let result = types.map((type) => FromType3(mapping, type));
|
|
1020
|
+
return Union(result);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/from_type.mjs
|
|
1024
|
+
function FromType3(mapping, type) {
|
|
1025
|
+
return IsLiteral(type) ? FromLiteral(mapping, type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) : IsUnion(type) ? FromUnion2(mapping, type.anyOf) : type;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
// node_modules/@sinclair/typebox/build/type/action/lowercase.mjs
|
|
1029
|
+
function LowercaseDeferred(type, options = {}) {
|
|
1030
|
+
return Deferred("Lowercase", [type], options);
|
|
1031
|
+
}
|
|
1032
|
+
function Lowercase(type, options = {}) {
|
|
1033
|
+
return LowercaseAction(type, options);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
// node_modules/@sinclair/typebox/build/type/action/uncapitalize.mjs
|
|
1037
|
+
function UncapitalizeDeferred(type, options = {}) {
|
|
1038
|
+
return Deferred("Uncapitalize", [type], options);
|
|
1039
|
+
}
|
|
1040
|
+
function Uncapitalize(type, options = {}) {
|
|
1041
|
+
return UncapitalizeAction(type, options);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
// node_modules/@sinclair/typebox/build/type/action/uppercase.mjs
|
|
1045
|
+
function UppercaseDeferred(type, options = {}) {
|
|
1046
|
+
return Deferred("Uppercase", [type], options);
|
|
1047
|
+
}
|
|
1048
|
+
function Uppercase(type, options = {}) {
|
|
1049
|
+
return UppercaseAction(type, options);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
// node_modules/@sinclair/typebox/build/type/engine/intrinsics/instantiate.mjs
|
|
1053
|
+
var CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1), LowercaseMapping = (input) => input.toLowerCase(), UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1), UppercaseMapping = (input) => input.toUpperCase();
|
|
1054
|
+
function CapitalizeAction(type, options) {
|
|
1055
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType3(CapitalizeMapping, type), {}, options) : CapitalizeDeferred(type, options);
|
|
1056
|
+
}
|
|
1057
|
+
function LowercaseAction(type, options) {
|
|
1058
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType3(LowercaseMapping, type), {}, options) : LowercaseDeferred(type, options);
|
|
1059
|
+
}
|
|
1060
|
+
function UncapitalizeAction(type, options) {
|
|
1061
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType3(UncapitalizeMapping, type), {}, options) : UncapitalizeDeferred(type, options);
|
|
1062
|
+
}
|
|
1063
|
+
function UppercaseAction(type, options) {
|
|
1064
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType3(UppercaseMapping, type), {}, options) : UppercaseDeferred(type, options);
|
|
1065
|
+
}
|
|
1066
|
+
function CapitalizeInstantiate(context, state, type, options) {
|
|
1067
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1068
|
+
return CapitalizeAction(instantiatedType, options);
|
|
1069
|
+
}
|
|
1070
|
+
function LowercaseInstantiate(context, state, type, options) {
|
|
1071
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1072
|
+
return LowercaseAction(instantiatedType, options);
|
|
1073
|
+
}
|
|
1074
|
+
function UncapitalizeInstantiate(context, state, type, options) {
|
|
1075
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1076
|
+
return UncapitalizeAction(instantiatedType, options);
|
|
1077
|
+
}
|
|
1078
|
+
function UppercaseInstantiate(context, state, type, options) {
|
|
1079
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1080
|
+
return UppercaseAction(instantiatedType, options);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
// node_modules/@sinclair/typebox/build/type/action/capitalize.mjs
|
|
1084
|
+
function CapitalizeDeferred(type, options = {}) {
|
|
1085
|
+
return Deferred("Capitalize", [type], options);
|
|
1086
|
+
}
|
|
1087
|
+
function Capitalize(type, options = {}) {
|
|
1088
|
+
return CapitalizeAction(type, options);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
// node_modules/@sinclair/typebox/build/type/engine/conditional/instantiate.mjs
|
|
1092
|
+
function ConditionalOperation(context, state, left, right, true_, false_) {
|
|
1093
|
+
let extendsResult = Extends(context, left, right);
|
|
1094
|
+
return result_exports.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) : result_exports.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) : InstantiateType(context, state, false_);
|
|
1095
|
+
}
|
|
1096
|
+
function ConditionalAction(context, state, left, right, true_, false_, options) {
|
|
1097
|
+
return CanInstantiate([left, right]) ? memory_exports.Update(ConditionalOperation(context, state, left, right, true_, false_), {}, options) : ConditionalDeferred(left, right, true_, false_, options);
|
|
1098
|
+
}
|
|
1099
|
+
function ConditionalInstantiate(context, state, left, right, true_, false_, options) {
|
|
1100
|
+
let instantiatedLeft = InstantiateType(context, state, left), instantiatedRight = InstantiateType(context, state, right);
|
|
1101
|
+
return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
// node_modules/@sinclair/typebox/build/type/action/conditional.mjs
|
|
1105
|
+
function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
1106
|
+
return Deferred("Conditional", [left, right, true_, false_], options);
|
|
1107
|
+
}
|
|
1108
|
+
function Conditional(left, right, true_, false_, options = {}) {
|
|
1109
|
+
return ConditionalAction({}, { callstack: [] }, left, right, true_, false_, options);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
// node_modules/@sinclair/typebox/build/type/types/tuple.mjs
|
|
1113
|
+
function Tuple(types, options = {}) {
|
|
1114
|
+
let [items, minItems, additionalItems] = [types, types.length, !1];
|
|
1115
|
+
return memory_exports.Create({ "~kind": "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
1116
|
+
}
|
|
1117
|
+
function IsTuple(value) {
|
|
1118
|
+
return IsKind(value, "Tuple");
|
|
1119
|
+
}
|
|
1120
|
+
function TupleOptions(type) {
|
|
1121
|
+
return memory_exports.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
// node_modules/@sinclair/typebox/build/type/engine/constructor_parameters/instantiate.mjs
|
|
1125
|
+
function ConstructorParametersOperation(type) {
|
|
1126
|
+
let parameters = IsConstructor2(type) ? type.parameters : [], instantiatedParameters = InstantiateElements({}, { callstack: [] }, parameters);
|
|
1127
|
+
return Tuple(instantiatedParameters);
|
|
1128
|
+
}
|
|
1129
|
+
function ConstructorParametersAction(type, options) {
|
|
1130
|
+
return CanInstantiate([type]) ? memory_exports.Update(ConstructorParametersOperation(type), {}, options) : ConstructorParametersDeferred(type, options);
|
|
1131
|
+
}
|
|
1132
|
+
function ConstructorParametersInstantiate(context, state, type, options) {
|
|
1133
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1134
|
+
return ConstructorParametersAction(instantiatedType, options);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
// node_modules/@sinclair/typebox/build/type/action/constructor_parameters.mjs
|
|
1138
|
+
function ConstructorParametersDeferred(type, options = {}) {
|
|
1139
|
+
return Deferred("ConstructorParameters", [type], options);
|
|
1140
|
+
}
|
|
1141
|
+
function ConstructorParameters(type, options = {}) {
|
|
1142
|
+
return ConstructorParametersAction(type, options);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
// node_modules/@sinclair/typebox/build/type/engine/tuple/to_object.mjs
|
|
1146
|
+
function TupleElementsToProperties(types) {
|
|
1147
|
+
return types.reduceRight((result2, right, index) => ({ [index]: right, ...result2 }), {});
|
|
1148
|
+
}
|
|
1149
|
+
function TupleToObject(type) {
|
|
1150
|
+
let properties = TupleElementsToProperties(type.items);
|
|
1151
|
+
return _Object_(properties);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/composite.mjs
|
|
1155
|
+
function IsReadonlyProperty(left, right) {
|
|
1156
|
+
return IsReadonly(left) ? !!IsReadonly(right) : !1;
|
|
1157
|
+
}
|
|
1158
|
+
function IsOptionalProperty(left, right) {
|
|
1159
|
+
return IsOptional(left) ? !!IsOptional(right) : !1;
|
|
1160
|
+
}
|
|
1161
|
+
function CompositeProperty(left, right) {
|
|
1162
|
+
let isReadonly = IsReadonlyProperty(left, right), isOptional = IsOptionalProperty(left, right), evaluated = EvaluateIntersect([left, right]), property = ReadonlyRemove(OptionalRemove(evaluated));
|
|
1163
|
+
return isReadonly && isOptional ? ReadonlyAdd(OptionalAdd(property)) : isReadonly && !isOptional ? ReadonlyAdd(property) : !isReadonly && isOptional ? OptionalAdd(property) : property;
|
|
1164
|
+
}
|
|
1165
|
+
function CompositePropertyKey(left, right, key) {
|
|
1166
|
+
return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : key in right ? right[key] : Never();
|
|
1167
|
+
}
|
|
1168
|
+
function CompositeProperties(left, right) {
|
|
1169
|
+
return [.../* @__PURE__ */ new Set([...guard_exports.Keys(right), ...guard_exports.Keys(left)])].reduce((result, key) => ({ ...result, [key]: CompositePropertyKey(left, right, key) }), {});
|
|
1170
|
+
}
|
|
1171
|
+
function GetProperties(type) {
|
|
1172
|
+
return IsObject2(type) ? type.properties : IsTuple(type) ? TupleElementsToProperties(type.items) : Unreachable();
|
|
1173
|
+
}
|
|
1174
|
+
function Composite(left, right) {
|
|
1175
|
+
let leftProperties = GetProperties(left), rightProperties = GetProperties(right), properties = CompositeProperties(leftProperties, rightProperties);
|
|
1176
|
+
return _Object_(properties);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/narrow.mjs
|
|
1180
|
+
function Narrow(left, right) {
|
|
1181
|
+
let result = Compare(left, right);
|
|
1182
|
+
return guard_exports.IsEqual(result, ResultLeftInside) ? left : guard_exports.IsEqual(result, ResultRightInside) || guard_exports.IsEqual(result, ResultEqual) ? right : Never();
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/distribute.mjs
|
|
1186
|
+
function IsObjectLike(type) {
|
|
1187
|
+
return IsObject2(type) || IsTuple(type);
|
|
1188
|
+
}
|
|
1189
|
+
function IsUnionOperand(left, right) {
|
|
1190
|
+
let isUnionLeft = IsUnion(left), isUnionRight = IsUnion(right);
|
|
1191
|
+
return isUnionLeft || isUnionRight;
|
|
1192
|
+
}
|
|
1193
|
+
function DistributeOperation(left, right) {
|
|
1194
|
+
let evaluatedLeft = EvaluateType(left), evaluatedRight = EvaluateType(right), isUnionOperand = IsUnionOperand(evaluatedLeft, evaluatedRight), isObjectLeft = IsObjectLike(evaluatedLeft), IsObjectRight = IsObjectLike(evaluatedRight);
|
|
1195
|
+
return isUnionOperand ? EvaluateIntersect([evaluatedLeft, evaluatedRight]) : isObjectLeft && IsObjectRight ? Composite(evaluatedLeft, evaluatedRight) : isObjectLeft && !IsObjectRight ? evaluatedLeft : !isObjectLeft && IsObjectRight ? evaluatedRight : Narrow(evaluatedLeft, evaluatedRight);
|
|
1196
|
+
}
|
|
1197
|
+
function DistributeType(type, types, result = []) {
|
|
1198
|
+
return guard_exports.TakeLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(type, left)]), () => guard_exports.IsEqual(result.length, 0) ? [type] : result);
|
|
1199
|
+
}
|
|
1200
|
+
function DistributeUnion(types, distribution, result = []) {
|
|
1201
|
+
return guard_exports.TakeLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);
|
|
1202
|
+
}
|
|
1203
|
+
function Distribute(types, result = []) {
|
|
1204
|
+
return guard_exports.TakeLeft(types, (left, right) => IsUnion(left) ? Distribute(right, DistributeUnion(left.anyOf, result)) : Distribute(right, DistributeType(left, result)), () => result);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/evaluate.mjs
|
|
1208
|
+
function EvaluateIntersect(types) {
|
|
1209
|
+
let distribution = Distribute(types);
|
|
1210
|
+
return Broaden(distribution);
|
|
1211
|
+
}
|
|
1212
|
+
function EvaluateUnion(types) {
|
|
1213
|
+
return Broaden(types);
|
|
1214
|
+
}
|
|
1215
|
+
function EvaluateType(type) {
|
|
1216
|
+
return IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
1217
|
+
}
|
|
1218
|
+
function EvaluateUnionFast(types) {
|
|
1219
|
+
return guard_exports.IsEqual(types.length, 1) ? types[0] : guard_exports.IsEqual(types.length, 0) ? Never() : Union(types);
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/instantiate.mjs
|
|
1223
|
+
function EvaluateAction(type, options) {
|
|
1224
|
+
return memory_exports.Update(EvaluateType(type), {}, options);
|
|
1225
|
+
}
|
|
1226
|
+
function EvaluateInstantiate(context, state, type, options) {
|
|
1227
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1228
|
+
return EvaluateAction(instantiatedType, options);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
// node_modules/@sinclair/typebox/build/type/action/evaluate.mjs
|
|
1232
|
+
function EvaluateDeferred(type, options = {}) {
|
|
1233
|
+
return Deferred("Evaluate", [type], options);
|
|
1234
|
+
}
|
|
1235
|
+
function Evaluate(type, options = {}) {
|
|
1236
|
+
return EvaluateAction(type, options);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
// node_modules/@sinclair/typebox/build/type/types/null.mjs
|
|
1240
|
+
function Null(options) {
|
|
1241
|
+
return memory_exports.Create({ "~kind": "Null" }, { type: "null" }, options);
|
|
1242
|
+
}
|
|
1243
|
+
function IsNull2(value) {
|
|
1244
|
+
return IsKind(value, "Null");
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
// node_modules/@sinclair/typebox/build/type/engine/enum/enum_to_union.mjs
|
|
1248
|
+
function FromEnumValue(value) {
|
|
1249
|
+
return guard_exports.IsString(value) || guard_exports.IsNumber(value) ? Literal(value) : guard_exports.IsNull(value) ? Null() : Never();
|
|
1250
|
+
}
|
|
1251
|
+
function EnumValuesToVariants(values) {
|
|
1252
|
+
return values.map((value) => FromEnumValue(value));
|
|
1253
|
+
}
|
|
1254
|
+
function EnumValuesToUnion(values) {
|
|
1255
|
+
let variants = EnumValuesToVariants(values);
|
|
1256
|
+
return Union(variants);
|
|
1257
|
+
}
|
|
1258
|
+
function EnumToUnion(type) {
|
|
1259
|
+
return EnumValuesToUnion(type.enum);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
// node_modules/@sinclair/typebox/build/type/engine/exclude/operation.mjs
|
|
1263
|
+
function ExcludeUnionLeft(types, right) {
|
|
1264
|
+
return types.reduce((result, head) => [...result, ...ExcludeTypeLeft(head, right)], []);
|
|
1265
|
+
}
|
|
1266
|
+
function ExcludeTypeLeft(left, right) {
|
|
1267
|
+
let check = Extends({}, left, right);
|
|
1268
|
+
return result_exports.IsExtendsTrueLike(check) ? [] : [left];
|
|
1269
|
+
}
|
|
1270
|
+
function ExcludeOperation(left, right) {
|
|
1271
|
+
let remaining = IsEnum(left) ? ExcludeUnionLeft(EnumValuesToVariants(left.enum), right) : IsUnion(left) ? ExcludeUnionLeft(Flatten(left.anyOf), right) : ExcludeTypeLeft(left, right);
|
|
1272
|
+
return EvaluateUnion(remaining);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
// node_modules/@sinclair/typebox/build/type/engine/exclude/instantiate.mjs
|
|
1276
|
+
function ExcludeAction(left, right, options) {
|
|
1277
|
+
return CanInstantiate([left, right]) ? memory_exports.Update(ExcludeOperation(left, right), {}, options) : ExcludeDeferred(left, right, options);
|
|
1278
|
+
}
|
|
1279
|
+
function ExcludeInstantiate(context, state, left, right, options) {
|
|
1280
|
+
let instantiatedLeft = InstantiateType(context, state, left), instantiatedRight = InstantiateType(context, state, right);
|
|
1281
|
+
return ExcludeAction(instantiatedLeft, instantiatedRight, options);
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// node_modules/@sinclair/typebox/build/type/action/exclude.mjs
|
|
1285
|
+
function ExcludeDeferred(left, right, options = {}) {
|
|
1286
|
+
return Deferred("Exclude", [left, right], options);
|
|
1287
|
+
}
|
|
1288
|
+
function Exclude(left, right, options = {}) {
|
|
1289
|
+
return ExcludeAction(left, right, options);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
// node_modules/@sinclair/typebox/build/type/engine/extract/operation.mjs
|
|
1293
|
+
function ExtractUnionLeft(types, right) {
|
|
1294
|
+
return types.reduce((result, head) => [...result, ...ExtractTypeLeft(head, right)], []);
|
|
1295
|
+
}
|
|
1296
|
+
function ExtractTypeLeft(left, right) {
|
|
1297
|
+
let check = Extends({}, left, right);
|
|
1298
|
+
return result_exports.IsExtendsTrueLike(check) ? [left] : [];
|
|
1299
|
+
}
|
|
1300
|
+
function ExtractOperation(left, right) {
|
|
1301
|
+
let remaining = IsEnum(left) ? ExtractUnionLeft(EnumValuesToVariants(left.enum), right) : IsUnion(left) ? ExtractUnionLeft(Flatten(left.anyOf), right) : ExtractTypeLeft(left, right);
|
|
1302
|
+
return EvaluateUnion(remaining);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
// node_modules/@sinclair/typebox/build/type/engine/extract/instantiate.mjs
|
|
1306
|
+
function ExtractAction(left, right, options) {
|
|
1307
|
+
return CanInstantiate([left, right]) ? memory_exports.Update(ExtractOperation(left, right), {}, options) : ExtractDeferred(left, right, options);
|
|
1308
|
+
}
|
|
1309
|
+
function ExtractInstantiate(context, state, left, right, options) {
|
|
1310
|
+
let instantiatedLeft = InstantiateType(context, state, left), instantiatedRight = InstantiateType(context, state, right);
|
|
1311
|
+
return ExtractAction(instantiatedLeft, instantiatedRight, options);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
// node_modules/@sinclair/typebox/build/type/action/extract.mjs
|
|
1315
|
+
function ExtractDeferred(left, right, options = {}) {
|
|
1316
|
+
return Deferred("Extract", [left, right], options);
|
|
1317
|
+
}
|
|
1318
|
+
function Extract(left, right, options = {}) {
|
|
1319
|
+
return ExtractAction(left, right, options);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// node_modules/@sinclair/typebox/build/type/engine/helpers/keys_to_indexer.mjs
|
|
1323
|
+
function KeysToLiterals(keys) {
|
|
1324
|
+
return keys.reduce((result, left) => IsLiteralValue(left) ? [...result, Literal(left)] : result, []);
|
|
1325
|
+
}
|
|
1326
|
+
function KeysToIndexer(keys) {
|
|
1327
|
+
let literals = KeysToLiterals(keys);
|
|
1328
|
+
return Union(literals);
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/target.mjs
|
|
1332
|
+
function Resolve(defs, ref) {
|
|
1333
|
+
return ref in defs ? IsRef(defs[ref]) ? Resolve(defs, defs[ref].$ref) : defs[ref] : Never();
|
|
1334
|
+
}
|
|
1335
|
+
function CyclicTarget(defs, ref) {
|
|
1336
|
+
return Resolve(defs, ref);
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/from_cyclic.mjs
|
|
1340
|
+
function FromCyclic(defs, ref) {
|
|
1341
|
+
let target = CyclicTarget(defs, ref);
|
|
1342
|
+
return FromType4(target);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/from_intersect.mjs
|
|
1346
|
+
function CollapseIntersectProperties(left, right) {
|
|
1347
|
+
let leftKeys = guard_exports.Keys(left).filter((key) => !guard_exports.HasPropertyKey(right, key)), rightKeys = guard_exports.Keys(right).filter((key) => !guard_exports.HasPropertyKey(left, key)), sharedKeys = guard_exports.Keys(left).filter((key) => guard_exports.HasPropertyKey(right, key)), leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {}), rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {}), sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluateIntersect([left[key], right[key]]) }), {}), unique = memory_exports.Assign(leftProperties, rightProperties);
|
|
1348
|
+
return memory_exports.Assign(unique, sharedProperties);
|
|
1349
|
+
}
|
|
1350
|
+
function FromIntersect(types) {
|
|
1351
|
+
return types.reduce((result, left) => CollapseIntersectProperties(result, FromType4(left)), {});
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/from_tuple.mjs
|
|
1355
|
+
function FromTuple(types) {
|
|
1356
|
+
let object = TupleToObject(Tuple(types));
|
|
1357
|
+
return FromType4(object);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/from_union.mjs
|
|
1361
|
+
function CollapseUnionProperties(left, right) {
|
|
1362
|
+
return guard_exports.Keys(left).filter((key) => key in right).reduce((result2, key) => ({ ...result2, [key]: EvaluateUnion([left[key], right[key]]) }), {});
|
|
1363
|
+
}
|
|
1364
|
+
function ReduceVariants(types, result) {
|
|
1365
|
+
return guard_exports.TakeLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType4(left))), () => result);
|
|
1366
|
+
}
|
|
1367
|
+
function FromUnion3(types) {
|
|
1368
|
+
return guard_exports.TakeLeft(types, (left, right) => ReduceVariants(right, FromType4(left)), () => Unreachable());
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/from_type.mjs
|
|
1372
|
+
function FromType4(type) {
|
|
1373
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? type.properties : {};
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
// node_modules/@sinclair/typebox/build/type/engine/object/collapse.mjs
|
|
1377
|
+
function CollapseToObject(type) {
|
|
1378
|
+
let properties = FromType4(type);
|
|
1379
|
+
return _Object_(properties);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
// node_modules/@sinclair/typebox/build/type/types/number.mjs
|
|
1383
|
+
var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?";
|
|
1384
|
+
function Number2(options) {
|
|
1385
|
+
return memory_exports.Create({ "~kind": "Number" }, { type: "number" }, options);
|
|
1386
|
+
}
|
|
1387
|
+
function IsNumber2(value) {
|
|
1388
|
+
return IsKind(value, "Number");
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
// node_modules/@sinclair/typebox/build/type/engine/helpers/keys.mjs
|
|
1392
|
+
var integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
1393
|
+
function ConvertToIntegerKey(value) {
|
|
1394
|
+
let normal = `${value}`;
|
|
1395
|
+
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/from_array.mjs
|
|
1399
|
+
function NormalizeLiteral(value) {
|
|
1400
|
+
return Literal(ConvertToIntegerKey(value));
|
|
1401
|
+
}
|
|
1402
|
+
function NormalizeIndexerTypes(types) {
|
|
1403
|
+
return types.map((type) => NormalizeIndexer(type));
|
|
1404
|
+
}
|
|
1405
|
+
function NormalizeIndexer(type) {
|
|
1406
|
+
return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
|
|
1407
|
+
}
|
|
1408
|
+
function FromArray2(type, indexer) {
|
|
1409
|
+
let normalizedIndexer = NormalizeIndexer(indexer), check = Extends({}, normalizedIndexer, Number2());
|
|
1410
|
+
return (
|
|
1411
|
+
// indexer
|
|
1412
|
+
result_exports.IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && guard_exports.IsEqual(indexer.const, "length") ? Number2() : Never()
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
1417
|
+
function FromCyclic2(defs, ref) {
|
|
1418
|
+
let target = CyclicTarget(defs, ref);
|
|
1419
|
+
return FromType5(target);
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_union.mjs
|
|
1423
|
+
function FromUnion4(types) {
|
|
1424
|
+
return types.reduce((result, left) => [...result, ...FromType5(left)], []);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_enum.mjs
|
|
1428
|
+
function FromEnum(values) {
|
|
1429
|
+
let variants = EnumValuesToVariants(values);
|
|
1430
|
+
return FromUnion4(variants);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_intersect.mjs
|
|
1434
|
+
function FromIntersect2(types) {
|
|
1435
|
+
let evaluated = EvaluateIntersect(types);
|
|
1436
|
+
return FromType5(evaluated);
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_literal.mjs
|
|
1440
|
+
function FromLiteral4(value) {
|
|
1441
|
+
return [`${value}`];
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_template_literal.mjs
|
|
1445
|
+
function FromTemplateLiteral2(pattern) {
|
|
1446
|
+
let decoded = TemplateLiteralDecode(pattern);
|
|
1447
|
+
return FromType5(decoded);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/from_type.mjs
|
|
1451
|
+
function FromType5(type) {
|
|
1452
|
+
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/to_indexable_keys.mjs
|
|
1456
|
+
function ToIndexableKeys(type) {
|
|
1457
|
+
return FromType5(type);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
// node_modules/@sinclair/typebox/build/type/types/integer.mjs
|
|
1461
|
+
var IntegerPattern = "-?(?:0|[1-9][0-9]*)";
|
|
1462
|
+
function Integer(options) {
|
|
1463
|
+
return memory_exports.Create({ "~kind": "Integer" }, { type: "integer" }, options);
|
|
1464
|
+
}
|
|
1465
|
+
function IsInteger2(value) {
|
|
1466
|
+
return IsKind(value, "Integer");
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/record_create.mjs
|
|
1470
|
+
function CreateRecord(key, value) {
|
|
1471
|
+
let type = "object", patternProperties = { [key]: value };
|
|
1472
|
+
return memory_exports.Create({ "~kind": "Record" }, { type, patternProperties });
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
// node_modules/@sinclair/typebox/build/type/types/boolean.mjs
|
|
1476
|
+
function Boolean2(options) {
|
|
1477
|
+
return memory_exports.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
|
|
1478
|
+
}
|
|
1479
|
+
function IsBoolean2(value) {
|
|
1480
|
+
return IsKind(value, "Boolean");
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_any.mjs
|
|
1484
|
+
function FromAnyKey(value) {
|
|
1485
|
+
return CreateRecord(StringKey, value);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_boolean.mjs
|
|
1489
|
+
function FromBooleanKey(value) {
|
|
1490
|
+
return _Object_({ true: value, false: value });
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_enum.mjs
|
|
1494
|
+
function FromEnumKey(values, value) {
|
|
1495
|
+
let unionKey = EnumValuesToUnion(values);
|
|
1496
|
+
return FromKey(unionKey, value);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_integer.mjs
|
|
1500
|
+
function FromIntegerKey(_key, value) {
|
|
1501
|
+
return CreateRecord(IntegerKey, value);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_intersect.mjs
|
|
1505
|
+
function FromIntersectKey(types, value) {
|
|
1506
|
+
let evaluatedKey = EvaluateIntersect(types);
|
|
1507
|
+
return FromKey(evaluatedKey, value);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_literal.mjs
|
|
1511
|
+
function FromLiteralKey(key, value) {
|
|
1512
|
+
return guard_exports.IsString(key) || guard_exports.IsNumber(key) ? _Object_({ [key]: value }) : guard_exports.IsEqual(key, !1) ? _Object_({ false: value }) : guard_exports.IsEqual(key, !0) ? _Object_({ true: value }) : _Object_({});
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_number.mjs
|
|
1516
|
+
function FromNumberKey(_key, value) {
|
|
1517
|
+
return CreateRecord(NumberKey, value);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_string.mjs
|
|
1521
|
+
function FromStringKey(key, value) {
|
|
1522
|
+
return guard_exports.HasPropertyKey(key, "pattern") && (guard_exports.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_template_literal.mjs
|
|
1526
|
+
function FromTemplateKey(pattern, value) {
|
|
1527
|
+
let types = ParsePatternIntoTypes(pattern);
|
|
1528
|
+
return IsTemplateLiteralFinite(types) ? FromKey(TemplateLiteralDecode(pattern), value) : CreateRecord(pattern, value);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/flatten.mjs
|
|
1532
|
+
function FlattenType(type) {
|
|
1533
|
+
return IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
1534
|
+
}
|
|
1535
|
+
function Flatten(types) {
|
|
1536
|
+
return types.reduce((result, type) => [...result, ...FlattenType(type)], []);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key_union.mjs
|
|
1540
|
+
function StringOrNumberCheck(types) {
|
|
1541
|
+
return types.some((type) => IsString2(type) || IsNumber2(type) || IsInteger2(type));
|
|
1542
|
+
}
|
|
1543
|
+
function TryBuildRecord(types, value) {
|
|
1544
|
+
return guard_exports.IsEqual(StringOrNumberCheck(types), !0) ? CreateRecord(StringKey, value) : void 0;
|
|
1545
|
+
}
|
|
1546
|
+
function CreateProperties(types, value) {
|
|
1547
|
+
return types.reduce((result, left) => IsLiteral(left) && (guard_exports.IsString(left.const) || guard_exports.IsNumber(left.const)) ? { ...result, [left.const]: value } : result, {});
|
|
1548
|
+
}
|
|
1549
|
+
function CreateObject(types, value) {
|
|
1550
|
+
let properties = CreateProperties(types, value);
|
|
1551
|
+
return _Object_(properties);
|
|
1552
|
+
}
|
|
1553
|
+
function FromUnionKey(types, value) {
|
|
1554
|
+
let flattened = Flatten(types), record = TryBuildRecord(flattened, value);
|
|
1555
|
+
return IsSchema(record) ? record : CreateObject(flattened, value);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/from_key.mjs
|
|
1559
|
+
function FromKey(key, value) {
|
|
1560
|
+
return IsAny(key) ? FromAnyKey(value) : IsBoolean2(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber2(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString2(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
// node_modules/@sinclair/typebox/build/type/engine/record/instantiate.mjs
|
|
1564
|
+
function RecordAction(key, value, options) {
|
|
1565
|
+
return CanInstantiate([key]) ? memory_exports.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
|
|
1566
|
+
}
|
|
1567
|
+
function RecordInstantiate(context, state, key, value, options) {
|
|
1568
|
+
let instantiatedKey = InstantiateType(context, state, key), instantiatedValue = InstantiateType(context, state, value);
|
|
1569
|
+
return RecordAction(instantiatedKey, instantiatedValue, options);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// node_modules/@sinclair/typebox/build/type/types/record.mjs
|
|
1573
|
+
var IntegerKey = `^${IntegerPattern}$`, NumberKey = `^${NumberPattern}$`, StringKey = `^${StringPattern}$`;
|
|
1574
|
+
function RecordDeferred(key, value, options = {}) {
|
|
1575
|
+
return Deferred("Record", [key, value], options);
|
|
1576
|
+
}
|
|
1577
|
+
function Record(key, value, options = {}) {
|
|
1578
|
+
return RecordAction(key, value, options);
|
|
1579
|
+
}
|
|
1580
|
+
function RecordFromPattern(key, value) {
|
|
1581
|
+
return CreateRecord(key, value);
|
|
1582
|
+
}
|
|
1583
|
+
function RecordPattern(type) {
|
|
1584
|
+
return guard_exports.Keys(type.patternProperties)[0];
|
|
1585
|
+
}
|
|
1586
|
+
function RecordKey(type) {
|
|
1587
|
+
let pattern = RecordPattern(type);
|
|
1588
|
+
return guard_exports.IsEqual(pattern, StringKey) ? String2() : guard_exports.IsEqual(pattern, IntegerKey) ? Integer() : guard_exports.IsEqual(pattern, NumberKey) ? Number2() : TemplateLiteralDecodeUnsafe(pattern);
|
|
1589
|
+
}
|
|
1590
|
+
function RecordValue(type) {
|
|
1591
|
+
return type.patternProperties[RecordPattern(type)];
|
|
1592
|
+
}
|
|
1593
|
+
function IsRecord(value) {
|
|
1594
|
+
return IsKind(value, "Record");
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
// node_modules/@sinclair/typebox/build/type/types/iterator.mjs
|
|
1598
|
+
function Iterator(iteratorItems, options) {
|
|
1599
|
+
return memory_exports.Create({ "~kind": "Iterator" }, { type: "iterator", iteratorItems }, options);
|
|
1600
|
+
}
|
|
1601
|
+
function IsIterator2(value) {
|
|
1602
|
+
return IsKind(value, "Iterator");
|
|
1603
|
+
}
|
|
1604
|
+
function IteratorOptions(type) {
|
|
1605
|
+
return memory_exports.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// node_modules/@sinclair/typebox/build/type/types/this.mjs
|
|
1609
|
+
function This(options) {
|
|
1610
|
+
return memory_exports.Create({ "~kind": "This" }, { $ref: "#" }, options);
|
|
1611
|
+
}
|
|
1612
|
+
function IsThis(value) {
|
|
1613
|
+
return IsKind(value, "This");
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
// node_modules/@sinclair/typebox/build/type/engine/this/expand_this.mjs
|
|
1617
|
+
function FromTypes2(properties, types) {
|
|
1618
|
+
return types.map((type) => FromType6(properties, type));
|
|
1619
|
+
}
|
|
1620
|
+
function FromType6(properties, type) {
|
|
1621
|
+
return IsArray2(type) ? _Array_(FromType6(properties, type.items)) : IsAsyncIterator2(type) ? AsyncIterator(FromType6(properties, type.iteratorItems)) : IsConstructor2(type) ? Constructor(FromTypes2(properties, type.parameters), FromType6(properties, type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes2(properties, type.parameters), FromType6(properties, type.returnType)) : IsIterator2(type) ? Iterator(FromType6(properties, type.iteratorItems)) : IsPromise(type) ? _Promise_(FromType6(properties, type.item)) : IsTuple(type) ? Tuple(FromTypes2(properties, type.items)) : IsUnion(type) ? Union(FromTypes2(properties, type.anyOf)) : IsIntersect(type) ? Intersect(FromTypes2(properties, type.allOf)) : IsThis(type) ? _Object_(properties) : type;
|
|
1622
|
+
}
|
|
1623
|
+
function ExpandThis(properties, type) {
|
|
1624
|
+
return FromType6(properties, type);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/from_object.mjs
|
|
1628
|
+
function IndexProperty(properties, key) {
|
|
1629
|
+
let selectedType = key in properties ? properties[key] : Never();
|
|
1630
|
+
return ExpandThis(properties, selectedType);
|
|
1631
|
+
}
|
|
1632
|
+
function IndexProperties(properties, keys) {
|
|
1633
|
+
return keys.reduce((result, left) => [...result, IndexProperty(properties, left)], []);
|
|
1634
|
+
}
|
|
1635
|
+
function FromIndexer(properties, indexer) {
|
|
1636
|
+
let keys = ToIndexableKeys(indexer), variants = IndexProperties(properties, keys);
|
|
1637
|
+
return EvaluateUnion(variants);
|
|
1638
|
+
}
|
|
1639
|
+
var NumericKeyPattern = new RegExp(IntegerKey);
|
|
1640
|
+
function NumericKeys(keys) {
|
|
1641
|
+
return keys.filter((key) => NumericKeyPattern.test(key));
|
|
1642
|
+
}
|
|
1643
|
+
function FromIndexerNumber(properties) {
|
|
1644
|
+
let keys = PropertyKeys(properties), numericKeys = NumericKeys(keys), variants = IndexProperties(properties, numericKeys);
|
|
1645
|
+
return EvaluateUnion(variants);
|
|
1646
|
+
}
|
|
1647
|
+
function FromObject3(properties, indexer) {
|
|
1648
|
+
return IsNumber2(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/array_indexer.mjs
|
|
1652
|
+
function ConvertLiteral(value) {
|
|
1653
|
+
return Literal(ConvertToIntegerKey(value));
|
|
1654
|
+
}
|
|
1655
|
+
function ArrayIndexerTypes(types) {
|
|
1656
|
+
return types.map((type) => FormatArrayIndexer(type));
|
|
1657
|
+
}
|
|
1658
|
+
function FormatArrayIndexer(type) {
|
|
1659
|
+
return IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) : IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) : IsLiteral(type) ? ConvertLiteral(type.const) : type;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
1663
|
+
function IndexElementsWithIndexer(types, indexer) {
|
|
1664
|
+
return types.reduceRight((result, right, index) => {
|
|
1665
|
+
let check = Extends({}, Literal(index), indexer);
|
|
1666
|
+
return result_exports.IsExtendsTrueLike(check) ? [right, ...result] : result;
|
|
1667
|
+
}, []);
|
|
1668
|
+
}
|
|
1669
|
+
function FromTupleWithIndexer(types, indexer) {
|
|
1670
|
+
let formattedArrayIndexer = FormatArrayIndexer(indexer), elements = IndexElementsWithIndexer(types, formattedArrayIndexer);
|
|
1671
|
+
return EvaluateUnionFast(elements);
|
|
1672
|
+
}
|
|
1673
|
+
function FromTupleWithoutIndexer(types) {
|
|
1674
|
+
return EvaluateUnionFast(types);
|
|
1675
|
+
}
|
|
1676
|
+
function FromTuple2(types, indexer) {
|
|
1677
|
+
return (
|
|
1678
|
+
// length (intrinsic)
|
|
1679
|
+
IsLiteral(indexer) && guard_exports.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber2(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer)
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/from_type.mjs
|
|
1684
|
+
function FromType7(type, indexer) {
|
|
1685
|
+
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject3(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexed/instantiate.mjs
|
|
1689
|
+
function NormalizeType(type) {
|
|
1690
|
+
return IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
1691
|
+
}
|
|
1692
|
+
function IndexAction(type, indexer, options) {
|
|
1693
|
+
return CanInstantiate([type, indexer]) ? memory_exports.Update(FromType7(NormalizeType(type), indexer), {}, options) : IndexDeferred(type, indexer, options);
|
|
1694
|
+
}
|
|
1695
|
+
function IndexInstantiate(context, state, type, indexer, options) {
|
|
1696
|
+
let instantiatedType = InstantiateType(context, state, type), instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
1697
|
+
return IndexAction(instantiatedType, instantiatedIndexer, options);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
// node_modules/@sinclair/typebox/build/type/action/indexed.mjs
|
|
1701
|
+
function IndexDeferred(type, indexer, options = {}) {
|
|
1702
|
+
return Deferred("Index", [type, indexer], options);
|
|
1703
|
+
}
|
|
1704
|
+
function Index(type, indexer_or_keys, options = {}) {
|
|
1705
|
+
let indexer = guard_exports.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
1706
|
+
return IndexAction(type, indexer, options);
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
// node_modules/@sinclair/typebox/build/type/engine/instance_type/instantiate.mjs
|
|
1710
|
+
function InstanceTypeOperation(type) {
|
|
1711
|
+
return IsConstructor2(type) ? type.instanceType : Never();
|
|
1712
|
+
}
|
|
1713
|
+
function InstanceTypeAction(type, options) {
|
|
1714
|
+
return CanInstantiate([type]) ? memory_exports.Update(InstanceTypeOperation(type), {}, options) : InstanceTypeDeferred(type, options);
|
|
1715
|
+
}
|
|
1716
|
+
function InstanceTypeInstantiate(context, state, type, options = {}) {
|
|
1717
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1718
|
+
return InstanceTypeAction(instantiatedType, options);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
// node_modules/@sinclair/typebox/build/type/action/instance_type.mjs
|
|
1722
|
+
function InstanceTypeDeferred(type, options = {}) {
|
|
1723
|
+
return Deferred("InstanceType", [type], options);
|
|
1724
|
+
}
|
|
1725
|
+
function InstanceType(type, options = {}) {
|
|
1726
|
+
return InstanceTypeAction(type, options);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
// node_modules/@sinclair/typebox/build/type/engine/interface/instantiate.mjs
|
|
1730
|
+
function InterfaceOperation(heritage, properties) {
|
|
1731
|
+
return EvaluateIntersect([...heritage, _Object_(properties)]);
|
|
1732
|
+
}
|
|
1733
|
+
function InterfaceAction(heritage, properties, options) {
|
|
1734
|
+
return CanInstantiate(heritage) ? memory_exports.Update(InterfaceOperation(heritage, properties), {}, options) : InterfaceDeferred(heritage, properties, options);
|
|
1735
|
+
}
|
|
1736
|
+
function InterfaceInstantiate(context, state, heritage, properties, options) {
|
|
1737
|
+
let instantiatedHeritage = InstantiateTypes(context, state, heritage), instantiatedProperties = InstantiateProperties(context, state, properties);
|
|
1738
|
+
return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// node_modules/@sinclair/typebox/build/type/action/interface.mjs
|
|
1742
|
+
function InterfaceDeferred(heritage, properties, options = {}) {
|
|
1743
|
+
return Deferred("Interface", [heritage, properties], options);
|
|
1744
|
+
}
|
|
1745
|
+
function IsInterfaceDeferred(value) {
|
|
1746
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "action") && guard_exports.IsEqual(value.action, "Interface");
|
|
1747
|
+
}
|
|
1748
|
+
function Interface(heritage, properties, options = {}) {
|
|
1749
|
+
return InterfaceAction(heritage, properties, options);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
// node_modules/@sinclair/typebox/build/type/types/symbol.mjs
|
|
1753
|
+
function Symbol2(options) {
|
|
1754
|
+
return memory_exports.Create({ "~kind": "Symbol" }, { type: "symbol" }, options);
|
|
1755
|
+
}
|
|
1756
|
+
function IsSymbol2(value) {
|
|
1757
|
+
return IsKind(value, "Symbol");
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_any.mjs
|
|
1761
|
+
function FromAny() {
|
|
1762
|
+
return Union([Number2(), String2(), Symbol2()]);
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_array.mjs
|
|
1766
|
+
function FromArray3(_type) {
|
|
1767
|
+
return Number2();
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_object.mjs
|
|
1771
|
+
function FromPropertyKeys(keys) {
|
|
1772
|
+
return keys.reduce((result2, left) => IsLiteralValue(left) ? [...result2, Literal(ConvertToIntegerKey(left))] : Unreachable(), []);
|
|
1773
|
+
}
|
|
1774
|
+
function FromObject4(properties) {
|
|
1775
|
+
let propertyKeys = guard_exports.Keys(properties), variants = FromPropertyKeys(propertyKeys);
|
|
1776
|
+
return EvaluateUnionFast(variants);
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_record.mjs
|
|
1780
|
+
function FromRecord(type) {
|
|
1781
|
+
return RecordKey(type);
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_tuple.mjs
|
|
1785
|
+
function FromTuple3(types) {
|
|
1786
|
+
let result = types.map((_, index) => Literal(index));
|
|
1787
|
+
return EvaluateUnionFast(result);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/from_type.mjs
|
|
1791
|
+
function FromType8(type) {
|
|
1792
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject4(type.properties) : IsRecord(type) ? FromRecord(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
// node_modules/@sinclair/typebox/build/type/engine/keyof/instantiate.mjs
|
|
1796
|
+
function NormalizeType2(type) {
|
|
1797
|
+
return IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
1798
|
+
}
|
|
1799
|
+
function KeyOfAction(type, options) {
|
|
1800
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType8(NormalizeType2(type)), {}, options) : KeyOfDeferred(type, options);
|
|
1801
|
+
}
|
|
1802
|
+
function KeyOfInstantiate(context, state, type, options) {
|
|
1803
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1804
|
+
return KeyOfAction(instantiatedType, options);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
// node_modules/@sinclair/typebox/build/type/action/keyof.mjs
|
|
1808
|
+
function KeyOfDeferred(type, options = {}) {
|
|
1809
|
+
return Deferred("KeyOf", [type], options);
|
|
1810
|
+
}
|
|
1811
|
+
function KeyOf(type, options = {}) {
|
|
1812
|
+
return KeyOfAction(type, options);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
// node_modules/@sinclair/typebox/build/type/engine/mapped/mapped_variants.mjs
|
|
1816
|
+
function FromTemplateLiteral3(pattern) {
|
|
1817
|
+
let decoded = TemplateLiteralDecode(pattern);
|
|
1818
|
+
return FromType9(decoded);
|
|
1819
|
+
}
|
|
1820
|
+
function FromUnion5(types) {
|
|
1821
|
+
return types.reduce((result, left) => [...result, ...FromType9(left)], []);
|
|
1822
|
+
}
|
|
1823
|
+
function FromLiteral5(value) {
|
|
1824
|
+
return guard_exports.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
1825
|
+
}
|
|
1826
|
+
function FromType9(type) {
|
|
1827
|
+
return IsEnum(type) ? FromUnion5(EnumValuesToVariants(type.enum)) : IsLiteral(type) ? FromLiteral5(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral3(type.pattern) : IsUnion(type) ? FromUnion5(type.anyOf) : [type];
|
|
1828
|
+
}
|
|
1829
|
+
function MappedVariants(type) {
|
|
1830
|
+
return FromType9(type);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
// node_modules/@sinclair/typebox/build/type/engine/mapped/mapped_operation.mjs
|
|
1834
|
+
function CanonicalAs(instantiatedAs) {
|
|
1835
|
+
return IsTemplateLiteral(instantiatedAs) ? TemplateLiteralDecode(instantiatedAs.pattern) : instantiatedAs;
|
|
1836
|
+
}
|
|
1837
|
+
function MappedVariant(context, state, identifier, variant, as, property) {
|
|
1838
|
+
let variantContext = memory_exports.Assign(context, { [identifier.name]: variant }), instantiatedAs = InstantiateType(variantContext, state, as), canonicalAs = CanonicalAs(instantiatedAs), instantiatedProperty = InstantiateType(variantContext, state, property);
|
|
1839
|
+
return IsLiteralNumber(canonicalAs) || IsLiteralString(canonicalAs) ? { [canonicalAs.const]: instantiatedProperty } : {};
|
|
1840
|
+
}
|
|
1841
|
+
function MappedProperties(context, state, identifier, variants, as, property) {
|
|
1842
|
+
return variants.reduce((result, left) => [...result, MappedVariant(context, state, identifier, left, as, property)], []);
|
|
1843
|
+
}
|
|
1844
|
+
function MappedObjects(properties) {
|
|
1845
|
+
return properties.reduce((result, left) => [...result, _Object_(left)], []);
|
|
1846
|
+
}
|
|
1847
|
+
function MappedOperation(context, state, identifier, type, as, property) {
|
|
1848
|
+
let variants = MappedVariants(type), mappedProperties = MappedProperties(context, state, identifier, variants, as, property), mappedObjects = MappedObjects(mappedProperties);
|
|
1849
|
+
return EvaluateIntersect(mappedObjects);
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
// node_modules/@sinclair/typebox/build/type/engine/mapped/instantiate.mjs
|
|
1853
|
+
function MappedAction(context, state, identifier, type, as, property, options) {
|
|
1854
|
+
return CanInstantiate([type]) ? memory_exports.Update(MappedOperation(context, state, identifier, type, as, property), {}, options) : MappedDeferred(identifier, type, as, property, options);
|
|
1855
|
+
}
|
|
1856
|
+
function MappedInstantiate(context, state, identifier, type, as, property, options) {
|
|
1857
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1858
|
+
return MappedAction(context, state, identifier, instantiatedType, as, property, options);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
// node_modules/@sinclair/typebox/build/type/action/mapped.mjs
|
|
1862
|
+
function MappedDeferred(identifier, type, as, property, options = {}) {
|
|
1863
|
+
return Deferred("Mapped", [identifier, type, as, property], options);
|
|
1864
|
+
}
|
|
1865
|
+
function Mapped(identifier, type, as, property, options = {}) {
|
|
1866
|
+
return MappedAction({}, { callstack: [] }, identifier, type, as, property, options);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
// node_modules/@sinclair/typebox/build/type/action/module.mjs
|
|
1870
|
+
function ModuleDeferred(context, options = {}) {
|
|
1871
|
+
return Deferred("Module", [context], options);
|
|
1872
|
+
}
|
|
1873
|
+
function Module(context, options = {}) {
|
|
1874
|
+
return Instantiate({}, ModuleDeferred(context, options));
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
// node_modules/@sinclair/typebox/build/type/types/undefined.mjs
|
|
1878
|
+
function Undefined(options) {
|
|
1879
|
+
return memory_exports.Create({ "~kind": "Undefined" }, { type: "undefined" }, options);
|
|
1880
|
+
}
|
|
1881
|
+
function IsUndefined2(value) {
|
|
1882
|
+
return IsKind(value, "Undefined");
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
// node_modules/@sinclair/typebox/build/type/engine/non_nullable/instantiate.mjs
|
|
1886
|
+
function NonNullableOperation(type) {
|
|
1887
|
+
let excluded = Union([Null(), Undefined()]);
|
|
1888
|
+
return ExcludeAction(type, excluded, {});
|
|
1889
|
+
}
|
|
1890
|
+
function NonNullableAction(type, options) {
|
|
1891
|
+
return CanInstantiate([type]) ? memory_exports.Update(NonNullableOperation(type), {}, options) : NonNullableDeferred(type, options);
|
|
1892
|
+
}
|
|
1893
|
+
function NonNullableInstantiate(context, state, type, options) {
|
|
1894
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1895
|
+
return NonNullableAction(instantiatedType, options);
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
// node_modules/@sinclair/typebox/build/type/action/non_nullable.mjs
|
|
1899
|
+
function NonNullableDeferred(type, options = {}) {
|
|
1900
|
+
return Deferred("NonNullable", [type], options);
|
|
1901
|
+
}
|
|
1902
|
+
function NonNullable(type, options = {}) {
|
|
1903
|
+
return NonNullableAction(type, options);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
// node_modules/@sinclair/typebox/build/type/engine/indexable/to_indexable.mjs
|
|
1907
|
+
function ToIndexable(type) {
|
|
1908
|
+
let collapsed = CollapseToObject(type);
|
|
1909
|
+
return IsObject2(collapsed) ? collapsed.properties : Unreachable();
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
// node_modules/@sinclair/typebox/build/type/engine/omit/from_type.mjs
|
|
1913
|
+
function FromKeys(properties, keys) {
|
|
1914
|
+
return guard_exports.Keys(properties).reduce((result2, key) => keys.includes(key) ? result2 : { ...result2, [key]: properties[key] }, {});
|
|
1915
|
+
}
|
|
1916
|
+
function FromType10(type, indexer) {
|
|
1917
|
+
let indexable = ToIndexable(type), indexableKeys = ToIndexableKeys(indexer), omitted = FromKeys(indexable, indexableKeys);
|
|
1918
|
+
return _Object_(omitted);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
// node_modules/@sinclair/typebox/build/type/engine/omit/instantiate.mjs
|
|
1922
|
+
function OmitAction(type, indexer, options) {
|
|
1923
|
+
return CanInstantiate([type, indexer]) ? memory_exports.Update(FromType10(type, indexer), {}, options) : OmitDeferred(type, indexer, options);
|
|
1924
|
+
}
|
|
1925
|
+
function OmitInstantiate(context, state, type, indexer, options) {
|
|
1926
|
+
let instantiatedType = InstantiateType(context, state, type), instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
1927
|
+
return OmitAction(instantiatedType, instantiatedIndexer, options);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
// node_modules/@sinclair/typebox/build/type/action/omit.mjs
|
|
1931
|
+
function OmitDeferred(type, indexer, options = {}) {
|
|
1932
|
+
return Deferred("Omit", [type, indexer], options);
|
|
1933
|
+
}
|
|
1934
|
+
function Omit(type, indexer_or_keys, options = {}) {
|
|
1935
|
+
let indexer = guard_exports.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
1936
|
+
return OmitAction(type, indexer, options);
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
// node_modules/@sinclair/typebox/build/type/engine/options/instantiate.mjs
|
|
1940
|
+
function OptionsAction(type, options) {
|
|
1941
|
+
return CanInstantiate([type]) ? memory_exports.Update(type, {}, options) : OptionsDeferred(type, options);
|
|
1942
|
+
}
|
|
1943
|
+
function OptionsInstantiate(context, state, type, options) {
|
|
1944
|
+
let instaniatedType = InstantiateType(context, state, type);
|
|
1945
|
+
return OptionsAction(instaniatedType, options);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
// node_modules/@sinclair/typebox/build/type/action/options.mjs
|
|
1949
|
+
function OptionsDeferred(type, options) {
|
|
1950
|
+
return Deferred("Options", [type, options], {});
|
|
1951
|
+
}
|
|
1952
|
+
function Options(type, options) {
|
|
1953
|
+
return OptionsAction(type, options);
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
// node_modules/@sinclair/typebox/build/type/engine/parameters/instantiate.mjs
|
|
1957
|
+
function ParametersOperation(type) {
|
|
1958
|
+
let parameters = IsFunction2(type) ? type.parameters : [], instantiatedParameters = InstantiateElements({}, { callstack: [] }, parameters);
|
|
1959
|
+
return Tuple(instantiatedParameters);
|
|
1960
|
+
}
|
|
1961
|
+
function ParametersAction(type, options) {
|
|
1962
|
+
return CanInstantiate([type]) ? memory_exports.Update(ParametersOperation(type), {}, options) : ParametersDeferred(type, options);
|
|
1963
|
+
}
|
|
1964
|
+
function ParametersInstantiate(context, state, type, options) {
|
|
1965
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
1966
|
+
return ParametersAction(instantiatedType, options);
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
// node_modules/@sinclair/typebox/build/type/action/parameters.mjs
|
|
1970
|
+
function ParametersDeferred(type, options = {}) {
|
|
1971
|
+
return Deferred("Parameters", [type], options);
|
|
1972
|
+
}
|
|
1973
|
+
function Parameters(type, options = {}) {
|
|
1974
|
+
return ParametersAction(type, options);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/from_cyclic.mjs
|
|
1978
|
+
function FromCyclic3(defs, ref) {
|
|
1979
|
+
let target = CyclicTarget(defs, ref), partial = FromType11(target);
|
|
1980
|
+
return Cyclic(memory_exports.Assign(defs, { [ref]: partial }), ref);
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/from_intersect.mjs
|
|
1984
|
+
function FromIntersect3(types) {
|
|
1985
|
+
let result = types.map((type) => FromType11(type));
|
|
1986
|
+
return EvaluateIntersect(result);
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/from_union.mjs
|
|
1990
|
+
function FromUnion6(types) {
|
|
1991
|
+
let result = types.map((type) => FromType11(type));
|
|
1992
|
+
return Union(result);
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/from_object.mjs
|
|
1996
|
+
function FromObject5(properties) {
|
|
1997
|
+
let mapped = guard_exports.Keys(properties).reduce((result2, left) => ({ ...result2, [left]: Optional(properties[left]) }), {});
|
|
1998
|
+
return _Object_(mapped);
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/from_type.mjs
|
|
2002
|
+
function FromType11(type) {
|
|
2003
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject5(type.properties) : _Object_({});
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
// node_modules/@sinclair/typebox/build/type/engine/partial/instantiate.mjs
|
|
2007
|
+
function PartialAction(type, options) {
|
|
2008
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType11(type), {}, options) : PartialDeferred(type, options);
|
|
2009
|
+
}
|
|
2010
|
+
function PartialInstantiate(context, state, type, options) {
|
|
2011
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
2012
|
+
return PartialAction(instantiatedType, options);
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
// node_modules/@sinclair/typebox/build/type/action/partial.mjs
|
|
2016
|
+
function PartialDeferred(type, options = {}) {
|
|
2017
|
+
return Deferred("Partial", [type], options);
|
|
2018
|
+
}
|
|
2019
|
+
function Partial(type, options = {}) {
|
|
2020
|
+
return PartialAction(type, options);
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
// node_modules/@sinclair/typebox/build/type/engine/pick/from_type.mjs
|
|
2024
|
+
function FromKeys2(properties, keys) {
|
|
2025
|
+
return guard_exports.Keys(properties).reduce((result2, key) => keys.includes(key) ? memory_exports.Assign(result2, { [key]: properties[key] }) : result2, {});
|
|
2026
|
+
}
|
|
2027
|
+
function FromType12(type, indexer) {
|
|
2028
|
+
let indexable = ToIndexable(type), keys = ToIndexableKeys(indexer), applied = FromKeys2(indexable, keys);
|
|
2029
|
+
return _Object_(applied);
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
// node_modules/@sinclair/typebox/build/type/engine/pick/instantiate.mjs
|
|
2033
|
+
function PickAction(type, indexer, options) {
|
|
2034
|
+
return CanInstantiate([type, indexer]) ? memory_exports.Update(FromType12(type, indexer), {}, options) : PickDeferred(type, indexer, options);
|
|
2035
|
+
}
|
|
2036
|
+
function PickInstantiate(context, state, type, indexer, options) {
|
|
2037
|
+
let instantiatedType = InstantiateType(context, state, type), instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
2038
|
+
return PickAction(instantiatedType, instantiatedIndexer, options);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
// node_modules/@sinclair/typebox/build/type/action/pick.mjs
|
|
2042
|
+
function PickDeferred(type, indexer, options = {}) {
|
|
2043
|
+
return Deferred("Pick", [type, indexer], options);
|
|
2044
|
+
}
|
|
2045
|
+
function Pick(type, indexer_or_keys, options = {}) {
|
|
2046
|
+
let indexer = guard_exports.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
2047
|
+
return PickAction(type, indexer, options);
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
2051
|
+
function FromArray4(type) {
|
|
2052
|
+
return Immutable(_Array_(type));
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_cyclic.mjs
|
|
2056
|
+
function FromCyclic4(defs, ref) {
|
|
2057
|
+
let target = CyclicTarget(defs, ref), partial = FromType13(target);
|
|
2058
|
+
return Cyclic(memory_exports.Assign(defs, { [ref]: partial }), ref);
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_intersect.mjs
|
|
2062
|
+
function FromIntersect4(types) {
|
|
2063
|
+
let result = types.map((type) => FromType13(type));
|
|
2064
|
+
return EvaluateIntersect(result);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
2068
|
+
function FromObject6(properties) {
|
|
2069
|
+
let mapped = guard_exports.Keys(properties).reduce((result2, left) => ({ ...result2, [left]: Readonly(properties[left]) }), {});
|
|
2070
|
+
return _Object_(mapped);
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_tuple.mjs
|
|
2074
|
+
function FromTuple4(types) {
|
|
2075
|
+
return Immutable(Tuple(types));
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_union.mjs
|
|
2079
|
+
function FromUnion7(types) {
|
|
2080
|
+
let result = types.map((type) => FromType13(type));
|
|
2081
|
+
return Union(result);
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
2085
|
+
function FromType13(type) {
|
|
2086
|
+
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject6(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
// node_modules/@sinclair/typebox/build/type/engine/readonly_object/instantiate.mjs
|
|
2090
|
+
function ReadonlyObjectAction(type, options) {
|
|
2091
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType13(type), {}, options) : ReadonlyObjectDeferred(type);
|
|
2092
|
+
}
|
|
2093
|
+
function ReadonlyObjectInstantiate(context, state, type, options) {
|
|
2094
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
2095
|
+
return ReadonlyObjectAction(instantiatedType, options);
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
// node_modules/@sinclair/typebox/build/type/action/readonly_object.mjs
|
|
2099
|
+
function ReadonlyObjectDeferred(type, options = {}) {
|
|
2100
|
+
return Deferred("ReadonlyObject", [type], options);
|
|
2101
|
+
}
|
|
2102
|
+
function ReadonlyObject(type, options = {}) {
|
|
2103
|
+
return ReadonlyObjectAction(type, options);
|
|
2104
|
+
}
|
|
2105
|
+
var ReadonlyType = ReadonlyObject;
|
|
2106
|
+
|
|
2107
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/from_cyclic.mjs
|
|
2108
|
+
function FromCyclic5(defs, ref) {
|
|
2109
|
+
let target = CyclicTarget(defs, ref), partial = FromType14(target);
|
|
2110
|
+
return Cyclic(memory_exports.Assign(defs, { [ref]: partial }), ref);
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/from_intersect.mjs
|
|
2114
|
+
function FromIntersect5(types) {
|
|
2115
|
+
let result = types.map((type) => FromType14(type));
|
|
2116
|
+
return EvaluateIntersect(result);
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/from_union.mjs
|
|
2120
|
+
function FromUnion8(types) {
|
|
2121
|
+
let result = types.map((type) => FromType14(type));
|
|
2122
|
+
return Union(result);
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/from_object.mjs
|
|
2126
|
+
function FromObject7(properties) {
|
|
2127
|
+
let mapped = guard_exports.Keys(properties).reduce((result2, left) => ({ ...result2, [left]: OptionalRemove(properties[left]) }), {});
|
|
2128
|
+
return _Object_(mapped);
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/from_type.mjs
|
|
2132
|
+
function FromType14(type) {
|
|
2133
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject7(type.properties) : _Object_({});
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
// node_modules/@sinclair/typebox/build/type/engine/required/instantiate.mjs
|
|
2137
|
+
function RequiredAction(type, options) {
|
|
2138
|
+
return CanInstantiate([type]) ? memory_exports.Update(FromType14(type), {}, options) : RequiredDeferred(type, options);
|
|
2139
|
+
}
|
|
2140
|
+
function RequiredInstantiate(context, state, type, options) {
|
|
2141
|
+
let instaniatedType = InstantiateType(context, state, type);
|
|
2142
|
+
return RequiredAction(instaniatedType, options);
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
// node_modules/@sinclair/typebox/build/type/action/required.mjs
|
|
2146
|
+
function RequiredDeferred(type, options = {}) {
|
|
2147
|
+
return Deferred("Required", [type], options);
|
|
2148
|
+
}
|
|
2149
|
+
function Required(type, options = {}) {
|
|
2150
|
+
return RequiredAction(type, options);
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
// node_modules/@sinclair/typebox/build/type/engine/return_type/instantiate.mjs
|
|
2154
|
+
function ReturnTypeOperation(type) {
|
|
2155
|
+
return IsFunction2(type) ? type.returnType : Never();
|
|
2156
|
+
}
|
|
2157
|
+
function ReturnTypeAction(type, options) {
|
|
2158
|
+
return CanInstantiate([type]) ? memory_exports.Update(ReturnTypeOperation(type), {}, options) : ReturnTypeDeferred(type, options);
|
|
2159
|
+
}
|
|
2160
|
+
function ReturnTypeInstantiate(context, state, type, options = {}) {
|
|
2161
|
+
let instantiatedType = InstantiateType(context, state, type);
|
|
2162
|
+
return ReturnTypeAction(instantiatedType, options);
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
// node_modules/@sinclair/typebox/build/type/action/return_type.mjs
|
|
2166
|
+
function ReturnTypeDeferred(type, options = {}) {
|
|
2167
|
+
return Deferred("ReturnType", [type], options);
|
|
2168
|
+
}
|
|
2169
|
+
function ReturnType(type, options = {}) {
|
|
2170
|
+
return ReturnTypeAction(type, options);
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
// node_modules/@sinclair/typebox/build/type/types/_codec.mjs
|
|
2174
|
+
var EncodeBuilder = class {
|
|
2175
|
+
constructor(type, decode) {
|
|
2176
|
+
this.type = type, this.decode = decode;
|
|
2177
|
+
}
|
|
2178
|
+
Encode(callback) {
|
|
2179
|
+
let type = this.type, decode = IsCodec(type) ? (value) => this.decode(type["~codec"].decode(value)) : this.decode, encode = IsCodec(type) ? (value) => type["~codec"].encode(callback(value)) : callback, codec = { decode, encode };
|
|
2180
|
+
return memory_exports.Update(this.type, { "~codec": codec }, {});
|
|
2181
|
+
}
|
|
2182
|
+
}, DecodeBuilder = class {
|
|
2183
|
+
constructor(type) {
|
|
2184
|
+
this.type = type;
|
|
2185
|
+
}
|
|
2186
|
+
Decode(callback) {
|
|
2187
|
+
return new EncodeBuilder(this.type, callback);
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
function Codec(type) {
|
|
2191
|
+
return new DecodeBuilder(type);
|
|
2192
|
+
}
|
|
2193
|
+
function Decode(type, callback) {
|
|
2194
|
+
return Codec(type).Decode(callback).Encode(() => {
|
|
2195
|
+
throw Error("Encode not implemented");
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
function Encode(type, callback) {
|
|
2199
|
+
return Codec(type).Decode(() => {
|
|
2200
|
+
throw Error("Decode not implemented");
|
|
2201
|
+
}).Encode(callback);
|
|
2202
|
+
}
|
|
2203
|
+
function IsCodec(value) {
|
|
2204
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "~codec") && guard_exports.IsObject(value["~codec"]) && guard_exports.HasPropertyKey(value["~codec"], "encode") && guard_exports.HasPropertyKey(value["~codec"], "decode");
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
// node_modules/@sinclair/typebox/build/type/types/_refine.mjs
|
|
2208
|
+
function RefineAdd(type, refinement) {
|
|
2209
|
+
let refinements = IsRefine(type) ? [...type["~refine"], refinement] : [refinement];
|
|
2210
|
+
return memory_exports.Update(type, { "~refine": refinements }, {});
|
|
2211
|
+
}
|
|
2212
|
+
function Refine(...args) {
|
|
2213
|
+
let [type, check, error_or_message] = arguments_exports.Match(args, {
|
|
2214
|
+
3: (type2, check2, error2) => [type2, check2, error2],
|
|
2215
|
+
2: (type2, check2) => [type2, check2, () => "Refine Error"]
|
|
2216
|
+
}), error = guard_exports.IsString(error_or_message) ? () => error_or_message : error_or_message;
|
|
2217
|
+
return RefineAdd(type, { check, error });
|
|
2218
|
+
}
|
|
2219
|
+
function IsRefinement(value) {
|
|
2220
|
+
return guard_exports.IsObjectNotArray(value) && guard_exports.HasPropertyKey(value, "check") && guard_exports.HasPropertyKey(value, "error") && guard_exports.IsFunction(value.check) && guard_exports.IsFunction(value.error);
|
|
2221
|
+
}
|
|
2222
|
+
function IsRefine(value) {
|
|
2223
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "~refine") && guard_exports.IsArray(value["~refine"]) && guard_exports.Every(value["~refine"], 0, (value2) => IsRefinement(value2));
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
// node_modules/@sinclair/typebox/build/type/types/bigint.mjs
|
|
2227
|
+
var BigIntPattern = "-?(?:0|[1-9][0-9]*)n";
|
|
2228
|
+
function BigInt2(options) {
|
|
2229
|
+
return memory_exports.Create({ "~kind": "BigInt" }, { type: "bigint" }, options);
|
|
2230
|
+
}
|
|
2231
|
+
function IsBigInt2(value) {
|
|
2232
|
+
return IsKind(value, "BigInt");
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
// node_modules/@sinclair/typebox/build/type/types/identifier.mjs
|
|
2236
|
+
function Identifier(name) {
|
|
2237
|
+
return memory_exports.Create({ "~kind": "Identifier" }, { name });
|
|
2238
|
+
}
|
|
2239
|
+
function IsIdentifier(value) {
|
|
2240
|
+
return IsKind(value, "Identifier");
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
// node_modules/@sinclair/typebox/build/type/types/parameter.mjs
|
|
2244
|
+
function Parameter(...args) {
|
|
2245
|
+
let [name, extends_, equals] = arguments_exports.Match(args, {
|
|
2246
|
+
3: (name2, extends_2, equals2) => [name2, extends_2, equals2],
|
|
2247
|
+
2: (name2, extends_2) => [name2, extends_2, extends_2],
|
|
2248
|
+
1: (name2) => [name2, Unknown(), Unknown()]
|
|
2249
|
+
});
|
|
2250
|
+
return memory_exports.Create({ "~kind": "Parameter" }, { name, extends: extends_, equals }, {});
|
|
2251
|
+
}
|
|
2252
|
+
function IsParameter(value) {
|
|
2253
|
+
return IsKind(value, "Parameter");
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
// node_modules/@sinclair/typebox/build/type/types/rest.mjs
|
|
2257
|
+
function Rest(type) {
|
|
2258
|
+
return memory_exports.Create({ "~kind": "Rest" }, { type: "rest", items: type }, {});
|
|
2259
|
+
}
|
|
2260
|
+
function IsRest(value) {
|
|
2261
|
+
return IsKind(value, "Rest");
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
// node_modules/@sinclair/typebox/build/type/types/void.mjs
|
|
2265
|
+
function Void(options) {
|
|
2266
|
+
return memory_exports.Create({ "~kind": "Void" }, { type: "void" }, options);
|
|
2267
|
+
}
|
|
2268
|
+
function IsVoid(value) {
|
|
2269
|
+
return IsKind(value, "Void");
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
// node_modules/@sinclair/typebox/build/type/script/mapping.mjs
|
|
2273
|
+
function IntrinsicOrCall(ref, parameters) {
|
|
2274
|
+
return guard_exports.IsEqual(ref, "Array") ? _Array_(parameters[0]) : guard_exports.IsEqual(ref, "AsyncIterator") ? AsyncIterator(parameters[0]) : guard_exports.IsEqual(ref, "Iterator") ? Iterator(parameters[0]) : guard_exports.IsEqual(ref, "Promise") ? _Promise_(parameters[0]) : guard_exports.IsEqual(ref, "Awaited") ? AwaitedDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Capitalize") ? CapitalizeDeferred(parameters[0]) : guard_exports.IsEqual(ref, "ConstructorParameters") ? ConstructorParametersDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Evaluate") ? EvaluateDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Exclude") ? ExcludeDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Extract") ? ExtractDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Index") ? IndexDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "InstanceType") ? InstanceTypeDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Lowercase") ? LowercaseDeferred(parameters[0]) : guard_exports.IsEqual(ref, "NonNullable") ? NonNullableDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Omit") ? OmitDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Options") ? OptionsDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Parameters") ? ParametersDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Partial") ? PartialDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Pick") ? PickDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Readonly") ? ReadonlyObjectDeferred(parameters[0]) : guard_exports.IsEqual(ref, "KeyOf") ? KeyOfDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Record") ? RecordDeferred(parameters[0], parameters[1]) : guard_exports.IsEqual(ref, "Required") ? RequiredDeferred(parameters[0]) : guard_exports.IsEqual(ref, "ReturnType") ? ReturnTypeDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Uncapitalize") ? UncapitalizeDeferred(parameters[0]) : guard_exports.IsEqual(ref, "Uppercase") ? UppercaseDeferred(parameters[0]) : CallConstruct(Ref(ref), parameters);
|
|
2275
|
+
}
|
|
2276
|
+
function Unreachable2() {
|
|
2277
|
+
throw Error("Unreachable");
|
|
2278
|
+
}
|
|
2279
|
+
var DelimitedDecode = (input, result = []) => input.reduce((result2, left) => guard_exports.IsArray(left) && guard_exports.IsEqual(left.length, 2) ? [...result2, left[0]] : [...result2, left], []), Delimited = (input) => {
|
|
2280
|
+
let [left, right] = input;
|
|
2281
|
+
return DelimitedDecode([...left, ...right]);
|
|
2282
|
+
};
|
|
2283
|
+
function GenericParameterExtendsEqualsMapping(input) {
|
|
2284
|
+
return Parameter(input[0], input[2], input[4]);
|
|
2285
|
+
}
|
|
2286
|
+
function GenericParameterExtendsMapping(input) {
|
|
2287
|
+
return Parameter(input[0], input[2], input[2]);
|
|
2288
|
+
}
|
|
2289
|
+
function GenericParameterEqualsMapping(input) {
|
|
2290
|
+
return Parameter(input[0], Unknown(), input[2]);
|
|
2291
|
+
}
|
|
2292
|
+
function GenericParameterIdentifierMapping(input) {
|
|
2293
|
+
return Parameter(input, Unknown(), Unknown());
|
|
2294
|
+
}
|
|
2295
|
+
function GenericParameterListMapping(input) {
|
|
2296
|
+
return Delimited(input);
|
|
2297
|
+
}
|
|
2298
|
+
function GenericParametersMapping(input) {
|
|
2299
|
+
return input[1];
|
|
2300
|
+
}
|
|
2301
|
+
function GenericCallArgumentListMapping(input) {
|
|
2302
|
+
return Delimited(input);
|
|
2303
|
+
}
|
|
2304
|
+
function GenericCallArgumentsMapping(input) {
|
|
2305
|
+
return input[1];
|
|
2306
|
+
}
|
|
2307
|
+
function GenericCallMapping(input) {
|
|
2308
|
+
return IntrinsicOrCall(input[0], input[1]);
|
|
2309
|
+
}
|
|
2310
|
+
function OptionalSemiColonMapping(input) {
|
|
2311
|
+
return null;
|
|
2312
|
+
}
|
|
2313
|
+
function KeywordStringMapping(input) {
|
|
2314
|
+
return String2();
|
|
2315
|
+
}
|
|
2316
|
+
function KeywordNumberMapping(input) {
|
|
2317
|
+
return Number2();
|
|
2318
|
+
}
|
|
2319
|
+
function KeywordBooleanMapping(input) {
|
|
2320
|
+
return Boolean2();
|
|
2321
|
+
}
|
|
2322
|
+
function KeywordUndefinedMapping(input) {
|
|
2323
|
+
return Undefined();
|
|
2324
|
+
}
|
|
2325
|
+
function KeywordNullMapping(input) {
|
|
2326
|
+
return Null();
|
|
2327
|
+
}
|
|
2328
|
+
function KeywordIntegerMapping(input) {
|
|
2329
|
+
return Integer();
|
|
2330
|
+
}
|
|
2331
|
+
function KeywordBigIntMapping(input) {
|
|
2332
|
+
return BigInt2();
|
|
2333
|
+
}
|
|
2334
|
+
function KeywordUnknownMapping(input) {
|
|
2335
|
+
return Unknown();
|
|
2336
|
+
}
|
|
2337
|
+
function KeywordAnyMapping(input) {
|
|
2338
|
+
return Any();
|
|
2339
|
+
}
|
|
2340
|
+
function KeywordObjectMapping(input) {
|
|
2341
|
+
return _Object_({});
|
|
2342
|
+
}
|
|
2343
|
+
function KeywordNeverMapping(input) {
|
|
2344
|
+
return Never();
|
|
2345
|
+
}
|
|
2346
|
+
function KeywordSymbolMapping(input) {
|
|
2347
|
+
return Symbol2();
|
|
2348
|
+
}
|
|
2349
|
+
function KeywordVoidMapping(input) {
|
|
2350
|
+
return Void();
|
|
2351
|
+
}
|
|
2352
|
+
function KeywordThisMapping(input) {
|
|
2353
|
+
return This();
|
|
2354
|
+
}
|
|
2355
|
+
function TemplateInterpolateMapping(input) {
|
|
2356
|
+
return input[1];
|
|
2357
|
+
}
|
|
2358
|
+
function TemplateSpanMapping(input) {
|
|
2359
|
+
return Literal(input);
|
|
2360
|
+
}
|
|
2361
|
+
function TemplateBodyMapping(input) {
|
|
2362
|
+
return guard_exports.IsEqual(input.length, 3) ? [input[0], input[1], ...input[2]] : [input[0]];
|
|
2363
|
+
}
|
|
2364
|
+
function TemplateLiteralTypesMapping(input) {
|
|
2365
|
+
return input[1];
|
|
2366
|
+
}
|
|
2367
|
+
function TemplateLiteralMapping(input) {
|
|
2368
|
+
return TemplateLiteralDeferred(input);
|
|
2369
|
+
}
|
|
2370
|
+
function LiteralBigIntMapping(input) {
|
|
2371
|
+
return Literal(BigInt(input));
|
|
2372
|
+
}
|
|
2373
|
+
function LiteralBooleanMapping(input) {
|
|
2374
|
+
return Literal(guard_exports.IsEqual(input, "true"));
|
|
2375
|
+
}
|
|
2376
|
+
function LiteralNumberMapping(input) {
|
|
2377
|
+
return Literal(parseFloat(input));
|
|
2378
|
+
}
|
|
2379
|
+
function LiteralStringMapping(input) {
|
|
2380
|
+
return Literal(input);
|
|
2381
|
+
}
|
|
2382
|
+
function KeyOfMapping(input) {
|
|
2383
|
+
return input.length > 0;
|
|
2384
|
+
}
|
|
2385
|
+
function IndexArrayMapping(input) {
|
|
2386
|
+
return input.reduce((result, current) => guard_exports.IsEqual(current.length, 3) ? [...result, [current[1]]] : [...result, []], []);
|
|
2387
|
+
}
|
|
2388
|
+
function ExtendsMapping(input) {
|
|
2389
|
+
return guard_exports.IsEqual(input.length, 6) ? [input[1], input[3], input[5]] : [];
|
|
2390
|
+
}
|
|
2391
|
+
function BaseMapping(input) {
|
|
2392
|
+
return guard_exports.IsArray(input) && guard_exports.IsEqual(input.length, 3) ? input[1] : input;
|
|
2393
|
+
}
|
|
2394
|
+
var FactorIndexArray = (Type2, indexArray) => indexArray.reduce((result, left) => {
|
|
2395
|
+
let _left = left;
|
|
2396
|
+
return guard_exports.IsEqual(_left.length, 1) ? IndexDeferred(result, _left[0]) : guard_exports.IsEqual(_left.length, 0) ? _Array_(result) : Unreachable2();
|
|
2397
|
+
}, Type2), FactorExtends = (type, extend) => guard_exports.IsEqual(extend.length, 3) ? ConditionalDeferred(type, extend[0], extend[1], extend[2]) : type;
|
|
2398
|
+
function FactorMapping(input) {
|
|
2399
|
+
let [keyOf, type, indexArray, extend] = input;
|
|
2400
|
+
return FactorExtends(keyOf ? KeyOfDeferred(FactorIndexArray(type, indexArray)) : FactorIndexArray(type, indexArray), extend);
|
|
2401
|
+
}
|
|
2402
|
+
function ExprBinaryMapping(left, rest) {
|
|
2403
|
+
return guard_exports.IsEqual(rest.length, 3) ? (() => {
|
|
2404
|
+
let [operator, right, next] = rest, Schema = ExprBinaryMapping(right, next);
|
|
2405
|
+
if (guard_exports.IsEqual(operator, "&"))
|
|
2406
|
+
return IsIntersect(Schema) ? Intersect([left, ...Schema.allOf]) : Intersect([left, Schema]);
|
|
2407
|
+
if (guard_exports.IsEqual(operator, "|"))
|
|
2408
|
+
return IsUnion(Schema) ? Union([left, ...Schema.anyOf]) : Union([left, Schema]);
|
|
2409
|
+
Unreachable2();
|
|
2410
|
+
})() : left;
|
|
2411
|
+
}
|
|
2412
|
+
function ExprTermMapping(input) {
|
|
2413
|
+
let [left, rest] = input;
|
|
2414
|
+
return ExprBinaryMapping(left, rest);
|
|
2415
|
+
}
|
|
2416
|
+
function ExprMapping(input) {
|
|
2417
|
+
let [left, rest] = input;
|
|
2418
|
+
return ExprBinaryMapping(left, rest);
|
|
2419
|
+
}
|
|
2420
|
+
function ExprReadonlyMapping(input) {
|
|
2421
|
+
return ImmutableAdd(input[1]);
|
|
2422
|
+
}
|
|
2423
|
+
function ExprPipeMapping(input) {
|
|
2424
|
+
return input[1];
|
|
2425
|
+
}
|
|
2426
|
+
function GenericTypeMapping(input) {
|
|
2427
|
+
return Generic(input[0], input[2]);
|
|
2428
|
+
}
|
|
2429
|
+
function InferTypeMapping(input) {
|
|
2430
|
+
return guard_exports.IsEqual(input.length, 4) ? Infer(input[1], input[3]) : guard_exports.IsEqual(input.length, 2) ? Infer(input[1], Unknown()) : Unreachable2();
|
|
2431
|
+
}
|
|
2432
|
+
function PropertyKeyNumberMapping(input) {
|
|
2433
|
+
return `${input}`;
|
|
2434
|
+
}
|
|
2435
|
+
function PropertyKeyIndexMapping(input) {
|
|
2436
|
+
return IsInteger2(input[3]) ? IntegerKey : IsNumber2(input[3]) ? NumberKey : IsSymbol2(input[3]) ? StringKey : IsString2(input[3]) ? StringKey : Unreachable2();
|
|
2437
|
+
}
|
|
2438
|
+
function ReadonlyMapping(input) {
|
|
2439
|
+
return input.length > 0;
|
|
2440
|
+
}
|
|
2441
|
+
function OptionalMapping(input) {
|
|
2442
|
+
return input.length > 0;
|
|
2443
|
+
}
|
|
2444
|
+
function PropertyMapping(input) {
|
|
2445
|
+
let [isReadonly, key, isOptional, _colon, type] = input;
|
|
2446
|
+
return {
|
|
2447
|
+
[key]: isReadonly && isOptional ? ReadonlyAdd(OptionalAdd(type)) : isReadonly && !isOptional ? ReadonlyAdd(type) : !isReadonly && isOptional ? OptionalAdd(type) : type
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2450
|
+
function PropertyListMapping(input) {
|
|
2451
|
+
return Delimited(input);
|
|
2452
|
+
}
|
|
2453
|
+
function PropertiesReduce(propertyList) {
|
|
2454
|
+
return propertyList.reduce((result, left) => guard_exports.HasPropertyKey(left, IntegerKey) || guard_exports.HasPropertyKey(left, NumberKey) || guard_exports.HasPropertyKey(left, StringKey) ? [result[0], memory_exports.Assign(result[1], left)] : [memory_exports.Assign(result[0], left), result[1]], [{}, {}]);
|
|
2455
|
+
}
|
|
2456
|
+
function PropertiesMapping(input) {
|
|
2457
|
+
return PropertiesReduce(input[1]);
|
|
2458
|
+
}
|
|
2459
|
+
function _Object_Mapping(input) {
|
|
2460
|
+
let [properties, patternProperties] = input, options = guard_exports.IsEqual(guard_exports.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
2461
|
+
return _Object_(properties, options);
|
|
2462
|
+
}
|
|
2463
|
+
function ElementNamedMapping(input) {
|
|
2464
|
+
return guard_exports.IsEqual(input.length, 5) ? ReadonlyAdd(OptionalAdd(input[4])) : guard_exports.IsEqual(input.length, 3) ? input[2] : guard_exports.IsEqual(input.length, 4) ? guard_exports.IsEqual(input[2], "readonly") ? ReadonlyAdd(input[3]) : OptionalAdd(input[3]) : Unreachable2();
|
|
2465
|
+
}
|
|
2466
|
+
function ElementReadonlyOptionalMapping(input) {
|
|
2467
|
+
return ReadonlyAdd(OptionalAdd(input[1]));
|
|
2468
|
+
}
|
|
2469
|
+
function ElementReadonlyMapping(input) {
|
|
2470
|
+
return ReadonlyAdd(input[1]);
|
|
2471
|
+
}
|
|
2472
|
+
function ElementOptionalMapping(input) {
|
|
2473
|
+
return OptionalAdd(input[0]);
|
|
2474
|
+
}
|
|
2475
|
+
function ElementMapping(input) {
|
|
2476
|
+
return guard_exports.IsEqual(input.length, 2) ? Rest(input[1]) : guard_exports.IsEqual(input.length, 1) ? input[0] : Unreachable2();
|
|
2477
|
+
}
|
|
2478
|
+
function ElementListMapping(input) {
|
|
2479
|
+
return Delimited(input);
|
|
2480
|
+
}
|
|
2481
|
+
function TupleMapping(input) {
|
|
2482
|
+
return Tuple(input[1]);
|
|
2483
|
+
}
|
|
2484
|
+
function ParameterReadonlyOptionalMapping(input) {
|
|
2485
|
+
return ReadonlyAdd(OptionalAdd(input[4]));
|
|
2486
|
+
}
|
|
2487
|
+
function ParameterReadonlyMapping(input) {
|
|
2488
|
+
return ReadonlyAdd(input[3]);
|
|
2489
|
+
}
|
|
2490
|
+
function ParameterOptionalMapping(input) {
|
|
2491
|
+
return OptionalAdd(input[3]);
|
|
2492
|
+
}
|
|
2493
|
+
function ParameterTypeMapping(input) {
|
|
2494
|
+
return input[2];
|
|
2495
|
+
}
|
|
2496
|
+
function ParameterMapping(input) {
|
|
2497
|
+
return guard_exports.IsEqual(input.length, 2) ? Rest(input[1]) : guard_exports.IsEqual(input.length, 1) ? input[0] : Unreachable2();
|
|
2498
|
+
}
|
|
2499
|
+
function ParameterListMapping(input) {
|
|
2500
|
+
return Delimited(input);
|
|
2501
|
+
}
|
|
2502
|
+
function _Function_Mapping(input) {
|
|
2503
|
+
return _Function_(input[1], input[4]);
|
|
2504
|
+
}
|
|
2505
|
+
function ConstructorMapping(input) {
|
|
2506
|
+
return Constructor(input[2], input[5]);
|
|
2507
|
+
}
|
|
2508
|
+
function ApplyReadonly(state, type) {
|
|
2509
|
+
return guard_exports.IsEqual(state, "remove") ? ReadonlyRemoveAction(type) : guard_exports.IsEqual(state, "add") ? ReadonlyAddAction(type) : type;
|
|
2510
|
+
}
|
|
2511
|
+
function MappedReadonlyMapping(input) {
|
|
2512
|
+
return guard_exports.IsEqual(input.length, 2) && guard_exports.IsEqual(input[0], "-") ? "remove" : guard_exports.IsEqual(input.length, 2) && guard_exports.IsEqual(input[0], "+") || guard_exports.IsEqual(input.length, 1) ? "add" : "none";
|
|
2513
|
+
}
|
|
2514
|
+
function ApplyOptional(state, type) {
|
|
2515
|
+
return guard_exports.IsEqual(state, "remove") ? OptionalRemoveAction(type) : guard_exports.IsEqual(state, "add") ? OptionalAddAction(type) : type;
|
|
2516
|
+
}
|
|
2517
|
+
function MappedOptionalMapping(input) {
|
|
2518
|
+
return guard_exports.IsEqual(input.length, 2) && guard_exports.IsEqual(input[0], "-") ? "remove" : guard_exports.IsEqual(input.length, 2) && guard_exports.IsEqual(input[0], "+") || guard_exports.IsEqual(input.length, 1) ? "add" : "none";
|
|
2519
|
+
}
|
|
2520
|
+
function MappedAsMapping(input) {
|
|
2521
|
+
return guard_exports.IsEqual(input.length, 2) ? [input[1]] : [];
|
|
2522
|
+
}
|
|
2523
|
+
function MappedMapping(input) {
|
|
2524
|
+
return guard_exports.IsArray(input[6]) && guard_exports.IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))) : MappedDeferred(Identifier(input[3]), input[5], Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10])));
|
|
2525
|
+
}
|
|
2526
|
+
function ReferenceMapping(input) {
|
|
2527
|
+
return Ref(input);
|
|
2528
|
+
}
|
|
2529
|
+
function OptionsMapping(input) {
|
|
2530
|
+
return OptionsDeferred(input[2], input[4]);
|
|
2531
|
+
}
|
|
2532
|
+
function JsonNumberMapping(input) {
|
|
2533
|
+
return parseFloat(input);
|
|
2534
|
+
}
|
|
2535
|
+
function JsonBooleanMapping(input) {
|
|
2536
|
+
return guard_exports.IsEqual(input, "true");
|
|
2537
|
+
}
|
|
2538
|
+
function JsonNullMapping(input) {
|
|
2539
|
+
return null;
|
|
2540
|
+
}
|
|
2541
|
+
function JsonPropertyMapping(input) {
|
|
2542
|
+
return { [input[0]]: input[2] };
|
|
2543
|
+
}
|
|
2544
|
+
function JsonPropertyListMapping(input) {
|
|
2545
|
+
return Delimited(input);
|
|
2546
|
+
}
|
|
2547
|
+
function JsonObjectMappingReduce(propertyList) {
|
|
2548
|
+
return propertyList.reduce((result, left) => memory_exports.Assign(result, left), {});
|
|
2549
|
+
}
|
|
2550
|
+
function JsonObjectMapping(input) {
|
|
2551
|
+
return JsonObjectMappingReduce(input[1]);
|
|
2552
|
+
}
|
|
2553
|
+
function JsonElementListMapping(input) {
|
|
2554
|
+
return Delimited(input);
|
|
2555
|
+
}
|
|
2556
|
+
function JsonArrayMapping(input) {
|
|
2557
|
+
return input[1];
|
|
2558
|
+
}
|
|
2559
|
+
function PatternBigIntMapping(input) {
|
|
2560
|
+
return BigInt2();
|
|
2561
|
+
}
|
|
2562
|
+
function PatternStringMapping(input) {
|
|
2563
|
+
return String2();
|
|
2564
|
+
}
|
|
2565
|
+
function PatternNumberMapping(input) {
|
|
2566
|
+
return Number2();
|
|
2567
|
+
}
|
|
2568
|
+
function PatternIntegerMapping(input) {
|
|
2569
|
+
return Integer();
|
|
2570
|
+
}
|
|
2571
|
+
function PatternNeverMapping(input) {
|
|
2572
|
+
return Never();
|
|
2573
|
+
}
|
|
2574
|
+
function PatternTextMapping(input) {
|
|
2575
|
+
return Literal(input);
|
|
2576
|
+
}
|
|
2577
|
+
function PatternGroupMapping(input) {
|
|
2578
|
+
return Union(input[1]);
|
|
2579
|
+
}
|
|
2580
|
+
function PatternUnionMapping(input) {
|
|
2581
|
+
return input.length === 3 ? [...input[0], ...input[2]] : input.length === 1 ? [...input[0]] : [];
|
|
2582
|
+
}
|
|
2583
|
+
function PatternTermMapping(input) {
|
|
2584
|
+
return [input[0], ...input[1]];
|
|
2585
|
+
}
|
|
2586
|
+
function PatternMapping(input) {
|
|
2587
|
+
return input[1];
|
|
2588
|
+
}
|
|
2589
|
+
function InterfaceDeclarationHeritageListMapping(input) {
|
|
2590
|
+
return Delimited(input);
|
|
2591
|
+
}
|
|
2592
|
+
function InterfaceDeclarationHeritageMapping(input) {
|
|
2593
|
+
return guard_exports.IsEqual(input.length, 2) ? input[1] : [];
|
|
2594
|
+
}
|
|
2595
|
+
function InterfaceDeclarationGenericMapping(input) {
|
|
2596
|
+
let parameters = input[2], heritage = input[3], [properties, patternProperties] = input[4], options = guard_exports.IsEqual(guard_exports.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
2597
|
+
return { [input[1]]: Generic(parameters, InterfaceDeferred(heritage, properties, options)) };
|
|
2598
|
+
}
|
|
2599
|
+
function InterfaceDeclarationMapping(input) {
|
|
2600
|
+
let heritage = input[2], [properties, patternProperties] = input[3], options = guard_exports.IsEqual(guard_exports.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
2601
|
+
return { [input[1]]: InterfaceDeferred(heritage, properties, options) };
|
|
2602
|
+
}
|
|
2603
|
+
function TypeAliasDeclarationGenericMapping(input) {
|
|
2604
|
+
return { [input[1]]: Generic(input[2], input[4]) };
|
|
2605
|
+
}
|
|
2606
|
+
function TypeAliasDeclarationMapping(input) {
|
|
2607
|
+
return { [input[1]]: input[3] };
|
|
2608
|
+
}
|
|
2609
|
+
function ExportKeywordMapping(input) {
|
|
2610
|
+
return null;
|
|
2611
|
+
}
|
|
2612
|
+
function ModuleDeclarationListMapping(input) {
|
|
2613
|
+
return PropertiesReduce(Delimited(input));
|
|
2614
|
+
}
|
|
2615
|
+
function ModuleDeclarationMapping(input) {
|
|
2616
|
+
return input[1];
|
|
2617
|
+
}
|
|
2618
|
+
function ModuleMapping(input) {
|
|
2619
|
+
let moduleDeclaration = input[0], moduleDeclarationList = input[1];
|
|
2620
|
+
return ModuleDeferred(memory_exports.Assign(moduleDeclaration, moduleDeclarationList[0]));
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/match.mjs
|
|
2624
|
+
function IsMatch(value) {
|
|
2625
|
+
return IsEqual(value.length, 2);
|
|
2626
|
+
}
|
|
2627
|
+
function Match2(input, ok, fail) {
|
|
2628
|
+
return IsMatch(input) ? ok(input[0], input[1]) : fail();
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/take.mjs
|
|
2632
|
+
function TakeVariant(variant, input) {
|
|
2633
|
+
return IsEqual(input.indexOf(variant), 0) ? [variant, input.slice(variant.length)] : [];
|
|
2634
|
+
}
|
|
2635
|
+
function Take(variants, input) {
|
|
2636
|
+
for (let i = 0; i < variants.length; i++) {
|
|
2637
|
+
let result = TakeVariant(variants[i], input);
|
|
2638
|
+
if (IsMatch(result))
|
|
2639
|
+
return result;
|
|
2640
|
+
}
|
|
2641
|
+
return [];
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/char.mjs
|
|
2645
|
+
function Range(start, end) {
|
|
2646
|
+
return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));
|
|
2647
|
+
}
|
|
2648
|
+
var Alpha = [
|
|
2649
|
+
...Range(97, 122),
|
|
2650
|
+
// Lowercase
|
|
2651
|
+
...Range(65, 90)
|
|
2652
|
+
// Uppercase
|
|
2653
|
+
], Zero = "0", NonZero = Range(49, 57), Digit = [Zero, ...NonZero], WhiteSpace = " ", NewLine = `
|
|
2654
|
+
`;
|
|
2655
|
+
var UnderScore = "_", Dot = ".", DollarSign = "$", Hyphen = "-";
|
|
2656
|
+
|
|
2657
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/trim.mjs
|
|
2658
|
+
var LineComment = "//", OpenComment = "/*", CloseComment = "*/";
|
|
2659
|
+
function DiscardMultilineComment(input) {
|
|
2660
|
+
let index = input.indexOf(CloseComment);
|
|
2661
|
+
return IsEqual(index, -1) ? "" : input.slice(index + 2);
|
|
2662
|
+
}
|
|
2663
|
+
function DiscardLineComment(input) {
|
|
2664
|
+
let index = input.indexOf(NewLine);
|
|
2665
|
+
return IsEqual(index, -1) ? "" : input.slice(index);
|
|
2666
|
+
}
|
|
2667
|
+
function TrimStartUntilNewline(input) {
|
|
2668
|
+
return input.replace(/^[ \t\r\f\v]+/, "");
|
|
2669
|
+
}
|
|
2670
|
+
function TrimWhitespace(input) {
|
|
2671
|
+
let trimmed = TrimStartUntilNewline(input);
|
|
2672
|
+
return trimmed.startsWith(OpenComment) ? TrimWhitespace(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? TrimWhitespace(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
2673
|
+
}
|
|
2674
|
+
function Trim(input) {
|
|
2675
|
+
let trimmed = input.trimStart();
|
|
2676
|
+
return trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/optional.mjs
|
|
2680
|
+
function Optional2(value, input) {
|
|
2681
|
+
return Match2(Take([value], input), (Optional4, Rest2) => [Optional4, Rest2], () => ["", input]);
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
// node_modules/@sinclair/typebox/build/type/script/token/internal/many.mjs
|
|
2685
|
+
function IsDiscard(discard, input) {
|
|
2686
|
+
return discard.includes(input);
|
|
2687
|
+
}
|
|
2688
|
+
function Many(allowed, discard, input, result = "") {
|
|
2689
|
+
return Match2(Take(allowed, input), (Char, Rest2) => IsDiscard(discard, Char) ? Many(allowed, discard, Rest2, result) : Many(allowed, discard, Rest2, `${result}${Char}`), () => [result, input]);
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
// node_modules/@sinclair/typebox/build/type/script/token/unsigned_integer.mjs
|
|
2693
|
+
function TakeNonZero(input) {
|
|
2694
|
+
return Take(NonZero, input);
|
|
2695
|
+
}
|
|
2696
|
+
var AllowedDigits = [...Digit, UnderScore];
|
|
2697
|
+
function TakeDigits(input) {
|
|
2698
|
+
return Many(AllowedDigits, [UnderScore], input);
|
|
2699
|
+
}
|
|
2700
|
+
function TakeUnsignedInteger(input) {
|
|
2701
|
+
return Match2(Take([Zero], input), (Zero2, ZeroRest) => [Zero2, ZeroRest], () => Match2(
|
|
2702
|
+
TakeNonZero(input),
|
|
2703
|
+
(NonZero2, NonZeroRest) => Match2(TakeDigits(NonZeroRest), (Digits, DigitsRest) => [`${NonZero2}${Digits}`, DigitsRest], () => []),
|
|
2704
|
+
// fail: did not match Digits
|
|
2705
|
+
() => []
|
|
2706
|
+
));
|
|
2707
|
+
}
|
|
2708
|
+
function UnsignedInteger(input) {
|
|
2709
|
+
return TakeUnsignedInteger(Trim(input));
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
// node_modules/@sinclair/typebox/build/type/script/token/integer.mjs
|
|
2713
|
+
function TakeSign(input) {
|
|
2714
|
+
return Optional2(Hyphen, input);
|
|
2715
|
+
}
|
|
2716
|
+
function TakeSignedInteger(input) {
|
|
2717
|
+
return Match2(
|
|
2718
|
+
TakeSign(input),
|
|
2719
|
+
(Sign, SignRest) => Match2(UnsignedInteger(SignRest), (UnsignedInteger2, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger2}`, UnsignedIntegerRest], () => []),
|
|
2720
|
+
// fail: did not match unsigned integer
|
|
2721
|
+
() => []
|
|
2722
|
+
);
|
|
2723
|
+
}
|
|
2724
|
+
function Integer2(input) {
|
|
2725
|
+
return TakeSignedInteger(Trim(input));
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
// node_modules/@sinclair/typebox/build/type/script/token/bigint.mjs
|
|
2729
|
+
function TakeBigInt(input) {
|
|
2730
|
+
return Match2(
|
|
2731
|
+
Integer2(input),
|
|
2732
|
+
(Integer3, IntegerRest) => Match2(Take(["n"], IntegerRest), (_N, NRest) => [`${Integer3}`, NRest], () => []),
|
|
2733
|
+
// fail: did not match 'n'
|
|
2734
|
+
() => []
|
|
2735
|
+
);
|
|
2736
|
+
}
|
|
2737
|
+
function BigInt3(input) {
|
|
2738
|
+
return TakeBigInt(input);
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
// node_modules/@sinclair/typebox/build/type/script/token/const.mjs
|
|
2742
|
+
function TakeConst(const_, input) {
|
|
2743
|
+
return Take([const_], input);
|
|
2744
|
+
}
|
|
2745
|
+
function Const(const_, input) {
|
|
2746
|
+
return IsEqual(const_, "") ? ["", input] : const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) : const_.startsWith(WhiteSpace) ? TakeConst(const_, input) : TakeConst(const_, Trim(input));
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
// node_modules/@sinclair/typebox/build/type/script/token/ident.mjs
|
|
2750
|
+
var Initial = [...Alpha, UnderScore, DollarSign];
|
|
2751
|
+
function TakeInitial(input) {
|
|
2752
|
+
return Take(Initial, input);
|
|
2753
|
+
}
|
|
2754
|
+
var Remaining = [...Initial, ...Digit];
|
|
2755
|
+
function TakeRemaining(input, result = "") {
|
|
2756
|
+
return Match2(Take(Remaining, input), (Remaining2, RemainingRest) => TakeRemaining(RemainingRest, `${result}${Remaining2}`), () => [result, input]);
|
|
2757
|
+
}
|
|
2758
|
+
function TakeIdent(input) {
|
|
2759
|
+
return Match2(
|
|
2760
|
+
TakeInitial(input),
|
|
2761
|
+
(Initial2, InitialRest) => Match2(TakeRemaining(InitialRest), (Remaining2, RemainingRest) => [`${Initial2}${Remaining2}`, RemainingRest], () => []),
|
|
2762
|
+
// fail: did not match Remaining
|
|
2763
|
+
() => []
|
|
2764
|
+
);
|
|
2765
|
+
}
|
|
2766
|
+
function Ident(input) {
|
|
2767
|
+
return TakeIdent(Trim(input));
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
// node_modules/@sinclair/typebox/build/type/script/token/unsigned_number.mjs
|
|
2771
|
+
var AllowedDigits2 = [...Digit, UnderScore];
|
|
2772
|
+
function IsLeadingDot(input) {
|
|
2773
|
+
return IsMatch(Take([Dot], input));
|
|
2774
|
+
}
|
|
2775
|
+
function TakeFractional(input) {
|
|
2776
|
+
return Match2(Many(AllowedDigits2, [UnderScore], input), (Digits, DigitsRest) => IsEqual(Digits, "") ? [] : [Digits, DigitsRest], () => []);
|
|
2777
|
+
}
|
|
2778
|
+
function LeadingDot(input) {
|
|
2779
|
+
return Match2(
|
|
2780
|
+
Take([Dot], input),
|
|
2781
|
+
(Dot2, DotRest) => Match2(TakeFractional(DotRest), (Fractional, FractionalRest) => [`0${Dot2}${Fractional}`, FractionalRest], () => []),
|
|
2782
|
+
// fail: did not match Fractional
|
|
2783
|
+
() => []
|
|
2784
|
+
);
|
|
2785
|
+
}
|
|
2786
|
+
function LeadingInteger(input) {
|
|
2787
|
+
return Match2(
|
|
2788
|
+
UnsignedInteger(input),
|
|
2789
|
+
(Integer3, IntegerRest) => Match2(
|
|
2790
|
+
Take([Dot], IntegerRest),
|
|
2791
|
+
(Dot2, DotRest) => Match2(TakeFractional(DotRest), (Fractional, FractionalRest) => [`${Integer3}${Dot2}${Fractional}`, FractionalRest], () => [`${Integer3}`, DotRest]),
|
|
2792
|
+
// fail: did not match Fractional, use Integer
|
|
2793
|
+
() => [`${Integer3}`, IntegerRest]
|
|
2794
|
+
),
|
|
2795
|
+
// fail: did not match Dot, use Integer
|
|
2796
|
+
() => []
|
|
2797
|
+
);
|
|
2798
|
+
}
|
|
2799
|
+
function TakeUnsignedNumber(input) {
|
|
2800
|
+
return IsLeadingDot(input) ? LeadingDot(input) : LeadingInteger(input);
|
|
2801
|
+
}
|
|
2802
|
+
function UnsignedNumber(input) {
|
|
2803
|
+
return TakeUnsignedNumber(Trim(input));
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
// node_modules/@sinclair/typebox/build/type/script/token/number.mjs
|
|
2807
|
+
function TakeSign2(input) {
|
|
2808
|
+
return Optional2(Hyphen, input);
|
|
2809
|
+
}
|
|
2810
|
+
function TakeSignedNumber(input) {
|
|
2811
|
+
return Match2(
|
|
2812
|
+
TakeSign2(input),
|
|
2813
|
+
(Sign, SignRest) => Match2(UnsignedNumber(SignRest), (UnsignedInteger2, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger2}`, UnsignedIntegerRest], () => []),
|
|
2814
|
+
// fail: did not match unsigned integer
|
|
2815
|
+
() => []
|
|
2816
|
+
);
|
|
2817
|
+
}
|
|
2818
|
+
function Number3(input) {
|
|
2819
|
+
return TakeSignedNumber(Trim(input));
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
// node_modules/@sinclair/typebox/build/type/script/token/until.mjs
|
|
2823
|
+
function TakeOne(input) {
|
|
2824
|
+
return IsEqual(input, "") ? [] : [input.slice(0, 1), input.slice(1)];
|
|
2825
|
+
}
|
|
2826
|
+
function IsInputMatchSentinal(end, input) {
|
|
2827
|
+
return TakeLeft(end, (left, right) => input.startsWith(left) ? !0 : IsInputMatchSentinal(right, input), () => !1);
|
|
2828
|
+
}
|
|
2829
|
+
function Until(end, input, result = "") {
|
|
2830
|
+
return Match2(
|
|
2831
|
+
TakeOne(input),
|
|
2832
|
+
(One, Rest2) => IsInputMatchSentinal(end, input) ? [result, input] : Until(end, Rest2, `${result}${One}`),
|
|
2833
|
+
() => []
|
|
2834
|
+
);
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
// node_modules/@sinclair/typebox/build/type/script/token/span.mjs
|
|
2838
|
+
function MultiLine(start, end, input) {
|
|
2839
|
+
return Match2(
|
|
2840
|
+
Take([start], input),
|
|
2841
|
+
(_, Rest2) => Match2(
|
|
2842
|
+
Until([end], Rest2),
|
|
2843
|
+
(Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, Rest3) => [`${Until2}`, Rest3], () => []),
|
|
2844
|
+
// fail: did not match End
|
|
2845
|
+
() => []
|
|
2846
|
+
),
|
|
2847
|
+
// fail: did not match Until
|
|
2848
|
+
() => []
|
|
2849
|
+
);
|
|
2850
|
+
}
|
|
2851
|
+
function SingleLine(start, end, input) {
|
|
2852
|
+
return Match2(
|
|
2853
|
+
Take([start], input),
|
|
2854
|
+
(_, Rest2) => Match2(
|
|
2855
|
+
Until([NewLine, end], Rest2),
|
|
2856
|
+
(Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, EndRest) => [`${Until2}`, EndRest], () => []),
|
|
2857
|
+
// fail: did not match End
|
|
2858
|
+
() => []
|
|
2859
|
+
),
|
|
2860
|
+
// fail: did not match Until
|
|
2861
|
+
() => []
|
|
2862
|
+
);
|
|
2863
|
+
}
|
|
2864
|
+
function Span(start, end, multiLine, input) {
|
|
2865
|
+
return multiLine ? MultiLine(start, end, Trim(input)) : SingleLine(start, end, Trim(input));
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
// node_modules/@sinclair/typebox/build/type/script/token/string.mjs
|
|
2869
|
+
function TakeInitial2(quotes, input) {
|
|
2870
|
+
return Take(quotes, input);
|
|
2871
|
+
}
|
|
2872
|
+
function TakeSpan(quote, input) {
|
|
2873
|
+
return Span(quote, quote, !1, input);
|
|
2874
|
+
}
|
|
2875
|
+
function TakeString(quotes, input) {
|
|
2876
|
+
return Match2(TakeInitial2(quotes, input), (Initial2, InitialRest) => TakeSpan(Initial2, `${Initial2}${InitialRest}`), () => []);
|
|
2877
|
+
}
|
|
2878
|
+
function String3(quotes, input) {
|
|
2879
|
+
return TakeString(quotes, Trim(input));
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// node_modules/@sinclair/typebox/build/type/script/token/until_1.mjs
|
|
2883
|
+
function Until_1(end, input) {
|
|
2884
|
+
return Match2(Until(end, input), (Until2, UntilRest) => IsEqual(Until2, "") ? [] : [Until2, UntilRest], () => []);
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
// node_modules/@sinclair/typebox/build/type/script/parser.mjs
|
|
2888
|
+
var If = (result, left, right = () => []) => result.length === 2 ? left(result) : right(), GenericParameterExtendsEquals = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => If(Const("=", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [GenericParameterExtendsEqualsMapping(_0), input2]), GenericParameterExtends = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterExtendsMapping(_0), input2]), GenericParameterEquals = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("=", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterEqualsMapping(_0), input2]), GenericParameterIdentifier = (input) => If(Ident(input), ([_0, input2]) => [GenericParameterIdentifierMapping(_0), input2]), GenericParameter = (input) => If(If(GenericParameterExtendsEquals(input), ([_0, input2]) => [_0, input2], () => If(GenericParameterExtends(input), ([_0, input2]) => [_0, input2], () => If(GenericParameterEquals(input), ([_0, input2]) => [_0, input2], () => If(GenericParameterIdentifier(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [_0, input2]), GenericParameterList_0 = (input, result = []) => If(If(GenericParameter(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => GenericParameterList_0(input2, [...result, _0]), () => [result, input]), GenericParameterList = (input) => If(If(GenericParameterList_0(input), ([_0, input2]) => If(If(If(GenericParameter(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [GenericParameterListMapping(_0), input2]), GenericParameters = (input) => If(If(Const("<", input), ([_0, input2]) => If(GenericParameterList(input2), ([_1, input3]) => If(Const(">", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParametersMapping(_0), input2]), GenericCallArgumentList_0 = (input, result = []) => If(If(Type(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => GenericCallArgumentList_0(input2, [...result, _0]), () => [result, input]), GenericCallArgumentList = (input) => If(If(GenericCallArgumentList_0(input), ([_0, input2]) => If(If(If(Type(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [GenericCallArgumentListMapping(_0), input2]), GenericCallArguments = (input) => If(If(Const("<", input), ([_0, input2]) => If(GenericCallArgumentList(input2), ([_1, input3]) => If(Const(">", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericCallArgumentsMapping(_0), input2]), GenericCall = (input) => If(If(Ident(input), ([_0, input2]) => If(GenericCallArguments(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [GenericCallMapping(_0), input2]), OptionalSemiColon = (input) => If(If(If(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [OptionalSemiColonMapping(_0), input2]), KeywordString = (input) => If(Const("string", input), ([_0, input2]) => [KeywordStringMapping(_0), input2]), KeywordNumber = (input) => If(Const("number", input), ([_0, input2]) => [KeywordNumberMapping(_0), input2]), KeywordBoolean = (input) => If(Const("boolean", input), ([_0, input2]) => [KeywordBooleanMapping(_0), input2]), KeywordUndefined = (input) => If(Const("undefined", input), ([_0, input2]) => [KeywordUndefinedMapping(_0), input2]), KeywordNull = (input) => If(Const("null", input), ([_0, input2]) => [KeywordNullMapping(_0), input2]), KeywordInteger = (input) => If(Const("integer", input), ([_0, input2]) => [KeywordIntegerMapping(_0), input2]), KeywordBigInt = (input) => If(Const("bigint", input), ([_0, input2]) => [KeywordBigIntMapping(_0), input2]), KeywordUnknown = (input) => If(Const("unknown", input), ([_0, input2]) => [KeywordUnknownMapping(_0), input2]), KeywordAny = (input) => If(Const("any", input), ([_0, input2]) => [KeywordAnyMapping(_0), input2]), KeywordObject = (input) => If(Const("object", input), ([_0, input2]) => [KeywordObjectMapping(_0), input2]), KeywordNever = (input) => If(Const("never", input), ([_0, input2]) => [KeywordNeverMapping(_0), input2]), KeywordSymbol = (input) => If(Const("symbol", input), ([_0, input2]) => [KeywordSymbolMapping(_0), input2]), KeywordVoid = (input) => If(Const("void", input), ([_0, input2]) => [KeywordVoidMapping(_0), input2]), KeywordThis = (input) => If(Const("this", input), ([_0, input2]) => [KeywordThisMapping(_0), input2]), Keyword = (input) => If(If(KeywordString(input), ([_0, input2]) => [_0, input2], () => If(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If(KeywordThis(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))), ([_0, input2]) => [_0, input2]), TemplateInterpolate = (input) => If(If(Const("${", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateInterpolateMapping(_0), input2]), TemplateSpan = (input) => If(Until(["${", "`"], input), ([_0, input2]) => [TemplateSpanMapping(_0), input2]), TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input2]) => If(TemplateInterpolate(input2), ([_1, input3]) => If(TemplateBody(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [TemplateBodyMapping(_0), input2]), TemplateLiteralTypes = (input) => If(If(Const("`", input), ([_0, input2]) => If(TemplateBody(input2), ([_1, input3]) => If(Const("`", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateLiteralTypesMapping(_0), input2]), TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input2]) => [TemplateLiteralMapping(_0), input2]), LiteralBigInt = (input) => If(BigInt3(input), ([_0, input2]) => [LiteralBigIntMapping(_0), input2]), LiteralBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [LiteralBooleanMapping(_0), input2]), LiteralNumber = (input) => If(Number3(input), ([_0, input2]) => [LiteralNumberMapping(_0), input2]), LiteralString = (input) => If(String3(["'", '"'], input), ([_0, input2]) => [LiteralStringMapping(_0), input2]), Literal2 = (input) => If(If(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If(LiteralString(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [_0, input2]), KeyOf2 = (input) => If(If(If(Const("keyof", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [KeyOfMapping(_0), input2]), IndexArray_0 = (input, result = []) => If(If(If(Const("[", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(Const("[", input), ([_0, input2]) => If(Const("]", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => IndexArray_0(input2, [...result, _0]), () => [result, input]), IndexArray = (input) => If(IndexArray_0(input), ([_0, input2]) => [IndexArrayMapping(_0), input2]), Extends2 = (input) => If(If(If(Const("extends", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("?", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => If(Const(":", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExtendsMapping(_0), input2]), Base2 = (input) => If(If(If(Const("(", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(Keyword(input), ([_0, input2]) => [_0, input2], () => If(_Object_2(input), ([_0, input2]) => [_0, input2], () => If(Tuple2(input), ([_0, input2]) => [_0, input2], () => If(TemplateLiteral(input), ([_0, input2]) => [_0, input2], () => If(Literal2(input), ([_0, input2]) => [_0, input2], () => If(Constructor2(input), ([_0, input2]) => [_0, input2], () => If(_Function_2(input), ([_0, input2]) => [_0, input2], () => If(Mapped2(input), ([_0, input2]) => [_0, input2], () => If(Options2(input), ([_0, input2]) => [_0, input2], () => If(GenericCall(input), ([_0, input2]) => [_0, input2], () => If(Reference(input), ([_0, input2]) => [_0, input2], () => [])))))))))))), ([_0, input2]) => [BaseMapping(_0), input2]), Factor = (input) => If(If(KeyOf2(input), ([_0, input2]) => If(Base2(input2), ([_1, input3]) => If(IndexArray(input3), ([_2, input4]) => If(Extends2(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [FactorMapping(_0), input2]), ExprTermTail = (input) => If(If(If(Const("&", input), ([_0, input2]) => If(Factor(input2), ([_1, input3]) => If(ExprTermTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [_0, input2]), ExprTerm = (input) => If(If(Factor(input), ([_0, input2]) => If(ExprTermTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprTermMapping(_0), input2]), ExprTail = (input) => If(If(If(Const("|", input), ([_0, input2]) => If(ExprTerm(input2), ([_1, input3]) => If(ExprTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [_0, input2]), Expr = (input) => If(If(ExprTerm(input), ([_0, input2]) => If(ExprTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprMapping(_0), input2]), ExprReadonly = (input) => If(If(Const("readonly", input), ([_0, input2]) => If(Expr(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprReadonlyMapping(_0), input2]), ExprPipe = (input) => If(If(Const("|", input), ([_0, input2]) => If(Expr(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprPipeMapping(_0), input2]), GenericType = (input) => If(If(GenericParameters(input), ([_0, input2]) => If(Const("=", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericTypeMapping(_0), input2]), InferType = (input) => If(If(If(Const("infer", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(Const("extends", input3), ([_2, input4]) => If(Expr(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If(If(Const("infer", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [InferTypeMapping(_0), input2]), Type = (input) => If(If(InferType(input), ([_0, input2]) => [_0, input2], () => If(ExprPipe(input), ([_0, input2]) => [_0, input2], () => If(ExprReadonly(input), ([_0, input2]) => [_0, input2], () => If(Expr(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [_0, input2]), PropertyKeyNumber = (input) => If(Number3(input), ([_0, input2]) => [PropertyKeyNumberMapping(_0), input2]), PropertyKeyIdent = (input) => If(Ident(input), ([_0, input2]) => [_0, input2]), PropertyKeyQuoted = (input) => If(String3(["'", '"'], input), ([_0, input2]) => [_0, input2]), PropertyKeyIndex = (input) => If(If(Const("[", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(If(KeywordInteger(input4), ([_02, input5]) => [_02, input5], () => If(KeywordNumber(input4), ([_02, input5]) => [_02, input5], () => If(KeywordString(input4), ([_02, input5]) => [_02, input5], () => If(KeywordSymbol(input4), ([_02, input5]) => [_02, input5], () => [])))), ([_3, input5]) => If(Const("]", input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [PropertyKeyIndexMapping(_0), input2]), PropertyKey = (input) => If(If(PropertyKeyNumber(input), ([_0, input2]) => [_0, input2], () => If(PropertyKeyIdent(input), ([_0, input2]) => [_0, input2], () => If(PropertyKeyQuoted(input), ([_0, input2]) => [_0, input2], () => If(PropertyKeyIndex(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [_0, input2]), Readonly2 = (input) => If(If(If(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ReadonlyMapping(_0), input2]), Optional3 = (input) => If(If(If(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [OptionalMapping(_0), input2]), Property = (input) => If(If(Readonly2(input), ([_0, input2]) => If(PropertyKey(input2), ([_1, input3]) => If(Optional3(input3), ([_2, input4]) => If(Const(":", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [PropertyMapping(_0), input2]), PropertyDelimiter = (input) => If(If(If(Const(",", input), ([_0, input2]) => If(Const(`
|
|
2889
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const(";", input), ([_0, input2]) => If(Const(`
|
|
2890
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const(",", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(Const(`
|
|
2891
|
+
`, input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))))), ([_0, input2]) => [_0, input2]), PropertyList_0 = (input, result = []) => If(If(Property(input), ([_0, input2]) => If(PropertyDelimiter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => PropertyList_0(input2, [...result, _0]), () => [result, input]), PropertyList = (input) => If(If(PropertyList_0(input), ([_0, input2]) => If(If(If(Property(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [PropertyListMapping(_0), input2]), Properties = (input) => If(If(Const("{", input), ([_0, input2]) => If(PropertyList(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PropertiesMapping(_0), input2]), _Object_2 = (input) => If(Properties(input), ([_0, input2]) => [_Object_Mapping(_0), input2]), ElementNamed = (input) => If(If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Const("readonly", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_0, input2], () => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Const("readonly", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [ElementNamedMapping(_0), input2]), ElementReadonlyOptional = (input) => If(If(Const("readonly", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("?", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [ElementReadonlyOptionalMapping(_0), input2]), ElementReadonly = (input) => If(If(Const("readonly", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ElementReadonlyMapping(_0), input2]), ElementOptional = (input) => If(If(Type(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ElementOptionalMapping(_0), input2]), ElementBase = (input) => If(If(ElementNamed(input), ([_0, input2]) => [_0, input2], () => If(ElementReadonlyOptional(input), ([_0, input2]) => [_0, input2], () => If(ElementReadonly(input), ([_0, input2]) => [_0, input2], () => If(ElementOptional(input), ([_0, input2]) => [_0, input2], () => If(Type(input), ([_0, input2]) => [_0, input2], () => []))))), ([_0, input2]) => [_0, input2]), Element = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(ElementBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(ElementBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementMapping(_0), input2]), ElementList_0 = (input, result = []) => If(If(Element(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ElementList_0(input2, [...result, _0]), () => [result, input]), ElementList = (input) => If(If(ElementList_0(input), ([_0, input2]) => If(If(If(Element(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ElementListMapping(_0), input2]), Tuple2 = (input) => If(If(Const("[", input), ([_0, input2]) => If(ElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TupleMapping(_0), input2]), ParameterReadonlyOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Const("readonly", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [ParameterReadonlyOptionalMapping(_0), input2]), ParameterReadonly = (input) => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Const("readonly", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterReadonlyMapping(_0), input2]), ParameterOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterOptionalMapping(_0), input2]), ParameterType = (input) => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [ParameterTypeMapping(_0), input2]), ParameterBase = (input) => If(If(ParameterReadonlyOptional(input), ([_0, input2]) => [_0, input2], () => If(ParameterReadonly(input), ([_0, input2]) => [_0, input2], () => If(ParameterOptional(input), ([_0, input2]) => [_0, input2], () => If(ParameterType(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [_0, input2]), Parameter2 = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(ParameterBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(ParameterBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ParameterMapping(_0), input2]), ParameterList_0 = (input, result = []) => If(If(Parameter2(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ParameterList_0(input2, [...result, _0]), () => [result, input]), ParameterList = (input) => If(If(ParameterList_0(input), ([_0, input2]) => If(If(If(Parameter2(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ParameterListMapping(_0), input2]), _Function_2 = (input) => If(If(Const("(", input), ([_0, input2]) => If(ParameterList(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => If(Const("=>", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_Function_Mapping(_0), input2]), Constructor2 = (input) => If(If(Const("new", input), ([_0, input2]) => If(Const("(", input2), ([_1, input3]) => If(ParameterList(input3), ([_2, input4]) => If(Const(")", input4), ([_3, input5]) => If(Const("=>", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [ConstructorMapping(_0), input2]), MappedReadonly = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedReadonlyMapping(_0), input2]), MappedOptional = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedOptionalMapping(_0), input2]), MappedAs = (input) => If(If(If(Const("as", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [MappedAsMapping(_0), input2]), Mapped2 = (input) => If(If(Const("{", input), ([_0, input2]) => If(MappedReadonly(input2), ([_1, input3]) => If(Const("[", input3), ([_2, input4]) => If(Ident(input4), ([_3, input5]) => If(Const("in", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => If(MappedAs(input7), ([_6, input8]) => If(Const("]", input8), ([_7, input9]) => If(MappedOptional(input9), ([_8, input10]) => If(Const(":", input10), ([_9, input11]) => If(Type(input11), ([_10, input12]) => If(OptionalSemiColon(input12), ([_11, input13]) => If(Const("}", input13), ([_12, input14]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input14]))))))))))))), ([_0, input2]) => [MappedMapping(_0), input2]), Reference = (input) => If(Ident(input), ([_0, input2]) => [ReferenceMapping(_0), input2]), Options2 = (input) => If(If(Const("Options", input), ([_0, input2]) => If(Const("<", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => If(Const(",", input4), ([_3, input5]) => If(JsonObject(input5), ([_4, input6]) => If(Const(">", input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [OptionsMapping(_0), input2]), JsonNumber = (input) => If(Number3(input), ([_0, input2]) => [JsonNumberMapping(_0), input2]), JsonBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [JsonBooleanMapping(_0), input2]), JsonString = (input) => If(String3(['"', "'"], input), ([_0, input2]) => [_0, input2]), JsonNull = (input) => If(Const("null", input), ([_0, input2]) => [JsonNullMapping(_0), input2]), JsonProperty = (input) => If(If(PropertyKey(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Json(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [JsonPropertyMapping(_0), input2]), JsonPropertyList_0 = (input, result = []) => If(If(JsonProperty(input), ([_0, input2]) => If(PropertyDelimiter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => JsonPropertyList_0(input2, [...result, _0]), () => [result, input]), JsonPropertyList = (input) => If(If(JsonPropertyList_0(input), ([_0, input2]) => If(If(If(JsonProperty(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [JsonPropertyListMapping(_0), input2]), JsonObject = (input) => If(If(Const("{", input), ([_0, input2]) => If(JsonPropertyList(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [JsonObjectMapping(_0), input2]), JsonElementList_0 = (input, result = []) => If(If(Json(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => JsonElementList_0(input2, [...result, _0]), () => [result, input]), JsonElementList = (input) => If(If(JsonElementList_0(input), ([_0, input2]) => If(If(If(Json(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [JsonElementListMapping(_0), input2]), JsonArray = (input) => If(If(Const("[", input), ([_0, input2]) => If(JsonElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [JsonArrayMapping(_0), input2]), Json = (input) => If(If(JsonNumber(input), ([_0, input2]) => [_0, input2], () => If(JsonBoolean(input), ([_0, input2]) => [_0, input2], () => If(JsonString(input), ([_0, input2]) => [_0, input2], () => If(JsonNull(input), ([_0, input2]) => [_0, input2], () => If(JsonObject(input), ([_0, input2]) => [_0, input2], () => If(JsonArray(input), ([_0, input2]) => [_0, input2], () => [])))))), ([_0, input2]) => [_0, input2]), PatternBigInt = (input) => If(Const("-?(?:0|[1-9][0-9]*)n", input), ([_0, input2]) => [PatternBigIntMapping(_0), input2]), PatternString = (input) => If(Const(".*", input), ([_0, input2]) => [PatternStringMapping(_0), input2]), PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?", input), ([_0, input2]) => [PatternNumberMapping(_0), input2]), PatternInteger = (input) => If(Const("-?(?:0|[1-9][0-9]*)", input), ([_0, input2]) => [PatternIntegerMapping(_0), input2]), PatternNever = (input) => If(Const("(?!)", input), ([_0, input2]) => [PatternNeverMapping(_0), input2]), PatternText = (input) => If(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?", "-?(?:0|[1-9][0-9]*)", "(?!)", "(", ")", "$", "|"], input), ([_0, input2]) => [PatternTextMapping(_0), input2]), PatternBase = (input) => If(If(PatternBigInt(input), ([_0, input2]) => [_0, input2], () => If(PatternString(input), ([_0, input2]) => [_0, input2], () => If(PatternNumber(input), ([_0, input2]) => [_0, input2], () => If(PatternInteger(input), ([_0, input2]) => [_0, input2], () => If(PatternNever(input), ([_0, input2]) => [_0, input2], () => If(PatternGroup(input), ([_0, input2]) => [_0, input2], () => If(PatternText(input), ([_0, input2]) => [_0, input2], () => []))))))), ([_0, input2]) => [_0, input2]), PatternGroup = (input) => If(If(Const("(", input), ([_0, input2]) => If(PatternBody(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternGroupMapping(_0), input2]), PatternUnion = (input) => If(If(If(PatternTerm(input), ([_0, input2]) => If(Const("|", input2), ([_1, input3]) => If(PatternUnion(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(PatternTerm(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [PatternUnionMapping(_0), input2]), PatternTerm = (input) => If(If(PatternBase(input), ([_0, input2]) => If(PatternBody(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [PatternTermMapping(_0), input2]), PatternBody = (input) => If(If(PatternUnion(input), ([_0, input2]) => [_0, input2], () => If(PatternTerm(input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [_0, input2]), Pattern = (input) => If(If(Const("^", input), ([_0, input2]) => If(PatternBody(input2), ([_1, input3]) => If(Const("$", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternMapping(_0), input2]), InterfaceDeclarationHeritageList_0 = (input, result = []) => If(If(Type(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => InterfaceDeclarationHeritageList_0(input2, [...result, _0]), () => [result, input]), InterfaceDeclarationHeritageList = (input) => If(If(InterfaceDeclarationHeritageList_0(input), ([_0, input2]) => If(If(If(Type(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [InterfaceDeclarationHeritageListMapping(_0), input2]), InterfaceDeclarationHeritage = (input) => If(If(If(Const("extends", input), ([_0, input2]) => If(InterfaceDeclarationHeritageList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [InterfaceDeclarationHeritageMapping(_0), input2]), InterfaceDeclarationGeneric = (input) => If(If(Const("interface", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(GenericParameters(input3), ([_2, input4]) => If(InterfaceDeclarationHeritage(input4), ([_3, input5]) => If(Properties(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [InterfaceDeclarationGenericMapping(_0), input2]), InterfaceDeclaration = (input) => If(If(Const("interface", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(InterfaceDeclarationHeritage(input3), ([_2, input4]) => If(Properties(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [InterfaceDeclarationMapping(_0), input2]), TypeAliasDeclarationGeneric = (input) => If(If(Const("type", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(GenericParameters(input3), ([_2, input4]) => If(Const("=", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [TypeAliasDeclarationGenericMapping(_0), input2]), TypeAliasDeclaration = (input) => If(If(Const("type", input), ([_0, input2]) => If(Ident(input2), ([_1, input3]) => If(Const("=", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [TypeAliasDeclarationMapping(_0), input2]), ExportKeyword = (input) => If(If(If(Const("export", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExportKeywordMapping(_0), input2]), ModuleDeclarationDelimiter = (input) => If(If(If(Const(";", input), ([_0, input2]) => If(Const(`
|
|
2892
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(Const(`
|
|
2893
|
+
`, input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [_0, input2]), ModuleDeclarationList_0 = (input, result = []) => If(If(ModuleDeclaration(input), ([_0, input2]) => If(ModuleDeclarationDelimiter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ModuleDeclarationList_0(input2, [...result, _0]), () => [result, input]), ModuleDeclarationList = (input) => If(If(ModuleDeclarationList_0(input), ([_0, input2]) => If(If(If(ModuleDeclaration(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleDeclarationListMapping(_0), input2]), ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input2]) => If(If(InterfaceDeclarationGeneric(input2), ([_02, input3]) => [_02, input3], () => If(InterfaceDeclaration(input2), ([_02, input3]) => [_02, input3], () => If(TypeAliasDeclarationGeneric(input2), ([_02, input3]) => [_02, input3], () => If(TypeAliasDeclaration(input2), ([_02, input3]) => [_02, input3], () => [])))), ([_1, input3]) => If(OptionalSemiColon(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [ModuleDeclarationMapping(_0), input2]), Module2 = (input) => If(If(ModuleDeclaration(input), ([_0, input2]) => If(ModuleDeclarationList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleMapping(_0), input2]), Script = (input) => If(If(Module2(input), ([_0, input2]) => [_0, input2], () => If(GenericType(input), ([_0, input2]) => [_0, input2], () => If(Type(input), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [_0, input2]);
|
|
2894
|
+
|
|
2895
|
+
// node_modules/@sinclair/typebox/build/type/engine/patterns/template.mjs
|
|
2896
|
+
function ParseTemplateIntoTypes(template) {
|
|
2897
|
+
let parsed = TemplateLiteralTypes(`\`${template}\``);
|
|
2898
|
+
return guard_exports.IsEqual(parsed.length, 2) ? parsed[0] : Unreachable();
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
// node_modules/@sinclair/typebox/build/type/engine/template_literal/encode.mjs
|
|
2902
|
+
function JoinString(input) {
|
|
2903
|
+
return input.join("|");
|
|
2904
|
+
}
|
|
2905
|
+
function UnwrapTemplateLiteralPattern(pattern) {
|
|
2906
|
+
return pattern.slice(1, pattern.length - 1);
|
|
2907
|
+
}
|
|
2908
|
+
function EncodeLiteral(value, right, pattern) {
|
|
2909
|
+
return EncodeTypes(right, `${pattern}${value}`);
|
|
2910
|
+
}
|
|
2911
|
+
function EncodeBigInt(right, pattern) {
|
|
2912
|
+
return EncodeTypes(right, `${pattern}${BigIntPattern}`);
|
|
2913
|
+
}
|
|
2914
|
+
function EncodeInteger(right, pattern) {
|
|
2915
|
+
return EncodeTypes(right, `${pattern}${IntegerPattern}`);
|
|
2916
|
+
}
|
|
2917
|
+
function EncodeNumber(right, pattern) {
|
|
2918
|
+
return EncodeTypes(right, `${pattern}${NumberPattern}`);
|
|
2919
|
+
}
|
|
2920
|
+
function EncodeBoolean(right, pattern) {
|
|
2921
|
+
return EncodeType(Union([Literal("false"), Literal("true")]), right, pattern);
|
|
2922
|
+
}
|
|
2923
|
+
function EncodeString(right, pattern) {
|
|
2924
|
+
return EncodeTypes(right, `${pattern}${StringPattern}`);
|
|
2925
|
+
}
|
|
2926
|
+
function EncodeTemplateLiteral(templatePattern, right, pattern) {
|
|
2927
|
+
return EncodeTypes(right, `${pattern}${UnwrapTemplateLiteralPattern(templatePattern)}`);
|
|
2928
|
+
}
|
|
2929
|
+
function EncodeTemplateLiteralDeferred(types, right, pattern) {
|
|
2930
|
+
let templateLiteral = TemplateLiteralAction(types, {});
|
|
2931
|
+
return EncodeType(templateLiteral, right, pattern);
|
|
2932
|
+
}
|
|
2933
|
+
function EncodeEnum(types, right, pattern) {
|
|
2934
|
+
let variants = EnumValuesToVariants(types);
|
|
2935
|
+
return EncodeUnion(variants, right, pattern);
|
|
2936
|
+
}
|
|
2937
|
+
function EncodeUnion(types, right, pattern, result = []) {
|
|
2938
|
+
return guard_exports.TakeLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], "")]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));
|
|
2939
|
+
}
|
|
2940
|
+
function EncodeType(type, right, pattern) {
|
|
2941
|
+
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) : IsBoolean2(type) ? EncodeBoolean(right, pattern) : IsNumber2(type) ? EncodeNumber(right, pattern) : IsString2(type) ? EncodeString(right, pattern) : IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) : IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) : IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) : NeverPattern;
|
|
2942
|
+
}
|
|
2943
|
+
function EncodeTypes(types, pattern) {
|
|
2944
|
+
return guard_exports.TakeLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);
|
|
2945
|
+
}
|
|
2946
|
+
function EncodePattern(types) {
|
|
2947
|
+
return `^${EncodeTypes(types, "")}$`;
|
|
2948
|
+
}
|
|
2949
|
+
function TemplateLiteralEncode(types) {
|
|
2950
|
+
let pattern = EncodePattern(types);
|
|
2951
|
+
return TemplateLiteralCreate(pattern);
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
// node_modules/@sinclair/typebox/build/type/engine/template_literal/instantiate.mjs
|
|
2955
|
+
function TemplateLiteralAction(types, options) {
|
|
2956
|
+
return CanInstantiate(types) ? memory_exports.Update(TemplateLiteralEncode(types), {}, options) : TemplateLiteralDeferred(types, options);
|
|
2957
|
+
}
|
|
2958
|
+
function TemplateLiteralInstantiate(context, state, types, options) {
|
|
2959
|
+
let instantiatedTypes = InstantiateTypes(context, state, types);
|
|
2960
|
+
return TemplateLiteralAction(instantiatedTypes, options);
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
// node_modules/@sinclair/typebox/build/type/types/template_literal.mjs
|
|
2964
|
+
function TemplateLiteralDeferred(types, options = {}) {
|
|
2965
|
+
return Deferred("TemplateLiteral", [types], options);
|
|
2966
|
+
}
|
|
2967
|
+
function IsTemplateLiteralDeferred(value) {
|
|
2968
|
+
return IsSchema(value) && guard_exports.HasPropertyKey(value, "action") && guard_exports.IsEqual(value.action, "TemplateLiteral");
|
|
2969
|
+
}
|
|
2970
|
+
function TemplateLiteralFromTypes(types) {
|
|
2971
|
+
return TemplateLiteralAction(types, {});
|
|
2972
|
+
}
|
|
2973
|
+
function TemplateLiteralFromString(template) {
|
|
2974
|
+
let types = ParseTemplateIntoTypes(template);
|
|
2975
|
+
return TemplateLiteralFromTypes(types);
|
|
2976
|
+
}
|
|
2977
|
+
function TemplateLiteral2(input, options = {}) {
|
|
2978
|
+
let type = guard_exports.IsString(input) ? TemplateLiteralFromString(input) : TemplateLiteralFromTypes(input);
|
|
2979
|
+
return memory_exports.Update(type, {}, options);
|
|
2980
|
+
}
|
|
2981
|
+
function IsTemplateLiteral(value) {
|
|
2982
|
+
return IsKind(value, "TemplateLiteral");
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
// node_modules/@sinclair/typebox/build/type/extends/result.mjs
|
|
2986
|
+
var result_exports = {};
|
|
2987
|
+
__export(result_exports, {
|
|
2988
|
+
ExtendsFalse: () => ExtendsFalse,
|
|
2989
|
+
ExtendsTrue: () => ExtendsTrue,
|
|
2990
|
+
ExtendsUnion: () => ExtendsUnion,
|
|
2991
|
+
IsExtendsFalse: () => IsExtendsFalse,
|
|
2992
|
+
IsExtendsTrue: () => IsExtendsTrue,
|
|
2993
|
+
IsExtendsTrueLike: () => IsExtendsTrueLike,
|
|
2994
|
+
IsExtendsUnion: () => IsExtendsUnion,
|
|
2995
|
+
Match: () => Match3
|
|
2996
|
+
});
|
|
2997
|
+
function ExtendsUnion(inferred) {
|
|
2998
|
+
return memory_exports.Create({ "~kind": "ExtendsUnion" }, { inferred });
|
|
2999
|
+
}
|
|
3000
|
+
function IsExtendsUnion(value) {
|
|
3001
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "inferred") && guard_exports.IsEqual(value["~kind"], "ExtendsUnion") && guard_exports.IsObject(value.inferred);
|
|
3002
|
+
}
|
|
3003
|
+
function ExtendsTrue(inferred) {
|
|
3004
|
+
return memory_exports.Create({ "~kind": "ExtendsTrue" }, { inferred });
|
|
3005
|
+
}
|
|
3006
|
+
function IsExtendsTrue(value) {
|
|
3007
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "inferred") && guard_exports.IsEqual(value["~kind"], "ExtendsTrue") && guard_exports.IsObject(value.inferred);
|
|
3008
|
+
}
|
|
3009
|
+
function ExtendsFalse() {
|
|
3010
|
+
return memory_exports.Create({ "~kind": "ExtendsFalse" }, {});
|
|
3011
|
+
}
|
|
3012
|
+
function IsExtendsFalse(value) {
|
|
3013
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.IsEqual(value["~kind"], "ExtendsFalse");
|
|
3014
|
+
}
|
|
3015
|
+
function IsExtendsTrueLike(value) {
|
|
3016
|
+
return IsExtendsUnion(value) || IsExtendsTrue(value);
|
|
3017
|
+
}
|
|
3018
|
+
function Match3(result, true_, false_) {
|
|
3019
|
+
return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
// node_modules/@sinclair/typebox/build/type/extends/extends_right.mjs
|
|
3023
|
+
function ExtendsRightInfer(inferred, name, left, right) {
|
|
3024
|
+
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => ExtendsTrue(memory_exports.Assign(memory_exports.Assign(inferred, checkInferred), { [name]: left })), () => ExtendsFalse());
|
|
3025
|
+
}
|
|
3026
|
+
function ExtendsRightAny(inferred, _left) {
|
|
3027
|
+
return ExtendsTrue(inferred);
|
|
3028
|
+
}
|
|
3029
|
+
function ExtendsRightEnum(inferred, left, right) {
|
|
3030
|
+
let union = EnumValuesToUnion(right);
|
|
3031
|
+
return ExtendsLeft(inferred, left, union);
|
|
3032
|
+
}
|
|
3033
|
+
function ExtendsRightIntersect(inferred, left, right) {
|
|
3034
|
+
return guard_exports.TakeLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsRightIntersect(inferred2, left, tail), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
3035
|
+
}
|
|
3036
|
+
function ExtendsRightTemplateLiteral(inferred, left, right) {
|
|
3037
|
+
let decoded = TemplateLiteralDecode(right);
|
|
3038
|
+
return ExtendsLeft(inferred, left, decoded);
|
|
3039
|
+
}
|
|
3040
|
+
function ExtendsRightUnion(inferred, left, right) {
|
|
3041
|
+
return guard_exports.TakeLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsRightUnion(inferred, left, tail)), () => ExtendsFalse());
|
|
3042
|
+
}
|
|
3043
|
+
function ExtendsRight(inferred, left, right) {
|
|
3044
|
+
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
// node_modules/@sinclair/typebox/build/type/extends/any.mjs
|
|
3048
|
+
function ExtendsAny(inferred, left, right) {
|
|
3049
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsUnion(inferred);
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
// node_modules/@sinclair/typebox/build/type/extends/array.mjs
|
|
3053
|
+
function ExtendsImmutable(left, right) {
|
|
3054
|
+
let isImmutableLeft = IsImmutable(left), isImmutableRight = IsImmutable(right);
|
|
3055
|
+
return isImmutableLeft && isImmutableRight || !isImmutableLeft && isImmutableRight ? !0 : !(isImmutableLeft && !isImmutableRight);
|
|
3056
|
+
}
|
|
3057
|
+
function ExtendsArray(inferred, arrayLeft, left, right) {
|
|
3058
|
+
return IsArray2(right) ? ExtendsImmutable(arrayLeft, right) ? ExtendsLeft(inferred, left, right.items) : ExtendsFalse() : ExtendsRight(inferred, arrayLeft, right);
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
// node_modules/@sinclair/typebox/build/type/extends/async_iterator.mjs
|
|
3062
|
+
function ExtendsAsyncIterator(inferred, left, right) {
|
|
3063
|
+
return IsAsyncIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, AsyncIterator(left), right);
|
|
3064
|
+
}
|
|
3065
|
+
|
|
3066
|
+
// node_modules/@sinclair/typebox/build/type/extends/bigint.mjs
|
|
3067
|
+
function ExtendsBigInt(inferred, left, right) {
|
|
3068
|
+
return IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
// node_modules/@sinclair/typebox/build/type/extends/boolean.mjs
|
|
3072
|
+
function ExtendsBoolean(inferred, left, right) {
|
|
3073
|
+
return IsBoolean2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
// node_modules/@sinclair/typebox/build/type/extends/parameters.mjs
|
|
3077
|
+
function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
3078
|
+
let checkLeft = IsInfer(right) ? left : right, checkRight = IsInfer(right) ? right : left, isLeftOptional = IsOptional(left), isRightOptional = IsOptional(right);
|
|
3079
|
+
return !isLeftOptional && isRightOptional ? ExtendsFalse() : Match3(ExtendsLeft(inferred, checkLeft, checkRight), (inferred2) => ExtendsParameters(inferred2, leftRest, rightRest), () => ExtendsFalse());
|
|
3080
|
+
}
|
|
3081
|
+
function ParameterRight(inferred, left, leftRest, rightRest) {
|
|
3082
|
+
return guard_exports.TakeLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
3083
|
+
}
|
|
3084
|
+
function ParametersLeft(inferred, left, rightRest) {
|
|
3085
|
+
return guard_exports.TakeLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => ExtendsTrue(inferred));
|
|
3086
|
+
}
|
|
3087
|
+
function ExtendsParameters(inferred, left, right) {
|
|
3088
|
+
return ParametersLeft(inferred, left, right);
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
// node_modules/@sinclair/typebox/build/type/extends/return_type.mjs
|
|
3092
|
+
function ExtendsReturnType(inferred, left, right) {
|
|
3093
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsLeft(inferred, left, right);
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
// node_modules/@sinclair/typebox/build/type/extends/constructor.mjs
|
|
3097
|
+
function ExtendsConstructor(inferred, parameters, returnType, right) {
|
|
3098
|
+
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsConstructor2(right) ? Match3(ExtendsParameters(inferred, parameters, right.parameters), (inferred2) => ExtendsReturnType(inferred2, returnType, right.instanceType), () => ExtendsFalse()) : ExtendsFalse();
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
// node_modules/@sinclair/typebox/build/type/extends/enum.mjs
|
|
3102
|
+
function ExtendsEnum(inferred, left, right) {
|
|
3103
|
+
return ExtendsLeft(inferred, EnumToUnion(left), right);
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
// node_modules/@sinclair/typebox/build/type/extends/function.mjs
|
|
3107
|
+
function ExtendsFunction(inferred, parameters, returnType, right) {
|
|
3108
|
+
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsFunction2(right) ? Match3(ExtendsParameters(inferred, parameters, right.parameters), (inferred2) => ExtendsReturnType(inferred2, returnType, right.returnType), () => ExtendsFalse()) : ExtendsFalse();
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
// node_modules/@sinclair/typebox/build/type/extends/integer.mjs
|
|
3112
|
+
function ExtendsInteger(inferred, left, right) {
|
|
3113
|
+
return IsInteger2(right) ? ExtendsTrue(inferred) : IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
// node_modules/@sinclair/typebox/build/type/extends/intersect.mjs
|
|
3117
|
+
function ExtendsIntersect(inferred, left, right) {
|
|
3118
|
+
let evaluated = EvaluateIntersect(left);
|
|
3119
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
// node_modules/@sinclair/typebox/build/type/extends/iterator.mjs
|
|
3123
|
+
function ExtendsIterator(inferred, left, right) {
|
|
3124
|
+
return IsIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, Iterator(left), right);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
// node_modules/@sinclair/typebox/build/type/extends/literal.mjs
|
|
3128
|
+
function ExtendsLiteralValue(inferred, left, right) {
|
|
3129
|
+
return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
3130
|
+
}
|
|
3131
|
+
function ExtendsLiteralBigInt(inferred, left, right) {
|
|
3132
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
3133
|
+
}
|
|
3134
|
+
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
3135
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
3136
|
+
}
|
|
3137
|
+
function ExtendsLiteralNumber(inferred, left, right) {
|
|
3138
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
3139
|
+
}
|
|
3140
|
+
function ExtendsLiteralString(inferred, left, right) {
|
|
3141
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
3142
|
+
}
|
|
3143
|
+
function ExtendsLiteral(inferred, left, right) {
|
|
3144
|
+
return guard_exports.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : guard_exports.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : guard_exports.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : guard_exports.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
// node_modules/@sinclair/typebox/build/type/extends/never.mjs
|
|
3148
|
+
function ExtendsNever(inferred, left, right) {
|
|
3149
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : ExtendsTrue(inferred);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
// node_modules/@sinclair/typebox/build/type/extends/null.mjs
|
|
3153
|
+
function ExtendsNull(inferred, left, right) {
|
|
3154
|
+
return IsNull2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
// node_modules/@sinclair/typebox/build/type/extends/number.mjs
|
|
3158
|
+
function ExtendsNumber(inferred, left, right) {
|
|
3159
|
+
return IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
// node_modules/@sinclair/typebox/build/type/extends/object.mjs
|
|
3163
|
+
function ExtendsPropertyOptional(inferred, left, right) {
|
|
3164
|
+
return IsOptional(left) ? IsOptional(right) ? ExtendsTrue(inferred) : ExtendsFalse() : ExtendsTrue(inferred);
|
|
3165
|
+
}
|
|
3166
|
+
function ExtendsProperty(inferred, left, right) {
|
|
3167
|
+
return (
|
|
3168
|
+
// Right TInfer<TNever> is TExtendsFalse
|
|
3169
|
+
IsInfer(right) && IsNever(right.extends) ? ExtendsFalse() : Match3(ExtendsLeft(inferred, left, right), (inferred2) => ExtendsPropertyOptional(inferred2, left, right), () => ExtendsFalse())
|
|
3170
|
+
);
|
|
3171
|
+
}
|
|
3172
|
+
function ExtractInferredProperties(keys, properties) {
|
|
3173
|
+
return keys.reduce((result, key) => key in properties ? IsExtendsTrueLike(properties[key]) ? { ...result, ...properties[key].inferred } : Unreachable() : Unreachable(), {});
|
|
3174
|
+
}
|
|
3175
|
+
function ExtendsPropertiesComparer(inferred, left, right) {
|
|
3176
|
+
let properties = {};
|
|
3177
|
+
for (let rightKey of guard_exports.Keys(right))
|
|
3178
|
+
properties[rightKey] = rightKey in left ? ExtendsProperty({}, left[rightKey], right[rightKey]) : IsOptional(right[rightKey]) ? IsInfer(right[rightKey]) ? ExtendsTrue(memory_exports.Assign(inferred, { [right[rightKey].name]: right[rightKey].extends })) : ExtendsTrue(inferred) : ExtendsFalse();
|
|
3179
|
+
let checked = guard_exports.Values(properties).every((result) => IsExtendsTrueLike(result)), extracted = checked ? ExtractInferredProperties(guard_exports.Keys(properties), properties) : {};
|
|
3180
|
+
return checked ? ExtendsTrue(extracted) : ExtendsFalse();
|
|
3181
|
+
}
|
|
3182
|
+
function ExtendsProperties(inferred, left, right) {
|
|
3183
|
+
let compared = ExtendsPropertiesComparer(inferred, left, right);
|
|
3184
|
+
return IsExtendsTrueLike(compared) ? ExtendsTrue(memory_exports.Assign(inferred, compared.inferred)) : ExtendsFalse();
|
|
3185
|
+
}
|
|
3186
|
+
function ExtendsObjectToObject(inferred, left, right) {
|
|
3187
|
+
return ExtendsProperties(inferred, left, right);
|
|
3188
|
+
}
|
|
3189
|
+
function ExtendsObject(inferred, left, right) {
|
|
3190
|
+
return IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
// node_modules/@sinclair/typebox/build/type/extends/promise.mjs
|
|
3194
|
+
function ExtendsPromise(inferred, left, right) {
|
|
3195
|
+
return IsPromise(right) ? ExtendsLeft(inferred, left, right.item) : ExtendsRight(inferred, _Promise_(left), right);
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
// node_modules/@sinclair/typebox/build/type/extends/string.mjs
|
|
3199
|
+
function ExtendsString(inferred, left, right) {
|
|
3200
|
+
return IsString2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
// node_modules/@sinclair/typebox/build/type/extends/symbol.mjs
|
|
3204
|
+
function ExtendsSymbol(inferred, left, right) {
|
|
3205
|
+
return IsSymbol2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
// node_modules/@sinclair/typebox/build/type/extends/template_literal.mjs
|
|
3209
|
+
function ExtendsTemplateLiteral(inferred, left, right) {
|
|
3210
|
+
let decoded = TemplateLiteralDecode(left);
|
|
3211
|
+
return ExtendsLeft(inferred, decoded, right);
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
// node_modules/@sinclair/typebox/build/type/extends/inference.mjs
|
|
3215
|
+
function Inferrable(name, type) {
|
|
3216
|
+
return memory_exports.Create({ "~kind": "Inferrable" }, { name, type }, {});
|
|
3217
|
+
}
|
|
3218
|
+
function IsInferable(value) {
|
|
3219
|
+
return guard_exports.IsObject(value) && guard_exports.HasPropertyKey(value, "~kind") && guard_exports.HasPropertyKey(value, "name") && guard_exports.HasPropertyKey(value, "type") && guard_exports.IsEqual(value["~kind"], "Inferrable") && guard_exports.IsString(value.name) && guard_exports.IsObject(value.type);
|
|
3220
|
+
}
|
|
3221
|
+
function TryRestInferable(type) {
|
|
3222
|
+
return IsRest(type) ? IsInfer(type.items) ? IsArray2(type.items.extends) ? Inferrable(type.items.name, type.items.extends.items) : IsUnknown(type.items.extends) ? Inferrable(type.items.name, type.items.extends) : void 0 : Unreachable() : void 0;
|
|
3223
|
+
}
|
|
3224
|
+
function TryInferable(type) {
|
|
3225
|
+
return IsInfer(type) ? Inferrable(type.name, type.extends) : void 0;
|
|
3226
|
+
}
|
|
3227
|
+
function TryInferResults(rest, right, result = []) {
|
|
3228
|
+
return guard_exports.TakeLeft(rest, (head, tail) => Match3(ExtendsLeft({}, head, right), () => TryInferResults(tail, right, [...result, head]), () => {
|
|
3229
|
+
}), () => result);
|
|
3230
|
+
}
|
|
3231
|
+
function InferTupleResult(inferred, name, left, right) {
|
|
3232
|
+
let results = TryInferResults(left, right);
|
|
3233
|
+
return guard_exports.IsArray(results) ? ExtendsTrue(memory_exports.Assign(inferred, { [name]: Tuple(results) })) : ExtendsFalse();
|
|
3234
|
+
}
|
|
3235
|
+
function InferUnionResult(inferred, name, left, right) {
|
|
3236
|
+
let results = TryInferResults(left, right);
|
|
3237
|
+
return guard_exports.IsArray(results) ? ExtendsTrue(memory_exports.Assign(inferred, { [name]: Union(results) })) : ExtendsFalse();
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
// node_modules/@sinclair/typebox/build/type/extends/tuple.mjs
|
|
3241
|
+
function Reverse(types) {
|
|
3242
|
+
return [...types].reverse();
|
|
3243
|
+
}
|
|
3244
|
+
function ApplyReverse(types, reversed) {
|
|
3245
|
+
return reversed ? Reverse(types) : types;
|
|
3246
|
+
}
|
|
3247
|
+
function Reversed(types) {
|
|
3248
|
+
let first = types.length > 0 ? types[0] : void 0, inferrable = IsSchema(first) ? TryRestInferable(first) : void 0;
|
|
3249
|
+
return IsSchema(inferrable);
|
|
3250
|
+
}
|
|
3251
|
+
function ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {
|
|
3252
|
+
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => Elements(checkInferred, reversed, leftRest, rightRest), () => ExtendsFalse());
|
|
3253
|
+
}
|
|
3254
|
+
function ElementsLeft(inferred, reversed, leftRest, right, rightRest) {
|
|
3255
|
+
let inferable = TryRestInferable(right);
|
|
3256
|
+
return (
|
|
3257
|
+
// Rest Inferrable Right Means we delegate to TInferTupleResult to Generate a Result
|
|
3258
|
+
IsInferable(inferable) ? InferTupleResult(inferred, inferable.name, ApplyReverse(leftRest, reversed), inferable.type) : guard_exports.TakeLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => ExtendsFalse())
|
|
3259
|
+
);
|
|
3260
|
+
}
|
|
3261
|
+
function ElementsRight(inferred, reversed, leftRest, rightRest) {
|
|
3262
|
+
return guard_exports.TakeLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => guard_exports.IsEqual(leftRest.length, 0) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
3263
|
+
}
|
|
3264
|
+
function Elements(inferred, reversed, leftRest, rightRest) {
|
|
3265
|
+
return ElementsRight(inferred, reversed, leftRest, rightRest);
|
|
3266
|
+
}
|
|
3267
|
+
function ExtendsTupleToTuple(inferred, left, right) {
|
|
3268
|
+
let instantiatedRight = InstantiateElements(inferred, { callstack: [] }, right), reversed = Reversed(instantiatedRight);
|
|
3269
|
+
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
3270
|
+
}
|
|
3271
|
+
function ExtendsTupleToArray(inferred, left, right) {
|
|
3272
|
+
let inferrable = TryInferable(right);
|
|
3273
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : guard_exports.TakeLeft(left, (head, tail) => Match3(ExtendsLeft(inferred, head, right), (inferred2) => ExtendsTupleToArray(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
3274
|
+
}
|
|
3275
|
+
function ExtendsTuple(inferred, left, right) {
|
|
3276
|
+
let instantiatedLeft = InstantiateElements(inferred, { callstack: [] }, left);
|
|
3277
|
+
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray2(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
// node_modules/@sinclair/typebox/build/type/extends/undefined.mjs
|
|
3281
|
+
function ExtendsUndefined(inferred, left, right) {
|
|
3282
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
// node_modules/@sinclair/typebox/build/type/extends/union.mjs
|
|
3286
|
+
function ExtendsUnionSome(inferred, type, unionTypes) {
|
|
3287
|
+
return guard_exports.TakeLeft(unionTypes, (head, tail) => Match3(ExtendsLeft(inferred, type, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsUnionSome(inferred, type, tail)), () => ExtendsFalse());
|
|
3288
|
+
}
|
|
3289
|
+
function ExtendsUnionLeft(inferred, left, right) {
|
|
3290
|
+
return guard_exports.TakeLeft(left, (head, tail) => Match3(ExtendsUnionSome(inferred, head, right), (inferred2) => ExtendsUnionLeft(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
3291
|
+
}
|
|
3292
|
+
function ExtendsUnion2(inferred, left, right) {
|
|
3293
|
+
let inferrable = TryInferable(right);
|
|
3294
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : IsUnion(right) ? ExtendsUnionLeft(inferred, left, right.anyOf) : ExtendsUnionLeft(inferred, left, [right]);
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
// node_modules/@sinclair/typebox/build/type/extends/unknown.mjs
|
|
3298
|
+
function ExtendsUnknown(inferred, left, right) {
|
|
3299
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
// node_modules/@sinclair/typebox/build/type/extends/void.mjs
|
|
3303
|
+
function ExtendsVoid(inferred, left, right) {
|
|
3304
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
// node_modules/@sinclair/typebox/build/type/extends/extends_left.mjs
|
|
3308
|
+
function ExtendsLeft(inferred, left, right) {
|
|
3309
|
+
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsAsyncIterator2(left) ? ExtendsAsyncIterator(inferred, left.iteratorItems, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean2(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor2(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsEnum(left) ? ExtendsEnum(inferred, left, right) : IsFunction2(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger2(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsIterator2(left) ? ExtendsIterator(inferred, left.iteratorItems, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull2(left) ? ExtendsNull(inferred, left, right) : IsNumber2(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsPromise(left) ? ExtendsPromise(inferred, left.item, right) : IsString2(left) ? ExtendsString(inferred, left, right) : IsSymbol2(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined2(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/check.mjs
|
|
3313
|
+
function FromRef(stack, context, ref) {
|
|
3314
|
+
return stack.includes(ref) ? !0 : FromType15([...stack, ref], context, context[ref]);
|
|
3315
|
+
}
|
|
3316
|
+
function FromProperties(stack, context, properties) {
|
|
3317
|
+
let types = PropertyValues(properties);
|
|
3318
|
+
return FromTypes3(stack, context, types);
|
|
3319
|
+
}
|
|
3320
|
+
function FromTypes3(stack, context, types) {
|
|
3321
|
+
return guard_exports.TakeLeft(types, (left, right) => FromType15(stack, context, left) ? !0 : FromTypes3(stack, context, right), () => !1);
|
|
3322
|
+
}
|
|
3323
|
+
function FromType15(stack, context, type) {
|
|
3324
|
+
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray2(type) ? FromType15(stack, context, type.items) : IsAsyncIterator2(type) ? FromType15(stack, context, type.iteratorItems) : IsConstructor2(type) ? FromTypes3(stack, context, [...type.parameters, type.instanceType]) : IsFunction2(type) ? FromTypes3(stack, context, [...type.parameters, type.returnType]) : IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) : IsIntersect(type) ? FromTypes3(stack, context, type.allOf) : IsIterator2(type) ? FromType15(stack, context, type.iteratorItems) : IsObject2(type) ? FromProperties(stack, context, type.properties) : IsPromise(type) ? FromType15(stack, context, type.item) : IsUnion(type) ? FromTypes3(stack, context, type.anyOf) : IsTuple(type) ? FromTypes3(stack, context, type.items) : IsRecord(type) ? FromType15(stack, context, RecordValue(type)) : !1;
|
|
3325
|
+
}
|
|
3326
|
+
function CyclicCheck(stack, context, type) {
|
|
3327
|
+
return FromType15(stack, context, type);
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/candidates.mjs
|
|
3331
|
+
function ResolveCandidateKeys(context, keys) {
|
|
3332
|
+
return keys.reduce((result, left) => left in context ? CyclicCheck([left], context, context[left]) ? [...result, left] : result : Unreachable(), []);
|
|
3333
|
+
}
|
|
3334
|
+
function CyclicCandidates(context) {
|
|
3335
|
+
let keys = PropertyKeys(context);
|
|
3336
|
+
return ResolveCandidateKeys(context, keys);
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/dependencies.mjs
|
|
3340
|
+
function FromRef2(context, ref, result) {
|
|
3341
|
+
return result.includes(ref) ? result : ref in context ? FromType16(context, context[ref], [...result, ref]) : Unreachable();
|
|
3342
|
+
}
|
|
3343
|
+
function FromProperties2(context, properties, result) {
|
|
3344
|
+
let types = PropertyValues(properties);
|
|
3345
|
+
return FromTypes4(context, types, result);
|
|
3346
|
+
}
|
|
3347
|
+
function FromTypes4(context, types, result) {
|
|
3348
|
+
return types.reduce((result2, left) => FromType16(context, left, result2), result);
|
|
3349
|
+
}
|
|
3350
|
+
function FromType16(context, type, result) {
|
|
3351
|
+
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray2(type) ? FromType16(context, type.items, result) : IsAsyncIterator2(type) ? FromType16(context, type.iteratorItems, result) : IsConstructor2(type) ? FromTypes4(context, [...type.parameters, type.instanceType], result) : IsFunction2(type) ? FromTypes4(context, [...type.parameters, type.returnType], result) : IsInterfaceDeferred(type) ? FromProperties2(context, type.parameters[1], result) : IsIntersect(type) ? FromTypes4(context, type.allOf, result) : IsIterator2(type) ? FromType16(context, type.iteratorItems, result) : IsObject2(type) ? FromProperties2(context, type.properties, result) : IsPromise(type) ? FromType16(context, type.item, result) : IsUnion(type) ? FromTypes4(context, type.anyOf, result) : IsTuple(type) ? FromTypes4(context, type.items, result) : IsRecord(type) ? FromType16(context, RecordValue(type), result) : result;
|
|
3352
|
+
}
|
|
3353
|
+
function CyclicDependencies(context, key, type) {
|
|
3354
|
+
return FromType16(context, type, [key]);
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3357
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/extends.mjs
|
|
3358
|
+
function FromRef3(_ref) {
|
|
3359
|
+
return Any();
|
|
3360
|
+
}
|
|
3361
|
+
function FromProperties3(properties) {
|
|
3362
|
+
return guard_exports.Keys(properties).reduce((result, key) => ({ ...result, [key]: FromType17(properties[key]) }), {});
|
|
3363
|
+
}
|
|
3364
|
+
function FromTypes5(types) {
|
|
3365
|
+
return types.reduce((result, left) => [...result, FromType17(left)], []);
|
|
3366
|
+
}
|
|
3367
|
+
function FromType17(type) {
|
|
3368
|
+
return IsRef(type) ? FromRef3(type.$ref) : IsArray2(type) ? _Array_(FromType17(type.items), ArrayOptions(type)) : IsAsyncIterator2(type) ? AsyncIterator(FromType17(type.iteratorItems)) : IsConstructor2(type) ? Constructor(FromTypes5(type.parameters), FromType17(type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes5(type.parameters), FromType17(type.returnType)) : IsIntersect(type) ? Intersect(FromTypes5(type.allOf)) : IsIterator2(type) ? Iterator(FromType17(type.iteratorItems)) : IsObject2(type) ? _Object_(FromProperties3(type.properties)) : IsPromise(type) ? _Promise_(FromType17(type.item)) : IsRecord(type) ? Record(RecordKey(type), FromType17(RecordValue(type))) : IsUnion(type) ? Union(FromTypes5(type.anyOf)) : IsTuple(type) ? Tuple(FromTypes5(type.items)) : type;
|
|
3369
|
+
}
|
|
3370
|
+
function CyclicAnyFromParameters(defs, ref) {
|
|
3371
|
+
return ref in defs ? FromType17(defs[ref]) : Unknown();
|
|
3372
|
+
}
|
|
3373
|
+
function CyclicExtends(type) {
|
|
3374
|
+
return CyclicAnyFromParameters(type.$defs, type.$ref);
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
// node_modules/@sinclair/typebox/build/type/engine/cyclic/instantiate.mjs
|
|
3378
|
+
function CyclicInterface(context, heritage, properties) {
|
|
3379
|
+
let instantiatedHeritage = InstantiateTypes(context, { callstack: [] }, heritage), instantiatedProperties = InstantiateProperties({}, { callstack: [] }, properties);
|
|
3380
|
+
return EvaluateIntersect([...instantiatedHeritage, _Object_(instantiatedProperties)]);
|
|
3381
|
+
}
|
|
3382
|
+
function CyclicDefinitions(context, dependencies) {
|
|
3383
|
+
return guard_exports.Keys(context).filter((key) => dependencies.includes(key)).reduce((result, key) => {
|
|
3384
|
+
let type = context[key], instantiatedType = IsInterfaceDeferred(type) ? CyclicInterface(context, type.parameters[0], type.parameters[1]) : type;
|
|
3385
|
+
return { ...result, [key]: instantiatedType };
|
|
3386
|
+
}, {});
|
|
3387
|
+
}
|
|
3388
|
+
function InstantiateCyclic(context, ref, type) {
|
|
3389
|
+
let dependencies = CyclicDependencies(context, ref, type), definitions = CyclicDefinitions(context, dependencies);
|
|
3390
|
+
return Cyclic(definitions, ref);
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3393
|
+
// node_modules/@sinclair/typebox/build/type/extends/extends.mjs
|
|
3394
|
+
function Canonical(type) {
|
|
3395
|
+
return IsCyclic(type) ? CyclicExtends(type) : IsUnsafe(type) ? Unknown() : type;
|
|
3396
|
+
}
|
|
3397
|
+
function Extends(inferred, left, right) {
|
|
3398
|
+
let canonicalLeft = Canonical(left), canonicalRight = Canonical(right);
|
|
3399
|
+
return ExtendsLeft(inferred, canonicalLeft, canonicalRight);
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/compare.mjs
|
|
3403
|
+
var ResultEqual = "equal", ResultDisjoint = "disjoint", ResultLeftInside = "left-inside", ResultRightInside = "right-inside";
|
|
3404
|
+
function Compare(left, right) {
|
|
3405
|
+
let extendsCheck = [
|
|
3406
|
+
IsUnknown(left) ? result_exports.ExtendsFalse() : Extends({}, left, right),
|
|
3407
|
+
IsUnknown(left) ? result_exports.ExtendsTrue({}) : Extends({}, right, left)
|
|
3408
|
+
];
|
|
3409
|
+
return result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? ResultEqual : result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsFalse(extendsCheck[1]) ? ResultLeftInside : result_exports.IsExtendsFalse(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? ResultRightInside : ResultDisjoint;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
// node_modules/@sinclair/typebox/build/type/engine/evaluate/broaden.mjs
|
|
3413
|
+
function BroadFilter(type, types) {
|
|
3414
|
+
return types.filter((left) => Compare(type, left) !== ResultRightInside);
|
|
3415
|
+
}
|
|
3416
|
+
function IsBroadestType(type, types) {
|
|
3417
|
+
let result = types.some((left) => {
|
|
3418
|
+
let result2 = Compare(type, left);
|
|
3419
|
+
return guard_exports.IsEqual(result2, ResultLeftInside) || guard_exports.IsEqual(result2, ResultEqual);
|
|
3420
|
+
});
|
|
3421
|
+
return guard_exports.IsEqual(result, !1);
|
|
3422
|
+
}
|
|
3423
|
+
function BroadenType(type, types) {
|
|
3424
|
+
let evaluated = EvaluateType(type);
|
|
3425
|
+
return IsAny(evaluated) ? [evaluated] : IsBroadestType(evaluated, types) ? [...BroadFilter(evaluated, types), evaluated] : types;
|
|
3426
|
+
}
|
|
3427
|
+
function BroadenTypes(types) {
|
|
3428
|
+
return types.reduce((result, left) => IsObject2(left) ? [...result, left] : (
|
|
3429
|
+
// push
|
|
3430
|
+
IsNever(left) ? result : (
|
|
3431
|
+
// ignore
|
|
3432
|
+
BroadenType(left, result)
|
|
3433
|
+
)
|
|
3434
|
+
), []);
|
|
3435
|
+
}
|
|
3436
|
+
function Broaden(types) {
|
|
3437
|
+
let broadened = BroadenTypes(types), flattened = Flatten(broadened);
|
|
3438
|
+
return flattened.length === 0 ? Never() : flattened.length === 1 ? flattened[0] : Union(flattened);
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
// node_modules/@sinclair/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
3442
|
+
function CollectDistributionNames(expression, result = []) {
|
|
3443
|
+
return (
|
|
3444
|
+
// Conditional
|
|
3445
|
+
IsDeferred(expression) && guard_exports.IsEqual(expression.action, "Conditional") ? IsRef(expression.parameters[0]) ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0].$ref])) : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result)) : IsDeferred(expression) && guard_exports.IsEqual(expression.action, "Mapped") && IsDeferred(expression.parameters[1]) && guard_exports.IsEqual(expression.parameters[1].action, "KeyOf") && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0].$ref] : result
|
|
3446
|
+
);
|
|
3447
|
+
}
|
|
3448
|
+
function BuildDistributionArray(parameters, names) {
|
|
3449
|
+
return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);
|
|
3450
|
+
}
|
|
3451
|
+
function ZipDistributionArray(arguments_, distributionArray, result = []) {
|
|
3452
|
+
return guard_exports.TakeLeft(arguments_, (argumentLeft, argumentRight) => guard_exports.TakeLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);
|
|
3453
|
+
}
|
|
3454
|
+
function Expand(type) {
|
|
3455
|
+
return IsUnion(type) ? [...type.anyOf] : [type];
|
|
3456
|
+
}
|
|
3457
|
+
function Append(current, type) {
|
|
3458
|
+
return current.reduce((result, left) => [...result, [...left, type]], []);
|
|
3459
|
+
}
|
|
3460
|
+
function Cross(current, variants) {
|
|
3461
|
+
return variants.reduce((result, left) => [...result, ...Append(current, left)], []);
|
|
3462
|
+
}
|
|
3463
|
+
function Distribute2(zipped) {
|
|
3464
|
+
return zipped.reduce((result, left) => guard_exports.IsEqual(left[0], !0) ? Cross(result, Expand(left[1])) : Cross(result, [left[1]]), [[]]);
|
|
3465
|
+
}
|
|
3466
|
+
function DistributeArguments(parameters, arguments_, expression) {
|
|
3467
|
+
let distributionNames = CollectDistributionNames(expression), distributionArray = BuildDistributionArray(parameters, distributionNames), zippedArguments = ZipDistributionArray(arguments_, distributionArray);
|
|
3468
|
+
return IsDeferred(expression) && guard_exports.IsEqual(expression.action, "Conditional") || IsDeferred(expression) && guard_exports.IsEqual(expression.action, "Mapped") ? Distribute2(zippedArguments) : [arguments_];
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
// node_modules/@sinclair/typebox/build/type/engine/call/resolve_target.mjs
|
|
3472
|
+
function FromNotResolvable() {
|
|
3473
|
+
return ["(not-resolvable)", Never()];
|
|
3474
|
+
}
|
|
3475
|
+
function FromNotGeneric() {
|
|
3476
|
+
return ["(not-generic)", Never()];
|
|
3477
|
+
}
|
|
3478
|
+
function FromGeneric(name, parameters, expression) {
|
|
3479
|
+
return [name, Generic(parameters, expression)];
|
|
3480
|
+
}
|
|
3481
|
+
function FromRef4(context, ref, arguments_) {
|
|
3482
|
+
return ref in context ? FromType18(context, ref, context[ref], arguments_) : FromNotResolvable();
|
|
3483
|
+
}
|
|
3484
|
+
function FromType18(context, name, target, arguments_) {
|
|
3485
|
+
return IsGeneric(target) ? FromGeneric(name, target.parameters, target.expression) : IsRef(target) ? FromRef4(context, target.$ref, arguments_) : FromNotGeneric();
|
|
3486
|
+
}
|
|
3487
|
+
function ResolveTarget(context, target, arguments_) {
|
|
3488
|
+
return FromType18(context, "(anonymous)", target, arguments_);
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
// node_modules/@sinclair/typebox/build/type/engine/call/resolve_arguments.mjs
|
|
3492
|
+
function AssertArgumentExtends(name, type, extends_) {
|
|
3493
|
+
if (IsInfer(type) || IsCall(type) || result_exports.IsExtendsTrueLike(Extends({}, type, extends_)))
|
|
3494
|
+
return;
|
|
3495
|
+
let cause = { parameter: name, expect: extends_, actual: type };
|
|
3496
|
+
throw new Error(`Argument for parameter ${name} does not satisfy constraint`, { cause });
|
|
3497
|
+
}
|
|
3498
|
+
function BindArgument(context, state, name, extends_, type) {
|
|
3499
|
+
let instantiatedArgument = InstantiateType(context, state, type);
|
|
3500
|
+
return AssertArgumentExtends(name, instantiatedArgument, extends_), memory_exports.Assign(context, { [name]: instantiatedArgument });
|
|
3501
|
+
}
|
|
3502
|
+
function BindArguments(context, state, parameterLeft, parameterRight, arguments_) {
|
|
3503
|
+
let instantiatedExtends = InstantiateType(context, state, parameterLeft.extends), instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);
|
|
3504
|
+
return guard_exports.TakeLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft.name, instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft.name, instantiatedExtends, instantiatedEquals), state, parameterRight, []));
|
|
3505
|
+
}
|
|
3506
|
+
function BindParameters(context, state, parameters, arguments_) {
|
|
3507
|
+
return guard_exports.TakeLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);
|
|
3508
|
+
}
|
|
3509
|
+
function ResolveArgumentsContext(context, state, parameters, arguments_) {
|
|
3510
|
+
return BindParameters(context, state, parameters, arguments_);
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
// node_modules/@sinclair/typebox/build/type/engine/call/instantiate.mjs
|
|
3514
|
+
function Peek(state) {
|
|
3515
|
+
return guard_exports.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : "";
|
|
3516
|
+
}
|
|
3517
|
+
function IsTailCall(state, name) {
|
|
3518
|
+
return guard_exports.IsEqual(Peek(state), name);
|
|
3519
|
+
}
|
|
3520
|
+
function CallDispatch(context, state, target, parameters, expression, arguments_) {
|
|
3521
|
+
let argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_), returnType = InstantiateType(argumentsContext, { callstack: [...state.callstack, target.$ref] }, expression);
|
|
3522
|
+
return InstantiateType(context, state, returnType);
|
|
3523
|
+
}
|
|
3524
|
+
function CallDistributed(context, state, target, parameters, expression, distributedArguments) {
|
|
3525
|
+
return distributedArguments.reduce((result, arguments_) => [...result, CallDispatch(context, state, target, parameters, expression, arguments_)], []);
|
|
3526
|
+
}
|
|
3527
|
+
function CallImmediate(context, state, target, parameters, expression, arguments_) {
|
|
3528
|
+
let distributedArguments = DistributeArguments(parameters, arguments_, expression), returnTypes = CallDistributed(context, state, target, parameters, expression, distributedArguments);
|
|
3529
|
+
return guard_exports.IsEqual(returnTypes.length, 1) ? returnTypes[0] : EvaluateUnion(returnTypes);
|
|
3530
|
+
}
|
|
3531
|
+
function CallInstantiate(context, state, target, arguments_) {
|
|
3532
|
+
let instantiatedArguments = InstantiateTypes(context, state, arguments_), resolved = ResolveTarget(context, target, arguments_), name = resolved[0], type = resolved[1];
|
|
3533
|
+
return IsGeneric(type) ? IsTailCall(state, name) ? CallConstruct(Ref(name), instantiatedArguments) : CallImmediate(context, state, Ref(name), type.parameters, type.expression, instantiatedArguments) : CallConstruct(target, instantiatedArguments);
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
// node_modules/@sinclair/typebox/build/type/types/call.mjs
|
|
3537
|
+
function CallConstruct(target, arguments_) {
|
|
3538
|
+
return memory_exports.Create({ "~kind": "Call" }, { target, arguments: arguments_ }, {});
|
|
3539
|
+
}
|
|
3540
|
+
function Call(target, arguments_) {
|
|
3541
|
+
return CallInstantiate({}, { callstack: [] }, target, arguments_);
|
|
3542
|
+
}
|
|
3543
|
+
function IsCall(value) {
|
|
3544
|
+
return IsKind(value, "Call");
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
// node_modules/@sinclair/typebox/build/type/engine/module/instantiate.mjs
|
|
3548
|
+
function InstantiateCyclics(context, cyclicKeys) {
|
|
3549
|
+
return guard_exports.Keys(context).filter((key) => cyclicKeys.includes(key)).reduce((result, key) => ({ ...result, [key]: InstantiateCyclic(context, key, context[key]) }), {});
|
|
3550
|
+
}
|
|
3551
|
+
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
3552
|
+
return guard_exports.Keys(context).filter((key) => !cyclicKeys.includes(key)).reduce((result, key) => ({ ...result, [key]: InstantiateType(context, { callstack: [] }, context[key]) }), {});
|
|
3553
|
+
}
|
|
3554
|
+
function InstantiateModule(context, options) {
|
|
3555
|
+
let cyclicCandidates = CyclicCandidates(context), instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates), instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates), instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
3556
|
+
return memory_exports.Update(instantiatedModule, {}, options);
|
|
3557
|
+
}
|
|
3558
|
+
function ModuleInstantiate(context, _state, properties, options) {
|
|
3559
|
+
let moduleContext = memory_exports.Assign(context, properties);
|
|
3560
|
+
return InstantiateModule(moduleContext, options);
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
// node_modules/@sinclair/typebox/build/type/engine/ref/instantiate.mjs
|
|
3564
|
+
function RefInstantiate(context, state, type, ref) {
|
|
3565
|
+
return ref in context ? CyclicCheck([ref], context, context[ref]) ? type : InstantiateType(context, state, context[ref]) : type;
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
// node_modules/@sinclair/typebox/build/type/engine/rest/spread.mjs
|
|
3569
|
+
function SpreadElement(type) {
|
|
3570
|
+
return IsRest(type) ? IsTuple(type.items) ? RestSpread(type.items.items) : IsInfer(type.items) ? [type] : IsRef(type.items) ? [type] : [Never()] : [type];
|
|
3571
|
+
}
|
|
3572
|
+
function RestSpread(types) {
|
|
3573
|
+
return types.reduce((result2, left) => [...result2, ...SpreadElement(left)], []);
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
// node_modules/@sinclair/typebox/build/type/engine/instantiate.mjs
|
|
3577
|
+
function CanInstantiate(types) {
|
|
3578
|
+
return guard_exports.TakeLeft(types, (left, right) => IsRef(left) ? !1 : CanInstantiate(right), () => !0);
|
|
3579
|
+
}
|
|
3580
|
+
function ModifierActions(type, readonly, optional) {
|
|
3581
|
+
return IsReadonlyRemoveAction(type) ? ModifierActions(type.type, "remove", optional) : IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly, "remove") : IsReadonlyAddAction(type) ? ModifierActions(type.type, "add", optional) : IsOptionalAddAction(type) ? ModifierActions(type.type, readonly, "add") : [type, readonly, optional];
|
|
3582
|
+
}
|
|
3583
|
+
function ApplyReadonly2(action, type) {
|
|
3584
|
+
return guard_exports.IsEqual(action, "remove") ? ReadonlyRemove(type) : guard_exports.IsEqual(action, "add") ? ReadonlyAdd(type) : type;
|
|
3585
|
+
}
|
|
3586
|
+
function ApplyOptional2(action, type) {
|
|
3587
|
+
return guard_exports.IsEqual(action, "remove") ? OptionalRemove(type) : guard_exports.IsEqual(action, "add") ? OptionalAdd(type) : type;
|
|
3588
|
+
}
|
|
3589
|
+
function InstantiateProperties(context, state, properties) {
|
|
3590
|
+
return guard_exports.Keys(properties).reduce((result, key) => ({ ...result, [key]: InstantiateType(context, state, properties[key]) }), {});
|
|
3591
|
+
}
|
|
3592
|
+
function InstantiateElements(context, state, types) {
|
|
3593
|
+
let elements = InstantiateTypes(context, state, types);
|
|
3594
|
+
return RestSpread(elements);
|
|
3595
|
+
}
|
|
3596
|
+
function InstantiateTypes(context, state, types) {
|
|
3597
|
+
return types.map((type) => InstantiateType(context, state, type));
|
|
3598
|
+
}
|
|
3599
|
+
function InstantiateDeferred(context, state, action, parameters, options) {
|
|
3600
|
+
return guard_exports.IsEqual(action, "Awaited") ? AwaitedInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : guard_exports.IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : guard_exports.IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "Options") ? OptionsInstantiate(context, state, parameters[0], parameters[1]) : guard_exports.IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters[0], parameters[1], options) : guard_exports.IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters[0], options) : guard_exports.IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters[0], options) : Deferred(action, parameters, options);
|
|
3601
|
+
}
|
|
3602
|
+
function InstantiateType(context, state, input) {
|
|
3603
|
+
let immutable = IsImmutable(input), modifiers = ModifierActions(input, IsReadonly(input) ? "add" : "none", IsOptional(input) ? "add" : "none"), type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0], instantiated = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray2(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsAsyncIterator2(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor2(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : IsFunction2(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsIterator2(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) : IsObject2(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsPromise(type) ? _Promise_(InstantiateType(context, state, type.item), PromiseOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type, withImmutable = immutable ? Immutable(instantiated) : instantiated;
|
|
3604
|
+
return ApplyReadonly2(modifiers[1], ApplyOptional2(modifiers[2], withImmutable));
|
|
3605
|
+
}
|
|
3606
|
+
function Instantiate(context, type) {
|
|
3607
|
+
return InstantiateType(context, { callstack: [] }, type);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
// node_modules/@sinclair/typebox/build/type/script/script.mjs
|
|
3611
|
+
function Script2(...args) {
|
|
3612
|
+
let [context, input, options] = arguments_exports.Match(args, {
|
|
3613
|
+
2: (script, options2) => guard_exports.IsString(script) ? [{}, script, options2] : [script, options2, {}],
|
|
3614
|
+
3: (context2, script, options2) => [context2, script, options2],
|
|
3615
|
+
1: (script) => [{}, script, {}]
|
|
3616
|
+
}), result = Script(input), parsed = guard_exports.IsArray(result) && guard_exports.IsEqual(result.length, 2) ? InstantiateType(context, { callstack: [] }, result[0]) : Never();
|
|
3617
|
+
return memory_exports.Update(parsed, {}, options);
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
export {
|
|
3621
|
+
typebox_exports
|
|
3622
|
+
};
|