merong-docs 0.0.0-stage → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OVERVIEW.md +19 -0
- package/OVERVIEW.zh-CN.md +22 -0
- package/README.md +77 -3
- package/README.zh-CN.md +81 -0
- package/assets/cover-en.png +0 -0
- package/assets/documents-en.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/markdown-en.png +0 -0
- package/client/android-file-share.ts +25 -0
- package/client/controls.tsx +163 -0
- package/client/document-panel.tsx +166 -0
- package/client/external-file.tsx +78 -0
- package/client/file-reader.tsx +43 -0
- package/client/markdown-panel.tsx +737 -0
- package/client/markdown-scroll.ts +122 -0
- package/client/messages.ts +224 -0
- package/client/native-contacts.ts +145 -0
- package/client/page-render-queue.ts +12 -0
- package/client/page-selection.tsx +227 -0
- package/client/page-tools.tsx +72 -0
- package/client/pdf-geometry.ts +96 -0
- package/client/pdf-panel.tsx +477 -0
- package/client/reader-find.tsx +190 -0
- package/client/reader-notice.tsx +46 -0
- package/client/settings.tsx +143 -0
- package/client/syntax.tsx +55 -0
- package/client/viewport-geometry.ts +61 -0
- package/client/web.ts +462 -0
- package/client/worksheet-panel.tsx +631 -0
- package/client/zoom-controls.tsx +140 -0
- package/index.client.tsx +36 -0
- package/index.server.ts +73 -0
- package/node_modules/@types/debug/LICENSE +21 -0
- package/node_modules/@types/debug/README.md +69 -0
- package/node_modules/@types/debug/index.d.ts +50 -0
- package/node_modules/@types/debug/package.json +58 -0
- package/node_modules/@types/hast/LICENSE +21 -0
- package/node_modules/@types/hast/README.md +15 -0
- package/node_modules/@types/hast/index.d.ts +924 -0
- package/node_modules/@types/hast/package.json +48 -0
- package/node_modules/@types/ms/LICENSE +21 -0
- package/node_modules/@types/ms/README.md +82 -0
- package/node_modules/@types/ms/index.d.ts +63 -0
- package/node_modules/@types/ms/package.json +26 -0
- package/node_modules/@types/prismjs/LICENSE +21 -0
- package/node_modules/@types/prismjs/README.md +15 -0
- package/node_modules/@types/prismjs/components/index.d.ts +19 -0
- package/node_modules/@types/prismjs/components.d.ts +4 -0
- package/node_modules/@types/prismjs/dependencies.d.ts +35 -0
- package/node_modules/@types/prismjs/index.d.ts +402 -0
- package/node_modules/@types/prismjs/package.json +46 -0
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/index.d.ts +119 -0
- package/node_modules/@types/unist/package.json +60 -0
- package/node_modules/@xmldom/xmldom/CHANGELOG.md +1132 -0
- package/node_modules/@xmldom/xmldom/LICENSE +8 -0
- package/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
- package/node_modules/@xmldom/xmldom/index.d.ts +1843 -0
- package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +3 -0
- package/node_modules/@xmldom/xmldom/lib/conventions.js +429 -0
- package/node_modules/@xmldom/xmldom/lib/dom-parser.js +591 -0
- package/node_modules/@xmldom/xmldom/lib/dom.js +3759 -0
- package/node_modules/@xmldom/xmldom/lib/entities.js +2171 -0
- package/node_modules/@xmldom/xmldom/lib/errors.js +205 -0
- package/node_modules/@xmldom/xmldom/lib/grammar.js +559 -0
- package/node_modules/@xmldom/xmldom/lib/index.js +41 -0
- package/node_modules/@xmldom/xmldom/lib/sax.js +983 -0
- package/node_modules/@xmldom/xmldom/package.json +77 -0
- package/node_modules/@xmldom/xmldom/readme.md +366 -0
- package/node_modules/argparse/LICENSE +47 -0
- package/node_modules/argparse/README.md +89 -0
- package/node_modules/argparse/lib/_colorize.js +72 -0
- package/node_modules/argparse/lib/argparse.d.ts +292 -0
- package/node_modules/argparse/lib/argparse.js +3820 -0
- package/node_modules/argparse/lib/difflib.js +190 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +451 -0
- package/node_modules/argparse/package.json +38 -0
- package/node_modules/character-entities/index.d.ts +6 -0
- package/node_modules/character-entities/index.js +2132 -0
- package/node_modules/character-entities/license +22 -0
- package/node_modules/character-entities/package.json +78 -0
- package/node_modules/character-entities/readme.md +152 -0
- package/node_modules/character-entities-legacy/index.d.ts +6 -0
- package/node_modules/character-entities-legacy/index.js +113 -0
- package/node_modules/character-entities-legacy/license +22 -0
- package/node_modules/character-entities-legacy/package.json +77 -0
- package/node_modules/character-entities-legacy/readme.md +157 -0
- package/node_modules/character-reference-invalid/index.d.ts +6 -0
- package/node_modules/character-reference-invalid/index.js +35 -0
- package/node_modules/character-reference-invalid/license +22 -0
- package/node_modules/character-reference-invalid/package.json +83 -0
- package/node_modules/character-reference-invalid/readme.md +156 -0
- package/node_modules/comma-separated-tokens/index.d.ts +52 -0
- package/node_modules/comma-separated-tokens/index.js +74 -0
- package/node_modules/comma-separated-tokens/license +22 -0
- package/node_modules/comma-separated-tokens/package.json +72 -0
- package/node_modules/comma-separated-tokens/readme.md +167 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/decode-named-character-reference/index.d.ts +13 -0
- package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.js +32 -0
- package/node_modules/decode-named-character-reference/index.js +19 -0
- package/node_modules/decode-named-character-reference/license +22 -0
- package/node_modules/decode-named-character-reference/package.json +90 -0
- package/node_modules/decode-named-character-reference/readme.md +136 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.d.ts +84 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +80 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
- package/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/entities/dist/decode-codepoint.js +61 -0
- package/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/entities/dist/decode.d.ts +227 -0
- package/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/entities/dist/decode.js +1132 -0
- package/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/entities/dist/encode.d.ts +26 -0
- package/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/entities/dist/encode.js +295 -0
- package/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/entities/dist/escape.d.ts +60 -0
- package/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/entities/dist/escape.js +172 -0
- package/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
- package/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/encode-html.js +3 -0
- package/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/entities/dist/index.d.ts +89 -0
- package/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/entities/dist/index.js +87 -0
- package/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
- package/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/entities/dist/internal/decode-shared.js +195 -0
- package/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/entities/package.json +83 -0
- package/node_modules/entities/readme.md +131 -0
- package/node_modules/entities/src/decode-codepoint.ts +69 -0
- package/node_modules/entities/src/decode.ts +1368 -0
- package/node_modules/entities/src/encode.ts +337 -0
- package/node_modules/entities/src/escape.ts +187 -0
- package/node_modules/entities/src/generated/decode-data-html.ts +12 -0
- package/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/entities/src/generated/encode-html.ts +3 -0
- package/node_modules/entities/src/index.ts +160 -0
- package/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
- package/node_modules/entities/src/internal/decode-shared.ts +209 -0
- package/node_modules/hast-util-parse-selector/index.d.ts +1 -0
- package/node_modules/hast-util-parse-selector/index.js +1 -0
- package/node_modules/hast-util-parse-selector/lib/index.d.ts +27 -0
- package/node_modules/hast-util-parse-selector/lib/index.js +87 -0
- package/node_modules/hast-util-parse-selector/license +22 -0
- package/node_modules/hast-util-parse-selector/package.json +79 -0
- package/node_modules/hast-util-parse-selector/readme.md +203 -0
- package/node_modules/hastscript/index.d.ts +5 -0
- package/node_modules/hastscript/index.d.ts.map +1 -0
- package/node_modules/hastscript/index.js +7 -0
- package/node_modules/hastscript/lib/automatic-runtime-html.d.ts +34 -0
- package/node_modules/hastscript/lib/automatic-runtime-html.js +9 -0
- package/node_modules/hastscript/lib/automatic-runtime-svg.d.ts +34 -0
- package/node_modules/hastscript/lib/automatic-runtime-svg.js +7 -0
- package/node_modules/hastscript/lib/create-automatic-runtime.d.ts +217 -0
- package/node_modules/hastscript/lib/create-automatic-runtime.d.ts.map +1 -0
- package/node_modules/hastscript/lib/create-automatic-runtime.js +62 -0
- package/node_modules/hastscript/lib/create-h.d.ts +125 -0
- package/node_modules/hastscript/lib/create-h.d.ts.map +1 -0
- package/node_modules/hastscript/lib/create-h.js +376 -0
- package/node_modules/hastscript/lib/index.d.ts +22 -0
- package/node_modules/hastscript/lib/index.d.ts.map +1 -0
- package/node_modules/hastscript/lib/index.js +27 -0
- package/node_modules/hastscript/lib/jsx-automatic.d.ts +43 -0
- package/node_modules/hastscript/lib/jsx-automatic.js +2 -0
- package/node_modules/hastscript/lib/jsx-classic.d.ts +47 -0
- package/node_modules/hastscript/lib/jsx-classic.js +2 -0
- package/node_modules/hastscript/lib/svg-case-sensitive-tag-names.d.ts +7 -0
- package/node_modules/hastscript/lib/svg-case-sensitive-tag-names.d.ts.map +1 -0
- package/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +46 -0
- package/node_modules/hastscript/license +22 -0
- package/node_modules/hastscript/package.json +93 -0
- package/node_modules/hastscript/readme.md +471 -0
- package/node_modules/is-alphabetical/index.d.ts +8 -0
- package/node_modules/is-alphabetical/index.js +16 -0
- package/node_modules/is-alphabetical/license +22 -0
- package/node_modules/is-alphabetical/package.json +73 -0
- package/node_modules/is-alphabetical/readme.md +141 -0
- package/node_modules/is-alphanumerical/index.d.ts +8 -0
- package/node_modules/is-alphanumerical/index.js +13 -0
- package/node_modules/is-alphanumerical/license +22 -0
- package/node_modules/is-alphanumerical/package.json +79 -0
- package/node_modules/is-alphanumerical/readme.md +142 -0
- package/node_modules/is-decimal/index.d.ts +8 -0
- package/node_modules/is-decimal/index.js +13 -0
- package/node_modules/is-decimal/license +22 -0
- package/node_modules/is-decimal/package.json +73 -0
- package/node_modules/is-decimal/readme.md +139 -0
- package/node_modules/is-hexadecimal/index.d.ts +8 -0
- package/node_modules/is-hexadecimal/index.js +17 -0
- package/node_modules/is-hexadecimal/license +22 -0
- package/node_modules/is-hexadecimal/package.json +73 -0
- package/node_modules/is-hexadecimal/readme.md +141 -0
- package/node_modules/linkify-it/LICENSE +22 -0
- package/node_modules/linkify-it/README.md +158 -0
- package/node_modules/linkify-it/build/index.cjs.js +651 -0
- package/node_modules/linkify-it/build/index.cjs.js.map +1 -0
- package/node_modules/linkify-it/build/index.d.ts +236 -0
- package/node_modules/linkify-it/build/index.mjs +538 -0
- package/node_modules/linkify-it/build/index.mjs.map +1 -0
- package/node_modules/linkify-it/package.json +66 -0
- package/node_modules/markdown-it/LICENSE +22 -0
- package/node_modules/markdown-it/README.md +44 -0
- package/node_modules/markdown-it/bin/markdown-it.mjs +107 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +3064 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +14 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +4562 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.d.cts +19 -0
- package/node_modules/markdown-it/dist/markdown-it.d.mts +951 -0
- package/node_modules/markdown-it/dist/markdown-it.mjs +3935 -0
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -0
- package/node_modules/markdown-it/package.json +111 -0
- package/node_modules/mdurl/LICENSE +45 -0
- package/node_modules/mdurl/README.md +102 -0
- package/node_modules/mdurl/build/index.cjs.js +534 -0
- package/node_modules/mdurl/index.mjs +11 -0
- package/node_modules/mdurl/lib/decode.mjs +112 -0
- package/node_modules/mdurl/lib/encode.mjs +89 -0
- package/node_modules/mdurl/lib/format.mjs +21 -0
- package/node_modules/mdurl/lib/index.d.ts +28 -0
- package/node_modules/mdurl/lib/parse.mjs +308 -0
- package/node_modules/mdurl/package.json +43 -0
- package/node_modules/micromark/dev/index.d.ts +82 -0
- package/node_modules/micromark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark/dev/index.js +68 -0
- package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/compile.js +1162 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/constructs.js +101 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.js +718 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/document.js +449 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/text.js +248 -0
- package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
- package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/parse.js +58 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/postprocess.js +19 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/preprocess.js +139 -0
- package/node_modules/micromark/dev/stream.d.ts +35 -0
- package/node_modules/micromark/dev/stream.d.ts.map +1 -0
- package/node_modules/micromark/dev/stream.js +270 -0
- package/node_modules/micromark/index.d.ts +82 -0
- package/node_modules/micromark/index.d.ts.map +1 -0
- package/node_modules/micromark/index.js +60 -0
- package/node_modules/micromark/lib/compile.d.ts +16 -0
- package/node_modules/micromark/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/lib/compile.js +1068 -0
- package/node_modules/micromark/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/lib/constructs.js +85 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/lib/create-tokenizer.js +613 -0
- package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/content.js +79 -0
- package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/document.js +370 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/text.js +216 -0
- package/node_modules/micromark/lib/parse.d.ts +10 -0
- package/node_modules/micromark/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/lib/parse.js +56 -0
- package/node_modules/micromark/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/postprocess.js +18 -0
- package/node_modules/micromark/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/preprocess.js +112 -0
- package/node_modules/micromark/license +22 -0
- package/node_modules/micromark/package.json +87 -0
- package/node_modules/micromark/readme.md +488 -0
- package/node_modules/micromark/stream.d.ts +35 -0
- package/node_modules/micromark/stream.d.ts.map +1 -0
- package/node_modules/micromark/stream.js +256 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +294 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +472 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +178 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +229 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +938 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +658 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +119 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +71 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +213 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
- package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/index.js +22 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/attention.js +231 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +422 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +159 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +191 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +827 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.js +561 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +110 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +63 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +187 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/node_modules/micromark-core-commonmark/license +22 -0
- package/node_modules/micromark-core-commonmark/package.json +62 -0
- package/node_modules/micromark-core-commonmark/readme.md +171 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/dev/index.js +255 -0
- package/node_modules/micromark-factory-destination/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/index.js +206 -0
- package/node_modules/micromark-factory-destination/license +22 -0
- package/node_modules/micromark-factory-destination/package.json +57 -0
- package/node_modules/micromark-factory-destination/readme.md +234 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/dev/index.js +172 -0
- package/node_modules/micromark-factory-label/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/index.js +148 -0
- package/node_modules/micromark-factory-label/license +22 -0
- package/node_modules/micromark-factory-label/package.json +60 -0
- package/node_modules/micromark-factory-label/readme.md +224 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts +60 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/dev/index.js +122 -0
- package/node_modules/micromark-factory-space/index.d.ts +60 -0
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/index.js +116 -0
- package/node_modules/micromark-factory-space/license +22 -0
- package/node_modules/micromark-factory-space/package.json +46 -0
- package/node_modules/micromark-factory-space/readme.md +225 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/dev/index.js +169 -0
- package/node_modules/micromark-factory-title/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/index.js +158 -0
- package/node_modules/micromark-factory-title/license +22 -0
- package/node_modules/micromark-factory-title/package.json +58 -0
- package/node_modules/micromark-factory-title/readme.md +229 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/node_modules/micromark-factory-whitespace/license +22 -0
- package/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/node_modules/micromark-factory-whitespace/readme.md +205 -0
- package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
- package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.d.ts +195 -0
- package/node_modules/micromark-util-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +57 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/dev/index.js +89 -0
- package/node_modules/micromark-util-chunked/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/index.js +81 -0
- package/node_modules/micromark-util-chunked/license +22 -0
- package/node_modules/micromark-util-chunked/package.json +57 -0
- package/node_modules/micromark-util-chunked/readme.md +219 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
- package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/index.js +27 -0
- package/node_modules/micromark-util-classify-character/license +22 -0
- package/node_modules/micromark-util-classify-character/package.json +59 -0
- package/node_modules/micromark-util-classify-character/readme.md +205 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
- package/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/node_modules/micromark-util-combine-extensions/license +22 -0
- package/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
- package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/index.js +45 -0
- package/node_modules/micromark-util-decode-string/license +22 -0
- package/node_modules/micromark-util-decode-string/package.json +63 -0
- package/node_modules/micromark-util-decode-string/readme.md +179 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-encode/index.d.ts +14 -0
- package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
- package/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/node_modules/micromark-util-html-tag-name/license +22 -0
- package/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/node_modules/micromark-util-normalize-identifier/license +22 -0
- package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
- package/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/node_modules/micromark-util-resolve-all/license +22 -0
- package/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/node_modules/micromark-util-resolve-all/readme.md +238 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/node_modules/micromark-util-subtokenize/license +22 -0
- package/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/node_modules/micromark-util-subtokenize/readme.md +181 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.d.ts +1315 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +37 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/parse-entities/index.d.ts +126 -0
- package/node_modules/parse-entities/index.js +3 -0
- package/node_modules/parse-entities/lib/index.d.ts +9 -0
- package/node_modules/parse-entities/lib/index.d.ts.map +1 -0
- package/node_modules/parse-entities/lib/index.js +407 -0
- package/node_modules/parse-entities/license +22 -0
- package/node_modules/parse-entities/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/parse-entities/node_modules/@types/unist/README.md +122 -0
- package/node_modules/parse-entities/node_modules/@types/unist/index.d.ts +103 -0
- package/node_modules/parse-entities/node_modules/@types/unist/package.json +55 -0
- package/node_modules/parse-entities/package.json +91 -0
- package/node_modules/parse-entities/readme.md +266 -0
- package/node_modules/pend/LICENSE +23 -0
- package/node_modules/pend/README.md +41 -0
- package/node_modules/pend/index.js +55 -0
- package/node_modules/pend/package.json +18 -0
- package/node_modules/pend/test.js +137 -0
- package/node_modules/property-information/index.d.ts +121 -0
- package/node_modules/property-information/index.js +17 -0
- package/node_modules/property-information/lib/aria.d.ts +2 -0
- package/node_modules/property-information/lib/aria.d.ts.map +1 -0
- package/node_modules/property-information/lib/aria.js +61 -0
- package/node_modules/property-information/lib/find.d.ts +34 -0
- package/node_modules/property-information/lib/find.d.ts.map +1 -0
- package/node_modules/property-information/lib/find.js +97 -0
- package/node_modules/property-information/lib/hast-to-react.d.ts +13 -0
- package/node_modules/property-information/lib/hast-to-react.d.ts.map +1 -0
- package/node_modules/property-information/lib/hast-to-react.js +30 -0
- package/node_modules/property-information/lib/html.d.ts +2 -0
- package/node_modules/property-information/lib/html.d.ts.map +1 -0
- package/node_modules/property-information/lib/html.js +332 -0
- package/node_modules/property-information/lib/normalize.d.ts +11 -0
- package/node_modules/property-information/lib/normalize.d.ts.map +1 -0
- package/node_modules/property-information/lib/normalize.js +12 -0
- package/node_modules/property-information/lib/svg.d.ts +2 -0
- package/node_modules/property-information/lib/svg.d.ts.map +1 -0
- package/node_modules/property-information/lib/svg.js +569 -0
- package/node_modules/property-information/lib/util/case-insensitive-transform.d.ts +10 -0
- package/node_modules/property-information/lib/util/case-insensitive-transform.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/case-insensitive-transform.js +13 -0
- package/node_modules/property-information/lib/util/case-sensitive-transform.d.ts +10 -0
- package/node_modules/property-information/lib/util/case-sensitive-transform.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/case-sensitive-transform.js +11 -0
- package/node_modules/property-information/lib/util/create.d.ts +39 -0
- package/node_modules/property-information/lib/util/create.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/create.js +69 -0
- package/node_modules/property-information/lib/util/defined-info.d.ts +19 -0
- package/node_modules/property-information/lib/util/defined-info.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/defined-info.js +60 -0
- package/node_modules/property-information/lib/util/info.d.ts +28 -0
- package/node_modules/property-information/lib/util/info.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/info.js +32 -0
- package/node_modules/property-information/lib/util/merge.d.ts +12 -0
- package/node_modules/property-information/lib/util/merge.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/merge.js +27 -0
- package/node_modules/property-information/lib/util/schema.d.ts +23 -0
- package/node_modules/property-information/lib/util/schema.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/schema.js +29 -0
- package/node_modules/property-information/lib/util/types.d.ts +8 -0
- package/node_modules/property-information/lib/util/types.d.ts.map +1 -0
- package/node_modules/property-information/lib/util/types.js +13 -0
- package/node_modules/property-information/lib/xlink.d.ts +2 -0
- package/node_modules/property-information/lib/xlink.d.ts.map +1 -0
- package/node_modules/property-information/lib/xlink.js +17 -0
- package/node_modules/property-information/lib/xml.d.ts +2 -0
- package/node_modules/property-information/lib/xml.d.ts.map +1 -0
- package/node_modules/property-information/lib/xml.js +9 -0
- package/node_modules/property-information/lib/xmlns.d.ts +2 -0
- package/node_modules/property-information/lib/xmlns.d.ts.map +1 -0
- package/node_modules/property-information/lib/xmlns.js +9 -0
- package/node_modules/property-information/license +22 -0
- package/node_modules/property-information/package.json +84 -0
- package/node_modules/property-information/readme.md +1073 -0
- package/node_modules/punycode.js/LICENSE-MIT.txt +20 -0
- package/node_modules/punycode.js/README.md +148 -0
- package/node_modules/punycode.js/package.json +58 -0
- package/node_modules/punycode.js/punycode.es6.js +444 -0
- package/node_modules/punycode.js/punycode.js +443 -0
- package/node_modules/refractor/lang/abap.d.ts +7 -0
- package/node_modules/refractor/lang/abap.js +62 -0
- package/node_modules/refractor/lang/abnf.d.ts +7 -0
- package/node_modules/refractor/lang/abnf.js +66 -0
- package/node_modules/refractor/lang/actionscript.d.ts +7 -0
- package/node_modules/refractor/lang/actionscript.js +32 -0
- package/node_modules/refractor/lang/ada.d.ts +7 -0
- package/node_modules/refractor/lang/ada.js +34 -0
- package/node_modules/refractor/lang/agda.d.ts +7 -0
- package/node_modules/refractor/lang/agda.js +34 -0
- package/node_modules/refractor/lang/al.d.ts +7 -0
- package/node_modules/refractor/lang/al.js +38 -0
- package/node_modules/refractor/lang/antlr4.d.ts +7 -0
- package/node_modules/refractor/lang/antlr4.js +77 -0
- package/node_modules/refractor/lang/apacheconf.d.ts +7 -0
- package/node_modules/refractor/lang/apacheconf.js +59 -0
- package/node_modules/refractor/lang/apex.d.ts +7 -0
- package/node_modules/refractor/lang/apex.js +88 -0
- package/node_modules/refractor/lang/apl.d.ts +7 -0
- package/node_modules/refractor/lang/apl.js +44 -0
- package/node_modules/refractor/lang/applescript.d.ts +7 -0
- package/node_modules/refractor/lang/applescript.js +29 -0
- package/node_modules/refractor/lang/aql.d.ts +7 -0
- package/node_modules/refractor/lang/aql.js +60 -0
- package/node_modules/refractor/lang/arduino.d.ts +7 -0
- package/node_modules/refractor/lang/arduino.js +21 -0
- package/node_modules/refractor/lang/arff.d.ts +7 -0
- package/node_modules/refractor/lang/arff.js +20 -0
- package/node_modules/refractor/lang/armasm.d.ts +7 -0
- package/node_modules/refractor/lang/armasm.js +57 -0
- package/node_modules/refractor/lang/arturo.d.ts +7 -0
- package/node_modules/refractor/lang/arturo.js +102 -0
- package/node_modules/refractor/lang/asciidoc.d.ts +7 -0
- package/node_modules/refractor/lang/asciidoc.js +241 -0
- package/node_modules/refractor/lang/asm6502.d.ts +7 -0
- package/node_modules/refractor/lang/asm6502.js +40 -0
- package/node_modules/refractor/lang/asmatmel.d.ts +7 -0
- package/node_modules/refractor/lang/asmatmel.js +52 -0
- package/node_modules/refractor/lang/aspnet.d.ts +7 -0
- package/node_modules/refractor/lang/aspnet.js +73 -0
- package/node_modules/refractor/lang/autohotkey.d.ts +7 -0
- package/node_modules/refractor/lang/autohotkey.js +55 -0
- package/node_modules/refractor/lang/autoit.d.ts +7 -0
- package/node_modules/refractor/lang/autoit.js +46 -0
- package/node_modules/refractor/lang/avisynth.d.ts +7 -0
- package/node_modules/refractor/lang/avisynth.js +200 -0
- package/node_modules/refractor/lang/avro-idl.d.ts +7 -0
- package/node_modules/refractor/lang/avro-idl.js +57 -0
- package/node_modules/refractor/lang/awk.d.ts +7 -0
- package/node_modules/refractor/lang/awk.js +39 -0
- package/node_modules/refractor/lang/bash.d.ts +7 -0
- package/node_modules/refractor/lang/bash.js +250 -0
- package/node_modules/refractor/lang/basic.d.ts +7 -0
- package/node_modules/refractor/lang/basic.js +29 -0
- package/node_modules/refractor/lang/batch.d.ts +7 -0
- package/node_modules/refractor/lang/batch.js +110 -0
- package/node_modules/refractor/lang/bbcode.d.ts +7 -0
- package/node_modules/refractor/lang/bbcode.js +39 -0
- package/node_modules/refractor/lang/bbj.d.ts +7 -0
- package/node_modules/refractor/lang/bbj.js +30 -0
- package/node_modules/refractor/lang/bicep.d.ts +7 -0
- package/node_modules/refractor/lang/bicep.js +85 -0
- package/node_modules/refractor/lang/birb.d.ts +7 -0
- package/node_modules/refractor/lang/birb.js +34 -0
- package/node_modules/refractor/lang/bison.d.ts +7 -0
- package/node_modules/refractor/lang/bison.js +50 -0
- package/node_modules/refractor/lang/bnf.d.ts +7 -0
- package/node_modules/refractor/lang/bnf.js +30 -0
- package/node_modules/refractor/lang/bqn.d.ts +7 -0
- package/node_modules/refractor/lang/bqn.js +74 -0
- package/node_modules/refractor/lang/brainfuck.d.ts +7 -0
- package/node_modules/refractor/lang/brainfuck.js +30 -0
- package/node_modules/refractor/lang/brightscript.d.ts +7 -0
- package/node_modules/refractor/lang/brightscript.js +57 -0
- package/node_modules/refractor/lang/bro.d.ts +7 -0
- package/node_modules/refractor/lang/bro.js +39 -0
- package/node_modules/refractor/lang/bsl.d.ts +7 -0
- package/node_modules/refractor/lang/bsl.js +88 -0
- package/node_modules/refractor/lang/c.d.ts +7 -0
- package/node_modules/refractor/lang/c.js +94 -0
- package/node_modules/refractor/lang/cfscript.d.ts +7 -0
- package/node_modules/refractor/lang/cfscript.js +58 -0
- package/node_modules/refractor/lang/chaiscript.d.ts +7 -0
- package/node_modules/refractor/lang/chaiscript.js +73 -0
- package/node_modules/refractor/lang/cil.d.ts +7 -0
- package/node_modules/refractor/lang/cil.js +31 -0
- package/node_modules/refractor/lang/cilkc.d.ts +7 -0
- package/node_modules/refractor/lang/cilkc.js +19 -0
- package/node_modules/refractor/lang/cilkcpp.d.ts +7 -0
- package/node_modules/refractor/lang/cilkcpp.js +20 -0
- package/node_modules/refractor/lang/clike.d.ts +7 -0
- package/node_modules/refractor/lang/clike.js +43 -0
- package/node_modules/refractor/lang/clojure.d.ts +7 -0
- package/node_modules/refractor/lang/clojure.js +43 -0
- package/node_modules/refractor/lang/cmake.d.ts +7 -0
- package/node_modules/refractor/lang/cmake.js +44 -0
- package/node_modules/refractor/lang/cobol.d.ts +7 -0
- package/node_modules/refractor/lang/cobol.js +62 -0
- package/node_modules/refractor/lang/coffeescript.d.ts +7 -0
- package/node_modules/refractor/lang/coffeescript.js +97 -0
- package/node_modules/refractor/lang/concurnas.d.ts +7 -0
- package/node_modules/refractor/lang/concurnas.js +74 -0
- package/node_modules/refractor/lang/cooklang.d.ts +7 -0
- package/node_modules/refractor/lang/cooklang.js +148 -0
- package/node_modules/refractor/lang/coq.d.ts +7 -0
- package/node_modules/refractor/lang/coq.js +67 -0
- package/node_modules/refractor/lang/cpp.d.ts +7 -0
- package/node_modules/refractor/lang/cpp.js +128 -0
- package/node_modules/refractor/lang/crystal.d.ts +7 -0
- package/node_modules/refractor/lang/crystal.js +66 -0
- package/node_modules/refractor/lang/csharp.d.ts +7 -0
- package/node_modules/refractor/lang/csharp.js +486 -0
- package/node_modules/refractor/lang/cshtml.d.ts +7 -0
- package/node_modules/refractor/lang/cshtml.js +268 -0
- package/node_modules/refractor/lang/csp.d.ts +7 -0
- package/node_modules/refractor/lang/csp.js +87 -0
- package/node_modules/refractor/lang/css-extras.d.ts +7 -0
- package/node_modules/refractor/lang/css-extras.js +129 -0
- package/node_modules/refractor/lang/css.d.ts +7 -0
- package/node_modules/refractor/lang/css.js +90 -0
- package/node_modules/refractor/lang/csv.d.ts +7 -0
- package/node_modules/refractor/lang/csv.js +16 -0
- package/node_modules/refractor/lang/cue.d.ts +7 -0
- package/node_modules/refractor/lang/cue.js +98 -0
- package/node_modules/refractor/lang/cypher.d.ts +7 -0
- package/node_modules/refractor/lang/cypher.js +44 -0
- package/node_modules/refractor/lang/d.d.ts +7 -0
- package/node_modules/refractor/lang/d.js +98 -0
- package/node_modules/refractor/lang/dart.d.ts +7 -0
- package/node_modules/refractor/lang/dart.js +94 -0
- package/node_modules/refractor/lang/dataweave.d.ts +7 -0
- package/node_modules/refractor/lang/dataweave.js +52 -0
- package/node_modules/refractor/lang/dax.d.ts +7 -0
- package/node_modules/refractor/lang/dax.js +40 -0
- package/node_modules/refractor/lang/dhall.d.ts +7 -0
- package/node_modules/refractor/lang/dhall.js +81 -0
- package/node_modules/refractor/lang/diff.d.ts +7 -0
- package/node_modules/refractor/lang/diff.js +73 -0
- package/node_modules/refractor/lang/django.d.ts +7 -0
- package/node_modules/refractor/lang/django.js +68 -0
- package/node_modules/refractor/lang/dns-zone-file.d.ts +7 -0
- package/node_modules/refractor/lang/dns-zone-file.js +43 -0
- package/node_modules/refractor/lang/docker.d.ts +7 -0
- package/node_modules/refractor/lang/docker.js +129 -0
- package/node_modules/refractor/lang/dot.d.ts +7 -0
- package/node_modules/refractor/lang/dot.js +93 -0
- package/node_modules/refractor/lang/ebnf.d.ts +7 -0
- package/node_modules/refractor/lang/ebnf.js +30 -0
- package/node_modules/refractor/lang/editorconfig.d.ts +7 -0
- package/node_modules/refractor/lang/editorconfig.js +37 -0
- package/node_modules/refractor/lang/eiffel.d.ts +7 -0
- package/node_modules/refractor/lang/eiffel.js +45 -0
- package/node_modules/refractor/lang/ejs.d.ts +7 -0
- package/node_modules/refractor/lang/ejs.js +39 -0
- package/node_modules/refractor/lang/elixir.d.ts +7 -0
- package/node_modules/refractor/lang/elixir.js +111 -0
- package/node_modules/refractor/lang/elm.d.ts +7 -0
- package/node_modules/refractor/lang/elm.js +59 -0
- package/node_modules/refractor/lang/erb.d.ts +7 -0
- package/node_modules/refractor/lang/erb.js +40 -0
- package/node_modules/refractor/lang/erlang.d.ts +7 -0
- package/node_modules/refractor/lang/erlang.js +53 -0
- package/node_modules/refractor/lang/etlua.d.ts +7 -0
- package/node_modules/refractor/lang/etlua.js +37 -0
- package/node_modules/refractor/lang/excel-formula.d.ts +7 -0
- package/node_modules/refractor/lang/excel-formula.js +78 -0
- package/node_modules/refractor/lang/factor.d.ts +7 -0
- package/node_modules/refractor/lang/factor.js +937 -0
- package/node_modules/refractor/lang/false.d.ts +7 -0
- package/node_modules/refractor/lang/false.js +42 -0
- package/node_modules/refractor/lang/firestore-security-rules.d.ts +7 -0
- package/node_modules/refractor/lang/firestore-security-rules.js +50 -0
- package/node_modules/refractor/lang/flow.d.ts +7 -0
- package/node_modules/refractor/lang/flow.js +47 -0
- package/node_modules/refractor/lang/fortran.d.ts +7 -0
- package/node_modules/refractor/lang/fortran.js +51 -0
- package/node_modules/refractor/lang/fsharp.d.ts +7 -0
- package/node_modules/refractor/lang/fsharp.js +91 -0
- package/node_modules/refractor/lang/ftl.d.ts +7 -0
- package/node_modules/refractor/lang/ftl.js +134 -0
- package/node_modules/refractor/lang/gap.d.ts +7 -0
- package/node_modules/refractor/lang/gap.js +61 -0
- package/node_modules/refractor/lang/gcode.d.ts +7 -0
- package/node_modules/refractor/lang/gcode.js +26 -0
- package/node_modules/refractor/lang/gdscript.d.ts +7 -0
- package/node_modules/refractor/lang/gdscript.js +40 -0
- package/node_modules/refractor/lang/gedcom.d.ts +7 -0
- package/node_modules/refractor/lang/gedcom.js +40 -0
- package/node_modules/refractor/lang/gettext.d.ts +7 -0
- package/node_modules/refractor/lang/gettext.js +52 -0
- package/node_modules/refractor/lang/gherkin.d.ts +7 -0
- package/node_modules/refractor/lang/gherkin.js +95 -0
- package/node_modules/refractor/lang/git.d.ts +7 -0
- package/node_modules/refractor/lang/git.js +73 -0
- package/node_modules/refractor/lang/glsl.d.ts +7 -0
- package/node_modules/refractor/lang/glsl.js +16 -0
- package/node_modules/refractor/lang/gml.d.ts +7 -0
- package/node_modules/refractor/lang/gml.js +25 -0
- package/node_modules/refractor/lang/gn.d.ts +7 -0
- package/node_modules/refractor/lang/gn.js +61 -0
- package/node_modules/refractor/lang/go-module.d.ts +7 -0
- package/node_modules/refractor/lang/go-module.js +34 -0
- package/node_modules/refractor/lang/go.d.ts +7 -0
- package/node_modules/refractor/lang/go.js +41 -0
- package/node_modules/refractor/lang/gradle.d.ts +7 -0
- package/node_modules/refractor/lang/gradle.js +71 -0
- package/node_modules/refractor/lang/graphql.d.ts +7 -0
- package/node_modules/refractor/lang/graphql.js +226 -0
- package/node_modules/refractor/lang/groovy.d.ts +7 -0
- package/node_modules/refractor/lang/groovy.js +74 -0
- package/node_modules/refractor/lang/haml.d.ts +7 -0
- package/node_modules/refractor/lang/haml.js +173 -0
- package/node_modules/refractor/lang/handlebars.d.ts +7 -0
- package/node_modules/refractor/lang/handlebars.js +54 -0
- package/node_modules/refractor/lang/haskell.d.ts +7 -0
- package/node_modules/refractor/lang/haskell.js +80 -0
- package/node_modules/refractor/lang/haxe.d.ts +7 -0
- package/node_modules/refractor/lang/haxe.js +89 -0
- package/node_modules/refractor/lang/hcl.d.ts +7 -0
- package/node_modules/refractor/lang/hcl.js +75 -0
- package/node_modules/refractor/lang/hlsl.d.ts +7 -0
- package/node_modules/refractor/lang/hlsl.js +32 -0
- package/node_modules/refractor/lang/hoon.d.ts +7 -0
- package/node_modules/refractor/lang/hoon.js +25 -0
- package/node_modules/refractor/lang/hpkp.d.ts +7 -0
- package/node_modules/refractor/lang/hpkp.js +25 -0
- package/node_modules/refractor/lang/hsts.d.ts +7 -0
- package/node_modules/refractor/lang/hsts.js +24 -0
- package/node_modules/refractor/lang/http.d.ts +7 -0
- package/node_modules/refractor/lang/http.js +164 -0
- package/node_modules/refractor/lang/ichigojam.d.ts +7 -0
- package/node_modules/refractor/lang/ichigojam.js +27 -0
- package/node_modules/refractor/lang/icon.d.ts +7 -0
- package/node_modules/refractor/lang/icon.js +33 -0
- package/node_modules/refractor/lang/icu-message-format.d.ts +7 -0
- package/node_modules/refractor/lang/icu-message-format.js +164 -0
- package/node_modules/refractor/lang/idris.d.ts +7 -0
- package/node_modules/refractor/lang/idris.js +30 -0
- package/node_modules/refractor/lang/iecst.d.ts +7 -0
- package/node_modules/refractor/lang/iecst.js +46 -0
- package/node_modules/refractor/lang/ignore.d.ts +7 -0
- package/node_modules/refractor/lang/ignore.js +31 -0
- package/node_modules/refractor/lang/inform7.d.ts +7 -0
- package/node_modules/refractor/lang/inform7.js +77 -0
- package/node_modules/refractor/lang/ini.d.ts +7 -0
- package/node_modules/refractor/lang/ini.js +52 -0
- package/node_modules/refractor/lang/io.d.ts +7 -0
- package/node_modules/refractor/lang/io.js +35 -0
- package/node_modules/refractor/lang/j.d.ts +7 -0
- package/node_modules/refractor/lang/j.js +41 -0
- package/node_modules/refractor/lang/java.d.ts +7 -0
- package/node_modules/refractor/lang/java.js +163 -0
- package/node_modules/refractor/lang/javadoc.d.ts +7 -0
- package/node_modules/refractor/lang/javadoc.js +108 -0
- package/node_modules/refractor/lang/javadoclike.d.ts +7 -0
- package/node_modules/refractor/lang/javadoclike.js +94 -0
- package/node_modules/refractor/lang/javascript.d.ts +7 -0
- package/node_modules/refractor/lang/javascript.js +195 -0
- package/node_modules/refractor/lang/javastacktrace.d.ts +7 -0
- package/node_modules/refractor/lang/javastacktrace.js +149 -0
- package/node_modules/refractor/lang/jexl.d.ts +7 -0
- package/node_modules/refractor/lang/jexl.js +26 -0
- package/node_modules/refractor/lang/jolie.d.ts +7 -0
- package/node_modules/refractor/lang/jolie.js +58 -0
- package/node_modules/refractor/lang/jq.d.ts +7 -0
- package/node_modules/refractor/lang/jq.js +80 -0
- package/node_modules/refractor/lang/js-extras.d.ts +7 -0
- package/node_modules/refractor/lang/js-extras.js +160 -0
- package/node_modules/refractor/lang/js-templates.d.ts +7 -0
- package/node_modules/refractor/lang/js-templates.js +366 -0
- package/node_modules/refractor/lang/jsdoc.d.ts +7 -0
- package/node_modules/refractor/lang/jsdoc.js +102 -0
- package/node_modules/refractor/lang/json.d.ts +7 -0
- package/node_modules/refractor/lang/json.js +36 -0
- package/node_modules/refractor/lang/json5.d.ts +7 -0
- package/node_modules/refractor/lang/json5.js +34 -0
- package/node_modules/refractor/lang/jsonp.d.ts +7 -0
- package/node_modules/refractor/lang/jsonp.js +18 -0
- package/node_modules/refractor/lang/jsstacktrace.d.ts +7 -0
- package/node_modules/refractor/lang/jsstacktrace.js +53 -0
- package/node_modules/refractor/lang/jsx.d.ts +7 -0
- package/node_modules/refractor/lang/jsx.js +193 -0
- package/node_modules/refractor/lang/julia.d.ts +7 -0
- package/node_modules/refractor/lang/julia.js +50 -0
- package/node_modules/refractor/lang/keepalived.d.ts +7 -0
- package/node_modules/refractor/lang/keepalived.js +63 -0
- package/node_modules/refractor/lang/keyman.d.ts +7 -0
- package/node_modules/refractor/lang/keyman.js +54 -0
- package/node_modules/refractor/lang/kotlin.d.ts +7 -0
- package/node_modules/refractor/lang/kotlin.js +96 -0
- package/node_modules/refractor/lang/kumir.d.ts +7 -0
- package/node_modules/refractor/lang/kumir.js +116 -0
- package/node_modules/refractor/lang/kusto.d.ts +7 -0
- package/node_modules/refractor/lang/kusto.js +54 -0
- package/node_modules/refractor/lang/latex.d.ts +7 -0
- package/node_modules/refractor/lang/latex.js +77 -0
- package/node_modules/refractor/lang/latte.d.ts +7 -0
- package/node_modules/refractor/lang/latte.js +85 -0
- package/node_modules/refractor/lang/less.d.ts +7 -0
- package/node_modules/refractor/lang/less.js +65 -0
- package/node_modules/refractor/lang/lilypond.d.ts +7 -0
- package/node_modules/refractor/lang/lilypond.js +90 -0
- package/node_modules/refractor/lang/linker-script.d.ts +7 -0
- package/node_modules/refractor/lang/linker-script.js +35 -0
- package/node_modules/refractor/lang/liquid.d.ts +7 -0
- package/node_modules/refractor/lang/liquid.js +82 -0
- package/node_modules/refractor/lang/lisp.d.ts +7 -0
- package/node_modules/refractor/lang/lisp.js +223 -0
- package/node_modules/refractor/lang/livescript.d.ts +7 -0
- package/node_modules/refractor/lang/livescript.js +132 -0
- package/node_modules/refractor/lang/llvm.d.ts +7 -0
- package/node_modules/refractor/lang/llvm.js +31 -0
- package/node_modules/refractor/lang/log.d.ts +7 -0
- package/node_modules/refractor/lang/log.js +129 -0
- package/node_modules/refractor/lang/lolcode.d.ts +7 -0
- package/node_modules/refractor/lang/lolcode.js +60 -0
- package/node_modules/refractor/lang/lua.d.ts +7 -0
- package/node_modules/refractor/lang/lua.js +33 -0
- package/node_modules/refractor/lang/magma.d.ts +7 -0
- package/node_modules/refractor/lang/magma.js +43 -0
- package/node_modules/refractor/lang/makefile.d.ts +7 -0
- package/node_modules/refractor/lang/makefile.js +42 -0
- package/node_modules/refractor/lang/markdown.d.ts +7 -0
- package/node_modules/refractor/lang/markdown.js +449 -0
- package/node_modules/refractor/lang/markup-templating.d.ts +7 -0
- package/node_modules/refractor/lang/markup-templating.js +134 -0
- package/node_modules/refractor/lang/markup.d.ts +7 -0
- package/node_modules/refractor/lang/markup.js +202 -0
- package/node_modules/refractor/lang/mata.d.ts +7 -0
- package/node_modules/refractor/lang/mata.js +59 -0
- package/node_modules/refractor/lang/matlab.d.ts +7 -0
- package/node_modules/refractor/lang/matlab.js +24 -0
- package/node_modules/refractor/lang/maxscript.d.ts +7 -0
- package/node_modules/refractor/lang/maxscript.js +98 -0
- package/node_modules/refractor/lang/mel.d.ts +7 -0
- package/node_modules/refractor/lang/mel.js +56 -0
- package/node_modules/refractor/lang/mermaid.d.ts +7 -0
- package/node_modules/refractor/lang/mermaid.js +122 -0
- package/node_modules/refractor/lang/metafont.d.ts +7 -0
- package/node_modules/refractor/lang/metafont.js +102 -0
- package/node_modules/refractor/lang/mizar.d.ts +7 -0
- package/node_modules/refractor/lang/mizar.js +23 -0
- package/node_modules/refractor/lang/mongodb.d.ts +7 -0
- package/node_modules/refractor/lang/mongodb.js +307 -0
- package/node_modules/refractor/lang/monkey.d.ts +7 -0
- package/node_modules/refractor/lang/monkey.js +41 -0
- package/node_modules/refractor/lang/moonscript.d.ts +7 -0
- package/node_modules/refractor/lang/moonscript.js +70 -0
- package/node_modules/refractor/lang/n1ql.d.ts +7 -0
- package/node_modules/refractor/lang/n1ql.js +36 -0
- package/node_modules/refractor/lang/n4js.d.ts +7 -0
- package/node_modules/refractor/lang/n4js.js +25 -0
- package/node_modules/refractor/lang/nand2tetris-hdl.d.ts +7 -0
- package/node_modules/refractor/lang/nand2tetris-hdl.js +19 -0
- package/node_modules/refractor/lang/naniscript.d.ts +7 -0
- package/node_modules/refractor/lang/naniscript.js +176 -0
- package/node_modules/refractor/lang/nasm.d.ts +7 -0
- package/node_modules/refractor/lang/nasm.js +36 -0
- package/node_modules/refractor/lang/neon.d.ts +7 -0
- package/node_modules/refractor/lang/neon.js +54 -0
- package/node_modules/refractor/lang/nevod.d.ts +7 -0
- package/node_modules/refractor/lang/nevod.js +139 -0
- package/node_modules/refractor/lang/nginx.d.ts +7 -0
- package/node_modules/refractor/lang/nginx.js +63 -0
- package/node_modules/refractor/lang/nim.d.ts +7 -0
- package/node_modules/refractor/lang/nim.js +57 -0
- package/node_modules/refractor/lang/nix.d.ts +7 -0
- package/node_modules/refractor/lang/nix.js +48 -0
- package/node_modules/refractor/lang/nsis.d.ts +7 -0
- package/node_modules/refractor/lang/nsis.js +43 -0
- package/node_modules/refractor/lang/objectivec.d.ts +7 -0
- package/node_modules/refractor/lang/objectivec.js +23 -0
- package/node_modules/refractor/lang/ocaml.d.ts +7 -0
- package/node_modules/refractor/lang/ocaml.js +69 -0
- package/node_modules/refractor/lang/odin.d.ts +7 -0
- package/node_modules/refractor/lang/odin.js +98 -0
- package/node_modules/refractor/lang/opencl.d.ts +7 -0
- package/node_modules/refractor/lang/opencl.js +78 -0
- package/node_modules/refractor/lang/openqasm.d.ts +7 -0
- package/node_modules/refractor/lang/openqasm.js +33 -0
- package/node_modules/refractor/lang/oz.d.ts +7 -0
- package/node_modules/refractor/lang/oz.js +41 -0
- package/node_modules/refractor/lang/parigp.d.ts +7 -0
- package/node_modules/refractor/lang/parigp.js +63 -0
- package/node_modules/refractor/lang/parser.d.ts +7 -0
- package/node_modules/refractor/lang/parser.js +88 -0
- package/node_modules/refractor/lang/pascal.d.ts +7 -0
- package/node_modules/refractor/lang/pascal.js +83 -0
- package/node_modules/refractor/lang/pascaligo.d.ts +7 -0
- package/node_modules/refractor/lang/pascaligo.js +97 -0
- package/node_modules/refractor/lang/pcaxis.d.ts +7 -0
- package/node_modules/refractor/lang/pcaxis.js +64 -0
- package/node_modules/refractor/lang/peoplecode.d.ts +7 -0
- package/node_modules/refractor/lang/peoplecode.js +54 -0
- package/node_modules/refractor/lang/perl.d.ts +7 -0
- package/node_modules/refractor/lang/perl.js +160 -0
- package/node_modules/refractor/lang/php-extras.d.ts +7 -0
- package/node_modules/refractor/lang/php-extras.js +27 -0
- package/node_modules/refractor/lang/php.d.ts +7 -0
- package/node_modules/refractor/lang/php.js +361 -0
- package/node_modules/refractor/lang/phpdoc.d.ts +7 -0
- package/node_modules/refractor/lang/phpdoc.js +44 -0
- package/node_modules/refractor/lang/plant-uml.d.ts +7 -0
- package/node_modules/refractor/lang/plant-uml.js +123 -0
- package/node_modules/refractor/lang/plsql.d.ts +7 -0
- package/node_modules/refractor/lang/plsql.js +29 -0
- package/node_modules/refractor/lang/powerquery.d.ts +7 -0
- package/node_modules/refractor/lang/powerquery.js +67 -0
- package/node_modules/refractor/lang/powershell.d.ts +7 -0
- package/node_modules/refractor/lang/powershell.js +68 -0
- package/node_modules/refractor/lang/processing.d.ts +7 -0
- package/node_modules/refractor/lang/processing.js +27 -0
- package/node_modules/refractor/lang/prolog.d.ts +7 -0
- package/node_modules/refractor/lang/prolog.js +29 -0
- package/node_modules/refractor/lang/promql.d.ts +7 -0
- package/node_modules/refractor/lang/promql.js +112 -0
- package/node_modules/refractor/lang/properties.d.ts +7 -0
- package/node_modules/refractor/lang/properties.js +24 -0
- package/node_modules/refractor/lang/protobuf.d.ts +7 -0
- package/node_modules/refractor/lang/protobuf.js +55 -0
- package/node_modules/refractor/lang/psl.d.ts +7 -0
- package/node_modules/refractor/lang/psl.js +49 -0
- package/node_modules/refractor/lang/pug.d.ts +7 -0
- package/node_modules/refractor/lang/pug.js +220 -0
- package/node_modules/refractor/lang/puppet.d.ts +7 -0
- package/node_modules/refractor/lang/puppet.js +155 -0
- package/node_modules/refractor/lang/pure.d.ts +7 -0
- package/node_modules/refractor/lang/pure.js +106 -0
- package/node_modules/refractor/lang/purebasic.d.ts +7 -0
- package/node_modules/refractor/lang/purebasic.js +82 -0
- package/node_modules/refractor/lang/purescript.d.ts +7 -0
- package/node_modules/refractor/lang/purescript.js +42 -0
- package/node_modules/refractor/lang/python.d.ts +7 -0
- package/node_modules/refractor/lang/python.js +80 -0
- package/node_modules/refractor/lang/q.d.ts +7 -0
- package/node_modules/refractor/lang/q.js +64 -0
- package/node_modules/refractor/lang/qml.d.ts +7 -0
- package/node_modules/refractor/lang/qml.js +93 -0
- package/node_modules/refractor/lang/qore.d.ts +7 -0
- package/node_modules/refractor/lang/qore.js +35 -0
- package/node_modules/refractor/lang/qsharp.d.ts +7 -0
- package/node_modules/refractor/lang/qsharp.js +151 -0
- package/node_modules/refractor/lang/r.d.ts +7 -0
- package/node_modules/refractor/lang/r.js +33 -0
- package/node_modules/refractor/lang/racket.d.ts +7 -0
- package/node_modules/refractor/lang/racket.js +28 -0
- package/node_modules/refractor/lang/reason.d.ts +7 -0
- package/node_modules/refractor/lang/reason.js +39 -0
- package/node_modules/refractor/lang/regex.d.ts +7 -0
- package/node_modules/refractor/lang/regex.js +112 -0
- package/node_modules/refractor/lang/rego.d.ts +7 -0
- package/node_modules/refractor/lang/rego.js +39 -0
- package/node_modules/refractor/lang/renpy.d.ts +7 -0
- package/node_modules/refractor/lang/renpy.js +34 -0
- package/node_modules/refractor/lang/rescript.d.ts +7 -0
- package/node_modules/refractor/lang/rescript.js +76 -0
- package/node_modules/refractor/lang/rest.d.ts +7 -0
- package/node_modules/refractor/lang/rest.js +221 -0
- package/node_modules/refractor/lang/rip.d.ts +7 -0
- package/node_modules/refractor/lang/rip.js +41 -0
- package/node_modules/refractor/lang/roboconf.d.ts +7 -0
- package/node_modules/refractor/lang/roboconf.js +38 -0
- package/node_modules/refractor/lang/robotframework.d.ts +7 -0
- package/node_modules/refractor/lang/robotframework.js +111 -0
- package/node_modules/refractor/lang/ruby.d.ts +7 -0
- package/node_modules/refractor/lang/ruby.js +206 -0
- package/node_modules/refractor/lang/rust.d.ts +7 -0
- package/node_modules/refractor/lang/rust.js +134 -0
- package/node_modules/refractor/lang/sas.d.ts +7 -0
- package/node_modules/refractor/lang/sas.js +368 -0
- package/node_modules/refractor/lang/sass.d.ts +7 -0
- package/node_modules/refractor/lang/sass.js +85 -0
- package/node_modules/refractor/lang/scala.d.ts +7 -0
- package/node_modules/refractor/lang/scala.js +64 -0
- package/node_modules/refractor/lang/scheme.d.ts +7 -0
- package/node_modules/refractor/lang/scheme.js +143 -0
- package/node_modules/refractor/lang/scss.d.ts +7 -0
- package/node_modules/refractor/lang/scss.js +90 -0
- package/node_modules/refractor/lang/shell-session.d.ts +7 -0
- package/node_modules/refractor/lang/shell-session.js +82 -0
- package/node_modules/refractor/lang/smali.d.ts +7 -0
- package/node_modules/refractor/lang/smali.js +95 -0
- package/node_modules/refractor/lang/smalltalk.d.ts +7 -0
- package/node_modules/refractor/lang/smalltalk.js +48 -0
- package/node_modules/refractor/lang/smarty.d.ts +7 -0
- package/node_modules/refractor/lang/smarty.js +147 -0
- package/node_modules/refractor/lang/sml.d.ts +7 -0
- package/node_modules/refractor/lang/sml.js +79 -0
- package/node_modules/refractor/lang/solidity.d.ts +7 -0
- package/node_modules/refractor/lang/solidity.js +34 -0
- package/node_modules/refractor/lang/solution-file.d.ts +7 -0
- package/node_modules/refractor/lang/solution-file.js +58 -0
- package/node_modules/refractor/lang/soy.d.ts +7 -0
- package/node_modules/refractor/lang/soy.js +110 -0
- package/node_modules/refractor/lang/sparql.d.ts +7 -0
- package/node_modules/refractor/lang/sparql.js +27 -0
- package/node_modules/refractor/lang/splunk-spl.d.ts +7 -0
- package/node_modules/refractor/lang/splunk-spl.js +35 -0
- package/node_modules/refractor/lang/sqf.d.ts +7 -0
- package/node_modules/refractor/lang/sqf.js +48 -0
- package/node_modules/refractor/lang/sql.d.ts +7 -0
- package/node_modules/refractor/lang/sql.js +46 -0
- package/node_modules/refractor/lang/squirrel.d.ts +7 -0
- package/node_modules/refractor/lang/squirrel.js +56 -0
- package/node_modules/refractor/lang/stan.d.ts +7 -0
- package/node_modules/refractor/lang/stan.js +73 -0
- package/node_modules/refractor/lang/stata.d.ts +7 -0
- package/node_modules/refractor/lang/stata.js +89 -0
- package/node_modules/refractor/lang/stylus.d.ts +7 -0
- package/node_modules/refractor/lang/stylus.js +150 -0
- package/node_modules/refractor/lang/supercollider.d.ts +7 -0
- package/node_modules/refractor/lang/supercollider.js +44 -0
- package/node_modules/refractor/lang/swift.d.ts +7 -0
- package/node_modules/refractor/lang/swift.js +157 -0
- package/node_modules/refractor/lang/systemd.d.ts +7 -0
- package/node_modules/refractor/lang/systemd.js +81 -0
- package/node_modules/refractor/lang/t4-cs.d.ts +7 -0
- package/node_modules/refractor/lang/t4-cs.js +16 -0
- package/node_modules/refractor/lang/t4-templating.d.ts +7 -0
- package/node_modules/refractor/lang/t4-templating.js +56 -0
- package/node_modules/refractor/lang/t4-vb.d.ts +7 -0
- package/node_modules/refractor/lang/t4-vb.js +15 -0
- package/node_modules/refractor/lang/tap.d.ts +7 -0
- package/node_modules/refractor/lang/tap.js +34 -0
- package/node_modules/refractor/lang/tcl.d.ts +7 -0
- package/node_modules/refractor/lang/tcl.js +59 -0
- package/node_modules/refractor/lang/textile.d.ts +7 -0
- package/node_modules/refractor/lang/textile.js +304 -0
- package/node_modules/refractor/lang/toml.d.ts +7 -0
- package/node_modules/refractor/lang/toml.js +70 -0
- package/node_modules/refractor/lang/tremor.d.ts +7 -0
- package/node_modules/refractor/lang/tremor.js +86 -0
- package/node_modules/refractor/lang/tsx.d.ts +7 -0
- package/node_modules/refractor/lang/tsx.js +32 -0
- package/node_modules/refractor/lang/tt2.d.ts +7 -0
- package/node_modules/refractor/lang/tt2.js +65 -0
- package/node_modules/refractor/lang/turtle.d.ts +7 -0
- package/node_modules/refractor/lang/turtle.js +64 -0
- package/node_modules/refractor/lang/twig.d.ts +7 -0
- package/node_modules/refractor/lang/twig.js +52 -0
- package/node_modules/refractor/lang/typescript.d.ts +7 -0
- package/node_modules/refractor/lang/typescript.js +71 -0
- package/node_modules/refractor/lang/typoscript.d.ts +7 -0
- package/node_modules/refractor/lang/typoscript.js +89 -0
- package/node_modules/refractor/lang/unrealscript.d.ts +7 -0
- package/node_modules/refractor/lang/unrealscript.js +53 -0
- package/node_modules/refractor/lang/uorazor.d.ts +7 -0
- package/node_modules/refractor/lang/uorazor.js +63 -0
- package/node_modules/refractor/lang/uri.d.ts +7 -0
- package/node_modules/refractor/lang/uri.js +105 -0
- package/node_modules/refractor/lang/v.d.ts +7 -0
- package/node_modules/refractor/lang/v.js +95 -0
- package/node_modules/refractor/lang/vala.d.ts +7 -0
- package/node_modules/refractor/lang/vala.js +100 -0
- package/node_modules/refractor/lang/vbnet.d.ts +7 -0
- package/node_modules/refractor/lang/vbnet.js +35 -0
- package/node_modules/refractor/lang/velocity.d.ts +7 -0
- package/node_modules/refractor/lang/velocity.js +83 -0
- package/node_modules/refractor/lang/verilog.d.ts +7 -0
- package/node_modules/refractor/lang/verilog.js +38 -0
- package/node_modules/refractor/lang/vhdl.d.ts +7 -0
- package/node_modules/refractor/lang/vhdl.js +38 -0
- package/node_modules/refractor/lang/vim.d.ts +7 -0
- package/node_modules/refractor/lang/vim.js +23 -0
- package/node_modules/refractor/lang/visual-basic.d.ts +7 -0
- package/node_modules/refractor/lang/visual-basic.js +42 -0
- package/node_modules/refractor/lang/warpscript.d.ts +7 -0
- package/node_modules/refractor/lang/warpscript.js +35 -0
- package/node_modules/refractor/lang/wasm.d.ts +7 -0
- package/node_modules/refractor/lang/wasm.js +43 -0
- package/node_modules/refractor/lang/web-idl.d.ts +7 -0
- package/node_modules/refractor/lang/web-idl.js +120 -0
- package/node_modules/refractor/lang/wgsl.d.ts +7 -0
- package/node_modules/refractor/lang/wgsl.js +112 -0
- package/node_modules/refractor/lang/wiki.d.ts +7 -0
- package/node_modules/refractor/lang/wiki.js +90 -0
- package/node_modules/refractor/lang/wolfram.d.ts +7 -0
- package/node_modules/refractor/lang/wolfram.js +42 -0
- package/node_modules/refractor/lang/wren.d.ts +7 -0
- package/node_modules/refractor/lang/wren.js +105 -0
- package/node_modules/refractor/lang/xeora.d.ts +7 -0
- package/node_modules/refractor/lang/xeora.js +131 -0
- package/node_modules/refractor/lang/xml-doc.d.ts +7 -0
- package/node_modules/refractor/lang/xml-doc.js +47 -0
- package/node_modules/refractor/lang/xojo.d.ts +7 -0
- package/node_modules/refractor/lang/xojo.js +30 -0
- package/node_modules/refractor/lang/xquery.d.ts +7 -0
- package/node_modules/refractor/lang/xquery.js +205 -0
- package/node_modules/refractor/lang/yaml.d.ts +7 -0
- package/node_modules/refractor/lang/yaml.js +129 -0
- package/node_modules/refractor/lang/yang.d.ts +7 -0
- package/node_modules/refractor/lang/yang.js +30 -0
- package/node_modules/refractor/lang/zig.d.ts +7 -0
- package/node_modules/refractor/lang/zig.js +131 -0
- package/node_modules/refractor/lib/all.d.ts +3 -0
- package/node_modules/refractor/lib/all.d.ts.map +1 -0
- package/node_modules/refractor/lib/all.js +602 -0
- package/node_modules/refractor/lib/common.d.ts +3 -0
- package/node_modules/refractor/lib/common.d.ts.map +1 -0
- package/node_modules/refractor/lib/common.js +80 -0
- package/node_modules/refractor/lib/core.d.ts +125 -0
- package/node_modules/refractor/lib/core.d.ts.map +1 -0
- package/node_modules/refractor/lib/core.js +316 -0
- package/node_modules/refractor/lib/prism-core.d.ts +113 -0
- package/node_modules/refractor/lib/prism-core.d.ts.map +1 -0
- package/node_modules/refractor/lib/prism-core.js +768 -0
- package/node_modules/refractor/license +23 -0
- package/node_modules/refractor/package.json +140 -0
- package/node_modules/refractor/readme.md +828 -0
- package/node_modules/space-separated-tokens/index.d.ts +18 -0
- package/node_modules/space-separated-tokens/index.js +24 -0
- package/node_modules/space-separated-tokens/license +22 -0
- package/node_modules/space-separated-tokens/package.json +67 -0
- package/node_modules/space-separated-tokens/readme.md +156 -0
- package/node_modules/uc.micro/LICENSE.txt +20 -0
- package/node_modules/uc.micro/README.md +31 -0
- package/node_modules/uc.micro/build/index.cjs.js +15 -0
- package/node_modules/uc.micro/build/index.d.ts +6 -0
- package/node_modules/uc.micro/build/index.mjs +8 -0
- package/node_modules/uc.micro/package.json +32 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/node_modules/yauzl/LICENSE +21 -0
- package/node_modules/yauzl/README.md +1015 -0
- package/node_modules/yauzl/crc32.js +45 -0
- package/node_modules/yauzl/fd-slicer.js +188 -0
- package/node_modules/yauzl/index.js +1096 -0
- package/node_modules/yauzl/package.json +40 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +218 -0
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +52 -0
- package/node_modules/zod/index.d.cts +3 -0
- package/node_modules/zod/index.d.ts +3 -0
- package/node_modules/zod/index.js +7 -0
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +147 -0
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +586 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +431 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +922 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +291 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +349 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +230 -0
- package/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/node_modules/zod/src/v4/core/index.ts +19 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +5226 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/node_modules/zod/src/v4/core/util.ts +1293 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +167 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +143 -0
- package/node_modules/zod/v3/errors.cjs +36 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +41 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +52 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3798 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3697 -0
- package/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/node_modules/zod/v4/classic/errors.js +57 -0
- package/node_modules/zod/v4/classic/external.cjs +97 -0
- package/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/node_modules/zod/v4/classic/external.js +17 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +52 -0
- package/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/node_modules/zod/v4/classic/iso.js +15 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/node_modules/zod/v4/classic/parse.js +16 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/node_modules/zod/v4/core/api.cjs +1269 -0
- package/node_modules/zod/v4/core/api.d.cts +335 -0
- package/node_modules/zod/v4/core/api.d.ts +335 -0
- package/node_modules/zod/v4/core/api.js +1107 -0
- package/node_modules/zod/v4/core/checks.cjs +561 -0
- package/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/node_modules/zod/v4/core/checks.js +516 -0
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +167 -0
- package/node_modules/zod/v4/core/core.d.cts +82 -0
- package/node_modules/zod/v4/core/core.d.ts +82 -0
- package/node_modules/zod/v4/core/core.js +141 -0
- package/node_modules/zod/v4/core/doc.cjs +61 -0
- package/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/node_modules/zod/v4/core/doc.js +38 -0
- package/node_modules/zod/v4/core/errors.cjs +317 -0
- package/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/node_modules/zod/v4/core/errors.js +267 -0
- package/node_modules/zod/v4/core/index.cjs +70 -0
- package/node_modules/zod/v4/core/index.d.cts +19 -0
- package/node_modules/zod/v4/core/index.d.ts +19 -0
- package/node_modules/zod/v4/core/index.js +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +233 -0
- package/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/node_modules/zod/v4/core/parse.js +175 -0
- package/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/node_modules/zod/v4/core/regexes.js +156 -0
- package/node_modules/zod/v4/core/registries.cjs +75 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2699 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1275 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1275 -0
- package/node_modules/zod/v4/core/schemas.js +2636 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/node_modules/zod/v4/core/util.cjs +964 -0
- package/node_modules/zod/v4/core/util.d.cts +280 -0
- package/node_modules/zod/v4/core/util.d.ts +280 -0
- package/node_modules/zod/v4/core/util.js +873 -0
- package/node_modules/zod/v4/core/versions.cjs +27 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +51 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +4 -0
- package/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +111 -0
- package/node_modules/zod/v4/locales/az.cjs +137 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +110 -0
- package/node_modules/zod/v4/locales/be.cjs +195 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +168 -0
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +112 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +116 -0
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +140 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +113 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +152 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +125 -0
- package/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +114 -0
- package/node_modules/zod/v4/locales/es.cjs +163 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +136 -0
- package/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +119 -0
- package/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +117 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +129 -0
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +248 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +221 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +113 -0
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +138 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +111 -0
- package/node_modules/zod/v4/locales/index.cjs +152 -0
- package/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/node_modules/zod/v4/locales/index.js +63 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +140 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +113 -0
- package/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +112 -0
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +116 -0
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +114 -0
- package/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +112 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +115 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +140 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +113 -0
- package/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +114 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +114 -0
- package/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +119 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +142 -0
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +168 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +114 -0
- package/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +115 -0
- package/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +115 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +142 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +115 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +110 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +115 -0
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +113 -0
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +95 -0
- package/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/node_modules/zod/v4/mini/external.js +16 -0
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +51 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +51 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/npm-shrinkwrap.json +972 -0
- package/package.json +51 -4
- package/paseo-plugin.json +21 -0
- package/scripts/prepare-office.mjs +20 -0
- package/server/engine.ts +89 -0
- package/server/external-file.ts +42 -0
- package/server/generated/NotoSansSC-OFL.txt +195 -0
- package/server/generated/NotoSansSC-Regular.otf +0 -0
- package/server/generated/document-worker.ts +1 -0
- package/server/generated/jpeg-encoder-LICENSE-APACHE.txt +201 -0
- package/server/generated/jpeg-encoder-LICENSE-IJG.txt +69 -0
- package/server/generated/jpeg-encoder-LICENSE-MIT.txt +25 -0
- package/server/generated/markdown-rs-LICENSE.txt +22 -0
- package/server/generated/rust-reader.cjs +273 -0
- package/server/generated/rust-reader_bg.wasm +0 -0
- package/server/markdown-index.ts +305 -0
- package/server/markdown-links.ts +51 -0
- package/server/markdown-page.ts +120 -0
- package/server/office-fonts.cjs +824 -0
- package/server/office-location.ts +41 -0
- package/server/office-preview.ts +186 -0
- package/server/office-worker.cjs +49 -0
- package/server/office-xml.ts +79 -0
- package/server/pdf-engine.ts +168 -0
- package/server/pdf-text-geometry.ts +60 -0
- package/server/rust-reader.ts +40 -0
- package/server/structured-document.ts +69 -0
- package/server/text-search.ts +15 -0
- package/server/worker-entry.ts +42 -0
- package/server/worker-protocol.ts +38 -0
- package/server/worksheet.ts +67 -0
- package/server/workspace-file.ts +63 -0
- package/shared/contracts.ts +187 -0
- package/shared/file-limits.ts +5 -0
- package/shared/markdown-constants.ts +4 -0
- package/shared/markdown-math.ts +198 -0
- package/shared/markdown-references.ts +83 -0
- package/shared/markdown-source-location.ts +8 -0
- package/shared/reader-settings.ts +15 -0
- package/shared/reader-shortcuts.ts +132 -0
- package/vendor/office2pdf/DrawingML-LICENSE.txt +202 -0
- package/vendor/office2pdf/LICENSE +190 -0
- package/vendor/office2pdf/OFL-1.1.txt +92 -0
- package/vendor/office2pdf/Selawik-LICENSE.txt +91 -0
- package/vendor/office2pdf/office2pdf.cjs +826 -0
- package/vendor/office2pdf/office2pdf_bg.wasm +4 -0
|
@@ -0,0 +1,2636 @@
|
|
|
1
|
+
import * as checks from "./checks.js";
|
|
2
|
+
import * as core from "./core.js";
|
|
3
|
+
import { Doc } from "./doc.js";
|
|
4
|
+
import { parse, parseAsync } from "./parse.js";
|
|
5
|
+
import * as regexes from "./regexes.js";
|
|
6
|
+
import * as util from "./util.js";
|
|
7
|
+
import { version } from "./versions.js";
|
|
8
|
+
export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
|
|
9
|
+
var _a;
|
|
10
|
+
inst ?? (inst = {});
|
|
11
|
+
inst._zod.def = def; // set _def property
|
|
12
|
+
inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
|
|
13
|
+
inst._zod.version = version;
|
|
14
|
+
const defChecks = inst._zod.def.checks;
|
|
15
|
+
// if inst is itself a checks.$ZodCheck, run it as a check
|
|
16
|
+
const checks = inst._zod.traits.has("$ZodCheck")
|
|
17
|
+
? [inst, ...(defChecks ?? [])]
|
|
18
|
+
: defChecks?.length
|
|
19
|
+
? [...defChecks]
|
|
20
|
+
: [];
|
|
21
|
+
for (const ch of checks) {
|
|
22
|
+
for (const fn of ch._zod.onattach) {
|
|
23
|
+
fn(inst);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (checks.length === 0) {
|
|
27
|
+
// deferred initializer inst._zod.parse is not yet defined
|
|
28
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
29
|
+
inst._zod.deferred?.push(() => {
|
|
30
|
+
inst._zod.run = inst._zod.parse;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const runChecks = (payload, checks, ctx) => {
|
|
35
|
+
if (payload.memo)
|
|
36
|
+
return payload;
|
|
37
|
+
let isAborted = util.aborted(payload);
|
|
38
|
+
let asyncResult;
|
|
39
|
+
for (const ch of checks) {
|
|
40
|
+
if (ch._zod.def.when) {
|
|
41
|
+
if (util.explicitlyAborted(payload))
|
|
42
|
+
continue;
|
|
43
|
+
const shouldRun = ch._zod.def.when(payload);
|
|
44
|
+
if (!shouldRun)
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
else if (isAborted) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const currLen = payload.issues.length;
|
|
51
|
+
const _ = ch._zod.check(payload);
|
|
52
|
+
if (_ instanceof Promise && ctx?.async === false) {
|
|
53
|
+
throw new core.$ZodAsyncError();
|
|
54
|
+
}
|
|
55
|
+
if (asyncResult || _ instanceof Promise) {
|
|
56
|
+
asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
57
|
+
await _;
|
|
58
|
+
const nextLen = payload.issues.length;
|
|
59
|
+
if (nextLen === currLen)
|
|
60
|
+
return;
|
|
61
|
+
util.attachSchema(payload.issues, currLen, inst);
|
|
62
|
+
if (!isAborted)
|
|
63
|
+
isAborted = util.aborted(payload, currLen);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const nextLen = payload.issues.length;
|
|
68
|
+
if (nextLen === currLen)
|
|
69
|
+
continue;
|
|
70
|
+
util.attachSchema(payload.issues, currLen, inst);
|
|
71
|
+
if (!isAborted)
|
|
72
|
+
isAborted = util.aborted(payload, currLen);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (asyncResult) {
|
|
76
|
+
return asyncResult.then(() => {
|
|
77
|
+
return payload;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return payload;
|
|
81
|
+
};
|
|
82
|
+
const handleCanaryResult = (canary, payload, ctx) => {
|
|
83
|
+
// abort if the canary is aborted
|
|
84
|
+
if (util.aborted(canary)) {
|
|
85
|
+
canary.aborted = true;
|
|
86
|
+
return canary;
|
|
87
|
+
}
|
|
88
|
+
// run checks first, then
|
|
89
|
+
const checkResult = runChecks(payload, checks, ctx);
|
|
90
|
+
if (checkResult instanceof Promise) {
|
|
91
|
+
if (ctx.async === false)
|
|
92
|
+
throw new core.$ZodAsyncError();
|
|
93
|
+
return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
|
|
94
|
+
}
|
|
95
|
+
return inst._zod.parse(checkResult, ctx);
|
|
96
|
+
};
|
|
97
|
+
inst._zod.run = (payload, ctx) => {
|
|
98
|
+
if (ctx.skipChecks) {
|
|
99
|
+
return inst._zod.parse(payload, ctx);
|
|
100
|
+
}
|
|
101
|
+
if (ctx.direction === "backward") {
|
|
102
|
+
// run canary initial pass (no checks)
|
|
103
|
+
const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
|
|
104
|
+
if (canary instanceof Promise) {
|
|
105
|
+
return canary.then((canary) => {
|
|
106
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
110
|
+
}
|
|
111
|
+
// forward
|
|
112
|
+
const result = inst._zod.parse(payload, ctx);
|
|
113
|
+
if (result instanceof Promise) {
|
|
114
|
+
if (ctx.async === false)
|
|
115
|
+
throw new core.$ZodAsyncError();
|
|
116
|
+
return result.then((result) => runChecks(result, checks, ctx));
|
|
117
|
+
}
|
|
118
|
+
return runChecks(result, checks, ctx);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
// Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
|
|
123
|
+
get "~standard"() {
|
|
124
|
+
return util.hide(this, "~standard", standardProps(this));
|
|
125
|
+
},
|
|
126
|
+
set "~standard"(value) {
|
|
127
|
+
util.own(this, "~standard", value);
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
|
|
131
|
+
// a Standard Schema result only reports issues, so a failure finalizes them straight off the raw payload: no ZodError, and no lazy result to read through
|
|
132
|
+
const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())) } : { value: r.value };
|
|
133
|
+
async function validateAsync(inst, value) {
|
|
134
|
+
const ctx = { async: true };
|
|
135
|
+
return toStandardResult((await inst._zod.run({ value, issues: [] }, ctx)), ctx);
|
|
136
|
+
}
|
|
137
|
+
export function standardProps(inst) {
|
|
138
|
+
return {
|
|
139
|
+
validate: (value) => {
|
|
140
|
+
const ctx = { async: false };
|
|
141
|
+
try {
|
|
142
|
+
const r = inst._zod.run({ value, issues: [] }, ctx);
|
|
143
|
+
if (!(r instanceof Promise))
|
|
144
|
+
return toStandardResult(r, ctx);
|
|
145
|
+
}
|
|
146
|
+
catch (_) { }
|
|
147
|
+
// async function so a synchronously throwing check rejects instead of escaping validate
|
|
148
|
+
return validateAsync(inst, value);
|
|
149
|
+
},
|
|
150
|
+
vendor: "zod",
|
|
151
|
+
version: 1,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export { clone } from "./util.js";
|
|
155
|
+
export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
|
|
156
|
+
$ZodType.init(inst, def);
|
|
157
|
+
// a format's own pattern, else unbounded; a template literal derives the check-aware form itself
|
|
158
|
+
inst._zod.pattern = def.pattern ?? regexes.anyString;
|
|
159
|
+
inst._zod.parse = (payload, _) => {
|
|
160
|
+
if (def.coerce)
|
|
161
|
+
try {
|
|
162
|
+
payload.value = String(payload.value);
|
|
163
|
+
}
|
|
164
|
+
catch (_) { }
|
|
165
|
+
if (typeof payload.value === "string")
|
|
166
|
+
return payload;
|
|
167
|
+
payload.issues.push({
|
|
168
|
+
expected: "string",
|
|
169
|
+
code: "invalid_type",
|
|
170
|
+
input: payload.value,
|
|
171
|
+
inst,
|
|
172
|
+
});
|
|
173
|
+
return payload;
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
export const $ZodStringFormat = /*@__PURE__*/ core.$constructor("$ZodStringFormat", (inst, def) => {
|
|
177
|
+
// check initialization must come first
|
|
178
|
+
checks.$ZodCheckStringFormat.init(inst, def);
|
|
179
|
+
$ZodString.init(inst, def);
|
|
180
|
+
});
|
|
181
|
+
export const $ZodGUID = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def) => {
|
|
182
|
+
def.pattern ?? (def.pattern = regexes.guid);
|
|
183
|
+
$ZodStringFormat.init(inst, def);
|
|
184
|
+
});
|
|
185
|
+
export const $ZodUUID = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def) => {
|
|
186
|
+
if (def.version) {
|
|
187
|
+
const versionMap = {
|
|
188
|
+
v1: 1,
|
|
189
|
+
v2: 2,
|
|
190
|
+
v3: 3,
|
|
191
|
+
v4: 4,
|
|
192
|
+
v5: 5,
|
|
193
|
+
v6: 6,
|
|
194
|
+
v7: 7,
|
|
195
|
+
v8: 8,
|
|
196
|
+
};
|
|
197
|
+
const v = versionMap[def.version];
|
|
198
|
+
if (v === undefined)
|
|
199
|
+
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
200
|
+
def.pattern ?? (def.pattern = regexes.uuid(v));
|
|
201
|
+
}
|
|
202
|
+
else
|
|
203
|
+
def.pattern ?? (def.pattern = regexes.uuid());
|
|
204
|
+
$ZodStringFormat.init(inst, def);
|
|
205
|
+
});
|
|
206
|
+
export const $ZodEmail = /*@__PURE__*/ core.$constructor("$ZodEmail", (inst, def) => {
|
|
207
|
+
def.pattern ?? (def.pattern = regexes.email);
|
|
208
|
+
$ZodStringFormat.init(inst, def);
|
|
209
|
+
});
|
|
210
|
+
/** The `://` guard rejected the input before the URL constructor saw it. */
|
|
211
|
+
export const URL_BAD_FORMAT = 1;
|
|
212
|
+
/** The URL parser rejected the input. */
|
|
213
|
+
export const URL_UNPARSEABLE = 2;
|
|
214
|
+
export function canParseURL(input) {
|
|
215
|
+
try {
|
|
216
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function")
|
|
217
|
+
return URL.canParse(input);
|
|
218
|
+
new URL(input);
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export function validateURL(trimmed, def) {
|
|
226
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
227
|
+
return canParseURL(trimmed) || URL_UNPARSEABLE;
|
|
228
|
+
}
|
|
229
|
+
return parseURLObject(trimmed, def);
|
|
230
|
+
}
|
|
231
|
+
/** Parses a URL while preserving the non-normalizing HTTP guard. */
|
|
232
|
+
export function parseURLObject(trimmed, def) {
|
|
233
|
+
// When normalize is off, require :// for http/https URLs. This prevents strings like "http:example.com" or "https:/path" from being silently accepted
|
|
234
|
+
if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
|
|
235
|
+
return URL_BAD_FORMAT;
|
|
236
|
+
}
|
|
237
|
+
try {
|
|
238
|
+
if (typeof URL !== "undefined") {
|
|
239
|
+
const URLStatic = URL;
|
|
240
|
+
if (typeof URLStatic.parse === "function")
|
|
241
|
+
return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
|
|
242
|
+
}
|
|
243
|
+
// @ts-ignore
|
|
244
|
+
return new URL(trimmed);
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
return URL_UNPARSEABLE;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const asciiTabOrNewline = /[\t\n\r]/g;
|
|
251
|
+
/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */
|
|
252
|
+
export function stripTabAndNewline(value) {
|
|
253
|
+
return value.replace(asciiTabOrNewline, "");
|
|
254
|
+
}
|
|
255
|
+
export function urlHostnameOk(url, hostname) {
|
|
256
|
+
hostname.lastIndex = 0;
|
|
257
|
+
return hostname.test(url.hostname);
|
|
258
|
+
}
|
|
259
|
+
export function urlProtocolOk(url, protocol) {
|
|
260
|
+
protocol.lastIndex = 0;
|
|
261
|
+
return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
|
|
262
|
+
}
|
|
263
|
+
export const $ZodURL = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
|
|
264
|
+
$ZodStringFormat.init(inst, def);
|
|
265
|
+
inst._zod.check = (payload) => {
|
|
266
|
+
try {
|
|
267
|
+
// Trim whitespace from input
|
|
268
|
+
const trimmed = payload.value.trim();
|
|
269
|
+
const url = validateURL(trimmed, def);
|
|
270
|
+
if (url === URL_BAD_FORMAT) {
|
|
271
|
+
payload.issues.push({
|
|
272
|
+
code: "invalid_format",
|
|
273
|
+
format: "url",
|
|
274
|
+
note: "Invalid URL format",
|
|
275
|
+
input: payload.value,
|
|
276
|
+
inst,
|
|
277
|
+
continue: !def.abort,
|
|
278
|
+
});
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
if (url === URL_UNPARSEABLE) {
|
|
282
|
+
payload.issues.push({
|
|
283
|
+
code: "invalid_format",
|
|
284
|
+
format: "url",
|
|
285
|
+
input: payload.value,
|
|
286
|
+
inst,
|
|
287
|
+
continue: !def.abort,
|
|
288
|
+
});
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (url === true) {
|
|
292
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (def.hostname && !urlHostnameOk(url, def.hostname)) {
|
|
296
|
+
payload.issues.push({
|
|
297
|
+
code: "invalid_format",
|
|
298
|
+
format: "url",
|
|
299
|
+
note: "Invalid hostname",
|
|
300
|
+
pattern: def.hostname.source,
|
|
301
|
+
input: payload.value,
|
|
302
|
+
inst,
|
|
303
|
+
continue: !def.abort,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
if (def.protocol && !urlProtocolOk(url, def.protocol)) {
|
|
307
|
+
payload.issues.push({
|
|
308
|
+
code: "invalid_format",
|
|
309
|
+
format: "url",
|
|
310
|
+
note: "Invalid protocol",
|
|
311
|
+
pattern: def.protocol.source,
|
|
312
|
+
input: payload.value,
|
|
313
|
+
inst,
|
|
314
|
+
continue: !def.abort,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
// Set the output value based on normalize flag
|
|
318
|
+
payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
catch (_) {
|
|
322
|
+
payload.issues.push({
|
|
323
|
+
code: "invalid_format",
|
|
324
|
+
format: "url",
|
|
325
|
+
input: payload.value,
|
|
326
|
+
inst,
|
|
327
|
+
continue: !def.abort,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
});
|
|
332
|
+
export const $ZodEmoji = /*@__PURE__*/ core.$constructor("$ZodEmoji", (inst, def) => {
|
|
333
|
+
def.pattern ?? (def.pattern = regexes.emoji());
|
|
334
|
+
$ZodStringFormat.init(inst, def);
|
|
335
|
+
});
|
|
336
|
+
export const $ZodNanoID = /*@__PURE__*/ core.$constructor("$ZodNanoID", (inst, def) => {
|
|
337
|
+
if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))
|
|
338
|
+
throw new Error(`Invalid nanoid length: ${def.length}`);
|
|
339
|
+
def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));
|
|
340
|
+
$ZodStringFormat.init(inst, def);
|
|
341
|
+
});
|
|
342
|
+
/**
|
|
343
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
344
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
345
|
+
* See https://github.com/paralleldrive/cuid.
|
|
346
|
+
*/
|
|
347
|
+
export const $ZodCUID = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def) => {
|
|
348
|
+
def.pattern ?? (def.pattern = regexes.cuid);
|
|
349
|
+
$ZodStringFormat.init(inst, def);
|
|
350
|
+
});
|
|
351
|
+
export const $ZodCUID2 = /*@__PURE__*/ core.$constructor("$ZodCUID2", (inst, def) => {
|
|
352
|
+
def.pattern ?? (def.pattern = regexes.cuid2);
|
|
353
|
+
$ZodStringFormat.init(inst, def);
|
|
354
|
+
});
|
|
355
|
+
export const $ZodULID = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def) => {
|
|
356
|
+
def.pattern ?? (def.pattern = regexes.ulid);
|
|
357
|
+
$ZodStringFormat.init(inst, def);
|
|
358
|
+
});
|
|
359
|
+
export const $ZodXID = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def) => {
|
|
360
|
+
def.pattern ?? (def.pattern = regexes.xid);
|
|
361
|
+
$ZodStringFormat.init(inst, def);
|
|
362
|
+
});
|
|
363
|
+
export const $ZodKSUID = /*@__PURE__*/ core.$constructor("$ZodKSUID", (inst, def) => {
|
|
364
|
+
def.pattern ?? (def.pattern = regexes.ksuid);
|
|
365
|
+
$ZodStringFormat.init(inst, def);
|
|
366
|
+
});
|
|
367
|
+
export const $ZodISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
|
|
368
|
+
def.pattern ?? (def.pattern = regexes.datetime(def));
|
|
369
|
+
$ZodStringFormat.init(inst, def);
|
|
370
|
+
});
|
|
371
|
+
export const $ZodISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
|
|
372
|
+
def.pattern ?? (def.pattern = regexes.date);
|
|
373
|
+
$ZodStringFormat.init(inst, def);
|
|
374
|
+
});
|
|
375
|
+
export const $ZodISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
|
|
376
|
+
def.pattern ?? (def.pattern = regexes.time(def));
|
|
377
|
+
$ZodStringFormat.init(inst, def);
|
|
378
|
+
});
|
|
379
|
+
export const $ZodISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
|
|
380
|
+
def.pattern ?? (def.pattern = regexes.duration);
|
|
381
|
+
$ZodStringFormat.init(inst, def);
|
|
382
|
+
});
|
|
383
|
+
export const $ZodIPv4 = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def) => {
|
|
384
|
+
def.pattern ?? (def.pattern = regexes.ipv4);
|
|
385
|
+
$ZodStringFormat.init(inst, def);
|
|
386
|
+
});
|
|
387
|
+
/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL("http://[...]")` parses an authority, not an address, so `@` and `\` re-delimit it and `"::@1\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `"::1\n"` validated as `::1`. */
|
|
388
|
+
const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
389
|
+
export function isValidIPv6(value) {
|
|
390
|
+
if (!ipv6Alphabet.test(value))
|
|
391
|
+
return false;
|
|
392
|
+
return canParseURL(`http://[${value}]`);
|
|
393
|
+
}
|
|
394
|
+
export const $ZodIPv6 = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def) => {
|
|
395
|
+
def.pattern ?? (def.pattern = regexes.ipv6);
|
|
396
|
+
$ZodStringFormat.init(inst, def);
|
|
397
|
+
inst._zod.check = (payload) => {
|
|
398
|
+
if (!isValidIPv6(payload.value)) {
|
|
399
|
+
payload.issues.push({
|
|
400
|
+
code: "invalid_format",
|
|
401
|
+
format: "ipv6",
|
|
402
|
+
input: payload.value,
|
|
403
|
+
inst,
|
|
404
|
+
continue: !def.abort,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
});
|
|
409
|
+
export const $ZodMAC = /*@__PURE__*/ core.$constructor("$ZodMAC", (inst, def) => {
|
|
410
|
+
def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
|
|
411
|
+
$ZodStringFormat.init(inst, def);
|
|
412
|
+
});
|
|
413
|
+
export const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor("$ZodCIDRv4", (inst, def) => {
|
|
414
|
+
def.pattern ?? (def.pattern = regexes.cidrv4);
|
|
415
|
+
$ZodStringFormat.init(inst, def);
|
|
416
|
+
});
|
|
417
|
+
export function isValidCIDRv6(value) {
|
|
418
|
+
const parts = value.split("/");
|
|
419
|
+
if (parts.length !== 2)
|
|
420
|
+
return false;
|
|
421
|
+
const [address, prefix] = parts;
|
|
422
|
+
if (!prefix)
|
|
423
|
+
return false;
|
|
424
|
+
const prefixNum = Number(prefix);
|
|
425
|
+
if (`${prefixNum}` !== prefix)
|
|
426
|
+
return false;
|
|
427
|
+
if (prefixNum < 0 || prefixNum > 128)
|
|
428
|
+
return false;
|
|
429
|
+
return isValidIPv6(address);
|
|
430
|
+
}
|
|
431
|
+
export const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor("$ZodCIDRv6", (inst, def) => {
|
|
432
|
+
def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
|
|
433
|
+
$ZodStringFormat.init(inst, def);
|
|
434
|
+
inst._zod.check = (payload) => {
|
|
435
|
+
if (!isValidCIDRv6(payload.value)) {
|
|
436
|
+
payload.issues.push({
|
|
437
|
+
code: "invalid_format",
|
|
438
|
+
format: "cidrv6",
|
|
439
|
+
input: payload.value,
|
|
440
|
+
inst,
|
|
441
|
+
continue: !def.abort,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
});
|
|
446
|
+
////////////////////////////// ZodBase64 //////////////////////////////
|
|
447
|
+
export function isValidBase64(data) {
|
|
448
|
+
if (data === "")
|
|
449
|
+
return true;
|
|
450
|
+
// atob ignores whitespace, so reject it up front.
|
|
451
|
+
if (/\s/.test(data))
|
|
452
|
+
return false;
|
|
453
|
+
if (data.length % 4 !== 0)
|
|
454
|
+
return false;
|
|
455
|
+
try {
|
|
456
|
+
// @ts-ignore
|
|
457
|
+
atob(data);
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
catch {
|
|
461
|
+
return false;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
// lax on purpose: the quantified regexes.base64 overflows the regex stack on multi-MB input and its leading ^$| alternation leaks through template-literal composition; isValidBase64 enforces length and padding
|
|
465
|
+
export const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
466
|
+
export const $ZodBase64 = /*@__PURE__*/ core.$constructor("$ZodBase64", (inst, def) => {
|
|
467
|
+
def.pattern ?? (def.pattern = base64Charset);
|
|
468
|
+
$ZodStringFormat.init(inst, def);
|
|
469
|
+
inst._zod.check = (payload) => {
|
|
470
|
+
if (isValidBase64(payload.value))
|
|
471
|
+
return;
|
|
472
|
+
payload.issues.push({
|
|
473
|
+
code: "invalid_format",
|
|
474
|
+
format: "base64",
|
|
475
|
+
input: payload.value,
|
|
476
|
+
inst,
|
|
477
|
+
continue: !def.abort,
|
|
478
|
+
});
|
|
479
|
+
};
|
|
480
|
+
});
|
|
481
|
+
////////////////////////////// ZodBase64URL //////////////////////////////
|
|
482
|
+
// lax on purpose: the quantified regexes.base64url overflows the regex stack on multi-MB input; isValidBase64 enforces length on the padded string
|
|
483
|
+
export const base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
484
|
+
export function isValidBase64URL(data) {
|
|
485
|
+
if (!base64urlCharset.test(data))
|
|
486
|
+
return false;
|
|
487
|
+
const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
|
|
488
|
+
const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
|
|
489
|
+
return isValidBase64(padded);
|
|
490
|
+
}
|
|
491
|
+
export const $ZodBase64URL = /*@__PURE__*/ core.$constructor("$ZodBase64URL", (inst, def) => {
|
|
492
|
+
def.pattern ?? (def.pattern = base64urlCharset);
|
|
493
|
+
$ZodStringFormat.init(inst, def);
|
|
494
|
+
inst._zod.check = (payload) => {
|
|
495
|
+
if (isValidBase64URL(payload.value))
|
|
496
|
+
return;
|
|
497
|
+
payload.issues.push({
|
|
498
|
+
code: "invalid_format",
|
|
499
|
+
format: "base64url",
|
|
500
|
+
input: payload.value,
|
|
501
|
+
inst,
|
|
502
|
+
continue: !def.abort,
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
});
|
|
506
|
+
export const $ZodE164 = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def) => {
|
|
507
|
+
def.pattern ?? (def.pattern = regexes.e164);
|
|
508
|
+
$ZodStringFormat.init(inst, def);
|
|
509
|
+
});
|
|
510
|
+
////////////////////////////// ZodCreditCard //////////////////////////////
|
|
511
|
+
const CC_SANITIZE = /[- ]/g;
|
|
512
|
+
/** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */
|
|
513
|
+
function isLuhnAlgo(digits) {
|
|
514
|
+
let length = digits.length;
|
|
515
|
+
let bit = 1;
|
|
516
|
+
let sum = 0;
|
|
517
|
+
while (length) {
|
|
518
|
+
const value = digits.charCodeAt(--length) - 48;
|
|
519
|
+
bit ^= 1;
|
|
520
|
+
sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
|
|
521
|
+
}
|
|
522
|
+
return sum % 10 === 0;
|
|
523
|
+
}
|
|
524
|
+
export function isValidCreditCard(input) {
|
|
525
|
+
if (!regexes.creditCard.test(input))
|
|
526
|
+
return false;
|
|
527
|
+
return isLuhnAlgo(input.replace(CC_SANITIZE, ""));
|
|
528
|
+
}
|
|
529
|
+
export const $ZodCreditCard = /*@__PURE__*/ core.$constructor("$ZodCreditCard", (inst, def) => {
|
|
530
|
+
// Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.
|
|
531
|
+
def.pattern ?? (def.pattern = regexes.creditCard);
|
|
532
|
+
$ZodStringFormat.init(inst, def);
|
|
533
|
+
inst._zod.check = (payload) => {
|
|
534
|
+
if (isValidCreditCard(payload.value))
|
|
535
|
+
return;
|
|
536
|
+
payload.issues.push({
|
|
537
|
+
code: "invalid_format",
|
|
538
|
+
format: "credit_card",
|
|
539
|
+
input: payload.value,
|
|
540
|
+
inst,
|
|
541
|
+
continue: !def.abort,
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
});
|
|
545
|
+
////////////////////////////// ZodIBAN //////////////////////////////
|
|
546
|
+
// iso 7064 mod 97-10 checksum without BigInt
|
|
547
|
+
function isIso7064Mod97(iban) {
|
|
548
|
+
let remainder = 0;
|
|
549
|
+
const len = iban.length;
|
|
550
|
+
for (let i = 4; i < len; i++) {
|
|
551
|
+
const code = iban.charCodeAt(i);
|
|
552
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
553
|
+
}
|
|
554
|
+
for (let i = 0; i < 4; i++) {
|
|
555
|
+
const code = iban.charCodeAt(i);
|
|
556
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
557
|
+
}
|
|
558
|
+
return remainder === 1;
|
|
559
|
+
}
|
|
560
|
+
export function isValidIBAN(input) {
|
|
561
|
+
if (!regexes.iban.test(input))
|
|
562
|
+
return false;
|
|
563
|
+
return isIso7064Mod97(input);
|
|
564
|
+
}
|
|
565
|
+
export const $ZodIBAN = /*@__PURE__*/ core.$constructor("$ZodIBAN", (inst, def) => {
|
|
566
|
+
// shape only — checksum is not expressible as a pattern
|
|
567
|
+
def.pattern ?? (def.pattern = regexes.iban);
|
|
568
|
+
$ZodStringFormat.init(inst, def);
|
|
569
|
+
inst._zod.check = (payload) => {
|
|
570
|
+
if (isValidIBAN(payload.value))
|
|
571
|
+
return;
|
|
572
|
+
payload.issues.push({
|
|
573
|
+
code: "invalid_format",
|
|
574
|
+
format: "iban",
|
|
575
|
+
input: payload.value,
|
|
576
|
+
inst,
|
|
577
|
+
continue: !def.abort,
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
////////////////////////////// ZodJWT //////////////////////////////
|
|
582
|
+
export function isValidJWT(token, algorithm = null) {
|
|
583
|
+
try {
|
|
584
|
+
const tokensParts = token.split(".");
|
|
585
|
+
if (tokensParts.length !== 3)
|
|
586
|
+
return false;
|
|
587
|
+
const [header] = tokensParts;
|
|
588
|
+
if (!header)
|
|
589
|
+
return false;
|
|
590
|
+
// @ts-ignore
|
|
591
|
+
const parsedHeader = JSON.parse(atob(header));
|
|
592
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
593
|
+
return false;
|
|
594
|
+
if (!parsedHeader.alg)
|
|
595
|
+
return false;
|
|
596
|
+
if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
|
|
597
|
+
return false;
|
|
598
|
+
return true;
|
|
599
|
+
}
|
|
600
|
+
catch {
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) => {
|
|
605
|
+
$ZodStringFormat.init(inst, def);
|
|
606
|
+
inst._zod.check = (payload) => {
|
|
607
|
+
if (isValidJWT(payload.value, def.alg))
|
|
608
|
+
return;
|
|
609
|
+
payload.issues.push({
|
|
610
|
+
code: "invalid_format",
|
|
611
|
+
format: "jwt",
|
|
612
|
+
input: payload.value,
|
|
613
|
+
inst,
|
|
614
|
+
continue: !def.abort,
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
});
|
|
618
|
+
export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
|
|
619
|
+
$ZodStringFormat.init(inst, def);
|
|
620
|
+
inst._zod.check = (payload) => {
|
|
621
|
+
if (def.fn(payload.value))
|
|
622
|
+
return;
|
|
623
|
+
payload.issues.push({
|
|
624
|
+
code: "invalid_format",
|
|
625
|
+
format: def.format,
|
|
626
|
+
input: payload.value,
|
|
627
|
+
inst,
|
|
628
|
+
continue: !def.abort,
|
|
629
|
+
});
|
|
630
|
+
};
|
|
631
|
+
});
|
|
632
|
+
export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
|
|
633
|
+
$ZodType.init(inst, def);
|
|
634
|
+
inst._zod.pattern = regexes.number;
|
|
635
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
636
|
+
if (def.coerce)
|
|
637
|
+
try {
|
|
638
|
+
payload.value = Number(payload.value);
|
|
639
|
+
}
|
|
640
|
+
catch (_) { }
|
|
641
|
+
const input = payload.value;
|
|
642
|
+
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
|
|
643
|
+
return payload;
|
|
644
|
+
}
|
|
645
|
+
const received = typeof input === "number"
|
|
646
|
+
? Number.isNaN(input)
|
|
647
|
+
? "NaN"
|
|
648
|
+
: !Number.isFinite(input)
|
|
649
|
+
? String(input)
|
|
650
|
+
: undefined
|
|
651
|
+
: undefined;
|
|
652
|
+
payload.issues.push({
|
|
653
|
+
expected: "number",
|
|
654
|
+
code: "invalid_type",
|
|
655
|
+
input,
|
|
656
|
+
inst,
|
|
657
|
+
...(received ? { received } : {}),
|
|
658
|
+
});
|
|
659
|
+
return payload;
|
|
660
|
+
};
|
|
661
|
+
});
|
|
662
|
+
export const $ZodNumberFormat = /*@__PURE__*/ core.$constructor("$ZodNumberFormat", (inst, def) => {
|
|
663
|
+
checks.$ZodCheckNumberFormat.init(inst, def);
|
|
664
|
+
$ZodNumber.init(inst, def); // no format checks
|
|
665
|
+
});
|
|
666
|
+
export const $ZodBoolean = /*@__PURE__*/ core.$constructor("$ZodBoolean", (inst, def) => {
|
|
667
|
+
$ZodType.init(inst, def);
|
|
668
|
+
inst._zod.pattern = regexes.boolean;
|
|
669
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
670
|
+
if (def.coerce)
|
|
671
|
+
try {
|
|
672
|
+
payload.value = Boolean(payload.value);
|
|
673
|
+
}
|
|
674
|
+
catch (_) { }
|
|
675
|
+
const input = payload.value;
|
|
676
|
+
if (typeof input === "boolean")
|
|
677
|
+
return payload;
|
|
678
|
+
payload.issues.push({
|
|
679
|
+
expected: "boolean",
|
|
680
|
+
code: "invalid_type",
|
|
681
|
+
input,
|
|
682
|
+
inst,
|
|
683
|
+
});
|
|
684
|
+
return payload;
|
|
685
|
+
};
|
|
686
|
+
});
|
|
687
|
+
export const $ZodBigInt = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
|
|
688
|
+
$ZodType.init(inst, def);
|
|
689
|
+
inst._zod.pattern = regexes.bigint;
|
|
690
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
691
|
+
if (def.coerce)
|
|
692
|
+
try {
|
|
693
|
+
payload.value = BigInt(payload.value);
|
|
694
|
+
}
|
|
695
|
+
catch (_) { }
|
|
696
|
+
if (typeof payload.value === "bigint")
|
|
697
|
+
return payload;
|
|
698
|
+
payload.issues.push({
|
|
699
|
+
expected: "bigint",
|
|
700
|
+
code: "invalid_type",
|
|
701
|
+
input: payload.value,
|
|
702
|
+
inst,
|
|
703
|
+
});
|
|
704
|
+
return payload;
|
|
705
|
+
};
|
|
706
|
+
});
|
|
707
|
+
export const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodBigIntFormat", (inst, def) => {
|
|
708
|
+
checks.$ZodCheckBigIntFormat.init(inst, def);
|
|
709
|
+
$ZodBigInt.init(inst, def); // no format checks
|
|
710
|
+
});
|
|
711
|
+
export const $ZodSymbol = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
|
|
712
|
+
$ZodType.init(inst, def);
|
|
713
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
714
|
+
const input = payload.value;
|
|
715
|
+
if (typeof input === "symbol")
|
|
716
|
+
return payload;
|
|
717
|
+
payload.issues.push({
|
|
718
|
+
expected: "symbol",
|
|
719
|
+
code: "invalid_type",
|
|
720
|
+
input,
|
|
721
|
+
inst,
|
|
722
|
+
});
|
|
723
|
+
return payload;
|
|
724
|
+
};
|
|
725
|
+
});
|
|
726
|
+
export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (inst, def) => {
|
|
727
|
+
$ZodType.init(inst, def);
|
|
728
|
+
inst._zod.pattern = regexes.undefined;
|
|
729
|
+
inst._zod.values = new Set([undefined]);
|
|
730
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
731
|
+
const input = payload.value;
|
|
732
|
+
if (typeof input === "undefined")
|
|
733
|
+
return payload;
|
|
734
|
+
payload.issues.push({
|
|
735
|
+
expected: "undefined",
|
|
736
|
+
code: "invalid_type",
|
|
737
|
+
input,
|
|
738
|
+
inst,
|
|
739
|
+
});
|
|
740
|
+
return payload;
|
|
741
|
+
};
|
|
742
|
+
});
|
|
743
|
+
export const $ZodNull = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
|
|
744
|
+
$ZodType.init(inst, def);
|
|
745
|
+
inst._zod.pattern = regexes.null;
|
|
746
|
+
inst._zod.values = new Set([null]);
|
|
747
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
748
|
+
const input = payload.value;
|
|
749
|
+
if (input === null)
|
|
750
|
+
return payload;
|
|
751
|
+
payload.issues.push({
|
|
752
|
+
expected: "null",
|
|
753
|
+
code: "invalid_type",
|
|
754
|
+
input,
|
|
755
|
+
inst,
|
|
756
|
+
});
|
|
757
|
+
return payload;
|
|
758
|
+
};
|
|
759
|
+
});
|
|
760
|
+
export const $ZodAny = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
|
|
761
|
+
$ZodType.init(inst, def);
|
|
762
|
+
inst._zod.parse = (payload) => payload;
|
|
763
|
+
});
|
|
764
|
+
export const $ZodUnknown = /*@__PURE__*/ core.$constructor("$ZodUnknown", (inst, def) => {
|
|
765
|
+
$ZodType.init(inst, def);
|
|
766
|
+
inst._zod.parse = (payload) => payload;
|
|
767
|
+
});
|
|
768
|
+
export const $ZodNever = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
|
|
769
|
+
$ZodType.init(inst, def);
|
|
770
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
771
|
+
payload.issues.push({
|
|
772
|
+
expected: "never",
|
|
773
|
+
code: "invalid_type",
|
|
774
|
+
input: payload.value,
|
|
775
|
+
inst,
|
|
776
|
+
});
|
|
777
|
+
return payload;
|
|
778
|
+
};
|
|
779
|
+
});
|
|
780
|
+
export const $ZodVoid = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
|
|
781
|
+
$ZodType.init(inst, def);
|
|
782
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
783
|
+
const input = payload.value;
|
|
784
|
+
if (typeof input === "undefined")
|
|
785
|
+
return payload;
|
|
786
|
+
payload.issues.push({
|
|
787
|
+
expected: "void",
|
|
788
|
+
code: "invalid_type",
|
|
789
|
+
input,
|
|
790
|
+
inst,
|
|
791
|
+
});
|
|
792
|
+
return payload;
|
|
793
|
+
};
|
|
794
|
+
});
|
|
795
|
+
export const $ZodDate = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
|
|
796
|
+
$ZodType.init(inst, def);
|
|
797
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
798
|
+
if (def.coerce) {
|
|
799
|
+
try {
|
|
800
|
+
payload.value = new Date(payload.value);
|
|
801
|
+
}
|
|
802
|
+
catch (_err) { }
|
|
803
|
+
}
|
|
804
|
+
const input = payload.value;
|
|
805
|
+
const isDate = input instanceof Date;
|
|
806
|
+
const isValidDate = isDate && !Number.isNaN(input.getTime());
|
|
807
|
+
if (isValidDate)
|
|
808
|
+
return payload;
|
|
809
|
+
payload.issues.push({
|
|
810
|
+
expected: "date",
|
|
811
|
+
code: "invalid_type",
|
|
812
|
+
input,
|
|
813
|
+
...(isDate ? { received: "Invalid Date" } : {}),
|
|
814
|
+
inst,
|
|
815
|
+
});
|
|
816
|
+
return payload;
|
|
817
|
+
};
|
|
818
|
+
});
|
|
819
|
+
// an oversized container fails its leading size checks before any element is parsed
|
|
820
|
+
function capSize(inst, size) {
|
|
821
|
+
const caps = util.sizeCaps(inst._zod.def.checks);
|
|
822
|
+
if (!caps.length)
|
|
823
|
+
return;
|
|
824
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
825
|
+
const parse = inst._zod.parse;
|
|
826
|
+
inst._zod.parse = (payload, ctx) => {
|
|
827
|
+
const n = size(payload.value);
|
|
828
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
829
|
+
for (const [max, ch] of util.sizeCaps(inst._zod.def.checks)) {
|
|
830
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
831
|
+
const start = payload.issues.length;
|
|
832
|
+
ch._zod.check(payload);
|
|
833
|
+
// the value is still the raw input, so no later check may read it
|
|
834
|
+
payload.issues[start].continue = false;
|
|
835
|
+
util.attachSchema(payload.issues, start, inst);
|
|
836
|
+
return payload;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
return parse(payload, ctx);
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
const arraySize = (input) => (Array.isArray(input) ? input.length : -1);
|
|
844
|
+
const mapSize = (input) => (input instanceof Map ? input.size : -1);
|
|
845
|
+
const setSize = (input) => (input instanceof Set ? input.size : -1);
|
|
846
|
+
function handleArrayResult(result, final, index) {
|
|
847
|
+
if (result.issues.length) {
|
|
848
|
+
final.issues.push(...util.prefixIssues(index, result.issues));
|
|
849
|
+
}
|
|
850
|
+
final.value[index] = result.value;
|
|
851
|
+
}
|
|
852
|
+
export const $ZodArray = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
|
|
853
|
+
$ZodType.init(inst, def);
|
|
854
|
+
const memo = core.globalConfig.memoizer;
|
|
855
|
+
memo?.attach(inst);
|
|
856
|
+
inst._zod.parse = (payload, ctx) => {
|
|
857
|
+
const input = payload.value;
|
|
858
|
+
if (!Array.isArray(input)) {
|
|
859
|
+
payload.issues.push({
|
|
860
|
+
expected: "array",
|
|
861
|
+
code: "invalid_type",
|
|
862
|
+
input,
|
|
863
|
+
inst,
|
|
864
|
+
});
|
|
865
|
+
return payload;
|
|
866
|
+
}
|
|
867
|
+
payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
|
|
868
|
+
const proms = [];
|
|
869
|
+
const abortEarly = ctx?.abortEarly;
|
|
870
|
+
for (let i = 0; i < input.length; i++) {
|
|
871
|
+
const item = input[i];
|
|
872
|
+
const result = def.element._zod.run({
|
|
873
|
+
value: item,
|
|
874
|
+
issues: [],
|
|
875
|
+
}, ctx);
|
|
876
|
+
if (result instanceof Promise) {
|
|
877
|
+
proms.push(result.then((result) => handleArrayResult(result, payload, i)));
|
|
878
|
+
}
|
|
879
|
+
else {
|
|
880
|
+
handleArrayResult(result, payload, i);
|
|
881
|
+
// the element's payload is authoritative here, since handleArrayResult forwards every issue; an object's is not, because it drops a failed absent optional
|
|
882
|
+
if (abortEarly && result.issues.length !== 0 && util.aborted(result))
|
|
883
|
+
break;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
if (proms.length) {
|
|
887
|
+
return Promise.all(proms).then(() => payload);
|
|
888
|
+
}
|
|
889
|
+
return payload; //handleArrayResultsAsync(parseResults, final);
|
|
890
|
+
};
|
|
891
|
+
capSize(inst, arraySize);
|
|
892
|
+
});
|
|
893
|
+
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
894
|
+
const isPresent = key in input;
|
|
895
|
+
const isOptionalOut = optout === "optional";
|
|
896
|
+
// The middle rung means "absence permitted, nothing supplied in its place", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.
|
|
897
|
+
if (!isPresent && isOptionalOut && optin === "optional") {
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
if (result.issues.length) {
|
|
901
|
+
// For optional-in/out schemas, ignore errors on absent keys.
|
|
902
|
+
if (optin !== undefined && isOptionalOut && !isPresent) {
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
final.issues.push(...util.prefixIssues(key, result.issues));
|
|
906
|
+
}
|
|
907
|
+
if (!isPresent && optin === undefined) {
|
|
908
|
+
if (!result.issues.length) {
|
|
909
|
+
final.issues.push({
|
|
910
|
+
code: "invalid_type",
|
|
911
|
+
expected: "nonoptional",
|
|
912
|
+
input: undefined,
|
|
913
|
+
path: [key],
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
if (result.value === undefined) {
|
|
919
|
+
if (isPresent || (optin === "defaulted" && !isOptionalOut)) {
|
|
920
|
+
final.value[key] = undefined;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
else {
|
|
924
|
+
final.value[key] = result.value;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
// one shared instance; a fresh [] per schema cost 56 bytes retained
|
|
928
|
+
const NO_SYMBOL_KEYS = [];
|
|
929
|
+
function normalizeDef(def) {
|
|
930
|
+
const keys = Object.keys(def.shape);
|
|
931
|
+
const ownSymbols = Object.getOwnPropertySymbols(def.shape);
|
|
932
|
+
const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;
|
|
933
|
+
// aliases `keys` when there are no symbols, so a string-only shape keeps one array
|
|
934
|
+
const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;
|
|
935
|
+
for (const k of allKeys) {
|
|
936
|
+
if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
|
|
937
|
+
throw new Error(`Invalid element at key "${String(k)}": expected a Zod schema`);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
const okeys = util.optionalKeys(def.shape);
|
|
941
|
+
return {
|
|
942
|
+
...def,
|
|
943
|
+
allKeys,
|
|
944
|
+
symbolKeys,
|
|
945
|
+
// string-only: handleCatchall matches it against `for...in`, which never yields a symbol
|
|
946
|
+
keySet: new Set(keys),
|
|
947
|
+
numKeys: keys.length,
|
|
948
|
+
optionalKeys: new Set(okeys),
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
952
|
+
const unrecognized = [];
|
|
953
|
+
const keySet = def.keySet;
|
|
954
|
+
const _catchall = def.catchall._zod;
|
|
955
|
+
const t = _catchall.def.type;
|
|
956
|
+
const optin = _catchall.optin;
|
|
957
|
+
const optout = _catchall.optout;
|
|
958
|
+
// starts at 0, not the current length: the shape phase already ran and may have aborted
|
|
959
|
+
let seen = 0;
|
|
960
|
+
for (const key in input) {
|
|
961
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
962
|
+
if (util.aborted(payload, seen))
|
|
963
|
+
break;
|
|
964
|
+
seen = payload.issues.length;
|
|
965
|
+
}
|
|
966
|
+
// Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.
|
|
967
|
+
if (keySet.has(key))
|
|
968
|
+
continue;
|
|
969
|
+
// Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.
|
|
970
|
+
if (key === "__proto__") {
|
|
971
|
+
if (t === "never")
|
|
972
|
+
unrecognized.push(key);
|
|
973
|
+
continue;
|
|
974
|
+
}
|
|
975
|
+
if (t === "never") {
|
|
976
|
+
unrecognized.push(key);
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
979
|
+
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
980
|
+
if (r instanceof Promise) {
|
|
981
|
+
proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
982
|
+
}
|
|
983
|
+
else {
|
|
984
|
+
handlePropertyResult(r, payload, key, input, optin, optout);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
if (unrecognized.length) {
|
|
988
|
+
payload.issues.push({
|
|
989
|
+
code: "unrecognized_keys",
|
|
990
|
+
keys: unrecognized,
|
|
991
|
+
input,
|
|
992
|
+
inst,
|
|
993
|
+
// Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
|
|
994
|
+
continue: true,
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
if (!proms.length)
|
|
998
|
+
return payload;
|
|
999
|
+
return Promise.all(proms).then(() => {
|
|
1000
|
+
return payload;
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
|
|
1004
|
+
// requires cast because technically $ZodObject doesn't extend
|
|
1005
|
+
$ZodType.init(inst, def);
|
|
1006
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
1007
|
+
// a cloned def carries its source's accessor, which knows the shape it answers from; adopting that keeps the clone's keys readable without running it
|
|
1008
|
+
const sh = desc?.get ? desc.get.raw : (def.shape ?? {});
|
|
1009
|
+
if (sh) {
|
|
1010
|
+
// Freezes the shape on first read, so its getters resolve once and every later read sees the same schemas.
|
|
1011
|
+
const get = () => {
|
|
1012
|
+
const newSh = { ...sh };
|
|
1013
|
+
Object.defineProperty(def, "shape", { value: newSh });
|
|
1014
|
+
get.raw = newSh;
|
|
1015
|
+
return newSh;
|
|
1016
|
+
};
|
|
1017
|
+
get.raw = sh;
|
|
1018
|
+
Object.defineProperty(def, "shape", { get });
|
|
1019
|
+
}
|
|
1020
|
+
const _normalized = util.cached(() => normalizeDef(def));
|
|
1021
|
+
util.defineLazyInternal(inst, "propValues", (zod) => {
|
|
1022
|
+
const shape = zod.def.shape;
|
|
1023
|
+
const propValues = {};
|
|
1024
|
+
for (const key in shape) {
|
|
1025
|
+
const field = shape[key]._zod;
|
|
1026
|
+
if (field.values) {
|
|
1027
|
+
if (!Object.prototype.hasOwnProperty.call(propValues, key)) {
|
|
1028
|
+
util.assignProp(propValues, key, new Set());
|
|
1029
|
+
}
|
|
1030
|
+
for (const v of field.values)
|
|
1031
|
+
propValues[key].add(v);
|
|
1032
|
+
// An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.
|
|
1033
|
+
if (field.optin !== undefined)
|
|
1034
|
+
propValues[key].add(undefined);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
return propValues;
|
|
1038
|
+
});
|
|
1039
|
+
const isObject = util.isObject;
|
|
1040
|
+
const catchall = def.catchall;
|
|
1041
|
+
let value;
|
|
1042
|
+
const memo = core.globalConfig.memoizer;
|
|
1043
|
+
memo?.attach(inst);
|
|
1044
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1045
|
+
value ?? (value = _normalized.value);
|
|
1046
|
+
const input = payload.value;
|
|
1047
|
+
if (!isObject(input)) {
|
|
1048
|
+
payload.issues.push({
|
|
1049
|
+
expected: "object",
|
|
1050
|
+
code: "invalid_type",
|
|
1051
|
+
input,
|
|
1052
|
+
inst,
|
|
1053
|
+
});
|
|
1054
|
+
return payload;
|
|
1055
|
+
}
|
|
1056
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
1057
|
+
const proms = [];
|
|
1058
|
+
const shape = value.shape;
|
|
1059
|
+
const abortEarly = ctx?.abortEarly;
|
|
1060
|
+
let seen = payload.issues.length;
|
|
1061
|
+
for (const key of value.allKeys) {
|
|
1062
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1063
|
+
if (util.aborted(payload, seen))
|
|
1064
|
+
break;
|
|
1065
|
+
seen = payload.issues.length;
|
|
1066
|
+
}
|
|
1067
|
+
if (key === "__proto__")
|
|
1068
|
+
continue;
|
|
1069
|
+
const el = shape[key];
|
|
1070
|
+
const optin = el._zod.optin;
|
|
1071
|
+
const optout = el._zod.optout;
|
|
1072
|
+
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
1073
|
+
if (r instanceof Promise) {
|
|
1074
|
+
proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
|
|
1075
|
+
}
|
|
1076
|
+
else {
|
|
1077
|
+
handlePropertyResult(r, payload, key, input, optin, optout);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
if (!catchall) {
|
|
1081
|
+
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
1082
|
+
}
|
|
1083
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
|
|
1084
|
+
};
|
|
1085
|
+
});
|
|
1086
|
+
export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
1087
|
+
// requires cast because technically $ZodObject doesn't extend
|
|
1088
|
+
$ZodObject.init(inst, def);
|
|
1089
|
+
const superParse = inst._zod.parse;
|
|
1090
|
+
const _normalized = util.cached(() => normalizeDef(def));
|
|
1091
|
+
const memo = core.globalConfig.memoizer;
|
|
1092
|
+
const generateFastpass = (shape) => {
|
|
1093
|
+
const normalized = _normalized.value;
|
|
1094
|
+
const syms = normalized.symbolKeys;
|
|
1095
|
+
// a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope
|
|
1096
|
+
const doc = new Doc(["payload", "ctx"], { shape, inst, memo, syms });
|
|
1097
|
+
const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1098
|
+
// prefixes in place, like util.prefixIssues. newResult must land before the early return: a catchall runs after this and would otherwise write onto the caller's input
|
|
1099
|
+
const prefixStr = (id, k) => `
|
|
1100
|
+
let ${id}_ab = false;
|
|
1101
|
+
for (let i = 0; i < ${id}.issues.length; i++) {
|
|
1102
|
+
const iss = ${id}.issues[i];
|
|
1103
|
+
iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
|
|
1104
|
+
payload.issues.push(iss);
|
|
1105
|
+
if (iss.continue !== true) ${id}_ab = true;
|
|
1106
|
+
}
|
|
1107
|
+
if (${id}_ab && ctx && ctx.abortEarly) {
|
|
1108
|
+
payload.value = newResult;
|
|
1109
|
+
return payload;
|
|
1110
|
+
}`;
|
|
1111
|
+
doc.write(`const input = payload.value;`);
|
|
1112
|
+
const ids = Object.create(null);
|
|
1113
|
+
let counter = 0;
|
|
1114
|
+
for (const key of normalized.allKeys) {
|
|
1115
|
+
ids[key] = `key_${counter++}`;
|
|
1116
|
+
}
|
|
1117
|
+
// A: preserve key order {
|
|
1118
|
+
doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
|
|
1119
|
+
for (const key of normalized.allKeys) {
|
|
1120
|
+
if (key === "__proto__")
|
|
1121
|
+
continue;
|
|
1122
|
+
const id = ids[key];
|
|
1123
|
+
const k = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : util.esc(key);
|
|
1124
|
+
const isPresent = `${k} in input`;
|
|
1125
|
+
const schema = shape[key];
|
|
1126
|
+
const optin = schema?._zod?.optin;
|
|
1127
|
+
const isOptionalIn = optin !== undefined;
|
|
1128
|
+
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
1129
|
+
doc.write(`const ${id} = ${parseStr(k)};`);
|
|
1130
|
+
if (isOptionalIn && isOptionalOut) {
|
|
1131
|
+
// For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.
|
|
1132
|
+
const assign = optin === "optional" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;
|
|
1133
|
+
doc.write(`
|
|
1134
|
+
const ${id}_present = ${isPresent};
|
|
1135
|
+
if (!${id}.issues.length || ${id}_present) {
|
|
1136
|
+
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
if (${assign}) {
|
|
1140
|
+
newResult[${k}] = ${id}.value;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
`);
|
|
1145
|
+
}
|
|
1146
|
+
else if (!isOptionalIn) {
|
|
1147
|
+
doc.write(`
|
|
1148
|
+
const ${id}_present = ${isPresent};
|
|
1149
|
+
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
1150
|
+
}
|
|
1151
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
1152
|
+
payload.issues.push({
|
|
1153
|
+
code: "invalid_type",
|
|
1154
|
+
expected: "nonoptional",
|
|
1155
|
+
input: undefined,
|
|
1156
|
+
path: [${k}]
|
|
1157
|
+
});
|
|
1158
|
+
if (ctx && ctx.abortEarly) {
|
|
1159
|
+
payload.value = newResult;
|
|
1160
|
+
return payload;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
if (${id}_present) {
|
|
1165
|
+
newResult[${k}] = ${id}.value;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
`);
|
|
1169
|
+
}
|
|
1170
|
+
else {
|
|
1171
|
+
doc.write(`
|
|
1172
|
+
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
1173
|
+
}
|
|
1174
|
+
`);
|
|
1175
|
+
if (optin === "defaulted") {
|
|
1176
|
+
doc.write(`newResult[${k}] = ${id}.value;`);
|
|
1177
|
+
}
|
|
1178
|
+
else {
|
|
1179
|
+
doc.write(`
|
|
1180
|
+
if (${id}.value !== undefined || ${isPresent}) {
|
|
1181
|
+
newResult[${k}] = ${id}.value;
|
|
1182
|
+
}
|
|
1183
|
+
`);
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
doc.write(`payload.value = newResult;`);
|
|
1188
|
+
doc.write(`return payload;`);
|
|
1189
|
+
// closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone
|
|
1190
|
+
return doc.compile();
|
|
1191
|
+
};
|
|
1192
|
+
let fastpass;
|
|
1193
|
+
const isObject = util.isObject;
|
|
1194
|
+
const jit = !core.globalConfig.jitless;
|
|
1195
|
+
const allowsEval = util.allowsEval;
|
|
1196
|
+
const fastEnabled = jit && allowsEval.value; // && !def.catchall;
|
|
1197
|
+
const catchall = def.catchall;
|
|
1198
|
+
let value;
|
|
1199
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1200
|
+
value ?? (value = _normalized.value);
|
|
1201
|
+
const input = payload.value;
|
|
1202
|
+
if (!isObject(input)) {
|
|
1203
|
+
payload.issues.push({
|
|
1204
|
+
expected: "object",
|
|
1205
|
+
code: "invalid_type",
|
|
1206
|
+
input,
|
|
1207
|
+
inst,
|
|
1208
|
+
});
|
|
1209
|
+
return payload;
|
|
1210
|
+
}
|
|
1211
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
1212
|
+
// always synchronous
|
|
1213
|
+
if (!fastpass)
|
|
1214
|
+
fastpass = generateFastpass(def.shape);
|
|
1215
|
+
payload = fastpass(payload, ctx);
|
|
1216
|
+
if (!catchall)
|
|
1217
|
+
return payload;
|
|
1218
|
+
return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);
|
|
1219
|
+
}
|
|
1220
|
+
return superParse(payload, ctx);
|
|
1221
|
+
};
|
|
1222
|
+
});
|
|
1223
|
+
function handleUnionResults(results, final, inst, ctx) {
|
|
1224
|
+
for (const result of results) {
|
|
1225
|
+
if (result.issues.length === 0) {
|
|
1226
|
+
final.value = result.value;
|
|
1227
|
+
return final;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
const nonaborted = results.filter((r) => !util.aborted(r));
|
|
1231
|
+
if (nonaborted.length === 1) {
|
|
1232
|
+
final.value = nonaborted[0].value;
|
|
1233
|
+
return nonaborted[0];
|
|
1234
|
+
}
|
|
1235
|
+
final.issues.push({
|
|
1236
|
+
code: "invalid_union",
|
|
1237
|
+
input: final.value,
|
|
1238
|
+
inst,
|
|
1239
|
+
errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
1240
|
+
});
|
|
1241
|
+
return final;
|
|
1242
|
+
}
|
|
1243
|
+
export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
|
|
1244
|
+
$ZodType.init(inst, def);
|
|
1245
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.options.some((o) => o._zod.optin === "defaulted")
|
|
1246
|
+
? "defaulted"
|
|
1247
|
+
: zod.def.options.some((o) => o._zod.optin !== undefined)
|
|
1248
|
+
? "optional"
|
|
1249
|
+
: undefined);
|
|
1250
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
|
|
1251
|
+
util.defineLazyInternal(inst, "values", (zod) => {
|
|
1252
|
+
if (zod.def.options.every((o) => o._zod.values)) {
|
|
1253
|
+
return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
1254
|
+
}
|
|
1255
|
+
return undefined;
|
|
1256
|
+
});
|
|
1257
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
1258
|
+
if (zod.def.options.every((o) => o._zod.pattern)) {
|
|
1259
|
+
const patterns = zod.def.options.map((o) => o._zod.pattern);
|
|
1260
|
+
return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
|
|
1261
|
+
}
|
|
1262
|
+
return undefined;
|
|
1263
|
+
});
|
|
1264
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
1265
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1266
|
+
if (first) {
|
|
1267
|
+
return first(payload, ctx);
|
|
1268
|
+
}
|
|
1269
|
+
let async = false;
|
|
1270
|
+
const results = [];
|
|
1271
|
+
for (const option of def.options) {
|
|
1272
|
+
const result = option._zod.run({
|
|
1273
|
+
value: payload.value,
|
|
1274
|
+
issues: [],
|
|
1275
|
+
}, ctx);
|
|
1276
|
+
if (result instanceof Promise) {
|
|
1277
|
+
results.push(result);
|
|
1278
|
+
async = true;
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
if (result.issues.length === 0)
|
|
1282
|
+
return result;
|
|
1283
|
+
results.push(result);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
if (!async)
|
|
1287
|
+
return handleUnionResults(results, payload, inst, ctx);
|
|
1288
|
+
return Promise.all(results).then((results) => {
|
|
1289
|
+
return handleUnionResults(results, payload, inst, ctx);
|
|
1290
|
+
});
|
|
1291
|
+
};
|
|
1292
|
+
});
|
|
1293
|
+
function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
1294
|
+
const matches = [];
|
|
1295
|
+
for (let i = 0; i < results.length; i++) {
|
|
1296
|
+
if (results[i].issues.length === 0)
|
|
1297
|
+
matches.push(i);
|
|
1298
|
+
}
|
|
1299
|
+
if (matches.length === 1) {
|
|
1300
|
+
final.value = results[matches[0]].value;
|
|
1301
|
+
return final;
|
|
1302
|
+
}
|
|
1303
|
+
if (matches.length === 0) {
|
|
1304
|
+
// No matches - same as regular union
|
|
1305
|
+
final.issues.push({
|
|
1306
|
+
code: "invalid_union",
|
|
1307
|
+
input: final.value,
|
|
1308
|
+
inst,
|
|
1309
|
+
errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
else {
|
|
1313
|
+
// Multiple matches - exclusive union failure
|
|
1314
|
+
final.issues.push({
|
|
1315
|
+
code: "invalid_union",
|
|
1316
|
+
input: final.value,
|
|
1317
|
+
inst,
|
|
1318
|
+
errors: [],
|
|
1319
|
+
inclusive: false,
|
|
1320
|
+
matches,
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
return final;
|
|
1324
|
+
}
|
|
1325
|
+
export const $ZodXor = /*@__PURE__*/ core.$constructor("$ZodXor", (inst, def) => {
|
|
1326
|
+
$ZodUnion.init(inst, def);
|
|
1327
|
+
def.inclusive = false;
|
|
1328
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
1329
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1330
|
+
if (first) {
|
|
1331
|
+
return first(payload, ctx);
|
|
1332
|
+
}
|
|
1333
|
+
let async = false;
|
|
1334
|
+
const results = [];
|
|
1335
|
+
for (const option of def.options) {
|
|
1336
|
+
const result = option._zod.run({
|
|
1337
|
+
value: payload.value,
|
|
1338
|
+
issues: [],
|
|
1339
|
+
}, ctx);
|
|
1340
|
+
if (result instanceof Promise) {
|
|
1341
|
+
results.push(result);
|
|
1342
|
+
async = true;
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
results.push(result);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
if (!async)
|
|
1349
|
+
return handleExclusiveUnionResults(results, payload, inst, ctx);
|
|
1350
|
+
return Promise.all(results).then((results) => {
|
|
1351
|
+
return handleExclusiveUnionResults(results, payload, inst, ctx);
|
|
1352
|
+
});
|
|
1353
|
+
};
|
|
1354
|
+
});
|
|
1355
|
+
/** Returns the option whose discriminator claims `value`, or throws if ambiguous. */
|
|
1356
|
+
export function getDiscriminatedOption(union, value) {
|
|
1357
|
+
const internals = union._zod;
|
|
1358
|
+
let map = internals.bag.optionsMap;
|
|
1359
|
+
if (!map) {
|
|
1360
|
+
map = discriminatorMap(internals.def);
|
|
1361
|
+
internals.bag.optionsMap = map;
|
|
1362
|
+
}
|
|
1363
|
+
const option = map.get(value);
|
|
1364
|
+
if (option === null)
|
|
1365
|
+
throw new Error(`Ambiguous discriminator value "${String(value)}"`);
|
|
1366
|
+
return option;
|
|
1367
|
+
}
|
|
1368
|
+
function discriminatorMap(def) {
|
|
1369
|
+
const map = new Map();
|
|
1370
|
+
for (const option of def.options) {
|
|
1371
|
+
const values = option._zod.propValues?.[def.discriminator];
|
|
1372
|
+
if (!values || values.size === 0)
|
|
1373
|
+
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
1374
|
+
for (const value of values) {
|
|
1375
|
+
if (map.has(value)) {
|
|
1376
|
+
if (value !== undefined)
|
|
1377
|
+
throw new Error(`Duplicate discriminator value "${String(value)}"`);
|
|
1378
|
+
// keep the collision marked so a later member cannot reclaim it
|
|
1379
|
+
map.set(value, null);
|
|
1380
|
+
}
|
|
1381
|
+
else {
|
|
1382
|
+
map.set(value, option);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
return map;
|
|
1387
|
+
}
|
|
1388
|
+
export const $ZodDiscriminatedUnion =
|
|
1389
|
+
/*@__PURE__*/
|
|
1390
|
+
core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
1391
|
+
def.inclusive = false;
|
|
1392
|
+
$ZodUnion.init(inst, def);
|
|
1393
|
+
const _super = inst._zod.parse;
|
|
1394
|
+
util.defineLazyInternal(inst, "propValues", (zod) => {
|
|
1395
|
+
const propValues = {};
|
|
1396
|
+
let undefinedCount = 0;
|
|
1397
|
+
for (const option of zod.def.options) {
|
|
1398
|
+
const pv = option._zod.propValues;
|
|
1399
|
+
if (!pv || Object.keys(pv).length === 0)
|
|
1400
|
+
throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
|
|
1401
|
+
if (pv[zod.def.discriminator]?.has(undefined))
|
|
1402
|
+
undefinedCount++;
|
|
1403
|
+
for (const [k, v] of Object.entries(pv)) {
|
|
1404
|
+
if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
|
|
1405
|
+
util.assignProp(propValues, k, new Set());
|
|
1406
|
+
}
|
|
1407
|
+
for (const val of v) {
|
|
1408
|
+
propValues[k].add(val);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
if (!zod.def.unionFallback && undefinedCount > 1)
|
|
1413
|
+
propValues[zod.def.discriminator]?.delete(undefined);
|
|
1414
|
+
return propValues;
|
|
1415
|
+
});
|
|
1416
|
+
// Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies — are left to the map.
|
|
1417
|
+
def.options.forEach((option, i) => {
|
|
1418
|
+
const propShape = util.rawShape(option._zod.def);
|
|
1419
|
+
if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
|
|
1420
|
+
throw new Error(`Invalid discriminated union option at index "${i}"`);
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
const disc = util.cached(() => discriminatorMap(def));
|
|
1424
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1425
|
+
const input = payload.value;
|
|
1426
|
+
if (!util.isObject(input)) {
|
|
1427
|
+
payload.issues.push({
|
|
1428
|
+
code: "invalid_type",
|
|
1429
|
+
expected: "object",
|
|
1430
|
+
input,
|
|
1431
|
+
inst,
|
|
1432
|
+
});
|
|
1433
|
+
return payload;
|
|
1434
|
+
}
|
|
1435
|
+
const value = input?.[def.discriminator];
|
|
1436
|
+
const opt = disc.value.get(value);
|
|
1437
|
+
// forward metadata cannot choose an encoder for an absent tag
|
|
1438
|
+
if (opt && (value !== undefined || ctx.direction !== "backward")) {
|
|
1439
|
+
return opt._zod.run(payload, ctx);
|
|
1440
|
+
}
|
|
1441
|
+
// Fall back to union matching when the fast discriminator path fails:
|
|
1442
|
+
// - explicitly enabled via unionFallback, or
|
|
1443
|
+
// - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions
|
|
1444
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
1445
|
+
return _super(payload, ctx);
|
|
1446
|
+
}
|
|
1447
|
+
// no matching discriminator
|
|
1448
|
+
payload.issues.push({
|
|
1449
|
+
code: "invalid_union",
|
|
1450
|
+
errors: [],
|
|
1451
|
+
note: "No matching discriminator",
|
|
1452
|
+
discriminator: def.discriminator,
|
|
1453
|
+
options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
|
|
1454
|
+
input,
|
|
1455
|
+
path: [def.discriminator],
|
|
1456
|
+
inst,
|
|
1457
|
+
});
|
|
1458
|
+
return payload;
|
|
1459
|
+
};
|
|
1460
|
+
});
|
|
1461
|
+
export const $ZodIntersection = /*@__PURE__*/ core.$constructor("$ZodIntersection", (inst, def) => {
|
|
1462
|
+
$ZodType.init(inst, def);
|
|
1463
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1464
|
+
const input = payload.value;
|
|
1465
|
+
const left = def.left._zod.run({ value: input, issues: [] }, ctx);
|
|
1466
|
+
const right = def.right._zod.run({ value: input, issues: [] }, ctx);
|
|
1467
|
+
const async = left instanceof Promise || right instanceof Promise;
|
|
1468
|
+
if (async) {
|
|
1469
|
+
return Promise.all([left, right]).then(([left, right]) => {
|
|
1470
|
+
return handleIntersectionResults(payload, left, right);
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
return handleIntersectionResults(payload, left, right);
|
|
1474
|
+
};
|
|
1475
|
+
});
|
|
1476
|
+
export function mergeValues(a, b) {
|
|
1477
|
+
// const aType = parse.t(a);
|
|
1478
|
+
// const bType = parse.t(b);
|
|
1479
|
+
if (a === b) {
|
|
1480
|
+
return { valid: true, data: a };
|
|
1481
|
+
}
|
|
1482
|
+
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
1483
|
+
return { valid: true, data: a };
|
|
1484
|
+
}
|
|
1485
|
+
if (util.isPlainObject(a) && util.isPlainObject(b)) {
|
|
1486
|
+
const bKeys = Object.keys(b);
|
|
1487
|
+
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
1488
|
+
const newObj = { ...a, ...b };
|
|
1489
|
+
if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
|
|
1490
|
+
delete newObj.__proto__;
|
|
1491
|
+
for (const key of sharedKeys) {
|
|
1492
|
+
if (key === "__proto__")
|
|
1493
|
+
continue;
|
|
1494
|
+
const sharedValue = mergeValues(a[key], b[key]);
|
|
1495
|
+
if (!sharedValue.valid) {
|
|
1496
|
+
return {
|
|
1497
|
+
valid: false,
|
|
1498
|
+
mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
newObj[key] = sharedValue.data;
|
|
1502
|
+
}
|
|
1503
|
+
return { valid: true, data: newObj };
|
|
1504
|
+
}
|
|
1505
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
1506
|
+
if (a.length !== b.length) {
|
|
1507
|
+
return { valid: false, mergeErrorPath: [] };
|
|
1508
|
+
}
|
|
1509
|
+
const newArray = [];
|
|
1510
|
+
for (let index = 0; index < a.length; index++) {
|
|
1511
|
+
const itemA = a[index];
|
|
1512
|
+
const itemB = b[index];
|
|
1513
|
+
const sharedValue = mergeValues(itemA, itemB);
|
|
1514
|
+
if (!sharedValue.valid) {
|
|
1515
|
+
return {
|
|
1516
|
+
valid: false,
|
|
1517
|
+
mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
newArray.push(sharedValue.data);
|
|
1521
|
+
}
|
|
1522
|
+
return { valid: true, data: newArray };
|
|
1523
|
+
}
|
|
1524
|
+
return { valid: false, mergeErrorPath: [] };
|
|
1525
|
+
}
|
|
1526
|
+
function handleIntersectionResults(result, left, right) {
|
|
1527
|
+
// Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.
|
|
1528
|
+
const unrecKeys = new Map();
|
|
1529
|
+
let unrecIssue;
|
|
1530
|
+
const keyIssues = new Map();
|
|
1531
|
+
const collect = (iss, side) => {
|
|
1532
|
+
let keys;
|
|
1533
|
+
if (iss.code === "unrecognized_keys" && !iss.path?.length) {
|
|
1534
|
+
unrecIssue ?? (unrecIssue = iss);
|
|
1535
|
+
keys = iss.keys;
|
|
1536
|
+
}
|
|
1537
|
+
else if (iss.code === "invalid_key" && iss.origin === "record" && iss.path?.length === 1) {
|
|
1538
|
+
const k = String(iss.path[0]);
|
|
1539
|
+
if (!keyIssues.has(k))
|
|
1540
|
+
keyIssues.set(k, iss);
|
|
1541
|
+
keys = [k];
|
|
1542
|
+
}
|
|
1543
|
+
else {
|
|
1544
|
+
return false;
|
|
1545
|
+
}
|
|
1546
|
+
for (const k of keys) {
|
|
1547
|
+
if (!unrecKeys.has(k))
|
|
1548
|
+
unrecKeys.set(k, {});
|
|
1549
|
+
unrecKeys.get(k)[side] = true;
|
|
1550
|
+
}
|
|
1551
|
+
return true;
|
|
1552
|
+
};
|
|
1553
|
+
for (const iss of left.issues) {
|
|
1554
|
+
if (!collect(iss, "l"))
|
|
1555
|
+
result.issues.push(iss);
|
|
1556
|
+
}
|
|
1557
|
+
for (const iss of right.issues) {
|
|
1558
|
+
if (!collect(iss, "r"))
|
|
1559
|
+
result.issues.push(iss);
|
|
1560
|
+
}
|
|
1561
|
+
// Report only keys rejected by BOTH sides
|
|
1562
|
+
const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
|
|
1563
|
+
if (bothKeys.length) {
|
|
1564
|
+
const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];
|
|
1565
|
+
if (aggregated.length)
|
|
1566
|
+
result.issues.push({ ...unrecIssue, keys: aggregated });
|
|
1567
|
+
for (const k of bothKeys) {
|
|
1568
|
+
if (!aggregated.includes(k) && keyIssues.has(k))
|
|
1569
|
+
result.issues.push(keyIssues.get(k));
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
const merged = mergeValues(left.value, right.value);
|
|
1573
|
+
if (!merged.valid) {
|
|
1574
|
+
if (util.aborted(result))
|
|
1575
|
+
return result;
|
|
1576
|
+
throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
|
|
1577
|
+
}
|
|
1578
|
+
result.value = merged.data;
|
|
1579
|
+
return result;
|
|
1580
|
+
}
|
|
1581
|
+
export const $ZodTuple = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
|
|
1582
|
+
$ZodType.init(inst, def);
|
|
1583
|
+
const items = def.items;
|
|
1584
|
+
const memo = core.globalConfig.memoizer;
|
|
1585
|
+
memo?.attach(inst);
|
|
1586
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1587
|
+
const input = payload.value;
|
|
1588
|
+
if (!Array.isArray(input)) {
|
|
1589
|
+
payload.issues.push({
|
|
1590
|
+
input,
|
|
1591
|
+
inst,
|
|
1592
|
+
expected: "tuple",
|
|
1593
|
+
code: "invalid_type",
|
|
1594
|
+
});
|
|
1595
|
+
return payload;
|
|
1596
|
+
}
|
|
1597
|
+
payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
|
|
1598
|
+
const proms = [];
|
|
1599
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
1600
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
1601
|
+
if (!def.rest) {
|
|
1602
|
+
if (input.length < optinStart) {
|
|
1603
|
+
payload.issues.push({
|
|
1604
|
+
code: "too_small",
|
|
1605
|
+
minimum: optinStart,
|
|
1606
|
+
inclusive: true,
|
|
1607
|
+
input,
|
|
1608
|
+
inst,
|
|
1609
|
+
origin: "array",
|
|
1610
|
+
});
|
|
1611
|
+
return payload;
|
|
1612
|
+
}
|
|
1613
|
+
if (input.length > items.length) {
|
|
1614
|
+
payload.issues.push({
|
|
1615
|
+
code: "too_big",
|
|
1616
|
+
maximum: items.length,
|
|
1617
|
+
inclusive: true,
|
|
1618
|
+
input,
|
|
1619
|
+
inst,
|
|
1620
|
+
origin: "array",
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
// Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.
|
|
1625
|
+
const itemResults = new Array(items.length);
|
|
1626
|
+
// only tracked when there is a rest loop to skip
|
|
1627
|
+
const abortEarly = def.rest ? ctx?.abortEarly : undefined;
|
|
1628
|
+
let itemAborted = false;
|
|
1629
|
+
for (let i = 0; i < items.length; i++) {
|
|
1630
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
1631
|
+
if (r instanceof Promise) {
|
|
1632
|
+
proms.push(r.then((rr) => {
|
|
1633
|
+
itemResults[i] = rr;
|
|
1634
|
+
}));
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
itemResults[i] = r;
|
|
1638
|
+
if (abortEarly && !itemAborted && r.issues.length)
|
|
1639
|
+
itemAborted = util.aborted(r);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
// sound because rest is non-empty exactly when every fixed index is present, the one case handleTupleResults cannot discard an item's issues
|
|
1643
|
+
if (def.rest && !itemAborted) {
|
|
1644
|
+
let i = items.length - 1;
|
|
1645
|
+
const rest = input.slice(items.length);
|
|
1646
|
+
let seen = payload.issues.length;
|
|
1647
|
+
for (const el of rest) {
|
|
1648
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1649
|
+
if (util.aborted(payload, seen))
|
|
1650
|
+
break;
|
|
1651
|
+
seen = payload.issues.length;
|
|
1652
|
+
}
|
|
1653
|
+
i++;
|
|
1654
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
1655
|
+
if (result instanceof Promise) {
|
|
1656
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
1657
|
+
}
|
|
1658
|
+
else {
|
|
1659
|
+
handleTupleResult(result, payload, i);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
if (proms.length) {
|
|
1664
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
1665
|
+
}
|
|
1666
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
1667
|
+
};
|
|
1668
|
+
});
|
|
1669
|
+
function getTupleOptStart(items, key) {
|
|
1670
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
1671
|
+
// optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.
|
|
1672
|
+
const omittable = key === "optin" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === "optional";
|
|
1673
|
+
if (!omittable)
|
|
1674
|
+
return i + 1;
|
|
1675
|
+
}
|
|
1676
|
+
return 0;
|
|
1677
|
+
}
|
|
1678
|
+
function handleTupleResult(result, final, index) {
|
|
1679
|
+
if (result.issues.length) {
|
|
1680
|
+
final.issues.push(...util.prefixIssues(index, result.issues));
|
|
1681
|
+
}
|
|
1682
|
+
final.value[index] = result.value;
|
|
1683
|
+
}
|
|
1684
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
1685
|
+
// Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.
|
|
1686
|
+
for (let i = 0; i < items.length; i++) {
|
|
1687
|
+
const r = itemResults[i];
|
|
1688
|
+
const isPresent = i < input.length;
|
|
1689
|
+
// The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.
|
|
1690
|
+
if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
|
|
1691
|
+
final.value.length = i;
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
if (r.issues.length) {
|
|
1695
|
+
if (!isPresent && i >= optoutStart) {
|
|
1696
|
+
final.value.length = i;
|
|
1697
|
+
break;
|
|
1698
|
+
}
|
|
1699
|
+
final.issues.push(...util.prefixIssues(i, r.issues));
|
|
1700
|
+
}
|
|
1701
|
+
final.value[i] = r.value;
|
|
1702
|
+
}
|
|
1703
|
+
// Drop trailing slots that produced `undefined` for absent input
|
|
1704
|
+
// (the array analog of an absent optional key on an object). The
|
|
1705
|
+
// `i >= input.length` floor is critical: an explicit `undefined`
|
|
1706
|
+
// *inside* the input must be preserved even when the schema is
|
|
1707
|
+
// optional-out (e.g. `z.string().or(z.undefined())` accepting an
|
|
1708
|
+
// explicit undefined value).
|
|
1709
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
1710
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
|
|
1711
|
+
final.value.length = i;
|
|
1712
|
+
}
|
|
1713
|
+
else {
|
|
1714
|
+
break;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
return final;
|
|
1718
|
+
}
|
|
1719
|
+
export const $ZodRecord = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
|
|
1720
|
+
$ZodType.init(inst, def);
|
|
1721
|
+
const memo = core.globalConfig.memoizer;
|
|
1722
|
+
memo?.attach(inst);
|
|
1723
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1724
|
+
const input = payload.value;
|
|
1725
|
+
if (!util.isPlainObject(input)) {
|
|
1726
|
+
payload.issues.push({
|
|
1727
|
+
expected: "record",
|
|
1728
|
+
code: "invalid_type",
|
|
1729
|
+
input,
|
|
1730
|
+
inst,
|
|
1731
|
+
});
|
|
1732
|
+
return payload;
|
|
1733
|
+
}
|
|
1734
|
+
// no guard in either loop below: a record's invalid_key aborts but an enclosing intersection can reconcile it, so a stopped loop hides keys the sibling does not own and the intersection then rejects nothing
|
|
1735
|
+
const proms = [];
|
|
1736
|
+
const values = def.keyType._zod.values;
|
|
1737
|
+
if (values && !def.partial) {
|
|
1738
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
1739
|
+
const recordKeys = new Set();
|
|
1740
|
+
for (const key of values) {
|
|
1741
|
+
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
1742
|
+
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
1743
|
+
// A declared __proto__ is stripped but is not an unrecognized key.
|
|
1744
|
+
if (key === "__proto__")
|
|
1745
|
+
continue;
|
|
1746
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
1747
|
+
if (keyResult instanceof Promise) {
|
|
1748
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
1749
|
+
}
|
|
1750
|
+
if (keyResult.issues.length) {
|
|
1751
|
+
payload.issues.push({
|
|
1752
|
+
code: "invalid_key",
|
|
1753
|
+
origin: "record",
|
|
1754
|
+
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
1755
|
+
input: key,
|
|
1756
|
+
path: [key],
|
|
1757
|
+
inst,
|
|
1758
|
+
});
|
|
1759
|
+
continue;
|
|
1760
|
+
}
|
|
1761
|
+
const outKey = keyResult.value;
|
|
1762
|
+
if (outKey === "__proto__")
|
|
1763
|
+
continue;
|
|
1764
|
+
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
1765
|
+
if (result instanceof Promise) {
|
|
1766
|
+
proms.push(result.then((result) => {
|
|
1767
|
+
if (result.issues.length) {
|
|
1768
|
+
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
1769
|
+
}
|
|
1770
|
+
payload.value[outKey] = result.value;
|
|
1771
|
+
}));
|
|
1772
|
+
}
|
|
1773
|
+
else {
|
|
1774
|
+
if (result.issues.length) {
|
|
1775
|
+
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
1776
|
+
}
|
|
1777
|
+
payload.value[outKey] = result.value;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
let unrecognized;
|
|
1782
|
+
for (const key in input) {
|
|
1783
|
+
if (!recordKeys.has(key)) {
|
|
1784
|
+
if (def.mode === "loose") {
|
|
1785
|
+
// skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into
|
|
1786
|
+
if (key === "__proto__")
|
|
1787
|
+
continue;
|
|
1788
|
+
payload.value[key] = input[key];
|
|
1789
|
+
}
|
|
1790
|
+
else {
|
|
1791
|
+
unrecognized = unrecognized ?? [];
|
|
1792
|
+
unrecognized.push(key);
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
if (unrecognized && unrecognized.length > 0) {
|
|
1797
|
+
payload.issues.push({
|
|
1798
|
+
code: "unrecognized_keys",
|
|
1799
|
+
input,
|
|
1800
|
+
inst,
|
|
1801
|
+
keys: unrecognized,
|
|
1802
|
+
continue: true,
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
else {
|
|
1807
|
+
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
1808
|
+
// An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.
|
|
1809
|
+
let unrecognized;
|
|
1810
|
+
// Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()
|
|
1811
|
+
for (const key of Reflect.ownKeys(input)) {
|
|
1812
|
+
if (key === "__proto__")
|
|
1813
|
+
continue;
|
|
1814
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
1815
|
+
continue;
|
|
1816
|
+
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
1817
|
+
if (keyResult instanceof Promise) {
|
|
1818
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
1819
|
+
}
|
|
1820
|
+
// Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
|
|
1821
|
+
const checkNumericKey = typeof key === "string" && regexes.number.test(key) && keyResult.issues.length;
|
|
1822
|
+
if (checkNumericKey) {
|
|
1823
|
+
const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
|
|
1824
|
+
if (retryResult instanceof Promise) {
|
|
1825
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
1826
|
+
}
|
|
1827
|
+
if (retryResult.issues.length === 0) {
|
|
1828
|
+
keyResult = retryResult;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
if (keyResult.issues.length) {
|
|
1832
|
+
if (def.mode === "loose") {
|
|
1833
|
+
// Pass through unchanged
|
|
1834
|
+
payload.value[key] = input[key];
|
|
1835
|
+
}
|
|
1836
|
+
else if (values) {
|
|
1837
|
+
unrecognized = unrecognized ?? [];
|
|
1838
|
+
unrecognized.push(key);
|
|
1839
|
+
}
|
|
1840
|
+
else {
|
|
1841
|
+
// Default "strict" behavior: error on invalid key
|
|
1842
|
+
payload.issues.push({
|
|
1843
|
+
code: "invalid_key",
|
|
1844
|
+
origin: "record",
|
|
1845
|
+
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
1846
|
+
input: key,
|
|
1847
|
+
path: [key],
|
|
1848
|
+
inst,
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
continue;
|
|
1852
|
+
}
|
|
1853
|
+
// the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under
|
|
1854
|
+
const outKey = keyResult.value;
|
|
1855
|
+
if (outKey === "__proto__")
|
|
1856
|
+
continue;
|
|
1857
|
+
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
1858
|
+
if (result instanceof Promise) {
|
|
1859
|
+
proms.push(result.then((result) => {
|
|
1860
|
+
if (result.issues.length) {
|
|
1861
|
+
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
1862
|
+
}
|
|
1863
|
+
payload.value[outKey] = result.value;
|
|
1864
|
+
}));
|
|
1865
|
+
}
|
|
1866
|
+
else {
|
|
1867
|
+
if (result.issues.length) {
|
|
1868
|
+
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
1869
|
+
}
|
|
1870
|
+
payload.value[outKey] = result.value;
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
if (unrecognized && unrecognized.length > 0) {
|
|
1874
|
+
payload.issues.push({
|
|
1875
|
+
code: "unrecognized_keys",
|
|
1876
|
+
input,
|
|
1877
|
+
inst,
|
|
1878
|
+
keys: unrecognized,
|
|
1879
|
+
continue: true,
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
if (proms.length) {
|
|
1884
|
+
return Promise.all(proms).then(() => payload);
|
|
1885
|
+
}
|
|
1886
|
+
return payload;
|
|
1887
|
+
};
|
|
1888
|
+
});
|
|
1889
|
+
export const $ZodMap = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
|
|
1890
|
+
$ZodType.init(inst, def);
|
|
1891
|
+
const memo = core.globalConfig.memoizer;
|
|
1892
|
+
memo?.attach(inst);
|
|
1893
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1894
|
+
const input = payload.value;
|
|
1895
|
+
if (!(input instanceof Map)) {
|
|
1896
|
+
payload.issues.push({
|
|
1897
|
+
expected: "map",
|
|
1898
|
+
code: "invalid_type",
|
|
1899
|
+
input,
|
|
1900
|
+
inst,
|
|
1901
|
+
});
|
|
1902
|
+
return payload;
|
|
1903
|
+
}
|
|
1904
|
+
const proms = [];
|
|
1905
|
+
payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();
|
|
1906
|
+
const abortEarly = ctx?.abortEarly;
|
|
1907
|
+
let seen = payload.issues.length;
|
|
1908
|
+
for (const [key, value] of input) {
|
|
1909
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1910
|
+
if (util.aborted(payload, seen))
|
|
1911
|
+
break;
|
|
1912
|
+
seen = payload.issues.length;
|
|
1913
|
+
}
|
|
1914
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
1915
|
+
const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
|
|
1916
|
+
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
1917
|
+
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
|
|
1918
|
+
handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
|
|
1919
|
+
}));
|
|
1920
|
+
}
|
|
1921
|
+
else {
|
|
1922
|
+
handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
if (proms.length)
|
|
1926
|
+
return Promise.all(proms).then(() => payload);
|
|
1927
|
+
return payload;
|
|
1928
|
+
};
|
|
1929
|
+
capSize(inst, mapSize);
|
|
1930
|
+
});
|
|
1931
|
+
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
1932
|
+
if (keyResult.issues.length) {
|
|
1933
|
+
if (util.propertyKeyTypes.has(typeof key)) {
|
|
1934
|
+
final.issues.push(...util.prefixIssues(key, keyResult.issues));
|
|
1935
|
+
}
|
|
1936
|
+
else {
|
|
1937
|
+
final.issues.push({
|
|
1938
|
+
code: "invalid_key",
|
|
1939
|
+
origin: "map",
|
|
1940
|
+
input,
|
|
1941
|
+
inst,
|
|
1942
|
+
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
if (valueResult.issues.length) {
|
|
1947
|
+
if (util.propertyKeyTypes.has(typeof key)) {
|
|
1948
|
+
final.issues.push(...util.prefixIssues(key, valueResult.issues));
|
|
1949
|
+
}
|
|
1950
|
+
else {
|
|
1951
|
+
final.issues.push({
|
|
1952
|
+
origin: "map",
|
|
1953
|
+
code: "invalid_element",
|
|
1954
|
+
input,
|
|
1955
|
+
inst,
|
|
1956
|
+
key: key,
|
|
1957
|
+
issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
final.value.set(keyResult.value, valueResult.value);
|
|
1962
|
+
}
|
|
1963
|
+
export const $ZodSet = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
|
|
1964
|
+
$ZodType.init(inst, def);
|
|
1965
|
+
const memo = core.globalConfig.memoizer;
|
|
1966
|
+
memo?.attach(inst);
|
|
1967
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1968
|
+
const input = payload.value;
|
|
1969
|
+
if (!(input instanceof Set)) {
|
|
1970
|
+
payload.issues.push({
|
|
1971
|
+
input,
|
|
1972
|
+
inst,
|
|
1973
|
+
expected: "set",
|
|
1974
|
+
code: "invalid_type",
|
|
1975
|
+
});
|
|
1976
|
+
return payload;
|
|
1977
|
+
}
|
|
1978
|
+
const proms = [];
|
|
1979
|
+
payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();
|
|
1980
|
+
const abortEarly = ctx?.abortEarly;
|
|
1981
|
+
let seen = payload.issues.length;
|
|
1982
|
+
for (const item of input) {
|
|
1983
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1984
|
+
if (util.aborted(payload, seen))
|
|
1985
|
+
break;
|
|
1986
|
+
seen = payload.issues.length;
|
|
1987
|
+
}
|
|
1988
|
+
const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
|
|
1989
|
+
if (result instanceof Promise) {
|
|
1990
|
+
proms.push(result.then((result) => handleSetResult(result, payload)));
|
|
1991
|
+
}
|
|
1992
|
+
else
|
|
1993
|
+
handleSetResult(result, payload);
|
|
1994
|
+
}
|
|
1995
|
+
if (proms.length)
|
|
1996
|
+
return Promise.all(proms).then(() => payload);
|
|
1997
|
+
return payload;
|
|
1998
|
+
};
|
|
1999
|
+
capSize(inst, setSize);
|
|
2000
|
+
});
|
|
2001
|
+
function handleSetResult(result, final) {
|
|
2002
|
+
if (result.issues.length) {
|
|
2003
|
+
final.issues.push(...result.issues);
|
|
2004
|
+
}
|
|
2005
|
+
final.value.add(result.value);
|
|
2006
|
+
}
|
|
2007
|
+
export const $ZodEnum = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
|
|
2008
|
+
$ZodType.init(inst, def);
|
|
2009
|
+
const values = util.getEnumValues(def.entries);
|
|
2010
|
+
const valuesSet = new Set(values);
|
|
2011
|
+
inst._zod.values = valuesSet;
|
|
2012
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2013
|
+
const patternValues = util.getEnumValues(zod.def.entries).filter((k) => util.propertyKeyTypes.has(typeof k));
|
|
2014
|
+
// unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
|
|
2015
|
+
return new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
2016
|
+
});
|
|
2017
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2018
|
+
const input = payload.value;
|
|
2019
|
+
if (valuesSet.has(input)) {
|
|
2020
|
+
return payload;
|
|
2021
|
+
}
|
|
2022
|
+
payload.issues.push({
|
|
2023
|
+
code: "invalid_value",
|
|
2024
|
+
values,
|
|
2025
|
+
input,
|
|
2026
|
+
inst,
|
|
2027
|
+
});
|
|
2028
|
+
return payload;
|
|
2029
|
+
};
|
|
2030
|
+
});
|
|
2031
|
+
export const $ZodLiteral = /*@__PURE__*/ core.$constructor("$ZodLiteral", (inst, def) => {
|
|
2032
|
+
$ZodType.init(inst, def);
|
|
2033
|
+
const values = new Set(def.values);
|
|
2034
|
+
inst._zod.values = values;
|
|
2035
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2036
|
+
const vals = zod.def.values;
|
|
2037
|
+
// unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
|
|
2038
|
+
return new RegExp(vals.length
|
|
2039
|
+
? `^(${vals
|
|
2040
|
+
.map((o) => typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o))
|
|
2041
|
+
.join("|")})$`
|
|
2042
|
+
: "^[^\\s\\S]$");
|
|
2043
|
+
});
|
|
2044
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2045
|
+
const input = payload.value;
|
|
2046
|
+
if (values.has(input)) {
|
|
2047
|
+
return payload;
|
|
2048
|
+
}
|
|
2049
|
+
payload.issues.push({
|
|
2050
|
+
code: "invalid_value",
|
|
2051
|
+
values: def.values,
|
|
2052
|
+
input,
|
|
2053
|
+
inst,
|
|
2054
|
+
});
|
|
2055
|
+
return payload;
|
|
2056
|
+
};
|
|
2057
|
+
});
|
|
2058
|
+
export const $ZodFile = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
|
|
2059
|
+
$ZodType.init(inst, def);
|
|
2060
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2061
|
+
const input = payload.value;
|
|
2062
|
+
// @ts-ignore
|
|
2063
|
+
if (input instanceof File)
|
|
2064
|
+
return payload;
|
|
2065
|
+
payload.issues.push({
|
|
2066
|
+
expected: "file",
|
|
2067
|
+
code: "invalid_type",
|
|
2068
|
+
input,
|
|
2069
|
+
inst,
|
|
2070
|
+
});
|
|
2071
|
+
return payload;
|
|
2072
|
+
};
|
|
2073
|
+
});
|
|
2074
|
+
export const $ZodTransform = /*@__PURE__*/ core.$constructor("$ZodTransform", (inst, def) => {
|
|
2075
|
+
$ZodType.init(inst, def);
|
|
2076
|
+
inst._zod.optin = "optional";
|
|
2077
|
+
core.globalConfig.memoizer?.guard(inst);
|
|
2078
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2079
|
+
if (ctx.direction === "backward") {
|
|
2080
|
+
throw new core.$ZodEncodeError(inst.constructor.name);
|
|
2081
|
+
}
|
|
2082
|
+
const _out = def.transform(payload.value, payload);
|
|
2083
|
+
if (ctx.async) {
|
|
2084
|
+
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
2085
|
+
return output.then((output) => {
|
|
2086
|
+
payload.value = output;
|
|
2087
|
+
return payload;
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
if (_out instanceof Promise) {
|
|
2091
|
+
throw new core.$ZodAsyncError();
|
|
2092
|
+
}
|
|
2093
|
+
payload.value = _out;
|
|
2094
|
+
return payload;
|
|
2095
|
+
};
|
|
2096
|
+
});
|
|
2097
|
+
function handleOptionalResult(payload, result) {
|
|
2098
|
+
// A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.
|
|
2099
|
+
payload.value = result.issues.length ? undefined : result.value;
|
|
2100
|
+
return payload;
|
|
2101
|
+
}
|
|
2102
|
+
export const $ZodOptional = /*@__PURE__*/ core.$constructor("$ZodOptional", (inst, def) => {
|
|
2103
|
+
$ZodType.init(inst, def);
|
|
2104
|
+
// .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.
|
|
2105
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2106
|
+
inst._zod.optout = "optional";
|
|
2107
|
+
util.defineLazyInternal(inst, "values", (zod) => {
|
|
2108
|
+
const values = zod.def.innerType._zod.values;
|
|
2109
|
+
return values ? new Set([...values, undefined]) : undefined;
|
|
2110
|
+
});
|
|
2111
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2112
|
+
const pattern = zod.def.innerType._zod.pattern;
|
|
2113
|
+
return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
|
|
2114
|
+
});
|
|
2115
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2116
|
+
if (payload.value === undefined) {
|
|
2117
|
+
// Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.
|
|
2118
|
+
if (def.innerType._zod.optin !== "defaulted")
|
|
2119
|
+
return payload;
|
|
2120
|
+
// Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.
|
|
2121
|
+
const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
|
|
2122
|
+
if (result instanceof Promise)
|
|
2123
|
+
return result.then((result) => handleOptionalResult(payload, result));
|
|
2124
|
+
return handleOptionalResult(payload, result);
|
|
2125
|
+
}
|
|
2126
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2127
|
+
};
|
|
2128
|
+
});
|
|
2129
|
+
export const $ZodExactOptional = /*@__PURE__*/ core.$constructor("$ZodExactOptional", (inst, def) => {
|
|
2130
|
+
// Call parent init - inherits optin/optout = "optional"
|
|
2131
|
+
$ZodOptional.init(inst, def);
|
|
2132
|
+
// Override values/pattern to NOT add undefined
|
|
2133
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2134
|
+
util.defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
|
|
2135
|
+
// Override parse to just delegate (no undefined handling)
|
|
2136
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2137
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2138
|
+
};
|
|
2139
|
+
});
|
|
2140
|
+
export const $ZodNullable = /*@__PURE__*/ core.$constructor("$ZodNullable", (inst, def) => {
|
|
2141
|
+
$ZodType.init(inst, def);
|
|
2142
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
|
|
2143
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
2144
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2145
|
+
const pattern = zod.def.innerType._zod.pattern;
|
|
2146
|
+
return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
|
|
2147
|
+
});
|
|
2148
|
+
util.defineLazyInternal(inst, "values", (zod) => {
|
|
2149
|
+
return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;
|
|
2150
|
+
});
|
|
2151
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2152
|
+
// Forward direction (decode): allow null to pass through
|
|
2153
|
+
if (payload.value === null)
|
|
2154
|
+
return payload;
|
|
2155
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2156
|
+
};
|
|
2157
|
+
});
|
|
2158
|
+
export const $ZodDefault = /*@__PURE__*/ core.$constructor("$ZodDefault", (inst, def) => {
|
|
2159
|
+
$ZodType.init(inst, def);
|
|
2160
|
+
// inst._zod.qin = "true";
|
|
2161
|
+
inst._zod.optin = "defaulted";
|
|
2162
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2163
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2164
|
+
if (ctx.direction === "backward") {
|
|
2165
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2166
|
+
}
|
|
2167
|
+
// Forward direction (decode): apply defaults for undefined input
|
|
2168
|
+
if (payload.value === undefined) {
|
|
2169
|
+
payload.value = def.defaultValue;
|
|
2170
|
+
/**
|
|
2171
|
+
* $ZodDefault returns the default value immediately in forward direction.
|
|
2172
|
+
* It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
|
|
2173
|
+
return payload;
|
|
2174
|
+
}
|
|
2175
|
+
// Forward direction: continue with default handling
|
|
2176
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2177
|
+
if (result instanceof Promise) {
|
|
2178
|
+
return result.then((result) => handleDefaultResult(result, def));
|
|
2179
|
+
}
|
|
2180
|
+
return handleDefaultResult(result, def);
|
|
2181
|
+
};
|
|
2182
|
+
});
|
|
2183
|
+
function handleDefaultResult(payload, def) {
|
|
2184
|
+
if (payload.value === undefined) {
|
|
2185
|
+
payload.value = def.defaultValue;
|
|
2186
|
+
}
|
|
2187
|
+
return payload;
|
|
2188
|
+
}
|
|
2189
|
+
export const $ZodPrefault = /*@__PURE__*/ core.$constructor("$ZodPrefault", (inst, def) => {
|
|
2190
|
+
$ZodType.init(inst, def);
|
|
2191
|
+
inst._zod.optin = "defaulted";
|
|
2192
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2193
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2194
|
+
if (ctx.direction === "backward") {
|
|
2195
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2196
|
+
}
|
|
2197
|
+
// Forward direction (decode): apply prefault for undefined input
|
|
2198
|
+
if (payload.value === undefined) {
|
|
2199
|
+
payload.value = def.defaultValue;
|
|
2200
|
+
}
|
|
2201
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2202
|
+
};
|
|
2203
|
+
});
|
|
2204
|
+
export const $ZodNonOptional = /*@__PURE__*/ core.$constructor("$ZodNonOptional", (inst, def) => {
|
|
2205
|
+
$ZodType.init(inst, def);
|
|
2206
|
+
util.defineLazyInternal(inst, "values", (zod) => {
|
|
2207
|
+
const v = zod.def.innerType._zod.values;
|
|
2208
|
+
return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
|
|
2209
|
+
});
|
|
2210
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2211
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2212
|
+
if (result instanceof Promise) {
|
|
2213
|
+
return result.then((result) => handleNonOptionalResult(result, inst));
|
|
2214
|
+
}
|
|
2215
|
+
return handleNonOptionalResult(result, inst);
|
|
2216
|
+
};
|
|
2217
|
+
});
|
|
2218
|
+
function handleNonOptionalResult(payload, inst) {
|
|
2219
|
+
if (!payload.issues.length && payload.value === undefined) {
|
|
2220
|
+
payload.issues.push({
|
|
2221
|
+
code: "invalid_type",
|
|
2222
|
+
expected: "nonoptional",
|
|
2223
|
+
input: payload.value,
|
|
2224
|
+
inst,
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
return payload;
|
|
2228
|
+
}
|
|
2229
|
+
export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst, def) => {
|
|
2230
|
+
$ZodType.init(inst, def);
|
|
2231
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2232
|
+
if (ctx.direction === "backward") {
|
|
2233
|
+
throw new core.$ZodEncodeError("ZodSuccess");
|
|
2234
|
+
}
|
|
2235
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2236
|
+
if (result instanceof Promise) {
|
|
2237
|
+
return result.then((result) => {
|
|
2238
|
+
payload.value = result.issues.length === 0;
|
|
2239
|
+
return payload;
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
payload.value = result.issues.length === 0;
|
|
2243
|
+
return payload;
|
|
2244
|
+
};
|
|
2245
|
+
});
|
|
2246
|
+
function handleCatchResult(payload, result, def, ctx) {
|
|
2247
|
+
if (!result.issues.length) {
|
|
2248
|
+
payload.value = result.value;
|
|
2249
|
+
// The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.
|
|
2250
|
+
if (result.memo)
|
|
2251
|
+
payload.memo = true;
|
|
2252
|
+
return payload;
|
|
2253
|
+
}
|
|
2254
|
+
// Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.
|
|
2255
|
+
payload.value = def.catchValue({
|
|
2256
|
+
...result,
|
|
2257
|
+
value: payload.value,
|
|
2258
|
+
error: {
|
|
2259
|
+
issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
2260
|
+
},
|
|
2261
|
+
input: payload.value,
|
|
2262
|
+
});
|
|
2263
|
+
return payload;
|
|
2264
|
+
}
|
|
2265
|
+
export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
|
|
2266
|
+
$ZodType.init(inst, def);
|
|
2267
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
|
|
2268
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
|
|
2269
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2270
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2271
|
+
if (ctx.direction === "backward") {
|
|
2272
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2273
|
+
}
|
|
2274
|
+
// Forward direction (decode): apply catch logic
|
|
2275
|
+
const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
|
|
2276
|
+
if (result instanceof Promise) {
|
|
2277
|
+
return result.then((result) => handleCatchResult(payload, result, def, ctx));
|
|
2278
|
+
}
|
|
2279
|
+
return handleCatchResult(payload, result, def, ctx);
|
|
2280
|
+
};
|
|
2281
|
+
});
|
|
2282
|
+
export const $ZodNaN = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
|
|
2283
|
+
$ZodType.init(inst, def);
|
|
2284
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2285
|
+
if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
|
|
2286
|
+
payload.issues.push({
|
|
2287
|
+
input: payload.value,
|
|
2288
|
+
inst,
|
|
2289
|
+
expected: "nan",
|
|
2290
|
+
code: "invalid_type",
|
|
2291
|
+
});
|
|
2292
|
+
return payload;
|
|
2293
|
+
}
|
|
2294
|
+
return payload;
|
|
2295
|
+
};
|
|
2296
|
+
});
|
|
2297
|
+
export const $ZodPipe = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
|
|
2298
|
+
$ZodType.init(inst, def);
|
|
2299
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
|
|
2300
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
|
|
2301
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
|
|
2302
|
+
util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
|
|
2303
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2304
|
+
if (ctx.direction === "backward") {
|
|
2305
|
+
const right = def.out._zod.run(payload, ctx);
|
|
2306
|
+
if (right instanceof Promise) {
|
|
2307
|
+
return right.then((right) => handlePipeResult(right, def.in, ctx));
|
|
2308
|
+
}
|
|
2309
|
+
return handlePipeResult(right, def.in, ctx);
|
|
2310
|
+
}
|
|
2311
|
+
const left = def.in._zod.run(payload, ctx);
|
|
2312
|
+
if (left instanceof Promise) {
|
|
2313
|
+
return left.then((left) => handlePipeResult(left, def.out, ctx));
|
|
2314
|
+
}
|
|
2315
|
+
return handlePipeResult(left, def.out, ctx);
|
|
2316
|
+
};
|
|
2317
|
+
});
|
|
2318
|
+
function handlePipeResult(left, next, ctx) {
|
|
2319
|
+
// Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.
|
|
2320
|
+
if (left.issues.some((iss) => iss.code !== "unrecognized_keys")) {
|
|
2321
|
+
// prevent further checks
|
|
2322
|
+
left.aborted = true;
|
|
2323
|
+
return left;
|
|
2324
|
+
}
|
|
2325
|
+
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
2326
|
+
}
|
|
2327
|
+
export const $ZodCodec = /*@__PURE__*/ core.$constructor("$ZodCodec", (inst, def) => {
|
|
2328
|
+
$ZodType.init(inst, def);
|
|
2329
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
|
|
2330
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
|
|
2331
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
|
|
2332
|
+
util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
|
|
2333
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2334
|
+
const direction = ctx.direction || "forward";
|
|
2335
|
+
if (direction === "forward") {
|
|
2336
|
+
const left = def.in._zod.run(payload, ctx);
|
|
2337
|
+
if (left instanceof Promise) {
|
|
2338
|
+
return left.then((left) => handleCodecAResult(left, def, ctx));
|
|
2339
|
+
}
|
|
2340
|
+
return handleCodecAResult(left, def, ctx);
|
|
2341
|
+
}
|
|
2342
|
+
else {
|
|
2343
|
+
const right = def.out._zod.run(payload, ctx);
|
|
2344
|
+
if (right instanceof Promise) {
|
|
2345
|
+
return right.then((right) => handleCodecAResult(right, def, ctx));
|
|
2346
|
+
}
|
|
2347
|
+
return handleCodecAResult(right, def, ctx);
|
|
2348
|
+
}
|
|
2349
|
+
};
|
|
2350
|
+
});
|
|
2351
|
+
function handleCodecAResult(result, def, ctx) {
|
|
2352
|
+
if (result.issues.length) {
|
|
2353
|
+
// prevent further checks
|
|
2354
|
+
result.aborted = true;
|
|
2355
|
+
return result;
|
|
2356
|
+
}
|
|
2357
|
+
const direction = ctx.direction || "forward";
|
|
2358
|
+
if (direction === "forward") {
|
|
2359
|
+
const transformed = def.transform(result.value, result);
|
|
2360
|
+
if (transformed instanceof Promise) {
|
|
2361
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
|
|
2362
|
+
}
|
|
2363
|
+
return handleCodecTxResult(result, transformed, def.out, ctx);
|
|
2364
|
+
}
|
|
2365
|
+
else {
|
|
2366
|
+
const transformed = def.reverseTransform(result.value, result);
|
|
2367
|
+
if (transformed instanceof Promise) {
|
|
2368
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
|
|
2369
|
+
}
|
|
2370
|
+
return handleCodecTxResult(result, transformed, def.in, ctx);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
2374
|
+
// Check if transform added any issues
|
|
2375
|
+
if (left.issues.length) {
|
|
2376
|
+
left.aborted = true;
|
|
2377
|
+
return left;
|
|
2378
|
+
}
|
|
2379
|
+
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
2380
|
+
}
|
|
2381
|
+
export const $ZodPreprocess = /*@__PURE__*/ core.$constructor("$ZodPreprocess", (inst, def) => {
|
|
2382
|
+
$ZodPipe.init(inst, def);
|
|
2383
|
+
});
|
|
2384
|
+
export const $ZodReadonly = /*@__PURE__*/ core.$constructor("$ZodReadonly", (inst, def) => {
|
|
2385
|
+
$ZodType.init(inst, def);
|
|
2386
|
+
util.defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
|
|
2387
|
+
util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
|
|
2388
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType?._zod?.optin);
|
|
2389
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType?._zod?.optout);
|
|
2390
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2391
|
+
if (ctx.direction === "backward") {
|
|
2392
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2393
|
+
}
|
|
2394
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2395
|
+
if (result instanceof Promise) {
|
|
2396
|
+
return result.then(handleReadonlyResult);
|
|
2397
|
+
}
|
|
2398
|
+
return handleReadonlyResult(result);
|
|
2399
|
+
};
|
|
2400
|
+
});
|
|
2401
|
+
function handleReadonlyResult(payload) {
|
|
2402
|
+
// A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.
|
|
2403
|
+
if (!payload.memo)
|
|
2404
|
+
payload.value = Object.freeze(payload.value);
|
|
2405
|
+
return payload;
|
|
2406
|
+
}
|
|
2407
|
+
// a leaf's pattern source with its own checks folded in: the last pattern-carrying check wins, else length bounds narrow the catch-all, else an integer format narrows the number form. the fold lives here instead of on `_zod.pattern` so a bundle without template literals never pays for it
|
|
2408
|
+
function leafPattern(schema) {
|
|
2409
|
+
const def = schema._zod.def;
|
|
2410
|
+
let pattern = def.pattern;
|
|
2411
|
+
let isInt = !!def.format?.includes("int");
|
|
2412
|
+
let minimum;
|
|
2413
|
+
let maximum;
|
|
2414
|
+
for (const ch of def.checks ?? []) {
|
|
2415
|
+
const d = ch._zod.def;
|
|
2416
|
+
if (d.pattern)
|
|
2417
|
+
pattern = d.pattern;
|
|
2418
|
+
isInt || (isInt = !!d.format?.includes("int"));
|
|
2419
|
+
const lo = d.minimum ?? d.length;
|
|
2420
|
+
const hi = d.maximum ?? d.length;
|
|
2421
|
+
if (lo !== undefined && (minimum === undefined || lo > minimum))
|
|
2422
|
+
minimum = lo;
|
|
2423
|
+
if (hi !== undefined && (maximum === undefined || hi < maximum))
|
|
2424
|
+
maximum = hi;
|
|
2425
|
+
}
|
|
2426
|
+
if (pattern)
|
|
2427
|
+
return pattern.source;
|
|
2428
|
+
// an empty range matches nothing at runtime, and `{8,5}` is not a legal quantifier
|
|
2429
|
+
if (minimum !== undefined && maximum !== undefined && minimum > maximum)
|
|
2430
|
+
return "(?!)";
|
|
2431
|
+
if (minimum !== undefined || maximum !== undefined)
|
|
2432
|
+
return regexes.string({ minimum, maximum }).source;
|
|
2433
|
+
const own = schema._zod.pattern;
|
|
2434
|
+
return (isInt && own === regexes.number ? regexes.integer : own)?.source;
|
|
2435
|
+
}
|
|
2436
|
+
// a part's pattern source. a wrapper's pattern embeds its inner pattern's source verbatim, so the folded form is substituted in place without knowing the wrapper's own composition; a union's options are joined the way the union builds its own pattern
|
|
2437
|
+
function partPattern(schema) {
|
|
2438
|
+
const def = schema._zod.def;
|
|
2439
|
+
const own = schema._zod.pattern?.source;
|
|
2440
|
+
// lazy resolves its inner on the internals, not the def
|
|
2441
|
+
const inner = def.innerType ?? schema._zod.innerType;
|
|
2442
|
+
if (inner) {
|
|
2443
|
+
const before = inner._zod.pattern?.source;
|
|
2444
|
+
const after = partPattern(inner);
|
|
2445
|
+
if (own && before && after && after !== before) {
|
|
2446
|
+
return own.replace(util.cleanRegex(before), () => util.cleanRegex(after));
|
|
2447
|
+
}
|
|
2448
|
+
return own;
|
|
2449
|
+
}
|
|
2450
|
+
if (def.options) {
|
|
2451
|
+
const sources = def.options.map(partPattern);
|
|
2452
|
+
if (sources.every(Boolean))
|
|
2453
|
+
return `^(${sources.map((s) => util.cleanRegex(s)).join("|")})$`;
|
|
2454
|
+
}
|
|
2455
|
+
return leafPattern(schema);
|
|
2456
|
+
}
|
|
2457
|
+
export const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("$ZodTemplateLiteral", (inst, def) => {
|
|
2458
|
+
$ZodType.init(inst, def);
|
|
2459
|
+
const regexParts = [];
|
|
2460
|
+
for (const part of def.parts) {
|
|
2461
|
+
if (typeof part === "object" && part !== null) {
|
|
2462
|
+
// is Zod schema
|
|
2463
|
+
const source = partPattern(part);
|
|
2464
|
+
if (!source) {
|
|
2465
|
+
throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
|
|
2466
|
+
}
|
|
2467
|
+
regexParts.push(util.cleanRegex(source));
|
|
2468
|
+
}
|
|
2469
|
+
else if (part === null || util.primitiveTypes.has(typeof part)) {
|
|
2470
|
+
regexParts.push(util.escapeRegex(`${part}`));
|
|
2471
|
+
}
|
|
2472
|
+
else {
|
|
2473
|
+
throw new Error(`Invalid template literal part: ${part}`);
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
|
|
2477
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2478
|
+
if (typeof payload.value !== "string") {
|
|
2479
|
+
payload.issues.push({
|
|
2480
|
+
input: payload.value,
|
|
2481
|
+
inst,
|
|
2482
|
+
expected: "string",
|
|
2483
|
+
code: "invalid_type",
|
|
2484
|
+
});
|
|
2485
|
+
return payload;
|
|
2486
|
+
}
|
|
2487
|
+
inst._zod.pattern.lastIndex = 0;
|
|
2488
|
+
if (!inst._zod.pattern.test(payload.value)) {
|
|
2489
|
+
payload.issues.push({
|
|
2490
|
+
input: payload.value,
|
|
2491
|
+
inst,
|
|
2492
|
+
code: "invalid_format",
|
|
2493
|
+
format: def.format ?? "template_literal",
|
|
2494
|
+
pattern: inst._zod.pattern.source,
|
|
2495
|
+
});
|
|
2496
|
+
return payload;
|
|
2497
|
+
}
|
|
2498
|
+
return payload;
|
|
2499
|
+
};
|
|
2500
|
+
});
|
|
2501
|
+
export const $ZodFunction = /*@__PURE__*/ core.$constructor("$ZodFunction", (inst, def) => {
|
|
2502
|
+
$ZodType.init(inst, def);
|
|
2503
|
+
// Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.
|
|
2504
|
+
Object.defineProperty(inst, "_def", { value: def });
|
|
2505
|
+
inst._zod.def = def;
|
|
2506
|
+
inst.implement = (func) => {
|
|
2507
|
+
if (typeof func !== "function") {
|
|
2508
|
+
throw new Error("implement() must be called with a function");
|
|
2509
|
+
}
|
|
2510
|
+
// Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.
|
|
2511
|
+
return Object.defineProperty(function (...args) {
|
|
2512
|
+
const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
|
|
2513
|
+
const result = Reflect.apply(func, this, parsedArgs);
|
|
2514
|
+
if (inst._def.output) {
|
|
2515
|
+
return parse(inst._def.output, result);
|
|
2516
|
+
}
|
|
2517
|
+
return result;
|
|
2518
|
+
}, "_zod", { value: inst._zod, enumerable: false });
|
|
2519
|
+
};
|
|
2520
|
+
inst.implementAsync = (func) => {
|
|
2521
|
+
if (typeof func !== "function") {
|
|
2522
|
+
throw new Error("implementAsync() must be called with a function");
|
|
2523
|
+
}
|
|
2524
|
+
return Object.defineProperty(async function (...args) {
|
|
2525
|
+
const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
|
|
2526
|
+
const result = await Reflect.apply(func, this, parsedArgs);
|
|
2527
|
+
if (inst._def.output) {
|
|
2528
|
+
return await parseAsync(inst._def.output, result);
|
|
2529
|
+
}
|
|
2530
|
+
return result;
|
|
2531
|
+
}, "_zod", { value: inst._zod, enumerable: false });
|
|
2532
|
+
};
|
|
2533
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
2534
|
+
if (typeof payload.value !== "function") {
|
|
2535
|
+
payload.issues.push({
|
|
2536
|
+
code: "invalid_type",
|
|
2537
|
+
expected: "function",
|
|
2538
|
+
input: payload.value,
|
|
2539
|
+
inst,
|
|
2540
|
+
});
|
|
2541
|
+
return payload;
|
|
2542
|
+
}
|
|
2543
|
+
// Check if output is a promise type to determine if we should use async implementation
|
|
2544
|
+
const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
|
|
2545
|
+
if (hasPromiseOutput) {
|
|
2546
|
+
payload.value = inst.implementAsync(payload.value);
|
|
2547
|
+
}
|
|
2548
|
+
else {
|
|
2549
|
+
payload.value = inst.implement(payload.value);
|
|
2550
|
+
}
|
|
2551
|
+
return payload;
|
|
2552
|
+
};
|
|
2553
|
+
inst.input = (...args) => {
|
|
2554
|
+
const F = inst.constructor;
|
|
2555
|
+
if (Array.isArray(args[0])) {
|
|
2556
|
+
return new F({
|
|
2557
|
+
type: "function",
|
|
2558
|
+
input: new $ZodTuple({
|
|
2559
|
+
type: "tuple",
|
|
2560
|
+
items: args[0],
|
|
2561
|
+
rest: args[1],
|
|
2562
|
+
}),
|
|
2563
|
+
output: inst._def.output,
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
return new F({
|
|
2567
|
+
type: "function",
|
|
2568
|
+
input: args[0],
|
|
2569
|
+
output: inst._def.output,
|
|
2570
|
+
});
|
|
2571
|
+
};
|
|
2572
|
+
inst.output = (output) => {
|
|
2573
|
+
const F = inst.constructor;
|
|
2574
|
+
return new F({
|
|
2575
|
+
type: "function",
|
|
2576
|
+
input: inst._def.input,
|
|
2577
|
+
output,
|
|
2578
|
+
});
|
|
2579
|
+
};
|
|
2580
|
+
return inst;
|
|
2581
|
+
});
|
|
2582
|
+
export const $ZodPromise = /*@__PURE__*/ core.$constructor("$ZodPromise", (inst, def) => {
|
|
2583
|
+
$ZodType.init(inst, def);
|
|
2584
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2585
|
+
return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
|
|
2586
|
+
};
|
|
2587
|
+
});
|
|
2588
|
+
export const $ZodLazy = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
|
|
2589
|
+
$ZodType.init(inst, def);
|
|
2590
|
+
// Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.
|
|
2591
|
+
util.defineLazy(inst._zod, "innerType", () => {
|
|
2592
|
+
const d = def;
|
|
2593
|
+
if (!d._cachedInner)
|
|
2594
|
+
d._cachedInner = def.getter();
|
|
2595
|
+
return d._cachedInner;
|
|
2596
|
+
});
|
|
2597
|
+
util.defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
|
|
2598
|
+
util.defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
|
|
2599
|
+
util.defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? undefined);
|
|
2600
|
+
util.defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? undefined);
|
|
2601
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2602
|
+
const inner = inst._zod.innerType;
|
|
2603
|
+
return inner._zod.run(payload, ctx);
|
|
2604
|
+
};
|
|
2605
|
+
});
|
|
2606
|
+
export const $ZodCustom = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
|
|
2607
|
+
checks.$ZodCheck.init(inst, def);
|
|
2608
|
+
$ZodType.init(inst, def);
|
|
2609
|
+
inst._zod.parse = (payload, _) => {
|
|
2610
|
+
return payload;
|
|
2611
|
+
};
|
|
2612
|
+
inst._zod.check = (payload) => {
|
|
2613
|
+
const input = payload.value;
|
|
2614
|
+
const r = def.fn(input);
|
|
2615
|
+
if (r instanceof Promise) {
|
|
2616
|
+
return r.then((r) => handleRefineResult(r, payload, input, inst));
|
|
2617
|
+
}
|
|
2618
|
+
handleRefineResult(r, payload, input, inst);
|
|
2619
|
+
return;
|
|
2620
|
+
};
|
|
2621
|
+
});
|
|
2622
|
+
function handleRefineResult(result, payload, input, inst) {
|
|
2623
|
+
if (!result) {
|
|
2624
|
+
const _iss = {
|
|
2625
|
+
code: "custom",
|
|
2626
|
+
input,
|
|
2627
|
+
inst, // incorporates params.error into issue reporting
|
|
2628
|
+
path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
|
|
2629
|
+
continue: !inst._zod.def.abort,
|
|
2630
|
+
// params: inst._zod.def.params,
|
|
2631
|
+
};
|
|
2632
|
+
if (inst._zod.def.params)
|
|
2633
|
+
_iss.params = inst._zod.def.params;
|
|
2634
|
+
payload.issues.push(util.issue(_iss));
|
|
2635
|
+
}
|
|
2636
|
+
}
|