@1mcp/agent 0.39.5 → 0.40.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -7
- package/build/admin/assets/{admin-BackendLogsWorkspace-BKavXT9B.js → admin-BackendLogsWorkspace-DnPzXW3E.js} +1 -1
- package/build/admin/assets/{admin-InstructionTemplatesWorkspace-CvG4EPdZ.js → admin-InstructionTemplatesWorkspace-B7beKEgz.js} +1 -1
- package/build/admin/assets/{admin-OAuthServicesWorkspace-BzrCR7Bi.js → admin-OAuthServicesWorkspace-Bu74Bzt5.js} +1 -1
- package/build/admin/assets/{admin-PresetAuthoringWorkspace-BboJVBFl.js → admin-PresetAuthoringWorkspace-053b1zwU.js} +1 -1
- package/build/admin/assets/{admin-console-BpUgmlrR.js → admin-console-DVuqABnE.js} +3 -3
- package/build/admin/assets/admin-icons-wOzB38gm.js +1 -0
- package/build/admin/assets/admin-vendor-BLZ1Mauf.js +3 -0
- package/build/admin/assets/admin-vendor-BdHKHno1.js +1 -0
- package/build/admin/assets/admin-vendor-BqYiU41k.js +51 -0
- package/build/admin/assets/admin-vendor-C291Vs-N.js +3 -0
- package/build/admin/assets/admin-vendor-VzhcFgoy.js +1 -0
- package/build/admin/index.html +7 -5
- package/build/application/backendPreparationAdmission.d.ts +77 -0
- package/build/application/backendPreparationAdmission.d.ts.map +1 -0
- package/build/application/backendPreparationAdmission.js +423 -0
- package/build/application/backendPreparationAdmission.js.map +1 -0
- package/build/application/backendPreparationCoordinator.d.ts +122 -0
- package/build/application/backendPreparationCoordinator.d.ts.map +1 -0
- package/build/application/backendPreparationCoordinator.js +885 -0
- package/build/application/backendPreparationCoordinator.js.map +1 -0
- package/build/application/projectLifecycle.d.ts +49 -0
- package/build/application/projectLifecycle.d.ts.map +1 -0
- package/build/application/projectLifecycle.js +228 -0
- package/build/application/projectLifecycle.js.map +1 -0
- package/build/cli.d.ts.map +1 -1
- package/build/cli.js +39 -17
- package/build/cli.js.map +1 -1
- package/build/commands/admin/index.d.ts.map +1 -1
- package/build/commands/admin/index.js +2 -6
- package/build/commands/admin/index.js.map +1 -1
- package/build/commands/app/index.d.ts.map +1 -1
- package/build/commands/app/index.js +5 -17
- package/build/commands/app/index.js.map +1 -1
- package/build/commands/auth/index.d.ts.map +1 -1
- package/build/commands/auth/index.js +2 -7
- package/build/commands/auth/index.js.map +1 -1
- package/build/commands/bootstrap/bootstrap.d.ts +38 -0
- package/build/commands/bootstrap/bootstrap.d.ts.map +1 -0
- package/build/commands/bootstrap/bootstrap.js +265 -0
- package/build/commands/bootstrap/bootstrap.js.map +1 -0
- package/build/commands/bootstrap/bootstrapOwnership.d.ts +13 -0
- package/build/commands/bootstrap/bootstrapOwnership.d.ts.map +1 -0
- package/build/commands/bootstrap/bootstrapOwnership.js +112 -0
- package/build/commands/bootstrap/bootstrapOwnership.js.map +1 -0
- package/build/commands/bootstrap/index.d.ts +3 -0
- package/build/commands/bootstrap/index.d.ts.map +1 -0
- package/build/commands/bootstrap/index.js +22 -0
- package/build/commands/bootstrap/index.js.map +1 -0
- package/build/commands/cliSetup/index.d.ts.map +1 -1
- package/build/commands/cliSetup/index.js +3 -4
- package/build/commands/cliSetup/index.js.map +1 -1
- package/build/commands/cliSetup/installPreparationSkill.d.ts +8 -0
- package/build/commands/cliSetup/installPreparationSkill.d.ts.map +1 -0
- package/build/commands/cliSetup/installPreparationSkill.js +201 -0
- package/build/commands/cliSetup/installPreparationSkill.js.map +1 -0
- package/build/commands/cliSetup/preparationSkill.generated.d.ts +2 -0
- package/build/commands/cliSetup/preparationSkill.generated.d.ts.map +1 -0
- package/build/commands/cliSetup/preparationSkill.generated.js +8 -0
- package/build/commands/cliSetup/preparationSkill.generated.js.map +1 -0
- package/build/commands/cliSetup/setupFiles.d.ts +5 -1
- package/build/commands/cliSetup/setupFiles.d.ts.map +1 -1
- package/build/commands/cliSetup/setupFiles.js +54 -37
- package/build/commands/cliSetup/setupFiles.js.map +1 -1
- package/build/commands/inspect/index.d.ts.map +1 -1
- package/build/commands/inspect/index.js +4 -4
- package/build/commands/inspect/index.js.map +1 -1
- package/build/commands/inspect/inspect.d.ts +2 -1
- package/build/commands/inspect/inspect.d.ts.map +1 -1
- package/build/commands/inspect/inspect.js +10 -5
- package/build/commands/inspect/inspect.js.map +1 -1
- package/build/commands/inspect/inspectUtils.js +3 -0
- package/build/commands/inspect/inspectUtils.js.map +1 -1
- package/build/commands/instructions/index.d.ts.map +1 -1
- package/build/commands/instructions/index.js +8 -3
- package/build/commands/instructions/index.js.map +1 -1
- package/build/commands/instructions/instructions.d.ts +3 -1
- package/build/commands/instructions/instructions.d.ts.map +1 -1
- package/build/commands/instructions/instructions.js +24 -0
- package/build/commands/instructions/instructions.js.map +1 -1
- package/build/commands/instructions/instructionsUtils.d.ts +2 -0
- package/build/commands/instructions/instructionsUtils.d.ts.map +1 -1
- package/build/commands/instructions/instructionsUtils.js +14 -4
- package/build/commands/instructions/instructionsUtils.js.map +1 -1
- package/build/commands/mcp/index.d.ts.map +1 -1
- package/build/commands/mcp/index.js +16 -21
- package/build/commands/mcp/index.js.map +1 -1
- package/build/commands/mcp/installSource.d.ts +3 -1
- package/build/commands/mcp/installSource.d.ts.map +1 -1
- package/build/commands/mcp/installSource.js +2 -2
- package/build/commands/mcp/installSource.js.map +1 -1
- package/build/commands/mcp/knownServerSetup.d.ts +4 -0
- package/build/commands/mcp/knownServerSetup.d.ts.map +1 -0
- package/build/commands/mcp/knownServerSetup.js +102 -0
- package/build/commands/mcp/knownServerSetup.js.map +1 -0
- package/build/commands/mcp/setup.d.ts +28 -0
- package/build/commands/mcp/setup.d.ts.map +1 -0
- package/build/commands/mcp/setup.js +56 -0
- package/build/commands/mcp/setup.js.map +1 -0
- package/build/commands/mcp/tools.d.ts.map +1 -1
- package/build/commands/mcp/tools.js +3 -3
- package/build/commands/mcp/tools.js.map +1 -1
- package/build/commands/preparation/index.d.ts +3 -0
- package/build/commands/preparation/index.d.ts.map +1 -0
- package/build/commands/preparation/index.js +55 -0
- package/build/commands/preparation/index.js.map +1 -0
- package/build/commands/preparation/preparation.d.ts +18 -0
- package/build/commands/preparation/preparation.d.ts.map +1 -0
- package/build/commands/preparation/preparation.js +102 -0
- package/build/commands/preparation/preparation.js.map +1 -0
- package/build/commands/preset/index.d.ts.map +1 -1
- package/build/commands/preset/index.js +4 -51
- package/build/commands/preset/index.js.map +1 -1
- package/build/commands/project/index.d.ts +3 -0
- package/build/commands/project/index.d.ts.map +1 -0
- package/build/commands/project/index.js +40 -0
- package/build/commands/project/index.js.map +1 -0
- package/build/commands/project/project.d.ts +34 -0
- package/build/commands/project/project.d.ts.map +1 -0
- package/build/commands/project/project.js +119 -0
- package/build/commands/project/project.js.map +1 -0
- package/build/commands/proxy/index.d.ts +2 -1
- package/build/commands/proxy/index.d.ts.map +1 -1
- package/build/commands/proxy/index.js +6 -46
- package/build/commands/proxy/index.js.map +1 -1
- package/build/commands/proxy/proxy.d.ts.map +1 -1
- package/build/commands/proxy/proxy.js +7 -1
- package/build/commands/proxy/proxy.js.map +1 -1
- package/build/commands/registry/index.d.ts.map +1 -1
- package/build/commands/registry/index.js +16 -20
- package/build/commands/registry/index.js.map +1 -1
- package/build/commands/run/index.d.ts.map +1 -1
- package/build/commands/run/index.js +9 -3
- package/build/commands/run/index.js.map +1 -1
- package/build/commands/run/run.d.ts +4 -1
- package/build/commands/run/run.d.ts.map +1 -1
- package/build/commands/run/run.js +80 -14
- package/build/commands/run/run.js.map +1 -1
- package/build/commands/serve/cooperativeRuntime.d.ts.map +1 -1
- package/build/commands/serve/cooperativeRuntime.js +2 -1
- package/build/commands/serve/cooperativeRuntime.js.map +1 -1
- package/build/commands/serve/index.d.ts.map +1 -1
- package/build/commands/serve/index.js +57 -39
- package/build/commands/serve/index.js.map +1 -1
- package/build/commands/serve/serveStatus.d.ts.map +1 -1
- package/build/commands/serve/serveStatus.js +3 -0
- package/build/commands/serve/serveStatus.js.map +1 -1
- package/build/commands/serve/serveStop.d.ts.map +1 -1
- package/build/commands/serve/serveStop.js +38 -6
- package/build/commands/serve/serveStop.js.map +1 -1
- package/build/commands/shared/agentSession.d.ts +5 -0
- package/build/commands/shared/agentSession.d.ts.map +1 -0
- package/build/commands/shared/agentSession.js +75 -0
- package/build/commands/shared/agentSession.js.map +1 -0
- package/build/commands/shared/apiClient.d.ts +2 -0
- package/build/commands/shared/apiClient.d.ts.map +1 -1
- package/build/commands/shared/apiClient.js +10 -6
- package/build/commands/shared/apiClient.js.map +1 -1
- package/build/commands/shared/cliContext.d.ts +2 -1
- package/build/commands/shared/cliContext.d.ts.map +1 -1
- package/build/commands/shared/cliContext.js +2 -1
- package/build/commands/shared/cliContext.js.map +1 -1
- package/build/commands/shared/clientSurfaceAttachment.d.ts +7 -1
- package/build/commands/shared/clientSurfaceAttachment.d.ts.map +1 -1
- package/build/commands/shared/clientSurfaceAttachment.js +221 -140
- package/build/commands/shared/clientSurfaceAttachment.js.map +1 -1
- package/build/commands/shared/inspectApiSchemas.d.ts +4 -4
- package/build/commands/shared/projectOwnerStorage.d.ts +8 -0
- package/build/commands/shared/projectOwnerStorage.d.ts.map +1 -0
- package/build/commands/shared/projectOwnerStorage.js +63 -0
- package/build/commands/shared/projectOwnerStorage.js.map +1 -0
- package/build/commands/shared/projectOwnerStore.d.ts +78 -0
- package/build/commands/shared/projectOwnerStore.d.ts.map +1 -0
- package/build/commands/shared/projectOwnerStore.js +482 -0
- package/build/commands/shared/projectOwnerStore.js.map +1 -0
- package/build/commands/shared/projectSelectionOptions.d.ts +24 -0
- package/build/commands/shared/projectSelectionOptions.d.ts.map +1 -0
- package/build/commands/shared/projectSelectionOptions.js +20 -0
- package/build/commands/shared/projectSelectionOptions.js.map +1 -0
- package/build/commands/shared/serveTargetResolver.d.ts +7 -1
- package/build/commands/shared/serveTargetResolver.d.ts.map +1 -1
- package/build/commands/shared/serveTargetResolver.js +99 -4
- package/build/commands/shared/serveTargetResolver.js.map +1 -1
- package/build/commands/target/index.d.ts.map +1 -1
- package/build/commands/target/index.js +6 -13
- package/build/commands/target/index.js.map +1 -1
- package/build/commands/wait/index.d.ts.map +1 -1
- package/build/commands/wait/index.js +3 -3
- package/build/commands/wait/index.js.map +1 -1
- package/build/commands/wait/wait.d.ts +2 -1
- package/build/commands/wait/wait.d.ts.map +1 -1
- package/build/commands/wait/wait.js.map +1 -1
- package/build/config/configLoader.d.ts.map +1 -1
- package/build/config/configLoader.js +5 -1
- package/build/config/configLoader.js.map +1 -1
- package/build/config/configManager.d.ts.map +1 -1
- package/build/config/configManager.js +5 -1
- package/build/config/configManager.js.map +1 -1
- package/build/config/projectConfigLoader.d.ts +4 -0
- package/build/config/projectConfigLoader.d.ts.map +1 -1
- package/build/config/projectConfigLoader.js +129 -28
- package/build/config/projectConfigLoader.js.map +1 -1
- package/build/config/projectConfigTypes.d.ts +7 -0
- package/build/config/projectConfigTypes.d.ts.map +1 -1
- package/build/config/projectConfigTypes.js +1 -0
- package/build/config/projectConfigTypes.js.map +1 -1
- package/build/constants/cliTimeouts.d.ts +4 -0
- package/build/constants/cliTimeouts.d.ts.map +1 -0
- package/build/constants/cliTimeouts.js +4 -0
- package/build/constants/cliTimeouts.js.map +1 -0
- package/build/constants/mcp.d.ts +1 -1
- package/build/constants/mcp.d.ts.map +1 -1
- package/build/constants/mcp.js +1 -1
- package/build/constants/mcp.js.map +1 -1
- package/build/core/capabilities/capabilityCatalog.d.ts +7 -0
- package/build/core/capabilities/capabilityCatalog.d.ts.map +1 -1
- package/build/core/capabilities/capabilityCatalog.js +58 -2
- package/build/core/capabilities/capabilityCatalog.js.map +1 -1
- package/build/core/capabilities/capabilityPagination.d.ts +12 -4
- package/build/core/capabilities/capabilityPagination.d.ts.map +1 -1
- package/build/core/capabilities/capabilityPagination.js +15 -2
- package/build/core/capabilities/capabilityPagination.js.map +1 -1
- package/build/core/capabilities/capabilityVisibility.d.ts +3 -0
- package/build/core/capabilities/capabilityVisibility.d.ts.map +1 -1
- package/build/core/capabilities/capabilityVisibility.js.map +1 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts +2 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts.map +1 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.js +2 -2
- package/build/core/capabilities/lazyLoadingOrchestrator.js.map +1 -1
- package/build/core/capabilities/metaToolProvider.d.ts +2 -2
- package/build/core/capabilities/metaToolProvider.d.ts.map +1 -1
- package/build/core/capabilities/metaToolProvider.js +2 -2
- package/build/core/capabilities/metaToolProvider.js.map +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts +1 -0
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts.map +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.js +23 -9
- package/build/core/capabilities/runtimeCapabilityCatalog.js.map +1 -1
- package/build/core/context/projectOwner.d.ts +16 -0
- package/build/core/context/projectOwner.d.ts.map +1 -0
- package/build/core/context/projectOwner.js +33 -0
- package/build/core/context/projectOwner.js.map +1 -0
- package/build/core/context/projectPreparationAuthority.d.ts +37 -0
- package/build/core/context/projectPreparationAuthority.d.ts.map +1 -0
- package/build/core/context/projectPreparationAuthority.js +113 -0
- package/build/core/context/projectPreparationAuthority.js.map +1 -0
- package/build/core/instructions/inspectionGuidance.d.ts +2 -0
- package/build/core/instructions/inspectionGuidance.d.ts.map +1 -0
- package/build/core/instructions/inspectionGuidance.js +2 -0
- package/build/core/instructions/inspectionGuidance.js.map +1 -0
- package/build/core/instructions/instructionAggregator.d.ts +1 -0
- package/build/core/instructions/instructionAggregator.d.ts.map +1 -1
- package/build/core/instructions/instructionAggregator.js +2 -2
- package/build/core/instructions/instructionAggregator.js.map +1 -1
- package/build/core/instructions/instructionsDistribution.d.ts +5 -0
- package/build/core/instructions/instructionsDistribution.d.ts.map +1 -1
- package/build/core/instructions/instructionsDistribution.js +72 -15
- package/build/core/instructions/instructionsDistribution.js.map +1 -1
- package/build/core/instructions/preparationGuidance.d.ts +3 -0
- package/build/core/instructions/preparationGuidance.d.ts.map +1 -0
- package/build/core/instructions/preparationGuidance.js +14 -0
- package/build/core/instructions/preparationGuidance.js.map +1 -0
- package/build/core/instructions/sessionGuidance.d.ts +3 -0
- package/build/core/instructions/sessionGuidance.d.ts.map +1 -0
- package/build/core/instructions/sessionGuidance.js +25 -0
- package/build/core/instructions/sessionGuidance.js.map +1 -0
- package/build/core/instructions/templateTypes.d.ts +3 -1
- package/build/core/instructions/templateTypes.d.ts.map +1 -1
- package/build/core/instructions/templateTypes.js +15 -5
- package/build/core/instructions/templateTypes.js.map +1 -1
- package/build/core/protocol/requestHandlerUtils.d.ts.map +1 -1
- package/build/core/protocol/requestHandlerUtils.js +23 -4
- package/build/core/protocol/requestHandlerUtils.js.map +1 -1
- package/build/core/server/connectionResolver.d.ts +5 -0
- package/build/core/server/connectionResolver.d.ts.map +1 -1
- package/build/core/server/connectionResolver.js +11 -0
- package/build/core/server/connectionResolver.js.map +1 -1
- package/build/core/server/pidFileManager.d.ts +20 -5
- package/build/core/server/pidFileManager.d.ts.map +1 -1
- package/build/core/server/pidFileManager.js +34 -15
- package/build/core/server/pidFileManager.js.map +1 -1
- package/build/core/server/processIdentity.d.ts +18 -0
- package/build/core/server/processIdentity.d.ts.map +1 -1
- package/build/core/server/processIdentity.js +13 -2
- package/build/core/server/processIdentity.js.map +1 -1
- package/build/core/server/runtimeLaunchIpc.d.ts +167 -2
- package/build/core/server/runtimeLaunchIpc.d.ts.map +1 -1
- package/build/core/server/runtimeOwnershipIdentityRepair.d.ts +21 -0
- package/build/core/server/runtimeOwnershipIdentityRepair.d.ts.map +1 -0
- package/build/core/server/runtimeOwnershipIdentityRepair.js +158 -0
- package/build/core/server/runtimeOwnershipIdentityRepair.js.map +1 -0
- package/build/core/server/runtimeReplacementConfig.d.ts +167 -2
- package/build/core/server/runtimeReplacementConfig.d.ts.map +1 -1
- package/build/core/server/runtimeScopeOwnership.d.ts +21 -2
- package/build/core/server/runtimeScopeOwnership.d.ts.map +1 -1
- package/build/core/server/runtimeScopeOwnership.js +145 -16
- package/build/core/server/runtimeScopeOwnership.js.map +1 -1
- package/build/core/tools/handlers/serverManagementHandler.d.ts +413 -7
- package/build/core/tools/handlers/serverManagementHandler.d.ts.map +1 -1
- package/build/core/tools/internal/adapters/helpers/configTransformers.d.ts +59 -1
- package/build/core/tools/internal/adapters/helpers/configTransformers.d.ts.map +1 -1
- package/build/core/tools/internal/schemas/index.d.ts +1 -1
- package/build/core/tools/internal/schemas/management.d.ts +1 -1
- package/build/core/types/server.d.ts +7 -1
- package/build/core/types/server.d.ts.map +1 -1
- package/build/core/types/transport.d.ts +249 -3
- package/build/core/types/transport.d.ts.map +1 -1
- package/build/core/types/transport.js +27 -0
- package/build/core/types/transport.js.map +1 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.d.ts.map +1 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.js +4 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.js.map +1 -1
- package/build/domains/backend-preparation/adapterRegistry.d.ts +8 -0
- package/build/domains/backend-preparation/adapterRegistry.d.ts.map +1 -0
- package/build/domains/backend-preparation/adapterRegistry.js +15 -0
- package/build/domains/backend-preparation/adapterRegistry.js.map +1 -0
- package/build/domains/backend-preparation/builtInIntegrationDefinitions.d.ts +4 -0
- package/build/domains/backend-preparation/builtInIntegrationDefinitions.d.ts.map +1 -0
- package/build/domains/backend-preparation/builtInIntegrationDefinitions.js +3 -0
- package/build/domains/backend-preparation/builtInIntegrationDefinitions.js.map +1 -0
- package/build/domains/backend-preparation/configuredCommandAdapter.d.ts +88 -0
- package/build/domains/backend-preparation/configuredCommandAdapter.d.ts.map +1 -0
- package/build/domains/backend-preparation/configuredCommandAdapter.js +196 -0
- package/build/domains/backend-preparation/configuredCommandAdapter.js.map +1 -0
- package/build/domains/backend-preparation/configuredCommandProcess.d.ts +27 -0
- package/build/domains/backend-preparation/configuredCommandProcess.d.ts.map +1 -0
- package/build/domains/backend-preparation/configuredCommandProcess.js +183 -0
- package/build/domains/backend-preparation/configuredCommandProcess.js.map +1 -0
- package/build/domains/backend-preparation/contracts.d.ts +131 -0
- package/build/domains/backend-preparation/contracts.d.ts.map +1 -0
- package/build/domains/backend-preparation/contracts.js +2 -0
- package/build/domains/backend-preparation/contracts.js.map +1 -0
- package/build/domains/backend-preparation/integrationDefinitions.d.ts +171 -0
- package/build/domains/backend-preparation/integrationDefinitions.d.ts.map +1 -0
- package/build/domains/backend-preparation/integrationDefinitions.js +246 -0
- package/build/domains/backend-preparation/integrationDefinitions.js.map +1 -0
- package/build/domains/backend-preparation/policy.d.ts +50 -0
- package/build/domains/backend-preparation/policy.d.ts.map +1 -0
- package/build/domains/backend-preparation/policy.js +58 -0
- package/build/domains/backend-preparation/policy.js.map +1 -0
- package/build/domains/backend-preparation/scheduler.d.ts +18 -0
- package/build/domains/backend-preparation/scheduler.d.ts.map +1 -0
- package/build/domains/backend-preparation/scheduler.js +62 -0
- package/build/domains/backend-preparation/scheduler.js.map +1 -0
- package/build/domains/backend-preparation/service.d.ts +67 -0
- package/build/domains/backend-preparation/service.d.ts.map +1 -0
- package/build/domains/backend-preparation/service.js +709 -0
- package/build/domains/backend-preparation/service.js.map +1 -0
- package/build/domains/config-change/configChange.js +5 -5
- package/build/domains/config-change/configChange.js.map +1 -1
- package/build/domains/installation/knownServerCatalog.d.ts +14 -0
- package/build/domains/installation/knownServerCatalog.d.ts.map +1 -0
- package/build/domains/installation/knownServerCatalog.js +56 -0
- package/build/domains/installation/knownServerCatalog.js.map +1 -0
- package/build/domains/installation/knownServerSetup.d.ts +21 -0
- package/build/domains/installation/knownServerSetup.d.ts.map +1 -0
- package/build/domains/installation/knownServerSetup.js +330 -0
- package/build/domains/installation/knownServerSetup.js.map +1 -0
- package/build/domains/installation/knownServerSetupTypes.d.ts +34 -0
- package/build/domains/installation/knownServerSetupTypes.d.ts.map +1 -0
- package/build/domains/installation/knownServerSetupTypes.js +2 -0
- package/build/domains/installation/knownServerSetupTypes.js.map +1 -0
- package/build/domains/project-selection/projectBindingScope.d.ts +7 -0
- package/build/domains/project-selection/projectBindingScope.d.ts.map +1 -0
- package/build/domains/project-selection/projectBindingScope.js +9 -0
- package/build/domains/project-selection/projectBindingScope.js.map +1 -0
- package/build/domains/project-selection/projectPolicy.d.ts +11 -0
- package/build/domains/project-selection/projectPolicy.d.ts.map +1 -0
- package/build/domains/project-selection/projectPolicy.js +104 -0
- package/build/domains/project-selection/projectPolicy.js.map +1 -0
- package/build/domains/project-selection/projectSelection.d.ts +30 -0
- package/build/domains/project-selection/projectSelection.d.ts.map +1 -0
- package/build/domains/project-selection/projectSelection.js +124 -0
- package/build/domains/project-selection/projectSelection.js.map +1 -0
- package/build/globalOptions.d.ts +9 -0
- package/build/globalOptions.d.ts.map +1 -1
- package/build/globalOptions.js +13 -11
- package/build/globalOptions.js.map +1 -1
- package/build/observability/events/registry.d.ts +67 -1
- package/build/observability/events/registry.d.ts.map +1 -1
- package/build/observability/events/registry.js +67 -1
- package/build/observability/events/registry.js.map +1 -1
- package/build/observability/privacy/fields.d.ts +4 -0
- package/build/observability/privacy/fields.d.ts.map +1 -1
- package/build/observability/privacy/fields.js +4 -0
- package/build/observability/privacy/fields.js.map +1 -1
- package/build/sdk/legacy/client/runtime/backendDispatchLifetime.d.ts.map +1 -1
- package/build/sdk/legacy/client/runtime/backendDispatchLifetime.js +8 -2
- package/build/sdk/legacy/client/runtime/backendDispatchLifetime.js.map +1 -1
- package/build/sdk/legacy/client/runtime/legacyTransport.d.ts +2 -0
- package/build/sdk/legacy/client/runtime/legacyTransport.d.ts.map +1 -1
- package/build/sdk/legacy/client/runtime/serveClient.d.ts +6 -1
- package/build/sdk/legacy/client/runtime/serveClient.d.ts.map +1 -1
- package/build/sdk/legacy/client/runtime/serveClient.js +16 -5
- package/build/sdk/legacy/client/runtime/serveClient.js.map +1 -1
- package/build/sdk/legacy/commands/serve.d.ts.map +1 -1
- package/build/sdk/legacy/commands/serve.js +73 -4
- package/build/sdk/legacy/commands/serve.js.map +1 -1
- package/build/sdk/legacy/server/protocol/projectAdmission.d.ts +4 -0
- package/build/sdk/legacy/server/protocol/projectAdmission.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/projectAdmission.js +24 -0
- package/build/sdk/legacy/server/protocol/projectAdmission.js.map +1 -0
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js +6 -3
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js +6 -4
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.js +193 -41
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.js.map +1 -1
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js +93 -17
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/runtime/clientInstancePool.d.ts +12 -0
- package/build/sdk/legacy/server/runtime/clientInstancePool.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/clientInstancePool.js +117 -4
- package/build/sdk/legacy/server/runtime/clientInstancePool.js.map +1 -1
- package/build/sdk/legacy/server/runtime/connectionManager.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/connectionManager.js +2 -0
- package/build/sdk/legacy/server/runtime/connectionManager.js.map +1 -1
- package/build/sdk/legacy/server/runtime/requestContextPreparation.d.ts +19 -1
- package/build/sdk/legacy/server/runtime/requestContextPreparation.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/requestContextPreparation.js +40 -7
- package/build/sdk/legacy/server/runtime/requestContextPreparation.js.map +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.d.ts +6 -2
- package/build/sdk/legacy/server/runtime/serverManager.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.js +85 -17
- package/build/sdk/legacy/server/runtime/serverManager.js.map +1 -1
- package/build/sdk/legacy/server/runtime/templateServerManager.d.ts +26 -4
- package/build/sdk/legacy/server/runtime/templateServerManager.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/templateServerManager.js +260 -14
- package/build/sdk/legacy/server/runtime/templateServerManager.js.map +1 -1
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js +1 -1
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js.map +1 -1
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.d.ts.map +1 -1
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.js +14 -3
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.js.map +1 -1
- package/build/sdk/legacy/transport/stdioProxyTransport.d.ts +1 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.d.ts.map +1 -1
- package/build/sdk/legacy/transport/stdioProxyTransport.js +2 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.js.map +1 -1
- package/build/template/handlebarsTemplateRenderer.d.ts.map +1 -1
- package/build/template/handlebarsTemplateRenderer.js +3 -0
- package/build/template/handlebarsTemplateRenderer.js.map +1 -1
- package/build/transport/http/middlewares/projectAdmission.d.ts +5 -0
- package/build/transport/http/middlewares/projectAdmission.d.ts.map +1 -0
- package/build/transport/http/middlewares/projectAdmission.js +33 -0
- package/build/transport/http/middlewares/projectAdmission.js.map +1 -0
- package/build/transport/http/routes/apiRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/apiRoutes.js +4 -0
- package/build/transport/http/routes/apiRoutes.js.map +1 -1
- package/build/transport/http/routes/inspectHelpers.d.ts +1 -0
- package/build/transport/http/routes/inspectHelpers.d.ts.map +1 -1
- package/build/transport/http/routes/inspectHelpers.js +2 -0
- package/build/transport/http/routes/inspectHelpers.js.map +1 -1
- package/build/transport/http/routes/inspectRequestContext.d.ts +5 -2
- package/build/transport/http/routes/inspectRequestContext.d.ts.map +1 -1
- package/build/transport/http/routes/inspectRequestContext.js +41 -19
- package/build/transport/http/routes/inspectRequestContext.js.map +1 -1
- package/build/transport/http/routes/inspectRoutes.d.ts +11 -2
- package/build/transport/http/routes/inspectRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/inspectRoutes.js +94 -24
- package/build/transport/http/routes/inspectRoutes.js.map +1 -1
- package/build/transport/http/routes/instructionsRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/instructionsRoutes.js +20 -8
- package/build/transport/http/routes/instructionsRoutes.js.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.js +96 -13
- package/build/transport/http/routes/modernHttpRoutes.js.map +1 -1
- package/build/transport/http/routes/modernInteractionBinding.d.ts.map +1 -1
- package/build/transport/http/routes/modernInteractionBinding.js +3 -9
- package/build/transport/http/routes/modernInteractionBinding.js.map +1 -1
- package/build/transport/http/routes/modernSubscriptions.d.ts.map +1 -1
- package/build/transport/http/routes/modernSubscriptions.js +7 -5
- package/build/transport/http/routes/modernSubscriptions.js.map +1 -1
- package/build/transport/http/routes/modernTemplateContext.d.ts +2 -1
- package/build/transport/http/routes/modernTemplateContext.d.ts.map +1 -1
- package/build/transport/http/routes/modernTemplateContext.js +14 -3
- package/build/transport/http/routes/modernTemplateContext.js.map +1 -1
- package/build/transport/http/routes/modernToolHeaderRegistry.d.ts.map +1 -1
- package/build/transport/http/routes/modernToolHeaderRegistry.js +2 -2
- package/build/transport/http/routes/modernToolHeaderRegistry.js.map +1 -1
- package/build/transport/http/routes/preparationRoutes.d.ts +26 -0
- package/build/transport/http/routes/preparationRoutes.d.ts.map +1 -0
- package/build/transport/http/routes/preparationRoutes.js +132 -0
- package/build/transport/http/routes/preparationRoutes.js.map +1 -0
- package/build/transport/http/routes/projectRoutes.d.ts +18 -0
- package/build/transport/http/routes/projectRoutes.d.ts.map +1 -0
- package/build/transport/http/routes/projectRoutes.js +159 -0
- package/build/transport/http/routes/projectRoutes.js.map +1 -0
- package/build/transport/http/routes/streamableHttpRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/streamableHttpRoutes.js +24 -4
- package/build/transport/http/routes/streamableHttpRoutes.js.map +1 -1
- package/build/transport/http/routes/toolRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/toolRoutes.js +163 -20
- package/build/transport/http/routes/toolRoutes.js.map +1 -1
- package/build/transport/http/utils/contextExtractor.d.ts +2 -0
- package/build/transport/http/utils/contextExtractor.d.ts.map +1 -1
- package/build/transport/http/utils/contextExtractor.js +11 -0
- package/build/transport/http/utils/contextExtractor.js.map +1 -1
- package/build/transport/http/utils/templateContextAuthority.d.ts +2 -0
- package/build/transport/http/utils/templateContextAuthority.d.ts.map +1 -1
- package/build/transport/http/utils/templateContextAuthority.js +23 -2
- package/build/transport/http/utils/templateContextAuthority.js.map +1 -1
- package/build/types/context.d.ts +13 -0
- package/build/types/context.d.ts.map +1 -1
- package/build/types/context.js.map +1 -1
- package/build/utils/cli/help.d.ts +7 -0
- package/build/utils/cli/help.d.ts.map +1 -0
- package/build/utils/cli/help.js +57 -0
- package/build/utils/cli/help.js.map +1 -0
- package/package.json +20 -22
- package/build/admin/assets/admin-icons-CYGTDZA5.js +0 -1
- package/build/admin/assets/admin-vendor-62eL-qdH.js +0 -1
- package/build/admin/assets/admin-vendor-BbMrl7MK.js +0 -3
- package/build/admin/assets/admin-vendor-DpjVwd81.js +0 -62
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function helpWidth(stream: {
|
|
2
|
+
isTTY?: boolean;
|
|
3
|
+
columns?: number;
|
|
4
|
+
}): number;
|
|
5
|
+
/** Style after wrapping so ANSI escapes never affect column alignment. */
|
|
6
|
+
export declare function styleHelp(text: string, isTTY?: boolean, width?: number): string;
|
|
7
|
+
//# sourceMappingURL=help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/utils/cli/help.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAG/E;AA8BD,0EAA0E;AAC1E,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,UAAgC,EACrC,KAAK,SAA4B,GAChC,MAAM,CAsBR"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import chalk, { Chalk } from 'chalk';
|
|
2
|
+
import yargs from 'yargs';
|
|
3
|
+
export function helpWidth(stream) {
|
|
4
|
+
if (!stream.isTTY)
|
|
5
|
+
return 80;
|
|
6
|
+
return Math.min(stream.columns || 80, 100);
|
|
7
|
+
}
|
|
8
|
+
function wrapWords(text, width, indent) {
|
|
9
|
+
const lines = [];
|
|
10
|
+
let line = indent;
|
|
11
|
+
for (const word of text.split(/\s+/)) {
|
|
12
|
+
if (line.length > indent.length && line.length + word.length + 1 > width) {
|
|
13
|
+
lines.push(line);
|
|
14
|
+
line = indent;
|
|
15
|
+
}
|
|
16
|
+
line += line.length === indent.length ? word : ` ${word}`;
|
|
17
|
+
}
|
|
18
|
+
return [...lines, line].join('\n');
|
|
19
|
+
}
|
|
20
|
+
/** Yargs' two-column layout splits long switches on narrow terminals. */
|
|
21
|
+
function stackNarrowHelp(text, width) {
|
|
22
|
+
return text
|
|
23
|
+
.split('\n')
|
|
24
|
+
.map((line) => {
|
|
25
|
+
if (!line.trim())
|
|
26
|
+
return '';
|
|
27
|
+
const columns = line.trim().split(/ {2,}/);
|
|
28
|
+
if (line.startsWith(' ') && columns.length > 1) {
|
|
29
|
+
return `${wrapWords(columns[0], width, ' ')}\n${wrapWords(columns.slice(1).join(' '), width, ' ')}`;
|
|
30
|
+
}
|
|
31
|
+
return wrapWords(line.trim(), width, line.startsWith(' ') ? ' ' : '');
|
|
32
|
+
})
|
|
33
|
+
.join('\n');
|
|
34
|
+
}
|
|
35
|
+
/** Style after wrapping so ANSI escapes never affect column alignment. */
|
|
36
|
+
export function styleHelp(text, isTTY = Boolean(process.stdout.isTTY), width = helpWidth(process.stdout)) {
|
|
37
|
+
// Chalk's bundled color detector does not honor NO_COLOR.
|
|
38
|
+
const { color: noColor } = yargs([]).env('NO').option('color', { type: 'string' }).parseSync();
|
|
39
|
+
const color = new Chalk({ level: isTTY && !noColor ? chalk.level : 0 });
|
|
40
|
+
// Keep compact root help a presentation choice; Yargs hide() leaks across parses.
|
|
41
|
+
const overview = text
|
|
42
|
+
.split('\n\n')
|
|
43
|
+
.filter((section) => !section.startsWith('Server options:\n'))
|
|
44
|
+
.join('\n\n');
|
|
45
|
+
// Handler failures can reuse help cached for a differently sized stdout.
|
|
46
|
+
const needsStack = width < 80 || overview.split('\n').some((line) => line.length > width);
|
|
47
|
+
const formatted = needsStack ? stackNarrowHelp(overview, width) : overview;
|
|
48
|
+
return formatted
|
|
49
|
+
.split('\n')
|
|
50
|
+
.map((line) => {
|
|
51
|
+
if (/^[A-Za-z][A-Za-z /-]*:$/.test(line))
|
|
52
|
+
return color.bold.cyan(line);
|
|
53
|
+
return line.replace(/^(\s*(?:Usage: )?)(1mcp\b[^\n]*?)(?=\s{2,}|$)/, (_, indent, command) => `${indent}${color.bold(command)}`);
|
|
54
|
+
})
|
|
55
|
+
.join('\n');
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../src/utils/cli/help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,SAAS,CAAC,MAA6C;IACrE,IAAI,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,SAAS,CAAC,IAAY,EAAE,KAAa,EAAE,MAAc;IAC5D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,IAAI,GAAG,MAAM,CAAC;IAClB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,IAAI,GAAG,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;IAC5D,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,yEAAyE;AACzE,SAAS,eAAe,CAAC,IAAY,EAAE,KAAa;IAClD,OAAO,IAAI;SACR,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;QAC1G,CAAC;QACD,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,SAAS,CACvB,IAAY,EACZ,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EACrC,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;IAEjC,0DAA0D;IAC1D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/F,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACxE,kFAAkF;IAClF,MAAM,QAAQ,GAAG,IAAI;SAClB,KAAK,CAAC,MAAM,CAAC;SACb,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;SAC7D,IAAI,CAAC,MAAM,CAAC,CAAC;IAChB,yEAAyE;IACzE,MAAM,UAAU,GAAG,KAAK,GAAG,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAC1F,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,OAAO,SAAS;SACb,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,IAAI,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvE,OAAO,IAAI,CAAC,OAAO,CACjB,+CAA+C,EAC/C,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAC1D,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1mcp/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0-beta.0",
|
|
4
4
|
"description": "One MCP server to aggregate them all - A unified Model Context Protocol server implementation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -38,14 +38,9 @@
|
|
|
38
38
|
"files": [
|
|
39
39
|
"build"
|
|
40
40
|
],
|
|
41
|
-
"husky": {
|
|
42
|
-
"hooks": {
|
|
43
|
-
"pre-commit": "lint-staged"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
41
|
"lint-staged": {
|
|
47
42
|
"*.{ts,tsx}": [
|
|
48
|
-
"bash -c '
|
|
43
|
+
"bash -c 'pnpm typecheck && pnpm typecheck:admin'"
|
|
49
44
|
],
|
|
50
45
|
"*.{js,ts,tsx,cjs}": [
|
|
51
46
|
"eslint --fix",
|
|
@@ -68,30 +63,31 @@
|
|
|
68
63
|
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
69
64
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\" \"test/**/*.{js,ts,tsx}\" \"web/admin/src/**/*.{ts,tsx}\"",
|
|
70
65
|
"format:check": "prettier --check \"src/**/*.{js,ts,tsx}\" \"test/**/*.{js,ts,tsx}\" \"web/admin/src/**/*.{ts,tsx}\"",
|
|
66
|
+
"check": "pnpm ci:static && pnpm test && pnpm test:release && pnpm guard:perms",
|
|
71
67
|
"check:sdk-boundary": "node scripts/check-sdk-boundary.mjs",
|
|
72
|
-
"check:sdk-topology": "node scripts/check-sdk-topology.mjs",
|
|
73
68
|
"test:sdk-boundary": "node --test test/sdk-boundary/*.test.mjs",
|
|
74
|
-
"ci:static": "concurrently --kill-others-on-fail --names lint,typecheck,build,sdk-boundary,sdk-
|
|
69
|
+
"ci:static": "concurrently --kill-others-on-fail --names lint,typecheck,build,sdk-boundary,sdk-policy-tests \"pnpm lint\" \"pnpm typecheck\" \"pnpm build\" \"pnpm check:sdk-boundary\" \"pnpm test:sdk-boundary\"",
|
|
75
70
|
"guard:perms": "node scripts/security/check-permission-modes.mjs",
|
|
76
71
|
"test:security-permissions": "vitest run src/auth/storage/tokenPermissions.invariant.test.ts src/core/context/capabilityPermissions.invariant.test.ts && pnpm guard:perms",
|
|
77
72
|
"typecheck": "tsc --noEmit --project tsconfig.test.json",
|
|
73
|
+
"typecheck:admin": "tsc --noEmit --project web/admin/tsconfig.json",
|
|
78
74
|
"test": "pnpm test:unit && pnpm test:admin",
|
|
79
75
|
"test:unit": "vitest run",
|
|
80
76
|
"test:admin": "vitest run --config vitest.admin.config.ts",
|
|
77
|
+
"test:release": "node --test test/release/*.test.cjs",
|
|
81
78
|
"test:unit:watch": "vitest",
|
|
82
79
|
"test:unit:coverage": "vitest run --coverage",
|
|
83
80
|
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
84
81
|
"test:e2e:browser": "vitest run --config vitest.e2e.config.ts browser.e2e.test.ts",
|
|
85
82
|
"test:e2e:non-browser": "vitest run --config vitest.e2e.config.ts --exclude \"**/*.browser.e2e.test.ts\"",
|
|
86
|
-
"test:e2e:shardable": "vitest run --config vitest.e2e.config.ts --exclude \"**/*.browser.e2e.test.ts\" --exclude \"**/serve-background.test.ts\" --exclude \"**/cooperative-runtime.test.ts\" --exclude \"**/capability-catalog-eras.test.ts\" --exclude \"**/admin-spa-package.e2e.test.ts\"",
|
|
87
|
-
"test:e2e:system": "vitest run --config vitest.e2e.config.ts test/e2e/commands/serve-background.test.ts",
|
|
83
|
+
"test:e2e:shardable": "vitest run --config vitest.e2e.config.ts --exclude \"**/*.browser.e2e.test.ts\" --exclude \"**/serve-background.test.ts\" --exclude \"**/project-lifecycle.test.ts\" --exclude \"**/mcp-tokens.test.ts\" --exclude \"**/cooperative-runtime.test.ts\" --exclude \"**/capability-catalog-eras.test.ts\" --exclude \"**/admin-spa-package.e2e.test.ts\"",
|
|
84
|
+
"test:e2e:system": "vitest run --config vitest.e2e.config.ts test/e2e/commands/serve-background.test.ts test/e2e/project-lifecycle.test.ts --maxWorkers=1",
|
|
88
85
|
"test:e2e:watch": "vitest --config vitest.e2e.config.ts",
|
|
89
86
|
"test:e2e:coverage": "vitest run --config vitest.e2e.config.ts --coverage",
|
|
90
87
|
"test:e2e:performance": "node scripts/test-e2e-performance.js",
|
|
91
|
-
"
|
|
92
|
-
"docs:
|
|
93
|
-
"docs:
|
|
94
|
-
"docs:preview": "vitepress preview docs",
|
|
88
|
+
"docs:dev": "vitepress dev docs/site",
|
|
89
|
+
"docs:build": "vitepress build docs/site && node scripts/validate-docs-seo.mjs",
|
|
90
|
+
"docs:preview": "vitepress preview docs/site",
|
|
95
91
|
"sea:build": "node scripts/build-sea.cjs",
|
|
96
92
|
"sea:binary": "node scripts/build-binary.cjs",
|
|
97
93
|
"sea:binary:macos": "node scripts/build-binary.cjs darwin-arm64",
|
|
@@ -105,7 +101,8 @@
|
|
|
105
101
|
"build:binaries": "pnpm sea:build && pnpm sea:binary",
|
|
106
102
|
"build:binaries:archived": "pnpm build:binaries && pnpm archive",
|
|
107
103
|
"test:tracing:disabled": "node scripts/verify-propagation-disabled.mjs",
|
|
108
|
-
"test:tracing:performance": "node --expose-gc scripts/measure-propagation.mjs"
|
|
104
|
+
"test:tracing:performance": "node --expose-gc scripts/measure-propagation.mjs",
|
|
105
|
+
"test:protocol": "node scripts/run-protocol.mjs"
|
|
109
106
|
},
|
|
110
107
|
"dependencies": {
|
|
111
108
|
"@hono/node-server": "2.0.12",
|
|
@@ -116,7 +113,7 @@
|
|
|
116
113
|
"@modelcontextprotocol/server": "2.3.1",
|
|
117
114
|
"@modelcontextprotocol/server-legacy": "2.3.1",
|
|
118
115
|
"@opentelemetry/api": "1.9.1",
|
|
119
|
-
"@opentelemetry/context-async-hooks": "2.
|
|
116
|
+
"@opentelemetry/context-async-hooks": "2.12.0",
|
|
120
117
|
"@opentelemetry/core": "2.8.0",
|
|
121
118
|
"@toon-format/toon": "^4.1.0",
|
|
122
119
|
"ajv": "^8.17.1",
|
|
@@ -131,6 +128,7 @@
|
|
|
131
128
|
"handlebars": "^4.7.8",
|
|
132
129
|
"https-proxy-agent": "^9.0.0",
|
|
133
130
|
"json5": "^2.2.3",
|
|
131
|
+
"mdast-util-from-markdown": "2.1.0",
|
|
134
132
|
"ora": "^9.0.0",
|
|
135
133
|
"prompts": "^2.4.2",
|
|
136
134
|
"semver": "^7.7.3",
|
|
@@ -142,7 +140,7 @@
|
|
|
142
140
|
"winston-transport": "^4.9.0",
|
|
143
141
|
"yargs": "^18.0.0",
|
|
144
142
|
"yargs-parser": "^22.0.0",
|
|
145
|
-
"zod": "4.
|
|
143
|
+
"zod": "4.6.7"
|
|
146
144
|
},
|
|
147
145
|
"devDependencies": {
|
|
148
146
|
"@braintree/sanitize-url": "^7.1.1",
|
|
@@ -151,7 +149,7 @@
|
|
|
151
149
|
"@mantine/hooks": "8.3.14",
|
|
152
150
|
"@modelcontextprotocol/conformance": "0.2.0-alpha.11",
|
|
153
151
|
"@testing-library/jest-dom": "^7.0.0",
|
|
154
|
-
"@testing-library/react": "16.3.
|
|
152
|
+
"@testing-library/react": "16.3.3",
|
|
155
153
|
"@testing-library/user-event": "14.6.1",
|
|
156
154
|
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
|
|
157
155
|
"@types/archiver": "^8.0.0",
|
|
@@ -183,10 +181,10 @@
|
|
|
183
181
|
"jiti": "^2.4.2",
|
|
184
182
|
"jsdom": "29.1.1",
|
|
185
183
|
"lint-staged": "^17.0.5",
|
|
186
|
-
"lucide-react": "1.
|
|
184
|
+
"lucide-react": "1.59.0",
|
|
187
185
|
"mermaid": "^11.9.0",
|
|
188
186
|
"nodemon": "^3.1.10",
|
|
189
|
-
"playwright": "1.
|
|
187
|
+
"playwright": "1.64.1",
|
|
190
188
|
"postject": "^1.0.0-alpha.6",
|
|
191
189
|
"prettier": "^3.5.3",
|
|
192
190
|
"react": "18.3.1",
|
|
@@ -204,5 +202,5 @@
|
|
|
204
202
|
"vitest": "^5.0.3",
|
|
205
203
|
"yaml": "2.9.1"
|
|
206
204
|
},
|
|
207
|
-
"gitHead": "
|
|
205
|
+
"gitHead": "f43a1fa04f175872a75ffcbbcadcb9c7cffba8f7"
|
|
208
206
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./admin-rolldown-runtime-Bh1tDfsg.js";import{i as t}from"./admin-react-BSaWeqgv.js";var n=e(t(),1),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},l=(0,n.createContext)({}),u=()=>(0,n.useContext)(l),d=(0,n.forwardRef)(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o=``,children:l,iconNode:d,...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=u()??{},y=a??g?Number(i??h)*24/Number(t??m):i??h;return(0,n.createElement)(`svg`,{ref:p,...s,width:t??m??s.width,height:t??m??s.height,stroke:e??_,strokeWidth:y,className:r(`lucide`,v,o),...!l&&!c(f)&&{"aria-hidden":`true`},...f},[...d.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])}),f=(e,t)=>{let a=(0,n.forwardRef)(({className:a,...s},c)=>(0,n.createElement)(d,{ref:c,iconNode:t,className:r(`lucide-${i(o(e))}`,`lucide-${e}`,a),...s}));return a.displayName=o(e),a},p=f(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),m=f(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),h=f(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),g=f(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_=f(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),v=f(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),y=f(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),b=f(`file-clock`,[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]),x=f(`file-input`,[[`path`,{d:`M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1`,key:`1q9hii`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M2 15h10`,key:`jfw4w8`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),S=f(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),C=f(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),w=f(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),T=f(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),E=f(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),D=f(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),O=f(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),k=f(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),A=f(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),j=f(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),M=f(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),N=f(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),P=f(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),F=f(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),I=f(`server-cog`,[[`path`,{d:`m10.852 14.772-.383.923`,key:`11vil6`}],[`path`,{d:`M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923`,key:`1v3clb`}],[`path`,{d:`m13.148 9.228.383-.923`,key:`t2zzyc`}],[`path`,{d:`m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544`,key:`1bxfiv`}],[`path`,{d:`m14.772 10.852.923-.383`,key:`k9m8cz`}],[`path`,{d:`m14.772 13.148.923.383`,key:`1xvhww`}],[`path`,{d:`M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5`,key:`tn8das`}],[`path`,{d:`M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5`,key:`1g2pve`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M6 6h.01`,key:`1utrut`}],[`path`,{d:`m9.228 10.852-.923-.383`,key:`1wtb30`}],[`path`,{d:`m9.228 13.148-.923.383`,key:`1a830x`}]]),L=f(`server-off`,[[`path`,{d:`M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5`,key:`bt2siv`}],[`path`,{d:`M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z`,key:`1hjrv1`}],[`path`,{d:`M22 17v-1a2 2 0 0 0-2-2h-1`,key:`1iynyr`}],[`path`,{d:`M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z`,key:`161ggg`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),R=f(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),z=f(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),B=f(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),V=f(`sun-moon`,[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715`,key:`xlf6rm`}],[`path`,{d:`M16 12a4 4 0 0 0-4-4`,key:`6vsxu`}],[`path`,{d:`m19 5-1.256 1.256`,key:`1yg6a6`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}]]),H=f(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),U=f(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),W=f(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),G=f(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]);export{g as A,C,y as D,b as E,m as M,p as N,v as O,w as S,x as T,k as _,V as a,E as b,R as c,F as d,P as f,A as g,j as h,H as i,h as j,_ as k,L as l,M as m,W as n,B as o,N as p,U as r,z as s,G as t,I as u,O as v,S as w,T as x,D as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,At as n,B as r,C as i,Ct as ee,D as te,E as ne,F as a,Ft as re,G as ie,H as ae,Ht as o,I as s,It as oe,J as c,K as se,Kt as ce,L as l,Lt as le,M as ue,Mt as de,N as fe,Nt as pe,O as me,Ot as he,P as ge,Pt as _e,Q as u,R as ve,Rt as ye,S as be,St as xe,T as Se,U as Ce,Ut as we,V as Te,W as Ee,Wt as De,X as d,Y as Oe,Z as f,_ as ke,_t as Ae,a as p,at as m,b as h,bt as g,c as _,ct as v,d as y,dt as b,et as x,f as S,ft as C,g as je,gt as Me,h as Ne,ht as Pe,i as Fe,it as Ie,j as Le,jt as Re,k as ze,kt as Be,l as Ve,lt as He,m as w,mt as Ue,n as We,nt as Ge,o as Ke,ot as qe,p as Je,pt as Ye,q as Xe,qt as T,r as Ze,rt as Qe,s as $e,st as et,t as tt,tt as nt,u as rt,ut as it,v as at,vt as ot,w as st,x as ct,xt as lt,y as ut,yt as dt,z as ft,zt as pt}from"./admin-vendor-BbMrl7MK.js";import{$ as mt,A as ht,B as gt,C as _t,Ct as vt,D as yt,E as bt,F as xt,G as St,H as Ct,I as wt,J as Tt,K as Et,L as Dt,M as Ot,N as kt,O as At,P as jt,Q as Mt,R as Nt,S as Pt,St as Ft,T as It,U as E,V as Lt,W as Rt,X as zt,Y as Bt,Z as Vt,_ as Ht,_t as D,a as Ut,at as Wt,b as Gt,bt as Kt,c as qt,ct as Jt,d as Yt,f as Xt,g as Zt,gt as Qt,h as $t,ht as en,i as O,j as tn,k as nn,l as rn,m as an,mt as k,n as on,o as sn,ot as A,p as cn,pt as j,q as M,s as ln,t as N,u as un,v as dn,w as fn,wt as P,x as pn,xt as mn,y as hn,yt as gn,z as _n}from"./admin-vendor-DpjVwd81.js";var vn=T(`ZodISODateTime`,(e,t)=>{It.init(e,t),B.init(e,t)});function yn(e){return Ce(vn,e)}var bn=T(`ZodISODate`,(e,t)=>{fn.init(e,t),B.init(e,t)});function xn(e){return ae(bn,e)}var Sn=T(`ZodISOTime`,(e,t)=>{yt.init(e,t),B.init(e,t)});function Cn(e){return ie(Sn,e)}var wn=T(`ZodISODuration`,(e,t)=>{bt.init(e,t),B.init(e,t)});function Tn(e){return Ee(wn,e)}var F=T(`ZodError`,(e,t)=>{o.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>De(e,t)},flatten:{value:t=>we(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,k,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,k,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),En=de(F),Dn=pe(F),On=ye(F),kn=pt(F),An=n(F),jn=he(F),Mn=Re(F),Nn=Be(F),Pn=oe(F),Fn=_e(F),In=le(F),Ln=re(F),I=new WeakMap;function L(e,t,n){let r=Object.getPrototypeOf(e),i=I.get(r);if(i||(i=new Set,I.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var R=T(`ZodType`,(e,t)=>(M.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:N(e,`input`),output:N(e,`output`)}}),e.toJSONSchema=on(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>En(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>On(e,t,n),e.parseAsync=async(t,n)=>Dn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>kn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>An(e,t,n),e.decode=(t,n)=>jn(e,t,n),e.encodeAsync=async(t,n)=>Mn(e,t,n),e.decodeAsync=async(t,n)=>Nn(e,t,n),e.safeEncode=(t,n)=>Pn(e,t,n),e.safeDecode=(t,n)=>Fn(e,t,n),e.safeEncodeAsync=async(t,n)=>In(e,t,n),e.safeDecodeAsync=async(t,n)=>Ln(e,t,n),L(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Qt(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Wt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Lr(e,t))},superRefine(e,t){return this.check(Rr(e,t))},overwrite(e){return this.check(m(e))},optional(){return X(this)},exactOptional(){return wr(this)},nullable(){return Z(this)},nullish(){return X(Z(this))},nonoptional(e){return Ar(this,e)},array(){return K(this)},or(e){return mr([this,e])},and(e){return gr(this,e)},transform(e){return $(this,Sr(e))},default(e){return Dr(this,e)},prefault(e){return kr(this,e)},catch(e){return Mr(this,e)},pipe(e){return $(this,e)},readonly(){return Fr(this)},describe(e){let t=this.clone();return O.add(t,{description:e}),t},meta(...e){if(e.length===0)return O.get(this);let t=this.clone();return O.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return O.get(e)?.description},configurable:!0}),e)),z=T(`_ZodString`,(t,n)=>{E.init(t,n),R.init(t,n),t._zod.processJSONSchema=(e,n,r)=>at(t,e,n,r);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,L(t,`_ZodString`,{regex(...e){return this.check(et(...e))},includes(...e){return this.check(ve(...e))},startsWith(...e){return this.check(He(...e))},endsWith(...e){return this.check(ge(...e))},min(...t){return this.check(e(...t))},max(...e){return this.check(u(...e))},length(...e){return this.check(c(...e))},nonempty(...t){return this.check(e(1,...t))},lowercase(e){return this.check(Oe(e))},uppercase(e){return this.check(Ae(e))},trim(){return this.check(Ue())},normalize(...e){return this.check(Qe(...e))},toLowerCase(){return this.check(C())},toUpperCase(){return this.check(Ye())},slugify(){return this.check(v())}})}),Rn=T(`ZodString`,(e,n)=>{E.init(e,n),z.init(e,n),e.email=t=>e.check(ue(Bn,t)),e.url=t=>e.check(ot(Vn,t)),e.jwt=t=>e.check(se(nr,t)),e.emoji=t=>e.check(fe(Hn,t)),e.guid=t=>e.check(l(V,t)),e.uuid=t=>e.check(dt(H,t)),e.uuidv4=t=>e.check(g(H,t)),e.uuidv6=t=>e.check(lt(H,t)),e.uuidv7=t=>e.check(xe(H,t)),e.nanoid=t=>e.check(nt(Un,t)),e.guid=t=>e.check(l(V,t)),e.cuid=t=>e.check(ze(Wn,t)),e.cuid2=n=>e.check(t(Gn,n)),e.ulid=t=>e.check(Pe(Kn,t)),e.base64=t=>e.check(st($n,t)),e.base64url=t=>e.check(Se(er,t)),e.xid=t=>e.check(ee(qn,t)),e.ksuid=t=>e.check(Xe(Jn,t)),e.ipv4=t=>e.check(r(Yn,t)),e.ipv6=t=>e.check(Te(Xn,t)),e.cidrv4=t=>e.check(te(Zn,t)),e.cidrv6=t=>e.check(me(Qn,t)),e.e164=t=>e.check(Le(tr,t)),e.datetime=t=>e.check(yn(t)),e.date=t=>e.check(xn(t)),e.time=t=>e.check(Cn(t)),e.duration=t=>e.check(Tn(t))});function zn(e){return it(Rn,e)}var B=T(`ZodStringFormat`,(e,t)=>{Rt.init(e,t),z.init(e,t)}),Bn=T(`ZodEmail`,(e,t)=>{Ht.init(e,t),B.init(e,t)}),V=T(`ZodGUID`,(e,t)=>{pn.init(e,t),B.init(e,t)}),H=T(`ZodUUID`,(e,t)=>{zt.init(e,t),B.init(e,t)}),Vn=T(`ZodURL`,(e,t)=>{Bt.init(e,t),B.init(e,t)}),Hn=T(`ZodEmoji`,(e,t)=>{dn.init(e,t),B.init(e,t)}),Un=T(`ZodNanoID`,(e,t)=>{Ot.init(e,t),B.init(e,t)}),Wn=T(`ZodCUID`,(e,t)=>{Yt.init(e,t),B.init(e,t)}),Gn=T(`ZodCUID2`,(e,t)=>{Xt.init(e,t),B.init(e,t)}),Kn=T(`ZodULID`,(e,t)=>{Tt.init(e,t),B.init(e,t)}),qn=T(`ZodXID`,(e,t)=>{mt.init(e,t),B.init(e,t)}),Jn=T(`ZodKSUID`,(e,t)=>{ht.init(e,t),B.init(e,t)}),Yn=T(`ZodIPv4`,(e,t)=>{Pt.init(e,t),B.init(e,t)}),Xn=T(`ZodIPv6`,(e,t)=>{_t.init(e,t),B.init(e,t)}),Zn=T(`ZodCIDRv4`,(e,t)=>{rn.init(e,t),B.init(e,t)}),Qn=T(`ZodCIDRv6`,(e,t)=>{un.init(e,t),B.init(e,t)}),$n=T(`ZodBase64`,(e,t)=>{sn.init(e,t),B.init(e,t)}),er=T(`ZodBase64URL`,(e,t)=>{ln.init(e,t),B.init(e,t)}),tr=T(`ZodE164`,(e,t)=>{Zt.init(e,t),B.init(e,t)}),nr=T(`ZodJWT`,(e,t)=>{nn.init(e,t),B.init(e,t)}),U=T(`ZodNumber`,(e,t)=>{wt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S(e,t,n,r),L(e,`ZodNumber`,{gt(e,t){return this.check(a(e,t))},gte(e,t){return this.check(s(e,t))},min(e,t){return this.check(s(e,t))},lt(e,t){return this.check(d(e,t))},lte(e,t){return this.check(f(e,t))},max(e,t){return this.check(f(e,t))},int(e){return this.check(W(e))},safe(e){return this.check(W(e))},positive(e){return this.check(a(0,e))},nonnegative(e){return this.check(s(0,e))},negative(e){return this.check(d(0,e))},nonpositive(e){return this.check(f(0,e))},multipleOf(e,t){return this.check(x(e,t))},step(e,t){return this.check(x(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function rr(e){return Ie(U,e)}var ir=T(`ZodNumberFormat`,(e,t)=>{Dt.init(e,t),U.init(e,t)});function W(e){return ft(ir,e)}var ar=T(`ZodBoolean`,(e,t)=>{qt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>We(e,t,n,r)});function or(e){return ne(ar,e)}var sr=T(`ZodUnknown`,(e,t)=>{Mt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>be(e,t,n,r)});function G(){return Me(sr)}var cr=T(`ZodNever`,(e,t)=>{kt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ve(e,t,n,r)});function lr(e){return Ge(cr,e)}var ur=T(`ZodArray`,(t,n)=>{Ut.init(t,n),R.init(t,n),t._zod.processJSONSchema=(e,n,r)=>tt(t,e,n,r),t.element=n.element,L(t,`ZodArray`,{min(t,n){return this.check(e(t,n))},nonempty(t){return this.check(e(1,t))},max(e,t){return this.check(u(e,t))},length(e,t){return this.check(c(e,t))},unwrap(){return this.element}})});function K(e,t){return i(ur,e,t)}var dr=T(`ZodObject`,(e,t)=>{Nt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Je(e,t,n,r),A(e,`shape`,()=>t.shape),L(e,`ZodObject`,{keyof(){return J(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:G()})},loose(){return this.clone({...this._zod.def,catchall:G()})},strict(){return this.clone({...this._zod.def,catchall:lr()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Jt(this,e)},safeExtend(e){return vt(this,e)},merge(e){return en(this,e)},pick(e){return mn(this,e)},omit(e){return gn(this,e)},partial(...e){return Kt(Y,this,e[0])},required(...e){return Ft(Q,this,e[0])}})});function fr(e,t){return new dr({type:`object`,shape:e??{},...D(t)})}var pr=T(`ZodUnion`,(e,t)=>{Vt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ct(e,t,n,r),e.options=t.options});function mr(e,t){return new pr({type:`union`,options:e,...D(t)})}var hr=T(`ZodIntersection`,(e,t)=>{At.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$e(e,t,n,r)});function gr(e,t){return new hr({type:`intersection`,left:e,right:t})}var _r=T(`ZodTuple`,(e,t)=>{Et.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function vr(e,t,n){let r=t instanceof M;return new _r({type:`tuple`,items:e,rest:r?t:null,...D(r?n:t)})}var q=T(`ZodEnum`,(e,t)=>{hn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ke(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new q({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new q({...t,checks:[],...D(r),entries:i})}});function J(e,t){return new q({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}var yr=T(`ZodLiteral`,(e,t)=>{tn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function br(e,t){return new yr({type:`literal`,values:Array.isArray(e)?e:[e],...D(t)})}var xr=T(`ZodTransform`,(e,t)=>{St.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ut(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ce(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(j(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(j(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Sr(e){return new xr({type:`transform`,transform:e})}var Y=T(`ZodOptional`,(e,t)=>{_n.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function X(e){return new Y({type:`optional`,innerType:e})}var Cr=T(`ZodExactOptional`,(e,t)=>{Gt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wr(e){return new Cr({type:`optional`,innerType:e})}var Tr=T(`ZodNullable`,(e,t)=>{xt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Z(e){return new Tr({type:`nullable`,innerType:e})}var Er=T(`ZodDefault`,(e,t)=>{$t.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dr(e,t){return new Er({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():P(t)}})}var Or=T(`ZodPrefault`,(e,t)=>{Lt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>je(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kr(e,t){return new Or({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():P(t)}})}var Q=T(`ZodNonOptional`,(e,t)=>{jt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ar(e,t){return new Q({type:`nonoptional`,innerType:e,...D(t)})}var jr=T(`ZodCatch`,(e,t)=>{cn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ze(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Mr(e,t){return new jr({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Nr=T(`ZodPipe`,(e,t)=>{gt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ne(e,t,n,r),e.in=t.in,e.out=t.out});function $(e,t){return new Nr({type:`pipe`,in:e,out:t})}var Pr=T(`ZodReadonly`,(e,t)=>{Ct.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ke(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fr(e){return new Pr({type:`readonly`,innerType:e})}var Ir=T(`ZodCustom`,(e,t)=>{an.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fe(e,t,n,r)});function Lr(e,t={}){return qe(Ir,e,t)}function Rr(e,t){return b(e,t)}export{rr as a,vr as c,br as i,G as l,K as n,fr as o,or as r,zn as s,J as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Tt as e,_t as t,dt as n,et as r,ft as i,it as a,lt as o,mt as s,nt as c,pt as l,r as u,rt as d,st as f,tt as p,ut as m,vt as h}from"./admin-vendor-DpjVwd81.js";var g;function _(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var v=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},y=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(g=globalThis).__zod_globalConfig??(g.__zod_globalConfig={});var b=globalThis.__zod_globalConfig;function x(e){return e&&Object.assign(b,e),b}var S=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,s,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},C=_(`$ZodError`,S),w=_(`$ZodError`,S,{Parent:Error});function T(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function E(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var D=e=>(t,n,r,i)=>{let s=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise)throw new v;if(c.issues.length){let t=new((i?.Err)??e)(c.issues.map(e=>o(e,s,x())));throw a(t,i?.callee),t}return c.value},O=e=>async(t,n,r,i)=>{let s=r?{...r,async:!0}:{async:!0},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let t=new((i?.Err)??e)(c.issues.map(e=>o(e,s,x())));throw a(t,i?.callee),t}return c.value},k=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new v;return a.issues.length?{success:!1,error:new(e??C)(a.issues.map(e=>o(e,i,x())))}:{success:!0,data:a.value}},A=k(w),j=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>o(e,i,x())))}:{success:!0,data:a.value}},ee=j(w),te=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return D(e)(t,n,i)},ne=e=>(t,n,r)=>D(e)(t,n,r),M=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return O(e)(t,n,i)},N=e=>async(t,n,r)=>O(e)(t,n,r),P=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return k(e)(t,n,i)},F=e=>(t,n,r)=>k(e)(t,n,r),I=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return j(e)(t,n,i)},L=e=>async(t,n,r)=>j(e)(t,n,r),R=_(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),z={number:`number`,bigint:`bigint`,object:`date`},B=_(`$ZodCheckLessThan`,(e,t)=>{R.init(e,t);let n=z[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),V=_(`$ZodCheckGreaterThan`,(e,t)=>{R.init(e,t);let n=z[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),H=_(`$ZodCheckMultipleOf`,(e,t)=>{R.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):m(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),U=_(`$ZodCheckNumberFormat`,(e,t)=>{R.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),i=n?`int`:`number`,[a,o]=d[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=a,i.maximum=o,n&&(i.pattern=r)}),e._zod.check=r=>{let s=r.value;if(n){if(!Number.isInteger(s)){r.issues.push({expected:i,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?r.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort}):r.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<a&&r.issues.push({origin:`number`,input:s,code:`too_small`,minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>o&&r.issues.push({origin:`number`,input:s,code:`too_big`,maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),W=_(`$ZodCheckMaxLength`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let a=i(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),G=_(`$ZodCheckMinLength`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let a=i(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),K=_(`$ZodCheckLengthEquals`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,a=r.length;if(a===t.length)return;let o=i(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),q=_(`$ZodCheckStringFormat`,(e,t)=>{var n,r;R.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),J=_(`$ZodCheckRegex`,(e,t)=>{q.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Y=_(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=p,q.init(e,t)}),X=_(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=c,q.init(e,t)}),Z=_(`$ZodCheckIncludes`,(e,t)=>{R.init(e,t);let n=f(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),re=_(`$ZodCheckStartsWith`,(e,t)=>{R.init(e,t);let n=RegExp(`^${f(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ie=_(`$ZodCheckEndsWith`,(e,t)=>{R.init(e,t);let n=RegExp(`.*${f(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ae=_(`$ZodCheckOverwrite`,(e,t)=>{R.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),oe=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}};function se(e,n){return new e({type:`string`,...t(n)})}function ce(e,n){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...t(n)})}function le(e,n){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...t(n)})}function ue(e,n){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...t(n)})}function de(e,n){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...t(n)})}function fe(e,n){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...t(n)})}function pe(e,n){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...t(n)})}function me(e,n){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...t(n)})}function he(e,n){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...t(n)})}function ge(e,n){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...t(n)})}function _e(e,n){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...t(n)})}function ve(e,n){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...t(n)})}function ye(e,n){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...t(n)})}function be(e,n){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...t(n)})}function xe(e,n){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...t(n)})}function Se(e,n){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...t(n)})}function Ce(e,n){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...t(n)})}function we(e,n){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...t(n)})}function Te(e,n){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...t(n)})}function Ee(e,n){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...t(n)})}function De(e,n){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...t(n)})}function Oe(e,n){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...t(n)})}function ke(e,n){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...t(n)})}function Ae(e,n){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...t(n)})}function je(e,n){return new e({type:`string`,format:`date`,check:`string_format`,...t(n)})}function Me(e,n){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...t(n)})}function Ne(e,n){return new e({type:`string`,format:`duration`,check:`string_format`,...t(n)})}function Pe(e,n){return new e({type:`number`,checks:[],...t(n)})}function Fe(e,n){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...t(n)})}function Ie(e,n){return new e({type:`boolean`,...t(n)})}function Le(e){return new e({type:`unknown`})}function Re(e,n){return new e({type:`never`,...t(n)})}function ze(e,n){return new B({check:`less_than`,...t(n),value:e,inclusive:!1})}function Be(e,n){return new B({check:`less_than`,...t(n),value:e,inclusive:!0})}function Ve(e,n){return new V({check:`greater_than`,...t(n),value:e,inclusive:!1})}function He(e,n){return new V({check:`greater_than`,...t(n),value:e,inclusive:!0})}function Ue(e,n){return new H({check:`multiple_of`,...t(n),value:e})}function We(e,n){return new W({check:`max_length`,...t(n),maximum:e})}function Ge(e,n){return new G({check:`min_length`,...t(n),minimum:e})}function Ke(e,n){return new K({check:`length_equals`,...t(n),length:e})}function qe(e,n){return new J({check:`string_format`,format:`regex`,...t(n),pattern:e})}function Je(e){return new Y({check:`string_format`,format:`lowercase`,...t(e)})}function Ye(e){return new X({check:`string_format`,format:`uppercase`,...t(e)})}function Xe(e,n){return new Z({check:`string_format`,format:`includes`,...t(n),includes:e})}function Ze(e,n){return new re({check:`string_format`,format:`starts_with`,...t(n),prefix:e})}function Qe(e,n){return new ie({check:`string_format`,format:`ends_with`,...t(n),suffix:e})}function Q(e){return new ae({check:`overwrite`,tx:e})}function $e(e){return Q(t=>t.normalize(e))}function et(){return Q(e=>e.trim())}function tt(){return Q(e=>e.toLowerCase())}function nt(){return Q(e=>e.toUpperCase())}function rt(){return Q(t=>e(t))}function it(e,n,r){return new e({type:`array`,element:n,...t(r)})}function at(e,n,r){return new e({type:`custom`,check:`custom`,fn:n,...t(r)})}function ot(e,t){let n=st(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(l(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(l(r))}},e(t.value,t)),t);return n}function st(e,n){let r=new R({check:`custom`,...t(n)});return r._zod.check=e,r}var ct={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},lt=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ct[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ut=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},dt=(e,t,n,r)=>{n.type=`boolean`},ft=(e,t,n,r)=>{n.not={}},pt=(e,t,n,r)=>{},mt=(e,t,r,i)=>{let a=e._zod.def,o=n(a.entries);o.every(e=>typeof e==`number`)&&(r.type=`number`),o.every(e=>typeof e==`string`)&&(r.type=`string`),r.enum=o},ht=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},gt=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},_t=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},vt=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=u(a.element,t,{...r,path:[...r.path,`items`]})},yt=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=u(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=u(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},$=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>u(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},bt=(e,t,n,r)=>{let i=e._zod.def,a=u(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=u(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},xt=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>u(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?u(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:d,maximum:f}=e._zod.bag;typeof d==`number`&&(i.minItems=d),typeof f==`number`&&(i.maxItems=f)},St=(e,t,n,r)=>{let i=e._zod.def,a=u(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ct=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wt=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Tt=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Et=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Dt=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;u(o,t,r);let s=t.seen.get(e);s.ref=o},Ot=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},kt=(e,t,n,r)=>{let i=e._zod.def;u(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};export{Ge as $,ve as A,te as At,Se as B,A as Bt,it as C,be as Ct,we as D,q as Dt,Ie as E,U as Et,Ve as F,L as Ft,Me as G,v as Gt,je as H,C as Ht,He as I,P as It,Ke as J,x as Jt,ke as K,y as Kt,le as L,I as Lt,ce as M,D as Mt,he as N,O as Nt,Te as O,ne as Ot,Qe as P,F as Pt,We as Q,Xe as R,k as Rt,pt as S,pe as St,De as T,R as Tt,Ae as U,T as Ut,Ce as V,ee as Vt,Ne as W,E as Wt,ze as X,Je as Y,b as Yt,Be as Z,Ot as _,Ye as _t,wt as a,Q as at,xt as b,de as bt,ht as c,rt as ct,St as d,ot as dt,Ue as et,ut as f,tt as ft,Tt as g,Le as gt,Dt as h,ye as ht,gt as i,Pe as it,Oe as j,M as jt,_e as k,N as kt,ft as l,Ze as lt,kt as m,et as mt,dt as n,Re as nt,mt as o,at as ot,yt as p,nt as pt,xe as q,_ as qt,Et as r,$e as rt,bt as s,qe as st,vt as t,ge as tt,Ct as u,se as ut,lt as v,me as vt,Ee as w,oe as wt,$ as x,fe as xt,_t as y,ue as yt,Fe as z,j as zt};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import{Bt as e,Dt as t,Et as n,Gt as r,Jt as i,Kt as a,Tt as o,Vt as s,Yt as c,qt as l,wt as u}from"./admin-vendor-BbMrl7MK.js";function d(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function f(e,t){return typeof t==`bigint`?t.toString():t}function p(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ee(e){return e==null}function m(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function te(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var h=Symbol(`evaluating`);function g(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==h)return r===void 0&&(r=h,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function v(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ne(e){return JSON.stringify(e)}function re(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ie=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ae=p(()=>{if(c.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function b(e){if(y(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(y(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function oe(e){return b(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var se=new Set([`string`,`number`,`symbol`]);function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ce(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function le(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ue={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return S(e,v(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return _(this,`shape`,e),e},checks:[]}))}function fe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return S(e,v(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return _(this,`shape`,r),r},checks:[]}))}function pe(e,t){if(!b(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return S(e,v(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _(this,`shape`,n),n}}))}function me(e,t){if(!b(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return S(e,v(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _(this,`shape`,n),n}}))}function he(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return S(e,v(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return _(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ge(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return S(t,v(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return _(this,`shape`,i),i},checks:[]}))}function _e(e,t,n){return S(t,v(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return _(this,`shape`,i),i}}))}function C(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function w(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function T(e){return typeof e==`string`?e:e?.message}function E(e,t,n){let r=e.message?e.message:T(e.inst?._zod.def?.error?.(e))??T(t?.error?.(e))??T(n.customError?.(e))??T(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function D(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var be=/^[cC][0-9a-z]{6,}$/,xe=/^[0-9a-z]+$/,Se=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ce=/^[0-9a-vA-V]{20}$/,we=/^[A-Za-z0-9]{27}$/,Te=/^[a-zA-Z0-9_-]{21}$/,Ee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,De=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,O=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Oe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ke=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ae(){return new RegExp(ke,`u`)}var je=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Me=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ne=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,k=/^[A-Za-z0-9_-]*$/,Ie=/^https?$/,Le=/^\+[1-9]\d{6,14}$/,A=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Re=RegExp(`^${A}$`);function j(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ze(e){return RegExp(`^${j(e)}$`)}function Be(e){let t=j({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${A}T(?:${r})$`)}var Ve=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},He=/^-?\d+$/,Ue=/^-?\d+(?:\.\d+)?$/,We=/^(?:true|false)$/i,Ge=/^[^A-Z]*$/,Ke=/^[^a-z]*$/,qe={major:4,minor:4,patch:3},M=l(`$ZodType`,(t,n)=>{var i;t??={},t._zod.def=n,t._zod.bag=t._zod.bag||{},t._zod.version=qe;let a=[...t._zod.def.checks??[]];t._zod.traits.has(`$ZodCheck`)&&a.unshift(t);for(let e of a)for(let n of e._zod.onattach)n(t);if(a.length===0)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let e=(e,t,n)=>{let i=C(e),a;for(let o of t){if(o._zod.def.when){if(ve(e)||!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&n?.async===!1)throw new r;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||=C(e,t))});else{if(e.issues.length===t)continue;i||=C(e,t)}}return a?a.then(()=>e):e},n=(n,i,o)=>{if(C(n))return n.aborted=!0,n;let s=e(i,a,o);if(s instanceof Promise){if(o.async===!1)throw new r;return s.then(e=>t._zod.parse(e,o))}return t._zod.parse(s,o)};t._zod.run=(i,o)=>{if(o.skipChecks)return t._zod.parse(i,o);if(o.direction===`backward`){let e=t._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return e instanceof Promise?e.then(e=>n(e,i,o)):n(e,i,o)}let s=t._zod.parse(i,o);if(s instanceof Promise){if(o.async===!1)throw new r;return s.then(t=>e(t,a,o))}return e(s,a,o)}}g(t,`~standard`,()=>({validate:n=>{try{let r=e(t,n);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return s(t,n).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),N=l(`$ZodString`,(e,t)=>{M.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ve(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=l(`$ZodStringFormat`,(e,n)=>{t.init(e,n),N.init(e,n)}),Je=l(`$ZodGUID`,(e,t)=>{t.pattern??=De,P.init(e,t)}),Ye=l(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=O(e)}else t.pattern??=O();P.init(e,t)}),Xe=l(`$ZodEmail`,(e,t)=>{t.pattern??=Oe,P.init(e,t)}),Ze=l(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Ie.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Qe=l(`$ZodEmoji`,(e,t)=>{t.pattern??=Ae(),P.init(e,t)}),$e=l(`$ZodNanoID`,(e,t)=>{t.pattern??=Te,P.init(e,t)}),et=l(`$ZodCUID`,(e,t)=>{t.pattern??=be,P.init(e,t)}),tt=l(`$ZodCUID2`,(e,t)=>{t.pattern??=xe,P.init(e,t)}),nt=l(`$ZodULID`,(e,t)=>{t.pattern??=Se,P.init(e,t)}),rt=l(`$ZodXID`,(e,t)=>{t.pattern??=Ce,P.init(e,t)}),it=l(`$ZodKSUID`,(e,t)=>{t.pattern??=we,P.init(e,t)}),at=l(`$ZodISODateTime`,(e,t)=>{t.pattern??=Be(t),P.init(e,t)}),ot=l(`$ZodISODate`,(e,t)=>{t.pattern??=Re,P.init(e,t)}),st=l(`$ZodISOTime`,(e,t)=>{t.pattern??=ze(t),P.init(e,t)}),ct=l(`$ZodISODuration`,(e,t)=>{t.pattern??=Ee,P.init(e,t)}),lt=l(`$ZodIPv4`,(e,t)=>{t.pattern??=je,P.init(e,t),e._zod.bag.format=`ipv4`}),ut=l(`$ZodIPv6`,(e,t)=>{t.pattern??=Me,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),dt=l(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ne,P.init(e,t)}),ft=l(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Pe,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function F(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var pt=l(`$ZodBase64`,(e,t)=>{t.pattern??=Fe,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{F(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function mt(e){if(!k.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return F(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ht=l(`$ZodBase64URL`,(e,t)=>{t.pattern??=k,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{mt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),gt=l(`$ZodE164`,(e,t)=>{t.pattern??=Le,P.init(e,t)});function _t(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var vt=l(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{_t(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),I=l(`$ZodNumber`,(e,t)=>{M.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ue,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),yt=l(`$ZodNumberFormat`,(e,t)=>{n.init(e,t),I.init(e,t)}),bt=l(`$ZodBoolean`,(e,t)=>{M.init(e,t),e._zod.pattern=We,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),xt=l(`$ZodUnknown`,(e,t)=>{M.init(e,t),e._zod.parse=e=>e}),St=l(`$ZodNever`,(e,t)=>{M.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function L(e,t,n){e.issues.length&&t.issues.push(...w(n,e.issues)),t.value[n]=e.value}var Ct=l(`$ZodArray`,(e,t)=>{M.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>L(t,n,e))):L(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function R(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...w(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function z(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=le(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function B(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>R(e,n,i,t,u,d))):R(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var wt=l(`$ZodObject`,(e,t)=>{if(M.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=p(()=>z(t));g(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=y,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>R(n,t,e,s,r,i))):R(a,t,e,s,r,i)}return i?B(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Tt=l(`$ZodObjectJIT`,(e,t)=>{wt.init(e,t);let n=e._zod.parse,r=p(()=>z(t)),i=e=>{let t=new u([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ne(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ne(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
2
|
-
if (${n}.issues.length) {
|
|
3
|
-
if (${o} in input) {
|
|
4
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
5
|
-
...iss,
|
|
6
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
7
|
-
})));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (${n}.value === undefined) {
|
|
12
|
-
if (${o} in input) {
|
|
13
|
-
newResult[${o}] = undefined;
|
|
14
|
-
}
|
|
15
|
-
} else {
|
|
16
|
-
newResult[${o}] = ${n}.value;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
`):c?t.write(`
|
|
20
|
-
if (${n}.issues.length) {
|
|
21
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
22
|
-
...iss,
|
|
23
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
24
|
-
})));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (${n}.value === undefined) {
|
|
28
|
-
if (${o} in input) {
|
|
29
|
-
newResult[${o}] = undefined;
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
newResult[${o}] = ${n}.value;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
`):t.write(`
|
|
36
|
-
const ${n}_present = ${o} in input;
|
|
37
|
-
if (${n}.issues.length) {
|
|
38
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
39
|
-
...iss,
|
|
40
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
41
|
-
})));
|
|
42
|
-
}
|
|
43
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
44
|
-
payload.issues.push({
|
|
45
|
-
code: "invalid_type",
|
|
46
|
-
expected: "nonoptional",
|
|
47
|
-
input: undefined,
|
|
48
|
-
path: [${o}]
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (${n}_present) {
|
|
53
|
-
if (${n}.value === undefined) {
|
|
54
|
-
newResult[${o}] = undefined;
|
|
55
|
-
} else {
|
|
56
|
-
newResult[${o}] = ${n}.value;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=y,s=!c.jitless,l=s&&ae.value,d=t.catchall,f;e._zod.parse=(c,u)=>{f??=r.value;let p=c.value;return o(p)?s&&l&&u?.async===!1&&u.jitless!==!0?(a||=i(t.shape),c=a(c,u),d?B([],p,c,u,f,e):c):n(c,u):(c.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),c)}});function V(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let a=e.filter(e=>!C(e));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>E(e,r,i())))}),t)}var Et=l(`$ZodUnion`,(e,t)=>{M.init(e,t),g(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),g(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),g(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),g(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>m(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>V(t,r,e,i)):V(o,r,e,i)}}),Dt=l(`$ZodIntersection`,(e,t)=>{M.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>U(e,t,n)):U(e,i,a)}});function H(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(b(e)&&b(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=H(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=H(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function U(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),C(e))return e;let o=H(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ot=l(`$ZodTuple`,(e,t)=>{M.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=W(n,`optin`),c=W(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>G(t,r,e))):G(a,r,e)}}return o.length?Promise.all(o).then(()=>K(l,r,n,a,c)):K(l,r,n,a,c)}});function W(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function G(e,t,n){e.issues.length&&t.issues.push(...w(n,e.issues)),t.value[n]=e.value}function K(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...w(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var kt=l(`$ZodEnum`,(e,t)=>{M.init(e,t);let n=d(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>se.has(typeof e)).map(e=>typeof e==`string`?x(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),At=l(`$ZodLiteral`,(e,t)=>{if(M.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?x(e):e?x(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),jt=l(`$ZodTransform`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,i)=>{if(i.direction===`backward`)throw new a(e.constructor.name);let o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n.fallback=!0,n));if(o instanceof Promise)throw new r;return n.value=o,n.fallback=!0,n}});function q(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Mt=l(`$ZodOptional`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),g(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${m(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>q(e,r)):q(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Nt=l(`$ZodExactOptional`,(e,t)=>{Mt.init(e,t),g(e._zod,`values`,()=>t.innerType._zod.values),g(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Pt=l(`$ZodNullable`,(e,t)=>{M.init(e,t),g(e._zod,`optin`,()=>t.innerType._zod.optin),g(e._zod,`optout`,()=>t.innerType._zod.optout),g(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${m(e.source)}|null)$`):void 0}),g(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Ft=l(`$ZodDefault`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>It(e,t)):It(r,t)}});function It(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Lt=l(`$ZodPrefault`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Rt=l(`$ZodNonOptional`,(e,t)=>{M.init(e,t),g(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>zt(t,e)):zt(i,e)}});function zt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Bt=l(`$ZodCatch`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,g(e._zod,`optout`,()=>t.innerType._zod.optout),g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>E(e,n,i()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>E(e,n,i()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Vt=l(`$ZodPipe`,(e,t)=>{M.init(e,t),g(e._zod,`values`,()=>t.in._zod.values),g(e._zod,`optin`,()=>t.in._zod.optin),g(e._zod,`optout`,()=>t.out._zod.optout),g(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>J(e,t.in,n)):J(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>J(e,t.out,n)):J(r,t.out,n)}});function J(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Ht=l(`$ZodReadonly`,(e,t)=>{M.init(e,t),g(e._zod,`propValues`,()=>t.innerType._zod.propValues),g(e._zod,`values`,()=>t.innerType._zod.values),g(e._zod,`optin`,()=>t.innerType?._zod?.optin),g(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ut):Ut(r)}});function Ut(e){return e.value=Object.freeze(e.value),e}var Wt=l(`$ZodCustom`,(e,t)=>{o.init(e,t),M.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Y(t,n,r,e));Y(i,n,r,e)}});function Y(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(D(e))}}var Gt,Kt=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qt(){return new Kt}(Gt=globalThis).__zod_globalRegistry??(Gt.__zod_globalRegistry=qt());var Jt=globalThis.__zod_globalRegistry;function Yt(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Jt,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function X(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,X(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Q(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Xt(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
61
|
-
|
|
62
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Z(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:$(t,`input`,e.processors),output:$(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Q(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Q(r.element,n);if(r.type===`set`)return Q(r.valueType,n);if(r.type===`lazy`)return Q(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return Q(r.innerType,n);if(r.type===`intersection`)return Q(r.left,n)||Q(r.right,n);if(r.type===`record`||r.type===`map`)return Q(r.keyType,n)||Q(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Q(r.in,n)||Q(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Q(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Q(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Q(e,n))return!0;return!!(r.rest&&Q(r.rest,n))}return!1}var Zt=(e,t={})=>n=>{let r=Yt({...n,processors:t});return X(e,r),Xt(r,e),Z(r,e)},$=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Yt({...i??{},target:a,io:t,processors:n});return X(e,o),Xt(o,e),Z(o,e)};export{rt as $,it as A,Vt as B,ut as C,me as Ct,st as D,ct as E,Pt as F,jt as G,Ht as H,I,nt as J,Ot as K,yt as L,$e as M,St as N,Dt as O,Rt as P,xt as Q,Tt as R,lt as S,_e as St,at as T,re as Tt,N as U,Lt as V,P as W,Ye as X,Ze as Y,Et as Z,Xe as _,ce as _t,Ct as a,S as at,Nt as b,ge as bt,bt as c,pe as ct,et as d,d as dt,He as et,tt as f,ye as ft,gt as g,v as gt,Ft as h,he as ht,Jt as i,ie as it,At as j,vt as k,dt as l,E as lt,Wt as m,f as mt,Zt as n,Ke as nt,pt as o,g as ot,Bt as p,D as pt,M as q,X as r,ue as rt,ht as s,x as st,$ as t,Ge as tt,ft as u,te as ut,Qe as v,ee as vt,ot as w,oe as wt,Je as x,de as xt,kt as y,fe as yt,Mt as z};
|