@axdspub/axiom-ui-forms 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/library/axiom-ui-forms.d.ts +21 -4
  2. package/library/esm/_virtual/formats.js +4 -0
  3. package/library/esm/_virtual/formats.js.map +1 -0
  4. package/library/esm/_virtual/index.js +6 -2
  5. package/library/esm/_virtual/index.js.map +1 -1
  6. package/library/esm/_virtual/index10.js +2 -2
  7. package/library/esm/_virtual/index11.js +2 -2
  8. package/library/esm/_virtual/index12.js +2 -2
  9. package/library/esm/_virtual/index13.js +4 -0
  10. package/library/esm/_virtual/index13.js.map +1 -0
  11. package/library/esm/_virtual/index14.js +4 -0
  12. package/library/esm/_virtual/index14.js.map +1 -0
  13. package/library/esm/_virtual/index2.js +2 -2
  14. package/library/esm/_virtual/index3.js +2 -2
  15. package/library/esm/_virtual/index4.js +2 -2
  16. package/library/esm/_virtual/index5.js +2 -2
  17. package/library/esm/_virtual/index5.js.map +1 -1
  18. package/library/esm/_virtual/index6.js +2 -2
  19. package/library/esm/_virtual/index7.js +2 -2
  20. package/library/esm/_virtual/index7.js.map +1 -1
  21. package/library/esm/_virtual/index8.js +2 -2
  22. package/library/esm/_virtual/index9.js +2 -2
  23. package/library/esm/_virtual/limit.js +4 -0
  24. package/library/esm/_virtual/limit.js.map +1 -0
  25. package/library/esm/node_modules/ajv/dist/compile/codegen/index.js +1 -1
  26. package/library/esm/node_modules/ajv/dist/compile/index.js +1 -1
  27. package/library/esm/node_modules/ajv/dist/compile/validate/index.js +1 -1
  28. package/library/esm/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
  29. package/library/esm/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
  30. package/library/esm/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -1
  31. package/library/esm/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  32. package/library/esm/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  33. package/library/esm/node_modules/ajv-formats/dist/formats.js +221 -0
  34. package/library/esm/node_modules/ajv-formats/dist/formats.js.map +1 -0
  35. package/library/esm/node_modules/ajv-formats/dist/index.js +53 -0
  36. package/library/esm/node_modules/ajv-formats/dist/index.js.map +1 -0
  37. package/library/esm/node_modules/ajv-formats/dist/limit.js +84 -0
  38. package/library/esm/node_modules/ajv-formats/dist/limit.js.map +1 -0
  39. package/library/esm/node_modules/fast-uri/index.js +1 -1
  40. package/library/esm/node_modules/json-schema-traverse/index.js +1 -1
  41. package/library/esm/node_modules/react-router/dist/development/chunk-HA7DTUK3.js +1 -1
  42. package/library/esm/node_modules/react-router/node_modules/cookie/dist/index.js +1 -1
  43. package/library/esm/src/Form/Components/FieldCreator.js +0 -1
  44. package/library/esm/src/Form/Components/FieldCreator.js.map +1 -1
  45. package/library/esm/src/Form/Components/Inputs/Constant.js +18 -0
  46. package/library/esm/src/Form/Components/Inputs/Constant.js.map +1 -0
  47. package/library/esm/src/Form/Components/Inputs/OneOfInput.js +9 -0
  48. package/library/esm/src/Form/Components/Inputs/OneOfInput.js.map +1 -0
  49. package/library/esm/src/Form/Components/Inputs/String.js +9 -3
  50. package/library/esm/src/Form/Components/Inputs/String.js.map +1 -1
  51. package/library/esm/src/Form/Components/Inputs/inputMap.js +5 -1
  52. package/library/esm/src/Form/Components/Inputs/inputMap.js.map +1 -1
  53. package/library/esm/src/Form/Creator/FormCreator.js +37 -48
  54. package/library/esm/src/Form/Creator/FormCreator.js.map +1 -1
  55. package/library/esm/src/Form/Creator/Page.js +24 -14
  56. package/library/esm/src/Form/Creator/Page.js.map +1 -1
  57. package/library/esm/src/Form/Creator/Wizard.js +25 -14
  58. package/library/esm/src/Form/Creator/Wizard.js.map +1 -1
  59. package/library/esm/src/Form/helpers.js +11 -1
  60. package/library/esm/src/Form/helpers.js.map +1 -1
  61. package/library/esm/src/Form/schemaToFormHelpers.js +123 -18
  62. package/library/esm/src/Form/schemaToFormHelpers.js.map +1 -1
  63. package/library/esm/src/library.js +1 -1
  64. package/package.json +2 -1
@@ -18,8 +18,8 @@ interface ICompositeValueType {
18
18
  [key: string]: IValueType | IValueType[] | undefined;
19
19
  }
20
20
  type IValueType = undefined | null | ValueOf<IValueTypes>;
21
- type IFormField = ITextField | INumberField | ILongTextField | IJSONField | ISelectField | IRadioField | ICheckboxField | IDateField | ITimeField | IDateTimeField | IBooleanField | IObjectField | IGeoJSONField | IGeometryField | IFormFieldSection | ICustomFIeld;
22
- type IFormFieldType = 'text' | 'long_text' | 'number' | 'json' | 'select' | 'radio' | 'checkbox' | 'date' | 'time' | 'datetime' | 'boolean' | 'object' | 'geojson' | 'geometry' | `custom:${string}`;
21
+ type IFormField = ITextField | IConstantField | INumberField | ILongTextField | IJSONField | ISelectField | IRadioField | ICheckboxField | IDateField | ITimeField | IDateTimeField | IBooleanField | IObjectField | IObjectListField | IOneOfField | IGeoJSONField | IGeometryField | IFormFieldSection | ICustomFIeld;
22
+ type IFormFieldType = 'text' | 'long_text' | 'number' | 'json' | 'select' | 'radio' | 'checkbox' | 'date' | 'time' | 'datetime' | 'boolean' | 'object' | 'objectList' | 'oneOf' | 'geojson' | 'geometry' | `custom:${string}`;
23
23
  type ISectionFormFieldType = 'section' | 'page';
24
24
  interface IFieldConditions {
25
25
  dependsOn: string | string[];
@@ -39,6 +39,10 @@ interface IFormFieldRoot {
39
39
  conditions?: IFieldConditions;
40
40
  settings?: Record<string, unknown>;
41
41
  }
42
+ interface IConstantField extends IFormFieldRoot {
43
+ type: 'constant';
44
+ defaultValue: IValueType;
45
+ }
42
46
  interface INumberValueInput extends IFormFieldRoot {
43
47
  constraints?: {
44
48
  min?: number;
@@ -129,6 +133,16 @@ interface IContainerField extends IFormFieldRoot {
129
133
  interface IObjectField extends IContainerField {
130
134
  type: 'object';
131
135
  }
136
+ interface IObjectListField extends IContainerField {
137
+ type: 'objectList';
138
+ }
139
+ interface IOneOfField extends IContainerField {
140
+ type: 'oneOf';
141
+ discriminator?: {
142
+ mapping?: Record<string, string>;
143
+ propertyName?: string;
144
+ };
145
+ }
132
146
  interface IFormFieldSection extends IContainerField {
133
147
  type: 'section' | 'page';
134
148
  }
@@ -237,6 +251,7 @@ declare function updateFormValuesWithFieldValueInPlace(field: IFormField, newVal
237
251
  declare function updateFormValuesWithFieldValue(field: IFormField, newValue: IValueType | IValueType[], formValues: IFormValues): IFormValues;
238
252
  declare const makeJsonPath: (field: IFormField, index?: number) => string;
239
253
  declare const calculateSectionStatus: (sections: IFormSection[], formValueState: IFormValueState) => IFormSectionStatus;
254
+ declare const assignDefaultValuesToFormValues: (form: IForm, formValues: IFormValues) => IFormValues;
240
255
 
241
256
  interface IFieldCreator {
242
257
  field: IFormField;
@@ -276,14 +291,16 @@ declare const validateAgainstSchema: (schema: JSONSchema6, formValues: IFormValu
276
291
  declare const getValueFromSchema: (schema: JSONSchema6Type | JSONSchema6Definition | undefined) => string | number | boolean | undefined;
277
292
  declare const getLabelFromSchema: (schema: JSONSchema6Type | JSONSchema6Definition | undefined) => string | undefined;
278
293
  declare const schemaToFormObject: (schema: JSONSchema6) => IForm;
294
+ declare const getSchemaPaths: (schema: any, prefix?: string) => string[];
279
295
 
280
296
  declare const schemaToFormHelpers_getLabelFromSchema: typeof getLabelFromSchema;
297
+ declare const schemaToFormHelpers_getSchemaPaths: typeof getSchemaPaths;
281
298
  declare const schemaToFormHelpers_getValueFromSchema: typeof getValueFromSchema;
282
299
  declare const schemaToFormHelpers_schemaToFormObject: typeof schemaToFormObject;
283
300
  declare const schemaToFormHelpers_validateAgainstSchema: typeof validateAgainstSchema;
284
301
  declare const schemaToFormHelpers_validateSchema: typeof validateSchema;
285
302
  declare namespace schemaToFormHelpers {
286
- export { schemaToFormHelpers_getLabelFromSchema as getLabelFromSchema, schemaToFormHelpers_getValueFromSchema as getValueFromSchema, schemaToFormHelpers_schemaToFormObject as schemaToFormObject, schemaToFormHelpers_validateAgainstSchema as validateAgainstSchema, schemaToFormHelpers_validateSchema as validateSchema };
303
+ export { schemaToFormHelpers_getLabelFromSchema as getLabelFromSchema, schemaToFormHelpers_getSchemaPaths as getSchemaPaths, schemaToFormHelpers_getValueFromSchema as getValueFromSchema, schemaToFormHelpers_schemaToFormObject as schemaToFormObject, schemaToFormHelpers_validateAgainstSchema as validateAgainstSchema, schemaToFormHelpers_validateSchema as validateSchema };
287
304
  }
288
305
 
289
- export { BooleanInput, DateInput, DateTimeInput, FieldCreator, FormCreator, GeoJSONInputLoader as GeoJSONInput, type IBooleanField, type ICheckboxField, type ICompositeValueType, type IFieldInputProps, type IForm, type IFormField, type IFormFieldPage, type IFormFieldProps, type IFormFieldSection, type IFormFieldType, type IFormInputComponent, type IFormSection, type IFormValueState, type IFormValues, type IFormWithPages, type INumberField, type IObjectField, type IPage, type IRadioField, type ISectionFormFieldType, type ISelectField, type IValueChangeFn, type IValueType, type IWizardStep, JSONStringInput, LongStringInput as LongTextInput, NumberInput, SingleSelectInput as SelectInput, StringInput as TextInput, TimeInput, addFieldPath, calculateSectionStatus, checkCondition, cleanUnusedDependenciesFromFormValues, copyAndAddPathToFields, getChildFields, getFieldValue, getFields, getFieldsFromFormSection, getPathFromField, getUniqueFormFields, makeJsonPath, schemaToFormHelpers as schemToFormHelpers, updateFormValuesWithFieldValue, updateFormValuesWithFieldValueInPlace };
306
+ export { BooleanInput, DateInput, DateTimeInput, FieldCreator, FormCreator, GeoJSONInputLoader as GeoJSONInput, type IBooleanField, type ICheckboxField, type ICompositeValueType, type IConstantField, type IFieldInputProps, type IForm, type IFormField, type IFormFieldPage, type IFormFieldProps, type IFormFieldSection, type IFormFieldType, type IFormInputComponent, type IFormSection, type IFormValueState, type IFormValues, type IFormWithPages, type INumberField, type IObjectField, type IObjectListField, type IOneOfField, type IPage, type IRadioField, type ISectionFormFieldType, type ISelectField, type IValueChangeFn, type IValueType, type IWizardStep, JSONStringInput, LongStringInput as LongTextInput, NumberInput, SingleSelectInput as SelectInput, StringInput as TextInput, TimeInput, addFieldPath, assignDefaultValuesToFormValues, calculateSectionStatus, checkCondition, cleanUnusedDependenciesFromFormValues, copyAndAddPathToFields, getChildFields, getFieldValue, getFields, getFieldsFromFormSection, getPathFromField, getUniqueFormFields, makeJsonPath, schemaToFormHelpers as schemToFormHelpers, updateFormValuesWithFieldValue, updateFormValuesWithFieldValueInPlace };
@@ -0,0 +1,4 @@
1
+ var formats = {};
2
+
3
+ export { formats as __exports };
4
+ //# sourceMappingURL=formats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formats.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,8 @@
1
- var discriminator = {};
1
+ import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
2
+ import { __require as requireDist } from '../node_modules/ajv-formats/dist/index.js';
2
3
 
3
- export { discriminator as __exports };
4
+ var distExports = requireDist();
5
+ var addFormats = /*@__PURE__*/getDefaultExportFromCjs(distExports);
6
+
7
+ export { addFormats as default };
4
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,4 +1,4 @@
1
- var jsonSchemaTraverse = {exports: {}};
1
+ var applicator = {};
2
2
 
3
- export { jsonSchemaTraverse as __module };
3
+ export { applicator as __exports };
4
4
  //# sourceMappingURL=index10.js.map
@@ -1,4 +1,4 @@
1
- var fastUri = {exports: {}};
1
+ var format = {};
2
2
 
3
- export { fastUri as __module };
3
+ export { format as __exports };
4
4
  //# sourceMappingURL=index11.js.map
@@ -1,4 +1,4 @@
1
- var dist = {};
1
+ var jsonSchemaTraverse = {exports: {}};
2
2
 
3
- export { dist as __exports };
3
+ export { jsonSchemaTraverse as __module };
4
4
  //# sourceMappingURL=index12.js.map
@@ -0,0 +1,4 @@
1
+ var fastUri = {exports: {}};
2
+
3
+ export { fastUri as __module };
4
+ //# sourceMappingURL=index13.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index13.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var dist = {};
2
+
3
+ export { dist as __exports };
4
+ //# sourceMappingURL=index14.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index14.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,4 @@
1
- var validate = {};
1
+ var dist = {exports: {}};
2
2
 
3
- export { validate as __exports };
3
+ export { dist as __module };
4
4
  //# sourceMappingURL=index2.js.map
@@ -1,4 +1,4 @@
1
- var codegen = {};
1
+ var validate = {};
2
2
 
3
- export { codegen as __exports };
3
+ export { validate as __exports };
4
4
  //# sourceMappingURL=index3.js.map
@@ -1,4 +1,4 @@
1
- var compile = {};
1
+ var discriminator = {};
2
2
 
3
- export { compile as __exports };
3
+ export { discriminator as __exports };
4
4
  //# sourceMappingURL=index4.js.map
@@ -1,4 +1,4 @@
1
- import { __require as requireDist } from '../node_modules/react-router/node_modules/cookie/dist/index.js';
1
+ var codegen = {};
2
2
 
3
- requireDist();
3
+ export { codegen as __exports };
4
4
  //# sourceMappingURL=index5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,4 @@
1
- var core = {};
1
+ var compile = {};
2
2
 
3
- export { core as __exports };
3
+ export { compile as __exports };
4
4
  //# sourceMappingURL=index6.js.map
@@ -1,4 +1,4 @@
1
- var validation = {};
1
+ import { __require as requireDist } from '../node_modules/react-router/node_modules/cookie/dist/index.js';
2
2
 
3
- export { validation as __exports };
3
+ requireDist();
4
4
  //# sourceMappingURL=index7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,4 +1,4 @@
1
- var applicator = {};
1
+ var validation = {};
2
2
 
3
- export { applicator as __exports };
3
+ export { validation as __exports };
4
4
  //# sourceMappingURL=index8.js.map
@@ -1,4 +1,4 @@
1
- var format = {};
1
+ var core = {};
2
2
 
3
- export { format as __exports };
3
+ export { core as __exports };
4
4
  //# sourceMappingURL=index9.js.map
@@ -0,0 +1,4 @@
1
+ var limit = {};
2
+
3
+ export { limit as __exports };
4
+ //# sourceMappingURL=limit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limit.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,4 @@
1
- import { __exports as codegen } from '../../../../../_virtual/index3.js';
1
+ import { __exports as codegen } from '../../../../../_virtual/index5.js';
2
2
  import { __require as requireCode } from './code.js';
3
3
  import { __require as requireScope } from './scope.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as compile } from '../../../../_virtual/index4.js';
1
+ import { __exports as compile } from '../../../../_virtual/index6.js';
2
2
  import { __require as requireCodegen } from './codegen/index.js';
3
3
  import { __require as requireValidation_error } from '../runtime/validation_error.js';
4
4
  import { __require as requireNames } from './names.js';
@@ -1,4 +1,4 @@
1
- import { __exports as validate } from '../../../../../_virtual/index2.js';
1
+ import { __exports as validate } from '../../../../../_virtual/index3.js';
2
2
  import { __require as requireBoolSchema } from './boolSchema.js';
3
3
  import { __require as requireDataType } from './dataType.js';
4
4
  import { __require as requireApplicability } from './applicability.js';
@@ -1,4 +1,4 @@
1
- import { __exports as applicator } from '../../../../../_virtual/index8.js';
1
+ import { __exports as applicator } from '../../../../../_virtual/index10.js';
2
2
  import { __require as requireAdditionalItems } from './additionalItems.js';
3
3
  import { __require as requirePrefixItems } from './prefixItems.js';
4
4
  import { __require as requireItems } from './items.js';
@@ -1,4 +1,4 @@
1
- import { __exports as core } from '../../../../../_virtual/index6.js';
1
+ import { __exports as core } from '../../../../../_virtual/index9.js';
2
2
  import { __require as requireId } from './id.js';
3
3
  import { __require as requireRef } from './ref.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as discriminator } from '../../../../../_virtual/index.js';
1
+ import { __exports as discriminator } from '../../../../../_virtual/index4.js';
2
2
  import { __require as requireCodegen } from '../../compile/codegen/index.js';
3
3
  import { __require as requireTypes } from './types.js';
4
4
  import { __require as requireCompile } from '../../compile/index.js';
@@ -1,4 +1,4 @@
1
- import { __exports as format } from '../../../../../_virtual/index9.js';
1
+ import { __exports as format } from '../../../../../_virtual/index11.js';
2
2
  import { __require as requireFormat$1 } from './format.js';
3
3
 
4
4
  var hasRequiredFormat;
@@ -1,4 +1,4 @@
1
- import { __exports as validation } from '../../../../../_virtual/index7.js';
1
+ import { __exports as validation } from '../../../../../_virtual/index8.js';
2
2
  import { __require as requireLimitNumber } from './limitNumber.js';
3
3
  import { __require as requireMultipleOf } from './multipleOf.js';
4
4
  import { __require as requireLimitLength } from './limitLength.js';
@@ -0,0 +1,221 @@
1
+ import { __exports as formats } from '../../../_virtual/formats.js';
2
+
3
+ var hasRequiredFormats;
4
+
5
+ function requireFormats () {
6
+ if (hasRequiredFormats) return formats;
7
+ hasRequiredFormats = 1;
8
+ (function (exports) {
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
11
+ function fmtDef(validate, compare) {
12
+ return { validate, compare };
13
+ }
14
+ exports.fullFormats = {
15
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
16
+ date: fmtDef(date, compareDate),
17
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
18
+ time: fmtDef(getTime(true), compareTime),
19
+ "date-time": fmtDef(getDateTime(true), compareDateTime),
20
+ "iso-time": fmtDef(getTime(), compareIsoTime),
21
+ "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
22
+ // duration: https://tools.ietf.org/html/rfc3339#appendix-A
23
+ duration: /^P(?!$)((\d+Y)?(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z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
26
+ // uri-template: https://tools.ietf.org/html/rfc6570
27
+ "uri-template": /^(?:(?:[^\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,
28
+ // For the source: https://gist.github.com/dperini/729294
29
+ // For test cases: https://mathiasbynens.be/demo/url-regex
30
+ 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,
31
+ 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,
32
+ 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,
33
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
34
+ 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)$/,
35
+ 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,
36
+ regex,
37
+ // uuid: http://tools.ietf.org/html/rfc4122
38
+ uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
39
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
40
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
41
+ "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
42
+ "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
43
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
44
+ "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
45
+ // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
46
+ // byte: https://github.com/miguelmota/is-base64
47
+ byte,
48
+ // signed 32 bit integer
49
+ int32: { type: "number", validate: validateInt32 },
50
+ // signed 64 bit integer
51
+ int64: { type: "number", validate: validateInt64 },
52
+ // C-type float
53
+ float: { type: "number", validate: validateNumber },
54
+ // C-type double
55
+ double: { type: "number", validate: validateNumber },
56
+ // hint to the UI to hide input strings
57
+ password: true,
58
+ // unchecked string payload
59
+ binary: true,
60
+ };
61
+ exports.fastFormats = {
62
+ ...exports.fullFormats,
63
+ date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
64
+ time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
65
+ "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),
66
+ "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
67
+ "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),
68
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
69
+ uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
70
+ "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
71
+ // email (sources from jsen validator):
72
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
73
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
74
+ 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,
75
+ };
76
+ exports.formatNames = Object.keys(exports.fullFormats);
77
+ function isLeapYear(year) {
78
+ // https://tools.ietf.org/html/rfc3339#appendix-C
79
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
80
+ }
81
+ const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
82
+ const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
83
+ function date(str) {
84
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
85
+ const matches = DATE.exec(str);
86
+ if (!matches)
87
+ return false;
88
+ const year = +matches[1];
89
+ const month = +matches[2];
90
+ const day = +matches[3];
91
+ return (month >= 1 &&
92
+ month <= 12 &&
93
+ day >= 1 &&
94
+ day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]));
95
+ }
96
+ function compareDate(d1, d2) {
97
+ if (!(d1 && d2))
98
+ return undefined;
99
+ if (d1 > d2)
100
+ return 1;
101
+ if (d1 < d2)
102
+ return -1;
103
+ return 0;
104
+ }
105
+ const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
106
+ function getTime(strictTimeZone) {
107
+ return function time(str) {
108
+ const matches = TIME.exec(str);
109
+ if (!matches)
110
+ return false;
111
+ const hr = +matches[1];
112
+ const min = +matches[2];
113
+ const sec = +matches[3];
114
+ const tz = matches[4];
115
+ const tzSign = matches[5] === "-" ? -1 : 1;
116
+ const tzH = +(matches[6] || 0);
117
+ const tzM = +(matches[7] || 0);
118
+ if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz))
119
+ return false;
120
+ if (hr <= 23 && min <= 59 && sec < 60)
121
+ return true;
122
+ // leap second
123
+ const utcMin = min - tzM * tzSign;
124
+ const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
125
+ return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
126
+ };
127
+ }
128
+ function compareTime(s1, s2) {
129
+ if (!(s1 && s2))
130
+ return undefined;
131
+ const t1 = new Date("2020-01-01T" + s1).valueOf();
132
+ const t2 = new Date("2020-01-01T" + s2).valueOf();
133
+ if (!(t1 && t2))
134
+ return undefined;
135
+ return t1 - t2;
136
+ }
137
+ function compareIsoTime(t1, t2) {
138
+ if (!(t1 && t2))
139
+ return undefined;
140
+ const a1 = TIME.exec(t1);
141
+ const a2 = TIME.exec(t2);
142
+ if (!(a1 && a2))
143
+ return undefined;
144
+ t1 = a1[1] + a1[2] + a1[3];
145
+ t2 = a2[1] + a2[2] + a2[3];
146
+ if (t1 > t2)
147
+ return 1;
148
+ if (t1 < t2)
149
+ return -1;
150
+ return 0;
151
+ }
152
+ const DATE_TIME_SEPARATOR = /t|\s/i;
153
+ function getDateTime(strictTimeZone) {
154
+ const time = getTime(strictTimeZone);
155
+ return function date_time(str) {
156
+ // http://tools.ietf.org/html/rfc3339#section-5.6
157
+ const dateTime = str.split(DATE_TIME_SEPARATOR);
158
+ return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
159
+ };
160
+ }
161
+ function compareDateTime(dt1, dt2) {
162
+ if (!(dt1 && dt2))
163
+ return undefined;
164
+ const d1 = new Date(dt1).valueOf();
165
+ const d2 = new Date(dt2).valueOf();
166
+ if (!(d1 && d2))
167
+ return undefined;
168
+ return d1 - d2;
169
+ }
170
+ function compareIsoDateTime(dt1, dt2) {
171
+ if (!(dt1 && dt2))
172
+ return undefined;
173
+ const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
174
+ const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
175
+ const res = compareDate(d1, d2);
176
+ if (res === undefined)
177
+ return undefined;
178
+ return res || compareTime(t1, t2);
179
+ }
180
+ const NOT_URI_FRAGMENT = /\/|:/;
181
+ 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;
182
+ function uri(str) {
183
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
184
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
185
+ }
186
+ const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
187
+ function byte(str) {
188
+ BYTE.lastIndex = 0;
189
+ return BYTE.test(str);
190
+ }
191
+ const MIN_INT32 = -2147483648;
192
+ const MAX_INT32 = 2 ** 31 - 1;
193
+ function validateInt32(value) {
194
+ return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
195
+ }
196
+ function validateInt64(value) {
197
+ // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64
198
+ return Number.isInteger(value);
199
+ }
200
+ function validateNumber() {
201
+ return true;
202
+ }
203
+ const Z_ANCHOR = /[^\\]\\Z/;
204
+ function regex(str) {
205
+ if (Z_ANCHOR.test(str))
206
+ return false;
207
+ try {
208
+ new RegExp(str);
209
+ return true;
210
+ }
211
+ catch (e) {
212
+ return false;
213
+ }
214
+ }
215
+
216
+ } (formats));
217
+ return formats;
218
+ }
219
+
220
+ export { requireFormats as __require };
221
+ //# sourceMappingURL=formats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formats.js","sources":["../../../../../node_modules/ajv-formats/dist/formats.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatNames = exports.fastFormats = exports.fullFormats = void 0;\nfunction fmtDef(validate, compare) {\n return { validate, compare };\n}\nexports.fullFormats = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: fmtDef(date, compareDate),\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: fmtDef(getTime(true), compareTime),\n \"date-time\": fmtDef(getDateTime(true), compareDateTime),\n \"iso-time\": fmtDef(getTime(), compareIsoTime),\n \"iso-date-time\": fmtDef(getDateTime(), compareIsoDateTime),\n // duration: https://tools.ietf.org/html/rfc3339#appendix-A\n duration: /^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,\n uri,\n \"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]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?: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9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,\n // For the source: https://gist.github.com/dperini/729294\n // For test cases: https://mathiasbynens.be/demo/url-regex\n 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,\n 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,\n 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,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n 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)$/,\n 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,\n regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n \"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n \"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n \"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types\n // byte: https://github.com/miguelmota/is-base64\n byte,\n // signed 32 bit integer\n int32: { type: \"number\", validate: validateInt32 },\n // signed 64 bit integer\n int64: { type: \"number\", validate: validateInt64 },\n // C-type float\n float: { type: \"number\", validate: validateNumber },\n // C-type double\n double: { type: \"number\", validate: validateNumber },\n // hint to the UI to hide input strings\n password: true,\n // unchecked string payload\n binary: true,\n};\nexports.fastFormats = {\n ...exports.fullFormats,\n date: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n time: fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareTime),\n \"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),\n \"iso-time\": fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoTime),\n \"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),\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n \"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')\n 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,\n};\nexports.formatNames = Object.keys(exports.fullFormats);\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nconst DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n const matches = DATE.exec(str);\n if (!matches)\n return false;\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n return (month >= 1 &&\n month <= 12 &&\n day >= 1 &&\n day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]));\n}\nfunction compareDate(d1, d2) {\n if (!(d1 && d2))\n return undefined;\n if (d1 > d2)\n return 1;\n if (d1 < d2)\n return -1;\n return 0;\n}\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;\nfunction getTime(strictTimeZone) {\n return function time(str) {\n const matches = TIME.exec(str);\n if (!matches)\n return false;\n const hr = +matches[1];\n const min = +matches[2];\n const sec = +matches[3];\n const tz = matches[4];\n const tzSign = matches[5] === \"-\" ? -1 : 1;\n const tzH = +(matches[6] || 0);\n const tzM = +(matches[7] || 0);\n if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz))\n return false;\n if (hr <= 23 && min <= 59 && sec < 60)\n return true;\n // leap second\n const utcMin = min - tzM * tzSign;\n const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);\n return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;\n };\n}\nfunction compareTime(s1, s2) {\n if (!(s1 && s2))\n return undefined;\n const t1 = new Date(\"2020-01-01T\" + s1).valueOf();\n const t2 = new Date(\"2020-01-01T\" + s2).valueOf();\n if (!(t1 && t2))\n return undefined;\n return t1 - t2;\n}\nfunction compareIsoTime(t1, t2) {\n if (!(t1 && t2))\n return undefined;\n const a1 = TIME.exec(t1);\n const a2 = TIME.exec(t2);\n if (!(a1 && a2))\n return undefined;\n t1 = a1[1] + a1[2] + a1[3];\n t2 = a2[1] + a2[2] + a2[3];\n if (t1 > t2)\n return 1;\n if (t1 < t2)\n return -1;\n return 0;\n}\nconst DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction getDateTime(strictTimeZone) {\n const time = getTime(strictTimeZone);\n return function date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n const dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);\n };\n}\nfunction compareDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const d1 = new Date(dt1).valueOf();\n const d2 = new Date(dt2).valueOf();\n if (!(d1 && d2))\n return undefined;\n return d1 - d2;\n}\nfunction compareIsoDateTime(dt1, dt2) {\n if (!(dt1 && dt2))\n return undefined;\n const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);\n const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);\n const res = compareDate(d1, d2);\n if (res === undefined)\n return undefined;\n return res || compareTime(t1, t2);\n}\nconst NOT_URI_FRAGMENT = /\\/|:/;\nconst 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;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\nconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;\nfunction byte(str) {\n BYTE.lastIndex = 0;\n return BYTE.test(str);\n}\nconst MIN_INT32 = -(2 ** 31);\nconst MAX_INT32 = 2 ** 31 - 1;\nfunction validateInt32(value) {\n return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n}\nfunction validateInt64(value) {\n // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64\n return Number.isInteger(value);\n}\nfunction validateNumber() {\n return true;\n}\nconst Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str))\n return false;\n try {\n new RegExp(str);\n return true;\n }\n catch (e) {\n return false;\n }\n}\n//# sourceMappingURL=formats.js.map"],"names":[],"mappings":";;;;;;;;EACA,MAAM,CAAC,cAAc,CAAA,OAAA,EAAU,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;EAC7D,OAAsB,CAAA,WAAA,GAAA,OAAA,CAAA,WAAA,GAAsB,OAAsB,CAAA,WAAA,GAAA,MAAM;AACxE,EAAA,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,MAAI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE;AAChC;EACA,OAAsB,CAAA,WAAA,GAAA;AAC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AAC,GAAG,EAAE;AACpB,MAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1B,UAAQ,OAAO,KAAK;AACpB,MAAI,IAAI;AACR,UAAQ,IAAI,MAAM,CAAC,GAAG,CAAC;AACvB,UAAQ,OAAO,IAAI;AACnB;MACI,OAAO,CAAC,EAAE;AACd,UAAQ,OAAO,KAAK;AACpB;AACA;AACA;;;;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,53 @@
1
+ import { __module as dist } from '../../../_virtual/index2.js';
2
+ import { __require as requireFormats } from './formats.js';
3
+ import { __require as requireLimit } from './limit.js';
4
+ import { __require as requireCodegen } from '../../ajv/dist/compile/codegen/index.js';
5
+
6
+ var hasRequiredDist;
7
+
8
+ function requireDist () {
9
+ if (hasRequiredDist) return dist.exports;
10
+ hasRequiredDist = 1;
11
+ (function (module, exports) {
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ const formats_1 = requireFormats();
14
+ const limit_1 = requireLimit();
15
+ const codegen_1 = requireCodegen();
16
+ const fullName = new codegen_1.Name("fullFormats");
17
+ const fastName = new codegen_1.Name("fastFormats");
18
+ const formatsPlugin = (ajv, opts = { keywords: true }) => {
19
+ if (Array.isArray(opts)) {
20
+ addFormats(ajv, opts, formats_1.fullFormats, fullName);
21
+ return ajv;
22
+ }
23
+ const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
24
+ const list = opts.formats || formats_1.formatNames;
25
+ addFormats(ajv, list, formats, exportName);
26
+ if (opts.keywords)
27
+ (0, limit_1.default)(ajv);
28
+ return ajv;
29
+ };
30
+ formatsPlugin.get = (name, mode = "full") => {
31
+ const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
32
+ const f = formats[name];
33
+ if (!f)
34
+ throw new Error(`Unknown format "${name}"`);
35
+ return f;
36
+ };
37
+ function addFormats(ajv, list, fs, exportName) {
38
+ var _a;
39
+ var _b;
40
+ (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require("ajv-formats/dist/formats").${exportName}`);
41
+ for (const f of list)
42
+ ajv.addFormat(f, fs[f]);
43
+ }
44
+ module.exports = exports = formatsPlugin;
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.default = formatsPlugin;
47
+
48
+ } (dist, dist.exports));
49
+ return dist.exports;
50
+ }
51
+
52
+ export { requireDist as __require };
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/ajv-formats/dist/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst formats_1 = require(\"./formats\");\nconst limit_1 = require(\"./limit\");\nconst codegen_1 = require(\"ajv/dist/compile/codegen\");\nconst fullName = new codegen_1.Name(\"fullFormats\");\nconst fastName = new codegen_1.Name(\"fastFormats\");\nconst formatsPlugin = (ajv, opts = { keywords: true }) => {\n if (Array.isArray(opts)) {\n addFormats(ajv, opts, formats_1.fullFormats, fullName);\n return ajv;\n }\n const [formats, exportName] = opts.mode === \"fast\" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];\n const list = opts.formats || formats_1.formatNames;\n addFormats(ajv, list, formats, exportName);\n if (opts.keywords)\n (0, limit_1.default)(ajv);\n return ajv;\n};\nformatsPlugin.get = (name, mode = \"full\") => {\n const formats = mode === \"fast\" ? formats_1.fastFormats : formats_1.fullFormats;\n const f = formats[name];\n if (!f)\n throw new Error(`Unknown format \"${name}\"`);\n return f;\n};\nfunction addFormats(ajv, list, fs, exportName) {\n var _a;\n var _b;\n (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require(\"ajv-formats/dist/formats\").${exportName}`);\n for (const f of list)\n ajv.addFormat(f, fs[f]);\n}\nmodule.exports = exports = formatsPlugin;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = formatsPl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