Add loan-advisor-chatgpt-app (part 11)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- loan-advisor-chatgpt-app/node_modules/ajv-formats/LICENSE +21 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/README.md +125 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.d.ts +9 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.js +208 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/index.d.ts +15 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/index.js +37 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/index.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.d.ts +10 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.js +69 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/package.json +74 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/src/formats.ts +269 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/src/index.ts +62 -0
- loan-advisor-chatgpt-app/node_modules/ajv-formats/src/limit.ts +99 -0
- loan-advisor-chatgpt-app/node_modules/ajv/LICENSE +22 -0
- loan-advisor-chatgpt-app/node_modules/ajv/README.md +207 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/uri.js +6 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.js +90 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.js +35 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/index.d.ts +183 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/index.js +3 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/index.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.js +3 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
loan-advisor-chatgpt-app/node_modules/ajv-formats/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2020 Evgeny Poberezkin
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ajv-formats
|
| 2 |
+
|
| 3 |
+
JSON Schema formats for Ajv
|
| 4 |
+
|
| 5 |
+
[](https://travis-ci.org/ajv-validator/ajv-formats)
|
| 6 |
+
[](https://www.npmjs.com/package/ajv-formats)
|
| 7 |
+
[](https://gitter.im/ajv-validator/ajv)
|
| 8 |
+
[](https://github.com/sponsors/epoberezkin)
|
| 9 |
+
|
| 10 |
+
## Usage
|
| 11 |
+
|
| 12 |
+
```javascript
|
| 13 |
+
// ESM/TypeScript import
|
| 14 |
+
import Ajv from "ajv"
|
| 15 |
+
import addFormats from "ajv-formats"
|
| 16 |
+
// Node.js require:
|
| 17 |
+
const Ajv = require("ajv")
|
| 18 |
+
const addFormats = require("ajv-formats")
|
| 19 |
+
|
| 20 |
+
const ajv = new Ajv()
|
| 21 |
+
addFormats(ajv)
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## Formats
|
| 25 |
+
|
| 26 |
+
The package defines these formats:
|
| 27 |
+
|
| 28 |
+
- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
|
| 29 |
+
- _time_: time (time-zone is mandatory).
|
| 30 |
+
- _date-time_: date-time (time-zone is mandatory).
|
| 31 |
+
- _iso-time_: time with optional time-zone.
|
| 32 |
+
- _iso-date-time_: date-time with optional time-zone.
|
| 33 |
+
- _duration_: duration from [RFC3339](https://tools.ietf.org/html/rfc3339#appendix-A)
|
| 34 |
+
- _uri_: full URI.
|
| 35 |
+
- _uri-reference_: URI reference, including full and relative URIs.
|
| 36 |
+
- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
|
| 37 |
+
- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url).
|
| 38 |
+
- _email_: email address.
|
| 39 |
+
- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
|
| 40 |
+
- _ipv4_: IP address v4.
|
| 41 |
+
- _ipv6_: IP address v6.
|
| 42 |
+
- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
|
| 43 |
+
- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
|
| 44 |
+
- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
|
| 45 |
+
- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
|
| 46 |
+
- _byte_: base64 encoded data according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 47 |
+
- _int32_: signed 32 bits integer according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 48 |
+
- _int64_: signed 64 bits according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 49 |
+
- _float_: float according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 50 |
+
- _double_: double according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 51 |
+
- _password_: password string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 52 |
+
- _binary_: binary string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
|
| 53 |
+
|
| 54 |
+
See regular expressions used for format validation and the sources that were used in [formats.ts](https://github.com/ajv-validator/ajv-formats/blob/master/src/formats.ts).
|
| 55 |
+
|
| 56 |
+
**Please note**: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. These formats are available in [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) plugin.
|
| 57 |
+
|
| 58 |
+
## Keywords to compare values: `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum`
|
| 59 |
+
|
| 60 |
+
These keywords allow to define minimum/maximum constraints when the format keyword defines ordering (`compare` function in format definition).
|
| 61 |
+
|
| 62 |
+
These keywords are added to ajv instance when ajv-formats is used without options or with option `keywords: true`.
|
| 63 |
+
|
| 64 |
+
These keywords apply only to strings. If the data is not a string, the validation succeeds.
|
| 65 |
+
|
| 66 |
+
The value of keywords `formatMaximum`/`formatMinimum` and `formatExclusiveMaximum`/`formatExclusiveMinimum` should be a string or [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference). This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` keyword is not present schema compilation will throw exception.
|
| 67 |
+
|
| 68 |
+
When these keyword are added, they also add comparison functions to formats `"date"`, `"time"` and `"date-time"`. User-defined formats also can have comparison functions. See [addFormat](https://github.com/ajv-validator/ajv/blob/master/docs/api.md#api-addformat) method.
|
| 69 |
+
|
| 70 |
+
```javascript
|
| 71 |
+
require("ajv-formats")(ajv)
|
| 72 |
+
|
| 73 |
+
const schema = {
|
| 74 |
+
type: "string",
|
| 75 |
+
format: "date",
|
| 76 |
+
formatMinimum: "2016-02-06",
|
| 77 |
+
formatExclusiveMaximum: "2016-12-27",
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
const validDataList = ["2016-02-06", "2016-12-26"]
|
| 81 |
+
|
| 82 |
+
const invalidDataList = ["2016-02-05", "2016-12-27", "abc"]
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
## Options
|
| 86 |
+
|
| 87 |
+
Options can be passed via the second parameter. Options value can be
|
| 88 |
+
|
| 89 |
+
1. The list of format names that will be added to ajv instance:
|
| 90 |
+
|
| 91 |
+
```javascript
|
| 92 |
+
addFormats(ajv, ["date", "time"])
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
**Please note**: when ajv encounters an undefined format it throws exception (unless ajv instance was configured with `strict: false` option). To allow specific undefined formats they have to be passed to ajv instance via `formats` option with `true` value:
|
| 96 |
+
|
| 97 |
+
```javascript
|
| 98 |
+
const ajv = new Ajv((formats: {date: true, time: true})) // to ignore "date" and "time" formats in schemas.
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
2. Format validation mode (default is `"full"`) with optional list of format names and `keywords` option to add additional format comparison keywords:
|
| 102 |
+
|
| 103 |
+
```javascript
|
| 104 |
+
addFormats(ajv, {mode: "fast"})
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
or
|
| 108 |
+
|
| 109 |
+
```javascript
|
| 110 |
+
addFormats(ajv, {mode: "fast", formats: ["date", "time"], keywords: true})
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
In `"fast"` mode the following formats are simplified: `"date"`, `"time"`, `"date-time"`, `"iso-time"`, `"iso-date-time"`, `"uri"`, `"uri-reference"`, `"email"`. For example, `"date"`, `"time"` and `"date-time"` do not validate ranges in `"fast"` mode, only string structure, and other formats have simplified regular expressions.
|
| 114 |
+
|
| 115 |
+
## Tests
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
npm install
|
| 119 |
+
git submodule update --init
|
| 120 |
+
npm test
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
## License
|
| 124 |
+
|
| 125 |
+
[MIT](https://github.com/ajv-validator/ajv-formats/blob/master/LICENSE)
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { Format } from "ajv";
|
| 2 |
+
export type FormatMode = "fast" | "full";
|
| 3 |
+
export type FormatName = "date" | "time" | "date-time" | "iso-time" | "iso-date-time" | "duration" | "uri" | "uri-reference" | "uri-template" | "url" | "email" | "hostname" | "ipv4" | "ipv6" | "regex" | "uuid" | "json-pointer" | "json-pointer-uri-fragment" | "relative-json-pointer" | "byte" | "int32" | "int64" | "float" | "double" | "password" | "binary";
|
| 4 |
+
export type DefinedFormats = {
|
| 5 |
+
[key in FormatName]: Format;
|
| 6 |
+
};
|
| 7 |
+
export declare const fullFormats: DefinedFormats;
|
| 8 |
+
export declare const fastFormats: DefinedFormats;
|
| 9 |
+
export declare const formatNames: FormatName[];
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.js
ADDED
|
@@ -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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
| 4 |
+
function fmtDef(validate, compare) {
|
| 5 |
+
return { validate, compare };
|
| 6 |
+
}
|
| 7 |
+
exports.fullFormats = {
|
| 8 |
+
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
| 9 |
+
date: fmtDef(date, compareDate),
|
| 10 |
+
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
| 11 |
+
time: fmtDef(getTime(true), compareTime),
|
| 12 |
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
| 13 |
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
| 14 |
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
| 15 |
+
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
| 16 |
+
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
| 17 |
+
uri,
|
| 18 |
+
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]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?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
| 21 |
+
// For the source: https://gist.github.com/dperini/729294
|
| 22 |
+
// For test cases: https://mathiasbynens.be/demo/url-regex
|
| 23 |
+
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
| 24 |
+
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
| 25 |
+
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
| 26 |
+
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
| 27 |
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
| 28 |
+
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
| 29 |
+
regex,
|
| 30 |
+
// uuid: http://tools.ietf.org/html/rfc4122
|
| 31 |
+
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
| 32 |
+
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
| 33 |
+
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
| 34 |
+
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
| 35 |
+
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
| 36 |
+
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
| 37 |
+
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
| 38 |
+
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
| 39 |
+
// byte: https://github.com/miguelmota/is-base64
|
| 40 |
+
byte,
|
| 41 |
+
// signed 32 bit integer
|
| 42 |
+
int32: { type: "number", validate: validateInt32 },
|
| 43 |
+
// signed 64 bit integer
|
| 44 |
+
int64: { type: "number", validate: validateInt64 },
|
| 45 |
+
// C-type float
|
| 46 |
+
float: { type: "number", validate: validateNumber },
|
| 47 |
+
// C-type double
|
| 48 |
+
double: { type: "number", validate: validateNumber },
|
| 49 |
+
// hint to the UI to hide input strings
|
| 50 |
+
password: true,
|
| 51 |
+
// unchecked string payload
|
| 52 |
+
binary: true,
|
| 53 |
+
};
|
| 54 |
+
exports.fastFormats = {
|
| 55 |
+
...exports.fullFormats,
|
| 56 |
+
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
| 57 |
+
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
| 58 |
+
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
| 59 |
+
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
| 60 |
+
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
| 61 |
+
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
| 62 |
+
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
| 63 |
+
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
| 64 |
+
// email (sources from jsen validator):
|
| 65 |
+
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
| 66 |
+
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
| 67 |
+
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
|
| 68 |
+
};
|
| 69 |
+
exports.formatNames = Object.keys(exports.fullFormats);
|
| 70 |
+
function isLeapYear(year) {
|
| 71 |
+
// https://tools.ietf.org/html/rfc3339#appendix-C
|
| 72 |
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
| 73 |
+
}
|
| 74 |
+
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
| 75 |
+
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
| 76 |
+
function date(str) {
|
| 77 |
+
// full-date from http://tools.ietf.org/html/rfc3339#section-5.6
|
| 78 |
+
const matches = DATE.exec(str);
|
| 79 |
+
if (!matches)
|
| 80 |
+
return false;
|
| 81 |
+
const year = +matches[1];
|
| 82 |
+
const month = +matches[2];
|
| 83 |
+
const day = +matches[3];
|
| 84 |
+
return (month >= 1 &&
|
| 85 |
+
month <= 12 &&
|
| 86 |
+
day >= 1 &&
|
| 87 |
+
day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]));
|
| 88 |
+
}
|
| 89 |
+
function compareDate(d1, d2) {
|
| 90 |
+
if (!(d1 && d2))
|
| 91 |
+
return undefined;
|
| 92 |
+
if (d1 > d2)
|
| 93 |
+
return 1;
|
| 94 |
+
if (d1 < d2)
|
| 95 |
+
return -1;
|
| 96 |
+
return 0;
|
| 97 |
+
}
|
| 98 |
+
const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
| 99 |
+
function getTime(strictTimeZone) {
|
| 100 |
+
return function time(str) {
|
| 101 |
+
const matches = TIME.exec(str);
|
| 102 |
+
if (!matches)
|
| 103 |
+
return false;
|
| 104 |
+
const hr = +matches[1];
|
| 105 |
+
const min = +matches[2];
|
| 106 |
+
const sec = +matches[3];
|
| 107 |
+
const tz = matches[4];
|
| 108 |
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
| 109 |
+
const tzH = +(matches[6] || 0);
|
| 110 |
+
const tzM = +(matches[7] || 0);
|
| 111 |
+
if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz))
|
| 112 |
+
return false;
|
| 113 |
+
if (hr <= 23 && min <= 59 && sec < 60)
|
| 114 |
+
return true;
|
| 115 |
+
// leap second
|
| 116 |
+
const utcMin = min - tzM * tzSign;
|
| 117 |
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
| 118 |
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
| 119 |
+
};
|
| 120 |
+
}
|
| 121 |
+
function compareTime(s1, s2) {
|
| 122 |
+
if (!(s1 && s2))
|
| 123 |
+
return undefined;
|
| 124 |
+
const t1 = new Date("2020-01-01T" + s1).valueOf();
|
| 125 |
+
const t2 = new Date("2020-01-01T" + s2).valueOf();
|
| 126 |
+
if (!(t1 && t2))
|
| 127 |
+
return undefined;
|
| 128 |
+
return t1 - t2;
|
| 129 |
+
}
|
| 130 |
+
function compareIsoTime(t1, t2) {
|
| 131 |
+
if (!(t1 && t2))
|
| 132 |
+
return undefined;
|
| 133 |
+
const a1 = TIME.exec(t1);
|
| 134 |
+
const a2 = TIME.exec(t2);
|
| 135 |
+
if (!(a1 && a2))
|
| 136 |
+
return undefined;
|
| 137 |
+
t1 = a1[1] + a1[2] + a1[3];
|
| 138 |
+
t2 = a2[1] + a2[2] + a2[3];
|
| 139 |
+
if (t1 > t2)
|
| 140 |
+
return 1;
|
| 141 |
+
if (t1 < t2)
|
| 142 |
+
return -1;
|
| 143 |
+
return 0;
|
| 144 |
+
}
|
| 145 |
+
const DATE_TIME_SEPARATOR = /t|\s/i;
|
| 146 |
+
function getDateTime(strictTimeZone) {
|
| 147 |
+
const time = getTime(strictTimeZone);
|
| 148 |
+
return function date_time(str) {
|
| 149 |
+
// http://tools.ietf.org/html/rfc3339#section-5.6
|
| 150 |
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
| 151 |
+
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
| 152 |
+
};
|
| 153 |
+
}
|
| 154 |
+
function compareDateTime(dt1, dt2) {
|
| 155 |
+
if (!(dt1 && dt2))
|
| 156 |
+
return undefined;
|
| 157 |
+
const d1 = new Date(dt1).valueOf();
|
| 158 |
+
const d2 = new Date(dt2).valueOf();
|
| 159 |
+
if (!(d1 && d2))
|
| 160 |
+
return undefined;
|
| 161 |
+
return d1 - d2;
|
| 162 |
+
}
|
| 163 |
+
function compareIsoDateTime(dt1, dt2) {
|
| 164 |
+
if (!(dt1 && dt2))
|
| 165 |
+
return undefined;
|
| 166 |
+
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
| 167 |
+
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
| 168 |
+
const res = compareDate(d1, d2);
|
| 169 |
+
if (res === undefined)
|
| 170 |
+
return undefined;
|
| 171 |
+
return res || compareTime(t1, t2);
|
| 172 |
+
}
|
| 173 |
+
const NOT_URI_FRAGMENT = /\/|:/;
|
| 174 |
+
const URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
| 175 |
+
function uri(str) {
|
| 176 |
+
// http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
|
| 177 |
+
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
| 178 |
+
}
|
| 179 |
+
const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
| 180 |
+
function byte(str) {
|
| 181 |
+
BYTE.lastIndex = 0;
|
| 182 |
+
return BYTE.test(str);
|
| 183 |
+
}
|
| 184 |
+
const MIN_INT32 = -(2 ** 31);
|
| 185 |
+
const MAX_INT32 = 2 ** 31 - 1;
|
| 186 |
+
function validateInt32(value) {
|
| 187 |
+
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
| 188 |
+
}
|
| 189 |
+
function validateInt64(value) {
|
| 190 |
+
// JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64
|
| 191 |
+
return Number.isInteger(value);
|
| 192 |
+
}
|
| 193 |
+
function validateNumber() {
|
| 194 |
+
return true;
|
| 195 |
+
}
|
| 196 |
+
const Z_ANCHOR = /[^\\]\\Z/;
|
| 197 |
+
function regex(str) {
|
| 198 |
+
if (Z_ANCHOR.test(str))
|
| 199 |
+
return false;
|
| 200 |
+
try {
|
| 201 |
+
new RegExp(str);
|
| 202 |
+
return true;
|
| 203 |
+
}
|
| 204 |
+
catch (e) {
|
| 205 |
+
return false;
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
//# sourceMappingURL=formats.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/formats.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"formats.js","sourceRoot":"","sources":["../src/formats.ts"],"names":[],"mappings":";;;AAqCA,SAAS,MAAM,CACb,QAA0C,EAC1C,OAA8B;IAE9B,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAA;AAC5B,CAAC;AAEY,QAAA,WAAW,GAAmB;IACzC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvD,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,kBAAkB,CAAC;IAC1D,2DAA2D;IAC3D,QAAQ,EAAE,wEAAwE;IAClF,GAAG;IACH,eAAe,EACb,woCAAwoC;IAC1oC,oDAAoD;IACpD,cAAc,EACZ,mLAAmL;IACrL,yDAAyD;IACzD,0DAA0D;IAC1D,GAAG,EAAE,odAAod;IACzd,KAAK,EACH,0IAA0I;IAC5I,QAAQ,EACN,uGAAuG;IACzG,mHAAmH;IACnH,IAAI,EAAE,mFAAmF;IACzF,IAAI,EAAE,k/BAAk/B;IACx/B,KAAK;IACL,2CAA2C;IAC3C,IAAI,EAAE,8DAA8D;IACpE,oDAAoD;IACpD,+DAA+D;IAC/D,cAAc,EAAE,2BAA2B;IAC3C,2BAA2B,EAAE,8DAA8D;IAC3F,wFAAwF;IACxF,uBAAuB,EAAE,kDAAkD;IAC3E,+GAA+G;IAC/G,gDAA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
|
|
|
|
|
|
|
|
| 1 |
+
import { FormatMode, FormatName } from "./formats";
|
| 2 |
+
import type { Plugin, Format } from "ajv";
|
| 3 |
+
export { FormatMode, FormatName } from "./formats";
|
| 4 |
+
export { LimitFormatError } from "./limit";
|
| 5 |
+
export interface FormatOptions {
|
| 6 |
+
mode?: FormatMode;
|
| 7 |
+
formats?: FormatName[];
|
| 8 |
+
keywords?: boolean;
|
| 9 |
+
}
|
| 10 |
+
export type FormatsPluginOptions = FormatName[] | FormatOptions;
|
| 11 |
+
export interface FormatsPlugin extends Plugin<FormatsPluginOptions> {
|
| 12 |
+
get: (format: FormatName, mode?: FormatMode) => Format;
|
| 13 |
+
}
|
| 14 |
+
declare const formatsPlugin: FormatsPlugin;
|
| 15 |
+
export default formatsPlugin;
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const formats_1 = require("./formats");
|
| 4 |
+
const limit_1 = require("./limit");
|
| 5 |
+
const codegen_1 = require("ajv/dist/compile/codegen");
|
| 6 |
+
const fullName = new codegen_1.Name("fullFormats");
|
| 7 |
+
const fastName = new codegen_1.Name("fastFormats");
|
| 8 |
+
const formatsPlugin = (ajv, opts = { keywords: true }) => {
|
| 9 |
+
if (Array.isArray(opts)) {
|
| 10 |
+
addFormats(ajv, opts, formats_1.fullFormats, fullName);
|
| 11 |
+
return ajv;
|
| 12 |
+
}
|
| 13 |
+
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
|
| 14 |
+
const list = opts.formats || formats_1.formatNames;
|
| 15 |
+
addFormats(ajv, list, formats, exportName);
|
| 16 |
+
if (opts.keywords)
|
| 17 |
+
(0, limit_1.default)(ajv);
|
| 18 |
+
return ajv;
|
| 19 |
+
};
|
| 20 |
+
formatsPlugin.get = (name, mode = "full") => {
|
| 21 |
+
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
| 22 |
+
const f = formats[name];
|
| 23 |
+
if (!f)
|
| 24 |
+
throw new Error(`Unknown format "${name}"`);
|
| 25 |
+
return f;
|
| 26 |
+
};
|
| 27 |
+
function addFormats(ajv, list, fs, exportName) {
|
| 28 |
+
var _a;
|
| 29 |
+
var _b;
|
| 30 |
+
(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require("ajv-formats/dist/formats").${exportName}`);
|
| 31 |
+
for (const f of list)
|
| 32 |
+
ajv.addFormat(f, fs[f]);
|
| 33 |
+
}
|
| 34 |
+
module.exports = exports = formatsPlugin;
|
| 35 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 36 |
+
exports.default = formatsPlugin;
|
| 37 |
+
//# sourceMappingURL=index.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,uCAOkB;AAClB,mCAAiC;AAGjC,sDAAgD;AAgBhD,MAAM,QAAQ,GAAG,IAAI,cAAI,CAAC,aAAa,CAAC,CAAA;AACxC,MAAM,QAAQ,GAAG,IAAI,cAAI,CAAC,aAAa,CAAC,CAAA;AAExC,MAAM,aAAa,GAAkB,CACnC,GAAQ,EACR,OAA6B,EAAC,QAAQ,EAAE,IAAI,EAAC,EACxC,EA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C,CAAC,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,aAAa,CAAA;AACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,aAAa,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { Plugin, CodeKeywordDefinition, ErrorObject } from "ajv";
|
| 2 |
+
type Kwd = "formatMaximum" | "formatMinimum" | "formatExclusiveMaximum" | "formatExclusiveMinimum";
|
| 3 |
+
type Comparison = "<=" | ">=" | "<" | ">";
|
| 4 |
+
export type LimitFormatError = ErrorObject<Kwd, {
|
| 5 |
+
limit: string;
|
| 6 |
+
comparison: Comparison;
|
| 7 |
+
}>;
|
| 8 |
+
export declare const formatLimitDefinition: CodeKeywordDefinition;
|
| 9 |
+
declare const formatLimitPlugin: Plugin<undefined>;
|
| 10 |
+
export default formatLimitPlugin;
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.formatLimitDefinition = void 0;
|
| 4 |
+
const ajv_1 = require("ajv");
|
| 5 |
+
const codegen_1 = require("ajv/dist/compile/codegen");
|
| 6 |
+
const ops = codegen_1.operators;
|
| 7 |
+
const KWDs = {
|
| 8 |
+
formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
|
| 9 |
+
formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
|
| 10 |
+
formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
| 11 |
+
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE },
|
| 12 |
+
};
|
| 13 |
+
const error = {
|
| 14 |
+
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
| 15 |
+
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
|
| 16 |
+
};
|
| 17 |
+
exports.formatLimitDefinition = {
|
| 18 |
+
keyword: Object.keys(KWDs),
|
| 19 |
+
type: "string",
|
| 20 |
+
schemaType: "string",
|
| 21 |
+
$data: true,
|
| 22 |
+
error,
|
| 23 |
+
code(cxt) {
|
| 24 |
+
const { gen, data, schemaCode, keyword, it } = cxt;
|
| 25 |
+
const { opts, self } = it;
|
| 26 |
+
if (!opts.validateFormats)
|
| 27 |
+
return;
|
| 28 |
+
const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format");
|
| 29 |
+
if (fCxt.$data)
|
| 30 |
+
validate$DataFormat();
|
| 31 |
+
else
|
| 32 |
+
validateFormat();
|
| 33 |
+
function validate$DataFormat() {
|
| 34 |
+
const fmts = gen.scopeValue("formats", {
|
| 35 |
+
ref: self.formats,
|
| 36 |
+
code: opts.code.formats,
|
| 37 |
+
});
|
| 38 |
+
const fmt = gen.const("fmt", (0, codegen_1._) `${fmts}[${fCxt.schemaCode}]`);
|
| 39 |
+
cxt.fail$data((0, codegen_1.or)((0, codegen_1._) `typeof ${fmt} != "object"`, (0, codegen_1._) `${fmt} instanceof RegExp`, (0, codegen_1._) `typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
| 40 |
+
}
|
| 41 |
+
function validateFormat() {
|
| 42 |
+
const format = fCxt.schema;
|
| 43 |
+
const fmtDef = self.formats[format];
|
| 44 |
+
if (!fmtDef || fmtDef === true)
|
| 45 |
+
return;
|
| 46 |
+
if (typeof fmtDef != "object" ||
|
| 47 |
+
fmtDef instanceof RegExp ||
|
| 48 |
+
typeof fmtDef.compare != "function") {
|
| 49 |
+
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
|
| 50 |
+
}
|
| 51 |
+
const fmt = gen.scopeValue("formats", {
|
| 52 |
+
key: format,
|
| 53 |
+
ref: fmtDef,
|
| 54 |
+
code: opts.code.formats ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : undefined,
|
| 55 |
+
});
|
| 56 |
+
cxt.fail$data(compareCode(fmt));
|
| 57 |
+
}
|
| 58 |
+
function compareCode(fmt) {
|
| 59 |
+
return (0, codegen_1._) `${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
dependencies: ["format"],
|
| 63 |
+
};
|
| 64 |
+
const formatLimitPlugin = (ajv) => {
|
| 65 |
+
ajv.addKeyword(exports.formatLimitDefinition);
|
| 66 |
+
return ajv;
|
| 67 |
+
};
|
| 68 |
+
exports.default = formatLimitPlugin;
|
| 69 |
+
//# sourceMappingURL=limit.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/dist/limit.js.map
ADDED
|
@@ -0,0 +1 @@
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "ajv-formats",
|
| 3 |
+
"version": "3.0.1",
|
| 4 |
+
"description": "Format validation for Ajv v7+",
|
| 5 |
+
"main": "dist/index.js",
|
| 6 |
+
"types": "dist/index.d.ts",
|
| 7 |
+
"files": [
|
| 8 |
+
"src/",
|
| 9 |
+
"dist/"
|
| 10 |
+
],
|
| 11 |
+
"scripts": {
|
| 12 |
+
"build": "tsc",
|
| 13 |
+
"prettier:write": "prettier --write \"./**/*.{md,json,yaml,js,ts}\"",
|
| 14 |
+
"prettier:check": "prettier --list-different \"./**/*.{md,json,yaml,js,ts}\"",
|
| 15 |
+
"eslint": "eslint --ext .ts ./src/**/*",
|
| 16 |
+
"test-spec": "jest",
|
| 17 |
+
"test-cov": "jest --coverage",
|
| 18 |
+
"test": "npm run prettier:check && npm run build && npm run eslint && npm run test-cov",
|
| 19 |
+
"ci-test": "npm run test"
|
| 20 |
+
},
|
| 21 |
+
"repository": {
|
| 22 |
+
"type": "git",
|
| 23 |
+
"url": "git+https://github.com/ajv-validator/ajv-formats.git"
|
| 24 |
+
},
|
| 25 |
+
"keywords": [
|
| 26 |
+
"Ajv",
|
| 27 |
+
"JSON-Schema",
|
| 28 |
+
"format",
|
| 29 |
+
"validation"
|
| 30 |
+
],
|
| 31 |
+
"author": "Evgeny Poberezkin",
|
| 32 |
+
"license": "MIT",
|
| 33 |
+
"bugs": {
|
| 34 |
+
"url": "https://github.com/ajv-validator/ajv-formats/issues"
|
| 35 |
+
},
|
| 36 |
+
"homepage": "https://github.com/ajv-validator/ajv-formats#readme",
|
| 37 |
+
"dependencies": {
|
| 38 |
+
"ajv": "^8.0.0"
|
| 39 |
+
},
|
| 40 |
+
"peerDependencies": {
|
| 41 |
+
"ajv": "^8.0.0"
|
| 42 |
+
},
|
| 43 |
+
"peerDependenciesMeta": {
|
| 44 |
+
"ajv": {
|
| 45 |
+
"optional": true
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"devDependencies": {
|
| 49 |
+
"@ajv-validator/config": "^0.3.0",
|
| 50 |
+
"@types/jest": "^26.0.5",
|
| 51 |
+
"@types/node": "^14.10.1",
|
| 52 |
+
"@typescript-eslint/eslint-plugin": "^3.7.0",
|
| 53 |
+
"@typescript-eslint/parser": "^3.7.0",
|
| 54 |
+
"ajv": "^8.0.0",
|
| 55 |
+
"eslint": "^7.5.0",
|
| 56 |
+
"eslint-config-prettier": "^6.11.0",
|
| 57 |
+
"husky": "^4.2.5",
|
| 58 |
+
"jest": "^26.1.0",
|
| 59 |
+
"json-schema-test": "^2.0.0",
|
| 60 |
+
"lint-staged": "^10.2.11",
|
| 61 |
+
"prettier": "^2.3.2",
|
| 62 |
+
"ts-jest": "^26.1.3",
|
| 63 |
+
"typescript": "^4.0.0"
|
| 64 |
+
},
|
| 65 |
+
"prettier": "@ajv-validator/config/prettierrc.json",
|
| 66 |
+
"husky": {
|
| 67 |
+
"hooks": {
|
| 68 |
+
"pre-commit": "lint-staged && npm test"
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
"lint-staged": {
|
| 72 |
+
"*.{md,json,yaml,js,ts}": "prettier --write"
|
| 73 |
+
}
|
| 74 |
+
}
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/src/formats.ts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type {Format, FormatDefinition} from "ajv"
|
| 2 |
+
import type {FormatValidator, FormatCompare} from "ajv/dist/types"
|
| 3 |
+
|
| 4 |
+
export type FormatMode = "fast" | "full"
|
| 5 |
+
|
| 6 |
+
export type FormatName =
|
| 7 |
+
| "date"
|
| 8 |
+
| "time"
|
| 9 |
+
| "date-time"
|
| 10 |
+
| "iso-time"
|
| 11 |
+
| "iso-date-time"
|
| 12 |
+
| "duration"
|
| 13 |
+
| "uri"
|
| 14 |
+
| "uri-reference"
|
| 15 |
+
| "uri-template"
|
| 16 |
+
| "url"
|
| 17 |
+
| "email"
|
| 18 |
+
| "hostname"
|
| 19 |
+
| "ipv4"
|
| 20 |
+
| "ipv6"
|
| 21 |
+
| "regex"
|
| 22 |
+
| "uuid"
|
| 23 |
+
| "json-pointer"
|
| 24 |
+
| "json-pointer-uri-fragment"
|
| 25 |
+
| "relative-json-pointer"
|
| 26 |
+
| "byte"
|
| 27 |
+
| "int32"
|
| 28 |
+
| "int64"
|
| 29 |
+
| "float"
|
| 30 |
+
| "double"
|
| 31 |
+
| "password"
|
| 32 |
+
| "binary"
|
| 33 |
+
|
| 34 |
+
export type DefinedFormats = {
|
| 35 |
+
[key in FormatName]: Format
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
function fmtDef(
|
| 39 |
+
validate: RegExp | FormatValidator<string>,
|
| 40 |
+
compare: FormatCompare<string>
|
| 41 |
+
): FormatDefinition<string> {
|
| 42 |
+
return {validate, compare}
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
export const fullFormats: DefinedFormats = {
|
| 46 |
+
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
| 47 |
+
date: fmtDef(date, compareDate),
|
| 48 |
+
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
| 49 |
+
time: fmtDef(getTime(true), compareTime),
|
| 50 |
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
| 51 |
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
| 52 |
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
| 53 |
+
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
| 54 |
+
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
| 55 |
+
uri,
|
| 56 |
+
"uri-reference":
|
| 57 |
+
/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
| 58 |
+
// uri-template: https://tools.ietf.org/html/rfc6570
|
| 59 |
+
"uri-template":
|
| 60 |
+
/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
| 61 |
+
// For the source: https://gist.github.com/dperini/729294
|
| 62 |
+
// For test cases: https://mathiasbynens.be/demo/url-regex
|
| 63 |
+
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
| 64 |
+
email:
|
| 65 |
+
/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
| 66 |
+
hostname:
|
| 67 |
+
/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
| 68 |
+
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
| 69 |
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
| 70 |
+
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
| 71 |
+
regex,
|
| 72 |
+
// uuid: http://tools.ietf.org/html/rfc4122
|
| 73 |
+
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
| 74 |
+
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
| 75 |
+
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
| 76 |
+
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
| 77 |
+
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
| 78 |
+
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
| 79 |
+
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
| 80 |
+
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
| 81 |
+
// byte: https://github.com/miguelmota/is-base64
|
| 82 |
+
byte,
|
| 83 |
+
// signed 32 bit integer
|
| 84 |
+
int32: {type: "number", validate: validateInt32},
|
| 85 |
+
// signed 64 bit integer
|
| 86 |
+
int64: {type: "number", validate: validateInt64},
|
| 87 |
+
// C-type float
|
| 88 |
+
float: {type: "number", validate: validateNumber},
|
| 89 |
+
// C-type double
|
| 90 |
+
double: {type: "number", validate: validateNumber},
|
| 91 |
+
// hint to the UI to hide input strings
|
| 92 |
+
password: true,
|
| 93 |
+
// unchecked string payload
|
| 94 |
+
binary: true,
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
export const fastFormats: DefinedFormats = {
|
| 98 |
+
...fullFormats,
|
| 99 |
+
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
| 100 |
+
time: fmtDef(
|
| 101 |
+
/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
| 102 |
+
compareTime
|
| 103 |
+
),
|
| 104 |
+
"date-time": fmtDef(
|
| 105 |
+
/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
| 106 |
+
compareDateTime
|
| 107 |
+
),
|
| 108 |
+
"iso-time": fmtDef(
|
| 109 |
+
/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
| 110 |
+
compareIsoTime
|
| 111 |
+
),
|
| 112 |
+
"iso-date-time": fmtDef(
|
| 113 |
+
/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
| 114 |
+
compareIsoDateTime
|
| 115 |
+
),
|
| 116 |
+
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
| 117 |
+
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
| 118 |
+
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
| 119 |
+
// email (sources from jsen validator):
|
| 120 |
+
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
| 121 |
+
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
| 122 |
+
email:
|
| 123 |
+
/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
export const formatNames = Object.keys(fullFormats) as FormatName[]
|
| 127 |
+
|
| 128 |
+
function isLeapYear(year: number): boolean {
|
| 129 |
+
// https://tools.ietf.org/html/rfc3339#appendix-C
|
| 130 |
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/
|
| 134 |
+
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
| 135 |
+
|
| 136 |
+
function date(str: string): boolean {
|
| 137 |
+
// full-date from http://tools.ietf.org/html/rfc3339#section-5.6
|
| 138 |
+
const matches: string[] | null = DATE.exec(str)
|
| 139 |
+
if (!matches) return false
|
| 140 |
+
const year: number = +matches[1]
|
| 141 |
+
const month: number = +matches[2]
|
| 142 |
+
const day: number = +matches[3]
|
| 143 |
+
return (
|
| 144 |
+
month >= 1 &&
|
| 145 |
+
month <= 12 &&
|
| 146 |
+
day >= 1 &&
|
| 147 |
+
day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month])
|
| 148 |
+
)
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
function compareDate(d1: string, d2: string): number | undefined {
|
| 152 |
+
if (!(d1 && d2)) return undefined
|
| 153 |
+
if (d1 > d2) return 1
|
| 154 |
+
if (d1 < d2) return -1
|
| 155 |
+
return 0
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i
|
| 159 |
+
|
| 160 |
+
function getTime(strictTimeZone?: boolean): (str: string) => boolean {
|
| 161 |
+
return function time(str: string): boolean {
|
| 162 |
+
const matches: string[] | null = TIME.exec(str)
|
| 163 |
+
if (!matches) return false
|
| 164 |
+
const hr: number = +matches[1]
|
| 165 |
+
const min: number = +matches[2]
|
| 166 |
+
const sec: number = +matches[3]
|
| 167 |
+
const tz: string | undefined = matches[4]
|
| 168 |
+
const tzSign: number = matches[5] === "-" ? -1 : 1
|
| 169 |
+
const tzH: number = +(matches[6] || 0)
|
| 170 |
+
const tzM: number = +(matches[7] || 0)
|
| 171 |
+
if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz)) return false
|
| 172 |
+
if (hr <= 23 && min <= 59 && sec < 60) return true
|
| 173 |
+
// leap second
|
| 174 |
+
const utcMin = min - tzM * tzSign
|
| 175 |
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0)
|
| 176 |
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
function compareTime(s1: string, s2: string): number | undefined {
|
| 181 |
+
if (!(s1 && s2)) return undefined
|
| 182 |
+
const t1 = new Date("2020-01-01T" + s1).valueOf()
|
| 183 |
+
const t2 = new Date("2020-01-01T" + s2).valueOf()
|
| 184 |
+
if (!(t1 && t2)) return undefined
|
| 185 |
+
return t1 - t2
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
function compareIsoTime(t1: string, t2: string): number | undefined {
|
| 189 |
+
if (!(t1 && t2)) return undefined
|
| 190 |
+
const a1 = TIME.exec(t1)
|
| 191 |
+
const a2 = TIME.exec(t2)
|
| 192 |
+
if (!(a1 && a2)) return undefined
|
| 193 |
+
t1 = a1[1] + a1[2] + a1[3]
|
| 194 |
+
t2 = a2[1] + a2[2] + a2[3]
|
| 195 |
+
if (t1 > t2) return 1
|
| 196 |
+
if (t1 < t2) return -1
|
| 197 |
+
return 0
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
const DATE_TIME_SEPARATOR = /t|\s/i
|
| 201 |
+
function getDateTime(strictTimeZone?: boolean): (str: string) => boolean {
|
| 202 |
+
const time = getTime(strictTimeZone)
|
| 203 |
+
|
| 204 |
+
return function date_time(str: string): boolean {
|
| 205 |
+
// http://tools.ietf.org/html/rfc3339#section-5.6
|
| 206 |
+
const dateTime: string[] = str.split(DATE_TIME_SEPARATOR)
|
| 207 |
+
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1])
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
function compareDateTime(dt1: string, dt2: string): number | undefined {
|
| 212 |
+
if (!(dt1 && dt2)) return undefined
|
| 213 |
+
const d1 = new Date(dt1).valueOf()
|
| 214 |
+
const d2 = new Date(dt2).valueOf()
|
| 215 |
+
if (!(d1 && d2)) return undefined
|
| 216 |
+
return d1 - d2
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
function compareIsoDateTime(dt1: string, dt2: string): number | undefined {
|
| 220 |
+
if (!(dt1 && dt2)) return undefined
|
| 221 |
+
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR)
|
| 222 |
+
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR)
|
| 223 |
+
const res = compareDate(d1, d2)
|
| 224 |
+
if (res === undefined) return undefined
|
| 225 |
+
return res || compareTime(t1, t2)
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
const NOT_URI_FRAGMENT = /\/|:/
|
| 229 |
+
const URI =
|
| 230 |
+
/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i
|
| 231 |
+
|
| 232 |
+
function uri(str: string): boolean {
|
| 233 |
+
// http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
|
| 234 |
+
return NOT_URI_FRAGMENT.test(str) && URI.test(str)
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm
|
| 238 |
+
|
| 239 |
+
function byte(str: string): boolean {
|
| 240 |
+
BYTE.lastIndex = 0
|
| 241 |
+
return BYTE.test(str)
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
const MIN_INT32 = -(2 ** 31)
|
| 245 |
+
const MAX_INT32 = 2 ** 31 - 1
|
| 246 |
+
|
| 247 |
+
function validateInt32(value: number): boolean {
|
| 248 |
+
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
function validateInt64(value: number): boolean {
|
| 252 |
+
// JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64
|
| 253 |
+
return Number.isInteger(value)
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
function validateNumber(): boolean {
|
| 257 |
+
return true
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
const Z_ANCHOR = /[^\\]\\Z/
|
| 261 |
+
function regex(str: string): boolean {
|
| 262 |
+
if (Z_ANCHOR.test(str)) return false
|
| 263 |
+
try {
|
| 264 |
+
new RegExp(str)
|
| 265 |
+
return true
|
| 266 |
+
} catch (e) {
|
| 267 |
+
return false
|
| 268 |
+
}
|
| 269 |
+
}
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/src/index.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {
|
| 2 |
+
DefinedFormats,
|
| 3 |
+
FormatMode,
|
| 4 |
+
FormatName,
|
| 5 |
+
formatNames,
|
| 6 |
+
fastFormats,
|
| 7 |
+
fullFormats,
|
| 8 |
+
} from "./formats"
|
| 9 |
+
import formatLimit from "./limit"
|
| 10 |
+
import type Ajv from "ajv"
|
| 11 |
+
import type {Plugin, Format} from "ajv"
|
| 12 |
+
import {_, Name} from "ajv/dist/compile/codegen"
|
| 13 |
+
|
| 14 |
+
export {FormatMode, FormatName} from "./formats"
|
| 15 |
+
export {LimitFormatError} from "./limit"
|
| 16 |
+
export interface FormatOptions {
|
| 17 |
+
mode?: FormatMode
|
| 18 |
+
formats?: FormatName[]
|
| 19 |
+
keywords?: boolean
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
export type FormatsPluginOptions = FormatName[] | FormatOptions
|
| 23 |
+
|
| 24 |
+
export interface FormatsPlugin extends Plugin<FormatsPluginOptions> {
|
| 25 |
+
get: (format: FormatName, mode?: FormatMode) => Format
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
const fullName = new Name("fullFormats")
|
| 29 |
+
const fastName = new Name("fastFormats")
|
| 30 |
+
|
| 31 |
+
const formatsPlugin: FormatsPlugin = (
|
| 32 |
+
ajv: Ajv,
|
| 33 |
+
opts: FormatsPluginOptions = {keywords: true}
|
| 34 |
+
): Ajv => {
|
| 35 |
+
if (Array.isArray(opts)) {
|
| 36 |
+
addFormats(ajv, opts, fullFormats, fullName)
|
| 37 |
+
return ajv
|
| 38 |
+
}
|
| 39 |
+
const [formats, exportName] =
|
| 40 |
+
opts.mode === "fast" ? [fastFormats, fastName] : [fullFormats, fullName]
|
| 41 |
+
const list = opts.formats || formatNames
|
| 42 |
+
addFormats(ajv, list, formats, exportName)
|
| 43 |
+
if (opts.keywords) formatLimit(ajv)
|
| 44 |
+
return ajv
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
formatsPlugin.get = (name: FormatName, mode: FormatMode = "full"): Format => {
|
| 48 |
+
const formats = mode === "fast" ? fastFormats : fullFormats
|
| 49 |
+
const f = formats[name]
|
| 50 |
+
if (!f) throw new Error(`Unknown format "${name}"`)
|
| 51 |
+
return f
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
function addFormats(ajv: Ajv, list: FormatName[], fs: DefinedFormats, exportName: Name): void {
|
| 55 |
+
ajv.opts.code.formats ??= _`require("ajv-formats/dist/formats").${exportName}`
|
| 56 |
+
for (const f of list) ajv.addFormat(f, fs[f])
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
module.exports = exports = formatsPlugin
|
| 60 |
+
Object.defineProperty(exports, "__esModule", {value: true})
|
| 61 |
+
|
| 62 |
+
export default formatsPlugin
|
loan-advisor-chatgpt-app/node_modules/ajv-formats/src/limit.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type Ajv from "ajv"
|
| 2 |
+
import type {
|
| 3 |
+
Plugin,
|
| 4 |
+
CodeKeywordDefinition,
|
| 5 |
+
KeywordErrorDefinition,
|
| 6 |
+
Code,
|
| 7 |
+
Name,
|
| 8 |
+
ErrorObject,
|
| 9 |
+
} from "ajv"
|
| 10 |
+
import type {AddedFormat} from "ajv/dist/types"
|
| 11 |
+
import type {Rule} from "ajv/dist/compile/rules"
|
| 12 |
+
import {KeywordCxt} from "ajv"
|
| 13 |
+
import {_, str, or, getProperty, operators} from "ajv/dist/compile/codegen"
|
| 14 |
+
|
| 15 |
+
type Kwd = "formatMaximum" | "formatMinimum" | "formatExclusiveMaximum" | "formatExclusiveMinimum"
|
| 16 |
+
|
| 17 |
+
type Comparison = "<=" | ">=" | "<" | ">"
|
| 18 |
+
|
| 19 |
+
const ops = operators
|
| 20 |
+
|
| 21 |
+
const KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {
|
| 22 |
+
formatMaximum: {okStr: "<=", ok: ops.LTE, fail: ops.GT},
|
| 23 |
+
formatMinimum: {okStr: ">=", ok: ops.GTE, fail: ops.LT},
|
| 24 |
+
formatExclusiveMaximum: {okStr: "<", ok: ops.LT, fail: ops.GTE},
|
| 25 |
+
formatExclusiveMinimum: {okStr: ">", ok: ops.GT, fail: ops.LTE},
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
export type LimitFormatError = ErrorObject<Kwd, {limit: string; comparison: Comparison}>
|
| 29 |
+
|
| 30 |
+
const error: KeywordErrorDefinition = {
|
| 31 |
+
message: ({keyword, schemaCode}) => str`should be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,
|
| 32 |
+
params: ({keyword, schemaCode}) =>
|
| 33 |
+
_`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
export const formatLimitDefinition: CodeKeywordDefinition = {
|
| 37 |
+
keyword: Object.keys(KWDs),
|
| 38 |
+
type: "string",
|
| 39 |
+
schemaType: "string",
|
| 40 |
+
$data: true,
|
| 41 |
+
error,
|
| 42 |
+
code(cxt) {
|
| 43 |
+
const {gen, data, schemaCode, keyword, it} = cxt
|
| 44 |
+
const {opts, self} = it
|
| 45 |
+
if (!opts.validateFormats) return
|
| 46 |
+
|
| 47 |
+
const fCxt = new KeywordCxt(it, (self.RULES.all.format as Rule).definition, "format")
|
| 48 |
+
if (fCxt.$data) validate$DataFormat()
|
| 49 |
+
else validateFormat()
|
| 50 |
+
|
| 51 |
+
function validate$DataFormat(): void {
|
| 52 |
+
const fmts = gen.scopeValue("formats", {
|
| 53 |
+
ref: self.formats,
|
| 54 |
+
code: opts.code.formats,
|
| 55 |
+
})
|
| 56 |
+
const fmt = gen.const("fmt", _`${fmts}[${fCxt.schemaCode}]`)
|
| 57 |
+
cxt.fail$data(
|
| 58 |
+
or(
|
| 59 |
+
_`typeof ${fmt} != "object"`,
|
| 60 |
+
_`${fmt} instanceof RegExp`,
|
| 61 |
+
_`typeof ${fmt}.compare != "function"`,
|
| 62 |
+
compareCode(fmt)
|
| 63 |
+
)
|
| 64 |
+
)
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
function validateFormat(): void {
|
| 68 |
+
const format = fCxt.schema as string
|
| 69 |
+
const fmtDef: AddedFormat | undefined = self.formats[format]
|
| 70 |
+
if (!fmtDef || fmtDef === true) return
|
| 71 |
+
if (
|
| 72 |
+
typeof fmtDef != "object" ||
|
| 73 |
+
fmtDef instanceof RegExp ||
|
| 74 |
+
typeof fmtDef.compare != "function"
|
| 75 |
+
) {
|
| 76 |
+
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`)
|
| 77 |
+
}
|
| 78 |
+
const fmt = gen.scopeValue("formats", {
|
| 79 |
+
key: format,
|
| 80 |
+
ref: fmtDef,
|
| 81 |
+
code: opts.code.formats ? _`${opts.code.formats}${getProperty(format)}` : undefined,
|
| 82 |
+
})
|
| 83 |
+
|
| 84 |
+
cxt.fail$data(compareCode(fmt))
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
function compareCode(fmt: Name): Code {
|
| 88 |
+
return _`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword as Kwd].fail} 0`
|
| 89 |
+
}
|
| 90 |
+
},
|
| 91 |
+
dependencies: ["format"],
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
const formatLimitPlugin: Plugin<undefined> = (ajv: Ajv): Ajv => {
|
| 95 |
+
ajv.addKeyword(formatLimitDefinition)
|
| 96 |
+
return ajv
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
export default formatLimitPlugin
|
loan-advisor-chatgpt-app/node_modules/ajv/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2015-2021 Evgeny Poberezkin
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
| 22 |
+
|
loan-advisor-chatgpt-app/node_modules/ajv/README.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/img/ajv.svg">
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# Ajv JSON schema validator
|
| 6 |
+
|
| 7 |
+
The fastest JSON validator for Node.js and browser.
|
| 8 |
+
|
| 9 |
+
Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
|
| 10 |
+
|
| 11 |
+
[](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
|
| 12 |
+
[](https://www.npmjs.com/package/ajv)
|
| 13 |
+
[](https://www.npmjs.com/package/ajv)
|
| 14 |
+
[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
|
| 15 |
+
[](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
|
| 16 |
+
[](https://gitter.im/ajv-validator/ajv)
|
| 17 |
+
[](https://github.com/sponsors/epoberezkin)
|
| 18 |
+
|
| 19 |
+
## Ajv sponsors
|
| 20 |
+
|
| 21 |
+
[<img src="https://ajv.js.org/img/mozilla.svg" width="45%" alt="Mozilla">](https://www.mozilla.org)<img src="https://ajv.js.org/img/gap.svg" width="9%">[<img src="https://ajv.js.org/img/reserved.svg" width="45%">](https://opencollective.com/ajv)
|
| 22 |
+
|
| 23 |
+
[<img src="https://ajv.js.org/img/microsoft.png" width="31%" alt="Microsoft">](https://opensource.microsoft.com)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)
|
| 24 |
+
|
| 25 |
+
[<img src="https://ajv.js.org/img/retool.svg" width="22.5%" alt="Retool">](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/tidelift.svg" width="22.5%" alt="Tidelift">](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/simplex.svg" width="22.5%" alt="SimpleX">](https://github.com/simplex-chat/simplex-chat)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="22.5%">](https://opencollective.com/ajv)
|
| 26 |
+
|
| 27 |
+
## Contributing
|
| 28 |
+
|
| 29 |
+
More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
|
| 30 |
+
|
| 31 |
+
Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
|
| 32 |
+
|
| 33 |
+
## Documentation
|
| 34 |
+
|
| 35 |
+
All documentation is available on the [Ajv website](https://ajv.js.org).
|
| 36 |
+
|
| 37 |
+
Some useful site links:
|
| 38 |
+
|
| 39 |
+
- [Getting started](https://ajv.js.org/guide/getting-started.html)
|
| 40 |
+
- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
|
| 41 |
+
- [API reference](https://ajv.js.org/api.html)
|
| 42 |
+
- [Strict mode](https://ajv.js.org/strict-mode.html)
|
| 43 |
+
- [Standalone validation code](https://ajv.js.org/standalone.html)
|
| 44 |
+
- [Security considerations](https://ajv.js.org/security.html)
|
| 45 |
+
- [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
|
| 46 |
+
- [Frequently Asked Questions](https://ajv.js.org/faq.html)
|
| 47 |
+
|
| 48 |
+
## <a name="sponsors"></a>Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
|
| 49 |
+
|
| 50 |
+
Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
|
| 51 |
+
|
| 52 |
+
Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
|
| 53 |
+
|
| 54 |
+
Please sponsor Ajv via:
|
| 55 |
+
|
| 56 |
+
- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
|
| 57 |
+
- [Ajv Open Collective](https://opencollective.com/ajv)
|
| 58 |
+
|
| 59 |
+
Thank you.
|
| 60 |
+
|
| 61 |
+
#### Open Collective sponsors
|
| 62 |
+
|
| 63 |
+
<a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
|
| 64 |
+
|
| 65 |
+
<a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
|
| 66 |
+
<a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
|
| 67 |
+
<a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
|
| 68 |
+
<a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
|
| 69 |
+
<a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
|
| 70 |
+
<a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
|
| 71 |
+
<a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
|
| 72 |
+
<a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
|
| 73 |
+
<a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
|
| 74 |
+
<a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
|
| 75 |
+
<a href="https://opencollective.com/ajv/organization/10/website"><img src="https://opencollective.com/ajv/organization/10/avatar.svg"></a>
|
| 76 |
+
<a href="https://opencollective.com/ajv/organization/11/website"><img src="https://opencollective.com/ajv/organization/11/avatar.svg"></a>
|
| 77 |
+
<a href="https://opencollective.com/ajv/organization/12/website"><img src="https://opencollective.com/ajv/organization/12/avatar.svg"></a>
|
| 78 |
+
<a href="https://opencollective.com/ajv/organization/13/website"><img src="https://opencollective.com/ajv/organization/13/avatar.svg"></a>
|
| 79 |
+
<a href="https://opencollective.com/ajv/organization/14/website"><img src="https://opencollective.com/ajv/organization/14/avatar.svg"></a>
|
| 80 |
+
<a href="https://opencollective.com/ajv/organization/15/website"><img src="https://opencollective.com/ajv/organization/15/avatar.svg"></a>
|
| 81 |
+
<a href="https://opencollective.com/ajv/organization/16/website"><img src="https://opencollective.com/ajv/organization/16/avatar.svg"></a>
|
| 82 |
+
<a href="https://opencollective.com/ajv/organization/17/website"><img src="https://opencollective.com/ajv/organization/17/avatar.svg"></a>
|
| 83 |
+
<a href="https://opencollective.com/ajv/organization/18/website"><img src="https://opencollective.com/ajv/organization/18/avatar.svg"></a>
|
| 84 |
+
<a href="https://opencollective.com/ajv/organization/19/website"><img src="https://opencollective.com/ajv/organization/19/avatar.svg"></a>
|
| 85 |
+
<a href="https://opencollective.com/ajv/organization/20/website"><img src="https://opencollective.com/ajv/organization/20/avatar.svg"></a>
|
| 86 |
+
<a href="https://opencollective.com/ajv/organization/21/website"><img src="https://opencollective.com/ajv/organization/21/avatar.svg"></a>
|
| 87 |
+
<a href="https://opencollective.com/ajv/organization/22/website"><img src="https://opencollective.com/ajv/organization/22/avatar.svg"></a>
|
| 88 |
+
<a href="https://opencollective.com/ajv/organization/23/website"><img src="https://opencollective.com/ajv/organization/23/avatar.svg"></a>
|
| 89 |
+
<a href="https://opencollective.com/ajv/organization/24/website"><img src="https://opencollective.com/ajv/organization/24/avatar.svg"></a>
|
| 90 |
+
|
| 91 |
+
## Performance
|
| 92 |
+
|
| 93 |
+
Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
|
| 94 |
+
|
| 95 |
+
Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
|
| 96 |
+
|
| 97 |
+
- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
|
| 98 |
+
- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
|
| 99 |
+
- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
|
| 100 |
+
- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
|
| 101 |
+
|
| 102 |
+
Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
|
| 103 |
+
|
| 104 |
+
[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
|
| 105 |
+
|
| 106 |
+
## Features
|
| 107 |
+
|
| 108 |
+
- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
|
| 109 |
+
- all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
|
| 110 |
+
- [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
|
| 111 |
+
- NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
|
| 112 |
+
- keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
|
| 113 |
+
- full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
|
| 114 |
+
- support of recursive references between schemas
|
| 115 |
+
- correct string lengths for strings with unicode pairs
|
| 116 |
+
- JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
|
| 117 |
+
- [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
|
| 118 |
+
- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
|
| 119 |
+
- all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
|
| 120 |
+
- meta-schema for JTD schemas
|
| 121 |
+
- "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
|
| 122 |
+
- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 18.x - current
|
| 123 |
+
- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
|
| 124 |
+
- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
|
| 125 |
+
- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
|
| 126 |
+
- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
|
| 127 |
+
- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
|
| 128 |
+
- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
|
| 129 |
+
- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
|
| 130 |
+
- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
|
| 131 |
+
- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
|
| 132 |
+
- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
|
| 133 |
+
- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
|
| 134 |
+
|
| 135 |
+
## Install
|
| 136 |
+
|
| 137 |
+
To install version 8:
|
| 138 |
+
|
| 139 |
+
```
|
| 140 |
+
npm install ajv
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
## <a name="usage"></a>Getting started
|
| 144 |
+
|
| 145 |
+
Try it in the Node.js REPL: https://runkit.com/npm/ajv
|
| 146 |
+
|
| 147 |
+
In JavaScript:
|
| 148 |
+
|
| 149 |
+
```javascript
|
| 150 |
+
// or ESM/TypeScript import
|
| 151 |
+
import Ajv from "ajv"
|
| 152 |
+
// Node.js require:
|
| 153 |
+
const Ajv = require("ajv")
|
| 154 |
+
|
| 155 |
+
const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
|
| 156 |
+
|
| 157 |
+
const schema = {
|
| 158 |
+
type: "object",
|
| 159 |
+
properties: {
|
| 160 |
+
foo: {type: "integer"},
|
| 161 |
+
bar: {type: "string"},
|
| 162 |
+
},
|
| 163 |
+
required: ["foo"],
|
| 164 |
+
additionalProperties: false,
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
const data = {
|
| 168 |
+
foo: 1,
|
| 169 |
+
bar: "abc",
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
const validate = ajv.compile(schema)
|
| 173 |
+
const valid = validate(data)
|
| 174 |
+
if (!valid) console.log(validate.errors)
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
|
| 178 |
+
|
| 179 |
+
## Changes history
|
| 180 |
+
|
| 181 |
+
See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
|
| 182 |
+
|
| 183 |
+
**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
|
| 184 |
+
|
| 185 |
+
[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
|
| 186 |
+
|
| 187 |
+
[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
|
| 188 |
+
|
| 189 |
+
## Code of conduct
|
| 190 |
+
|
| 191 |
+
Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
|
| 192 |
+
|
| 193 |
+
Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
|
| 194 |
+
|
| 195 |
+
## Security contact
|
| 196 |
+
|
| 197 |
+
To report a security vulnerability, please use the
|
| 198 |
+
[Tidelift security contact](https://tidelift.com/security).
|
| 199 |
+
Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
|
| 200 |
+
|
| 201 |
+
## Open-source software support
|
| 202 |
+
|
| 203 |
+
Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
|
| 204 |
+
|
| 205 |
+
## License
|
| 206 |
+
|
| 207 |
+
[MIT](./LICENSE)
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/uri.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const uri = require("fast-uri");
|
| 4 |
+
uri.code = 'require("ajv/dist/runtime/uri").default';
|
| 5 |
+
exports.default = uri;
|
| 6 |
+
//# sourceMappingURL=uri.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/uri.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../lib/runtime/uri.ts"],"names":[],"mappings":";;AAAA,gCAA+B;AAG7B,GAAW,CAAC,IAAI,GAAG,yCAAyC,CAAA;AAE9D,kBAAe,GAAU,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { ErrorObject } from "../types";
|
| 2 |
+
export default class ValidationError extends Error {
|
| 3 |
+
readonly errors: Partial<ErrorObject>[];
|
| 4 |
+
readonly ajv: true;
|
| 5 |
+
readonly validation: true;
|
| 6 |
+
constructor(errors: Partial<ErrorObject>[]);
|
| 7 |
+
}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
class ValidationError extends Error {
|
| 4 |
+
constructor(errors) {
|
| 5 |
+
super("validation failed");
|
| 6 |
+
this.errors = errors;
|
| 7 |
+
this.ajv = this.validation = true;
|
| 8 |
+
}
|
| 9 |
+
}
|
| 10 |
+
exports.default = ValidationError;
|
| 11 |
+
//# sourceMappingURL=validation_error.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/runtime/validation_error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"validation_error.js","sourceRoot":"","sources":["../../lib/runtime/validation_error.ts"],"names":[],"mappings":";;AAEA,MAAqB,eAAgB,SAAQ,KAAK;IAKhD,YAAY,MAA8B;QACxC,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACnC,CAAC;CACF;AAVD,kCAUC"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type AjvCore from "../core";
|
| 2 |
+
import type { AnyValidateFunction } from "../types";
|
| 3 |
+
declare function standaloneCode(ajv: AjvCore, refsOrFunc?: {
|
| 4 |
+
[K in string]?: string;
|
| 5 |
+
} | AnyValidateFunction): string;
|
| 6 |
+
export default standaloneCode;
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const scope_1 = require("../compile/codegen/scope");
|
| 4 |
+
const code_1 = require("../compile/codegen/code");
|
| 5 |
+
function standaloneCode(ajv, refsOrFunc) {
|
| 6 |
+
if (!ajv.opts.code.source) {
|
| 7 |
+
throw new Error("moduleCode: ajv instance must have code.source option");
|
| 8 |
+
}
|
| 9 |
+
const { _n } = ajv.scope.opts;
|
| 10 |
+
return typeof refsOrFunc == "function"
|
| 11 |
+
? funcExportCode(refsOrFunc.source)
|
| 12 |
+
: refsOrFunc !== undefined
|
| 13 |
+
? multiExportsCode(refsOrFunc, getValidate)
|
| 14 |
+
: multiExportsCode(ajv.schemas, (sch) => sch.meta ? undefined : ajv.compile(sch.schema));
|
| 15 |
+
function getValidate(id) {
|
| 16 |
+
const v = ajv.getSchema(id);
|
| 17 |
+
if (!v)
|
| 18 |
+
throw new Error(`moduleCode: no schema with id ${id}`);
|
| 19 |
+
return v;
|
| 20 |
+
}
|
| 21 |
+
function funcExportCode(source) {
|
| 22 |
+
const usedValues = {};
|
| 23 |
+
const n = source === null || source === void 0 ? void 0 : source.validateName;
|
| 24 |
+
const vCode = validateCode(usedValues, source);
|
| 25 |
+
if (ajv.opts.code.esm) {
|
| 26 |
+
// Always do named export as `validate` rather than the variable `n` which is `validateXX` for known export value
|
| 27 |
+
return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`;
|
| 28 |
+
}
|
| 29 |
+
return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`;
|
| 30 |
+
}
|
| 31 |
+
function multiExportsCode(schemas, getValidateFunc) {
|
| 32 |
+
var _a;
|
| 33 |
+
const usedValues = {};
|
| 34 |
+
let code = (0, code_1._) `"use strict";`;
|
| 35 |
+
for (const name in schemas) {
|
| 36 |
+
const v = getValidateFunc(schemas[name]);
|
| 37 |
+
if (v) {
|
| 38 |
+
const vCode = validateCode(usedValues, v.source);
|
| 39 |
+
const exportSyntax = ajv.opts.code.esm
|
| 40 |
+
? (0, code_1._) `export const ${(0, code_1.getEsmExportName)(name)}`
|
| 41 |
+
: (0, code_1._) `exports${(0, code_1.getProperty)(name)}`;
|
| 42 |
+
code = (0, code_1._) `${code}${_n}${exportSyntax} = ${(_a = v.source) === null || _a === void 0 ? void 0 : _a.validateName};${_n}${vCode}`;
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
return `${code}`;
|
| 46 |
+
}
|
| 47 |
+
function validateCode(usedValues, s) {
|
| 48 |
+
if (!s)
|
| 49 |
+
throw new Error('moduleCode: function does not have "source" property');
|
| 50 |
+
if (usedState(s.validateName) === scope_1.UsedValueState.Completed)
|
| 51 |
+
return code_1.nil;
|
| 52 |
+
setUsedState(s.validateName, scope_1.UsedValueState.Started);
|
| 53 |
+
const scopeCode = ajv.scope.scopeCode(s.scopeValues, usedValues, refValidateCode);
|
| 54 |
+
const code = new code_1._Code(`${scopeCode}${_n}${s.validateCode}`);
|
| 55 |
+
return s.evaluated ? (0, code_1._) `${code}${s.validateName}.evaluated = ${s.evaluated};${_n}` : code;
|
| 56 |
+
function refValidateCode(n) {
|
| 57 |
+
var _a;
|
| 58 |
+
const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref;
|
| 59 |
+
if (n.prefix === "validate" && typeof vRef == "function") {
|
| 60 |
+
const v = vRef;
|
| 61 |
+
return validateCode(usedValues, v.source);
|
| 62 |
+
}
|
| 63 |
+
else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") {
|
| 64 |
+
const { validate, validateName } = vRef;
|
| 65 |
+
if (!validateName)
|
| 66 |
+
throw new Error("ajv internal error");
|
| 67 |
+
const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const;
|
| 68 |
+
const wrapper = (0, code_1._) `${def} ${n} = {validate: ${validateName}};`;
|
| 69 |
+
if (usedState(validateName) === scope_1.UsedValueState.Started)
|
| 70 |
+
return wrapper;
|
| 71 |
+
const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source);
|
| 72 |
+
return (0, code_1._) `${wrapper}${_n}${vCode}`;
|
| 73 |
+
}
|
| 74 |
+
return undefined;
|
| 75 |
+
}
|
| 76 |
+
function usedState(name) {
|
| 77 |
+
var _a;
|
| 78 |
+
return (_a = usedValues[name.prefix]) === null || _a === void 0 ? void 0 : _a.get(name);
|
| 79 |
+
}
|
| 80 |
+
function setUsedState(name, state) {
|
| 81 |
+
const { prefix } = name;
|
| 82 |
+
const names = (usedValues[prefix] = usedValues[prefix] || new Map());
|
| 83 |
+
names.set(name, state);
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
module.exports = exports = standaloneCode;
|
| 88 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 89 |
+
exports.default = standaloneCode;
|
| 90 |
+
//# sourceMappingURL=index.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/standalone/index.ts"],"names":[],"mappings":";;AAGA,oDAAkG;AAClG,kDAA0F;AAE1F,SAAS,cAAc,CACrB,GAAY,EACZ,UAA2D;IAE3D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;IAC1E,CAAC;IACD,MAAM,EAAC,EAAE,EAAC,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA;IAC3B,OAAO,OAAO,UAAU,IAAI,UAAU;QACpC,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,UAAU,KAAK,SAAS;YAC1B,CAAC,CAAC,gBAAgB,CAAS,UAAU,EAAE,WAAW,CAAC;YACnD,CAAC,CAAC,gBAAgB,CAAY,GAAG,CAAC,OAAO,EAAE,CAA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AAC;QAED,SAAS,YAAY,CAAC,IAAoB,EAAE,KAAqB;YAC/D,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAA;YACrB,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;YACpE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,cAAc,CAAA;AACzC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,cAAc,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Ajv, { AnySchema, AnyValidateFunction, ErrorObject } from "../core";
|
| 2 |
+
export default class AjvPack {
|
| 3 |
+
readonly ajv: Ajv;
|
| 4 |
+
errors?: ErrorObject[] | null;
|
| 5 |
+
constructor(ajv: Ajv);
|
| 6 |
+
validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise<unknown>;
|
| 7 |
+
compile<T = unknown>(schema: AnySchema, meta?: boolean): AnyValidateFunction<T>;
|
| 8 |
+
getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined;
|
| 9 |
+
private getStandalone;
|
| 10 |
+
addSchema(...args: Parameters<typeof Ajv.prototype.addSchema>): AjvPack;
|
| 11 |
+
addKeyword(...args: Parameters<typeof Ajv.prototype.addKeyword>): AjvPack;
|
| 12 |
+
}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const core_1 = require("../core");
|
| 4 |
+
const _1 = require(".");
|
| 5 |
+
const requireFromString = require("require-from-string");
|
| 6 |
+
class AjvPack {
|
| 7 |
+
constructor(ajv) {
|
| 8 |
+
this.ajv = ajv;
|
| 9 |
+
}
|
| 10 |
+
validate(schemaKeyRef, data) {
|
| 11 |
+
return core_1.default.prototype.validate.call(this, schemaKeyRef, data);
|
| 12 |
+
}
|
| 13 |
+
compile(schema, meta) {
|
| 14 |
+
return this.getStandalone(this.ajv.compile(schema, meta));
|
| 15 |
+
}
|
| 16 |
+
getSchema(keyRef) {
|
| 17 |
+
const v = this.ajv.getSchema(keyRef);
|
| 18 |
+
if (!v)
|
| 19 |
+
return undefined;
|
| 20 |
+
return this.getStandalone(v);
|
| 21 |
+
}
|
| 22 |
+
getStandalone(v) {
|
| 23 |
+
return requireFromString((0, _1.default)(this.ajv, v));
|
| 24 |
+
}
|
| 25 |
+
addSchema(...args) {
|
| 26 |
+
this.ajv.addSchema.call(this.ajv, ...args);
|
| 27 |
+
return this;
|
| 28 |
+
}
|
| 29 |
+
addKeyword(...args) {
|
| 30 |
+
this.ajv.addKeyword.call(this.ajv, ...args);
|
| 31 |
+
return this;
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
exports.default = AjvPack;
|
| 35 |
+
//# sourceMappingURL=instance.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/standalone/instance.js.map
ADDED
|
@@ -0,0 +1 @@
|
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { URIComponent } from "fast-uri";
|
| 2 |
+
import type { CodeGen, Code, Name, ScopeValueSets, ValueScopeName } from "../compile/codegen";
|
| 3 |
+
import type { SchemaEnv, SchemaCxt, SchemaObjCxt } from "../compile";
|
| 4 |
+
import type { JSONType } from "../compile/rules";
|
| 5 |
+
import type { KeywordCxt } from "../compile/validate";
|
| 6 |
+
import type Ajv from "../core";
|
| 7 |
+
interface _SchemaObject {
|
| 8 |
+
id?: string;
|
| 9 |
+
$id?: string;
|
| 10 |
+
$schema?: string;
|
| 11 |
+
[x: string]: any;
|
| 12 |
+
}
|
| 13 |
+
export interface SchemaObject extends _SchemaObject {
|
| 14 |
+
id?: string;
|
| 15 |
+
$id?: string;
|
| 16 |
+
$schema?: string;
|
| 17 |
+
$async?: false;
|
| 18 |
+
[x: string]: any;
|
| 19 |
+
}
|
| 20 |
+
export interface AsyncSchema extends _SchemaObject {
|
| 21 |
+
$async: true;
|
| 22 |
+
}
|
| 23 |
+
export type AnySchemaObject = SchemaObject | AsyncSchema;
|
| 24 |
+
export type Schema = SchemaObject | boolean;
|
| 25 |
+
export type AnySchema = Schema | AsyncSchema;
|
| 26 |
+
export type SchemaMap = {
|
| 27 |
+
[Key in string]?: AnySchema;
|
| 28 |
+
};
|
| 29 |
+
export interface SourceCode {
|
| 30 |
+
validateName: ValueScopeName;
|
| 31 |
+
validateCode: string;
|
| 32 |
+
scopeValues: ScopeValueSets;
|
| 33 |
+
evaluated?: Code;
|
| 34 |
+
}
|
| 35 |
+
export interface DataValidationCxt<T extends string | number = string | number> {
|
| 36 |
+
instancePath: string;
|
| 37 |
+
parentData: {
|
| 38 |
+
[K in T]: any;
|
| 39 |
+
};
|
| 40 |
+
parentDataProperty: T;
|
| 41 |
+
rootData: Record<string, any> | any[];
|
| 42 |
+
dynamicAnchors: {
|
| 43 |
+
[Ref in string]?: ValidateFunction;
|
| 44 |
+
};
|
| 45 |
+
}
|
| 46 |
+
export interface ValidateFunction<T = unknown> {
|
| 47 |
+
(this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T;
|
| 48 |
+
errors?: null | ErrorObject[];
|
| 49 |
+
evaluated?: Evaluated;
|
| 50 |
+
schema: AnySchema;
|
| 51 |
+
schemaEnv: SchemaEnv;
|
| 52 |
+
source?: SourceCode;
|
| 53 |
+
}
|
| 54 |
+
export interface JTDParser<T = unknown> {
|
| 55 |
+
(json: string): T | undefined;
|
| 56 |
+
message?: string;
|
| 57 |
+
position?: number;
|
| 58 |
+
}
|
| 59 |
+
export type EvaluatedProperties = {
|
| 60 |
+
[K in string]?: true;
|
| 61 |
+
} | true;
|
| 62 |
+
export type EvaluatedItems = number | true;
|
| 63 |
+
export interface Evaluated {
|
| 64 |
+
props?: EvaluatedProperties;
|
| 65 |
+
items?: EvaluatedItems;
|
| 66 |
+
dynamicProps: boolean;
|
| 67 |
+
dynamicItems: boolean;
|
| 68 |
+
}
|
| 69 |
+
export interface AsyncValidateFunction<T = unknown> extends ValidateFunction<T> {
|
| 70 |
+
(...args: Parameters<ValidateFunction<T>>): Promise<T>;
|
| 71 |
+
$async: true;
|
| 72 |
+
}
|
| 73 |
+
export type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>;
|
| 74 |
+
export interface ErrorObject<K extends string = string, P = Record<string, any>, S = unknown> {
|
| 75 |
+
keyword: K;
|
| 76 |
+
instancePath: string;
|
| 77 |
+
schemaPath: string;
|
| 78 |
+
params: P;
|
| 79 |
+
propertyName?: string;
|
| 80 |
+
message?: string;
|
| 81 |
+
schema?: S;
|
| 82 |
+
parentSchema?: AnySchemaObject;
|
| 83 |
+
data?: unknown;
|
| 84 |
+
}
|
| 85 |
+
export type ErrorNoParams<K extends string, S = unknown> = ErrorObject<K, Record<string, never>, S>;
|
| 86 |
+
interface _KeywordDef {
|
| 87 |
+
keyword: string | string[];
|
| 88 |
+
type?: JSONType | JSONType[];
|
| 89 |
+
schemaType?: JSONType | JSONType[];
|
| 90 |
+
allowUndefined?: boolean;
|
| 91 |
+
$data?: boolean;
|
| 92 |
+
implements?: string[];
|
| 93 |
+
before?: string;
|
| 94 |
+
post?: boolean;
|
| 95 |
+
metaSchema?: AnySchemaObject;
|
| 96 |
+
validateSchema?: AnyValidateFunction;
|
| 97 |
+
dependencies?: string[];
|
| 98 |
+
error?: KeywordErrorDefinition;
|
| 99 |
+
$dataError?: KeywordErrorDefinition;
|
| 100 |
+
}
|
| 101 |
+
export interface CodeKeywordDefinition extends _KeywordDef {
|
| 102 |
+
code: (cxt: KeywordCxt, ruleType?: string) => void;
|
| 103 |
+
trackErrors?: boolean;
|
| 104 |
+
}
|
| 105 |
+
export type MacroKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaCxt) => AnySchema;
|
| 106 |
+
export type CompileKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaObjCxt) => DataValidateFunction;
|
| 107 |
+
export interface DataValidateFunction {
|
| 108 |
+
(...args: Parameters<ValidateFunction>): boolean | Promise<any>;
|
| 109 |
+
errors?: Partial<ErrorObject>[];
|
| 110 |
+
}
|
| 111 |
+
export interface SchemaValidateFunction {
|
| 112 |
+
(schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>;
|
| 113 |
+
errors?: Partial<ErrorObject>[];
|
| 114 |
+
}
|
| 115 |
+
export interface FuncKeywordDefinition extends _KeywordDef {
|
| 116 |
+
validate?: SchemaValidateFunction | DataValidateFunction;
|
| 117 |
+
compile?: CompileKeywordFunc;
|
| 118 |
+
schema?: boolean;
|
| 119 |
+
modifying?: boolean;
|
| 120 |
+
async?: boolean;
|
| 121 |
+
valid?: boolean;
|
| 122 |
+
errors?: boolean | "full";
|
| 123 |
+
}
|
| 124 |
+
export interface MacroKeywordDefinition extends FuncKeywordDefinition {
|
| 125 |
+
macro: MacroKeywordFunc;
|
| 126 |
+
}
|
| 127 |
+
export type KeywordDefinition = CodeKeywordDefinition | FuncKeywordDefinition | MacroKeywordDefinition;
|
| 128 |
+
export type AddedKeywordDefinition = KeywordDefinition & {
|
| 129 |
+
type: JSONType[];
|
| 130 |
+
schemaType: JSONType[];
|
| 131 |
+
};
|
| 132 |
+
export interface KeywordErrorDefinition {
|
| 133 |
+
message: string | Code | ((cxt: KeywordErrorCxt) => string | Code);
|
| 134 |
+
params?: Code | ((cxt: KeywordErrorCxt) => Code);
|
| 135 |
+
}
|
| 136 |
+
export type Vocabulary = (KeywordDefinition | string)[];
|
| 137 |
+
export interface KeywordErrorCxt {
|
| 138 |
+
gen: CodeGen;
|
| 139 |
+
keyword: string;
|
| 140 |
+
data: Name;
|
| 141 |
+
$data?: string | false;
|
| 142 |
+
schema: any;
|
| 143 |
+
parentSchema?: AnySchemaObject;
|
| 144 |
+
schemaCode: Code | number | boolean;
|
| 145 |
+
schemaValue: Code | number | boolean;
|
| 146 |
+
schemaType?: JSONType[];
|
| 147 |
+
errsCount?: Name;
|
| 148 |
+
params: KeywordCxtParams;
|
| 149 |
+
it: SchemaCxt;
|
| 150 |
+
}
|
| 151 |
+
export type KeywordCxtParams = {
|
| 152 |
+
[P in string]?: Code | string | number;
|
| 153 |
+
};
|
| 154 |
+
export type FormatValidator<T extends string | number> = (data: T) => boolean;
|
| 155 |
+
export type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined;
|
| 156 |
+
export type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>;
|
| 157 |
+
export interface FormatDefinition<T extends string | number> {
|
| 158 |
+
type?: T extends string ? "string" | undefined : "number";
|
| 159 |
+
validate: FormatValidator<T> | (T extends string ? string | RegExp : never);
|
| 160 |
+
async?: false | undefined;
|
| 161 |
+
compare?: FormatCompare<T>;
|
| 162 |
+
}
|
| 163 |
+
export interface AsyncFormatDefinition<T extends string | number> {
|
| 164 |
+
type?: T extends string ? "string" | undefined : "number";
|
| 165 |
+
validate: AsyncFormatValidator<T>;
|
| 166 |
+
async: true;
|
| 167 |
+
compare?: FormatCompare<T>;
|
| 168 |
+
}
|
| 169 |
+
export type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>;
|
| 170 |
+
export type Format = AddedFormat | string;
|
| 171 |
+
export interface RegExpEngine {
|
| 172 |
+
(pattern: string, u: string): RegExpLike;
|
| 173 |
+
code: string;
|
| 174 |
+
}
|
| 175 |
+
export interface RegExpLike {
|
| 176 |
+
test: (s: string) => boolean;
|
| 177 |
+
}
|
| 178 |
+
export interface UriResolver {
|
| 179 |
+
parse(uri: string): URIComponent;
|
| 180 |
+
resolve(base: string, path: string): string;
|
| 181 |
+
serialize(component: URIComponent): string;
|
| 182 |
+
}
|
| 183 |
+
export {};
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
//# sourceMappingURL=index.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/types/index.ts"],"names":[],"mappings":""}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.d.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
type StrictNullChecksWrapper<Name extends string, Type> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name}` : Type;
|
| 2 |
+
type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends (_: infer I) => void ? I : never;
|
| 3 |
+
export type SomeJSONSchema = UncheckedJSONSchemaType<Known, true>;
|
| 4 |
+
type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>;
|
| 5 |
+
export type PartialSchema<T> = StrictNullChecksWrapper<"PartialSchema", UncheckedPartialSchema<T>>;
|
| 6 |
+
type JSONType<T extends string, IsPartial extends boolean> = IsPartial extends true ? T | undefined : T;
|
| 7 |
+
interface NumberKeywords {
|
| 8 |
+
minimum?: number;
|
| 9 |
+
maximum?: number;
|
| 10 |
+
exclusiveMinimum?: number;
|
| 11 |
+
exclusiveMaximum?: number;
|
| 12 |
+
multipleOf?: number;
|
| 13 |
+
format?: string;
|
| 14 |
+
}
|
| 15 |
+
interface StringKeywords {
|
| 16 |
+
minLength?: number;
|
| 17 |
+
maxLength?: number;
|
| 18 |
+
pattern?: string;
|
| 19 |
+
format?: string;
|
| 20 |
+
}
|
| 21 |
+
type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (// these two unions allow arbitrary unions of types
|
| 22 |
+
{
|
| 23 |
+
anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[];
|
| 24 |
+
} | {
|
| 25 |
+
oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[];
|
| 26 |
+
} | ({
|
| 27 |
+
type: readonly (T extends number ? JSONType<"number" | "integer", IsPartial> : T extends string ? JSONType<"string", IsPartial> : T extends boolean ? JSONType<"boolean", IsPartial> : never)[];
|
| 28 |
+
} & UnionToIntersection<T extends number ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? {} : never>) | ((T extends number ? {
|
| 29 |
+
type: JSONType<"number" | "integer", IsPartial>;
|
| 30 |
+
} & NumberKeywords : T extends string ? {
|
| 31 |
+
type: JSONType<"string", IsPartial>;
|
| 32 |
+
} & StringKeywords : T extends boolean ? {
|
| 33 |
+
type: JSONType<"boolean", IsPartial>;
|
| 34 |
+
} : T extends readonly [any, ...any[]] ? {
|
| 35 |
+
type: JSONType<"array", IsPartial>;
|
| 36 |
+
items: {
|
| 37 |
+
readonly [K in keyof T]-?: UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>;
|
| 38 |
+
} & {
|
| 39 |
+
length: T["length"];
|
| 40 |
+
};
|
| 41 |
+
minItems: T["length"];
|
| 42 |
+
} & ({
|
| 43 |
+
maxItems: T["length"];
|
| 44 |
+
} | {
|
| 45 |
+
additionalItems: false;
|
| 46 |
+
}) : T extends readonly any[] ? {
|
| 47 |
+
type: JSONType<"array", IsPartial>;
|
| 48 |
+
items: UncheckedJSONSchemaType<T[0], false>;
|
| 49 |
+
contains?: UncheckedPartialSchema<T[0]>;
|
| 50 |
+
minItems?: number;
|
| 51 |
+
maxItems?: number;
|
| 52 |
+
minContains?: number;
|
| 53 |
+
maxContains?: number;
|
| 54 |
+
uniqueItems?: true;
|
| 55 |
+
additionalItems?: never;
|
| 56 |
+
} : T extends Record<string, any> ? {
|
| 57 |
+
type: JSONType<"object", IsPartial>;
|
| 58 |
+
additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>;
|
| 59 |
+
unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>;
|
| 60 |
+
properties?: IsPartial extends true ? Partial<UncheckedPropertiesSchema<T>> : UncheckedPropertiesSchema<T>;
|
| 61 |
+
patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>;
|
| 62 |
+
propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & {
|
| 63 |
+
type?: "string";
|
| 64 |
+
};
|
| 65 |
+
dependencies?: {
|
| 66 |
+
[K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T>;
|
| 67 |
+
};
|
| 68 |
+
dependentRequired?: {
|
| 69 |
+
[K in keyof T]?: readonly (keyof T)[];
|
| 70 |
+
};
|
| 71 |
+
dependentSchemas?: {
|
| 72 |
+
[K in keyof T]?: UncheckedPartialSchema<T>;
|
| 73 |
+
};
|
| 74 |
+
minProperties?: number;
|
| 75 |
+
maxProperties?: number;
|
| 76 |
+
} & (IsPartial extends true ? {
|
| 77 |
+
required: readonly (keyof T)[];
|
| 78 |
+
} : [UncheckedRequiredMembers<T>] extends [never] ? {
|
| 79 |
+
required?: readonly UncheckedRequiredMembers<T>[];
|
| 80 |
+
} : {
|
| 81 |
+
required: readonly UncheckedRequiredMembers<T>[];
|
| 82 |
+
}) : T extends null ? {
|
| 83 |
+
type: JSONType<"null", IsPartial>;
|
| 84 |
+
nullable: true;
|
| 85 |
+
} : never) & {
|
| 86 |
+
allOf?: readonly UncheckedPartialSchema<T>[];
|
| 87 |
+
anyOf?: readonly UncheckedPartialSchema<T>[];
|
| 88 |
+
oneOf?: readonly UncheckedPartialSchema<T>[];
|
| 89 |
+
if?: UncheckedPartialSchema<T>;
|
| 90 |
+
then?: UncheckedPartialSchema<T>;
|
| 91 |
+
else?: UncheckedPartialSchema<T>;
|
| 92 |
+
not?: UncheckedPartialSchema<T>;
|
| 93 |
+
})) & {
|
| 94 |
+
[keyword: string]: any;
|
| 95 |
+
$id?: string;
|
| 96 |
+
$ref?: string;
|
| 97 |
+
$defs?: Record<string, UncheckedJSONSchemaType<Known, true>>;
|
| 98 |
+
definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>;
|
| 99 |
+
};
|
| 100 |
+
export type JSONSchemaType<T> = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType<T, false>>;
|
| 101 |
+
type Known = {
|
| 102 |
+
[key: string]: Known;
|
| 103 |
+
} | [Known, ...Known[]] | Known[] | number | string | boolean | null;
|
| 104 |
+
type UncheckedPropertiesSchema<T> = {
|
| 105 |
+
[K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | {
|
| 106 |
+
$ref: string;
|
| 107 |
+
};
|
| 108 |
+
};
|
| 109 |
+
export type PropertiesSchema<T> = StrictNullChecksWrapper<"PropertiesSchema", UncheckedPropertiesSchema<T>>;
|
| 110 |
+
type UncheckedRequiredMembers<T> = {
|
| 111 |
+
[K in keyof T]-?: undefined extends T[K] ? never : K;
|
| 112 |
+
}[keyof T];
|
| 113 |
+
export type RequiredMembers<T> = StrictNullChecksWrapper<"RequiredMembers", UncheckedRequiredMembers<T>>;
|
| 114 |
+
type Nullable<T> = undefined extends T ? {
|
| 115 |
+
nullable: true;
|
| 116 |
+
const?: null;
|
| 117 |
+
enum?: readonly (T | null)[];
|
| 118 |
+
default?: T | null;
|
| 119 |
+
} : {
|
| 120 |
+
nullable?: false;
|
| 121 |
+
const?: T;
|
| 122 |
+
enum?: readonly T[];
|
| 123 |
+
default?: T;
|
| 124 |
+
};
|
| 125 |
+
export {};
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
//# sourceMappingURL=json-schema.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/json-schema.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../../lib/types/json-schema.ts"],"names":[],"mappings":""}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** numeric strings */
|
| 2 |
+
type NumberType = "float32" | "float64" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32";
|
| 3 |
+
/** string strings */
|
| 4 |
+
type StringType = "string" | "timestamp";
|
| 5 |
+
/** Generic JTD Schema without inference of the represented type */
|
| 6 |
+
export type SomeJTDSchemaType = (// ref
|
| 7 |
+
{
|
| 8 |
+
ref: string;
|
| 9 |
+
} | {
|
| 10 |
+
type: NumberType | StringType | "boolean";
|
| 11 |
+
} | {
|
| 12 |
+
enum: string[];
|
| 13 |
+
} | {
|
| 14 |
+
elements: SomeJTDSchemaType;
|
| 15 |
+
} | {
|
| 16 |
+
values: SomeJTDSchemaType;
|
| 17 |
+
} | {
|
| 18 |
+
properties: Record<string, SomeJTDSchemaType>;
|
| 19 |
+
optionalProperties?: Record<string, SomeJTDSchemaType>;
|
| 20 |
+
additionalProperties?: boolean;
|
| 21 |
+
} | {
|
| 22 |
+
properties?: Record<string, SomeJTDSchemaType>;
|
| 23 |
+
optionalProperties: Record<string, SomeJTDSchemaType>;
|
| 24 |
+
additionalProperties?: boolean;
|
| 25 |
+
} | {
|
| 26 |
+
discriminator: string;
|
| 27 |
+
mapping: Record<string, SomeJTDSchemaType>;
|
| 28 |
+
} | {}) & {
|
| 29 |
+
nullable?: boolean;
|
| 30 |
+
metadata?: Record<string, unknown>;
|
| 31 |
+
definitions?: Record<string, SomeJTDSchemaType>;
|
| 32 |
+
};
|
| 33 |
+
/** required keys of an object, not undefined */
|
| 34 |
+
type RequiredKeys<T> = {
|
| 35 |
+
[K in keyof T]-?: undefined extends T[K] ? never : K;
|
| 36 |
+
}[keyof T];
|
| 37 |
+
/** optional or undifined-able keys of an object */
|
| 38 |
+
type OptionalKeys<T> = {
|
| 39 |
+
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
| 40 |
+
}[keyof T];
|
| 41 |
+
/** type is true if T is a union type */
|
| 42 |
+
type IsUnion_<T, U extends T = T> = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true;
|
| 43 |
+
type IsUnion<T> = IsUnion_<T>;
|
| 44 |
+
/** type is true if T is identically E */
|
| 45 |
+
type TypeEquality<T, E> = [T] extends [E] ? ([E] extends [T] ? true : false) : false;
|
| 46 |
+
/** type is true if T or null is identically E or null*/
|
| 47 |
+
type NullTypeEquality<T, E> = TypeEquality<T | null, E | null>;
|
| 48 |
+
/** gets only the string literals of a type or null if a type isn't a string literal */
|
| 49 |
+
type EnumString<T> = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null;
|
| 50 |
+
/** true if type is a union of string literals */
|
| 51 |
+
type IsEnum<T> = null extends EnumString<T> ? false : true;
|
| 52 |
+
/** true only if all types are array types (not tuples) */
|
| 53 |
+
type IsElements<T> = false extends IsUnion<T> ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false;
|
| 54 |
+
/** true if the the type is a values type */
|
| 55 |
+
type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false;
|
| 56 |
+
/** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */
|
| 57 |
+
type IsRecord<T, Union extends boolean> = Union extends IsUnion<T> ? null extends EnumString<keyof T> ? false : true : false;
|
| 58 |
+
/** true if type represents an empty record */
|
| 59 |
+
type IsEmptyRecord<T> = [T] extends [Record<string, never>] ? [T] extends [never] ? false : true : false;
|
| 60 |
+
/** actual schema */
|
| 61 |
+
export type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = (// refs - where null wasn't specified, must match exactly
|
| 62 |
+
(null extends EnumString<keyof D> ? never : ({
|
| 63 |
+
[K in keyof D]: [T] extends [D[K]] ? {
|
| 64 |
+
ref: K;
|
| 65 |
+
} : never;
|
| 66 |
+
}[keyof D] & {
|
| 67 |
+
nullable?: false;
|
| 68 |
+
}) | (null extends T ? {
|
| 69 |
+
[K in keyof D]: [Exclude<T, null>] extends [Exclude<D[K], null>] ? {
|
| 70 |
+
ref: K;
|
| 71 |
+
} : never;
|
| 72 |
+
}[keyof D] & {
|
| 73 |
+
nullable: true;
|
| 74 |
+
} : never)) | (unknown extends T ? {
|
| 75 |
+
nullable?: boolean;
|
| 76 |
+
} : never) | ((true extends NullTypeEquality<T, number> ? {
|
| 77 |
+
type: NumberType;
|
| 78 |
+
} : true extends NullTypeEquality<T, boolean> ? {
|
| 79 |
+
type: "boolean";
|
| 80 |
+
} : true extends NullTypeEquality<T, string> ? {
|
| 81 |
+
type: StringType;
|
| 82 |
+
} : true extends NullTypeEquality<T, Date> ? {
|
| 83 |
+
type: "timestamp";
|
| 84 |
+
} : true extends IsEnum<Exclude<T, null>> ? {
|
| 85 |
+
enum: EnumString<Exclude<T, null>>[];
|
| 86 |
+
} : true extends IsElements<Exclude<T, null>> ? T extends readonly (infer E)[] ? {
|
| 87 |
+
elements: JTDSchemaType<E, D>;
|
| 88 |
+
} : never : true extends IsEmptyRecord<Exclude<T, null>> ? {
|
| 89 |
+
properties: Record<string, never>;
|
| 90 |
+
optionalProperties?: Record<string, never>;
|
| 91 |
+
} | {
|
| 92 |
+
optionalProperties: Record<string, never>;
|
| 93 |
+
} : true extends IsValues<Exclude<T, null>> ? T extends Record<string, infer V> ? {
|
| 94 |
+
values: JTDSchemaType<V, D>;
|
| 95 |
+
} : never : true extends IsRecord<Exclude<T, null>, false> ? ([RequiredKeys<Exclude<T, null>>] extends [never] ? {
|
| 96 |
+
properties?: Record<string, never>;
|
| 97 |
+
} : {
|
| 98 |
+
properties: {
|
| 99 |
+
[K in RequiredKeys<T>]: JTDSchemaType<T[K], D>;
|
| 100 |
+
};
|
| 101 |
+
}) & ([OptionalKeys<Exclude<T, null>>] extends [never] ? {
|
| 102 |
+
optionalProperties?: Record<string, never>;
|
| 103 |
+
} : {
|
| 104 |
+
optionalProperties: {
|
| 105 |
+
[K in OptionalKeys<T>]: JTDSchemaType<Exclude<T[K], undefined>, D>;
|
| 106 |
+
};
|
| 107 |
+
}) & {
|
| 108 |
+
additionalProperties?: boolean;
|
| 109 |
+
} : true extends IsRecord<Exclude<T, null>, true> ? {
|
| 110 |
+
[K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string ? {
|
| 111 |
+
discriminator: K;
|
| 112 |
+
mapping: {
|
| 113 |
+
[M in Exclude<T, null>[K]]: JTDSchemaType<Omit<T extends Record<K, M> ? T : never, K>, D>;
|
| 114 |
+
};
|
| 115 |
+
} : never;
|
| 116 |
+
}[keyof Exclude<T, null>] : never) & (null extends T ? {
|
| 117 |
+
nullable: true;
|
| 118 |
+
} : {
|
| 119 |
+
nullable?: false;
|
| 120 |
+
}))) & {
|
| 121 |
+
metadata?: Record<string, unknown>;
|
| 122 |
+
definitions?: {
|
| 123 |
+
[K in keyof D]: JTDSchemaType<D[K], D>;
|
| 124 |
+
};
|
| 125 |
+
};
|
| 126 |
+
type JTDDataDef<S, D extends Record<string, unknown>> = // ref
|
| 127 |
+
(S extends {
|
| 128 |
+
ref: string;
|
| 129 |
+
} ? D extends {
|
| 130 |
+
[K in S["ref"]]: infer V;
|
| 131 |
+
} ? JTDDataDef<V, D> : never : S extends {
|
| 132 |
+
type: NumberType;
|
| 133 |
+
} ? number : S extends {
|
| 134 |
+
type: "boolean";
|
| 135 |
+
} ? boolean : S extends {
|
| 136 |
+
type: "string";
|
| 137 |
+
} ? string : S extends {
|
| 138 |
+
type: "timestamp";
|
| 139 |
+
} ? string | Date : S extends {
|
| 140 |
+
enum: readonly (infer E)[];
|
| 141 |
+
} ? string extends E ? never : [E] extends [string] ? E : never : S extends {
|
| 142 |
+
elements: infer E;
|
| 143 |
+
} ? JTDDataDef<E, D>[] : S extends {
|
| 144 |
+
properties: Record<string, unknown>;
|
| 145 |
+
optionalProperties?: Record<string, unknown>;
|
| 146 |
+
additionalProperties?: boolean;
|
| 147 |
+
} ? {
|
| 148 |
+
-readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D>;
|
| 149 |
+
} & {
|
| 150 |
+
-readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D>;
|
| 151 |
+
} & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends {
|
| 152 |
+
properties?: Record<string, unknown>;
|
| 153 |
+
optionalProperties: Record<string, unknown>;
|
| 154 |
+
additionalProperties?: boolean;
|
| 155 |
+
} ? {
|
| 156 |
+
-readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D>;
|
| 157 |
+
} & {
|
| 158 |
+
-readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D>;
|
| 159 |
+
} & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends {
|
| 160 |
+
values: infer V;
|
| 161 |
+
} ? Record<string, JTDDataDef<V, D>> : S extends {
|
| 162 |
+
discriminator: infer M;
|
| 163 |
+
mapping: Record<string, unknown>;
|
| 164 |
+
} ? [M] extends [string] ? {
|
| 165 |
+
[K in keyof S["mapping"]]: JTDDataDef<S["mapping"][K], D> & {
|
| 166 |
+
[KM in M]: K;
|
| 167 |
+
};
|
| 168 |
+
}[keyof S["mapping"]] : never : unknown) | (S extends {
|
| 169 |
+
nullable: true;
|
| 170 |
+
} ? null : never);
|
| 171 |
+
export type JTDDataType<S> = S extends {
|
| 172 |
+
definitions: Record<string, unknown>;
|
| 173 |
+
} ? JTDDataDef<S, S["definitions"]> : JTDDataDef<S, Record<string, never>>;
|
| 174 |
+
export {};
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
//# sourceMappingURL=jtd-schema.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/types/jtd-schema.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"jtd-schema.js","sourceRoot":"","sources":["../../lib/types/jtd-schema.ts"],"names":[],"mappings":""}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
|
| 2 |
+
import type { KeywordCxt } from "../../compile/validate";
|
| 3 |
+
export type AdditionalItemsError = ErrorObject<"additionalItems", {
|
| 4 |
+
limit: number;
|
| 5 |
+
}, AnySchema>;
|
| 6 |
+
declare const def: CodeKeywordDefinition;
|
| 7 |
+
export declare function validateAdditionalItems(cxt: KeywordCxt, items: AnySchema[]): void;
|
| 8 |
+
export default def;
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.validateAdditionalItems = void 0;
|
| 4 |
+
const codegen_1 = require("../../compile/codegen");
|
| 5 |
+
const util_1 = require("../../compile/util");
|
| 6 |
+
const error = {
|
| 7 |
+
message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,
|
| 8 |
+
params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,
|
| 9 |
+
};
|
| 10 |
+
const def = {
|
| 11 |
+
keyword: "additionalItems",
|
| 12 |
+
type: "array",
|
| 13 |
+
schemaType: ["boolean", "object"],
|
| 14 |
+
before: "uniqueItems",
|
| 15 |
+
error,
|
| 16 |
+
code(cxt) {
|
| 17 |
+
const { parentSchema, it } = cxt;
|
| 18 |
+
const { items } = parentSchema;
|
| 19 |
+
if (!Array.isArray(items)) {
|
| 20 |
+
(0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
|
| 21 |
+
return;
|
| 22 |
+
}
|
| 23 |
+
validateAdditionalItems(cxt, items);
|
| 24 |
+
},
|
| 25 |
+
};
|
| 26 |
+
function validateAdditionalItems(cxt, items) {
|
| 27 |
+
const { gen, schema, data, keyword, it } = cxt;
|
| 28 |
+
it.items = true;
|
| 29 |
+
const len = gen.const("len", (0, codegen_1._) `${data}.length`);
|
| 30 |
+
if (schema === false) {
|
| 31 |
+
cxt.setParams({ len: items.length });
|
| 32 |
+
cxt.pass((0, codegen_1._) `${len} <= ${items.length}`);
|
| 33 |
+
}
|
| 34 |
+
else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
| 35 |
+
const valid = gen.var("valid", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var
|
| 36 |
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
|
| 37 |
+
cxt.ok(valid);
|
| 38 |
+
}
|
| 39 |
+
function validateItems(valid) {
|
| 40 |
+
gen.forRange("i", items.length, len, (i) => {
|
| 41 |
+
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
| 42 |
+
if (!it.allErrors)
|
| 43 |
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
| 44 |
+
});
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
exports.validateAdditionalItems = validateAdditionalItems;
|
| 48 |
+
exports.default = def;
|
| 49 |
+
//# sourceMappingURL=additionalItems.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"additionalItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/additionalItems.ts"],"names":[],"mappings":";;;AAOA,mDAAuD;AACvD,6CAA2E;AAI3E,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,2BAA2B,GAAG,QAAQ;IACvE,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,WAAW,GAAG,GAAG;CAChD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,iBAA0B;IACnC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACjC,MAAM,EAAE,aAAa;IACrB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC9B,MAAM,E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,aAAa,CAAC,KAAW;QAChC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;YACzC,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,WAAI,CAAC,GAAG,EAAC,EAAE,KAAK,CAAC,CAAA;YACpE,IAAI,CAAC,EAAE,CAAC,SAAS;gBAAE,GAAG,CAAC,EAAE,CAAC,IAAA,aAAG,EAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;QAC1D,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAnBD,0DAmBC;AAED,kBAAe,GAAG,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { CodeKeywordDefinition, AddedKeywordDefinition, ErrorObject, AnySchema } from "../../types";
|
| 2 |
+
export type AdditionalPropertiesError = ErrorObject<"additionalProperties", {
|
| 3 |
+
additionalProperty: string;
|
| 4 |
+
}, AnySchema>;
|
| 5 |
+
declare const def: CodeKeywordDefinition & AddedKeywordDefinition;
|
| 6 |
+
export default def;
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const code_1 = require("../code");
|
| 4 |
+
const codegen_1 = require("../../compile/codegen");
|
| 5 |
+
const names_1 = require("../../compile/names");
|
| 6 |
+
const util_1 = require("../../compile/util");
|
| 7 |
+
const error = {
|
| 8 |
+
message: "must NOT have additional properties",
|
| 9 |
+
params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`,
|
| 10 |
+
};
|
| 11 |
+
const def = {
|
| 12 |
+
keyword: "additionalProperties",
|
| 13 |
+
type: ["object"],
|
| 14 |
+
schemaType: ["boolean", "object"],
|
| 15 |
+
allowUndefined: true,
|
| 16 |
+
trackErrors: true,
|
| 17 |
+
error,
|
| 18 |
+
code(cxt) {
|
| 19 |
+
const { gen, schema, parentSchema, data, errsCount, it } = cxt;
|
| 20 |
+
/* istanbul ignore if */
|
| 21 |
+
if (!errsCount)
|
| 22 |
+
throw new Error("ajv implementation error");
|
| 23 |
+
const { allErrors, opts } = it;
|
| 24 |
+
it.props = true;
|
| 25 |
+
if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
|
| 26 |
+
return;
|
| 27 |
+
const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
|
| 28 |
+
const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
|
| 29 |
+
checkAdditionalProperties();
|
| 30 |
+
cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
|
| 31 |
+
function checkAdditionalProperties() {
|
| 32 |
+
gen.forIn("key", data, (key) => {
|
| 33 |
+
if (!props.length && !patProps.length)
|
| 34 |
+
additionalPropertyCode(key);
|
| 35 |
+
else
|
| 36 |
+
gen.if(isAdditional(key), () => additionalPropertyCode(key));
|
| 37 |
+
});
|
| 38 |
+
}
|
| 39 |
+
function isAdditional(key) {
|
| 40 |
+
let definedProp;
|
| 41 |
+
if (props.length > 8) {
|
| 42 |
+
// TODO maybe an option instead of hard-coded 8?
|
| 43 |
+
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
|
| 44 |
+
definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
|
| 45 |
+
}
|
| 46 |
+
else if (props.length) {
|
| 47 |
+
definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`));
|
| 48 |
+
}
|
| 49 |
+
else {
|
| 50 |
+
definedProp = codegen_1.nil;
|
| 51 |
+
}
|
| 52 |
+
if (patProps.length) {
|
| 53 |
+
definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
|
| 54 |
+
}
|
| 55 |
+
return (0, codegen_1.not)(definedProp);
|
| 56 |
+
}
|
| 57 |
+
function deleteAdditional(key) {
|
| 58 |
+
gen.code((0, codegen_1._) `delete ${data}[${key}]`);
|
| 59 |
+
}
|
| 60 |
+
function additionalPropertyCode(key) {
|
| 61 |
+
if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) {
|
| 62 |
+
deleteAdditional(key);
|
| 63 |
+
return;
|
| 64 |
+
}
|
| 65 |
+
if (schema === false) {
|
| 66 |
+
cxt.setParams({ additionalProperty: key });
|
| 67 |
+
cxt.error();
|
| 68 |
+
if (!allErrors)
|
| 69 |
+
gen.break();
|
| 70 |
+
return;
|
| 71 |
+
}
|
| 72 |
+
if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
| 73 |
+
const valid = gen.name("valid");
|
| 74 |
+
if (opts.removeAdditional === "failing") {
|
| 75 |
+
applyAdditionalSchema(key, valid, false);
|
| 76 |
+
gen.if((0, codegen_1.not)(valid), () => {
|
| 77 |
+
cxt.reset();
|
| 78 |
+
deleteAdditional(key);
|
| 79 |
+
});
|
| 80 |
+
}
|
| 81 |
+
else {
|
| 82 |
+
applyAdditionalSchema(key, valid);
|
| 83 |
+
if (!allErrors)
|
| 84 |
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
function applyAdditionalSchema(key, valid, errors) {
|
| 89 |
+
const subschema = {
|
| 90 |
+
keyword: "additionalProperties",
|
| 91 |
+
dataProp: key,
|
| 92 |
+
dataPropType: util_1.Type.Str,
|
| 93 |
+
};
|
| 94 |
+
if (errors === false) {
|
| 95 |
+
Object.assign(subschema, {
|
| 96 |
+
compositeRule: true,
|
| 97 |
+
createErrors: false,
|
| 98 |
+
allErrors: false,
|
| 99 |
+
});
|
| 100 |
+
}
|
| 101 |
+
cxt.subschema(subschema, valid);
|
| 102 |
+
}
|
| 103 |
+
},
|
| 104 |
+
};
|
| 105 |
+
exports.default = def;
|
| 106 |
+
//# sourceMappingURL=additionalProperties.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/additionalProperties.ts"],"names":[],"mappings":";;AAOA,kCAAsE;AACtE,mD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AE,CAAC,CAAA;gBACvD,CAAC;YACH,CAAC;QACH,CAAC;QAED,SAAS,qBAAqB,CAAC,GAAS,EAAE,KAAW,EAAE,MAAc;YACnE,MAAM,SAAS,GAAkB;gBAC/B,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,GAAG;gBACb,YAAY,EAAE,WAAI,CAAC,GAAG;aACvB,CAAA;YACD,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;gBACrB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;oBACvB,aAAa,EAAE,IAAI;oBACnB,YAAY,EAAE,KAAK;oBACnB,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAA;YACJ,CAAC;YACD,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { CodeKeywordDefinition } from "../../types";
|
| 2 |
+
declare const def: CodeKeywordDefinition;
|
| 3 |
+
export default def;
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const util_1 = require("../../compile/util");
|
| 4 |
+
const def = {
|
| 5 |
+
keyword: "allOf",
|
| 6 |
+
schemaType: "array",
|
| 7 |
+
code(cxt) {
|
| 8 |
+
const { gen, schema, it } = cxt;
|
| 9 |
+
/* istanbul ignore if */
|
| 10 |
+
if (!Array.isArray(schema))
|
| 11 |
+
throw new Error("ajv implementation error");
|
| 12 |
+
const valid = gen.name("valid");
|
| 13 |
+
schema.forEach((sch, i) => {
|
| 14 |
+
if ((0, util_1.alwaysValidSchema)(it, sch))
|
| 15 |
+
return;
|
| 16 |
+
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
|
| 17 |
+
cxt.ok(valid);
|
| 18 |
+
cxt.mergeEvaluated(schCxt);
|
| 19 |
+
});
|
| 20 |
+
},
|
| 21 |
+
};
|
| 22 |
+
exports.default = def;
|
| 23 |
+
//# sourceMappingURL=allOf.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"allOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/allOf.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AAEpD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC7B,wBAAwB;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACvE,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,MAAM,CAAC,OAAO,CAAC,CAAC,GAAc,EAAE,CAAS,EAAE,EAAE;YAC3C,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,GAAG,CAAC;gBAAE,OAAM;YACtC,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAC,EAAE,KAAK,CAAC,CAAA;YACtE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;YACb,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { CodeKeywordDefinition, ErrorNoParams, AnySchema } from "../../types";
|
| 2 |
+
export type AnyOfError = ErrorNoParams<"anyOf", AnySchema[]>;
|
| 3 |
+
declare const def: CodeKeywordDefinition;
|
| 4 |
+
export default def;
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const code_1 = require("../code");
|
| 4 |
+
const def = {
|
| 5 |
+
keyword: "anyOf",
|
| 6 |
+
schemaType: "array",
|
| 7 |
+
trackErrors: true,
|
| 8 |
+
code: code_1.validateUnion,
|
| 9 |
+
error: { message: "must match a schema in anyOf" },
|
| 10 |
+
};
|
| 11 |
+
exports.default = def;
|
| 12 |
+
//# sourceMappingURL=anyOf.js.map
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/anyOf.ts"],"names":[],"mappings":";;AACA,kCAAqC;AAIrC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,EAAC,OAAO,EAAE,8BAA8B,EAAC;CACjD,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
loan-advisor-chatgpt-app/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
|
| 2 |
+
export type ContainsError = ErrorObject<"contains", {
|
| 3 |
+
minContains: number;
|
| 4 |
+
maxContains?: number;
|
| 5 |
+
}, AnySchema>;
|
| 6 |
+
declare const def: CodeKeywordDefinition;
|
| 7 |
+
export default def;
|