@ozdao/prometheus-framework 0.1.63 → 0.1.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/browser-ponyfill.cjs +1 -0
- package/dist/_virtual/browser-ponyfill.js +4 -0
- package/dist/_virtual/crc32.cjs +1 -0
- package/dist/_virtual/crc32.js +4 -0
- package/dist/_virtual/events.cjs +1 -0
- package/dist/_virtual/events.js +4 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -0
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +557 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.cjs +1 -0
- package/dist/node_modules/@ethereumjs/rlp/dist/index.js +164 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/_shortw_utils.js +19 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/modular.js +210 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/utils.js +178 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/@noble/curves/esm/secp256k1.js +47 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_assert.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_sha2.js +61 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/_u64.js +48 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/crypto.js +4 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/hmac.js +43 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.js +32 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/scrypt.js +73 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha256.js +120 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha3.js +118 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/sha512.js +144 -0
- package/dist/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/@noble/hashes/esm/utils.js +64 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-NHABU752.js +4 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.cjs +1 -0
- package/dist/node_modules/abitype/dist/chunk-WP7KDV47.js +11 -0
- package/dist/node_modules/abitype/dist/index.cjs +2 -0
- package/dist/node_modules/abitype/dist/index.js +299 -0
- package/dist/node_modules/crc-32/crc32.cjs +1 -0
- package/dist/node_modules/crc-32/crc32.js +51 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.cjs +2 -0
- package/dist/node_modules/cross-fetch/dist/browser-ponyfill.js +320 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/aes.js +61 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/keccak.js +9 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +15 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/random.js +7 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/scrypt.js +8 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/secp256k1.js +4 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.js +35 -0
- package/dist/node_modules/events/events.cjs +1 -0
- package/dist/node_modules/events/events.js +229 -0
- package/dist/node_modules/isomorphic-ws/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-ws/browser.js +6 -0
- package/dist/node_modules/setimmediate/setImmediate.cjs +1 -0
- package/dist/node_modules/setimmediate/setImmediate.js +99 -0
- package/dist/node_modules/web3/lib/esm/abi.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/abi.js +24 -0
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/accounts.js +101 -0
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/index.js +76 -0
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/version.js +4 -0
- package/dist/node_modules/web3/lib/esm/web3.cjs +1 -0
- package/dist/node_modules/web3/lib/esm/web3.js +89 -0
- package/dist/node_modules/web3-core/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/utils.js +14 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_batch_request.js +83 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +343 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +227 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_event_emitter.js +39 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_promi_event.js +58 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +240 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.js +155 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.js +111 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/error_codes.js +106 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.js +58 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/connection_errors.js +37 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/core_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/ens_errors.js +16 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/generic_errors.js +49 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/provider_errors.js +28 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +30 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js +161 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/rpc_errors.js +129 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/schema_errors.js +13 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/signature_errors.js +10 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +5 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +256 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +76 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -0
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +28 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/constants.js +14 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +413 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/schemas.js +570 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decode_signed_transaction.js +31 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/decoding.js +34 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/detect_transaction_type.js +90 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/format_transaction.js +30 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +50 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +79 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +102 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js +109 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +143 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +131 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js +52 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +61 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_pooling.js +51 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +77 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +42 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/validation.js +111 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +1512 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/web3_subscriptions.js +65 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/errors_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/events_api.js +13 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.js +20 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/logs_api.js +14 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/address.js +47 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/array.js +72 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bool.js +37 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js +66 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.js +59 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/number.js +85 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/numbersLimits.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/string.js +22 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/tuple.js +77 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/utils.js +15 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/decode.js +16 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.js +23 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/utils.js +58 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/decode_contract_error_data.js +18 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +219 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/goerli.js +99 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/mainnet.js +115 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/chains/sepolia.js +102 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/common.js +741 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1153.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/1559.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2315.js +28 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2537.js +181 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2565.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2718.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2929.js +87 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/2930.js +24 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3198.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3529.js +29 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3540.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3541.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3554.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3607.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3651.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3670.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3675.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3855.js +21 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/3860.js +26 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4345.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/4399.js +16 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/5133.js +20 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/eips/index.js +49 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/enums.js +27 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/arrowGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/berlin.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/byzantium.js +59 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/chainstart.js +441 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/constantinople.js +71 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/dao.js +13 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/grayGlacier.js +14 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/homestead.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/index.js +39 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/istanbul.js +90 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/london.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/merge.js +15 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/mergeForkIdTransition.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/muirGlacier.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/petersburg.js +42 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/shanghai.js +10 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/spuriousDragon.js +23 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/hardforks/tangerineWhistle.js +46 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/types.js +7 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +277 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/schemas.js +25 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/address.js +57 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js +272 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/constants.js +11 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.js +285 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.js +268 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/legacyTransaction.js +256 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js +89 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/types.js +18 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/utils.js +80 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.cjs +1 -0
- package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.js +361 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +510 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +80 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/index.js +27 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +36 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.js +90 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/ENSRegistry.js +168 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/abi/ens/PublicResolver.js +578 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/config.js +27 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +241 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +105 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +95 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-eth-ens/lib/esm/utils.js +19 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.cjs +1 -0
- package/dist/node_modules/web3-eth-iban/lib/esm/iban.js +283 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/personal.js +265 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +93 -0
- package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/net.js +97 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs +1 -0
- package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.js +51 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-http/lib/esm/index.js +98 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-providers-ws/lib/esm/index.js +70 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js +407 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js +56 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs +1 -0
- package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js +84 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/data_format_types.js +15 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/eth_types.js +12 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/primitives_types.js +4 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_provider.js +89 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.cjs +1 -0
- package/dist/node_modules/web3-types/lib/esm/web3_base_wallet.js +8 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +37 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/converters.js +177 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/event_emitter.js +91 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +134 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/hash.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/index.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/index.js +107 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/json_rpc.js +41 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/objects.js +20 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/promise_helpers.js +104 -0
- package/dist/node_modules/web3-utils/lib/esm/random.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/random.js +7 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +195 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/string_manipulation.js +48 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +21 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/uuid.js +17 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/validation.js +50 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.js +114 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.cjs +1 -0
- package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js +86 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/constants.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/default_validator.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.cjs +3 -0
- package/dist/node_modules/web3-validator/lib/esm/errors.js +17 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/formats.js +31 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/utils.js +178 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/abi.js +4 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/address.js +22 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/block.js +10 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bloom.js +29 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/boolean.js +5 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +27 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/filter.js +26 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +52 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/object.js +13 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/string.js +23 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validation/topic.js +6 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/validator.js +84 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.cjs +1 -0
- package/dist/node_modules/web3-validator/lib/esm/web3_validator.js +31 -0
- package/dist/node_modules/zod/lib/index.cjs +1 -0
- package/dist/node_modules/zod/lib/index.js +2854 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +105 -79
- package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/axios.js +41 -35
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +57 -44
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +8 -15
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +3 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +101 -72
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +19 -19
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +56 -22
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +6 -6
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +23 -38
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +62 -58
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +11 -18
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +11 -9
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +49 -48
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.js +2 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +4 -6
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +13 -24
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +4 -4
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +30 -40
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -3
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +4 -11
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +34 -39
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +2 -5
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +28 -38
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +4 -7
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +5 -8
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +79 -32
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +33 -31
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/utils.js +212 -140
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -67
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -7
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.js +30 -61
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +20 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +28 -33
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +6 -41
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +75 -33
- package/dist/prometheus-framework.cjs.js +29 -30
- package/dist/prometheus-framework.es.js +4123 -3405
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +32 -34
- package/src/modules/products/components/blocks/CardLeftover.vue +1 -2
- package/src/modules/products/components/blocks/CardProduct.vue +1 -17
- package/src/modules/products/components/sections/EditProductInfo.vue +3 -5
@@ -0,0 +1,2854 @@
|
|
1
|
+
var g;
|
2
|
+
(function(s) {
|
3
|
+
s.assertEqual = (n) => n;
|
4
|
+
function e(n) {
|
5
|
+
}
|
6
|
+
s.assertIs = e;
|
7
|
+
function t(n) {
|
8
|
+
throw new Error();
|
9
|
+
}
|
10
|
+
s.assertNever = t, s.arrayToEnum = (n) => {
|
11
|
+
const a = {};
|
12
|
+
for (const i of n)
|
13
|
+
a[i] = i;
|
14
|
+
return a;
|
15
|
+
}, s.getValidEnumValues = (n) => {
|
16
|
+
const a = s.objectKeys(n).filter((o) => typeof n[n[o]] != "number"), i = {};
|
17
|
+
for (const o of a)
|
18
|
+
i[o] = n[o];
|
19
|
+
return s.objectValues(i);
|
20
|
+
}, s.objectValues = (n) => s.objectKeys(n).map(function(a) {
|
21
|
+
return n[a];
|
22
|
+
}), s.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
|
23
|
+
const a = [];
|
24
|
+
for (const i in n)
|
25
|
+
Object.prototype.hasOwnProperty.call(n, i) && a.push(i);
|
26
|
+
return a;
|
27
|
+
}, s.find = (n, a) => {
|
28
|
+
for (const i of n)
|
29
|
+
if (a(i))
|
30
|
+
return i;
|
31
|
+
}, s.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.floor(n) === n;
|
32
|
+
function r(n, a = " | ") {
|
33
|
+
return n.map((i) => typeof i == "string" ? `'${i}'` : i).join(a);
|
34
|
+
}
|
35
|
+
s.joinValues = r, s.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
|
36
|
+
})(g || (g = {}));
|
37
|
+
var ye;
|
38
|
+
(function(s) {
|
39
|
+
s.mergeShapes = (e, t) => ({
|
40
|
+
...e,
|
41
|
+
...t
|
42
|
+
// second overwrites first
|
43
|
+
});
|
44
|
+
})(ye || (ye = {}));
|
45
|
+
const u = g.arrayToEnum([
|
46
|
+
"string",
|
47
|
+
"nan",
|
48
|
+
"number",
|
49
|
+
"integer",
|
50
|
+
"float",
|
51
|
+
"boolean",
|
52
|
+
"date",
|
53
|
+
"bigint",
|
54
|
+
"symbol",
|
55
|
+
"function",
|
56
|
+
"undefined",
|
57
|
+
"null",
|
58
|
+
"array",
|
59
|
+
"object",
|
60
|
+
"unknown",
|
61
|
+
"promise",
|
62
|
+
"void",
|
63
|
+
"never",
|
64
|
+
"map",
|
65
|
+
"set"
|
66
|
+
]), R = (s) => {
|
67
|
+
switch (typeof s) {
|
68
|
+
case "undefined":
|
69
|
+
return u.undefined;
|
70
|
+
case "string":
|
71
|
+
return u.string;
|
72
|
+
case "number":
|
73
|
+
return isNaN(s) ? u.nan : u.number;
|
74
|
+
case "boolean":
|
75
|
+
return u.boolean;
|
76
|
+
case "function":
|
77
|
+
return u.function;
|
78
|
+
case "bigint":
|
79
|
+
return u.bigint;
|
80
|
+
case "symbol":
|
81
|
+
return u.symbol;
|
82
|
+
case "object":
|
83
|
+
return Array.isArray(s) ? u.array : s === null ? u.null : s.then && typeof s.then == "function" && s.catch && typeof s.catch == "function" ? u.promise : typeof Map < "u" && s instanceof Map ? u.map : typeof Set < "u" && s instanceof Set ? u.set : typeof Date < "u" && s instanceof Date ? u.date : u.object;
|
84
|
+
default:
|
85
|
+
return u.unknown;
|
86
|
+
}
|
87
|
+
}, c = g.arrayToEnum([
|
88
|
+
"invalid_type",
|
89
|
+
"invalid_literal",
|
90
|
+
"custom",
|
91
|
+
"invalid_union",
|
92
|
+
"invalid_union_discriminator",
|
93
|
+
"invalid_enum_value",
|
94
|
+
"unrecognized_keys",
|
95
|
+
"invalid_arguments",
|
96
|
+
"invalid_return_type",
|
97
|
+
"invalid_date",
|
98
|
+
"invalid_string",
|
99
|
+
"too_small",
|
100
|
+
"too_big",
|
101
|
+
"invalid_intersection_types",
|
102
|
+
"not_multiple_of",
|
103
|
+
"not_finite"
|
104
|
+
]), Ee = (s) => JSON.stringify(s, null, 2).replace(/"([^"]+)":/g, "$1:");
|
105
|
+
class Z extends Error {
|
106
|
+
constructor(e) {
|
107
|
+
super(), this.issues = [], this.addIssue = (r) => {
|
108
|
+
this.issues = [...this.issues, r];
|
109
|
+
}, this.addIssues = (r = []) => {
|
110
|
+
this.issues = [...this.issues, ...r];
|
111
|
+
};
|
112
|
+
const t = new.target.prototype;
|
113
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
114
|
+
}
|
115
|
+
get errors() {
|
116
|
+
return this.issues;
|
117
|
+
}
|
118
|
+
format(e) {
|
119
|
+
const t = e || function(a) {
|
120
|
+
return a.message;
|
121
|
+
}, r = { _errors: [] }, n = (a) => {
|
122
|
+
for (const i of a.issues)
|
123
|
+
if (i.code === "invalid_union")
|
124
|
+
i.unionErrors.map(n);
|
125
|
+
else if (i.code === "invalid_return_type")
|
126
|
+
n(i.returnTypeError);
|
127
|
+
else if (i.code === "invalid_arguments")
|
128
|
+
n(i.argumentsError);
|
129
|
+
else if (i.path.length === 0)
|
130
|
+
r._errors.push(t(i));
|
131
|
+
else {
|
132
|
+
let o = r, f = 0;
|
133
|
+
for (; f < i.path.length; ) {
|
134
|
+
const d = i.path[f];
|
135
|
+
f === i.path.length - 1 ? (o[d] = o[d] || { _errors: [] }, o[d]._errors.push(t(i))) : o[d] = o[d] || { _errors: [] }, o = o[d], f++;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
};
|
139
|
+
return n(this), r;
|
140
|
+
}
|
141
|
+
toString() {
|
142
|
+
return this.message;
|
143
|
+
}
|
144
|
+
get message() {
|
145
|
+
return JSON.stringify(this.issues, g.jsonStringifyReplacer, 2);
|
146
|
+
}
|
147
|
+
get isEmpty() {
|
148
|
+
return this.issues.length === 0;
|
149
|
+
}
|
150
|
+
flatten(e = (t) => t.message) {
|
151
|
+
const t = {}, r = [];
|
152
|
+
for (const n of this.issues)
|
153
|
+
n.path.length > 0 ? (t[n.path[0]] = t[n.path[0]] || [], t[n.path[0]].push(e(n))) : r.push(e(n));
|
154
|
+
return { formErrors: r, fieldErrors: t };
|
155
|
+
}
|
156
|
+
get formErrors() {
|
157
|
+
return this.flatten();
|
158
|
+
}
|
159
|
+
}
|
160
|
+
Z.create = (s) => new Z(s);
|
161
|
+
const W = (s, e) => {
|
162
|
+
let t;
|
163
|
+
switch (s.code) {
|
164
|
+
case c.invalid_type:
|
165
|
+
s.received === u.undefined ? t = "Required" : t = `Expected ${s.expected}, received ${s.received}`;
|
166
|
+
break;
|
167
|
+
case c.invalid_literal:
|
168
|
+
t = `Invalid literal value, expected ${JSON.stringify(s.expected, g.jsonStringifyReplacer)}`;
|
169
|
+
break;
|
170
|
+
case c.unrecognized_keys:
|
171
|
+
t = `Unrecognized key(s) in object: ${g.joinValues(s.keys, ", ")}`;
|
172
|
+
break;
|
173
|
+
case c.invalid_union:
|
174
|
+
t = "Invalid input";
|
175
|
+
break;
|
176
|
+
case c.invalid_union_discriminator:
|
177
|
+
t = `Invalid discriminator value. Expected ${g.joinValues(s.options)}`;
|
178
|
+
break;
|
179
|
+
case c.invalid_enum_value:
|
180
|
+
t = `Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;
|
181
|
+
break;
|
182
|
+
case c.invalid_arguments:
|
183
|
+
t = "Invalid function arguments";
|
184
|
+
break;
|
185
|
+
case c.invalid_return_type:
|
186
|
+
t = "Invalid function return type";
|
187
|
+
break;
|
188
|
+
case c.invalid_date:
|
189
|
+
t = "Invalid date";
|
190
|
+
break;
|
191
|
+
case c.invalid_string:
|
192
|
+
typeof s.validation == "object" ? "includes" in s.validation ? (t = `Invalid input: must include "${s.validation.includes}"`, typeof s.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${s.validation.position}`)) : "startsWith" in s.validation ? t = `Invalid input: must start with "${s.validation.startsWith}"` : "endsWith" in s.validation ? t = `Invalid input: must end with "${s.validation.endsWith}"` : g.assertNever(s.validation) : s.validation !== "regex" ? t = `Invalid ${s.validation}` : t = "Invalid";
|
193
|
+
break;
|
194
|
+
case c.too_small:
|
195
|
+
s.type === "array" ? t = `Array must contain ${s.exact ? "exactly" : s.inclusive ? "at least" : "more than"} ${s.minimum} element(s)` : s.type === "string" ? t = `String must contain ${s.exact ? "exactly" : s.inclusive ? "at least" : "over"} ${s.minimum} character(s)` : s.type === "number" ? t = `Number must be ${s.exact ? "exactly equal to " : s.inclusive ? "greater than or equal to " : "greater than "}${s.minimum}` : s.type === "date" ? t = `Date must be ${s.exact ? "exactly equal to " : s.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(s.minimum))}` : t = "Invalid input";
|
196
|
+
break;
|
197
|
+
case c.too_big:
|
198
|
+
s.type === "array" ? t = `Array must contain ${s.exact ? "exactly" : s.inclusive ? "at most" : "less than"} ${s.maximum} element(s)` : s.type === "string" ? t = `String must contain ${s.exact ? "exactly" : s.inclusive ? "at most" : "under"} ${s.maximum} character(s)` : s.type === "number" ? t = `Number must be ${s.exact ? "exactly" : s.inclusive ? "less than or equal to" : "less than"} ${s.maximum}` : s.type === "bigint" ? t = `BigInt must be ${s.exact ? "exactly" : s.inclusive ? "less than or equal to" : "less than"} ${s.maximum}` : s.type === "date" ? t = `Date must be ${s.exact ? "exactly" : s.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(s.maximum))}` : t = "Invalid input";
|
199
|
+
break;
|
200
|
+
case c.custom:
|
201
|
+
t = "Invalid input";
|
202
|
+
break;
|
203
|
+
case c.invalid_intersection_types:
|
204
|
+
t = "Intersection results could not be merged";
|
205
|
+
break;
|
206
|
+
case c.not_multiple_of:
|
207
|
+
t = `Number must be a multiple of ${s.multipleOf}`;
|
208
|
+
break;
|
209
|
+
case c.not_finite:
|
210
|
+
t = "Number must be finite";
|
211
|
+
break;
|
212
|
+
default:
|
213
|
+
t = e.defaultError, g.assertNever(s);
|
214
|
+
}
|
215
|
+
return { message: t };
|
216
|
+
};
|
217
|
+
let be = W;
|
218
|
+
function Ie(s) {
|
219
|
+
be = s;
|
220
|
+
}
|
221
|
+
function ne() {
|
222
|
+
return be;
|
223
|
+
}
|
224
|
+
const ae = (s) => {
|
225
|
+
const { data: e, path: t, errorMaps: r, issueData: n } = s, a = [...t, ...n.path || []], i = {
|
226
|
+
...n,
|
227
|
+
path: a
|
228
|
+
};
|
229
|
+
let o = "";
|
230
|
+
const f = r.filter((d) => !!d).slice().reverse();
|
231
|
+
for (const d of f)
|
232
|
+
o = d(i, { data: e, defaultError: o }).message;
|
233
|
+
return {
|
234
|
+
...n,
|
235
|
+
path: a,
|
236
|
+
message: n.message || o
|
237
|
+
};
|
238
|
+
}, Re = [];
|
239
|
+
function l(s, e) {
|
240
|
+
const t = ae({
|
241
|
+
issueData: e,
|
242
|
+
data: s.data,
|
243
|
+
path: s.path,
|
244
|
+
errorMaps: [
|
245
|
+
s.common.contextualErrorMap,
|
246
|
+
s.schemaErrorMap,
|
247
|
+
ne(),
|
248
|
+
W
|
249
|
+
// then global default map
|
250
|
+
].filter((r) => !!r)
|
251
|
+
});
|
252
|
+
s.common.issues.push(t);
|
253
|
+
}
|
254
|
+
class k {
|
255
|
+
constructor() {
|
256
|
+
this.value = "valid";
|
257
|
+
}
|
258
|
+
dirty() {
|
259
|
+
this.value === "valid" && (this.value = "dirty");
|
260
|
+
}
|
261
|
+
abort() {
|
262
|
+
this.value !== "aborted" && (this.value = "aborted");
|
263
|
+
}
|
264
|
+
static mergeArray(e, t) {
|
265
|
+
const r = [];
|
266
|
+
for (const n of t) {
|
267
|
+
if (n.status === "aborted")
|
268
|
+
return m;
|
269
|
+
n.status === "dirty" && e.dirty(), r.push(n.value);
|
270
|
+
}
|
271
|
+
return { status: e.value, value: r };
|
272
|
+
}
|
273
|
+
static async mergeObjectAsync(e, t) {
|
274
|
+
const r = [];
|
275
|
+
for (const n of t)
|
276
|
+
r.push({
|
277
|
+
key: await n.key,
|
278
|
+
value: await n.value
|
279
|
+
});
|
280
|
+
return k.mergeObjectSync(e, r);
|
281
|
+
}
|
282
|
+
static mergeObjectSync(e, t) {
|
283
|
+
const r = {};
|
284
|
+
for (const n of t) {
|
285
|
+
const { key: a, value: i } = n;
|
286
|
+
if (a.status === "aborted" || i.status === "aborted")
|
287
|
+
return m;
|
288
|
+
a.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof i.value < "u" || n.alwaysSet) && (r[a.value] = i.value);
|
289
|
+
}
|
290
|
+
return { status: e.value, value: r };
|
291
|
+
}
|
292
|
+
}
|
293
|
+
const m = Object.freeze({
|
294
|
+
status: "aborted"
|
295
|
+
}), we = (s) => ({ status: "dirty", value: s }), b = (s) => ({ status: "valid", value: s }), ve = (s) => s.status === "aborted", _e = (s) => s.status === "dirty", q = (s) => s.status === "valid", ie = (s) => typeof Promise < "u" && s instanceof Promise;
|
296
|
+
var h;
|
297
|
+
(function(s) {
|
298
|
+
s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
299
|
+
})(h || (h = {}));
|
300
|
+
class O {
|
301
|
+
constructor(e, t, r, n) {
|
302
|
+
this._cachedPath = [], this.parent = e, this.data = t, this._path = r, this._key = n;
|
303
|
+
}
|
304
|
+
get path() {
|
305
|
+
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
const xe = (s, e) => {
|
309
|
+
if (q(e))
|
310
|
+
return { success: !0, data: e.value };
|
311
|
+
if (!s.common.issues.length)
|
312
|
+
throw new Error("Validation failed but no issues detected.");
|
313
|
+
return {
|
314
|
+
success: !1,
|
315
|
+
get error() {
|
316
|
+
if (this._error)
|
317
|
+
return this._error;
|
318
|
+
const t = new Z(s.common.issues);
|
319
|
+
return this._error = t, this._error;
|
320
|
+
}
|
321
|
+
};
|
322
|
+
};
|
323
|
+
function y(s) {
|
324
|
+
if (!s)
|
325
|
+
return {};
|
326
|
+
const { errorMap: e, invalid_type_error: t, required_error: r, description: n } = s;
|
327
|
+
if (e && (t || r))
|
328
|
+
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
329
|
+
return e ? { errorMap: e, description: n } : { errorMap: (i, o) => i.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message: r ?? o.defaultError } : { message: t ?? o.defaultError }, description: n };
|
330
|
+
}
|
331
|
+
class v {
|
332
|
+
constructor(e) {
|
333
|
+
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
|
334
|
+
}
|
335
|
+
get description() {
|
336
|
+
return this._def.description;
|
337
|
+
}
|
338
|
+
_getType(e) {
|
339
|
+
return R(e.data);
|
340
|
+
}
|
341
|
+
_getOrReturnCtx(e, t) {
|
342
|
+
return t || {
|
343
|
+
common: e.parent.common,
|
344
|
+
data: e.data,
|
345
|
+
parsedType: R(e.data),
|
346
|
+
schemaErrorMap: this._def.errorMap,
|
347
|
+
path: e.path,
|
348
|
+
parent: e.parent
|
349
|
+
};
|
350
|
+
}
|
351
|
+
_processInputParams(e) {
|
352
|
+
return {
|
353
|
+
status: new k(),
|
354
|
+
ctx: {
|
355
|
+
common: e.parent.common,
|
356
|
+
data: e.data,
|
357
|
+
parsedType: R(e.data),
|
358
|
+
schemaErrorMap: this._def.errorMap,
|
359
|
+
path: e.path,
|
360
|
+
parent: e.parent
|
361
|
+
}
|
362
|
+
};
|
363
|
+
}
|
364
|
+
_parseSync(e) {
|
365
|
+
const t = this._parse(e);
|
366
|
+
if (ie(t))
|
367
|
+
throw new Error("Synchronous parse encountered promise.");
|
368
|
+
return t;
|
369
|
+
}
|
370
|
+
_parseAsync(e) {
|
371
|
+
const t = this._parse(e);
|
372
|
+
return Promise.resolve(t);
|
373
|
+
}
|
374
|
+
parse(e, t) {
|
375
|
+
const r = this.safeParse(e, t);
|
376
|
+
if (r.success)
|
377
|
+
return r.data;
|
378
|
+
throw r.error;
|
379
|
+
}
|
380
|
+
safeParse(e, t) {
|
381
|
+
var r;
|
382
|
+
const n = {
|
383
|
+
common: {
|
384
|
+
issues: [],
|
385
|
+
async: (r = t == null ? void 0 : t.async) !== null && r !== void 0 ? r : !1,
|
386
|
+
contextualErrorMap: t == null ? void 0 : t.errorMap
|
387
|
+
},
|
388
|
+
path: (t == null ? void 0 : t.path) || [],
|
389
|
+
schemaErrorMap: this._def.errorMap,
|
390
|
+
parent: null,
|
391
|
+
data: e,
|
392
|
+
parsedType: R(e)
|
393
|
+
}, a = this._parseSync({ data: e, path: n.path, parent: n });
|
394
|
+
return xe(n, a);
|
395
|
+
}
|
396
|
+
async parseAsync(e, t) {
|
397
|
+
const r = await this.safeParseAsync(e, t);
|
398
|
+
if (r.success)
|
399
|
+
return r.data;
|
400
|
+
throw r.error;
|
401
|
+
}
|
402
|
+
async safeParseAsync(e, t) {
|
403
|
+
const r = {
|
404
|
+
common: {
|
405
|
+
issues: [],
|
406
|
+
contextualErrorMap: t == null ? void 0 : t.errorMap,
|
407
|
+
async: !0
|
408
|
+
},
|
409
|
+
path: (t == null ? void 0 : t.path) || [],
|
410
|
+
schemaErrorMap: this._def.errorMap,
|
411
|
+
parent: null,
|
412
|
+
data: e,
|
413
|
+
parsedType: R(e)
|
414
|
+
}, n = this._parse({ data: e, path: r.path, parent: r }), a = await (ie(n) ? n : Promise.resolve(n));
|
415
|
+
return xe(r, a);
|
416
|
+
}
|
417
|
+
refine(e, t) {
|
418
|
+
const r = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
|
419
|
+
return this._refinement((n, a) => {
|
420
|
+
const i = e(n), o = () => a.addIssue({
|
421
|
+
code: c.custom,
|
422
|
+
...r(n)
|
423
|
+
});
|
424
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((f) => f ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
425
|
+
});
|
426
|
+
}
|
427
|
+
refinement(e, t) {
|
428
|
+
return this._refinement((r, n) => e(r) ? !0 : (n.addIssue(typeof t == "function" ? t(r, n) : t), !1));
|
429
|
+
}
|
430
|
+
_refinement(e) {
|
431
|
+
return new N({
|
432
|
+
schema: this,
|
433
|
+
typeName: p.ZodEffects,
|
434
|
+
effect: { type: "refinement", refinement: e }
|
435
|
+
});
|
436
|
+
}
|
437
|
+
superRefine(e) {
|
438
|
+
return this._refinement(e);
|
439
|
+
}
|
440
|
+
optional() {
|
441
|
+
return E.create(this, this._def);
|
442
|
+
}
|
443
|
+
nullable() {
|
444
|
+
return L.create(this, this._def);
|
445
|
+
}
|
446
|
+
nullish() {
|
447
|
+
return this.nullable().optional();
|
448
|
+
}
|
449
|
+
array() {
|
450
|
+
return S.create(this, this._def);
|
451
|
+
}
|
452
|
+
promise() {
|
453
|
+
return B.create(this, this._def);
|
454
|
+
}
|
455
|
+
or(e) {
|
456
|
+
return G.create([this, e], this._def);
|
457
|
+
}
|
458
|
+
and(e) {
|
459
|
+
return X.create(this, e, this._def);
|
460
|
+
}
|
461
|
+
transform(e) {
|
462
|
+
return new N({
|
463
|
+
...y(this._def),
|
464
|
+
schema: this,
|
465
|
+
typeName: p.ZodEffects,
|
466
|
+
effect: { type: "transform", transform: e }
|
467
|
+
});
|
468
|
+
}
|
469
|
+
default(e) {
|
470
|
+
const t = typeof e == "function" ? e : () => e;
|
471
|
+
return new te({
|
472
|
+
...y(this._def),
|
473
|
+
innerType: this,
|
474
|
+
defaultValue: t,
|
475
|
+
typeName: p.ZodDefault
|
476
|
+
});
|
477
|
+
}
|
478
|
+
brand() {
|
479
|
+
return new Ze({
|
480
|
+
typeName: p.ZodBranded,
|
481
|
+
type: this,
|
482
|
+
...y(this._def)
|
483
|
+
});
|
484
|
+
}
|
485
|
+
catch(e) {
|
486
|
+
const t = typeof e == "function" ? e : () => e;
|
487
|
+
return new ue({
|
488
|
+
...y(this._def),
|
489
|
+
innerType: this,
|
490
|
+
catchValue: t,
|
491
|
+
typeName: p.ZodCatch
|
492
|
+
});
|
493
|
+
}
|
494
|
+
describe(e) {
|
495
|
+
const t = this.constructor;
|
496
|
+
return new t({
|
497
|
+
...this._def,
|
498
|
+
description: e
|
499
|
+
});
|
500
|
+
}
|
501
|
+
pipe(e) {
|
502
|
+
return se.create(this, e);
|
503
|
+
}
|
504
|
+
readonly() {
|
505
|
+
return fe.create(this);
|
506
|
+
}
|
507
|
+
isOptional() {
|
508
|
+
return this.safeParse(void 0).success;
|
509
|
+
}
|
510
|
+
isNullable() {
|
511
|
+
return this.safeParse(null).success;
|
512
|
+
}
|
513
|
+
}
|
514
|
+
const je = /^c[^\s-]{8,}$/i, Ae = /^[a-z][a-z0-9]*$/, Me = /^[0-9A-HJKMNP-TV-Z]{26}$/, Pe = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ve = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, $e = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
515
|
+
let me;
|
516
|
+
const Le = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, De = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ze = (s) => s.precision ? s.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}Z$`) : s.precision === 0 ? s.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : s.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
517
|
+
function Ue(s, e) {
|
518
|
+
return !!((e === "v4" || !e) && Le.test(s) || (e === "v6" || !e) && De.test(s));
|
519
|
+
}
|
520
|
+
class T extends v {
|
521
|
+
_parse(e) {
|
522
|
+
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
523
|
+
const a = this._getOrReturnCtx(e);
|
524
|
+
return l(
|
525
|
+
a,
|
526
|
+
{
|
527
|
+
code: c.invalid_type,
|
528
|
+
expected: u.string,
|
529
|
+
received: a.parsedType
|
530
|
+
}
|
531
|
+
//
|
532
|
+
), m;
|
533
|
+
}
|
534
|
+
const r = new k();
|
535
|
+
let n;
|
536
|
+
for (const a of this._def.checks)
|
537
|
+
if (a.kind === "min")
|
538
|
+
e.data.length < a.value && (n = this._getOrReturnCtx(e, n), l(n, {
|
539
|
+
code: c.too_small,
|
540
|
+
minimum: a.value,
|
541
|
+
type: "string",
|
542
|
+
inclusive: !0,
|
543
|
+
exact: !1,
|
544
|
+
message: a.message
|
545
|
+
}), r.dirty());
|
546
|
+
else if (a.kind === "max")
|
547
|
+
e.data.length > a.value && (n = this._getOrReturnCtx(e, n), l(n, {
|
548
|
+
code: c.too_big,
|
549
|
+
maximum: a.value,
|
550
|
+
type: "string",
|
551
|
+
inclusive: !0,
|
552
|
+
exact: !1,
|
553
|
+
message: a.message
|
554
|
+
}), r.dirty());
|
555
|
+
else if (a.kind === "length") {
|
556
|
+
const i = e.data.length > a.value, o = e.data.length < a.value;
|
557
|
+
(i || o) && (n = this._getOrReturnCtx(e, n), i ? l(n, {
|
558
|
+
code: c.too_big,
|
559
|
+
maximum: a.value,
|
560
|
+
type: "string",
|
561
|
+
inclusive: !0,
|
562
|
+
exact: !0,
|
563
|
+
message: a.message
|
564
|
+
}) : o && l(n, {
|
565
|
+
code: c.too_small,
|
566
|
+
minimum: a.value,
|
567
|
+
type: "string",
|
568
|
+
inclusive: !0,
|
569
|
+
exact: !0,
|
570
|
+
message: a.message
|
571
|
+
}), r.dirty());
|
572
|
+
} else if (a.kind === "email")
|
573
|
+
Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
574
|
+
validation: "email",
|
575
|
+
code: c.invalid_string,
|
576
|
+
message: a.message
|
577
|
+
}), r.dirty());
|
578
|
+
else if (a.kind === "emoji")
|
579
|
+
me || (me = new RegExp($e, "u")), me.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
580
|
+
validation: "emoji",
|
581
|
+
code: c.invalid_string,
|
582
|
+
message: a.message
|
583
|
+
}), r.dirty());
|
584
|
+
else if (a.kind === "uuid")
|
585
|
+
Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
586
|
+
validation: "uuid",
|
587
|
+
code: c.invalid_string,
|
588
|
+
message: a.message
|
589
|
+
}), r.dirty());
|
590
|
+
else if (a.kind === "cuid")
|
591
|
+
je.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
592
|
+
validation: "cuid",
|
593
|
+
code: c.invalid_string,
|
594
|
+
message: a.message
|
595
|
+
}), r.dirty());
|
596
|
+
else if (a.kind === "cuid2")
|
597
|
+
Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
598
|
+
validation: "cuid2",
|
599
|
+
code: c.invalid_string,
|
600
|
+
message: a.message
|
601
|
+
}), r.dirty());
|
602
|
+
else if (a.kind === "ulid")
|
603
|
+
Me.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
604
|
+
validation: "ulid",
|
605
|
+
code: c.invalid_string,
|
606
|
+
message: a.message
|
607
|
+
}), r.dirty());
|
608
|
+
else if (a.kind === "url")
|
609
|
+
try {
|
610
|
+
new URL(e.data);
|
611
|
+
} catch {
|
612
|
+
n = this._getOrReturnCtx(e, n), l(n, {
|
613
|
+
validation: "url",
|
614
|
+
code: c.invalid_string,
|
615
|
+
message: a.message
|
616
|
+
}), r.dirty();
|
617
|
+
}
|
618
|
+
else
|
619
|
+
a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
620
|
+
validation: "regex",
|
621
|
+
code: c.invalid_string,
|
622
|
+
message: a.message
|
623
|
+
}), r.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(e, n), l(n, {
|
624
|
+
code: c.invalid_string,
|
625
|
+
validation: { includes: a.value, position: a.position },
|
626
|
+
message: a.message
|
627
|
+
}), r.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (n = this._getOrReturnCtx(e, n), l(n, {
|
628
|
+
code: c.invalid_string,
|
629
|
+
validation: { startsWith: a.value },
|
630
|
+
message: a.message
|
631
|
+
}), r.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (n = this._getOrReturnCtx(e, n), l(n, {
|
632
|
+
code: c.invalid_string,
|
633
|
+
validation: { endsWith: a.value },
|
634
|
+
message: a.message
|
635
|
+
}), r.dirty()) : a.kind === "datetime" ? ze(a).test(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
636
|
+
code: c.invalid_string,
|
637
|
+
validation: "datetime",
|
638
|
+
message: a.message
|
639
|
+
}), r.dirty()) : a.kind === "ip" ? Ue(e.data, a.version) || (n = this._getOrReturnCtx(e, n), l(n, {
|
640
|
+
validation: "ip",
|
641
|
+
code: c.invalid_string,
|
642
|
+
message: a.message
|
643
|
+
}), r.dirty()) : g.assertNever(a);
|
644
|
+
return { status: r.value, value: e.data };
|
645
|
+
}
|
646
|
+
_regex(e, t, r) {
|
647
|
+
return this.refinement((n) => e.test(n), {
|
648
|
+
validation: t,
|
649
|
+
code: c.invalid_string,
|
650
|
+
...h.errToObj(r)
|
651
|
+
});
|
652
|
+
}
|
653
|
+
_addCheck(e) {
|
654
|
+
return new T({
|
655
|
+
...this._def,
|
656
|
+
checks: [...this._def.checks, e]
|
657
|
+
});
|
658
|
+
}
|
659
|
+
email(e) {
|
660
|
+
return this._addCheck({ kind: "email", ...h.errToObj(e) });
|
661
|
+
}
|
662
|
+
url(e) {
|
663
|
+
return this._addCheck({ kind: "url", ...h.errToObj(e) });
|
664
|
+
}
|
665
|
+
emoji(e) {
|
666
|
+
return this._addCheck({ kind: "emoji", ...h.errToObj(e) });
|
667
|
+
}
|
668
|
+
uuid(e) {
|
669
|
+
return this._addCheck({ kind: "uuid", ...h.errToObj(e) });
|
670
|
+
}
|
671
|
+
cuid(e) {
|
672
|
+
return this._addCheck({ kind: "cuid", ...h.errToObj(e) });
|
673
|
+
}
|
674
|
+
cuid2(e) {
|
675
|
+
return this._addCheck({ kind: "cuid2", ...h.errToObj(e) });
|
676
|
+
}
|
677
|
+
ulid(e) {
|
678
|
+
return this._addCheck({ kind: "ulid", ...h.errToObj(e) });
|
679
|
+
}
|
680
|
+
ip(e) {
|
681
|
+
return this._addCheck({ kind: "ip", ...h.errToObj(e) });
|
682
|
+
}
|
683
|
+
datetime(e) {
|
684
|
+
var t;
|
685
|
+
return typeof e == "string" ? this._addCheck({
|
686
|
+
kind: "datetime",
|
687
|
+
precision: null,
|
688
|
+
offset: !1,
|
689
|
+
message: e
|
690
|
+
}) : this._addCheck({
|
691
|
+
kind: "datetime",
|
692
|
+
precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
|
693
|
+
offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1,
|
694
|
+
...h.errToObj(e == null ? void 0 : e.message)
|
695
|
+
});
|
696
|
+
}
|
697
|
+
regex(e, t) {
|
698
|
+
return this._addCheck({
|
699
|
+
kind: "regex",
|
700
|
+
regex: e,
|
701
|
+
...h.errToObj(t)
|
702
|
+
});
|
703
|
+
}
|
704
|
+
includes(e, t) {
|
705
|
+
return this._addCheck({
|
706
|
+
kind: "includes",
|
707
|
+
value: e,
|
708
|
+
position: t == null ? void 0 : t.position,
|
709
|
+
...h.errToObj(t == null ? void 0 : t.message)
|
710
|
+
});
|
711
|
+
}
|
712
|
+
startsWith(e, t) {
|
713
|
+
return this._addCheck({
|
714
|
+
kind: "startsWith",
|
715
|
+
value: e,
|
716
|
+
...h.errToObj(t)
|
717
|
+
});
|
718
|
+
}
|
719
|
+
endsWith(e, t) {
|
720
|
+
return this._addCheck({
|
721
|
+
kind: "endsWith",
|
722
|
+
value: e,
|
723
|
+
...h.errToObj(t)
|
724
|
+
});
|
725
|
+
}
|
726
|
+
min(e, t) {
|
727
|
+
return this._addCheck({
|
728
|
+
kind: "min",
|
729
|
+
value: e,
|
730
|
+
...h.errToObj(t)
|
731
|
+
});
|
732
|
+
}
|
733
|
+
max(e, t) {
|
734
|
+
return this._addCheck({
|
735
|
+
kind: "max",
|
736
|
+
value: e,
|
737
|
+
...h.errToObj(t)
|
738
|
+
});
|
739
|
+
}
|
740
|
+
length(e, t) {
|
741
|
+
return this._addCheck({
|
742
|
+
kind: "length",
|
743
|
+
value: e,
|
744
|
+
...h.errToObj(t)
|
745
|
+
});
|
746
|
+
}
|
747
|
+
/**
|
748
|
+
* @deprecated Use z.string().min(1) instead.
|
749
|
+
* @see {@link ZodString.min}
|
750
|
+
*/
|
751
|
+
nonempty(e) {
|
752
|
+
return this.min(1, h.errToObj(e));
|
753
|
+
}
|
754
|
+
trim() {
|
755
|
+
return new T({
|
756
|
+
...this._def,
|
757
|
+
checks: [...this._def.checks, { kind: "trim" }]
|
758
|
+
});
|
759
|
+
}
|
760
|
+
toLowerCase() {
|
761
|
+
return new T({
|
762
|
+
...this._def,
|
763
|
+
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
764
|
+
});
|
765
|
+
}
|
766
|
+
toUpperCase() {
|
767
|
+
return new T({
|
768
|
+
...this._def,
|
769
|
+
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
770
|
+
});
|
771
|
+
}
|
772
|
+
get isDatetime() {
|
773
|
+
return !!this._def.checks.find((e) => e.kind === "datetime");
|
774
|
+
}
|
775
|
+
get isEmail() {
|
776
|
+
return !!this._def.checks.find((e) => e.kind === "email");
|
777
|
+
}
|
778
|
+
get isURL() {
|
779
|
+
return !!this._def.checks.find((e) => e.kind === "url");
|
780
|
+
}
|
781
|
+
get isEmoji() {
|
782
|
+
return !!this._def.checks.find((e) => e.kind === "emoji");
|
783
|
+
}
|
784
|
+
get isUUID() {
|
785
|
+
return !!this._def.checks.find((e) => e.kind === "uuid");
|
786
|
+
}
|
787
|
+
get isCUID() {
|
788
|
+
return !!this._def.checks.find((e) => e.kind === "cuid");
|
789
|
+
}
|
790
|
+
get isCUID2() {
|
791
|
+
return !!this._def.checks.find((e) => e.kind === "cuid2");
|
792
|
+
}
|
793
|
+
get isULID() {
|
794
|
+
return !!this._def.checks.find((e) => e.kind === "ulid");
|
795
|
+
}
|
796
|
+
get isIP() {
|
797
|
+
return !!this._def.checks.find((e) => e.kind === "ip");
|
798
|
+
}
|
799
|
+
get minLength() {
|
800
|
+
let e = null;
|
801
|
+
for (const t of this._def.checks)
|
802
|
+
t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
803
|
+
return e;
|
804
|
+
}
|
805
|
+
get maxLength() {
|
806
|
+
let e = null;
|
807
|
+
for (const t of this._def.checks)
|
808
|
+
t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
809
|
+
return e;
|
810
|
+
}
|
811
|
+
}
|
812
|
+
T.create = (s) => {
|
813
|
+
var e;
|
814
|
+
return new T({
|
815
|
+
checks: [],
|
816
|
+
typeName: p.ZodString,
|
817
|
+
coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
|
818
|
+
...y(s)
|
819
|
+
});
|
820
|
+
};
|
821
|
+
function Be(s, e) {
|
822
|
+
const t = (s.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, n = t > r ? t : r, a = parseInt(s.toFixed(n).replace(".", "")), i = parseInt(e.toFixed(n).replace(".", ""));
|
823
|
+
return a % i / Math.pow(10, n);
|
824
|
+
}
|
825
|
+
class j extends v {
|
826
|
+
constructor() {
|
827
|
+
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
828
|
+
}
|
829
|
+
_parse(e) {
|
830
|
+
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== u.number) {
|
831
|
+
const a = this._getOrReturnCtx(e);
|
832
|
+
return l(a, {
|
833
|
+
code: c.invalid_type,
|
834
|
+
expected: u.number,
|
835
|
+
received: a.parsedType
|
836
|
+
}), m;
|
837
|
+
}
|
838
|
+
let r;
|
839
|
+
const n = new k();
|
840
|
+
for (const a of this._def.checks)
|
841
|
+
a.kind === "int" ? g.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
842
|
+
code: c.invalid_type,
|
843
|
+
expected: "integer",
|
844
|
+
received: "float",
|
845
|
+
message: a.message
|
846
|
+
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (r = this._getOrReturnCtx(e, r), l(r, {
|
847
|
+
code: c.too_small,
|
848
|
+
minimum: a.value,
|
849
|
+
type: "number",
|
850
|
+
inclusive: a.inclusive,
|
851
|
+
exact: !1,
|
852
|
+
message: a.message
|
853
|
+
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (r = this._getOrReturnCtx(e, r), l(r, {
|
854
|
+
code: c.too_big,
|
855
|
+
maximum: a.value,
|
856
|
+
type: "number",
|
857
|
+
inclusive: a.inclusive,
|
858
|
+
exact: !1,
|
859
|
+
message: a.message
|
860
|
+
}), n.dirty()) : a.kind === "multipleOf" ? Be(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), l(r, {
|
861
|
+
code: c.not_multiple_of,
|
862
|
+
multipleOf: a.value,
|
863
|
+
message: a.message
|
864
|
+
}), n.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
865
|
+
code: c.not_finite,
|
866
|
+
message: a.message
|
867
|
+
}), n.dirty()) : g.assertNever(a);
|
868
|
+
return { status: n.value, value: e.data };
|
869
|
+
}
|
870
|
+
gte(e, t) {
|
871
|
+
return this.setLimit("min", e, !0, h.toString(t));
|
872
|
+
}
|
873
|
+
gt(e, t) {
|
874
|
+
return this.setLimit("min", e, !1, h.toString(t));
|
875
|
+
}
|
876
|
+
lte(e, t) {
|
877
|
+
return this.setLimit("max", e, !0, h.toString(t));
|
878
|
+
}
|
879
|
+
lt(e, t) {
|
880
|
+
return this.setLimit("max", e, !1, h.toString(t));
|
881
|
+
}
|
882
|
+
setLimit(e, t, r, n) {
|
883
|
+
return new j({
|
884
|
+
...this._def,
|
885
|
+
checks: [
|
886
|
+
...this._def.checks,
|
887
|
+
{
|
888
|
+
kind: e,
|
889
|
+
value: t,
|
890
|
+
inclusive: r,
|
891
|
+
message: h.toString(n)
|
892
|
+
}
|
893
|
+
]
|
894
|
+
});
|
895
|
+
}
|
896
|
+
_addCheck(e) {
|
897
|
+
return new j({
|
898
|
+
...this._def,
|
899
|
+
checks: [...this._def.checks, e]
|
900
|
+
});
|
901
|
+
}
|
902
|
+
int(e) {
|
903
|
+
return this._addCheck({
|
904
|
+
kind: "int",
|
905
|
+
message: h.toString(e)
|
906
|
+
});
|
907
|
+
}
|
908
|
+
positive(e) {
|
909
|
+
return this._addCheck({
|
910
|
+
kind: "min",
|
911
|
+
value: 0,
|
912
|
+
inclusive: !1,
|
913
|
+
message: h.toString(e)
|
914
|
+
});
|
915
|
+
}
|
916
|
+
negative(e) {
|
917
|
+
return this._addCheck({
|
918
|
+
kind: "max",
|
919
|
+
value: 0,
|
920
|
+
inclusive: !1,
|
921
|
+
message: h.toString(e)
|
922
|
+
});
|
923
|
+
}
|
924
|
+
nonpositive(e) {
|
925
|
+
return this._addCheck({
|
926
|
+
kind: "max",
|
927
|
+
value: 0,
|
928
|
+
inclusive: !0,
|
929
|
+
message: h.toString(e)
|
930
|
+
});
|
931
|
+
}
|
932
|
+
nonnegative(e) {
|
933
|
+
return this._addCheck({
|
934
|
+
kind: "min",
|
935
|
+
value: 0,
|
936
|
+
inclusive: !0,
|
937
|
+
message: h.toString(e)
|
938
|
+
});
|
939
|
+
}
|
940
|
+
multipleOf(e, t) {
|
941
|
+
return this._addCheck({
|
942
|
+
kind: "multipleOf",
|
943
|
+
value: e,
|
944
|
+
message: h.toString(t)
|
945
|
+
});
|
946
|
+
}
|
947
|
+
finite(e) {
|
948
|
+
return this._addCheck({
|
949
|
+
kind: "finite",
|
950
|
+
message: h.toString(e)
|
951
|
+
});
|
952
|
+
}
|
953
|
+
safe(e) {
|
954
|
+
return this._addCheck({
|
955
|
+
kind: "min",
|
956
|
+
inclusive: !0,
|
957
|
+
value: Number.MIN_SAFE_INTEGER,
|
958
|
+
message: h.toString(e)
|
959
|
+
})._addCheck({
|
960
|
+
kind: "max",
|
961
|
+
inclusive: !0,
|
962
|
+
value: Number.MAX_SAFE_INTEGER,
|
963
|
+
message: h.toString(e)
|
964
|
+
});
|
965
|
+
}
|
966
|
+
get minValue() {
|
967
|
+
let e = null;
|
968
|
+
for (const t of this._def.checks)
|
969
|
+
t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
970
|
+
return e;
|
971
|
+
}
|
972
|
+
get maxValue() {
|
973
|
+
let e = null;
|
974
|
+
for (const t of this._def.checks)
|
975
|
+
t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
976
|
+
return e;
|
977
|
+
}
|
978
|
+
get isInt() {
|
979
|
+
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && g.isInteger(e.value));
|
980
|
+
}
|
981
|
+
get isFinite() {
|
982
|
+
let e = null, t = null;
|
983
|
+
for (const r of this._def.checks) {
|
984
|
+
if (r.kind === "finite" || r.kind === "int" || r.kind === "multipleOf")
|
985
|
+
return !0;
|
986
|
+
r.kind === "min" ? (t === null || r.value > t) && (t = r.value) : r.kind === "max" && (e === null || r.value < e) && (e = r.value);
|
987
|
+
}
|
988
|
+
return Number.isFinite(t) && Number.isFinite(e);
|
989
|
+
}
|
990
|
+
}
|
991
|
+
j.create = (s) => new j({
|
992
|
+
checks: [],
|
993
|
+
typeName: p.ZodNumber,
|
994
|
+
coerce: (s == null ? void 0 : s.coerce) || !1,
|
995
|
+
...y(s)
|
996
|
+
});
|
997
|
+
class A extends v {
|
998
|
+
constructor() {
|
999
|
+
super(...arguments), this.min = this.gte, this.max = this.lte;
|
1000
|
+
}
|
1001
|
+
_parse(e) {
|
1002
|
+
if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== u.bigint) {
|
1003
|
+
const a = this._getOrReturnCtx(e);
|
1004
|
+
return l(a, {
|
1005
|
+
code: c.invalid_type,
|
1006
|
+
expected: u.bigint,
|
1007
|
+
received: a.parsedType
|
1008
|
+
}), m;
|
1009
|
+
}
|
1010
|
+
let r;
|
1011
|
+
const n = new k();
|
1012
|
+
for (const a of this._def.checks)
|
1013
|
+
a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (r = this._getOrReturnCtx(e, r), l(r, {
|
1014
|
+
code: c.too_small,
|
1015
|
+
type: "bigint",
|
1016
|
+
minimum: a.value,
|
1017
|
+
inclusive: a.inclusive,
|
1018
|
+
message: a.message
|
1019
|
+
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (r = this._getOrReturnCtx(e, r), l(r, {
|
1020
|
+
code: c.too_big,
|
1021
|
+
type: "bigint",
|
1022
|
+
maximum: a.value,
|
1023
|
+
inclusive: a.inclusive,
|
1024
|
+
message: a.message
|
1025
|
+
}), n.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (r = this._getOrReturnCtx(e, r), l(r, {
|
1026
|
+
code: c.not_multiple_of,
|
1027
|
+
multipleOf: a.value,
|
1028
|
+
message: a.message
|
1029
|
+
}), n.dirty()) : g.assertNever(a);
|
1030
|
+
return { status: n.value, value: e.data };
|
1031
|
+
}
|
1032
|
+
gte(e, t) {
|
1033
|
+
return this.setLimit("min", e, !0, h.toString(t));
|
1034
|
+
}
|
1035
|
+
gt(e, t) {
|
1036
|
+
return this.setLimit("min", e, !1, h.toString(t));
|
1037
|
+
}
|
1038
|
+
lte(e, t) {
|
1039
|
+
return this.setLimit("max", e, !0, h.toString(t));
|
1040
|
+
}
|
1041
|
+
lt(e, t) {
|
1042
|
+
return this.setLimit("max", e, !1, h.toString(t));
|
1043
|
+
}
|
1044
|
+
setLimit(e, t, r, n) {
|
1045
|
+
return new A({
|
1046
|
+
...this._def,
|
1047
|
+
checks: [
|
1048
|
+
...this._def.checks,
|
1049
|
+
{
|
1050
|
+
kind: e,
|
1051
|
+
value: t,
|
1052
|
+
inclusive: r,
|
1053
|
+
message: h.toString(n)
|
1054
|
+
}
|
1055
|
+
]
|
1056
|
+
});
|
1057
|
+
}
|
1058
|
+
_addCheck(e) {
|
1059
|
+
return new A({
|
1060
|
+
...this._def,
|
1061
|
+
checks: [...this._def.checks, e]
|
1062
|
+
});
|
1063
|
+
}
|
1064
|
+
positive(e) {
|
1065
|
+
return this._addCheck({
|
1066
|
+
kind: "min",
|
1067
|
+
value: BigInt(0),
|
1068
|
+
inclusive: !1,
|
1069
|
+
message: h.toString(e)
|
1070
|
+
});
|
1071
|
+
}
|
1072
|
+
negative(e) {
|
1073
|
+
return this._addCheck({
|
1074
|
+
kind: "max",
|
1075
|
+
value: BigInt(0),
|
1076
|
+
inclusive: !1,
|
1077
|
+
message: h.toString(e)
|
1078
|
+
});
|
1079
|
+
}
|
1080
|
+
nonpositive(e) {
|
1081
|
+
return this._addCheck({
|
1082
|
+
kind: "max",
|
1083
|
+
value: BigInt(0),
|
1084
|
+
inclusive: !0,
|
1085
|
+
message: h.toString(e)
|
1086
|
+
});
|
1087
|
+
}
|
1088
|
+
nonnegative(e) {
|
1089
|
+
return this._addCheck({
|
1090
|
+
kind: "min",
|
1091
|
+
value: BigInt(0),
|
1092
|
+
inclusive: !0,
|
1093
|
+
message: h.toString(e)
|
1094
|
+
});
|
1095
|
+
}
|
1096
|
+
multipleOf(e, t) {
|
1097
|
+
return this._addCheck({
|
1098
|
+
kind: "multipleOf",
|
1099
|
+
value: e,
|
1100
|
+
message: h.toString(t)
|
1101
|
+
});
|
1102
|
+
}
|
1103
|
+
get minValue() {
|
1104
|
+
let e = null;
|
1105
|
+
for (const t of this._def.checks)
|
1106
|
+
t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
1107
|
+
return e;
|
1108
|
+
}
|
1109
|
+
get maxValue() {
|
1110
|
+
let e = null;
|
1111
|
+
for (const t of this._def.checks)
|
1112
|
+
t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
1113
|
+
return e;
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
A.create = (s) => {
|
1117
|
+
var e;
|
1118
|
+
return new A({
|
1119
|
+
checks: [],
|
1120
|
+
typeName: p.ZodBigInt,
|
1121
|
+
coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
|
1122
|
+
...y(s)
|
1123
|
+
});
|
1124
|
+
};
|
1125
|
+
class J extends v {
|
1126
|
+
_parse(e) {
|
1127
|
+
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
1128
|
+
const r = this._getOrReturnCtx(e);
|
1129
|
+
return l(r, {
|
1130
|
+
code: c.invalid_type,
|
1131
|
+
expected: u.boolean,
|
1132
|
+
received: r.parsedType
|
1133
|
+
}), m;
|
1134
|
+
}
|
1135
|
+
return b(e.data);
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
J.create = (s) => new J({
|
1139
|
+
typeName: p.ZodBoolean,
|
1140
|
+
coerce: (s == null ? void 0 : s.coerce) || !1,
|
1141
|
+
...y(s)
|
1142
|
+
});
|
1143
|
+
class V extends v {
|
1144
|
+
_parse(e) {
|
1145
|
+
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
1146
|
+
const a = this._getOrReturnCtx(e);
|
1147
|
+
return l(a, {
|
1148
|
+
code: c.invalid_type,
|
1149
|
+
expected: u.date,
|
1150
|
+
received: a.parsedType
|
1151
|
+
}), m;
|
1152
|
+
}
|
1153
|
+
if (isNaN(e.data.getTime())) {
|
1154
|
+
const a = this._getOrReturnCtx(e);
|
1155
|
+
return l(a, {
|
1156
|
+
code: c.invalid_date
|
1157
|
+
}), m;
|
1158
|
+
}
|
1159
|
+
const r = new k();
|
1160
|
+
let n;
|
1161
|
+
for (const a of this._def.checks)
|
1162
|
+
a.kind === "min" ? e.data.getTime() < a.value && (n = this._getOrReturnCtx(e, n), l(n, {
|
1163
|
+
code: c.too_small,
|
1164
|
+
message: a.message,
|
1165
|
+
inclusive: !0,
|
1166
|
+
exact: !1,
|
1167
|
+
minimum: a.value,
|
1168
|
+
type: "date"
|
1169
|
+
}), r.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (n = this._getOrReturnCtx(e, n), l(n, {
|
1170
|
+
code: c.too_big,
|
1171
|
+
message: a.message,
|
1172
|
+
inclusive: !0,
|
1173
|
+
exact: !1,
|
1174
|
+
maximum: a.value,
|
1175
|
+
type: "date"
|
1176
|
+
}), r.dirty()) : g.assertNever(a);
|
1177
|
+
return {
|
1178
|
+
status: r.value,
|
1179
|
+
value: new Date(e.data.getTime())
|
1180
|
+
};
|
1181
|
+
}
|
1182
|
+
_addCheck(e) {
|
1183
|
+
return new V({
|
1184
|
+
...this._def,
|
1185
|
+
checks: [...this._def.checks, e]
|
1186
|
+
});
|
1187
|
+
}
|
1188
|
+
min(e, t) {
|
1189
|
+
return this._addCheck({
|
1190
|
+
kind: "min",
|
1191
|
+
value: e.getTime(),
|
1192
|
+
message: h.toString(t)
|
1193
|
+
});
|
1194
|
+
}
|
1195
|
+
max(e, t) {
|
1196
|
+
return this._addCheck({
|
1197
|
+
kind: "max",
|
1198
|
+
value: e.getTime(),
|
1199
|
+
message: h.toString(t)
|
1200
|
+
});
|
1201
|
+
}
|
1202
|
+
get minDate() {
|
1203
|
+
let e = null;
|
1204
|
+
for (const t of this._def.checks)
|
1205
|
+
t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
1206
|
+
return e != null ? new Date(e) : null;
|
1207
|
+
}
|
1208
|
+
get maxDate() {
|
1209
|
+
let e = null;
|
1210
|
+
for (const t of this._def.checks)
|
1211
|
+
t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
1212
|
+
return e != null ? new Date(e) : null;
|
1213
|
+
}
|
1214
|
+
}
|
1215
|
+
V.create = (s) => new V({
|
1216
|
+
checks: [],
|
1217
|
+
coerce: (s == null ? void 0 : s.coerce) || !1,
|
1218
|
+
typeName: p.ZodDate,
|
1219
|
+
...y(s)
|
1220
|
+
});
|
1221
|
+
class oe extends v {
|
1222
|
+
_parse(e) {
|
1223
|
+
if (this._getType(e) !== u.symbol) {
|
1224
|
+
const r = this._getOrReturnCtx(e);
|
1225
|
+
return l(r, {
|
1226
|
+
code: c.invalid_type,
|
1227
|
+
expected: u.symbol,
|
1228
|
+
received: r.parsedType
|
1229
|
+
}), m;
|
1230
|
+
}
|
1231
|
+
return b(e.data);
|
1232
|
+
}
|
1233
|
+
}
|
1234
|
+
oe.create = (s) => new oe({
|
1235
|
+
typeName: p.ZodSymbol,
|
1236
|
+
...y(s)
|
1237
|
+
});
|
1238
|
+
class Y extends v {
|
1239
|
+
_parse(e) {
|
1240
|
+
if (this._getType(e) !== u.undefined) {
|
1241
|
+
const r = this._getOrReturnCtx(e);
|
1242
|
+
return l(r, {
|
1243
|
+
code: c.invalid_type,
|
1244
|
+
expected: u.undefined,
|
1245
|
+
received: r.parsedType
|
1246
|
+
}), m;
|
1247
|
+
}
|
1248
|
+
return b(e.data);
|
1249
|
+
}
|
1250
|
+
}
|
1251
|
+
Y.create = (s) => new Y({
|
1252
|
+
typeName: p.ZodUndefined,
|
1253
|
+
...y(s)
|
1254
|
+
});
|
1255
|
+
class H extends v {
|
1256
|
+
_parse(e) {
|
1257
|
+
if (this._getType(e) !== u.null) {
|
1258
|
+
const r = this._getOrReturnCtx(e);
|
1259
|
+
return l(r, {
|
1260
|
+
code: c.invalid_type,
|
1261
|
+
expected: u.null,
|
1262
|
+
received: r.parsedType
|
1263
|
+
}), m;
|
1264
|
+
}
|
1265
|
+
return b(e.data);
|
1266
|
+
}
|
1267
|
+
}
|
1268
|
+
H.create = (s) => new H({
|
1269
|
+
typeName: p.ZodNull,
|
1270
|
+
...y(s)
|
1271
|
+
});
|
1272
|
+
class U extends v {
|
1273
|
+
constructor() {
|
1274
|
+
super(...arguments), this._any = !0;
|
1275
|
+
}
|
1276
|
+
_parse(e) {
|
1277
|
+
return b(e.data);
|
1278
|
+
}
|
1279
|
+
}
|
1280
|
+
U.create = (s) => new U({
|
1281
|
+
typeName: p.ZodAny,
|
1282
|
+
...y(s)
|
1283
|
+
});
|
1284
|
+
class P extends v {
|
1285
|
+
constructor() {
|
1286
|
+
super(...arguments), this._unknown = !0;
|
1287
|
+
}
|
1288
|
+
_parse(e) {
|
1289
|
+
return b(e.data);
|
1290
|
+
}
|
1291
|
+
}
|
1292
|
+
P.create = (s) => new P({
|
1293
|
+
typeName: p.ZodUnknown,
|
1294
|
+
...y(s)
|
1295
|
+
});
|
1296
|
+
class I extends v {
|
1297
|
+
_parse(e) {
|
1298
|
+
const t = this._getOrReturnCtx(e);
|
1299
|
+
return l(t, {
|
1300
|
+
code: c.invalid_type,
|
1301
|
+
expected: u.never,
|
1302
|
+
received: t.parsedType
|
1303
|
+
}), m;
|
1304
|
+
}
|
1305
|
+
}
|
1306
|
+
I.create = (s) => new I({
|
1307
|
+
typeName: p.ZodNever,
|
1308
|
+
...y(s)
|
1309
|
+
});
|
1310
|
+
class ce extends v {
|
1311
|
+
_parse(e) {
|
1312
|
+
if (this._getType(e) !== u.undefined) {
|
1313
|
+
const r = this._getOrReturnCtx(e);
|
1314
|
+
return l(r, {
|
1315
|
+
code: c.invalid_type,
|
1316
|
+
expected: u.void,
|
1317
|
+
received: r.parsedType
|
1318
|
+
}), m;
|
1319
|
+
}
|
1320
|
+
return b(e.data);
|
1321
|
+
}
|
1322
|
+
}
|
1323
|
+
ce.create = (s) => new ce({
|
1324
|
+
typeName: p.ZodVoid,
|
1325
|
+
...y(s)
|
1326
|
+
});
|
1327
|
+
class S extends v {
|
1328
|
+
_parse(e) {
|
1329
|
+
const { ctx: t, status: r } = this._processInputParams(e), n = this._def;
|
1330
|
+
if (t.parsedType !== u.array)
|
1331
|
+
return l(t, {
|
1332
|
+
code: c.invalid_type,
|
1333
|
+
expected: u.array,
|
1334
|
+
received: t.parsedType
|
1335
|
+
}), m;
|
1336
|
+
if (n.exactLength !== null) {
|
1337
|
+
const i = t.data.length > n.exactLength.value, o = t.data.length < n.exactLength.value;
|
1338
|
+
(i || o) && (l(t, {
|
1339
|
+
code: i ? c.too_big : c.too_small,
|
1340
|
+
minimum: o ? n.exactLength.value : void 0,
|
1341
|
+
maximum: i ? n.exactLength.value : void 0,
|
1342
|
+
type: "array",
|
1343
|
+
inclusive: !0,
|
1344
|
+
exact: !0,
|
1345
|
+
message: n.exactLength.message
|
1346
|
+
}), r.dirty());
|
1347
|
+
}
|
1348
|
+
if (n.minLength !== null && t.data.length < n.minLength.value && (l(t, {
|
1349
|
+
code: c.too_small,
|
1350
|
+
minimum: n.minLength.value,
|
1351
|
+
type: "array",
|
1352
|
+
inclusive: !0,
|
1353
|
+
exact: !1,
|
1354
|
+
message: n.minLength.message
|
1355
|
+
}), r.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (l(t, {
|
1356
|
+
code: c.too_big,
|
1357
|
+
maximum: n.maxLength.value,
|
1358
|
+
type: "array",
|
1359
|
+
inclusive: !0,
|
1360
|
+
exact: !1,
|
1361
|
+
message: n.maxLength.message
|
1362
|
+
}), r.dirty()), t.common.async)
|
1363
|
+
return Promise.all([...t.data].map((i, o) => n.type._parseAsync(new O(t, i, t.path, o)))).then((i) => k.mergeArray(r, i));
|
1364
|
+
const a = [...t.data].map((i, o) => n.type._parseSync(new O(t, i, t.path, o)));
|
1365
|
+
return k.mergeArray(r, a);
|
1366
|
+
}
|
1367
|
+
get element() {
|
1368
|
+
return this._def.type;
|
1369
|
+
}
|
1370
|
+
min(e, t) {
|
1371
|
+
return new S({
|
1372
|
+
...this._def,
|
1373
|
+
minLength: { value: e, message: h.toString(t) }
|
1374
|
+
});
|
1375
|
+
}
|
1376
|
+
max(e, t) {
|
1377
|
+
return new S({
|
1378
|
+
...this._def,
|
1379
|
+
maxLength: { value: e, message: h.toString(t) }
|
1380
|
+
});
|
1381
|
+
}
|
1382
|
+
length(e, t) {
|
1383
|
+
return new S({
|
1384
|
+
...this._def,
|
1385
|
+
exactLength: { value: e, message: h.toString(t) }
|
1386
|
+
});
|
1387
|
+
}
|
1388
|
+
nonempty(e) {
|
1389
|
+
return this.min(1, e);
|
1390
|
+
}
|
1391
|
+
}
|
1392
|
+
S.create = (s, e) => new S({
|
1393
|
+
type: s,
|
1394
|
+
minLength: null,
|
1395
|
+
maxLength: null,
|
1396
|
+
exactLength: null,
|
1397
|
+
typeName: p.ZodArray,
|
1398
|
+
...y(e)
|
1399
|
+
});
|
1400
|
+
function D(s) {
|
1401
|
+
if (s instanceof x) {
|
1402
|
+
const e = {};
|
1403
|
+
for (const t in s.shape) {
|
1404
|
+
const r = s.shape[t];
|
1405
|
+
e[t] = E.create(D(r));
|
1406
|
+
}
|
1407
|
+
return new x({
|
1408
|
+
...s._def,
|
1409
|
+
shape: () => e
|
1410
|
+
});
|
1411
|
+
} else
|
1412
|
+
return s instanceof S ? new S({
|
1413
|
+
...s._def,
|
1414
|
+
type: D(s.element)
|
1415
|
+
}) : s instanceof E ? E.create(D(s.unwrap())) : s instanceof L ? L.create(D(s.unwrap())) : s instanceof C ? C.create(s.items.map((e) => D(e))) : s;
|
1416
|
+
}
|
1417
|
+
class x extends v {
|
1418
|
+
constructor() {
|
1419
|
+
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
1420
|
+
}
|
1421
|
+
_getCached() {
|
1422
|
+
if (this._cached !== null)
|
1423
|
+
return this._cached;
|
1424
|
+
const e = this._def.shape(), t = g.objectKeys(e);
|
1425
|
+
return this._cached = { shape: e, keys: t };
|
1426
|
+
}
|
1427
|
+
_parse(e) {
|
1428
|
+
if (this._getType(e) !== u.object) {
|
1429
|
+
const d = this._getOrReturnCtx(e);
|
1430
|
+
return l(d, {
|
1431
|
+
code: c.invalid_type,
|
1432
|
+
expected: u.object,
|
1433
|
+
received: d.parsedType
|
1434
|
+
}), m;
|
1435
|
+
}
|
1436
|
+
const { status: r, ctx: n } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
|
1437
|
+
if (!(this._def.catchall instanceof I && this._def.unknownKeys === "strip"))
|
1438
|
+
for (const d in n.data)
|
1439
|
+
i.includes(d) || o.push(d);
|
1440
|
+
const f = [];
|
1441
|
+
for (const d of i) {
|
1442
|
+
const _ = a[d], w = n.data[d];
|
1443
|
+
f.push({
|
1444
|
+
key: { status: "valid", value: d },
|
1445
|
+
value: _._parse(new O(n, w, n.path, d)),
|
1446
|
+
alwaysSet: d in n.data
|
1447
|
+
});
|
1448
|
+
}
|
1449
|
+
if (this._def.catchall instanceof I) {
|
1450
|
+
const d = this._def.unknownKeys;
|
1451
|
+
if (d === "passthrough")
|
1452
|
+
for (const _ of o)
|
1453
|
+
f.push({
|
1454
|
+
key: { status: "valid", value: _ },
|
1455
|
+
value: { status: "valid", value: n.data[_] }
|
1456
|
+
});
|
1457
|
+
else if (d === "strict")
|
1458
|
+
o.length > 0 && (l(n, {
|
1459
|
+
code: c.unrecognized_keys,
|
1460
|
+
keys: o
|
1461
|
+
}), r.dirty());
|
1462
|
+
else if (d !== "strip")
|
1463
|
+
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
1464
|
+
} else {
|
1465
|
+
const d = this._def.catchall;
|
1466
|
+
for (const _ of o) {
|
1467
|
+
const w = n.data[_];
|
1468
|
+
f.push({
|
1469
|
+
key: { status: "valid", value: _ },
|
1470
|
+
value: d._parse(
|
1471
|
+
new O(n, w, n.path, _)
|
1472
|
+
//, ctx.child(key), value, getParsedType(value)
|
1473
|
+
),
|
1474
|
+
alwaysSet: _ in n.data
|
1475
|
+
});
|
1476
|
+
}
|
1477
|
+
}
|
1478
|
+
return n.common.async ? Promise.resolve().then(async () => {
|
1479
|
+
const d = [];
|
1480
|
+
for (const _ of f) {
|
1481
|
+
const w = await _.key;
|
1482
|
+
d.push({
|
1483
|
+
key: w,
|
1484
|
+
value: await _.value,
|
1485
|
+
alwaysSet: _.alwaysSet
|
1486
|
+
});
|
1487
|
+
}
|
1488
|
+
return d;
|
1489
|
+
}).then((d) => k.mergeObjectSync(r, d)) : k.mergeObjectSync(r, f);
|
1490
|
+
}
|
1491
|
+
get shape() {
|
1492
|
+
return this._def.shape();
|
1493
|
+
}
|
1494
|
+
strict(e) {
|
1495
|
+
return h.errToObj, new x({
|
1496
|
+
...this._def,
|
1497
|
+
unknownKeys: "strict",
|
1498
|
+
...e !== void 0 ? {
|
1499
|
+
errorMap: (t, r) => {
|
1500
|
+
var n, a, i, o;
|
1501
|
+
const f = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, r).message) !== null && i !== void 0 ? i : r.defaultError;
|
1502
|
+
return t.code === "unrecognized_keys" ? {
|
1503
|
+
message: (o = h.errToObj(e).message) !== null && o !== void 0 ? o : f
|
1504
|
+
} : {
|
1505
|
+
message: f
|
1506
|
+
};
|
1507
|
+
}
|
1508
|
+
} : {}
|
1509
|
+
});
|
1510
|
+
}
|
1511
|
+
strip() {
|
1512
|
+
return new x({
|
1513
|
+
...this._def,
|
1514
|
+
unknownKeys: "strip"
|
1515
|
+
});
|
1516
|
+
}
|
1517
|
+
passthrough() {
|
1518
|
+
return new x({
|
1519
|
+
...this._def,
|
1520
|
+
unknownKeys: "passthrough"
|
1521
|
+
});
|
1522
|
+
}
|
1523
|
+
// const AugmentFactory =
|
1524
|
+
// <Def extends ZodObjectDef>(def: Def) =>
|
1525
|
+
// <Augmentation extends ZodRawShape>(
|
1526
|
+
// augmentation: Augmentation
|
1527
|
+
// ): ZodObject<
|
1528
|
+
// extendShape<ReturnType<Def["shape"]>, Augmentation>,
|
1529
|
+
// Def["unknownKeys"],
|
1530
|
+
// Def["catchall"]
|
1531
|
+
// > => {
|
1532
|
+
// return new ZodObject({
|
1533
|
+
// ...def,
|
1534
|
+
// shape: () => ({
|
1535
|
+
// ...def.shape(),
|
1536
|
+
// ...augmentation,
|
1537
|
+
// }),
|
1538
|
+
// }) as any;
|
1539
|
+
// };
|
1540
|
+
extend(e) {
|
1541
|
+
return new x({
|
1542
|
+
...this._def,
|
1543
|
+
shape: () => ({
|
1544
|
+
...this._def.shape(),
|
1545
|
+
...e
|
1546
|
+
})
|
1547
|
+
});
|
1548
|
+
}
|
1549
|
+
/**
|
1550
|
+
* Prior to zod@1.0.12 there was a bug in the
|
1551
|
+
* inferred type of merged objects. Please
|
1552
|
+
* upgrade if you are experiencing issues.
|
1553
|
+
*/
|
1554
|
+
merge(e) {
|
1555
|
+
return new x({
|
1556
|
+
unknownKeys: e._def.unknownKeys,
|
1557
|
+
catchall: e._def.catchall,
|
1558
|
+
shape: () => ({
|
1559
|
+
...this._def.shape(),
|
1560
|
+
...e._def.shape()
|
1561
|
+
}),
|
1562
|
+
typeName: p.ZodObject
|
1563
|
+
});
|
1564
|
+
}
|
1565
|
+
// merge<
|
1566
|
+
// Incoming extends AnyZodObject,
|
1567
|
+
// Augmentation extends Incoming["shape"],
|
1568
|
+
// NewOutput extends {
|
1569
|
+
// [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
|
1570
|
+
// ? Augmentation[k]["_output"]
|
1571
|
+
// : k extends keyof Output
|
1572
|
+
// ? Output[k]
|
1573
|
+
// : never;
|
1574
|
+
// },
|
1575
|
+
// NewInput extends {
|
1576
|
+
// [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
|
1577
|
+
// ? Augmentation[k]["_input"]
|
1578
|
+
// : k extends keyof Input
|
1579
|
+
// ? Input[k]
|
1580
|
+
// : never;
|
1581
|
+
// }
|
1582
|
+
// >(
|
1583
|
+
// merging: Incoming
|
1584
|
+
// ): ZodObject<
|
1585
|
+
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
1586
|
+
// Incoming["_def"]["unknownKeys"],
|
1587
|
+
// Incoming["_def"]["catchall"],
|
1588
|
+
// NewOutput,
|
1589
|
+
// NewInput
|
1590
|
+
// > {
|
1591
|
+
// const merged: any = new ZodObject({
|
1592
|
+
// unknownKeys: merging._def.unknownKeys,
|
1593
|
+
// catchall: merging._def.catchall,
|
1594
|
+
// shape: () =>
|
1595
|
+
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
1596
|
+
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
1597
|
+
// }) as any;
|
1598
|
+
// return merged;
|
1599
|
+
// }
|
1600
|
+
setKey(e, t) {
|
1601
|
+
return this.augment({ [e]: t });
|
1602
|
+
}
|
1603
|
+
// merge<Incoming extends AnyZodObject>(
|
1604
|
+
// merging: Incoming
|
1605
|
+
// ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
|
1606
|
+
// ZodObject<
|
1607
|
+
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
1608
|
+
// Incoming["_def"]["unknownKeys"],
|
1609
|
+
// Incoming["_def"]["catchall"]
|
1610
|
+
// > {
|
1611
|
+
// // const mergedShape = objectUtil.mergeShapes(
|
1612
|
+
// // this._def.shape(),
|
1613
|
+
// // merging._def.shape()
|
1614
|
+
// // );
|
1615
|
+
// const merged: any = new ZodObject({
|
1616
|
+
// unknownKeys: merging._def.unknownKeys,
|
1617
|
+
// catchall: merging._def.catchall,
|
1618
|
+
// shape: () =>
|
1619
|
+
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
1620
|
+
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
1621
|
+
// }) as any;
|
1622
|
+
// return merged;
|
1623
|
+
// }
|
1624
|
+
catchall(e) {
|
1625
|
+
return new x({
|
1626
|
+
...this._def,
|
1627
|
+
catchall: e
|
1628
|
+
});
|
1629
|
+
}
|
1630
|
+
pick(e) {
|
1631
|
+
const t = {};
|
1632
|
+
return g.objectKeys(e).forEach((r) => {
|
1633
|
+
e[r] && this.shape[r] && (t[r] = this.shape[r]);
|
1634
|
+
}), new x({
|
1635
|
+
...this._def,
|
1636
|
+
shape: () => t
|
1637
|
+
});
|
1638
|
+
}
|
1639
|
+
omit(e) {
|
1640
|
+
const t = {};
|
1641
|
+
return g.objectKeys(this.shape).forEach((r) => {
|
1642
|
+
e[r] || (t[r] = this.shape[r]);
|
1643
|
+
}), new x({
|
1644
|
+
...this._def,
|
1645
|
+
shape: () => t
|
1646
|
+
});
|
1647
|
+
}
|
1648
|
+
/**
|
1649
|
+
* @deprecated
|
1650
|
+
*/
|
1651
|
+
deepPartial() {
|
1652
|
+
return D(this);
|
1653
|
+
}
|
1654
|
+
partial(e) {
|
1655
|
+
const t = {};
|
1656
|
+
return g.objectKeys(this.shape).forEach((r) => {
|
1657
|
+
const n = this.shape[r];
|
1658
|
+
e && !e[r] ? t[r] = n : t[r] = n.optional();
|
1659
|
+
}), new x({
|
1660
|
+
...this._def,
|
1661
|
+
shape: () => t
|
1662
|
+
});
|
1663
|
+
}
|
1664
|
+
required(e) {
|
1665
|
+
const t = {};
|
1666
|
+
return g.objectKeys(this.shape).forEach((r) => {
|
1667
|
+
if (e && !e[r])
|
1668
|
+
t[r] = this.shape[r];
|
1669
|
+
else {
|
1670
|
+
let a = this.shape[r];
|
1671
|
+
for (; a instanceof E; )
|
1672
|
+
a = a._def.innerType;
|
1673
|
+
t[r] = a;
|
1674
|
+
}
|
1675
|
+
}), new x({
|
1676
|
+
...this._def,
|
1677
|
+
shape: () => t
|
1678
|
+
});
|
1679
|
+
}
|
1680
|
+
keyof() {
|
1681
|
+
return Te(g.objectKeys(this.shape));
|
1682
|
+
}
|
1683
|
+
}
|
1684
|
+
x.create = (s, e) => new x({
|
1685
|
+
shape: () => s,
|
1686
|
+
unknownKeys: "strip",
|
1687
|
+
catchall: I.create(),
|
1688
|
+
typeName: p.ZodObject,
|
1689
|
+
...y(e)
|
1690
|
+
});
|
1691
|
+
x.strictCreate = (s, e) => new x({
|
1692
|
+
shape: () => s,
|
1693
|
+
unknownKeys: "strict",
|
1694
|
+
catchall: I.create(),
|
1695
|
+
typeName: p.ZodObject,
|
1696
|
+
...y(e)
|
1697
|
+
});
|
1698
|
+
x.lazycreate = (s, e) => new x({
|
1699
|
+
shape: s,
|
1700
|
+
unknownKeys: "strip",
|
1701
|
+
catchall: I.create(),
|
1702
|
+
typeName: p.ZodObject,
|
1703
|
+
...y(e)
|
1704
|
+
});
|
1705
|
+
class G extends v {
|
1706
|
+
_parse(e) {
|
1707
|
+
const { ctx: t } = this._processInputParams(e), r = this._def.options;
|
1708
|
+
function n(a) {
|
1709
|
+
for (const o of a)
|
1710
|
+
if (o.result.status === "valid")
|
1711
|
+
return o.result;
|
1712
|
+
for (const o of a)
|
1713
|
+
if (o.result.status === "dirty")
|
1714
|
+
return t.common.issues.push(...o.ctx.common.issues), o.result;
|
1715
|
+
const i = a.map((o) => new Z(o.ctx.common.issues));
|
1716
|
+
return l(t, {
|
1717
|
+
code: c.invalid_union,
|
1718
|
+
unionErrors: i
|
1719
|
+
}), m;
|
1720
|
+
}
|
1721
|
+
if (t.common.async)
|
1722
|
+
return Promise.all(r.map(async (a) => {
|
1723
|
+
const i = {
|
1724
|
+
...t,
|
1725
|
+
common: {
|
1726
|
+
...t.common,
|
1727
|
+
issues: []
|
1728
|
+
},
|
1729
|
+
parent: null
|
1730
|
+
};
|
1731
|
+
return {
|
1732
|
+
result: await a._parseAsync({
|
1733
|
+
data: t.data,
|
1734
|
+
path: t.path,
|
1735
|
+
parent: i
|
1736
|
+
}),
|
1737
|
+
ctx: i
|
1738
|
+
};
|
1739
|
+
})).then(n);
|
1740
|
+
{
|
1741
|
+
let a;
|
1742
|
+
const i = [];
|
1743
|
+
for (const f of r) {
|
1744
|
+
const d = {
|
1745
|
+
...t,
|
1746
|
+
common: {
|
1747
|
+
...t.common,
|
1748
|
+
issues: []
|
1749
|
+
},
|
1750
|
+
parent: null
|
1751
|
+
}, _ = f._parseSync({
|
1752
|
+
data: t.data,
|
1753
|
+
path: t.path,
|
1754
|
+
parent: d
|
1755
|
+
});
|
1756
|
+
if (_.status === "valid")
|
1757
|
+
return _;
|
1758
|
+
_.status === "dirty" && !a && (a = { result: _, ctx: d }), d.common.issues.length && i.push(d.common.issues);
|
1759
|
+
}
|
1760
|
+
if (a)
|
1761
|
+
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
1762
|
+
const o = i.map((f) => new Z(f));
|
1763
|
+
return l(t, {
|
1764
|
+
code: c.invalid_union,
|
1765
|
+
unionErrors: o
|
1766
|
+
}), m;
|
1767
|
+
}
|
1768
|
+
}
|
1769
|
+
get options() {
|
1770
|
+
return this._def.options;
|
1771
|
+
}
|
1772
|
+
}
|
1773
|
+
G.create = (s, e) => new G({
|
1774
|
+
options: s,
|
1775
|
+
typeName: p.ZodUnion,
|
1776
|
+
...y(e)
|
1777
|
+
});
|
1778
|
+
const re = (s) => s instanceof K ? re(s.schema) : s instanceof N ? re(s.innerType()) : s instanceof F ? [s.value] : s instanceof M ? s.options : s instanceof ee ? Object.keys(s.enum) : s instanceof te ? re(s._def.innerType) : s instanceof Y ? [void 0] : s instanceof H ? [null] : null;
|
1779
|
+
class he extends v {
|
1780
|
+
_parse(e) {
|
1781
|
+
const { ctx: t } = this._processInputParams(e);
|
1782
|
+
if (t.parsedType !== u.object)
|
1783
|
+
return l(t, {
|
1784
|
+
code: c.invalid_type,
|
1785
|
+
expected: u.object,
|
1786
|
+
received: t.parsedType
|
1787
|
+
}), m;
|
1788
|
+
const r = this.discriminator, n = t.data[r], a = this.optionsMap.get(n);
|
1789
|
+
return a ? t.common.async ? a._parseAsync({
|
1790
|
+
data: t.data,
|
1791
|
+
path: t.path,
|
1792
|
+
parent: t
|
1793
|
+
}) : a._parseSync({
|
1794
|
+
data: t.data,
|
1795
|
+
path: t.path,
|
1796
|
+
parent: t
|
1797
|
+
}) : (l(t, {
|
1798
|
+
code: c.invalid_union_discriminator,
|
1799
|
+
options: Array.from(this.optionsMap.keys()),
|
1800
|
+
path: [r]
|
1801
|
+
}), m);
|
1802
|
+
}
|
1803
|
+
get discriminator() {
|
1804
|
+
return this._def.discriminator;
|
1805
|
+
}
|
1806
|
+
get options() {
|
1807
|
+
return this._def.options;
|
1808
|
+
}
|
1809
|
+
get optionsMap() {
|
1810
|
+
return this._def.optionsMap;
|
1811
|
+
}
|
1812
|
+
/**
|
1813
|
+
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
1814
|
+
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
1815
|
+
* have a different value for each object in the union.
|
1816
|
+
* @param discriminator the name of the discriminator property
|
1817
|
+
* @param types an array of object schemas
|
1818
|
+
* @param params
|
1819
|
+
*/
|
1820
|
+
static create(e, t, r) {
|
1821
|
+
const n = /* @__PURE__ */ new Map();
|
1822
|
+
for (const a of t) {
|
1823
|
+
const i = re(a.shape[e]);
|
1824
|
+
if (!i)
|
1825
|
+
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
1826
|
+
for (const o of i) {
|
1827
|
+
if (n.has(o))
|
1828
|
+
throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
|
1829
|
+
n.set(o, a);
|
1830
|
+
}
|
1831
|
+
}
|
1832
|
+
return new he({
|
1833
|
+
typeName: p.ZodDiscriminatedUnion,
|
1834
|
+
discriminator: e,
|
1835
|
+
options: t,
|
1836
|
+
optionsMap: n,
|
1837
|
+
...y(r)
|
1838
|
+
});
|
1839
|
+
}
|
1840
|
+
}
|
1841
|
+
function ge(s, e) {
|
1842
|
+
const t = R(s), r = R(e);
|
1843
|
+
if (s === e)
|
1844
|
+
return { valid: !0, data: s };
|
1845
|
+
if (t === u.object && r === u.object) {
|
1846
|
+
const n = g.objectKeys(e), a = g.objectKeys(s).filter((o) => n.indexOf(o) !== -1), i = { ...s, ...e };
|
1847
|
+
for (const o of a) {
|
1848
|
+
const f = ge(s[o], e[o]);
|
1849
|
+
if (!f.valid)
|
1850
|
+
return { valid: !1 };
|
1851
|
+
i[o] = f.data;
|
1852
|
+
}
|
1853
|
+
return { valid: !0, data: i };
|
1854
|
+
} else if (t === u.array && r === u.array) {
|
1855
|
+
if (s.length !== e.length)
|
1856
|
+
return { valid: !1 };
|
1857
|
+
const n = [];
|
1858
|
+
for (let a = 0; a < s.length; a++) {
|
1859
|
+
const i = s[a], o = e[a], f = ge(i, o);
|
1860
|
+
if (!f.valid)
|
1861
|
+
return { valid: !1 };
|
1862
|
+
n.push(f.data);
|
1863
|
+
}
|
1864
|
+
return { valid: !0, data: n };
|
1865
|
+
} else
|
1866
|
+
return t === u.date && r === u.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
|
1867
|
+
}
|
1868
|
+
class X extends v {
|
1869
|
+
_parse(e) {
|
1870
|
+
const { status: t, ctx: r } = this._processInputParams(e), n = (a, i) => {
|
1871
|
+
if (ve(a) || ve(i))
|
1872
|
+
return m;
|
1873
|
+
const o = ge(a.value, i.value);
|
1874
|
+
return o.valid ? ((_e(a) || _e(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(r, {
|
1875
|
+
code: c.invalid_intersection_types
|
1876
|
+
}), m);
|
1877
|
+
};
|
1878
|
+
return r.common.async ? Promise.all([
|
1879
|
+
this._def.left._parseAsync({
|
1880
|
+
data: r.data,
|
1881
|
+
path: r.path,
|
1882
|
+
parent: r
|
1883
|
+
}),
|
1884
|
+
this._def.right._parseAsync({
|
1885
|
+
data: r.data,
|
1886
|
+
path: r.path,
|
1887
|
+
parent: r
|
1888
|
+
})
|
1889
|
+
]).then(([a, i]) => n(a, i)) : n(this._def.left._parseSync({
|
1890
|
+
data: r.data,
|
1891
|
+
path: r.path,
|
1892
|
+
parent: r
|
1893
|
+
}), this._def.right._parseSync({
|
1894
|
+
data: r.data,
|
1895
|
+
path: r.path,
|
1896
|
+
parent: r
|
1897
|
+
}));
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
X.create = (s, e, t) => new X({
|
1901
|
+
left: s,
|
1902
|
+
right: e,
|
1903
|
+
typeName: p.ZodIntersection,
|
1904
|
+
...y(t)
|
1905
|
+
});
|
1906
|
+
class C extends v {
|
1907
|
+
_parse(e) {
|
1908
|
+
const { status: t, ctx: r } = this._processInputParams(e);
|
1909
|
+
if (r.parsedType !== u.array)
|
1910
|
+
return l(r, {
|
1911
|
+
code: c.invalid_type,
|
1912
|
+
expected: u.array,
|
1913
|
+
received: r.parsedType
|
1914
|
+
}), m;
|
1915
|
+
if (r.data.length < this._def.items.length)
|
1916
|
+
return l(r, {
|
1917
|
+
code: c.too_small,
|
1918
|
+
minimum: this._def.items.length,
|
1919
|
+
inclusive: !0,
|
1920
|
+
exact: !1,
|
1921
|
+
type: "array"
|
1922
|
+
}), m;
|
1923
|
+
!this._def.rest && r.data.length > this._def.items.length && (l(r, {
|
1924
|
+
code: c.too_big,
|
1925
|
+
maximum: this._def.items.length,
|
1926
|
+
inclusive: !0,
|
1927
|
+
exact: !1,
|
1928
|
+
type: "array"
|
1929
|
+
}), t.dirty());
|
1930
|
+
const a = [...r.data].map((i, o) => {
|
1931
|
+
const f = this._def.items[o] || this._def.rest;
|
1932
|
+
return f ? f._parse(new O(r, i, r.path, o)) : null;
|
1933
|
+
}).filter((i) => !!i);
|
1934
|
+
return r.common.async ? Promise.all(a).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, a);
|
1935
|
+
}
|
1936
|
+
get items() {
|
1937
|
+
return this._def.items;
|
1938
|
+
}
|
1939
|
+
rest(e) {
|
1940
|
+
return new C({
|
1941
|
+
...this._def,
|
1942
|
+
rest: e
|
1943
|
+
});
|
1944
|
+
}
|
1945
|
+
}
|
1946
|
+
C.create = (s, e) => {
|
1947
|
+
if (!Array.isArray(s))
|
1948
|
+
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
1949
|
+
return new C({
|
1950
|
+
items: s,
|
1951
|
+
typeName: p.ZodTuple,
|
1952
|
+
rest: null,
|
1953
|
+
...y(e)
|
1954
|
+
});
|
1955
|
+
};
|
1956
|
+
class Q extends v {
|
1957
|
+
get keySchema() {
|
1958
|
+
return this._def.keyType;
|
1959
|
+
}
|
1960
|
+
get valueSchema() {
|
1961
|
+
return this._def.valueType;
|
1962
|
+
}
|
1963
|
+
_parse(e) {
|
1964
|
+
const { status: t, ctx: r } = this._processInputParams(e);
|
1965
|
+
if (r.parsedType !== u.object)
|
1966
|
+
return l(r, {
|
1967
|
+
code: c.invalid_type,
|
1968
|
+
expected: u.object,
|
1969
|
+
received: r.parsedType
|
1970
|
+
}), m;
|
1971
|
+
const n = [], a = this._def.keyType, i = this._def.valueType;
|
1972
|
+
for (const o in r.data)
|
1973
|
+
n.push({
|
1974
|
+
key: a._parse(new O(r, o, r.path, o)),
|
1975
|
+
value: i._parse(new O(r, r.data[o], r.path, o))
|
1976
|
+
});
|
1977
|
+
return r.common.async ? k.mergeObjectAsync(t, n) : k.mergeObjectSync(t, n);
|
1978
|
+
}
|
1979
|
+
get element() {
|
1980
|
+
return this._def.valueType;
|
1981
|
+
}
|
1982
|
+
static create(e, t, r) {
|
1983
|
+
return t instanceof v ? new Q({
|
1984
|
+
keyType: e,
|
1985
|
+
valueType: t,
|
1986
|
+
typeName: p.ZodRecord,
|
1987
|
+
...y(r)
|
1988
|
+
}) : new Q({
|
1989
|
+
keyType: T.create(),
|
1990
|
+
valueType: e,
|
1991
|
+
typeName: p.ZodRecord,
|
1992
|
+
...y(t)
|
1993
|
+
});
|
1994
|
+
}
|
1995
|
+
}
|
1996
|
+
class de extends v {
|
1997
|
+
get keySchema() {
|
1998
|
+
return this._def.keyType;
|
1999
|
+
}
|
2000
|
+
get valueSchema() {
|
2001
|
+
return this._def.valueType;
|
2002
|
+
}
|
2003
|
+
_parse(e) {
|
2004
|
+
const { status: t, ctx: r } = this._processInputParams(e);
|
2005
|
+
if (r.parsedType !== u.map)
|
2006
|
+
return l(r, {
|
2007
|
+
code: c.invalid_type,
|
2008
|
+
expected: u.map,
|
2009
|
+
received: r.parsedType
|
2010
|
+
}), m;
|
2011
|
+
const n = this._def.keyType, a = this._def.valueType, i = [...r.data.entries()].map(([o, f], d) => ({
|
2012
|
+
key: n._parse(new O(r, o, r.path, [d, "key"])),
|
2013
|
+
value: a._parse(new O(r, f, r.path, [d, "value"]))
|
2014
|
+
}));
|
2015
|
+
if (r.common.async) {
|
2016
|
+
const o = /* @__PURE__ */ new Map();
|
2017
|
+
return Promise.resolve().then(async () => {
|
2018
|
+
for (const f of i) {
|
2019
|
+
const d = await f.key, _ = await f.value;
|
2020
|
+
if (d.status === "aborted" || _.status === "aborted")
|
2021
|
+
return m;
|
2022
|
+
(d.status === "dirty" || _.status === "dirty") && t.dirty(), o.set(d.value, _.value);
|
2023
|
+
}
|
2024
|
+
return { status: t.value, value: o };
|
2025
|
+
});
|
2026
|
+
} else {
|
2027
|
+
const o = /* @__PURE__ */ new Map();
|
2028
|
+
for (const f of i) {
|
2029
|
+
const d = f.key, _ = f.value;
|
2030
|
+
if (d.status === "aborted" || _.status === "aborted")
|
2031
|
+
return m;
|
2032
|
+
(d.status === "dirty" || _.status === "dirty") && t.dirty(), o.set(d.value, _.value);
|
2033
|
+
}
|
2034
|
+
return { status: t.value, value: o };
|
2035
|
+
}
|
2036
|
+
}
|
2037
|
+
}
|
2038
|
+
de.create = (s, e, t) => new de({
|
2039
|
+
valueType: e,
|
2040
|
+
keyType: s,
|
2041
|
+
typeName: p.ZodMap,
|
2042
|
+
...y(t)
|
2043
|
+
});
|
2044
|
+
class $ extends v {
|
2045
|
+
_parse(e) {
|
2046
|
+
const { status: t, ctx: r } = this._processInputParams(e);
|
2047
|
+
if (r.parsedType !== u.set)
|
2048
|
+
return l(r, {
|
2049
|
+
code: c.invalid_type,
|
2050
|
+
expected: u.set,
|
2051
|
+
received: r.parsedType
|
2052
|
+
}), m;
|
2053
|
+
const n = this._def;
|
2054
|
+
n.minSize !== null && r.data.size < n.minSize.value && (l(r, {
|
2055
|
+
code: c.too_small,
|
2056
|
+
minimum: n.minSize.value,
|
2057
|
+
type: "set",
|
2058
|
+
inclusive: !0,
|
2059
|
+
exact: !1,
|
2060
|
+
message: n.minSize.message
|
2061
|
+
}), t.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (l(r, {
|
2062
|
+
code: c.too_big,
|
2063
|
+
maximum: n.maxSize.value,
|
2064
|
+
type: "set",
|
2065
|
+
inclusive: !0,
|
2066
|
+
exact: !1,
|
2067
|
+
message: n.maxSize.message
|
2068
|
+
}), t.dirty());
|
2069
|
+
const a = this._def.valueType;
|
2070
|
+
function i(f) {
|
2071
|
+
const d = /* @__PURE__ */ new Set();
|
2072
|
+
for (const _ of f) {
|
2073
|
+
if (_.status === "aborted")
|
2074
|
+
return m;
|
2075
|
+
_.status === "dirty" && t.dirty(), d.add(_.value);
|
2076
|
+
}
|
2077
|
+
return { status: t.value, value: d };
|
2078
|
+
}
|
2079
|
+
const o = [...r.data.values()].map((f, d) => a._parse(new O(r, f, r.path, d)));
|
2080
|
+
return r.common.async ? Promise.all(o).then((f) => i(f)) : i(o);
|
2081
|
+
}
|
2082
|
+
min(e, t) {
|
2083
|
+
return new $({
|
2084
|
+
...this._def,
|
2085
|
+
minSize: { value: e, message: h.toString(t) }
|
2086
|
+
});
|
2087
|
+
}
|
2088
|
+
max(e, t) {
|
2089
|
+
return new $({
|
2090
|
+
...this._def,
|
2091
|
+
maxSize: { value: e, message: h.toString(t) }
|
2092
|
+
});
|
2093
|
+
}
|
2094
|
+
size(e, t) {
|
2095
|
+
return this.min(e, t).max(e, t);
|
2096
|
+
}
|
2097
|
+
nonempty(e) {
|
2098
|
+
return this.min(1, e);
|
2099
|
+
}
|
2100
|
+
}
|
2101
|
+
$.create = (s, e) => new $({
|
2102
|
+
valueType: s,
|
2103
|
+
minSize: null,
|
2104
|
+
maxSize: null,
|
2105
|
+
typeName: p.ZodSet,
|
2106
|
+
...y(e)
|
2107
|
+
});
|
2108
|
+
class z extends v {
|
2109
|
+
constructor() {
|
2110
|
+
super(...arguments), this.validate = this.implement;
|
2111
|
+
}
|
2112
|
+
_parse(e) {
|
2113
|
+
const { ctx: t } = this._processInputParams(e);
|
2114
|
+
if (t.parsedType !== u.function)
|
2115
|
+
return l(t, {
|
2116
|
+
code: c.invalid_type,
|
2117
|
+
expected: u.function,
|
2118
|
+
received: t.parsedType
|
2119
|
+
}), m;
|
2120
|
+
function r(o, f) {
|
2121
|
+
return ae({
|
2122
|
+
data: o,
|
2123
|
+
path: t.path,
|
2124
|
+
errorMaps: [
|
2125
|
+
t.common.contextualErrorMap,
|
2126
|
+
t.schemaErrorMap,
|
2127
|
+
ne(),
|
2128
|
+
W
|
2129
|
+
].filter((d) => !!d),
|
2130
|
+
issueData: {
|
2131
|
+
code: c.invalid_arguments,
|
2132
|
+
argumentsError: f
|
2133
|
+
}
|
2134
|
+
});
|
2135
|
+
}
|
2136
|
+
function n(o, f) {
|
2137
|
+
return ae({
|
2138
|
+
data: o,
|
2139
|
+
path: t.path,
|
2140
|
+
errorMaps: [
|
2141
|
+
t.common.contextualErrorMap,
|
2142
|
+
t.schemaErrorMap,
|
2143
|
+
ne(),
|
2144
|
+
W
|
2145
|
+
].filter((d) => !!d),
|
2146
|
+
issueData: {
|
2147
|
+
code: c.invalid_return_type,
|
2148
|
+
returnTypeError: f
|
2149
|
+
}
|
2150
|
+
});
|
2151
|
+
}
|
2152
|
+
const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
2153
|
+
if (this._def.returns instanceof B) {
|
2154
|
+
const o = this;
|
2155
|
+
return b(async function(...f) {
|
2156
|
+
const d = new Z([]), _ = await o._def.args.parseAsync(f, a).catch((pe) => {
|
2157
|
+
throw d.addIssue(r(f, pe)), d;
|
2158
|
+
}), w = await Reflect.apply(i, this, _);
|
2159
|
+
return await o._def.returns._def.type.parseAsync(w, a).catch((pe) => {
|
2160
|
+
throw d.addIssue(n(w, pe)), d;
|
2161
|
+
});
|
2162
|
+
});
|
2163
|
+
} else {
|
2164
|
+
const o = this;
|
2165
|
+
return b(function(...f) {
|
2166
|
+
const d = o._def.args.safeParse(f, a);
|
2167
|
+
if (!d.success)
|
2168
|
+
throw new Z([r(f, d.error)]);
|
2169
|
+
const _ = Reflect.apply(i, this, d.data), w = o._def.returns.safeParse(_, a);
|
2170
|
+
if (!w.success)
|
2171
|
+
throw new Z([n(_, w.error)]);
|
2172
|
+
return w.data;
|
2173
|
+
});
|
2174
|
+
}
|
2175
|
+
}
|
2176
|
+
parameters() {
|
2177
|
+
return this._def.args;
|
2178
|
+
}
|
2179
|
+
returnType() {
|
2180
|
+
return this._def.returns;
|
2181
|
+
}
|
2182
|
+
args(...e) {
|
2183
|
+
return new z({
|
2184
|
+
...this._def,
|
2185
|
+
args: C.create(e).rest(P.create())
|
2186
|
+
});
|
2187
|
+
}
|
2188
|
+
returns(e) {
|
2189
|
+
return new z({
|
2190
|
+
...this._def,
|
2191
|
+
returns: e
|
2192
|
+
});
|
2193
|
+
}
|
2194
|
+
implement(e) {
|
2195
|
+
return this.parse(e);
|
2196
|
+
}
|
2197
|
+
strictImplement(e) {
|
2198
|
+
return this.parse(e);
|
2199
|
+
}
|
2200
|
+
static create(e, t, r) {
|
2201
|
+
return new z({
|
2202
|
+
args: e || C.create([]).rest(P.create()),
|
2203
|
+
returns: t || P.create(),
|
2204
|
+
typeName: p.ZodFunction,
|
2205
|
+
...y(r)
|
2206
|
+
});
|
2207
|
+
}
|
2208
|
+
}
|
2209
|
+
class K extends v {
|
2210
|
+
get schema() {
|
2211
|
+
return this._def.getter();
|
2212
|
+
}
|
2213
|
+
_parse(e) {
|
2214
|
+
const { ctx: t } = this._processInputParams(e);
|
2215
|
+
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
2216
|
+
}
|
2217
|
+
}
|
2218
|
+
K.create = (s, e) => new K({
|
2219
|
+
getter: s,
|
2220
|
+
typeName: p.ZodLazy,
|
2221
|
+
...y(e)
|
2222
|
+
});
|
2223
|
+
class F extends v {
|
2224
|
+
_parse(e) {
|
2225
|
+
if (e.data !== this._def.value) {
|
2226
|
+
const t = this._getOrReturnCtx(e);
|
2227
|
+
return l(t, {
|
2228
|
+
received: t.data,
|
2229
|
+
code: c.invalid_literal,
|
2230
|
+
expected: this._def.value
|
2231
|
+
}), m;
|
2232
|
+
}
|
2233
|
+
return { status: "valid", value: e.data };
|
2234
|
+
}
|
2235
|
+
get value() {
|
2236
|
+
return this._def.value;
|
2237
|
+
}
|
2238
|
+
}
|
2239
|
+
F.create = (s, e) => new F({
|
2240
|
+
value: s,
|
2241
|
+
typeName: p.ZodLiteral,
|
2242
|
+
...y(e)
|
2243
|
+
});
|
2244
|
+
function Te(s, e) {
|
2245
|
+
return new M({
|
2246
|
+
values: s,
|
2247
|
+
typeName: p.ZodEnum,
|
2248
|
+
...y(e)
|
2249
|
+
});
|
2250
|
+
}
|
2251
|
+
class M extends v {
|
2252
|
+
_parse(e) {
|
2253
|
+
if (typeof e.data != "string") {
|
2254
|
+
const t = this._getOrReturnCtx(e), r = this._def.values;
|
2255
|
+
return l(t, {
|
2256
|
+
expected: g.joinValues(r),
|
2257
|
+
received: t.parsedType,
|
2258
|
+
code: c.invalid_type
|
2259
|
+
}), m;
|
2260
|
+
}
|
2261
|
+
if (this._def.values.indexOf(e.data) === -1) {
|
2262
|
+
const t = this._getOrReturnCtx(e), r = this._def.values;
|
2263
|
+
return l(t, {
|
2264
|
+
received: t.data,
|
2265
|
+
code: c.invalid_enum_value,
|
2266
|
+
options: r
|
2267
|
+
}), m;
|
2268
|
+
}
|
2269
|
+
return b(e.data);
|
2270
|
+
}
|
2271
|
+
get options() {
|
2272
|
+
return this._def.values;
|
2273
|
+
}
|
2274
|
+
get enum() {
|
2275
|
+
const e = {};
|
2276
|
+
for (const t of this._def.values)
|
2277
|
+
e[t] = t;
|
2278
|
+
return e;
|
2279
|
+
}
|
2280
|
+
get Values() {
|
2281
|
+
const e = {};
|
2282
|
+
for (const t of this._def.values)
|
2283
|
+
e[t] = t;
|
2284
|
+
return e;
|
2285
|
+
}
|
2286
|
+
get Enum() {
|
2287
|
+
const e = {};
|
2288
|
+
for (const t of this._def.values)
|
2289
|
+
e[t] = t;
|
2290
|
+
return e;
|
2291
|
+
}
|
2292
|
+
extract(e) {
|
2293
|
+
return M.create(e);
|
2294
|
+
}
|
2295
|
+
exclude(e) {
|
2296
|
+
return M.create(this.options.filter((t) => !e.includes(t)));
|
2297
|
+
}
|
2298
|
+
}
|
2299
|
+
M.create = Te;
|
2300
|
+
class ee extends v {
|
2301
|
+
_parse(e) {
|
2302
|
+
const t = g.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
|
2303
|
+
if (r.parsedType !== u.string && r.parsedType !== u.number) {
|
2304
|
+
const n = g.objectValues(t);
|
2305
|
+
return l(r, {
|
2306
|
+
expected: g.joinValues(n),
|
2307
|
+
received: r.parsedType,
|
2308
|
+
code: c.invalid_type
|
2309
|
+
}), m;
|
2310
|
+
}
|
2311
|
+
if (t.indexOf(e.data) === -1) {
|
2312
|
+
const n = g.objectValues(t);
|
2313
|
+
return l(r, {
|
2314
|
+
received: r.data,
|
2315
|
+
code: c.invalid_enum_value,
|
2316
|
+
options: n
|
2317
|
+
}), m;
|
2318
|
+
}
|
2319
|
+
return b(e.data);
|
2320
|
+
}
|
2321
|
+
get enum() {
|
2322
|
+
return this._def.values;
|
2323
|
+
}
|
2324
|
+
}
|
2325
|
+
ee.create = (s, e) => new ee({
|
2326
|
+
values: s,
|
2327
|
+
typeName: p.ZodNativeEnum,
|
2328
|
+
...y(e)
|
2329
|
+
});
|
2330
|
+
class B extends v {
|
2331
|
+
unwrap() {
|
2332
|
+
return this._def.type;
|
2333
|
+
}
|
2334
|
+
_parse(e) {
|
2335
|
+
const { ctx: t } = this._processInputParams(e);
|
2336
|
+
if (t.parsedType !== u.promise && t.common.async === !1)
|
2337
|
+
return l(t, {
|
2338
|
+
code: c.invalid_type,
|
2339
|
+
expected: u.promise,
|
2340
|
+
received: t.parsedType
|
2341
|
+
}), m;
|
2342
|
+
const r = t.parsedType === u.promise ? t.data : Promise.resolve(t.data);
|
2343
|
+
return b(r.then((n) => this._def.type.parseAsync(n, {
|
2344
|
+
path: t.path,
|
2345
|
+
errorMap: t.common.contextualErrorMap
|
2346
|
+
})));
|
2347
|
+
}
|
2348
|
+
}
|
2349
|
+
B.create = (s, e) => new B({
|
2350
|
+
type: s,
|
2351
|
+
typeName: p.ZodPromise,
|
2352
|
+
...y(e)
|
2353
|
+
});
|
2354
|
+
class N extends v {
|
2355
|
+
innerType() {
|
2356
|
+
return this._def.schema;
|
2357
|
+
}
|
2358
|
+
sourceType() {
|
2359
|
+
return this._def.schema._def.typeName === p.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
2360
|
+
}
|
2361
|
+
_parse(e) {
|
2362
|
+
const { status: t, ctx: r } = this._processInputParams(e), n = this._def.effect || null, a = {
|
2363
|
+
addIssue: (i) => {
|
2364
|
+
l(r, i), i.fatal ? t.abort() : t.dirty();
|
2365
|
+
},
|
2366
|
+
get path() {
|
2367
|
+
return r.path;
|
2368
|
+
}
|
2369
|
+
};
|
2370
|
+
if (a.addIssue = a.addIssue.bind(a), n.type === "preprocess") {
|
2371
|
+
const i = n.transform(r.data, a);
|
2372
|
+
return r.common.issues.length ? {
|
2373
|
+
status: "dirty",
|
2374
|
+
value: r.data
|
2375
|
+
} : r.common.async ? Promise.resolve(i).then((o) => this._def.schema._parseAsync({
|
2376
|
+
data: o,
|
2377
|
+
path: r.path,
|
2378
|
+
parent: r
|
2379
|
+
})) : this._def.schema._parseSync({
|
2380
|
+
data: i,
|
2381
|
+
path: r.path,
|
2382
|
+
parent: r
|
2383
|
+
});
|
2384
|
+
}
|
2385
|
+
if (n.type === "refinement") {
|
2386
|
+
const i = (o) => {
|
2387
|
+
const f = n.refinement(o, a);
|
2388
|
+
if (r.common.async)
|
2389
|
+
return Promise.resolve(f);
|
2390
|
+
if (f instanceof Promise)
|
2391
|
+
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
2392
|
+
return o;
|
2393
|
+
};
|
2394
|
+
if (r.common.async === !1) {
|
2395
|
+
const o = this._def.schema._parseSync({
|
2396
|
+
data: r.data,
|
2397
|
+
path: r.path,
|
2398
|
+
parent: r
|
2399
|
+
});
|
2400
|
+
return o.status === "aborted" ? m : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
|
2401
|
+
} else
|
2402
|
+
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => o.status === "aborted" ? m : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
|
2403
|
+
}
|
2404
|
+
if (n.type === "transform")
|
2405
|
+
if (r.common.async === !1) {
|
2406
|
+
const i = this._def.schema._parseSync({
|
2407
|
+
data: r.data,
|
2408
|
+
path: r.path,
|
2409
|
+
parent: r
|
2410
|
+
});
|
2411
|
+
if (!q(i))
|
2412
|
+
return i;
|
2413
|
+
const o = n.transform(i.value, a);
|
2414
|
+
if (o instanceof Promise)
|
2415
|
+
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
2416
|
+
return { status: t.value, value: o };
|
2417
|
+
} else
|
2418
|
+
return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((i) => q(i) ? Promise.resolve(n.transform(i.value, a)).then((o) => ({ status: t.value, value: o })) : i);
|
2419
|
+
g.assertNever(n);
|
2420
|
+
}
|
2421
|
+
}
|
2422
|
+
N.create = (s, e, t) => new N({
|
2423
|
+
schema: s,
|
2424
|
+
typeName: p.ZodEffects,
|
2425
|
+
effect: e,
|
2426
|
+
...y(t)
|
2427
|
+
});
|
2428
|
+
N.createWithPreprocess = (s, e, t) => new N({
|
2429
|
+
schema: e,
|
2430
|
+
effect: { type: "preprocess", transform: s },
|
2431
|
+
typeName: p.ZodEffects,
|
2432
|
+
...y(t)
|
2433
|
+
});
|
2434
|
+
class E extends v {
|
2435
|
+
_parse(e) {
|
2436
|
+
return this._getType(e) === u.undefined ? b(void 0) : this._def.innerType._parse(e);
|
2437
|
+
}
|
2438
|
+
unwrap() {
|
2439
|
+
return this._def.innerType;
|
2440
|
+
}
|
2441
|
+
}
|
2442
|
+
E.create = (s, e) => new E({
|
2443
|
+
innerType: s,
|
2444
|
+
typeName: p.ZodOptional,
|
2445
|
+
...y(e)
|
2446
|
+
});
|
2447
|
+
class L extends v {
|
2448
|
+
_parse(e) {
|
2449
|
+
return this._getType(e) === u.null ? b(null) : this._def.innerType._parse(e);
|
2450
|
+
}
|
2451
|
+
unwrap() {
|
2452
|
+
return this._def.innerType;
|
2453
|
+
}
|
2454
|
+
}
|
2455
|
+
L.create = (s, e) => new L({
|
2456
|
+
innerType: s,
|
2457
|
+
typeName: p.ZodNullable,
|
2458
|
+
...y(e)
|
2459
|
+
});
|
2460
|
+
class te extends v {
|
2461
|
+
_parse(e) {
|
2462
|
+
const { ctx: t } = this._processInputParams(e);
|
2463
|
+
let r = t.data;
|
2464
|
+
return t.parsedType === u.undefined && (r = this._def.defaultValue()), this._def.innerType._parse({
|
2465
|
+
data: r,
|
2466
|
+
path: t.path,
|
2467
|
+
parent: t
|
2468
|
+
});
|
2469
|
+
}
|
2470
|
+
removeDefault() {
|
2471
|
+
return this._def.innerType;
|
2472
|
+
}
|
2473
|
+
}
|
2474
|
+
te.create = (s, e) => new te({
|
2475
|
+
innerType: s,
|
2476
|
+
typeName: p.ZodDefault,
|
2477
|
+
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
2478
|
+
...y(e)
|
2479
|
+
});
|
2480
|
+
class ue extends v {
|
2481
|
+
_parse(e) {
|
2482
|
+
const { ctx: t } = this._processInputParams(e), r = {
|
2483
|
+
...t,
|
2484
|
+
common: {
|
2485
|
+
...t.common,
|
2486
|
+
issues: []
|
2487
|
+
}
|
2488
|
+
}, n = this._def.innerType._parse({
|
2489
|
+
data: r.data,
|
2490
|
+
path: r.path,
|
2491
|
+
parent: {
|
2492
|
+
...r
|
2493
|
+
}
|
2494
|
+
});
|
2495
|
+
return ie(n) ? n.then((a) => ({
|
2496
|
+
status: "valid",
|
2497
|
+
value: a.status === "valid" ? a.value : this._def.catchValue({
|
2498
|
+
get error() {
|
2499
|
+
return new Z(r.common.issues);
|
2500
|
+
},
|
2501
|
+
input: r.data
|
2502
|
+
})
|
2503
|
+
})) : {
|
2504
|
+
status: "valid",
|
2505
|
+
value: n.status === "valid" ? n.value : this._def.catchValue({
|
2506
|
+
get error() {
|
2507
|
+
return new Z(r.common.issues);
|
2508
|
+
},
|
2509
|
+
input: r.data
|
2510
|
+
})
|
2511
|
+
};
|
2512
|
+
}
|
2513
|
+
removeCatch() {
|
2514
|
+
return this._def.innerType;
|
2515
|
+
}
|
2516
|
+
}
|
2517
|
+
ue.create = (s, e) => new ue({
|
2518
|
+
innerType: s,
|
2519
|
+
typeName: p.ZodCatch,
|
2520
|
+
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
2521
|
+
...y(e)
|
2522
|
+
});
|
2523
|
+
class le extends v {
|
2524
|
+
_parse(e) {
|
2525
|
+
if (this._getType(e) !== u.nan) {
|
2526
|
+
const r = this._getOrReturnCtx(e);
|
2527
|
+
return l(r, {
|
2528
|
+
code: c.invalid_type,
|
2529
|
+
expected: u.nan,
|
2530
|
+
received: r.parsedType
|
2531
|
+
}), m;
|
2532
|
+
}
|
2533
|
+
return { status: "valid", value: e.data };
|
2534
|
+
}
|
2535
|
+
}
|
2536
|
+
le.create = (s) => new le({
|
2537
|
+
typeName: p.ZodNaN,
|
2538
|
+
...y(s)
|
2539
|
+
});
|
2540
|
+
const We = Symbol("zod_brand");
|
2541
|
+
class Ze extends v {
|
2542
|
+
_parse(e) {
|
2543
|
+
const { ctx: t } = this._processInputParams(e), r = t.data;
|
2544
|
+
return this._def.type._parse({
|
2545
|
+
data: r,
|
2546
|
+
path: t.path,
|
2547
|
+
parent: t
|
2548
|
+
});
|
2549
|
+
}
|
2550
|
+
unwrap() {
|
2551
|
+
return this._def.type;
|
2552
|
+
}
|
2553
|
+
}
|
2554
|
+
class se extends v {
|
2555
|
+
_parse(e) {
|
2556
|
+
const { status: t, ctx: r } = this._processInputParams(e);
|
2557
|
+
if (r.common.async)
|
2558
|
+
return (async () => {
|
2559
|
+
const a = await this._def.in._parseAsync({
|
2560
|
+
data: r.data,
|
2561
|
+
path: r.path,
|
2562
|
+
parent: r
|
2563
|
+
});
|
2564
|
+
return a.status === "aborted" ? m : a.status === "dirty" ? (t.dirty(), we(a.value)) : this._def.out._parseAsync({
|
2565
|
+
data: a.value,
|
2566
|
+
path: r.path,
|
2567
|
+
parent: r
|
2568
|
+
});
|
2569
|
+
})();
|
2570
|
+
{
|
2571
|
+
const n = this._def.in._parseSync({
|
2572
|
+
data: r.data,
|
2573
|
+
path: r.path,
|
2574
|
+
parent: r
|
2575
|
+
});
|
2576
|
+
return n.status === "aborted" ? m : n.status === "dirty" ? (t.dirty(), {
|
2577
|
+
status: "dirty",
|
2578
|
+
value: n.value
|
2579
|
+
}) : this._def.out._parseSync({
|
2580
|
+
data: n.value,
|
2581
|
+
path: r.path,
|
2582
|
+
parent: r
|
2583
|
+
});
|
2584
|
+
}
|
2585
|
+
}
|
2586
|
+
static create(e, t) {
|
2587
|
+
return new se({
|
2588
|
+
in: e,
|
2589
|
+
out: t,
|
2590
|
+
typeName: p.ZodPipeline
|
2591
|
+
});
|
2592
|
+
}
|
2593
|
+
}
|
2594
|
+
class fe extends v {
|
2595
|
+
_parse(e) {
|
2596
|
+
const t = this._def.innerType._parse(e);
|
2597
|
+
return q(t) && (t.value = Object.freeze(t.value)), t;
|
2598
|
+
}
|
2599
|
+
}
|
2600
|
+
fe.create = (s, e) => new fe({
|
2601
|
+
innerType: s,
|
2602
|
+
typeName: p.ZodReadonly,
|
2603
|
+
...y(e)
|
2604
|
+
});
|
2605
|
+
const Se = (s, e = {}, t) => s ? U.create().superRefine((r, n) => {
|
2606
|
+
var a, i;
|
2607
|
+
if (!s(r)) {
|
2608
|
+
const o = typeof e == "function" ? e(r) : typeof e == "string" ? { message: e } : e, f = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, d = typeof o == "string" ? { message: o } : o;
|
2609
|
+
n.addIssue({ code: "custom", ...d, fatal: f });
|
2610
|
+
}
|
2611
|
+
}) : U.create(), qe = {
|
2612
|
+
object: x.lazycreate
|
2613
|
+
};
|
2614
|
+
var p;
|
2615
|
+
(function(s) {
|
2616
|
+
s.ZodString = "ZodString", s.ZodNumber = "ZodNumber", s.ZodNaN = "ZodNaN", s.ZodBigInt = "ZodBigInt", s.ZodBoolean = "ZodBoolean", s.ZodDate = "ZodDate", s.ZodSymbol = "ZodSymbol", s.ZodUndefined = "ZodUndefined", s.ZodNull = "ZodNull", s.ZodAny = "ZodAny", s.ZodUnknown = "ZodUnknown", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray", s.ZodObject = "ZodObject", s.ZodUnion = "ZodUnion", s.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", s.ZodIntersection = "ZodIntersection", s.ZodTuple = "ZodTuple", s.ZodRecord = "ZodRecord", s.ZodMap = "ZodMap", s.ZodSet = "ZodSet", s.ZodFunction = "ZodFunction", s.ZodLazy = "ZodLazy", s.ZodLiteral = "ZodLiteral", s.ZodEnum = "ZodEnum", s.ZodEffects = "ZodEffects", s.ZodNativeEnum = "ZodNativeEnum", s.ZodOptional = "ZodOptional", s.ZodNullable = "ZodNullable", s.ZodDefault = "ZodDefault", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodReadonly";
|
2617
|
+
})(p || (p = {}));
|
2618
|
+
const Je = (s, e = {
|
2619
|
+
message: `Input not instance of ${s.name}`
|
2620
|
+
}) => Se((t) => t instanceof s, e), Ne = T.create, Oe = j.create, Ye = le.create, He = A.create, Ce = J.create, Ge = V.create, Xe = oe.create, Qe = Y.create, Ke = H.create, Fe = U.create, et = P.create, tt = I.create, st = ce.create, rt = S.create, nt = x.create, at = x.strictCreate, it = G.create, ot = he.create, ct = X.create, dt = C.create, ut = Q.create, lt = de.create, ft = $.create, ht = z.create, pt = K.create, mt = F.create, yt = M.create, vt = ee.create, _t = B.create, ke = N.create, gt = E.create, xt = L.create, kt = N.createWithPreprocess, bt = se.create, wt = () => Ne().optional(), Tt = () => Oe().optional(), Zt = () => Ce().optional(), St = {
|
2621
|
+
string: (s) => T.create({ ...s, coerce: !0 }),
|
2622
|
+
number: (s) => j.create({ ...s, coerce: !0 }),
|
2623
|
+
boolean: (s) => J.create({
|
2624
|
+
...s,
|
2625
|
+
coerce: !0
|
2626
|
+
}),
|
2627
|
+
bigint: (s) => A.create({ ...s, coerce: !0 }),
|
2628
|
+
date: (s) => V.create({ ...s, coerce: !0 })
|
2629
|
+
}, Nt = m;
|
2630
|
+
var Ct = /* @__PURE__ */ Object.freeze({
|
2631
|
+
__proto__: null,
|
2632
|
+
defaultErrorMap: W,
|
2633
|
+
setErrorMap: Ie,
|
2634
|
+
getErrorMap: ne,
|
2635
|
+
makeIssue: ae,
|
2636
|
+
EMPTY_PATH: Re,
|
2637
|
+
addIssueToContext: l,
|
2638
|
+
ParseStatus: k,
|
2639
|
+
INVALID: m,
|
2640
|
+
DIRTY: we,
|
2641
|
+
OK: b,
|
2642
|
+
isAborted: ve,
|
2643
|
+
isDirty: _e,
|
2644
|
+
isValid: q,
|
2645
|
+
isAsync: ie,
|
2646
|
+
get util() {
|
2647
|
+
return g;
|
2648
|
+
},
|
2649
|
+
get objectUtil() {
|
2650
|
+
return ye;
|
2651
|
+
},
|
2652
|
+
ZodParsedType: u,
|
2653
|
+
getParsedType: R,
|
2654
|
+
ZodType: v,
|
2655
|
+
ZodString: T,
|
2656
|
+
ZodNumber: j,
|
2657
|
+
ZodBigInt: A,
|
2658
|
+
ZodBoolean: J,
|
2659
|
+
ZodDate: V,
|
2660
|
+
ZodSymbol: oe,
|
2661
|
+
ZodUndefined: Y,
|
2662
|
+
ZodNull: H,
|
2663
|
+
ZodAny: U,
|
2664
|
+
ZodUnknown: P,
|
2665
|
+
ZodNever: I,
|
2666
|
+
ZodVoid: ce,
|
2667
|
+
ZodArray: S,
|
2668
|
+
ZodObject: x,
|
2669
|
+
ZodUnion: G,
|
2670
|
+
ZodDiscriminatedUnion: he,
|
2671
|
+
ZodIntersection: X,
|
2672
|
+
ZodTuple: C,
|
2673
|
+
ZodRecord: Q,
|
2674
|
+
ZodMap: de,
|
2675
|
+
ZodSet: $,
|
2676
|
+
ZodFunction: z,
|
2677
|
+
ZodLazy: K,
|
2678
|
+
ZodLiteral: F,
|
2679
|
+
ZodEnum: M,
|
2680
|
+
ZodNativeEnum: ee,
|
2681
|
+
ZodPromise: B,
|
2682
|
+
ZodEffects: N,
|
2683
|
+
ZodTransformer: N,
|
2684
|
+
ZodOptional: E,
|
2685
|
+
ZodNullable: L,
|
2686
|
+
ZodDefault: te,
|
2687
|
+
ZodCatch: ue,
|
2688
|
+
ZodNaN: le,
|
2689
|
+
BRAND: We,
|
2690
|
+
ZodBranded: Ze,
|
2691
|
+
ZodPipeline: se,
|
2692
|
+
ZodReadonly: fe,
|
2693
|
+
custom: Se,
|
2694
|
+
Schema: v,
|
2695
|
+
ZodSchema: v,
|
2696
|
+
late: qe,
|
2697
|
+
get ZodFirstPartyTypeKind() {
|
2698
|
+
return p;
|
2699
|
+
},
|
2700
|
+
coerce: St,
|
2701
|
+
any: Fe,
|
2702
|
+
array: rt,
|
2703
|
+
bigint: He,
|
2704
|
+
boolean: Ce,
|
2705
|
+
date: Ge,
|
2706
|
+
discriminatedUnion: ot,
|
2707
|
+
effect: ke,
|
2708
|
+
enum: yt,
|
2709
|
+
function: ht,
|
2710
|
+
instanceof: Je,
|
2711
|
+
intersection: ct,
|
2712
|
+
lazy: pt,
|
2713
|
+
literal: mt,
|
2714
|
+
map: lt,
|
2715
|
+
nan: Ye,
|
2716
|
+
nativeEnum: vt,
|
2717
|
+
never: tt,
|
2718
|
+
null: Ke,
|
2719
|
+
nullable: xt,
|
2720
|
+
number: Oe,
|
2721
|
+
object: nt,
|
2722
|
+
oboolean: Zt,
|
2723
|
+
onumber: Tt,
|
2724
|
+
optional: gt,
|
2725
|
+
ostring: wt,
|
2726
|
+
pipeline: bt,
|
2727
|
+
preprocess: kt,
|
2728
|
+
promise: _t,
|
2729
|
+
record: ut,
|
2730
|
+
set: ft,
|
2731
|
+
strictObject: at,
|
2732
|
+
string: Ne,
|
2733
|
+
symbol: Xe,
|
2734
|
+
transformer: ke,
|
2735
|
+
tuple: dt,
|
2736
|
+
undefined: Qe,
|
2737
|
+
union: it,
|
2738
|
+
unknown: et,
|
2739
|
+
void: st,
|
2740
|
+
NEVER: Nt,
|
2741
|
+
ZodIssueCode: c,
|
2742
|
+
quotelessJson: Ee,
|
2743
|
+
ZodError: Z
|
2744
|
+
});
|
2745
|
+
export {
|
2746
|
+
We as BRAND,
|
2747
|
+
we as DIRTY,
|
2748
|
+
Re as EMPTY_PATH,
|
2749
|
+
m as INVALID,
|
2750
|
+
Nt as NEVER,
|
2751
|
+
b as OK,
|
2752
|
+
k as ParseStatus,
|
2753
|
+
v as Schema,
|
2754
|
+
U as ZodAny,
|
2755
|
+
S as ZodArray,
|
2756
|
+
A as ZodBigInt,
|
2757
|
+
J as ZodBoolean,
|
2758
|
+
Ze as ZodBranded,
|
2759
|
+
ue as ZodCatch,
|
2760
|
+
V as ZodDate,
|
2761
|
+
te as ZodDefault,
|
2762
|
+
he as ZodDiscriminatedUnion,
|
2763
|
+
N as ZodEffects,
|
2764
|
+
M as ZodEnum,
|
2765
|
+
Z as ZodError,
|
2766
|
+
p as ZodFirstPartyTypeKind,
|
2767
|
+
z as ZodFunction,
|
2768
|
+
X as ZodIntersection,
|
2769
|
+
c as ZodIssueCode,
|
2770
|
+
K as ZodLazy,
|
2771
|
+
F as ZodLiteral,
|
2772
|
+
de as ZodMap,
|
2773
|
+
le as ZodNaN,
|
2774
|
+
ee as ZodNativeEnum,
|
2775
|
+
I as ZodNever,
|
2776
|
+
H as ZodNull,
|
2777
|
+
L as ZodNullable,
|
2778
|
+
j as ZodNumber,
|
2779
|
+
x as ZodObject,
|
2780
|
+
E as ZodOptional,
|
2781
|
+
u as ZodParsedType,
|
2782
|
+
se as ZodPipeline,
|
2783
|
+
B as ZodPromise,
|
2784
|
+
fe as ZodReadonly,
|
2785
|
+
Q as ZodRecord,
|
2786
|
+
v as ZodSchema,
|
2787
|
+
$ as ZodSet,
|
2788
|
+
T as ZodString,
|
2789
|
+
oe as ZodSymbol,
|
2790
|
+
N as ZodTransformer,
|
2791
|
+
C as ZodTuple,
|
2792
|
+
v as ZodType,
|
2793
|
+
Y as ZodUndefined,
|
2794
|
+
G as ZodUnion,
|
2795
|
+
P as ZodUnknown,
|
2796
|
+
ce as ZodVoid,
|
2797
|
+
l as addIssueToContext,
|
2798
|
+
Fe as any,
|
2799
|
+
rt as array,
|
2800
|
+
He as bigint,
|
2801
|
+
Ce as boolean,
|
2802
|
+
St as coerce,
|
2803
|
+
Se as custom,
|
2804
|
+
Ge as date,
|
2805
|
+
Ct as default,
|
2806
|
+
W as defaultErrorMap,
|
2807
|
+
ot as discriminatedUnion,
|
2808
|
+
ke as effect,
|
2809
|
+
yt as enum,
|
2810
|
+
ht as function,
|
2811
|
+
ne as getErrorMap,
|
2812
|
+
R as getParsedType,
|
2813
|
+
Je as instanceof,
|
2814
|
+
ct as intersection,
|
2815
|
+
ve as isAborted,
|
2816
|
+
ie as isAsync,
|
2817
|
+
_e as isDirty,
|
2818
|
+
q as isValid,
|
2819
|
+
qe as late,
|
2820
|
+
pt as lazy,
|
2821
|
+
mt as literal,
|
2822
|
+
ae as makeIssue,
|
2823
|
+
lt as map,
|
2824
|
+
Ye as nan,
|
2825
|
+
vt as nativeEnum,
|
2826
|
+
tt as never,
|
2827
|
+
Ke as null,
|
2828
|
+
xt as nullable,
|
2829
|
+
Oe as number,
|
2830
|
+
nt as object,
|
2831
|
+
ye as objectUtil,
|
2832
|
+
Zt as oboolean,
|
2833
|
+
Tt as onumber,
|
2834
|
+
gt as optional,
|
2835
|
+
wt as ostring,
|
2836
|
+
bt as pipeline,
|
2837
|
+
kt as preprocess,
|
2838
|
+
_t as promise,
|
2839
|
+
Ee as quotelessJson,
|
2840
|
+
ut as record,
|
2841
|
+
ft as set,
|
2842
|
+
Ie as setErrorMap,
|
2843
|
+
at as strictObject,
|
2844
|
+
Ne as string,
|
2845
|
+
Xe as symbol,
|
2846
|
+
ke as transformer,
|
2847
|
+
dt as tuple,
|
2848
|
+
Qe as undefined,
|
2849
|
+
it as union,
|
2850
|
+
et as unknown,
|
2851
|
+
g as util,
|
2852
|
+
st as void,
|
2853
|
+
Ct as z
|
2854
|
+
};
|