@tsed/schema 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/esm/components/default/anyMapper.js +2 -2
- package/lib/esm/components/default/anyMapper.js.map +1 -1
- package/lib/esm/components/default/inheritedClassMapper.js +16 -2
- package/lib/esm/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/esm/decorators/common/labelledAs.js +35 -0
- package/lib/esm/decorators/common/labelledAs.js.map +1 -0
- package/lib/esm/decorators/generics/genericOf.js +1 -1
- package/lib/esm/decorators/generics/genericOf.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js +1 -1
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/fn/allOf.js +12 -0
- package/lib/esm/fn/allOf.js.map +1 -0
- package/lib/esm/fn/any.js +10 -0
- package/lib/esm/fn/any.js.map +1 -0
- package/lib/esm/fn/anyOf.js +12 -0
- package/lib/esm/fn/anyOf.js.map +1 -0
- package/lib/esm/fn/boolean.js +10 -0
- package/lib/esm/fn/boolean.js.map +1 -0
- package/lib/esm/fn/collection.js +50 -0
- package/lib/esm/fn/collection.js.map +1 -0
- package/lib/esm/fn/date.js +27 -0
- package/lib/esm/fn/date.js.map +1 -0
- package/lib/esm/fn/email.js +18 -0
- package/lib/esm/fn/email.js.map +1 -0
- package/lib/esm/fn/enums.js +8 -0
- package/lib/esm/fn/enums.js.map +1 -0
- package/lib/esm/fn/from.js +28 -0
- package/lib/esm/fn/from.js.map +1 -0
- package/lib/esm/fn/integer.js +13 -0
- package/lib/esm/fn/integer.js.map +1 -0
- package/lib/esm/fn/lazyRef.js +17 -0
- package/lib/esm/fn/lazyRef.js.map +1 -0
- package/lib/esm/fn/number.js +10 -0
- package/lib/esm/fn/number.js.map +1 -0
- package/lib/esm/fn/object.js +22 -0
- package/lib/esm/fn/object.js.map +1 -0
- package/lib/esm/fn/oneOf.js +13 -0
- package/lib/esm/fn/oneOf.js.map +1 -0
- package/lib/esm/fn/string.js +10 -0
- package/lib/esm/fn/string.js.map +1 -0
- package/lib/esm/fn/uri.js +13 -0
- package/lib/esm/fn/uri.js.map +1 -0
- package/lib/esm/fn/url.js +11 -0
- package/lib/esm/fn/url.js.map +1 -0
- package/lib/esm/index.js +18 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/types/decorators/common/labelledAs.d.ts +24 -0
- package/lib/types/fn/allOf.d.ts +9 -0
- package/lib/types/fn/any.d.ts +7 -0
- package/lib/types/fn/anyOf.d.ts +9 -0
- package/lib/types/fn/boolean.d.ts +7 -0
- package/lib/types/fn/collection.d.ts +43 -0
- package/lib/types/fn/date.d.ts +19 -0
- package/lib/types/fn/email.d.ts +14 -0
- package/lib/types/fn/enums.d.ts +1 -0
- package/lib/types/fn/from.d.ts +14 -0
- package/lib/types/fn/integer.d.ts +10 -0
- package/lib/types/fn/lazyRef.d.ts +5 -0
- package/lib/types/fn/number.d.ts +6 -0
- package/lib/types/fn/object.d.ts +21 -0
- package/lib/types/fn/oneOf.d.ts +10 -0
- package/lib/types/fn/string.d.ts +7 -0
- package/lib/types/fn/uri.d.ts +9 -0
- package/lib/types/fn/url.d.ts +7 -0
- package/lib/types/index.d.ts +18 -1
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +1 -1
- package/package.json +10 -10
- package/src/components/default/anyMapper.ts +2 -2
- package/src/components/default/inheritedClassMapper.ts +19 -2
- package/src/decorators/collections/collectionOf.spec.ts +2 -1
- package/src/decorators/common/allOf.spec.ts +2 -1
- package/src/decorators/common/anyOf.spec.ts +2 -1
- package/src/decorators/common/enum.spec.ts +1 -1
- package/src/decorators/common/labelledAs.spec.ts +85 -0
- package/src/decorators/common/labelledAs.ts +34 -0
- package/src/decorators/common/oneOf.spec.ts +2 -1
- package/src/decorators/generics/genericOf.ts +1 -1
- package/src/decorators/operations/returns.ts +1 -1
- package/src/fn/allOf.ts +13 -0
- package/src/fn/any.ts +11 -0
- package/src/fn/anyOf.ts +13 -0
- package/src/fn/boolean.ts +11 -0
- package/src/fn/collection.ts +53 -0
- package/src/fn/date.ts +30 -0
- package/src/fn/email.ts +19 -0
- package/src/fn/enums.ts +9 -0
- package/src/{utils → fn}/from.spec.ts +14 -83
- package/src/fn/from.ts +33 -0
- package/src/fn/integer.ts +13 -0
- package/src/fn/layzRef.spec.ts +70 -0
- package/src/fn/lazyRef.ts +19 -0
- package/src/fn/number.ts +10 -0
- package/src/fn/object.ts +23 -0
- package/src/fn/oneOf.ts +14 -0
- package/src/fn/string.ts +11 -0
- package/src/fn/uri.ts +14 -0
- package/src/fn/url.ts +12 -0
- package/src/index.ts +18 -1
- package/src/registries/JsonSchemaMapperContainer.ts +1 -1
- package/src/utils/ref.ts +0 -1
- package/lib/esm/utils/from.js +0 -256
- package/lib/esm/utils/from.js.map +0 -1
- package/lib/types/utils/from.d.ts +0 -190
- package/src/utils/from.ts +0 -281
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBACvD,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,cAAe,aAAc,eAAgBJ,GAC3B,iBAAZC,QACdA,QAAQ,gBAAkBD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBAEzFJ,EAAK,gBAAkBC,EAAQD,EAAK,eAAgBA,EAAK,cAAeA,EAAK,eAC9E,CATD,CASGO,MAAM,CAACC,EAAkCC,EAAkCC,4CCP9EP,EAAOD,QAAU,EAAjB,cCAA,MAAMS,EAAY,Q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AKsB,EAAMgyB,YAAa,CACpB,MAAM5b,EAAShF,EAAmBpR,GAClCA,EAAMgyB,YAAc,IAAIx0B,IACxB4Y,EAAOtb,SAAS4W,IACZA,EAAajN,SAAS3J,SAAS6W,IACtB3R,EAAMgyB,YAAY9zB,IAAIyT,EAAUhS,cACjCK,EAAMgyB,YAAYp0B,IAAI+T,EAAUhS,YAAagS,EACjD,GACF,GAEV,CACA,OAAO3R,EAAMgyB,WACjB,CAIO,SAASC,GAAcvzB,EAAQxR,EAAU,CAAC,GAC7C,MAAMkpB,EAAS2b,GAAoBrzB,GAC7BlR,EAAM,IAAIgQ,IAShB,OARA4Y,EAAOtb,SAAQ,CAACkF,EAAOlE,MACd5O,EAAQyqB,kBACLP,GAAYpX,EAAMqB,WAAYnU,IAItCM,EAAIoQ,IAAI9B,EAAKkE,EAAM,IAEhBxS,CACX","sources":["webpack://@tsed/schema/webpack/universalModuleDefinition","webpack://@tsed/schema/../../../node_modules/picomatch-browser/index.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/constants.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/parse.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/picomatch.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/scan.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/utils.js","webpack://@tsed/schema/../../../node_modules/statuses/index.js","webpack://@tsed/schema/external umd \"@tsed/core\"","webpack://@tsed/schema/external umd \"@tsed/hooks\"","webpack://@tsed/schema/external umd \"change-case\"","webpack://@tsed/schema/webpack/bootstrap","webpack://@tsed/schema/webpack/runtime/compat get default export","webpack://@tsed/schema/webpack/runtime/define property getters","webpack://@tsed/schema/webpack/runtime/hasOwnProperty shorthand","webpack://@tsed/schema/webpack/runtime/make namespace object","webpack://@tsed/schema/./src/constants/OperationVerbs.ts","webpack://@tsed/schema/./src/registries/JsonSchemaMapperContainer.ts","webpack://@tsed/schema/./src/utils/buildPath.ts","webpack://@tsed/schema/../../../node_modules/tslib/tslib.es6.mjs","webpack://@tsed/schema/./src/domain/JsonEntityStore.ts","webpack://@tsed/schema/./src/decorators/config/jsonEntityComponent.ts","webpack://@tsed/schema/./src/registries/enumRegistries.ts","webpack://@tsed/schema/./src/utils/getComputedType.ts","webpack://@tsed/schema/./src/utils/getJsonType.ts","webpack://@tsed/schema/./src/utils/serializeEnumValues.ts","webpack://@tsed/schema/./src/utils/toJsonRegex.ts","webpack://@tsed/schema/./src/domain/JsonDiscriminator.ts","webpack://@tsed/schema/./src/domain/JsonSchema.ts","webpack://@tsed/schema/./src/domain/JsonClassStore.ts","webpack://@tsed/schema/./src/utils/isSuccessStatus.ts","webpack://@tsed/schema/./src/domain/JsonMap.ts","webpack://@tsed/schema/./src/utils/mapHeaders.ts","webpack://@tsed/schema/./src/utils/toJsonMapCollection.ts","webpack://@tsed/schema/./src/domain/JsonMedia.ts","webpack://@tsed/schema/./src/domain/JsonResponse.ts","webpack://@tsed/schema/./src/domain/JsonOperation.ts","webpack://@tsed/schema/./src/domain/JsonMethodStore.ts","webpack://@tsed/schema/./src/domain/JsonParameterTypes.ts","webpack://@tsed/schema/./src/domain/JsonParameter.ts","webpack://@tsed/schema/./src/domain/JsonParameterStore.ts","webpack://@tsed/schema/./src/domain/JsonPropertyStore.ts","webpack://@tsed/schema/./src/utils/getJsonEntityStore.ts","webpack://@tsed/schema/./src/domain/JsonOperationPathsMap.ts","webpack://@tsed/schema/./src/utils/getInheritedStores.ts","webpack://@tsed/schema/./src/utils/getOperationsStores.ts","webpack://@tsed/schema/./src/utils/removeHiddenOperation.ts","webpack://@tsed/schema/./src/components/async-api/channelsMapper.ts","webpack://@tsed/schema/./src/domain/SpecTypes.ts","webpack://@tsed/schema/./src/utils/somethingOf.ts","webpack://@tsed/schema/./src/components/async-api/messageMapper.ts","webpack://@tsed/schema/./src/utils/generics.ts","webpack://@tsed/schema/./src/components/async-api/payloadMapper.ts","webpack://@tsed/schema/./src/components/async-api/responseMapper.ts","webpack://@tsed/schema/./src/components/async-api/generate.ts","webpack://@tsed/schema/./src/domain/JsonLazyRef.ts","webpack://@tsed/schema/./src/utils/ref.ts","webpack://@tsed/schema/./src/components/default/anyMapper.ts","webpack://@tsed/schema/./src/components/default/classMapper.ts","webpack://@tsed/schema/./src/components/default/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/components/default/enumsMapper.ts","webpack://@tsed/schema/./src/components/default/genericsMapper.ts","webpack://@tsed/schema/./src/components/default/inheritedClassMapper.ts","webpack://@tsed/schema/./src/components/default/itemMapper.ts","webpack://@tsed/schema/./src/components/default/lazyRefMapper.ts","webpack://@tsed/schema/./src/components/default/mapMapper.ts","webpack://@tsed/schema/./src/constants/jsonSchemaProperties.ts","webpack://@tsed/schema/./src/components/default/nullableMapper.ts","webpack://@tsed/schema/./src/hooks/alterIgnore.ts","webpack://@tsed/schema/./src/components/default/objectMapper.ts","webpack://@tsed/schema/./src/components/default/ofMapper.ts","webpack://@tsed/schema/./src/components/default/propertiesMapper.ts","webpack://@tsed/schema/./src/hooks/alterRequiredGroups.ts","webpack://@tsed/schema/./src/components/default/requiredMapper.ts","webpack://@tsed/schema/./src/domain/JsonAliasMap.ts","webpack://@tsed/schema/./src/hooks/alterOneOf.ts","webpack://@tsed/schema/./src/components/default/schemaMapper.ts","webpack://@tsed/schema/./src/components/open-spec/enumsMapper.ts","webpack://@tsed/schema/./src/components/open-spec/generate.ts","webpack://@tsed/schema/./src/components/open-spec/nullableMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInFilesMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParameterMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParametersMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInQueryMapper.ts","webpack://@tsed/schema/./src/components/open-spec/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/constants/httpStatusMessages.ts","webpack://@tsed/schema/./src/components/open-spec/operationMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationMediaMapper.ts","webpack://@tsed/schema/./src/domain/JsonRequestBody.ts","webpack://@tsed/schema/./src/components/open-spec/operationRequestBodyMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationResponseMapper.ts","webpack://@tsed/schema/./src/utils/concatParameters.ts","webpack://@tsed/schema/./src/utils/getJsonPathParameters.ts","webpack://@tsed/schema/./src/utils/operationIdFormatter.ts","webpack://@tsed/schema/./src/components/open-spec/pathsMapper.ts","webpack://@tsed/schema/./src/decorators/common/jsonEntityFn.ts","webpack://@tsed/schema/./src/decorators/class/children.ts","webpack://@tsed/schema/./src/decorators/class/discriminatorValue.ts","webpack://@tsed/schema/./src/decorators/collections/collectionOf.ts","webpack://@tsed/schema/./src/decorators/collections/collectionContains.ts","webpack://@tsed/schema/./src/utils/withErrorMsg.ts","webpack://@tsed/schema/./src/decorators/collections/maxItems.ts","webpack://@tsed/schema/./src/decorators/collections/maxProperties.ts","webpack://@tsed/schema/./src/decorators/collections/minItems.ts","webpack://@tsed/schema/./src/decorators/collections/minProperties.ts","webpack://@tsed/schema/./src/decorators/collections/uniqueItems.ts","webpack://@tsed/schema/./src/decorators/common/additionalProperties.ts","webpack://@tsed/schema/./src/decorators/common/allOf.ts","webpack://@tsed/schema/./src/decorators/common/property.ts","webpack://@tsed/schema/./src/decorators/common/allow.ts","webpack://@tsed/schema/./src/decorators/common/any.ts","webpack://@tsed/schema/./src/decorators/common/anyOf.ts","webpack://@tsed/schema/./src/decorators/common/const.ts","webpack://@tsed/schema/./src/decorators/common/customKey.ts","webpack://@tsed/schema/./src/decorators/common/default.ts","webpack://@tsed/schema/./src/decorators/common/errorMsg.ts","webpack://@tsed/schema/./src/decorators/common/defaultMsg.ts","webpack://@tsed/schema/./src/decorators/common/description.ts","webpack://@tsed/schema/./src/decorators/common/discriminatorKey.ts","webpack://@tsed/schema/./src/decorators/common/enum.ts","webpack://@tsed/schema/./src/decorators/common/example.ts","webpack://@tsed/schema/./src/decorators/common/examples.ts","webpack://@tsed/schema/./src/decorators/common/maximum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMaximum.ts","webpack://@tsed/schema/./src/decorators/common/minimum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMinimum.ts","webpack://@tsed/schema/./src/domain/JsonFormatTypes.ts","webpack://@tsed/schema/./src/decorators/common/format.ts","webpack://@tsed/schema/./src/decorators/common/forwardGroups.ts","webpack://@tsed/schema/./src/utils/matchGroups.ts","webpack://@tsed/schema/./src/decorators/common/groups.ts","webpack://@tsed/schema/./src/decorators/common/hidden.ts","webpack://@tsed/schema/./src/decorators/common/ignore.ts","webpack://@tsed/schema/./src/decorators/common/integer.ts","webpack://@tsed/schema/./src/decorators/common/maxLength.ts","webpack://@tsed/schema/./src/decorators/common/minLength.ts","webpack://@tsed/schema/./src/decorators/common/multipleOf.ts","webpack://@tsed/schema/./src/decorators/common/name.ts","webpack://@tsed/schema/./src/decorators/common/nullable.ts","webpack://@tsed/schema/./src/decorators/common/oneOf.ts","webpack://@tsed/schema/./src/decorators/common/optional.ts","webpack://@tsed/schema/./src/decorators/common/pattern.ts","webpack://@tsed/schema/./src/decorators/common/readOnly.ts","webpack://@tsed/schema/./src/decorators/common/schema.ts","webpack://@tsed/schema/./src/decorators/common/recordOf.ts","webpack://@tsed/schema/./src/decorators/common/required.ts","webpack://@tsed/schema/./src/decorators/common/requiredGroups.ts","webpack://@tsed/schema/./src/decorators/common/title.ts","webpack://@tsed/schema/./src/decorators/common/typeError.ts","webpack://@tsed/schema/./src/decorators/common/writeOnly.ts","webpack://@tsed/schema/./src/utils/from.ts","webpack://@tsed/schema/./src/decorators/generics/genericOf.ts","webpack://@tsed/schema/./src/decorators/generics/generics.ts","webpack://@tsed/schema/./src/decorators/operations/produces.ts","webpack://@tsed/schema/./src/decorators/operations/acceptMime.ts","webpack://@tsed/schema/./src/decorators/operations/consumes.ts","webpack://@tsed/schema/./src/domain/DecoratorContext.ts","webpack://@tsed/schema/./src/utils/defineStatusModel.ts","webpack://@tsed/schema/./src/decorators/operations/returns.ts","webpack://@tsed/schema/./src/decorators/operations/contentType.ts","webpack://@tsed/schema/./src/decorators/operations/deprecated.ts","webpack://@tsed/schema/./src/decorators/operations/header.ts","webpack://@tsed/schema/./src/decorators/operations/in.ts","webpack://@tsed/schema/./src/decorators/operations/inFile.ts","webpack://@tsed/schema/./src/decorators/operations/location.ts","webpack://@tsed/schema/./src/utils/mapOperationOptions.ts","webpack://@tsed/schema/./src/decorators/operations/operation.ts","webpack://@tsed/schema/./src/decorators/operations/operationId.ts","webpack://@tsed/schema/./src/decorators/operations/operationPath.ts","webpack://@tsed/schema/./src/decorators/operations/partial.ts","webpack://@tsed/schema/./src/decorators/operations/path.ts","webpack://@tsed/schema/./src/decorators/operations/publish.ts","webpack://@tsed/schema/./src/decorators/operations/redirect.ts","webpack://@tsed/schema/./src/decorators/operations/route.ts","webpack://@tsed/schema/./src/decorators/operations/security.ts","webpack://@tsed/schema/./src/decorators/operations/status.ts","webpack://@tsed/schema/./src/decorators/operations/subscribe.ts","webpack://@tsed/schema/./src/decorators/operations/summary.ts","webpack://@tsed/schema/./src/decorators/operations/tags.ts","webpack://@tsed/schema/./src/decorators/operations/view.ts","webpack://@tsed/schema/./src/utils/concatPath.ts","webpack://@tsed/schema/./src/domain/JsonOperationRoute.ts","webpack://@tsed/schema/./src/utils/mergeSpec.ts","webpack://@tsed/schema/./src/utils/getSpec.ts","webpack://@tsed/schema/./src/utils/getSpecType.ts","webpack://@tsed/schema/./src/utils/mapOpenSpecInfo.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec2.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec3.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec.ts","webpack://@tsed/schema/./src/utils/transformToOS2.ts","webpack://@tsed/schema/./src/utils/generateSpec.ts","webpack://@tsed/schema/./src/utils/getJsonSchema.ts","webpack://@tsed/schema/./src/utils/getOperationsRoutes.ts","webpack://@tsed/schema/./src/utils/getPropertiesStores.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"change-case\", \"@tsed/core\", \"@tsed/hooks\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@tsed/schema\"] = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse\n\t\troot[\"@tsed/schema\"] = factory(root[\"change-case\"], root[\"@tsed/core\"], root[\"@tsed/hooks\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__803__, __WEBPACK_EXTERNAL_MODULE__488__) => {\nreturn ","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = (opts) => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index];\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.prev.type === 'bos' && eos()) {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance() || '';\n } else {\n value += advance() || '';\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = (opts) => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return parsed.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${parsed.output})${append}`;\n if (parsed && parsed.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = parsed;\n }\n\n return regex;\n};\n\npicomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n const opts = options || {};\n let parsed = { negated: false, fastpaths: true };\n let prefix = '';\n let output;\n\n if (input.startsWith('./')) {\n input = input.slice(2);\n prefix = parsed.prefix = './';\n }\n\n if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n output = parse.fastpaths(input, options);\n }\n\n if (output === undefined) {\n parsed = parse(input, options);\n parsed.prefix = prefix + (parsed.prefix || '');\n } else {\n parsed.output = output;\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n }\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n if (windows) {\n return path.replace(/[\\\\/]$/, '').replace(/.*[\\\\/]/, '');\n } else {\n return path.replace(/\\/$/, '').replace(/.*\\//, '');\n }\n};\n","/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__803__;","module.exports = __WEBPACK_EXTERNAL_MODULE__488__;","module.exports = __WEBPACK_EXTERNAL_MODULE__598__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var OperationVerbs;\n(function (OperationVerbs) {\n OperationVerbs[\"ALL\"] = \"ALL\";\n OperationVerbs[\"GET\"] = \"GET\";\n OperationVerbs[\"POST\"] = \"POST\";\n OperationVerbs[\"PUT\"] = \"PUT\";\n OperationVerbs[\"PATCH\"] = \"PATCH\";\n OperationVerbs[\"HEAD\"] = \"HEAD\";\n OperationVerbs[\"DELETE\"] = \"DELETE\";\n OperationVerbs[\"OPTIONS\"] = \"OPTIONS\";\n OperationVerbs[\"TRACE\"] = \"TRACE\";\n OperationVerbs[\"PUBLISH\"] = \"PUBLISH\";\n OperationVerbs[\"SUBSCRIBE\"] = \"SUBSCRIBE\";\n OperationVerbs[\"CUSTOM\"] = \"CUSTOM\";\n})(OperationVerbs || (OperationVerbs = {}));\nexport const OPERATION_HTTP_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.DELETE,\n OperationVerbs.OPTIONS,\n OperationVerbs.TRACE,\n OperationVerbs.CUSTOM\n];\nexport const OPERATION_WS_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\n","/**\n * @ignore\n */\nconst JsonSchemaMappersContainer = new Map();\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type, mapper, spec) {\n return JsonSchemaMappersContainer.set(spec ? `${spec}:${type}` : type, mapper);\n}\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type, options) {\n const mapper = JsonSchemaMappersContainer.get(`${options?.specType}:${type}`) || JsonSchemaMappersContainer.get(type);\n if (mapper) {\n return mapper;\n }\n // istanbul ignore next\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n}\n/**\n * @ignore\n */\nexport function execMapper(type, args, options, parent) {\n return getJsonSchemaMapper(type, options)(...args, options, parent);\n}\nexport function hasMapper(type) {\n return JsonSchemaMappersContainer.has(type);\n}\nexport function oneOfMapper(types, options) {\n return (types.find((type) => JsonSchemaMappersContainer.has(`${options?.specType}:${type}`)) ||\n types.find((type) => JsonSchemaMappersContainer.has(type)));\n}\n","/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { ancestorsOf, classOf, decoratorTypeOf, descriptorOf, isArrayOrArrayClass, isArrowFn, isClass, isClassObject, isCollection, isDate, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, nameOf, prototypeOf, Store } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map();\nexport class JsonEntityStore {\n constructor(options) {\n this.isStore = true;\n const { target, propertyKey, descriptor, index, decoratorType } = options;\n this.target = target;\n this.propertyKey = propertyKey;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName() {\n return nameOf(this.token);\n }\n get isCollection() {\n return !!this.collectionType;\n }\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor);\n }\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n get isDate() {\n return isDate(this.computedType);\n }\n get isObject() {\n return isObject(this.computedType);\n }\n get isClass() {\n return isClass(this.computedType);\n }\n /**\n * Return the JsonSchema\n */\n get schema() {\n return this._schema;\n }\n get nestedGenerics() {\n return this.schema.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n get type() {\n return this._type;\n }\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value) {\n this._type = value;\n this.build();\n }\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n get itemSchema() {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n get parentSchema() {\n return this.parent.schema;\n }\n get isDiscriminatorChild() {\n return this.schema.isDiscriminator && this.discriminatorAncestor?.schema.discriminator().base !== this.target;\n }\n static from(...args) {\n if (args[0].isStore) {\n return args[0];\n }\n const target = args[0];\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n const store = Store.from(...args);\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType);\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n jsonSchemaStore.build();\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n return store.get(\"JsonEntityStore\");\n }\n static fromMethod(target, propertyKey) {\n return this.from(target, propertyKey, descriptorOf(target, propertyKey));\n }\n static get(target, propertyKey, descriptor) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n isGetterOnly() {\n return isObject(this.descriptor) && !this.descriptor.value && this.descriptor.get && !this.descriptor.set;\n }\n get(key, defaultValue) {\n return this.store.get(key, defaultValue);\n }\n set(key, value) {\n return this.store.set(key, value);\n }\n toString() {\n return [this.targetName, this.propertyName, this.index].filter((o) => o !== undefined).join(\":\");\n }\n buildType(type) {\n if (isCollection(type)) {\n this.collectionType = type;\n }\n else {\n this._type = type;\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n getBestType() {\n return this.itemSchema.hasDiscriminator\n ? this.itemSchema.discriminator().base\n : isClassObject(this.type)\n ? this.itemSchema.getTarget()\n : isArrowFn(this.type)\n ? this.type()\n : this.type;\n }\n}\n","import { JsonEntitiesContainer } from \"../../domain/JsonEntityStore.js\";\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type) {\n return (target) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n","export const enumsRegistry = new Map();\n","import { classOf, isArrowFn, isClass, isClassObject, isCollection, isDate, isPrimitiveOrPrimitiveClass, isPromise, isSymbol } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport function getComputedType(target) {\n if (isPromise(target) || target === Function) {\n return Object;\n }\n if (isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)) {\n return classOf(target);\n }\n if (isArrowFn(target)) {\n return target();\n }\n return target;\n}\n","import { isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\nexport function getJsonType(value) {\n if (value === null) {\n return \"null\";\n }\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value) > -1) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n return \"generic\";\n }\n return primitiveOf(value);\n }\n if (value === Array) {\n return \"array\";\n }\n if (isArray(value)) {\n return value.map(getJsonType);\n }\n if (value === Set) {\n return \"array\";\n }\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n return \"object\";\n}\n","import { isObject, uniq } from \"@tsed/core\";\nexport const serializeEnum = (enumValue) => {\n if (isObject(enumValue) && enumValue !== null) {\n return Object.entries(enumValue).reduce((acc, [key, value]) => {\n if (isNaN(+key)) {\n return acc.concat(value);\n }\n return acc;\n }, []);\n }\n return enumValue;\n};\nexport function serializeEnumValues(enumValues) {\n const values = enumValues.reduce((acc, value) => acc.concat(serializeEnum(value)), []);\n const getValue = (value) => {\n return value === null ? \"null\" : typeof value;\n };\n const types = values.reduce((set, value) => set.add(getValue(value)), new Set());\n return { values: uniq(values), types };\n}\n","/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n","import { cleanObject } from \"@tsed/core\";\nexport class Discriminator {\n constructor({ base, propertyName, types, values } = {}) {\n this.values = new Map();\n this.types = new Map();\n Object.assign(this, cleanObject({\n base,\n propertyName,\n types: types ? new Map(types) : undefined,\n values: values ? new Map(values) : undefined\n }));\n }\n add(type, values) {\n values.forEach((value) => {\n this.values.set(value, type);\n });\n this.types.set(type, values);\n return this;\n }\n getType(discriminatorValue) {\n return this.values.get(discriminatorValue) || this.base;\n }\n getValues(type) {\n return this.types.get(type);\n }\n getDefaultValue(type) {\n const values = this.types.get(type);\n return values ? values[0] : undefined;\n }\n children() {\n return [...new Set([...this.types.keys()])];\n }\n}\n","import { ancestorsOf, classOf, isArray, isClass, isFunction, isObject, isPrimitiveClass, nameOf, uniq } from \"@tsed/core\";\nimport { Hooks } from \"@tsed/hooks\";\nimport { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getComputedType } from \"../utils/getComputedType.js\";\nimport { getJsonType } from \"../utils/getJsonType.js\";\nimport { serializeEnumValues } from \"../utils/serializeEnumValues.js\";\nimport { toJsonRegex } from \"../utils/toJsonRegex.js\";\nimport { Discriminator } from \"./JsonDiscriminator.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nfunction mapProperties(properties) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n return Object.entries(properties).reduce((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n return properties;\n }, {});\n}\nfunction mapToJsonSchema(item) {\n if (isArray(item)) {\n return item.map(mapToJsonSchema);\n }\n if (item.isStore || item.$isJsonDocument || item.isLazyRef) {\n return item;\n }\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n if (isObject(item)) {\n return JsonSchema.from(item);\n }\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({ type: item });\n }\n return item;\n}\nexport class JsonSchema extends Map {\n #nullable;\n #discriminator;\n #genericLabels;\n #nestedGenerics;\n #alias;\n #itemSchema;\n #target;\n #isGeneric;\n #isCollection;\n #ref;\n constructor(obj = {}) {\n super();\n this.$kind = \"schema\";\n this.$isJsonDocument = true;\n this.$hooks = new Hooks();\n this.$required = new Set();\n this.$allow = [];\n this.$forwardGroups = false;\n this.$ignore = false;\n this.isDiscriminatorKey = false;\n this.isDiscriminator = false;\n this.#nullable = false;\n this.#discriminator = null;\n this.#nestedGenerics = [];\n this.#alias = new Map();\n this.#isGeneric = false;\n this.#isCollection = false;\n this.#ref = false;\n if (obj) {\n this.assign(obj);\n }\n }\n get alias() {\n return this.#alias;\n }\n get nestedGenerics() {\n return this.#nestedGenerics;\n }\n set nestedGenerics(value) {\n this.#nestedGenerics = value;\n }\n get genericLabels() {\n return this.#genericLabels;\n }\n set genericLabels(value) {\n this.#genericLabels = value;\n }\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target);\n }\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n /**\n * Current schema has generics items\n */\n get hasGenerics() {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n get genericType() {\n return this.get(\"$ref\");\n }\n get class() {\n return this.getComputedType();\n }\n get canRef() {\n return this.#ref;\n }\n get isNullable() {\n return this.#nullable;\n }\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n get hasDiscriminator() {\n return !!this.#discriminator;\n }\n static from(obj = {}) {\n return new JsonSchema(obj);\n }\n nullable(value) {\n this.#nullable = value;\n }\n itemSchema(obj = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n return this.#itemSchema;\n }\n getAliasOf(property) {\n return this.#alias.get(property);\n }\n addAlias(property, alias) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n return this;\n }\n removeAlias(property) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n return this;\n }\n $id($id) {\n super.set(\"$id\", $id);\n return this;\n }\n $ref($ref) {\n super.set(\"$ref\", $ref);\n return this;\n }\n $schema($schema) {\n super.set(\"$schema\", $schema);\n return this;\n }\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name) {\n this.#ref = true;\n super.set(\"name\", name);\n return this;\n }\n name(name) {\n super.set(\"name\", name);\n return this;\n }\n ignore(cb) {\n if (typeof cb !== \"boolean\") {\n this.$hooks.on(\"ignore\", cb);\n }\n this.$ignore = cb;\n return this;\n }\n /**\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3\n */\n default(value) {\n super.set(\"default\", value);\n return this;\n }\n /**\n * More readible form of a one-element \"enum\"\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24\n */\n const(value) {\n super.set(\"const\", value);\n return this;\n }\n /**\n * This attribute is a string that provides a full description of the of purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n discriminatorKey(propertyName) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n return this;\n }\n discriminatorValue(...values) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n this.isDiscriminator = true;\n const properties = this.get(\"properties\");\n const schema = properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n }\n else {\n schema.enum(...values);\n schema.examples(values);\n }\n properties[discriminator.propertyName] = schema;\n this.set(\"properties\", properties);\n return this;\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * If \"items\" is an array of schemas, validation succeeds if every instance element\n * at a position greater than the size of \"items\" validates against \"additionalItems\".\n * Otherwise, \"additionalItems\" MUST be ignored, as the \"items\" schema\n * (possibly the default value of an empty schema) is applied to all elements.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10\n */\n additionalItems(additionalItems) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n return this;\n }\n /**\n * An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14\n */\n contains(contains) {\n super.set(\"contains\", mapToJsonSchema(contains));\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n example(...examples) {\n return this.examples(examples);\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9\n */\n items(items) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11\n */\n maxItems(maxItems) {\n super.set(\"maxItems\", maxItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12\n */\n minItems(minItems) {\n super.set(\"minItems\", minItems);\n return this;\n }\n /**\n * If this keyword has boolean value false, the instance validates successfully.\n * If it has boolean value true, the instance validates successfully if all of its elements are unique.\n * Omitting this keyword has the same behavior as a value of false.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13\n */\n uniqueItems(uniqueItems) {\n super.set(\"uniqueItems\", uniqueItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15\n */\n maxProperties(maxProperties) {\n super.set(\"maxProperties\", maxProperties);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is greater than,\n * or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16\n */\n minProperties(minProperties) {\n super.set(\"minProperties\", minProperties);\n return this;\n }\n allow(...allow) {\n if ([].concat(this.getJsonType()).includes(\"string\") && !this.has(\"minLength\")) {\n this.minLength(1);\n }\n allow.forEach((value) => {\n switch (value) {\n case \"\":\n this.set(\"minLength\", undefined);\n break;\n case null:\n this.any(...[\"null\"].concat(this.getJsonType(), this.$allow.map((v) => typeof v)));\n break;\n }\n });\n this.$allow.push(...allow);\n return this;\n }\n /**\n * Elements of this array must be unique.\n * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.\n * Omitting this keyword has the same behavior as an empty array.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17\n */\n required(required = true) {\n if (isArray(required)) {\n this.$required.clear();\n required.forEach((value) => this.$required.add(value));\n }\n else {\n const schema = this.clone();\n schema.$selfRequired = required;\n if ([].concat(schema.getJsonType()).includes(\"string\")) {\n schema.minLength(1);\n }\n return schema;\n }\n return this;\n }\n addRequired(property) {\n this.$required.add(property);\n return this;\n }\n removeRequired(property) {\n this.$required.delete(property);\n return this;\n }\n isRequired(property) {\n return this.$required.has(property);\n }\n /**\n * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.\n * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,\n * the child instance for that name successfully validates against the corresponding schema.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18\n */\n properties(properties) {\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n addProperty(key, schema) {\n const properties = this.get(\"properties\") || {};\n properties[key] = schema;\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n /**\n * This attribute is an object that defines the schema for a set of property names of an object instance.\n * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.\n * If the pattern matches the name of a property on the instance object, the value of the instance's property\n * MUST be valid against the pattern name's schema value.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19\n */\n patternProperties(patternProperties) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n */\n additionalProperties(additionalProperties) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown = true) {\n return this.additionalProperties(unknown);\n }\n /**\n * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.\n * Each property specifies a dependency.\n * If the dependency value is an array, each element in the array must be unique.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21\n */\n dependencies(dependencies) {\n super.set(\"dependencies\", mapProperties(dependencies));\n return this;\n }\n /**\n * Takes a schema which validates the names of all properties rather than their values.\n * Note the property name that the schema is testing will always be a string.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22\n */\n propertyNames(propertyNames) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n return this;\n }\n enum(enumValue, ...enumValues) {\n if (enumsRegistry.has(enumValue)) {\n return this.enum(enumsRegistry.get(enumValue));\n }\n if (enumValue instanceof JsonSchema) {\n if (enumValue.getName()) {\n super.set(\"enum\", enumValue);\n }\n else {\n super.set(\"enum\", enumValue.get(\"enum\")).any(...enumValue.get(\"enum\").map((value) => typeof value));\n }\n }\n else {\n const { values, types } = serializeEnumValues([enumValue, enumValues].flat());\n super.set(\"enum\", values).any(...types);\n }\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions) {\n super.set(\"definitions\", mapProperties(definitions));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf) {\n this.setManyOf(\"allOf\", allOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf) {\n this.setManyOf(\"anyOf\", anyOf);\n return this;\n }\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf) {\n this.setManyOf(\"oneOf\", oneOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not) {\n super.set(\"not\", mapToJsonSchema(not));\n return this;\n }\n /**\n * Must be strictly greater than 0.\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1\n */\n multipleOf(multipleOf) {\n super.set(\"multipleOf\", multipleOf);\n return this;\n }\n /**\n * Representing an inclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is less than or exactly equal to \"maximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2\n */\n maximum(maximum) {\n super.set(\"maximum\", maximum);\n return this;\n }\n /**\n * Representing an exclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is strictly less than (not equal to) to \"exclusiveMaximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3\n */\n exclusiveMaximum(exclusiveMaximum) {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n return this;\n }\n /**\n * Representing an inclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is greater than or exactly equal to \"minimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4\n */\n minimum(minimum) {\n super.set(\"minimum\", minimum);\n return this;\n }\n /**\n * Representing an exclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is strictly greater than (not equal to) to \"exclusiveMinimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5\n */\n exclusiveMinimum(exclusiveMinimum) {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6\n */\n maxLength(maxLength) {\n super.set(\"maxLength\", maxLength);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7\n */\n minLength(minLength) {\n super.set(\"minLength\", minLength);\n return this;\n }\n /**\n * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8\n */\n pattern(pattern) {\n super.set(\"pattern\", toJsonRegex(pattern));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format) {\n super.set(\"format\", format);\n return this;\n }\n /**\n * A single type, or a union of simple types\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25\n */\n type(type) {\n switch (type) {\n case \"map\":\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n case \"array\":\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"set\":\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"integer\":\n this.integer();\n break;\n case \"number\":\n case \"string\":\n case \"boolean\":\n case \"object\":\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n }\n else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n }\n else {\n super.set(\"type\", jsonType);\n }\n }\n }\n return this;\n }\n any(...types) {\n types = types.length ? types : [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"];\n types = uniq(types).map((o) => {\n return isClass(o) ? o : { type: getJsonType(o) };\n });\n if (types.length > 1) {\n this.anyOf(types);\n }\n else {\n this.type(types[0]?.type || types[0]);\n }\n return this;\n }\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n return this;\n }\n /**\n * This attribute is a string that provides a short description of the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n title(title) {\n super.set(\"title\", title);\n return this;\n }\n readOnly(readOnly) {\n super.set(\"readOnly\", readOnly);\n return this;\n }\n writeOnly(readOnly) {\n super.set(\"writeOnly\", readOnly);\n return this;\n }\n customKey(key, value) {\n super.set(`#${key}`, value);\n return this;\n }\n toObject(options) {\n return this.toJSON(options);\n }\n toJSON(options) {\n return execMapper(\"schema\", [this], options);\n }\n assign(obj = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n this.#ref = obj.#ref;\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n this.#nullable = obj.#nullable;\n super.set(\"type\", obj.get(\"type\"));\n }\n return this;\n }\n set(key, value) {\n if (key in this) {\n isFunction(this[key]) && this[key](value);\n }\n else {\n super.set(key, value);\n }\n return this;\n }\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType() {\n return getComputedType(this.#target);\n }\n getComputedItemType() {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n /**\n * Return the Json type as string\n */\n getJsonType() {\n if (this.get(\"anyOf\")) {\n return this.get(\"anyOf\").map((o) => {\n return o.getJsonType();\n });\n }\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n getTarget() {\n return this.#target;\n }\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (isClass(this.#target) ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n clone() {\n return new JsonSchema(this);\n }\n setManyOf(keyword, value) {\n let resolved = value\n .filter((o) => {\n if (o?.type === \"null\") {\n this.nullable(true);\n return false;\n }\n return true;\n })\n .map(mapToJsonSchema);\n if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {\n if (!resolved[0].hasDiscriminator) {\n return this.type(value[0]);\n }\n const children = resolved[0].discriminator().children();\n if (!children.length) {\n return this.type(value[0]);\n }\n resolved = children.map(mapToJsonSchema);\n }\n super.set(keyword, resolved);\n const jsonSchema = resolved[0];\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const { propertyName } = discriminator;\n super.set(\"discriminator\", {\n propertyName,\n mapping: resolved.reduce((acc, schema) => {\n discriminator.types.get(schema.getTarget())?.forEach((key) => {\n acc[key] = schema;\n });\n return acc;\n }, {})\n });\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n }\n}\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonClassStore = class JsonClassStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n }\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n set path(path) {\n this.store.set(\"path\", path);\n }\n build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n this._type = this._type || Object;\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n};\nJsonClassStore = __decorate([\n JsonEntityComponent(DecoratorTypes.CLASS)\n], JsonClassStore);\nexport { JsonClassStore };\n","export const isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n","import { isFunction } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nexport class JsonMap extends Map {\n constructor(obj = {}) {\n super();\n this.$kind = \"map\";\n this.$isJsonDocument = true;\n this.assign(obj);\n }\n assign(obj = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n }\n else {\n this.set(key, value);\n }\n });\n return this;\n }\n toJSON(options) {\n return execMapper(\"map\", [this], options);\n }\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers) {\n return Object.keys(headers).reduce((newHeaders, key) => {\n const value = headers[key];\n let type = typeof value;\n let options = {\n example: value\n };\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n options.type = options.type || type;\n newHeaders[key] = cleanObject(options);\n return newHeaders;\n }, {});\n}\n","import { JsonMap } from \"../domain/JsonMap.js\";\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n return content;\n }, new JsonMap());\n}\n","import { JsonMap } from \"./JsonMap.js\";\nexport class JsonMedia extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationMedia\";\n this.groups = [];\n }\n schema(schema) {\n this.set(\"schema\", schema);\n return this;\n }\n examples(examples) {\n this.set(\"examples\", examples);\n return this;\n }\n}\n","import { mapHeaders } from \"../utils/mapHeaders.js\";\nimport { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonMedia } from \"./JsonMedia.js\";\nexport class JsonResponse extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationResponse\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n headers(headers) {\n this.set(\"headers\", mapHeaders(headers));\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content, JsonMedia));\n return this;\n }\n getContent() {\n return this.get(\"content\");\n }\n getMedia(mediaType, create = true) {\n create && this.addMedia(mediaType);\n return this.getContent()?.get(mediaType);\n }\n addMedia(mediaType) {\n const content = this.get(\"content\");\n if (!content.has(mediaType)) {\n content.set(mediaType, new JsonMedia());\n }\n return this;\n }\n isBinary() {\n return this.getContent().has(\"application/octet-stream\");\n }\n}\n","import { deepMerge, uniq, uniqBy } from \"@tsed/core\";\nimport { isRedirectionStatus, isSuccessStatus } from \"../utils/isSuccessStatus.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonResponse } from \"./JsonResponse.js\";\nexport class JsonOperation extends JsonMap {\n #status;\n #redirection;\n constructor(obj = {}) {\n super({ parameters: [], responses: new JsonMap(), ...obj });\n this.$kind = \"operation\";\n this.operationPaths = new Map();\n this.#redirection = false;\n }\n get response() {\n return this.getResponses().get(this.getStatus().toString());\n }\n get status() {\n return this.#status;\n }\n tags(tags) {\n super.set(\"tags\", tags);\n return this;\n }\n addTags(tags) {\n tags = uniqBy([...(this.get(\"tags\") || []), ...tags], \"name\");\n return this.tags(tags);\n }\n summary(summary) {\n super.set(\"summary\", summary);\n return this;\n }\n operationId(operationId) {\n this.set(\"operationId\", operationId);\n return this;\n }\n responses(responses) {\n this.set(\"responses\", responses);\n return this;\n }\n defaultStatus(status) {\n this.#status = status;\n return this;\n }\n getStatus() {\n return this.#status || 200;\n }\n setRedirection(status = 302) {\n this.#redirection = true;\n this.#status = status;\n return this;\n }\n isRedirection(status) {\n if (this.#redirection) {\n if (status) {\n return isRedirectionStatus(status);\n }\n }\n return this.#redirection;\n }\n addResponse(statusCode, response) {\n if ((isSuccessStatus(statusCode) || isRedirectionStatus(statusCode)) && !this.#status) {\n const res = this.getResponseOf(200);\n this.getResponses().set(statusCode.toString(), res).delete(\"200\");\n this.defaultStatus(Number(statusCode));\n }\n const currentCode = statusCode === \"default\" ? this.getStatus().toString() : statusCode.toString();\n const currentResponse = this.getResponses().get(currentCode);\n if (!currentResponse) {\n response.status = Number(currentCode);\n this.getResponses().set(currentCode, response);\n }\n else {\n response.forEach((value, key) => {\n if (![\"content\"].includes(key)) {\n currentResponse.set(key, deepMerge(currentResponse.get(key), value));\n }\n });\n currentResponse.status = Number(currentCode);\n }\n return this;\n }\n getResponses() {\n return this.get(\"responses\");\n }\n getResponseOf(status) {\n return (status === \"default\" ? this.response : this.getResponses().get(String(status))) || new JsonResponse();\n }\n ensureResponseOf(status) {\n this.addResponse(status, this.getResponseOf(status));\n return this.getResponseOf(status);\n }\n getHeadersOf(status) {\n return this.getResponseOf(status).get(\"headers\") || {};\n }\n getContentTypeOf(status) {\n return [...this.getResponseOf(status).get(\"content\").keys()].slice(-1)[0];\n }\n security(security) {\n this.set(\"security\", security);\n return this;\n }\n addSecurityScopes(name, scopes) {\n const security = this.get(\"security\") || {};\n security[name] = uniq([...(security[name] || []), ...scopes]);\n return this.security(security);\n }\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n deprecated(deprecated) {\n super.set(\"deprecated\", deprecated);\n return this;\n }\n parameters(parameters) {\n super.set(\"parameters\", parameters);\n return this;\n }\n addParameter(index, parameter) {\n if (index === -1) {\n index = this.get(\"parameters\").length;\n }\n this.get(\"parameters\")[index] = parameter;\n }\n consumes(consumes) {\n super.set(\"consumes\", consumes);\n return this;\n }\n produces(produces) {\n super.set(\"produces\", produces);\n return this;\n }\n addProduce(produce) {\n const produces = uniq([].concat(this.get(\"produces\"), produce)).filter(Boolean);\n this.set(\"produces\", produces);\n }\n addOperationPath(method, path, options = {}) {\n this.operationPaths.set(String(method) + String(path), {\n ...options,\n method,\n path\n });\n return this;\n }\n getAllowedOperationPath(allowedVerbs) {\n if (!allowedVerbs) {\n return [...this.operationPaths.values()];\n }\n return [...this.operationPaths.values()].filter(({ method }) => method && allowedVerbs.includes(method.toUpperCase()));\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonOperation } from \"./JsonOperation.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonMethodStore = class JsonMethodStore extends JsonEntityStore {\n constructor(options) {\n super({\n store: Store.fromMethod(options.target, options.propertyKey),\n descriptor: descriptorOf(options.target, options.propertyKey),\n ...options\n });\n this.parent = JsonEntityStore.from(this.target);\n this.middlewares = [];\n this.beforeMiddlewares = [];\n this.afterMiddlewares = [];\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n this.operation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n const { beforeMiddlewares = [], middlewares = [], afterMiddlewares = [] } = options;\n this.after(afterMiddlewares);\n this.before(beforeMiddlewares);\n this.use(middlewares);\n }\n get params() {\n return this.parameters;\n }\n get view() {\n return this.store.get(\"view\");\n }\n set view(view) {\n this.store.set(\"view\", view);\n }\n get acceptMimes() {\n return this.store.get(\"acceptMimes\", []);\n }\n set acceptMimes(mimes) {\n this.store.set(\"acceptMimes\", mimes);\n }\n get parameters() {\n return [...this.children.values()];\n }\n get operationPaths() {\n return this.operation.operationPaths;\n }\n /**\n * Get an endpoint.\n * @param target\n * @param propertyKey\n * @param descriptor\n */\n static get(target, propertyKey, descriptor) {\n descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n getResponseOptions(status, { contentType = \"application/json\", includes } = {}) {\n const media = this.operation.getResponseOf(status).getMedia(contentType, false);\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\");\n let groups = media.groups;\n if (includes && media.allowedGroups?.size) {\n groups = [...(groups || []), ...includes.filter((include) => media.allowedGroups.has(include))];\n }\n return { type: schema.getComputedItemType(), groups };\n }\n return { type: this.type };\n }\n /**\n * Append middlewares to the beforeMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n before(args) {\n this.beforeMiddlewares = this.beforeMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Append middlewares to the afterMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n after(args) {\n this.afterMiddlewares = this.afterMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Store all arguments collected via Annotation.\n * @param args\n */\n use(args) {\n this.middlewares = this.middlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.\n *\n * @param key\n * @returns {any}\n */\n get(key) {\n const ctrlValue = Store.from(this.target).get(key);\n return deepMerge(ctrlValue, this.store.get(key));\n }\n getParamTypes() {\n return [...this.children.values()].reduce((obj, item) => ({\n ...obj,\n [item.paramType]: true\n }), {});\n }\n build() {\n if (!this._type) {\n let type = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n this.buildType(type);\n }\n this._type = this._type || Object;\n this.parent.children.set(this.propertyName, this);\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n};\nJsonMethodStore = __decorate([\n JsonEntityComponent(DecoratorTypes.METHOD),\n __metadata(\"design:paramtypes\", [Object])\n], JsonMethodStore);\nexport { JsonMethodStore };\nexport const EndpointMetadata = JsonMethodStore;\n","export var JsonParameterTypes;\n(function (JsonParameterTypes) {\n JsonParameterTypes[\"BODY\"] = \"body\";\n JsonParameterTypes[\"PATH\"] = \"path\";\n JsonParameterTypes[\"QUERY\"] = \"query\";\n JsonParameterTypes[\"HEADER\"] = \"header\";\n JsonParameterTypes[\"COOKIES\"] = \"cookie\";\n JsonParameterTypes[\"FILES\"] = \"files\";\n})(JsonParameterTypes || (JsonParameterTypes = {}));\n/**\n * @ignore\n */\nexport function formatParameterType(type) {\n return String(type).toLowerCase().replace(\"raw_\", \"\").replace(\"cookies\", \"cookie\");\n}\n/**\n * @ignore\n */\nexport function isParameterType(type) {\n return Object.values(JsonParameterTypes).includes(formatParameterType(type));\n}\n","import { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { formatParameterType } from \"./JsonParameterTypes.js\";\nexport class JsonParameter extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationInParameter\";\n this.nestedGenerics = [];\n }\n getName() {\n const name = this.get(\"name\");\n if (this.get(\"in\") === \"files\") {\n return name.split(\".\")[0];\n }\n return name;\n }\n name(name) {\n this.set(\"name\", name);\n return this;\n }\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n in(inType, expression = \"\") {\n this.set(\"in\", formatParameterType(inType));\n this.expression = expression;\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n schema(schema) {\n this.$schema = schema;\n return this;\n }\n toJSON(options) {\n return execMapper(\"operationInParameter\", [this], options);\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonParameter } from \"./JsonParameter.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonParameterStore = class JsonParameterStore extends JsonEntityStore {\n constructor(options) {\n super(options);\n /**\n * Ref to JsonParameter when the decorated object is a parameter.\n */\n this.parameter = new JsonParameter();\n this.parent = JsonEntityStore.fromMethod(this.target, this.propertyKey);\n this.pipes = options.pipes || [];\n this.paramType = options.paramType || this.paramType;\n this.expression = options.expression || this.expression;\n this.dataPath = options.dataPath || this.dataPath;\n }\n get nestedGenerics() {\n return this.parameter.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.parameter.nestedGenerics = nestedGenerics;\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return !!this.parameter.get(\"required\");\n }\n set required(value) {\n this.parameter.required(value);\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n static getParams(target, propertyKey) {\n const params = [];\n const klass = ancestorsOf(target)\n .reverse()\n .find((target) => {\n return isMethodDescriptor(target, propertyKey) && JsonEntityStore.fromMethod(target, propertyKey).children.size;\n });\n if (klass) {\n JsonEntityStore.fromMethod(klass, propertyKey).children.forEach((param, index) => {\n params[+index] = param;\n });\n return params;\n }\n return [];\n }\n static get(target, propertyKey, index) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, index);\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n getSchema(type) {\n if (isCollection(type) || !isClass(type)) {\n return JsonSchema.from({\n type\n });\n }\n return JsonEntityStore.from(type).schema;\n }\n build() {\n if (!this._type) {\n const type = Metadata.getParamTypes(prototypeOf(this.target), this.propertyKey)[this.index];\n this.buildType(type);\n }\n this._type = this._type || Object;\n if (!this._schema) {\n this.parent.children.set(this.index, this);\n this._schema = this.getSchema(this.collectionType || this.type);\n this.parameter.schema(this._schema);\n if (this.collectionType) {\n this._schema.itemSchema(this.getSchema(this.type));\n }\n this.parent.operation.addParameter(this.index, this.parameter);\n }\n }\n};\nJsonParameterStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PARAM),\n __metadata(\"design:paramtypes\", [Object])\n], JsonParameterStore);\nexport { JsonParameterStore };\nexport const ParamMetadata = JsonParameterStore;\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonPropertyStore = class JsonPropertyStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n this.parent = JsonEntityStore.from(this.target);\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return this.parent.schema.isRequired(this.propertyKey);\n }\n /**\n * Change the state of the required data.\n * @param value\n */\n set required(value) {\n if (value) {\n this.parent.schema.addRequired(this.propertyKey);\n }\n else {\n this.parent.schema.removeRequired(this.propertyKey);\n }\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n discriminatorKey() {\n this.parent.schema.discriminatorKey(String(this.propertyKey));\n this.itemSchema.isDiscriminatorKey = true;\n return this;\n }\n isDiscriminatorKey() {\n return this.itemSchema.isDiscriminatorKey;\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n build() {\n if (!this._type) {\n this.buildType(Metadata.getType(prototypeOf(this.target), this.propertyKey));\n }\n this._type = this._type || Object;\n const properties = this.parent.schema.get(\"properties\");\n let schema = properties[this.propertyName];\n if (!schema) {\n this.parent.children.set(this.propertyName, this);\n schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n schema.itemSchema(this.type);\n }\n }\n this.parent.schema.addProperty(this.propertyName, schema);\n this._schema = schema;\n }\n static get(target, propertyKey) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey);\n }\n};\nJsonPropertyStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PROP)\n], JsonPropertyStore);\nexport { JsonPropertyStore };\nexport const PropertyMetadata = JsonPropertyStore;\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonClassStore } from \"../domain/JsonClassStore.js\";\nimport { JsonEntitiesContainer, JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonParameterStore } from \"../domain/JsonParameterStore.js\";\nimport { JsonPropertyStore } from \"../domain/JsonPropertyStore.js\";\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\nexport function getJsonEntityStore(...args) {\n return JsonEntityStore.from(...args);\n}\n","export class JsonOperationPathsMap extends Map {\n constructor() {\n super(...arguments);\n this.$kind = \"operationPaths\";\n this.$isJsonDocument = true;\n this.getKey = (method, path) => `${method}-${path}`;\n }\n setOperationPath(operationPath) {\n // if (operationPath.method !== OperationVerbs.CUSTOM) {\n const key = this.getKey(operationPath.method, operationPath.path);\n this.set(key, operationPath);\n // }\n }\n}\n","import { ancestorsOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n return store.$inherited;\n}\n","import { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonOperationPathsMap } from \"../domain/JsonOperationPathsMap.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nexport function getOperationsStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map();\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n store.$operations.forEach((store) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n operationPaths.clear();\n }\n return store.$operations;\n}\n","export function removeHiddenOperation(operationStore) {\n return !operationStore.store.get(\"hidden\");\n}\n","import { camelCase } from \"change-case\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\nfunction pushToChannels(options) {\n return (channels, { operationPath, operationStore }) => {\n const path = options.ctrlRootPath || \"/\";\n const method = operationPath.method.toLowerCase();\n const operationId = camelCase(`${method.toLowerCase()} ${operationStore.parent.schema.getName()}`);\n const message = execMapper(\"message\", [operationStore, operationPath], options);\n return {\n ...channels,\n [path]: {\n ...channels[path],\n [method]: {\n ...channels[path]?.[method],\n operationId,\n message: {\n oneOf: [...(channels[path]?.[method]?.message?.oneOf || []), message]\n }\n }\n }\n };\n };\n}\nfunction expandOperationPaths(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operationStore\n };\n });\n };\n}\nexport function channelsMapper(model, { channels, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .flatMap(expandOperationPaths(options))\n .reduce(pushToChannels(options), channels);\n}\nregisterJsonSchemaMapper(\"channels\", channelsMapper);\n","export var SpecTypes;\n(function (SpecTypes) {\n SpecTypes[\"JSON\"] = \"jsonschema\";\n SpecTypes[\"SWAGGER\"] = \"swagger2\";\n SpecTypes[\"OPENAPI\"] = \"openapi3\";\n SpecTypes[\"ASYNCAPI\"] = \"asyncapi2\";\n})(SpecTypes || (SpecTypes = {}));\n","export function makeOf(key, schemes) {\n if (schemes.length) {\n if (schemes.length === 1) {\n return schemes[0];\n }\n else {\n return { [key]: schemes };\n }\n }\n return null;\n}\n","import { cleanObject, getValue } from \"@tsed/core\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function messageMapper(jsonOperationStore, operationPath, { tags = [], defaultTags = [], ...options } = {}) {\n const { path: event, method } = operationPath;\n const messageKey = String(event);\n let message = getValue(options.components, \"messages.\" + event, cleanObject({\n description: jsonOperationStore.operation.get(\"description\"),\n summary: jsonOperationStore.operation.get(\"summary\")\n }));\n if (method.toUpperCase() === OperationVerbs.PUBLISH) {\n const payload = execMapper(\"payload\", [jsonOperationStore, operationPath], options);\n if (payload) {\n message.payload = payload;\n }\n const responses = jsonOperationStore.operation\n .getAllowedOperationPath([OperationVerbs.SUBSCRIBE])\n .map((operationPath) => {\n return execMapper(\"message\", [jsonOperationStore, operationPath], options);\n })\n .filter(Boolean);\n const responsesSchema = makeOf(\"oneOf\", responses);\n if (responsesSchema) {\n message[\"x-response\"] = responsesSchema;\n }\n }\n else {\n const response = execMapper(\"response\", [jsonOperationStore, operationPath], options);\n if (response) {\n message[\"x-response\"] = response;\n }\n }\n options.components.messages = options.components.messages || {};\n options.components.messages[messageKey] = message;\n return { $ref: `#/components/messages/${messageKey}` };\n}\nregisterJsonSchemaMapper(\"message\", messageMapper, SpecTypes.ASYNCAPI);\n","/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels, genericTypes) {\n return genericLabels.reduce((map, item, index) => map.set(item, genericTypes[index]), new Map());\n}\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options) {\n if (options.genericLabels && options.genericTypes) {\n const { genericLabels, genericTypes, ...ops } = options;\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n return options;\n}\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value) {\n const [genericTypes, ...out] = value.nestedGenerics;\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nfunction getParameters(jsonOperation, options) {\n return jsonOperation.get(\"parameters\").filter((parameter) => isParameterType(parameter.get(\"in\")));\n}\nexport function payloadMapper(jsonOperationStore, operationPath, options) {\n const parameters = getParameters(jsonOperationStore.operation, options);\n const payloadName = pascalCase([operationPath.path, operationPath.method, \"Payload\"].join(\" \"));\n setValue(options, `components.schemas.${payloadName}`, {});\n const allOf = parameters\n .map((parameter) => {\n const opts = mapOptions(parameter, options);\n const jsonSchema = execMapper(\"item\", [parameter.$schema], {\n ...opts,\n ...popGenerics(parameter)\n });\n switch (parameter.get(\"in\")) {\n case JsonParameterTypes.BODY:\n return jsonSchema;\n case JsonParameterTypes.QUERY:\n case JsonParameterTypes.PATH:\n case JsonParameterTypes.HEADER:\n return {\n type: \"object\",\n properties: {\n [parameter.get(\"name\")]: jsonSchema\n }\n };\n }\n return jsonSchema;\n }, {})\n .filter(Boolean);\n return makeOf(\"allOf\", allOf);\n}\nregisterJsonSchemaMapper(\"payload\", payloadMapper, SpecTypes.ASYNCAPI);\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function responsePayloadMapper(jsonOperationStore, operationPath, options) {\n const responses = jsonOperationStore.operation.getResponses();\n const statuses = [];\n const statusesTexts = [];\n const successSchemes = [];\n const errorSchemes = [];\n [...responses.entries()].forEach(([status, jsonResponse]) => {\n const response = execMapper(\"map\", [jsonResponse], options);\n statuses.push(+status);\n statusesTexts.push(response.description);\n if (+status !== 204) {\n const { content } = response;\n const schema = content[Object.keys(content)[0]];\n if (+status >= 200 && +status < 400) {\n successSchemes.push(schema);\n }\n else {\n successSchemes.push(schema);\n }\n }\n });\n const responsePayloadName = pascalCase([operationPath.path, operationPath.method, \"Response\"].join(\" \"));\n const responsePayload = {\n type: \"object\",\n properties: {\n status: {\n type: \"number\",\n enum: statuses\n },\n statusText: {\n type: \"string\",\n enum: statusesTexts\n }\n },\n required: [\"status\"]\n };\n const dataSchema = makeOf(\"oneOf\", successSchemes);\n if (dataSchema) {\n setValue(responsePayload, \"properties.data\", dataSchema);\n }\n const errorSchema = makeOf(\"oneOf\", errorSchemes);\n if (errorSchemes.length) {\n setValue(responsePayload, \"properties.error\", errorSchema);\n }\n setValue(options, `components.schemas.${responsePayloadName}`, responsePayload);\n return { $ref: `#/components/schemas/${responsePayloadName}` };\n}\nregisterJsonSchemaMapper(\"response\", responsePayloadMapper, SpecTypes.ASYNCAPI);\n","import { uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n const specJson = {\n channels: execMapper(\"channels\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (options.components?.schemas && Object.keys(options.components.schemas).length) {\n specJson.components = {\n ...options.components,\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.ASYNCAPI);\n","import { nameOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore.js\";\nexport class JsonLazyRef {\n constructor(getType) {\n this.getType = getType;\n this.isLazyRef = true;\n }\n get target() {\n return this.getType();\n }\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n get name() {\n return nameOf(this.getType());\n }\n}\n","import { cleanObject, setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * ignore\n * @param options\n */\nfunction getHost(options) {\n const { host = `#/${[SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType) ? \"components/schemas\" : \"definitions\"}` } = options;\n return host;\n}\n/**\n * @ignore\n */\nexport function createRefName(name, options) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groupsName || options.groups.join(\" \")}`);\n }\n return name;\n}\n/**\n * @ignore\n */\nexport function createRef(name, schema, options) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n const readOnly = schema.isReadOnly;\n const writeOnly = schema.isWriteOnly;\n return cleanObject({\n readOnly: readOnly ? true : undefined,\n writeOnly: writeOnly ? true : undefined,\n ...(readOnly || writeOnly\n ? {\n anyOf: [ref]\n }\n : ref)\n });\n}\n/**\n * @ignore\n */\nexport function toRef(value, schema, options) {\n const name = createRefName(value.getName(), options);\n if (schema) {\n setValue(options, `components.schemas.${name}`, schema);\n }\n return createRef(name, value, options);\n}\n","import { JsonLazyRef } from \"../../domain/JsonLazyRef.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, oneOfMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function anyMapper(input, options = {}) {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", [input], options);\n }\n if (input instanceof JsonSchema && input.get(\"enum\") instanceof JsonSchema) {\n const enumSchema = input.get(\"enum\");\n return toRef(enumSchema, enumSchema.toJSON(options), options);\n }\n if (input.$kind && input.$isJsonDocument) {\n const kind = oneOfMapper([input.$kind, \"map\"], options);\n const schema = execMapper(kind, [input], mapGenericsOptions(options));\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n return execMapper(\"object\", [input], options);\n}\nregisterJsonSchemaMapper(\"any\", anyMapper);\n","import { getValue, setValue } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions, popGenerics } from \"../../utils/generics.js\";\nimport { createRef, createRefName } from \"../../utils/ref.js\";\nexport function classMapper(value, options) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n if (value.hasGenerics) {\n // Inline generic\n const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", [store.schema], {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n if (schema.title) {\n const name = createRefName(schema.title, options);\n setValue(options.components, `schemas.${name}`, schema);\n delete schema.title;\n return createRef(name, value, options);\n }\n return schema;\n }\n if (!getValue(options, `components.schemas.${name}`)) {\n // avoid infinite calls\n setValue(options, `components.schemas.${name}`, {});\n options.components.schemas[name] = execMapper(\"any\", [store.schema], mapGenericsOptions({\n ...options,\n root: false\n }));\n }\n return createRef(name, value, options);\n}\nregisterJsonSchemaMapper(\"class\", classMapper);\n","import { isString } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function discriminatorMappingMapper(obj, _, options) {\n if (obj.discriminator?.mapping) {\n const entries = Object.entries(obj.discriminator.mapping);\n const newMapping = {};\n for (const [key, value] of entries) {\n newMapping[key] = isString(value) ? value : toRef(value, null, options).$ref;\n }\n obj.discriminator.mapping = newMapping;\n }\n return obj;\n}\nfunction defaultDiscriminatorMappingMapper(obj) {\n if (obj.discriminator?.mapping) {\n delete obj.discriminator.mapping;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"discriminatorMapping\", defaultDiscriminatorMappingMapper);\n","import { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function enumsMapper(obj, schema, options) {\n if (options.inlineEnums && obj.enum?.$isJsonDocument) {\n obj.enum = obj.enum.toJSON().enum;\n }\n if (obj.enum) {\n obj.type = obj.type === \"object\" || obj.type === undefined ? \"string\" : obj.type;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", enumsMapper);\n","import { isClass, isPrimitiveClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { getJsonType } from \"../../utils/getJsonType.js\";\n/**\n * @ignore\n */\nexport function genericsMapper(obj, options) {\n const { generics } = options;\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n if (isClass(type)) {\n const model = {\n class: type\n };\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", [model], {\n ...options,\n generics: undefined\n });\n }\n const store = JsonEntityStore.from(model.class);\n return execMapper(\"schema\", [store.schema], {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n","import { classOf, deepMerge } from \"@tsed/core\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { getInheritedStores } from \"../../utils/getInheritedStores.js\";\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj, { target, ...options }) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", [store.schema], options));\n }, {});\n obj = deepMerge(schema, obj);\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function itemMapper(value, options) {\n return value && value.isClass ? execMapper(\"class\", [value], options) : execMapper(\"any\", [value], options);\n}\nregisterJsonSchemaMapper(\"item\", itemMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { createRef, toRef } from \"../../utils/ref.js\";\nexport function lazyRefMapper(jsonLazyRef, options) {\n const name = jsonLazyRef.name;\n if (options.$refs?.find((t) => t === jsonLazyRef.target)) {\n return createRef(name, jsonLazyRef.schema, options);\n }\n options.$refs = [...(options.$refs || []), jsonLazyRef.target];\n const schema = jsonLazyRef.getType() && execMapper(\"schema\", [jsonLazyRef.schema], mapGenericsOptions(options));\n return toRef(jsonLazyRef.schema, schema, options);\n}\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input, { ignore = [], ...options } = {}) {\n options = mapGenericsOptions(options);\n return Array.from(input.entries()).reduce((obj, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n obj[key] = execMapper(\"item\", [value], options);\n return obj;\n }, {});\n}\nregisterJsonSchemaMapper(\"map\", mapMapper);\n","export const MANY_OF_PROPERTIES = [\"oneOf\", \"allOf\", \"anyOf\"];\nexport const STRING_PROPERTIES = [\"minLength\", \"maxLength\", \"pattern\", \"format\"];\nexport const BOOLEAN_PROPERTIES = [];\nexport const NUMBER_PROPERTIES = [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"];\nexport const ARRAY_PROPERTIES = [\"maxItems\", \"minItems\", \"uniqueItems\", \"items\", \"contains\", \"maxContains\", \"minContains\"];\nexport const OBJECT_PROPERTIES = [\n \"maxItems\",\n \"minItems\",\n \"uniqueItems\",\n \"items\",\n \"contains\",\n \"maxContains\",\n \"minContains\",\n \"patternProperties\",\n \"dependencies\"\n];\nexport const COMMON_PROPERTIES = [\"const\", \"enum\"];\n","import { cleanObject } from \"@tsed/core\";\nimport { MANY_OF_PROPERTIES } from \"../../constants/jsonSchemaProperties.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapper(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (!obj.discriminator) {\n if (obj.$ref) {\n obj = cleanObject({\n ...obj,\n $ref: undefined,\n anyOf: [\n { type: \"null\" },\n {\n $ref: obj.$ref\n }\n ]\n });\n }\n else {\n MANY_OF_PROPERTIES.some((keyword) => {\n if (obj[keyword]) {\n obj[keyword] = obj[keyword].filter((item) => item.type !== \"null\");\n if (obj[keyword].length === 1) {\n const base = obj[keyword];\n obj = cleanObject({\n ...obj,\n ...base[0],\n [keyword]: undefined,\n type: [\"null\", Number.isInteger(obj.multipleOf) ? \"integer\" : base[0].type]\n });\n }\n else {\n obj[keyword] = [{ type: \"null\" }].concat(obj[keyword]).map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n });\n delete obj.type;\n }\n }\n });\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapper);\n","import { isBoolean } from \"@tsed/core\";\n/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema, options) {\n if (isBoolean(schema.$ignore) && schema.$ignore) {\n return true;\n }\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n if (result) {\n return result;\n }\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n return result;\n}\n","import { isArray } from \"@tsed/core\";\nimport { alterIgnore } from \"../../hooks/alterIgnore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input, options) {\n const { specType, operationIdFormatter, root, components, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;\n return Object.entries(input).reduce((obj, [key, value]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", [value], opts);\n obj[key] = execMapper(\"nullable\", [obj[key], value], opts);\n }\n return obj;\n }, isArray(input) ? [] : {});\n}\nregisterJsonSchemaMapper(\"object\", objectMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function ofMapper(input, options, parent) {\n return input.map((value) => {\n return execMapper(\"item\", [value], {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function propertiesMapper(input, options, parent) {\n if (input.isClass) {\n return execMapper(\"class\", [input], options);\n }\n return execMapper(\"any\", [input], {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n","/**\n * @ignore\n */\nexport function alterRequiredGroups(required, schema, options) {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n return required;\n}\n","import { uniq } from \"@tsed/core\";\nimport { alterRequiredGroups } from \"../../hooks/alterRequiredGroups.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction mapRequiredProps(obj, schema, options = {}) {\n const { useAlias } = options;\n const props = Object.keys(obj.properties || {});\n return (keys, key) => {\n const aliasedKey = useAlias ? schema.alias.get(key) || key : key;\n if (props.includes(aliasedKey)) {\n return keys.concat(aliasedKey);\n }\n return keys;\n };\n}\nfunction extractRequiredProps(obj, schema, options) {\n let required = obj.required || [];\n required = [...required, ...schema.$required];\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n return required;\n }, required);\n }\n return alterRequiredGroups(uniq(required), schema, options);\n}\nexport function requiredMapper(obj, schema, options) {\n if (options.groups && options.groups.includes(\"partial\")) {\n if (obj.discriminator) {\n return {\n ...obj,\n required: [obj.discriminator.propertyName]\n };\n }\n return obj;\n }\n let required = extractRequiredProps(obj, schema, options);\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n if (required.length) {\n obj.required = required;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"required\", requiredMapper);\n","/**\n * @ignore\n */\nexport function mapAliasedProperties(value, alias) {\n return Object.entries(value).reduce((properties, [key, value]) => {\n key = alias.get(key) || key;\n properties[key] = value;\n return properties;\n }, {});\n}\n","import { isBoolean, isNumber, isString } from \"@tsed/core\";\nimport { ARRAY_PROPERTIES, BOOLEAN_PROPERTIES, COMMON_PROPERTIES, MANY_OF_PROPERTIES, NUMBER_PROPERTIES, OBJECT_PROPERTIES, STRING_PROPERTIES } from \"../constants/jsonSchemaProperties.js\";\nfunction findManyOf(obj) {\n return MANY_OF_PROPERTIES.find((keyword) => obj[keyword]);\n}\nconst RULES = {\n string: { properties: STRING_PROPERTIES, is: isString },\n number: { properties: NUMBER_PROPERTIES, is: isNumber },\n boolean: { properties: BOOLEAN_PROPERTIES, is: isBoolean },\n array: { properties: ARRAY_PROPERTIES, is: () => false },\n object: { properties: OBJECT_PROPERTIES, is: () => false }\n};\nfunction pickProperties(type, obj, item) {\n const rule = RULES[type];\n rule?.properties.concat(COMMON_PROPERTIES).forEach((keyword) => {\n if (obj[keyword] !== undefined) {\n if (COMMON_PROPERTIES.includes(keyword)) {\n item[keyword] = obj[keyword].filter(rule.is);\n }\n else {\n item[keyword] = obj[keyword];\n delete obj[keyword];\n }\n }\n });\n}\nexport function alterOneOf(obj, schema, options) {\n const kind = findManyOf(obj);\n if (kind) {\n obj[kind].forEach((item) => {\n pickProperties(item.type, obj, item);\n });\n MANY_OF_PROPERTIES.forEach((keyword) => {\n if (obj[keyword] && options.groups !== false && schema.$hooks.has(keyword)) {\n obj = { ...obj, [keyword]: schema.$hooks.alter(keyword, obj[keyword], [options.groups]) };\n }\n });\n delete obj.const;\n delete obj.enum;\n if (!(obj.items || obj.properties)) {\n delete obj.type;\n }\n }\n return obj;\n}\n","import { getValue, isObject } from \"@tsed/core\";\nimport { mapAliasedProperties } from \"../../domain/JsonAliasMap.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { alterOneOf } from \"../../hooks/alterOneOf.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [];\n/**\n * @ignore\n */\nfunction isEmptyProperties(key, value) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n/**\n * @ignore\n */\nfunction shouldMapAlias(key, value, useAlias) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n/**\n * @ignore\n */\nfunction shouldSkipKey(key, { specType = SpecTypes.JSON, customKeys = false }) {\n return (IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));\n}\nfunction isExample(key, value, options) {\n return key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType);\n}\nfunction mapOptions(options) {\n let addDef = false;\n if (!options) {\n addDef = true;\n options = { components: { schemas: {} }, inlineEnums: true };\n }\n const { useAlias = true, components = { schemas: {} } } = options;\n options = {\n ...options,\n useAlias,\n components\n };\n return {\n addDef,\n options\n };\n}\nfunction mapKeys(schema, options) {\n const { useAlias } = options;\n return [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item, key) => {\n let value = schema.get(key);\n key = key.replace(/^#/, \"\");\n if (key === \"type\") {\n item[key] = schema.getJsonType();\n return item;\n }\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, [value], options, schema);\n if (isEmptyProperties(key, value)) {\n return item;\n }\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n item[key] = value;\n return item;\n }, {});\n}\nfunction serializeSchema(schema, options) {\n let obj = mapKeys(schema, options);\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", [obj], {\n ...options,\n root: false,\n target: schema.getComputedType()\n });\n }\n obj = execMapper(\"generics\", [obj], {\n ...options,\n root: false\n });\n if (schema.has(options.specType)) {\n obj = {\n ...obj,\n ...schema.get(options.specType).toJSON(options)\n };\n }\n obj = execMapper(\"required\", [obj, schema], options);\n obj = execMapper(\"nullable\", [obj, schema], options);\n obj = alterOneOf(obj, schema, options);\n obj = execMapper(\"enums\", [obj, schema], options);\n obj = execMapper(\"discriminatorMapping\", [obj, schema], options);\n return obj;\n}\nexport function schemaMapper(schema, opts) {\n const { options, addDef } = mapOptions(opts);\n const obj = serializeSchema(schema, options);\n if (addDef && Object.keys(getValue(options, \"components.schemas\", {})).length) {\n obj.definitions = options.components.schemas;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { enumsMapper } from \"../default/enumsMapper.js\";\nexport function wrapEnumsMapper(obj, schema, options) {\n obj = enumsMapper(obj, schema, options);\n if (obj.const) {\n obj.enum = [obj.const];\n delete obj.const;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.ASYNCAPI);\n","import { getValue, uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n options = {\n ...options,\n specType: SpecTypes.OPENAPI\n };\n const specJson = {\n paths: execMapper(\"paths\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n specJson.components = {\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapperOpenApi(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (obj.$ref) {\n return cleanObject({\n ...obj,\n ...(obj.$ref && {\n anyOf: [\n {\n $ref: obj.$ref\n }\n ],\n type: undefined\n }),\n nullable: true,\n $ref: undefined\n });\n }\n return cleanObject({\n ...obj,\n ...(obj.anyOf?.length === 1\n ? {\n ...obj.anyOf[0],\n anyOf: undefined,\n type: Number.isInteger(obj.multipleOf) ? \"integer\" : obj.anyOf[0]?.type\n }\n : {\n type: obj.anyOf?.length > 1 ? undefined : obj.type,\n anyOf: obj.anyOf?.map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n })\n }),\n nullable: true\n });\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInFilesMapper(parameter, { jsonSchema }) {\n const schema = {\n type: \"string\",\n format: \"binary\",\n oneOf: undefined\n };\n if (jsonSchema.type === \"array\") {\n jsonSchema.items = cleanObject({\n ...jsonSchema.items,\n ...schema\n });\n parameter.schema = jsonSchema;\n return parameter;\n }\n parameter.schema = cleanObject({\n ...jsonSchema,\n ...schema\n });\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInFiles\", operationInFilesMapper);\n","import { camelCase } from \"change-case\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nexport function operationInParameterMapper(jsonParameter, opts) {\n const options = mapOptions(jsonParameter, opts);\n const schemas = { ...(options.components?.schemas || {}) };\n const { type, schema, ...parameter } = execMapper(\"map\", [jsonParameter], options);\n const jsonSchema = execMapper(\"item\", [jsonParameter.$schema], {\n ...options,\n ...popGenerics(jsonParameter)\n });\n parameter.required = parameter.required || jsonParameter.get(\"in\") === JsonParameterTypes.PATH;\n const paramOpts = {\n ...options,\n jsonSchema,\n jsonParameter,\n oldSchemas: schemas\n };\n const mapperName = camelCase(`operationIn ${jsonParameter.get(\"in\")}`);\n if (hasMapper(mapperName)) {\n return execMapper(mapperName, [parameter], paramOpts);\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInParameter\", operationInParameterMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInParametersMapper(parameters, options) {\n return parameters.flatMap((parameter) => execMapper(\"operationInParameter\", [parameter], options)).filter(Boolean);\n}\nregisterJsonSchemaMapper(\"operationInParameters\", operationInParametersMapper);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { createRefName } from \"../../utils/ref.js\";\nfunction buildExamples(property, examples) {\n if (!examples) {\n return undefined;\n }\n let hasKey = false;\n const newExamples = Object.entries(examples).reduce((acc, [key, { value, description, ...props }]) => {\n if (value[property] === undefined) {\n return acc;\n }\n hasKey = true;\n return {\n ...acc,\n [key]: {\n ...props,\n value: value[property],\n description\n }\n };\n }, {});\n return hasKey ? newExamples : undefined;\n}\nfunction inlineReference(parameter, { jsonParameter, ...options }) {\n const name = createRefName(jsonParameter.$schema.getName(), options);\n const schema = options.components?.schemas?.[name];\n if (schema && !options.oldSchemas?.[name]) {\n delete options.components.schemas[jsonParameter.$schema.getName()];\n }\n return Object.entries(schema?.properties || {}).reduce((params, [key, { description, ...prop }]) => {\n return [\n ...params,\n cleanObject({\n ...parameter,\n name: key,\n required: (schema?.required || []).includes(key),\n description,\n schema: prop,\n style: prop.$ref ? \"deepObject\" : undefined,\n examples: buildExamples(key, parameter.examples)\n })\n ];\n }, []);\n}\nexport function operationInQueryMapper(parameter, { jsonSchema, jsonParameters, ...options }) {\n if (jsonSchema.$ref) {\n if (!parameter.name) {\n return inlineReference(parameter, options);\n }\n parameter.style = \"deepObject\";\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInQuery\", operationInQueryMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { discriminatorMappingMapper } from \"../default/discriminatorMappingMapper.js\";\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.ASYNCAPI);\n","import { constantCase } from \"change-case\";\nimport statuses from \"statuses\";\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map, code) => {\n const message = String(statuses(code));\n return {\n ...map,\n [String(code)]: { label: message, code: constantCase(message) }\n };\n}, {});\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\nexport function getStatusConstant(status) {\n return HTTP_STATUS_MESSAGES[status]?.code;\n}\nexport function getStatusMessage(status) {\n return HTTP_STATUS_MESSAGES[status]?.label;\n}\n","import { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction extractParameters(jsonOperation, options) {\n return jsonOperation\n .get(\"parameters\")\n .filter((parameter) => isParameterType(parameter.get(\"in\")))\n .reduce((inputs, parameter) => {\n const [parameters, bodyParameters] = inputs;\n if ([JsonParameterTypes.BODY, JsonParameterTypes.FILES].includes(parameter.get(\"in\"))) {\n return [parameters, [...bodyParameters, parameter]];\n }\n return [[...parameters, parameter], bodyParameters];\n }, [[], []]);\n}\nexport function operationMapper(jsonOperation, { tags = [], defaultTags = [], ...options } = {}) {\n const { consumes, produces, ...operation } = execMapper(\"map\", [jsonOperation], { ...options, ignore: [\"parameters\"] });\n if (operation.security) {\n operation.security = [].concat(operation.security);\n }\n if (jsonOperation.get(\"responses\").size === 0) {\n operation.responses = {\n \"200\": {\n description: getStatusMessage(200)\n }\n };\n }\n const parametersOptions = {\n ...options,\n consumes: jsonOperation.get(\"consumes\")?.length ? jsonOperation.get(\"consumes\") : [\"application/json\"]\n };\n const [parameters, bodyParameters] = extractParameters(jsonOperation, parametersOptions);\n operation.parameters = execMapper(\"operationInParameters\", [parameters], options);\n if (bodyParameters.length) {\n operation.requestBody = execMapper(\"operationRequestBody\", [bodyParameters], parametersOptions);\n }\n const operationTags = operation.tags?.length ? operation.tags : defaultTags;\n if (operationTags.length) {\n operation.tags = operationTags.map(({ name }) => name);\n }\n tags.push(...operationTags);\n return operation;\n}\nregisterJsonSchemaMapper(\"operation\", operationMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationMediaMapper(jsonMedia, options) {\n let groups = [...(jsonMedia.groups || [])];\n return execMapper(\"map\", [jsonMedia], { ...options, groups, groupsName: jsonMedia.groupsName });\n}\nregisterJsonSchemaMapper(\"operationMedia\", operationMediaMapper);\n","import { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nexport class JsonRequestBody extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationRequestBody\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content));\n return this;\n }\n addContent(mediaType, schema, examples) {\n const content = this.get(\"content\");\n const mediaContent = new JsonMap();\n mediaContent.set(\"schema\", schema);\n examples && mediaContent.set(\"examples\", examples);\n content.set(mediaType, mediaContent);\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n}\n","import { JsonRequestBody } from \"../../domain/JsonRequestBody.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction buildSchemaFromBodyParameters(parameters, options) {\n let schema = new JsonSchema();\n const props = {};\n const refs = [];\n let propsLength = 0;\n const hasFile = parameters.some((param) => param.get(\"in\") === \"files\");\n parameters.forEach((parameter) => {\n const name = parameter.getName();\n [...parameter.entries()]\n .filter(([key]) => ![\"in\", \"name\"].includes(key))\n .forEach(([key, value]) => {\n if (props[key] === undefined) {\n props[key] = value;\n }\n });\n const jsonParameter = execMapper(\"operationInParameter\", [parameter], options);\n if (name) {\n const propSchema = {\n ...(jsonParameter.schema || {\n type: jsonParameter.type\n })\n };\n if (hasFile && jsonParameter.description) {\n propSchema.description = jsonParameter.description;\n }\n schema.addProperty(name, propSchema);\n if (parameter.get(\"required\")) {\n schema.addRequired(name);\n }\n propsLength++;\n }\n else {\n refs.push(jsonParameter);\n }\n });\n if (!propsLength) {\n if (refs.length === 1) {\n return refs[0];\n }\n }\n schema.type(\"object\");\n if (props.description && hasFile) {\n delete props.description;\n }\n return {\n schema: schema.toJSON(options),\n required: false,\n ...props\n };\n}\nexport function operationRequestBodyMapper(bodyParameters, { consumes, ...options }) {\n const { schema, examples, in: _, ...props } = buildSchemaFromBodyParameters(bodyParameters, options);\n const requestBody = new JsonRequestBody(props);\n consumes.forEach((consume) => {\n requestBody.addContent(consume, schema, examples);\n });\n return execMapper(\"map\", [requestBody], options);\n}\nregisterJsonSchemaMapper(\"operationRequestBody\", operationRequestBodyMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationResponseMapper(jsonResponse, options = {}) {\n const response = execMapper(\"map\", [jsonResponse], options);\n if (jsonResponse.status === 204) {\n delete response.content;\n }\n if (response.headers) {\n Object.entries(response.headers).forEach(([key, { type, ...props }]) => {\n response.headers[key] = {\n ...props,\n schema: {\n type\n }\n };\n });\n }\n return response;\n}\nregisterJsonSchemaMapper(\"operationResponse\", operationResponseMapper);\n","/**\n * @ignore\n */\nexport function concatParameters(parameters, operation) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p) => p.in === param.in && p.name === param.name);\n return f || param;\n })\n .concat(...operation.parameters.filter((param) => param.in !== \"path\"));\n}\n","/**\n * @ignore\n */\nfunction getVariable(subpath) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\nfunction parseUrl(key) {\n let inCapture = 0;\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n const result = inCapture === 0;\n if (c === \")\") {\n inCapture--;\n }\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base, path = \"\") {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n const params = [];\n const paths = [];\n let isOptional = false;\n let current = \"\";\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n const { prefix, name, postfix } = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n }\n else {\n current += `/${key}`;\n }\n });\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params)\n }\n ];\n}\n","import { camelCase } from \"change-case\";\nconst DEFAULT_PATTERN = \"%c.%m\";\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern = \"\") {\n const OPERATION_IDS = new Map();\n const transform = (name, propertyKey) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n return (name, propertyKey, path = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return operationId;\n }\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return camelCase(`${operationId} By ${result}`);\n }\n }\n const id = OPERATION_IDS.get(operationKey) + 1;\n OPERATION_IDS.set(operationKey, id);\n return `${operationId}_${id}`;\n };\n}\nexport function getOperationId(path, { store, operationIdFormatter }) {\n return operationIdFormatter(store.parent.schema.get(\"name\") || store.parent.targetName, store.propertyName, path);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { concatParameters } from \"../../utils/concatParameters.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getJsonPathParameters } from \"../../utils/getJsonPathParameters.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { getOperationId } from \"../../utils/operationIdFormatter.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.OPTIONS,\n OperationVerbs.DELETE,\n OperationVerbs.TRACE\n];\nfunction pushToPath(paths, { path, method, operation }) {\n return {\n ...paths,\n [path]: {\n ...paths[path],\n [method.toLowerCase()]: operation\n }\n };\n}\nfunction mapOperationInPathParameters(options) {\n return ({ operationPath, operation, operationStore }) => {\n const { path, method } = operationPath;\n return getJsonPathParameters(options.ctrlRootPath, path).map(({ path, parameters }) => {\n path = path ? path : \"/\";\n parameters = concatParameters(parameters.map(({ type, ...param }) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n }), operation);\n return {\n operation: {\n ...operation,\n parameters,\n operationId: operation.operationId ||\n getOperationId(path, {\n ...options,\n store: operationStore\n })\n },\n method,\n path\n };\n });\n };\n}\nfunction mapOperation(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n const operation = execMapper(\"operation\", [operationStore.operation], options);\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operation,\n operationStore\n };\n });\n };\n}\nexport function pathsMapper(model, { paths, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .filter((operationStore) => operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS).length > 0)\n .flatMap(mapOperation(options))\n .flatMap(mapOperationInPathParameters(options))\n .reduce(pushToPath, paths);\n}\nregisterJsonSchemaMapper(\"paths\", pathsMapper);\n","import { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn(fn) {\n return (...parameters) => {\n const result = fn(getJsonEntityStore(...parameters), parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n","import { Store } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children) {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n","import { snakeCase } from \"change-case\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value, ...values) {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type, collectionType) {\n if (!type) {\n throw new Error(\"A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.\");\n }\n const schema = {};\n let contains = false;\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n store.type = type;\n store.itemSchema.type(type);\n store.schema.assign(schema);\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n decorator.MinItems = (minItems) => {\n schema.minItems = minItems;\n return decorator;\n };\n decorator.MaxItems = (maxItems) => {\n schema.maxItems = maxItems;\n return decorator;\n };\n decorator.MinProperties = (minProperties) => {\n schema.minProperties = minProperties;\n return decorator;\n };\n decorator.MaxProperties = (maxProperties) => {\n schema.maxProperties = maxProperties;\n return decorator;\n };\n decorator.Contains = () => {\n contains = true;\n return decorator;\n };\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n return decorator;\n };\n return decorator;\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type) {\n return CollectionOf(type, Array);\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type) {\n return CollectionOf(type, Map);\n}\n","import { CollectionOf } from \"./collectionOf.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type) {\n return CollectionOf(type).Contains();\n}\n","import { deepMerge, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../decorators/common/jsonEntityFn.js\";\nexport function withErrorMsg(errorKey, originalDecorator) {\n const schema = {};\n return ((...decoratorOptions) => {\n const decorator = useDecorators(originalDecorator(...decoratorOptions));\n decorator.Error = (message) => {\n schema.message = message;\n return useDecorators(decorator, schema.message &&\n JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n if (errorKey === \"required\") {\n store.parentSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: {\n [store.propertyName]: message\n }\n }));\n }\n else {\n store.itemSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: message\n }));\n }\n }));\n };\n return decorator;\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxItems = withErrorMsg(\"maxItems\", (maxItems) => {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxProperties = withErrorMsg(\"maxProperties\", (maxProperties) => {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinItems = withErrorMsg(\"minItems\", (minItems) => {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinProperties = withErrorMsg(\"minProperties\", (minProperties) => {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const UniqueItems = withErrorMsg(\"uniqueItems\", (uniqueItems = true) => {\n return JsonEntityFn((store) => {\n store.schema.uniqueItems(uniqueItems);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n","import { isArrowFn, isClass } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type) || isArrowFn(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n","import { DecoratorTypes, isClass, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values) {\n const model = values.find((item) => isClass(item));\n return useDecorators(model && Property(model), JsonEntityFn((store, args) => {\n if (store.decoratorType === DecoratorTypes.PARAM) {\n store.required = true;\n }\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n store.schema.allow(...values);\n }));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key, value) {\n return JsonEntityFn((store) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj) {\n return JsonEntityFn((store) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an error message to the property.\n * @decorator\n * @ajv\n */\nexport function ErrorMsg(obj) {\n return JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n store.parentSchema.customKey(\"errorMessage\", { ...errorMessage, ...obj });\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\n/**\n * Set default error message.\n *\n * ## Example\n *\n * ```typescript\n * @DefaultMsg(\"foo should be a string\")\n * class Model {\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": \"number\"\n * }\n * \"errorMessage\": {\n * \"_\": \"foo should be a string\"\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function DefaultMsg(message) {\n return useDecorators(ErrorMsg({ _: message }));\n}\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.description(description);\n break;\n case DecoratorTypes.METHOD:\n store.operation?.description(description);\n break;\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\nexport function DiscriminatorKey() {\n return useDecorators(Property(), JsonEntityFn((store) => {\n store.discriminatorKey();\n }));\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nfunction EnumFn(enumValue, ...enumValues) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n/**\n * The enum keyword is used to restrict a value to a fixed set of values.\n * It must be an array with at least one element, where each element is unique.\n *\n * Elements in the array might be of any value, including null.\n *\n * ::: warning\n * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: \"value1\" | \"value2\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: (\"value1\" | \"value2\")[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * }\n * ```\n *\n * ### With Typescript Enum\n *\n * ```typescript\n * enum SomeEnum {\n * ENUM_1 = \"enum1\",\n * ENUM_2 = \"enum2\"\n * }\n *\n * class Model {\n * @Enum(SomeEnum)\n * property: SomeEnum;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"enum1\", \"enum2\"]\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} enumValue\n * @param enumValues\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Enum = withErrorMsg(\"enum\", EnumFn);\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples) {\n return JsonEntityFn((store) => {\n store.schema.examples(examples);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples) {\n return JsonEntityFn((store) => {\n store.parameter.examples(examples);\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Maximum } from \"./maximum.js\";\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMaximum = withErrorMsg(\"exclusiveMaximum\", (maximum, exclusiveMaximum = true) => {\n return Maximum(maximum, exclusiveMaximum);\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Minimum = withErrorMsg(\"minimum\", (minimum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n});\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Min = Minimum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Minimum } from \"./minimum.js\";\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum, exclusiveMinimum = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n","export var JsonFormatTypes;\n(function (JsonFormatTypes) {\n JsonFormatTypes[\"DATE_TIME\"] = \"date-time\";\n JsonFormatTypes[\"DATE\"] = \"date\";\n JsonFormatTypes[\"TIME\"] = \"time\";\n JsonFormatTypes[\"EMAIL\"] = \"email\";\n JsonFormatTypes[\"HOSTNAME\"] = \"hostname\";\n JsonFormatTypes[\"IPV4\"] = \"ipv4\";\n JsonFormatTypes[\"IPV6\"] = \"ipv6\";\n JsonFormatTypes[\"URI\"] = \"uri\";\n JsonFormatTypes[\"URL\"] = \"url\";\n JsonFormatTypes[\"URI_REF\"] = \"uri-reference\";\n JsonFormatTypes[\"URI_TEMPLATE\"] = \"uri-template\";\n JsonFormatTypes[\"JSON_POINTER\"] = \"json-pointer\";\n JsonFormatTypes[\"RELATIVE_JSON_POINTER\"] = \"relative-json-pointer\";\n JsonFormatTypes[\"UUID\"] = \"uuid\";\n JsonFormatTypes[\"REGEX\"] = \"regex\";\n})(JsonFormatTypes || (JsonFormatTypes = {}));\n","import { JsonFormatTypes } from \"../../domain/JsonFormatTypes.js\";\nimport { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true) {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n","import picomatch from \"picomatch\";\nfunction micromatch(list, patterns) {\n patterns = [].concat(patterns);\n list = [].concat(list);\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n let onResult = (state) => {\n items.add(state.output);\n };\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) {\n negatives++;\n }\n for (let item of list) {\n let matched = isMatch(item, true);\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match)\n continue;\n if (negated) {\n omit.add(matched.output);\n }\n else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n/**\n * @ignore\n */\nexport function matchGroups(groups, compareWith = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n if (groupsIncludes.length) {\n return !micromatch(groups.filter((group) => !group.startsWith(\"!\")), compareWith);\n }\n return false;\n}\n","import { DecoratorTypes, isArray } from \"@tsed/core\";\nimport { matchGroups } from \"../../utils/matchGroups.js\";\nimport { CustomKey } from \"./customKey.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * @ignore\n */\nfunction groupsClass(groups, entity) {\n const entries = Object.entries(groups[0]);\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator = Groups(...groups);\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\nexport function Groups(...groups) {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity);\n break;\n case DecoratorTypes.PROP:\n CustomKey(\"x-groups\", groups)(entity.target, entity.propertyKey);\n entity.schema.$hooks.on(\"groups\", (prev, givenGroups) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n entity.parameter.groups = groups;\n entity.parameter.groupsName = groupsName;\n break;\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.endpoint)\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Controller, BodyParams} from \"@tsed/platform-http\";\n * import {Post} from \"@tsed/schema\";\n * import {Person} from \"../models/Person.js\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @deprecated Since v7. Use @Groups decorator instead of and enable `jsonMapper.strictGroups` in your configuration.\n */\nexport function Ignore(cb = true) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MinLength = withErrorMsg(\"minLength\", (minLength) => {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MultipleOf = withErrorMsg(\"multipleOf\", (multipleOf) => {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n});\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { Any } from \"./any.js\";\nimport { Property } from \"./property.js\";\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type, ...types) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Pattern = withErrorMsg(\"pattern\", (pattern) => {\n return JsonEntityFn((store) => {\n store.itemSchema.pattern(pattern);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema) {\n return JsonEntityFn((entity) => {\n entity.schema.assign(partialSchema);\n });\n}\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType, schema) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n","import { Schema } from \"./schema.js\";\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model, ...keys) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Allow } from \"./allow.js\";\nimport { Optional } from \"./optional.js\";\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Required = withErrorMsg(\"required\", (required = true, ...allowedRequiredValues) => {\n return required ? Allow(...allowedRequiredValues) : Optional();\n});\n","import { matchGroups } from \"../../utils/matchGroups.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups) {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required, givenGroups) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key) => key !== entity.propertyKey);\n }\n return required;\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function TypeError(msg) {\n return JsonEntityFn(() => useDecorators(ErrorMsg({ type: msg })));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n","import { isClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { JsonLazyRef } from \"../domain/JsonLazyRef.js\";\nimport { JsonSchema } from \"../domain/JsonSchema.js\";\nimport { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type = Object) {\n if (isClass(type)) {\n const { schema } = getJsonEntityStore(type);\n schema.properties = function properties(obj) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n return this;\n };\n return schema;\n }\n return JsonSchema.from({ type });\n}\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function number() {\n return from(Number);\n}\n/**\n * Declare a new integer model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function integer() {\n return from(Number).integer();\n}\n/**\n * Declare a new string model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function string() {\n return from(String);\n}\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function boolean() {\n return from(Boolean);\n}\n/**\n * Declare a new string model with `format: date`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function date() {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n/**\n * Declare a new string model with `format: datetime`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function datetime() {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n/**\n * Declare a new string model with `format: time`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function time() {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n/**\n * Declare a new string model with `format: email`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function email() {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri() {\n return from(String).format(JsonFormatTypes.URI);\n}\n/**\n * Declare a new string model with `format: url`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function url() {\n return from(String).format(JsonFormatTypes.URL);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array() {\n return from(Array);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map() {\n return from(Map).unknown(true);\n}\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function set() {\n return from(Array).uniqueItems(true);\n}\n/**\n * Declare a new object model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function object(properties = {}) {\n return from(Object).properties(properties);\n}\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function any(...types) {\n return from().any(...types);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n * @schemaFunctional\n */\nexport function anyOf(...anyOf) {\n return from().anyOf(anyOf);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf) {\n return from().oneOf(oneOf);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n * @schemaFunctional\n */\nexport function allOf(...allOf) {\n return from().allOf(allOf);\n}\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n *\n * @schemaFunctional\n */\nexport function lazyRef(cb) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema;\n }\n }\n catch (er) { }\n return new JsonLazyRef(cb);\n}\nexport function enums(e) {\n const schema = string().enum(e);\n enumsRegistry.set(e, schema);\n return schema;\n}\n","import { isObject } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { string } from \"../../utils/from.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics) {\n const nestedGenerics = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n decorator.Nested = (...generics) => {\n nestedGenerics.push(generics);\n return decorator;\n };\n return decorator;\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics) {\n return (target) => {\n const storedSchema = JsonEntityStore.from(target);\n storedSchema.schema.genericLabels = generics;\n };\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n","import { StoreSet, useDecorators } from \"@tsed/core\";\nimport { Produces } from \"./produces.js\";\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes) {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\n/**\n * @ignore\n */\nexport class DecoratorContext extends Map {\n constructor(opts = {}) {\n super();\n this.actions = [];\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n addAction(cb) {\n this.actions.push(cb);\n return this;\n }\n build() {\n const decorator = (...args) => this.bind(args, decorator);\n const wrap = (cb) => {\n return (...args) => {\n cb(...args);\n return decorator;\n };\n };\n const wrapKey = (key) => {\n return wrap((...values) => {\n key in this ? this[key](...values) : this.set(key, values[0]);\n });\n };\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n return decorator;\n }\n toObject() {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n getMergedKey(key, defaultValue) {\n let value = this.get(key) || defaultValue;\n if (!value) {\n return;\n }\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n bind(args, decorator) {\n this.entity = JsonEntityStore.from(...args);\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n onInit(args, decorator) {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n onMapKey(key, value) {\n this.entity.set(key, value);\n }\n runActions() {\n this.actions.forEach((action) => {\n action(this);\n });\n return this;\n }\n beforeInit() { }\n afterInit() { }\n}\n","const statusesModel = new Map();\nexport function defineStatusModel(status, model) {\n statusesModel.set(status, model);\n}\nexport function getStatusModel(status) {\n return statusesModel.get(status);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, isArray, isCollection, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, isString } from \"@tsed/core\";\nimport { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { getStatusModel } from \"../../utils/defineStatusModel.js\";\nimport { string } from \"../../utils/from.js\";\nimport { isSuccessStatus } from \"../../utils/isSuccessStatus.js\";\nimport { mapHeaders } from \"../../utils/mapHeaders.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\nfunction mapGenerics(types) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext {\n constructor({ status, model }) {\n super();\n this.methods = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\",\n \"binary\"\n ];\n this.model(model);\n this.status(status);\n }\n type(model) {\n return this.model(model);\n }\n model(model) {\n model && this.set(\"model\", model);\n return this;\n }\n status(status) {\n this.set(\"status\", status);\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n return this;\n }\n headers(headers) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n return this;\n }\n header(key, value) {\n if (value === undefined && isString(key)) {\n return this.headers({ [key]: { type: \"string\" } });\n }\n return this.headers({ [key]: value });\n }\n location(path, meta = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n return this;\n }\n groups(...groups) {\n if (groups.length === 2 && isArray(groups[1])) {\n this.set(\"groupsName\", groups[0]);\n this.set(\"groups\", groups[1]);\n }\n else {\n this.set(\"groups\", groups);\n }\n return this;\n }\n allowedGroups(...allowedGroups) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n nested(...generics) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n this.addAction((ctx) => {\n this.get(\"schema\").nestedGenerics.push(mapGenerics(generics));\n });\n return this;\n }\n of(...types) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema?.itemSchema({ type: types[0] });\n }\n else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n return this;\n }\n ofInteger() {\n return this.of(\"integer\");\n }\n oneOf(...types) {\n return this.manyOf(\"oneOf\", types);\n }\n allOf(...types) {\n return this.manyOf(\"allOf\", types);\n }\n anyOf(...types) {\n return this.manyOf(\"anyOf\", types);\n }\n schema(partial) {\n this.addAction(() => {\n const schema = this.get(\"schema\");\n schema.assign(partial);\n });\n return this;\n }\n examples(examples) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n title(title) {\n return this.schema({ title });\n }\n binary() {\n this.type(String);\n this.set(\"contentType\", \"application/octet-stream\");\n this.schema({ format: \"binary\" });\n return this;\n }\n checkPrimitive(model) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n checkCollection(model) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n if ((model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) || this.hasOfTypes) {\n contentType = contentType || \"application/json\";\n }\n return contentType;\n }\n getStatus() {\n return this.get(\"status\") || \"default\";\n }\n onInit(args, decorator) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n map() {\n const model = this.get(\"model\");\n const { entity, decoratorType } = this;\n const operation = this.entity.operation;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n let { description = response.get(\"description\") } = this.toObject();\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n if (headers) {\n response.headers(headers);\n }\n this.mapMedia(response);\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n // run additional actions\n return this.runActions();\n }\n mapMedia(response) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({ type: model });\n const groups = this.get(\"groups\");\n const groupsName = this.get(\"groupsName\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation;\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({ type })));\n }\n else {\n schema.type(model);\n }\n }\n this.set(\"schema\", schema);\n media.schema(schema);\n media.groups = groups;\n media.groupsName = groupsName;\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n }));\n operation.addParameter(-1, jsonParameter);\n }\n const examples = this.get(\"examples\");\n if (examples) {\n media.examples(examples);\n }\n return media;\n }\n manyOf(kind, types) {\n const model = this.get(\"model\");\n this.hasOfTypes = true;\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema.type(model || Object);\n schema.itemSchema().set(kind, types);\n }\n else {\n schema.set(kind, types);\n }\n });\n return this;\n }\n}\nexport function Returns(status, model) {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n return context.build();\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type) {\n return Returns().ContentType(type);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n store.parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n store.schema.set(\"deprecated\", deprecated);\n break;\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n","import { isString } from \"@tsed/core\";\nimport { Returns } from \"./returns.js\";\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers, value) {\n if (value !== undefined) {\n headers = { [headers]: value };\n }\n if (value === undefined && isString(headers)) {\n headers = { [headers]: { type: \"string\" } };\n }\n return Returns().Headers(headers);\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType) {\n const jsonParameter = new JsonParameter();\n const schema = {};\n const decorator = (target, propertyKey, index) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n store.operation.addParameter(-1, jsonParameter);\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n decorator.Type = (type) => {\n schema.type = type;\n return decorator;\n };\n decorator.Name = (name) => {\n jsonParameter.name(name);\n return decorator;\n };\n decorator.Description = (description) => {\n jsonParameter.description(description);\n return decorator;\n };\n decorator.Required = (required = true) => {\n jsonParameter.required(required);\n return decorator;\n };\n decorator.Pattern = (pattern) => {\n return decorator.Schema({ pattern: pattern.toString() });\n };\n decorator.Schema = (_schema) => {\n Object.assign(schema, _schema.toJSON ? _schema.toJSON() : _schema);\n return decorator;\n };\n return decorator;\n}\n","import { Metadata, useDecorators, useMethodDecorators } from \"@tsed/core\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { Name } from \"../common/name.js\";\nimport { Consumes } from \"./consumes.js\";\nimport { In } from \"./in.js\";\nimport { Returns } from \"./returns.js\";\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name) {\n return (...args) => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index] === Array;\n name = (typeof name === \"object\" ? undefined : name);\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n const decorators = useDecorators(In(JsonParameterTypes.FILES), Name(expression), useMethodDecorators(Returns(400).Description(`<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1`), Consumes(\"multipart/form-data\")));\n decorators(...args);\n };\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location, meta) {\n return Returns().Location(location, meta);\n}\n","import { OperationVerbs } from \"../constants/OperationVerbs.js\";\nconst ALLOWED_VERBS = new Set([\n ...Object.keys(OperationVerbs)\n .filter((v) => v !== OperationVerbs.CUSTOM)\n .map((v) => v.toLowerCase())\n]);\nexport function mapOperationOptions(args) {\n let method = undefined;\n let path = undefined;\n const handlers = args.filter((arg) => {\n if (typeof arg === \"string\" && ALLOWED_VERBS.has(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n return false;\n }\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n return false;\n }\n return !!arg;\n });\n return {\n path,\n method,\n use: handlers\n };\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { mapOperationOptions } from \"../../utils/mapOperationOptions.js\";\nclass OperationDecoratorContext extends DecoratorContext {\n constructor() {\n super(...arguments);\n this.methods = [\"name\", \"description\", \"summary\", \"method\", \"id\", \"use\", \"useAfter\", \"useBefore\"];\n }\n beforeInit() {\n const path = this.get(\"path\");\n const method = OperationVerbs[this.get(\"method\")] || OperationVerbs.CUSTOM;\n path && this.entity.operation.addOperationPath(method, path);\n }\n onMapKey(key, value) {\n switch (key) {\n case \"name\":\n case \"id\":\n this.entity.operation.operationId(value);\n return;\n case \"summary\":\n this.entity.operation.summary(value);\n return;\n case \"description\":\n this.entity.operation.description(value);\n return;\n case \"use\":\n this.entity.use(value);\n return;\n case \"useAfter\":\n this.entity.after(value);\n return;\n case \"useBefore\":\n this.entity.before(value);\n return;\n }\n return super.onMapKey(key, value);\n }\n}\nexport function Operation(...args) {\n const routeOptions = mapOperationOptions(args);\n const context = new OperationDecoratorContext(routeOptions);\n return context.build();\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n store.operation.operationId(operationId);\n });\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use theses decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method, path = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n store.operation.addOperationPath(method.toUpperCase(), path);\n });\n}\n","import { Groups } from \"../common/groups.js\";\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial() {\n return Groups(\"partial\");\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n store.path = path;\n });\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Publish(event) {\n return Operation(OperationVerbs.PUBLISH, event);\n}\n","import { isNumber, isString, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nimport { Returns } from \"./returns.js\";\nexport function Redirect(...args) {\n const { status, url, meta } = args.reduce((options, value) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n if (isString(value)) {\n options.url = value;\n return options;\n }\n options.meta = value;\n return options;\n }, { status: 302, url: \"\", meta: {} });\n return useDecorators(Returns(status).Location(url, meta), JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n }));\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function All(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.ALL, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Get(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.GET, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Post(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.POST, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Put(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PUT, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Delete(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.DELETE, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Head(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.HEAD, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Patch(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PATCH, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Options(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.OPTIONS, path].concat(args));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nexport function Security(nameOrSecurity, ...scopes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n if (Array.isArray(nameOrSecurity)) {\n store.operation.security(nameOrSecurity);\n }\n else {\n store.operation.addSecurityScopes(nameOrSecurity, scopes);\n }\n break;\n case DecoratorTypes.CLASS:\n if (Array.isArray(nameOrSecurity)) {\n decorateMethodsOf(args[0], Security(nameOrSecurity));\n }\n else {\n decorateMethodsOf(args[0], Security(nameOrSecurity, ...scopes));\n }\n break;\n default:\n throw new UnsupportedDecoratorType(Security, args);\n }\n });\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v6 API introducing the chaining decorator concept.\n * Now a decorator like Returns can be used with another decorators like Description.\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Status(404, String).Description(\"Not Found\")\n * @Status(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ### Declaring a generic model\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Status(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Post, Generics, Property, Returns} from \"@tsed/schema\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Status(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Status(status, model) {\n return Returns(status, model);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Subscribe(event) {\n return Operation(OperationVerbs.SUBSCRIBE, event);\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add summary metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Summary(\"summary\")\n * id: string;\n * }\n * ```\n *\n * @param summary\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Summary(summary) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(Summary, args);\n }\n store.operation.summary(summary);\n });\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nfunction mapTags(tags) {\n return tags.map((tag) => {\n if (typeof tag === \"string\") {\n return {\n name: tag\n };\n }\n return tag;\n });\n}\n/**\n * Add tags metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Tags(\"api\")\n * get() {}\n * }\n * ```\n *\n * @param tags\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Tags(...tags) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.addTags(mapTags(tags));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Tags(...tags));\n break;\n default:\n throw new UnsupportedDecoratorType(Tags, args);\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n */\nexport function View(path, options) {\n return StoreSet(\"view\", { path, options });\n}\n","export function concatPath(basePath, path) {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n if (!path) {\n return basePath;\n }\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n const result = (basePath || \"\") + (path || \"\");\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n","import { concatPath } from \"../utils/concatPath.js\";\nexport class JsonOperationRoute {\n constructor(options) {\n Object.assign(this, options);\n this.paramsTypes = this.endpoint.getParamTypes();\n }\n get url() {\n return this.fullPath;\n }\n get path() {\n return this.operationPath?.path;\n }\n get fullPath() {\n return concatPath(this.basePath, this.path);\n }\n get method() {\n return this.operationPath?.method || \"USE\";\n }\n get name() {\n return `${this.endpoint.targetName}.${this.methodClassName}()`;\n }\n get className() {\n return this.endpoint.targetName;\n }\n get methodClassName() {\n return this.propertyKey;\n }\n get parameters() {\n return this.endpoint.parameters;\n }\n get propertyKey() {\n return String(this.endpoint.propertyKey);\n }\n get propertyName() {\n return this.endpoint.propertyName;\n }\n get store() {\n return this.endpoint.store;\n }\n get operation() {\n return this.endpoint.operation;\n }\n get operationId() {\n return this.operation.get(\"operationId\") || this.endpoint.propertyKey;\n }\n has(key) {\n return this.paramsTypes[key];\n }\n}\n","import { deepMerge, mergeReducerBuilder } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder((current, value) => {\n if (current.type && current.type && current.type === value.type && value.type === \"array\") {\n return JSON.stringify(current.items) === JSON.stringify(value.items);\n }\n return (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref);\n});\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec(spec, input) {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n","import { cleanObject, isArray } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { operationIdFormatter } from \"./operationIdFormatter.js\";\n/**\n * @ignore\n */\nconst caches = new Map();\n/**\n * @ignore\n */\nfunction get(model, options, cb) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n const cache = caches.get(model);\n const key = JSON.stringify(options);\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n return cache.get(key);\n}\nfunction generate(model, options) {\n const store = getJsonEntityStore(model);\n const { rootPath = \"/\" } = options;\n options = {\n ...options,\n rootPath,\n defaultTags: [\n cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n })\n ]\n };\n return execMapper(\"generate\", [store], options);\n}\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model, options = {}) {\n options = {\n specType: SpecTypes.OPENAPI,\n ...options,\n tags: [],\n paths: {},\n channels: {},\n components: {},\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n if (isArray(model)) {\n let finalSpec = {};\n options = {\n ...options,\n append(spec) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n model.forEach(({ token, ...opts }) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n options.append(spec);\n });\n return finalSpec;\n }\n return get(model, options, () => generate(model, options));\n}\n","import { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * @ignore\n * @param version\n */\nexport function getSpecType(version) {\n return version.startsWith(\"3.\") ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n/**\n * @ignore\n * @param spec\n */\nexport function getSpecTypeFromSpec(spec) {\n return \"openapi\" in spec ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info) {\n const { title, description, version, termsOfService, contact, license } = info;\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n","import { getValue, uniq } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(spec, { version, specVersion, acceptMimes = [\"application/json\"] }) {\n const { paths, security, tags, host, basePath, schemes, consumes = [], produces = [\"application/json\"], definitions, parameters, responses, securityDefinitions, externalDocs } = spec;\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n","import { getValue } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec, { specVersion }) {\n const { servers, paths, components, security, tags, externalDocs } = spec;\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n","import { getValue, setValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpecType } from \"./getSpecType.js\";\nimport { mapOpenSpec2 } from \"./mapOpenSpec2.js\";\nimport { mapOpenSpec3 } from \"./mapOpenSpec3.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec, { fileSpec, acceptMimes, specVersion, version }) {\n specVersion = specVersion || getValue(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n const options = {\n specVersion,\n acceptMimes\n };\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n spec = mergeSpec(spec, fileSpec);\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n return spec;\n}\n","\"use strict\";\nimport { cleanObject } from \"@tsed/core\";\nconst HTTP_METHODS = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"];\nconst SCHEMA_PROPERTIES = [\n \"format\",\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"minLength\",\n \"maxLength\",\n \"multipleOf\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"minProperties\",\n \"maxProperties\",\n \"additionalProperties\",\n \"pattern\",\n \"enum\",\n \"default\"\n];\nconst ARRAY_PROPERTIES = [\"type\", \"items\"];\nconst APPLICATION_JSON_REGEX = /^(application\\/json|[^;\\/ \\t]+\\/[^;\\/ \\t]+[+]json)[ \\t]*(;.*)?$/;\nconst SUPPORTED_MIME_TYPES = {\n APPLICATION_X_WWW_URLENCODED: \"application/x-www-form-urlencoded\",\n MULTIPART_FORM_DATA: \"multipart/form-data\"\n};\nfunction fixRef(ref) {\n return ref.replace(\"#/components/schemas/\", \"#/definitions/\").replace(\"#/components/\", \"#/x-components/\");\n}\nfunction fixRefs(obj) {\n if (Array.isArray(obj)) {\n obj.forEach(fixRefs);\n }\n else if (typeof obj === \"object\") {\n for (let key in obj) {\n if (key === \"$ref\") {\n obj.$ref = fixRef(obj.$ref);\n }\n else {\n fixRefs(obj[key]);\n }\n }\n }\n}\nfunction isJsonMimeType(type) {\n return new RegExp(APPLICATION_JSON_REGEX, \"i\").test(type);\n}\nfunction getSupportedMimeTypes(content) {\n const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {\n return SUPPORTED_MIME_TYPES[key];\n });\n return Object.keys(content).filter((key) => {\n return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);\n });\n}\nexport function transformSecurity(securitySchemes) {\n function map(security) {\n const { scheme, type, name, bearerFormat, flows, ...props } = security;\n switch (type) {\n case \"http\":\n if (scheme === \"basic\") {\n return {\n ...props,\n type: scheme\n };\n }\n if (scheme === \"bearer\") {\n return {\n ...props,\n type: \"apiKey\",\n name: \"Authorization\",\n in: \"header\"\n };\n }\n break;\n case \"oauth2\":\n const flowName = Object.keys(flows)[0];\n const flow = flows[flowName];\n let flowType = flowName;\n if (flowType === \"clientCredentials\") {\n flowType = \"application\";\n }\n else if (flowType === \"authorizationCode\") {\n flowType = \"accessCode\";\n }\n return {\n type,\n flow: flowType,\n authorizationUrl: flow.authorizationUrl,\n tokenUrl: flow.tokenUrl,\n scopes: flow.scopes\n };\n }\n }\n return Object.entries(securitySchemes).reduce((securityDefinitions, [key, security]) => {\n const securityDefinition = map(security);\n if (securityDefinition) {\n securityDefinitions[key] = securityDefinition;\n }\n return securityDefinitions;\n }, {});\n}\nexport function transformInformation(server) {\n let serverUrl = server.url;\n const variables = server[\"variables\"] || {};\n for (const variable in variables) {\n const variableObject = variables[variable] || {};\n if (variableObject[\"default\"]) {\n const re = RegExp(`{${variable}}`, \"g\");\n serverUrl = serverUrl.replace(re, variableObject[\"default\"]);\n }\n }\n const url = new URL(serverUrl);\n return {\n host: url.host ? url.host : undefined,\n basePath: url.pathname,\n schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined\n };\n}\nexport class Converter {\n constructor(spec) {\n this.spec = JSON.parse(JSON.stringify(spec));\n }\n convertInfos() {\n const server = this.spec.servers && this.spec.servers[0];\n if (server) {\n return transformInformation(server);\n }\n return {};\n }\n resolveReference(base, obj, shouldClone) {\n if (!obj || !obj.$ref) {\n return obj;\n }\n const ref = obj.$ref;\n if (ref.startsWith(\"#\")) {\n const keys = ref.split(\"/\").map((k) => k.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n keys.shift();\n let cur = base;\n keys.forEach((k) => {\n cur = cur[k];\n });\n return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;\n }\n }\n convert() {\n const spec = {\n swagger: \"2.0\",\n ...this.convertInfos(),\n paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined\n };\n if (this.spec.components) {\n this.convertSchemas();\n this.convertSecurityDefinitions();\n this.spec[\"x-components\"] = this.spec.components;\n delete this.spec.components;\n fixRefs(this.spec);\n }\n delete this.spec.servers;\n delete this.spec.openapi;\n delete this.spec[\"x-components\"];\n return cleanObject({\n ...spec,\n ...this.spec\n });\n }\n convertOperations(paths, spec) {\n return Object.entries(paths).reduce((paths, [path, operation]) => {\n const pathObject = (paths[path] = this.resolveReference({ ...spec, paths }, operation, true));\n this.convertParameters(pathObject); // converts common parameters\n Object.keys(pathObject).forEach((method) => {\n if (HTTP_METHODS.indexOf(method) >= 0) {\n const operation = (pathObject[method] = this.resolveReference({ ...spec, paths }, pathObject[method], true));\n this.convertOperationParameters(operation);\n this.convertResponses(operation);\n }\n });\n return paths;\n }, paths);\n }\n convertOperationParameters(operation) {\n let content, contentKey, mediaRanges, mediaTypes;\n operation.parameters = operation.parameters || [];\n if (operation.requestBody) {\n let param = this.resolveReference(this.spec, operation.requestBody, true);\n // fixing external $ref in body\n if (operation.requestBody.content) {\n const type = getSupportedMimeTypes(operation.requestBody.content)[0];\n const structuredObj = { content: {} };\n const data = operation.requestBody.content[type];\n if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith(\"#\")) {\n param = this.resolveReference(this.spec, data.schema, true);\n structuredObj[\"content\"][`${type}`] = { schema: param };\n param = structuredObj;\n }\n }\n param.name = \"body\";\n content = param.content;\n if (content && Object.keys(content).length) {\n mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf(\"/\") > 0);\n mediaTypes = mediaRanges.filter((range) => range.indexOf(\"*\") < 0);\n contentKey = getSupportedMimeTypes(content)[0];\n delete param.content;\n if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {\n operation.consumes = mediaTypes;\n param.in = \"formData\";\n param.schema = content[contentKey].schema;\n param.schema = this.resolveReference(this.spec, param.schema, true);\n if (param.schema.type === \"object\" && param.schema.properties) {\n const required = param.schema.required || [];\n Object.keys(param.schema.properties).forEach((name) => {\n const schema = param.schema.properties[name];\n // readOnly properties should not be sent in requests\n if (!schema.readOnly) {\n const formDataParam = {\n name,\n in: \"formData\",\n schema\n };\n if (required.indexOf(name) >= 0) {\n formDataParam.required = true;\n }\n operation.parameters?.push(formDataParam);\n }\n });\n }\n else {\n operation.parameters.push(param);\n }\n }\n else if (contentKey) {\n operation.consumes = mediaTypes;\n param.in = \"body\";\n param.schema = content[contentKey].schema;\n operation.parameters.push(param);\n }\n else if (mediaRanges) {\n operation.consumes = mediaTypes || [\"application/octet-stream\"];\n param.in = \"body\";\n param.name = param.name || \"file\";\n delete param.type;\n param.schema = content[mediaRanges[0]].schema || {\n type: \"string\",\n format: \"binary\"\n };\n operation.parameters.push(param);\n }\n if (param.schema) {\n this.convertSchema(param.schema, \"request\");\n }\n }\n delete operation.requestBody;\n }\n this.convertParameters(operation);\n }\n convertParameters(obj) {\n if (obj.parameters === undefined) {\n return;\n }\n obj.parameters = obj.parameters || [];\n (obj.parameters || []).forEach((param, i) => {\n param = obj.parameters[i] = this.resolveReference(this.spec, param, false);\n if (param.in !== \"body\") {\n this.copySchemaProperties(param, SCHEMA_PROPERTIES);\n this.copySchemaProperties(param, ARRAY_PROPERTIES);\n this.copySchemaXProperties(param);\n if (!param.description) {\n const schema = this.resolveReference(this.spec, param.schema, false);\n if (!!schema && schema.description) {\n param.description = schema.description;\n }\n }\n if (param.example !== undefined) {\n param[\"x-example\"] = param.example;\n }\n delete param.schema;\n delete param.allowReserved;\n delete param.example;\n }\n if (param.type === \"array\") {\n let style = param.style || (param.in === \"query\" || param.in === \"cookie\" ? \"form\" : \"simple\");\n switch (style) {\n case \"matrix\":\n param.collectionFormat = param.explode ? undefined : \"csv\";\n break;\n case \"label\":\n param.collectionFormat = undefined;\n break;\n case \"simple\":\n param.collectionFormat = \"csv\";\n break;\n case \"spaceDelimited\":\n param.collectionFormat = \"ssv\";\n break;\n case \"pipeDelimited\":\n param.collectionFormat = \"pipes\";\n break;\n case \"deepOpbject\":\n param.collectionFormat = \"multi\";\n break;\n case \"form\":\n param.collectionFormat = param.explode === false ? \"csv\" : \"multi\";\n break;\n }\n }\n delete param.style;\n delete param.explode;\n });\n }\n copySchemaProperties(obj, props) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n props.forEach((prop) => {\n const value = schema[prop];\n if (prop === \"additionalProperties\" && typeof value === \"boolean\") {\n return;\n }\n if (value !== undefined) {\n obj[prop] = value;\n }\n });\n }\n copySchemaXProperties(obj) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n Object.keys(schema).forEach((propName) => {\n if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith(\"x-\")) {\n obj[propName] = schema[propName];\n }\n });\n }\n convertResponses(operation) {\n // var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers\n Object.keys(operation.responses || {}).forEach((code) => {\n const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));\n if (response.content) {\n let anySchema = null;\n let jsonSchema = null;\n Object.keys(response.content).forEach((mediaRange) => {\n // produces and examples only allow media types, not ranges\n // use application/octet-stream as a catch-all type\n const mediaType = mediaRange.indexOf(\"*\") < 0 ? mediaRange : \"application/octet-stream\";\n if (!operation.produces) {\n operation.produces = [mediaType];\n }\n else if (operation.produces.indexOf(mediaType) < 0) {\n operation.produces.push(mediaType);\n }\n const content = response.content[mediaRange];\n anySchema = anySchema || content.schema;\n if (!jsonSchema && isJsonMimeType(mediaType)) {\n jsonSchema = content.schema;\n }\n if (content.example) {\n response.examples = response.examples || {};\n response.examples[mediaType] = content.example;\n }\n });\n if (anySchema) {\n response.schema = jsonSchema || anySchema;\n const resolved = this.resolveReference(this.spec, response.schema, true);\n if (resolved && response.schema.$ref && !response.schema.$ref.startsWith(\"#\")) {\n response.schema = resolved;\n }\n this.convertSchema(response.schema, \"response\");\n }\n }\n Object.keys(response.headers || {}).forEach((header) => {\n // Always resolve headers when converting to v2.\n const resolved = this.resolveReference(this.spec, response.headers[header], true);\n // Headers should be converted like parameters.\n if (resolved.schema) {\n resolved.type = resolved.schema.type;\n resolved.format = resolved.schema.format;\n delete resolved.schema;\n }\n response.headers[header] = resolved;\n });\n delete response.content;\n });\n }\n convertSchema(def, operationDirection) {\n if (def.oneOf) {\n delete def.oneOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.anyOf) {\n delete def.anyOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.allOf) {\n for (const i in def.allOf) {\n this.convertSchema(def.allOf[i], operationDirection);\n }\n }\n if (def.discriminator) {\n if (def.discriminator.mapping) {\n this.convertDiscriminatorMapping(def.discriminator.mapping);\n }\n def.discriminator = def.discriminator.propertyName;\n }\n switch (def.type) {\n case \"object\":\n if (def.properties) {\n Object.keys(def.properties).forEach((propName) => {\n if (def.properties[propName].writeOnly === true && operationDirection === \"response\") {\n delete def.properties[propName];\n }\n else {\n this.convertSchema(def.properties[propName], operationDirection);\n delete def.properties[propName].writeOnly;\n }\n });\n }\n break;\n case \"array\":\n if (def.items) {\n this.convertSchema(def.items, operationDirection);\n }\n }\n if (def.nullable) {\n def[\"x-nullable\"] = true;\n delete def.nullable;\n }\n // OpenAPI 3 has boolean \"deprecated\" on Schema, OpenAPI 2 does not\n // Convert to x-deprecated for Autorest (and perhaps others)\n if (def[\"deprecated\"] !== undefined) {\n // Move to x-deprecated, unless it is already defined\n if (def[\"x-deprecated\"] === undefined) {\n def[\"x-deprecated\"] = def.deprecated;\n }\n delete def.deprecated;\n }\n }\n convertSchemas() {\n this.spec.definitions = this.spec.components.schemas;\n Object.keys(this.spec.definitions || {}).forEach((defName) => {\n this.convertSchema(this.spec.definitions[defName]);\n });\n delete this.spec.components.schemas;\n }\n convertDiscriminatorMapping(mapping) {\n Object.keys(mapping).forEach((payload) => {\n const schemaNameOrRef = mapping[payload];\n if (typeof schemaNameOrRef !== \"string\") {\n console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n return;\n }\n // payload may be a schema name or JSON Reference string.\n // OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$\n // Note: Valid schema name could be JSON file name without extension.\n // Prefer schema name, with file name as fallback.\n let schema;\n if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {\n try {\n schema = this.resolveReference(this.spec, { $ref: `#/components/schemas/${schemaNameOrRef}` }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);\n }\n }\n // schemaNameRef is not a schema name. Try to resolve as JSON Ref.\n if (!schema) {\n try {\n schema = this.resolveReference(this.spec, { $ref: schemaNameOrRef }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);\n }\n }\n if (schema) {\n // Swagger Codegen + OpenAPI Generator extension\n // https://github.com/swagger-api/swagger-codegen/pull/4252\n schema[\"x-discriminator-value\"] = payload;\n // AutoRest extension\n // https://github.com/Azure/autorest/pull/474\n schema[\"x-ms-discriminator-value\"] = payload;\n }\n else {\n console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n }\n });\n }\n convertSecurityDefinitions() {\n if (this.spec.components.securitySchemes) {\n this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);\n delete this.spec.components.securitySchemes;\n }\n }\n}\nexport function transformToOS2(spec) {\n return new Converter(spec).convert();\n}\n","import { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpec } from \"./getSpec.js\";\nimport { getSpecTypeFromSpec } from \"./getSpecType.js\";\nimport { mapOpenSpec } from \"./mapOpenSpec.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { transformToOS2 } from \"./transformToOS2.js\";\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport function generateSpec({ tokens, ...options }) {\n const { version = \"1.0.0\", acceptMimes, fileSpec = {}, specVersion } = options;\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n const specType = getSpecTypeFromSpec(defaultSpec);\n let controllersSpec = getSpec(tokens, options);\n const spec = mergeSpec(defaultSpec, controllersSpec);\n if (options.sortPaths) {\n spec.paths = Object.fromEntries(Object.entries(spec.paths).sort(([k1], [k2]) => {\n return k1.localeCompare(k2);\n }));\n }\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec);\n }\n return spec;\n}\n","import \"../components/index.js\";\nimport { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n/**\n * @ignore\n */\nfunction getKey(options) {\n return JSON.stringify(options);\n}\n/**\n * @ignore\n */\nfunction get(entity, options) {\n const cache = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", [entity.schema], options);\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n schema.definitions = options.components.schemas;\n }\n cache.set(key, schema);\n }\n entity.store.set(CACHE_KEY, cache);\n return cache.get(key);\n}\nexport function getJsonSchema(model, options = {}) {\n const entity = getJsonEntityStore(model);\n const specType = options.specType || SpecTypes.JSON;\n options = {\n endpoint: true,\n groups: [],\n inlineEnums: specType === SpecTypes.JSON,\n ...options,\n specType,\n components: {\n schemas: {}\n }\n };\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n return get(entity, options);\n}\n","import { JsonOperationRoute } from \"../domain/JsonOperationRoute.js\";\nimport { concatPath } from \"./concatPath.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { getOperationsStores } from \"./getOperationsStores.js\";\nexport function getOperationsRoutes(token, options = {}) {\n const store = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes = [];\n if (options.withChildren) {\n const children = store.get(\"childrenControllers\", []);\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(getOperationsRoutes(token, {\n ...options,\n basePath\n }));\n }, operationsRoutes);\n }\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const { operation } = endpoint;\n if (operation) {\n operation.getAllowedOperationPath(options.allowedVerbs).forEach((operationPath) => {\n routes.push(new JsonOperationRoute({\n basePath,\n token,\n endpoint,\n operationPath\n }));\n });\n }\n return routes;\n }, operationsRoutes);\n}\n","import { alterIgnore } from \"../hooks/alterIgnore.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n return store.$properties;\n}\n/**\n * @ignore\n */\nexport function getProperties(target, options = {}) {\n const stores = getPropertiesStores(target);\n const map = new Map();\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n map.set(key, store);\n });\n return map;\n}\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__598__","__WEBPACK_EXTERNAL_MODULE__803__","__WEBPACK_EXTERNAL_MODULE__488__","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","SLASH_LITERAL","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","POSIX_CHARS","PLUS_LITERAL","QMARK_LITERAL","ONE_CHAR","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","SEP","WINDOWS_CHARS","MAX_LENGTH","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKWARD_SLASH","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_GRAVE_ACCENT","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","extglobChars","chars","type","open","close","globChars","win32","constants","utils","expandRange","args","options","sort","value","join","RegExp","ex","map","v","escapeRegex","syntaxError","char","parse","input","TypeError","opts","max","maxLength","Math","min","len","length","SyntaxError","bos","output","prepend","tokens","capture","PLATFORM_CHARS","windows","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","state","index","start","consumed","prefix","backtrack","negated","brackets","braces","parens","quotes","removePrefix","extglobs","stack","prev","eos","peek","n","advance","remaining","slice","consume","num","append","token","negate","count","increment","push","decrement","pop","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","extglobStar","includes","test","negatedExtglob","fastpaths","backslashes","replace","m","esc","first","rest","repeat","unescape","contains","wrapOutput","next","match","exec","slashes","posix","idx","lastIndexOf","pre","indexOf","keepQuotes","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","escaped","nobrace","outputIndex","tokensIndex","brace","dots","arr","range","i","unshift","comma","out","toks","t","supportsLookbehinds","Error","nonegate","regex","noglobstar","prior","before","isStart","afterStar","after","strictSlashes","end","escapeLast","suffix","slashDot","create","str","source","scan","picomatch","glob","returnState","Array","isArray","fns","arrayMatcher","isMatch","isState","val","compileRe","makeRe","isIgnored","ignore","ignoreOpts","onMatch","onResult","matcher","returnObject","result","onIgnore","format","toPosixSlashes","matchBase","basename","Boolean","patterns","pattern","p","parsed","returnOutput","toRegex","startsWith","undefined","flags","nocase","err","debug","isPathSeparator","code","depth","isPrefix","isGlobstar","Infinity","scanToEnd","parts","lastIndex","isBracket","isGlob","braceEscaped","finished","charCodeAt","noparen","base","removeBackslashes","maxDepth","prevIndex","isObject","isRegexChar","segs","process","version","split","Number","lastIdx","path","codes","getStatusMessage","Object","prototype","hasOwnProperty","call","status","message","parseInt","isNaN","msg","toLowerCase","getStatusCode","keys","forEach","createMessageToStatusCodeMap","createStatusCodeList","redirect","empty","retry","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","OperationVerbs","OPERATION_HTTP_VERBS","ALL","GET","POST","PUT","PATCH","HEAD","DELETE","OPTIONS","TRACE","CUSTOM","OPERATION_WS_VERBS","PUBLISH","SUBSCRIBE","JsonSchemaMappersContainer","Map","registerJsonSchemaMapper","mapper","spec","set","getJsonSchemaMapper","specType","execMapper","parent","hasMapper","has","oneOfMapper","types","find","buildPath","filter","__decorate","decorators","target","desc","c","arguments","getOwnPropertyDescriptor","Reflect","decorate","__metadata","metadataKey","metadataValue","metadata","SuppressedError","JsonEntitiesContainer","JsonEntityStore","constructor","this","isStore","propertyKey","descriptor","decoratorType","propertyName","String","store","targetName","nameOf","isCollection","collectionType","isArrayOrArrayClass","discriminatorAncestor","ancestor","ancestorsOf","from","schema","isDiscriminator","isPrimitive","isPrimitiveOrPrimitiveClass","_type","isDate","computedType","isClass","_schema","nestedGenerics","build","itemSchema","getComputedType","parentSchema","isDiscriminatorChild","discriminator","static","prototypeOf","Store","decoratorTypeOf","jsonSchemaStore","classOf","descriptorOf","isGetterOnly","defaultValue","toString","buildType","isPlainObject","getBestType","hasDiscriminator","isClassObject","getTarget","isArrowFn","JsonEntityComponent","enumsRegistry","isPromise","Function","isSymbol","JSON_TYPES","getJsonType","primitiveOf","Set","isBuffer","serializeEnum","enumValue","entries","reduce","acc","concat","serializeEnumValues","enumValues","values","add","getValue","uniq","toJsonRegex","Discriminator","assign","cleanObject","getType","discriminatorValue","getValues","getDefaultValue","children","mapProperties","properties","JsonSchema","mapToJsonSchema","item","$isJsonDocument","isLazyRef","isPrimitiveClass","super","$kind","$hooks","Hooks","$required","$allow","$forwardGroups","$ignore","isDiscriminatorKey","alias","genericLabels","class","Date","isGeneric","hasGenerics","genericType","canRef","isNullable","isReadOnly","isWriteOnly","nullable","getAliasOf","property","addAlias","removeAlias","delete","$id","$ref","$schema","label","name","cb","on","default","const","description","discriminatorKey","examples","enum","additionalItems","example","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","allow","minLength","any","required","clone","$selfRequired","clear","addRequired","removeRequired","isRequired","addProperty","patternProperties","additionalProperties","unknown","dependencies","propertyNames","getName","flat","definitions","allOf","setManyOf","anyOf","oneOf","not","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","integer","isFunction","jsonType","title","readOnly","writeOnly","customKey","toObject","toJSON","getComputedItemType","keyword","resolved","jsonSchema","mapping","JsonClassStore","DecoratorTypes","isSuccessStatus","isRedirectionStatus","JsonMap","mapHeaders","headers","newHeaders","toJsonMapCollection","content","klass","JsonMedia","groups","JsonResponse","getContent","getMedia","mediaType","addMedia","isBinary","JsonOperation","parameters","responses","operationPaths","response","getResponses","getStatus","tags","addTags","uniqBy","summary","operationId","defaultStatus","setRedirection","isRedirection","addResponse","statusCode","res","getResponseOf","currentCode","currentResponse","deepMerge","ensureResponseOf","getHeadersOf","getContentTypeOf","security","addSecurityScopes","scopes","deprecated","addParameter","parameter","consumes","produces","addProduce","produce","addOperationPath","method","getAllowedOperationPath","allowedVerbs","toUpperCase","JsonMethodStore","middlewares","beforeMiddlewares","afterMiddlewares","operation","use","params","view","acceptMimes","mimes","getResponseOptions","contentType","media","allowedGroups","size","include","ctrlValue","getParamTypes","paramType","Metadata","EndpointMetadata","JsonParameterTypes","formatParameterType","isParameterType","JsonParameter","in","inType","expression","JsonParameterStore","fromMethod","pipes","dataPath","allowedRequiredValues","reverse","isMethodDescriptor","param","getSchema","ParamMetadata","JsonPropertyStore","PropertyMetadata","getJsonEntityStore","JsonOperationPathsMap","getKey","setOperationPath","operationPath","getInheritedStores","$inherited","context","model","getOperationsStores","$operations","currentStore","propStore","removeHiddenOperation","operationStore","ALLOWED_VERBS","channelsMapper","channels","rootPath","ctrlRootPath","flatMap","camelCase","pushToChannels","SpecTypes","makeOf","schemes","messageMapper","jsonOperationStore","defaultTags","event","messageKey","components","payload","responsesSchema","messages","getGenericsMap","genericTypes","mapGenericsOptions","ops","generics","popGenerics","payloadMapper","payloadName","pascalCase","setValue","groupsName","mapOptions","BODY","QUERY","PATH","HEADER","responsePayloadMapper","statuses","statusesTexts","successSchemes","errorSchemes","jsonResponse","responsePayloadName","responsePayload","statusText","dataSchema","errorSchema","specJson","schemas","ASYNCAPI","JsonLazyRef","createRefName","createRef","host","OPENAPI","getHost","ref","toRef","anyMapper","enumSchema","classMapper","props","discriminatorMappingMapper","_","newMapping","isString","enumsMapper","inlineEnums","genericsMapper","inheritedClassMapper","stores","itemMapper","lazyRefMapper","jsonLazyRef","$refs","mapMapper","MANY_OF_PROPERTIES","STRING_PROPERTIES","BOOLEAN_PROPERTIES","NUMBER_PROPERTIES","ARRAY_PROPERTIES","OBJECT_PROPERTIES","COMMON_PROPERTIES","nullableMapper","some","isInteger","alterIgnore","isBoolean","alter","objectMapper","operationIdFormatter","useAlias","ctx","withIgnoredProps","ofMapper","propertiesMapper","alterRequiredGroups","requiredMapper","k","extractRequiredProps","aliasedKey","mapRequiredProps","mapAliasedProperties","RULES","string","is","number","isNumber","boolean","array","object","alterOneOf","kind","findManyOf","rule","pickProperties","IGNORES","SWAGGER","JSON","IGNORES_OPENSPEC","schemaMapper","addDef","customKeys","shouldSkipKey","isExample","isEmptyProperties","shouldMapAlias","mapKeys","serializeSchema","wrapEnumsMapper","paths","nullableMapperOpenApi","operationInFilesMapper","operationInParameterMapper","jsonParameter","paramOpts","oldSchemas","mapperName","operationInParametersMapper","buildExamples","hasKey","newExamples","operationInQueryMapper","jsonParameters","style","inlineReference","HTTP_STATUS_MESSAGES","constantCase","getStatusConstant","operationMapper","jsonOperation","parametersOptions","bodyParameters","inputs","FILES","extractParameters","requestBody","operationTags","operationMediaMapper","jsonMedia","JsonRequestBody","addContent","mediaContent","operationRequestBodyMapper","refs","propsLength","hasFile","propSchema","buildSchemaFromBodyParameters","operationResponseMapper","concatParameters","getJsonPathParameters","isOptional","current","inCapture","parseUrl","subpath","optional","postfix","right","splited","splice","getVariable","OPERATION_IDS","transform","operationKey","id","getOperationId","pushToPath","pathsMapper","mapOperation","mapOperationInPathParameters","JsonEntityFn","fn","Children","childToken","DiscriminatorValue","snakeCase","CollectionOf","decorator","MinItems","MaxItems","MinProperties","MaxProperties","Contains","UniqueItems","ArrayOf","MapOf","CollectionContains","withErrorMsg","errorKey","originalDecorator","decoratorOptions","useDecorators","errorMessage","storedJson","AdditionalProperties","entity","AllOf","Property","Allow","Any","AnyOf","Const","constValue","CustomKey","CustomKeys","Default","ErrorMsg","DefaultMsg","Description","DiscriminatorKey","Enum","Example","Examples","Maximum","exclusive","Max","ExclusiveMaximum","Minimum","Min","ExclusiveMinimum","JsonFormatTypes","Format","Email","EMAIL","DateTime","DATE_TIME","DateFormat","DATE","TimeFormat","TIME","Uri","URI","Url","URL","ForwardGroups","bool","micromatch","list","omit","keep","negatives","matched","matchGroups","compareWith","groupsExcludes","group","groupsIncludes","Groups","propEntity","groupsClass","givenGroups","Hidden","StoreSet","Ignore","Integer","MaxLength","MinLength","MultipleOf","Name","Nullable","OneOf","Optional","Pattern","ReadOnly","Schema","partialSchema","For","RecordOf","initial","Required","RequiredGroups","Title","WriteOnly","date","datetime","time","email","uri","url","lazyRef","er","enums","e","GenericOf","isEnum","Nested","Generics","Produces","decorateMethodsOf","UnsupportedDecoratorType","AcceptMime","Consumes","DecoratorContext","actions","addAction","bind","wrapKey","methods","getMergedKey","beforeInit","onInit","afterInit","onMapKey","runActions","action","statusesModel","defineStatusModel","getStatusModel","mapGenerics","ReturnDecoratorContext","header","location","meta","Location","nested","checkPrimitive","checkCollection","of","ofInteger","manyOf","partial","binary","getContentType","hasOfTypes","currentStatus","mapMedia","Returns","ContentType","Deprecated","Header","Headers","In","Type","InFile","multiple","useMethodDecorators","mapOperationOptions","handlers","arg","toLocaleUpperCase","OperationDecoratorContext","Operation","routeOptions","OperationId","OperationPath","Partial","Path","Publish","Redirect","All","Get","Post","Put","Delete","Head","Patch","Options","Security","nameOrSecurity","Status","Subscribe","Summary","Tags","tag","mapTags","View","concatPath","basePath","r1","r2","global","ignoreCase","multiline","endsWith","JsonOperationRoute","paramsTypes","endpoint","fullPath","methodClassName","className","schemesReducer","mergeReducerBuilder","stringify","tagsReducer","SPEC_REDUCERS","mergeSpec","reducers","cleanUndefinedProps","caches","getSpec","operationIdPattern","finalSpec","cache","getSpecType","getSpecTypeFromSpec","mapOpenSpecInfo","info","termsOfService","contact","license","mapOpenSpec2","specVersion","securityDefinitions","externalDocs","swagger","mapOpenSpec3","servers","openapi","mapOpenSpec","fileSpec","HTTP_METHODS","SCHEMA_PROPERTIES","APPLICATION_JSON_REGEX","SUPPORTED_MIME_TYPES","APPLICATION_X_WWW_URLENCODED","MULTIPART_FORM_DATA","fixRefs","isJsonMimeType","getSupportedMimeTypes","MIME_VALUES","transformSecurity","securitySchemes","securityDefinition","scheme","bearerFormat","flows","flowName","flow","flowType","authorizationUrl","tokenUrl","transformInformation","server","serverUrl","variables","variable","variableObject","re","pathname","protocol","substring","Converter","convertInfos","resolveReference","shouldClone","shift","cur","convert","convertOperations","convertSchemas","convertSecurityDefinitions","pathObject","convertParameters","convertOperationParameters","convertResponses","contentKey","mediaRanges","mediaTypes","structuredObj","data","mediaRange","formDataParam","convertSchema","copySchemaProperties","copySchemaXProperties","allowReserved","collectionFormat","explode","propName","anySchema","def","operationDirection","convertDiscriminatorMapping","defName","schemaNameOrRef","console","warn","transformToOS2","generateSpec","defaultSpec","sortPaths","fromEntries","k1","k2","localeCompare","CACHE_KEY","getJsonSchema","getOperationsRoutes","operationsRoutes","withChildren","routes","getPropertiesStores","$properties","getProperties"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"schema.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBACvD,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,cAAe,aAAc,eAAgBJ,GAC3B,iBAAZC,QACdA,QAAQ,gBAAkBD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBAEzFJ,EAAK,gBAAkBC,EAAQD,E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GAUvB,OATI7kC,EAAQ8kC,eAERD,EADiB/xB,EAAM9D,IAAI,sBAAuB,IACtBsH,QAAO,CAACuuB,EAAkB/gC,IAC3C+gC,EAAiBruB,OAAOouB,GAAoB9gC,EAAO,IACnD9D,EACH28B,eAELkI,IAEA,IAAIvgB,EAAoBxgB,GAAO6S,UAAUL,QAAO,CAACyuB,EAAQ3H,KAC5D,MAAM,UAAE3b,GAAc2b,EAWtB,OAVI3b,GACAA,EAAUP,wBAAwBlhB,EAAQmhB,cAAcvT,SAASqW,IAC7D8gB,EAAO7gC,KAAK,IAAIg5B,GAAmB,CAC/BP,WACA74B,QACAs5B,WACAnZ,kBACD,IAGJ8gB,CAAM,GACdF,EACP,CCvBO,SAASG,GAAoBxzB,GAChC,MAAMsB,EAAQtB,EAAOgB,QAAUhB,EAASqS,EAAmBrS,GAC3D,IAAKsB,EAAMmyB,YAAa,CACpB,MAAM9b,EAASjF,EAAmBpR,GAClCA,EAAMmyB,YAAc,IAAI30B,IACxB6Y,EAAOvb,SAAS4W,IACZA,EAAajN,SAAS3J,SAAS6W,IACtB3R,EAAMmyB,YAAYj0B,IAAIyT,EAAUhS,cACjCK,EAAMmyB,YAAYv0B,IAAI+T,EAAUhS,YAAagS,EACjD,GACF,GAEV,CACA,OAAO3R,EAAMmyB,WACjB,CAIO,SAASC,GAAc1zB,EAAQxR,EAAU,CAAC,GAC7C,MAAMmpB,EAAS6b,GAAoBxzB,GAC7BlR,EAAM,IAAIgQ,IAShB,OARA6Y,EAAOvb,SAAQ,CAACkF,EAAOlE,MACd5O,EAAQ0qB,kBACLN,GAAYtX,EAAMqB,WAAYnU,IAItCM,EAAIoQ,IAAI9B,EAAKkE,EAAM,IAEhBxS,CACX","sources":["webpack://@tsed/schema/webpack/universalModuleDefinition","webpack://@tsed/schema/../../../node_modules/picomatch-browser/index.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/constants.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/parse.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/picomatch.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/scan.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/utils.js","webpack://@tsed/schema/../../../node_modules/statuses/index.js","webpack://@tsed/schema/external umd \"@tsed/core\"","webpack://@tsed/schema/external umd \"@tsed/hooks\"","webpack://@tsed/schema/external umd \"change-case\"","webpack://@tsed/schema/webpack/bootstrap","webpack://@tsed/schema/webpack/runtime/compat get default export","webpack://@tsed/schema/webpack/runtime/define property getters","webpack://@tsed/schema/webpack/runtime/hasOwnProperty shorthand","webpack://@tsed/schema/webpack/runtime/make namespace object","webpack://@tsed/schema/./src/constants/OperationVerbs.ts","webpack://@tsed/schema/./src/registries/JsonSchemaMapperContainer.ts","webpack://@tsed/schema/./src/utils/buildPath.ts","webpack://@tsed/schema/../../../node_modules/tslib/tslib.es6.mjs","webpack://@tsed/schema/./src/domain/JsonEntityStore.ts","webpack://@tsed/schema/./src/decorators/config/jsonEntityComponent.ts","webpack://@tsed/schema/./src/registries/enumRegistries.ts","webpack://@tsed/schema/./src/utils/getComputedType.ts","webpack://@tsed/schema/./src/utils/getJsonType.ts","webpack://@tsed/schema/./src/utils/serializeEnumValues.ts","webpack://@tsed/schema/./src/utils/toJsonRegex.ts","webpack://@tsed/schema/./src/domain/JsonDiscriminator.ts","webpack://@tsed/schema/./src/domain/JsonSchema.ts","webpack://@tsed/schema/./src/domain/JsonClassStore.ts","webpack://@tsed/schema/./src/utils/isSuccessStatus.ts","webpack://@tsed/schema/./src/domain/JsonMap.ts","webpack://@tsed/schema/./src/utils/mapHeaders.ts","webpack://@tsed/schema/./src/utils/toJsonMapCollection.ts","webpack://@tsed/schema/./src/domain/JsonMedia.ts","webpack://@tsed/schema/./src/domain/JsonResponse.ts","webpack://@tsed/schema/./src/domain/JsonOperation.ts","webpack://@tsed/schema/./src/domain/JsonMethodStore.ts","webpack://@tsed/schema/./src/domain/JsonParameterTypes.ts","webpack://@tsed/schema/./src/domain/JsonParameter.ts","webpack://@tsed/schema/./src/domain/JsonParameterStore.ts","webpack://@tsed/schema/./src/domain/JsonPropertyStore.ts","webpack://@tsed/schema/./src/utils/getJsonEntityStore.ts","webpack://@tsed/schema/./src/domain/JsonOperationPathsMap.ts","webpack://@tsed/schema/./src/utils/getInheritedStores.ts","webpack://@tsed/schema/./src/utils/getOperationsStores.ts","webpack://@tsed/schema/./src/utils/removeHiddenOperation.ts","webpack://@tsed/schema/./src/components/async-api/channelsMapper.ts","webpack://@tsed/schema/./src/domain/SpecTypes.ts","webpack://@tsed/schema/./src/utils/somethingOf.ts","webpack://@tsed/schema/./src/components/async-api/messageMapper.ts","webpack://@tsed/schema/./src/utils/generics.ts","webpack://@tsed/schema/./src/components/async-api/payloadMapper.ts","webpack://@tsed/schema/./src/components/async-api/responseMapper.ts","webpack://@tsed/schema/./src/components/async-api/generate.ts","webpack://@tsed/schema/./src/domain/JsonLazyRef.ts","webpack://@tsed/schema/./src/utils/ref.ts","webpack://@tsed/schema/./src/components/default/anyMapper.ts","webpack://@tsed/schema/./src/components/default/classMapper.ts","webpack://@tsed/schema/./src/components/default/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/components/default/enumsMapper.ts","webpack://@tsed/schema/./src/components/default/genericsMapper.ts","webpack://@tsed/schema/./src/components/default/inheritedClassMapper.ts","webpack://@tsed/schema/./src/components/default/itemMapper.ts","webpack://@tsed/schema/./src/components/default/lazyRefMapper.ts","webpack://@tsed/schema/./src/components/default/mapMapper.ts","webpack://@tsed/schema/./src/constants/jsonSchemaProperties.ts","webpack://@tsed/schema/./src/components/default/nullableMapper.ts","webpack://@tsed/schema/./src/hooks/alterIgnore.ts","webpack://@tsed/schema/./src/components/default/objectMapper.ts","webpack://@tsed/schema/./src/components/default/ofMapper.ts","webpack://@tsed/schema/./src/components/default/propertiesMapper.ts","webpack://@tsed/schema/./src/hooks/alterRequiredGroups.ts","webpack://@tsed/schema/./src/components/default/requiredMapper.ts","webpack://@tsed/schema/./src/domain/JsonAliasMap.ts","webpack://@tsed/schema/./src/hooks/alterOneOf.ts","webpack://@tsed/schema/./src/components/default/schemaMapper.ts","webpack://@tsed/schema/./src/components/open-spec/enumsMapper.ts","webpack://@tsed/schema/./src/components/open-spec/generate.ts","webpack://@tsed/schema/./src/components/open-spec/nullableMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInFilesMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParameterMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParametersMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInQueryMapper.ts","webpack://@tsed/schema/./src/components/open-spec/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/constants/httpStatusMessages.ts","webpack://@tsed/schema/./src/components/open-spec/operationMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationMediaMapper.ts","webpack://@tsed/schema/./src/domain/JsonRequestBody.ts","webpack://@tsed/schema/./src/components/open-spec/operationRequestBodyMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationResponseMapper.ts","webpack://@tsed/schema/./src/utils/concatParameters.ts","webpack://@tsed/schema/./src/utils/getJsonPathParameters.ts","webpack://@tsed/schema/./src/utils/operationIdFormatter.ts","webpack://@tsed/schema/./src/components/open-spec/pathsMapper.ts","webpack://@tsed/schema/./src/decorators/common/jsonEntityFn.ts","webpack://@tsed/schema/./src/decorators/class/children.ts","webpack://@tsed/schema/./src/decorators/class/discriminatorValue.ts","webpack://@tsed/schema/./src/decorators/collections/collectionOf.ts","webpack://@tsed/schema/./src/decorators/collections/collectionContains.ts","webpack://@tsed/schema/./src/utils/withErrorMsg.ts","webpack://@tsed/schema/./src/decorators/collections/maxItems.ts","webpack://@tsed/schema/./src/decorators/collections/maxProperties.ts","webpack://@tsed/schema/./src/decorators/collections/minItems.ts","webpack://@tsed/schema/./src/decorators/collections/minProperties.ts","webpack://@tsed/schema/./src/decorators/collections/uniqueItems.ts","webpack://@tsed/schema/./src/decorators/common/additionalProperties.ts","webpack://@tsed/schema/./src/decorators/common/allOf.ts","webpack://@tsed/schema/./src/decorators/common/property.ts","webpack://@tsed/schema/./src/decorators/common/allow.ts","webpack://@tsed/schema/./src/decorators/common/any.ts","webpack://@tsed/schema/./src/decorators/common/anyOf.ts","webpack://@tsed/schema/./src/decorators/common/const.ts","webpack://@tsed/schema/./src/decorators/common/customKey.ts","webpack://@tsed/schema/./src/decorators/common/default.ts","webpack://@tsed/schema/./src/decorators/common/errorMsg.ts","webpack://@tsed/schema/./src/decorators/common/defaultMsg.ts","webpack://@tsed/schema/./src/decorators/common/description.ts","webpack://@tsed/schema/./src/decorators/common/discriminatorKey.ts","webpack://@tsed/schema/./src/decorators/common/enum.ts","webpack://@tsed/schema/./src/decorators/common/example.ts","webpack://@tsed/schema/./src/decorators/common/examples.ts","webpack://@tsed/schema/./src/decorators/common/maximum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMaximum.ts","webpack://@tsed/schema/./src/decorators/common/minimum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMinimum.ts","webpack://@tsed/schema/./src/domain/JsonFormatTypes.ts","webpack://@tsed/schema/./src/decorators/common/format.ts","webpack://@tsed/schema/./src/decorators/common/forwardGroups.ts","webpack://@tsed/schema/./src/utils/matchGroups.ts","webpack://@tsed/schema/./src/decorators/common/groups.ts","webpack://@tsed/schema/./src/decorators/common/hidden.ts","webpack://@tsed/schema/./src/decorators/common/ignore.ts","webpack://@tsed/schema/./src/decorators/common/integer.ts","webpack://@tsed/schema/./src/decorators/common/labelledAs.ts","webpack://@tsed/schema/./src/decorators/common/maxLength.ts","webpack://@tsed/schema/./src/decorators/common/minLength.ts","webpack://@tsed/schema/./src/decorators/common/multipleOf.ts","webpack://@tsed/schema/./src/decorators/common/name.ts","webpack://@tsed/schema/./src/decorators/common/nullable.ts","webpack://@tsed/schema/./src/decorators/common/oneOf.ts","webpack://@tsed/schema/./src/decorators/common/optional.ts","webpack://@tsed/schema/./src/decorators/common/pattern.ts","webpack://@tsed/schema/./src/decorators/common/readOnly.ts","webpack://@tsed/schema/./src/decorators/common/schema.ts","webpack://@tsed/schema/./src/decorators/common/recordOf.ts","webpack://@tsed/schema/./src/decorators/common/required.ts","webpack://@tsed/schema/./src/decorators/common/requiredGroups.ts","webpack://@tsed/schema/./src/decorators/common/title.ts","webpack://@tsed/schema/./src/decorators/common/typeError.ts","webpack://@tsed/schema/./src/decorators/common/writeOnly.ts","webpack://@tsed/schema/./src/fn/from.ts","webpack://@tsed/schema/./src/fn/string.ts","webpack://@tsed/schema/./src/decorators/generics/genericOf.ts","webpack://@tsed/schema/./src/decorators/generics/generics.ts","webpack://@tsed/schema/./src/decorators/operations/produces.ts","webpack://@tsed/schema/./src/decorators/operations/acceptMime.ts","webpack://@tsed/schema/./src/decorators/operations/consumes.ts","webpack://@tsed/schema/./src/domain/DecoratorContext.ts","webpack://@tsed/schema/./src/utils/defineStatusModel.ts","webpack://@tsed/schema/./src/decorators/operations/returns.ts","webpack://@tsed/schema/./src/decorators/operations/contentType.ts","webpack://@tsed/schema/./src/decorators/operations/deprecated.ts","webpack://@tsed/schema/./src/decorators/operations/header.ts","webpack://@tsed/schema/./src/decorators/operations/in.ts","webpack://@tsed/schema/./src/decorators/operations/inFile.ts","webpack://@tsed/schema/./src/decorators/operations/location.ts","webpack://@tsed/schema/./src/utils/mapOperationOptions.ts","webpack://@tsed/schema/./src/decorators/operations/operation.ts","webpack://@tsed/schema/./src/decorators/operations/operationId.ts","webpack://@tsed/schema/./src/decorators/operations/operationPath.ts","webpack://@tsed/schema/./src/decorators/operations/partial.ts","webpack://@tsed/schema/./src/decorators/operations/path.ts","webpack://@tsed/schema/./src/decorators/operations/publish.ts","webpack://@tsed/schema/./src/decorators/operations/redirect.ts","webpack://@tsed/schema/./src/decorators/operations/route.ts","webpack://@tsed/schema/./src/decorators/operations/security.ts","webpack://@tsed/schema/./src/decorators/operations/status.ts","webpack://@tsed/schema/./src/decorators/operations/subscribe.ts","webpack://@tsed/schema/./src/decorators/operations/summary.ts","webpack://@tsed/schema/./src/decorators/operations/tags.ts","webpack://@tsed/schema/./src/decorators/operations/view.ts","webpack://@tsed/schema/./src/utils/concatPath.ts","webpack://@tsed/schema/./src/domain/JsonOperationRoute.ts","webpack://@tsed/schema/./src/fn/allOf.ts","webpack://@tsed/schema/./src/fn/any.ts","webpack://@tsed/schema/./src/fn/anyOf.ts","webpack://@tsed/schema/./src/fn/boolean.ts","webpack://@tsed/schema/./src/fn/collection.ts","webpack://@tsed/schema/./src/fn/date.ts","webpack://@tsed/schema/./src/fn/email.ts","webpack://@tsed/schema/./src/fn/enums.ts","webpack://@tsed/schema/./src/fn/integer.ts","webpack://@tsed/schema/./src/fn/lazyRef.ts","webpack://@tsed/schema/./src/fn/number.ts","webpack://@tsed/schema/./src/fn/object.ts","webpack://@tsed/schema/./src/fn/oneOf.ts","webpack://@tsed/schema/./src/fn/uri.ts","webpack://@tsed/schema/./src/fn/url.ts","webpack://@tsed/schema/./src/utils/mergeSpec.ts","webpack://@tsed/schema/./src/utils/getSpec.ts","webpack://@tsed/schema/./src/utils/getSpecType.ts","webpack://@tsed/schema/./src/utils/mapOpenSpecInfo.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec2.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec3.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec.ts","webpack://@tsed/schema/./src/utils/transformToOS2.ts","webpack://@tsed/schema/./src/utils/generateSpec.ts","webpack://@tsed/schema/./src/utils/getJsonSchema.ts","webpack://@tsed/schema/./src/utils/getOperationsRoutes.ts","webpack://@tsed/schema/./src/utils/getPropertiesStores.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"change-case\", \"@tsed/core\", \"@tsed/hooks\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@tsed/schema\"] = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse\n\t\troot[\"@tsed/schema\"] = factory(root[\"change-case\"], root[\"@tsed/core\"], root[\"@tsed/hooks\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__803__, __WEBPACK_EXTERNAL_MODULE__488__) => {\nreturn ","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = (opts) => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index];\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.prev.type === 'bos' && eos()) {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance() || '';\n } else {\n value += advance() || '';\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = (opts) => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return parsed.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${parsed.output})${append}`;\n if (parsed && parsed.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = parsed;\n }\n\n return regex;\n};\n\npicomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n const opts = options || {};\n let parsed = { negated: false, fastpaths: true };\n let prefix = '';\n let output;\n\n if (input.startsWith('./')) {\n input = input.slice(2);\n prefix = parsed.prefix = './';\n }\n\n if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n output = parse.fastpaths(input, options);\n }\n\n if (output === undefined) {\n parsed = parse(input, options);\n parsed.prefix = prefix + (parsed.prefix || '');\n } else {\n parsed.output = output;\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n }\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n if (windows) {\n return path.replace(/[\\\\/]$/, '').replace(/.*[\\\\/]/, '');\n } else {\n return path.replace(/\\/$/, '').replace(/.*\\//, '');\n }\n};\n","/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__803__;","module.exports = __WEBPACK_EXTERNAL_MODULE__488__;","module.exports = __WEBPACK_EXTERNAL_MODULE__598__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var OperationVerbs;\n(function (OperationVerbs) {\n OperationVerbs[\"ALL\"] = \"ALL\";\n OperationVerbs[\"GET\"] = \"GET\";\n OperationVerbs[\"POST\"] = \"POST\";\n OperationVerbs[\"PUT\"] = \"PUT\";\n OperationVerbs[\"PATCH\"] = \"PATCH\";\n OperationVerbs[\"HEAD\"] = \"HEAD\";\n OperationVerbs[\"DELETE\"] = \"DELETE\";\n OperationVerbs[\"OPTIONS\"] = \"OPTIONS\";\n OperationVerbs[\"TRACE\"] = \"TRACE\";\n OperationVerbs[\"PUBLISH\"] = \"PUBLISH\";\n OperationVerbs[\"SUBSCRIBE\"] = \"SUBSCRIBE\";\n OperationVerbs[\"CUSTOM\"] = \"CUSTOM\";\n})(OperationVerbs || (OperationVerbs = {}));\nexport const OPERATION_HTTP_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.DELETE,\n OperationVerbs.OPTIONS,\n OperationVerbs.TRACE,\n OperationVerbs.CUSTOM\n];\nexport const OPERATION_WS_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\n","/**\n * @ignore\n */\nconst JsonSchemaMappersContainer = new Map();\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type, mapper, spec) {\n return JsonSchemaMappersContainer.set(spec ? `${spec}:${type}` : type, mapper);\n}\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type, options) {\n const mapper = JsonSchemaMappersContainer.get(`${options?.specType}:${type}`) || JsonSchemaMappersContainer.get(type);\n if (mapper) {\n return mapper;\n }\n // istanbul ignore next\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n}\n/**\n * @ignore\n */\nexport function execMapper(type, args, options, parent) {\n return getJsonSchemaMapper(type, options)(...args, options, parent);\n}\nexport function hasMapper(type) {\n return JsonSchemaMappersContainer.has(type);\n}\nexport function execOneOfMapper(types, options) {\n return (types.find((type) => JsonSchemaMappersContainer.has(`${options?.specType}:${type}`)) ||\n types.find((type) => JsonSchemaMappersContainer.has(type)));\n}\n","/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { ancestorsOf, classOf, decoratorTypeOf, descriptorOf, isArrayOrArrayClass, isArrowFn, isClass, isClassObject, isCollection, isDate, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, nameOf, prototypeOf, Store } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map();\nexport class JsonEntityStore {\n constructor(options) {\n this.isStore = true;\n const { target, propertyKey, descriptor, index, decoratorType } = options;\n this.target = target;\n this.propertyKey = propertyKey;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName() {\n return nameOf(this.token);\n }\n get isCollection() {\n return !!this.collectionType;\n }\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor);\n }\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n get isDate() {\n return isDate(this.computedType);\n }\n get isObject() {\n return isObject(this.computedType);\n }\n get isClass() {\n return isClass(this.computedType);\n }\n /**\n * Return the JsonSchema\n */\n get schema() {\n return this._schema;\n }\n get nestedGenerics() {\n return this.schema.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n get type() {\n return this._type;\n }\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value) {\n this._type = value;\n this.build();\n }\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n get itemSchema() {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n get parentSchema() {\n return this.parent.schema;\n }\n get isDiscriminatorChild() {\n return this.schema.isDiscriminator && this.discriminatorAncestor?.schema.discriminator().base !== this.target;\n }\n static from(...args) {\n if (args[0].isStore) {\n return args[0];\n }\n const target = args[0];\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n const store = Store.from(...args);\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType);\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n jsonSchemaStore.build();\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n return store.get(\"JsonEntityStore\");\n }\n static fromMethod(target, propertyKey) {\n return this.from(target, propertyKey, descriptorOf(target, propertyKey));\n }\n static get(target, propertyKey, descriptor) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n isGetterOnly() {\n return isObject(this.descriptor) && !this.descriptor.value && this.descriptor.get && !this.descriptor.set;\n }\n get(key, defaultValue) {\n return this.store.get(key, defaultValue);\n }\n set(key, value) {\n return this.store.set(key, value);\n }\n toString() {\n return [this.targetName, this.propertyName, this.index].filter((o) => o !== undefined).join(\":\");\n }\n buildType(type) {\n if (isCollection(type)) {\n this.collectionType = type;\n }\n else {\n this._type = type;\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n getBestType() {\n return this.itemSchema.hasDiscriminator\n ? this.itemSchema.discriminator().base\n : isClassObject(this.type)\n ? this.itemSchema.getTarget()\n : isArrowFn(this.type)\n ? this.type()\n : this.type;\n }\n}\n","import { JsonEntitiesContainer } from \"../../domain/JsonEntityStore.js\";\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type) {\n return (target) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n","export const enumsRegistry = new Map();\n","import { classOf, isArrowFn, isClass, isClassObject, isCollection, isDate, isPrimitiveOrPrimitiveClass, isPromise, isSymbol } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport function getComputedType(target) {\n if (isPromise(target) || target === Function) {\n return Object;\n }\n if (isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)) {\n return classOf(target);\n }\n if (isArrowFn(target)) {\n return target();\n }\n return target;\n}\n","import { isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\nexport function getJsonType(value) {\n if (value === null) {\n return \"null\";\n }\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value) > -1) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n return \"generic\";\n }\n return primitiveOf(value);\n }\n if (value === Array) {\n return \"array\";\n }\n if (isArray(value)) {\n return value.map(getJsonType);\n }\n if (value === Set) {\n return \"array\";\n }\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n return \"object\";\n}\n","import { isObject, uniq } from \"@tsed/core\";\nexport const serializeEnum = (enumValue) => {\n if (isObject(enumValue) && enumValue !== null) {\n return Object.entries(enumValue).reduce((acc, [key, value]) => {\n if (isNaN(+key)) {\n return acc.concat(value);\n }\n return acc;\n }, []);\n }\n return enumValue;\n};\nexport function serializeEnumValues(enumValues) {\n const values = enumValues.reduce((acc, value) => acc.concat(serializeEnum(value)), []);\n const getValue = (value) => {\n return value === null ? \"null\" : typeof value;\n };\n const types = values.reduce((set, value) => set.add(getValue(value)), new Set());\n return { values: uniq(values), types };\n}\n","/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n","import { cleanObject } from \"@tsed/core\";\nexport class Discriminator {\n constructor({ base, propertyName, types, values } = {}) {\n this.values = new Map();\n this.types = new Map();\n Object.assign(this, cleanObject({\n base,\n propertyName,\n types: types ? new Map(types) : undefined,\n values: values ? new Map(values) : undefined\n }));\n }\n add(type, values) {\n values.forEach((value) => {\n this.values.set(value, type);\n });\n this.types.set(type, values);\n return this;\n }\n getType(discriminatorValue) {\n return this.values.get(discriminatorValue) || this.base;\n }\n getValues(type) {\n return this.types.get(type);\n }\n getDefaultValue(type) {\n const values = this.types.get(type);\n return values ? values[0] : undefined;\n }\n children() {\n return [...new Set([...this.types.keys()])];\n }\n}\n","import { ancestorsOf, classOf, isArray, isClass, isFunction, isObject, isPrimitiveClass, nameOf, uniq } from \"@tsed/core\";\nimport { Hooks } from \"@tsed/hooks\";\nimport { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getComputedType } from \"../utils/getComputedType.js\";\nimport { getJsonType } from \"../utils/getJsonType.js\";\nimport { serializeEnumValues } from \"../utils/serializeEnumValues.js\";\nimport { toJsonRegex } from \"../utils/toJsonRegex.js\";\nimport { Discriminator } from \"./JsonDiscriminator.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nfunction mapProperties(properties) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n return Object.entries(properties).reduce((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n return properties;\n }, {});\n}\nfunction mapToJsonSchema(item) {\n if (isArray(item)) {\n return item.map(mapToJsonSchema);\n }\n if (item.isStore || item.$isJsonDocument || item.isLazyRef) {\n return item;\n }\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n if (isObject(item)) {\n return JsonSchema.from(item);\n }\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({ type: item });\n }\n return item;\n}\nexport class JsonSchema extends Map {\n #nullable;\n #discriminator;\n #genericLabels;\n #nestedGenerics;\n #alias;\n #itemSchema;\n #target;\n #isGeneric;\n #isCollection;\n #ref;\n constructor(obj = {}) {\n super();\n this.$kind = \"schema\";\n this.$isJsonDocument = true;\n this.$hooks = new Hooks();\n this.$required = new Set();\n this.$allow = [];\n this.$forwardGroups = false;\n this.$ignore = false;\n this.isDiscriminatorKey = false;\n this.isDiscriminator = false;\n this.#nullable = false;\n this.#discriminator = null;\n this.#nestedGenerics = [];\n this.#alias = new Map();\n this.#isGeneric = false;\n this.#isCollection = false;\n this.#ref = false;\n if (obj) {\n this.assign(obj);\n }\n }\n get alias() {\n return this.#alias;\n }\n get nestedGenerics() {\n return this.#nestedGenerics;\n }\n set nestedGenerics(value) {\n this.#nestedGenerics = value;\n }\n get genericLabels() {\n return this.#genericLabels;\n }\n set genericLabels(value) {\n this.#genericLabels = value;\n }\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target);\n }\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n /**\n * Current schema has generics items\n */\n get hasGenerics() {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n get genericType() {\n return this.get(\"$ref\");\n }\n get class() {\n return this.getComputedType();\n }\n get canRef() {\n return this.#ref;\n }\n get isNullable() {\n return this.#nullable;\n }\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n get hasDiscriminator() {\n return !!this.#discriminator;\n }\n static from(obj = {}) {\n return new JsonSchema(obj);\n }\n nullable(value) {\n this.#nullable = value;\n }\n itemSchema(obj = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n return this.#itemSchema;\n }\n getAliasOf(property) {\n return this.#alias.get(property);\n }\n addAlias(property, alias) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n return this;\n }\n removeAlias(property) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n return this;\n }\n $id($id) {\n super.set(\"$id\", $id);\n return this;\n }\n $ref($ref) {\n super.set(\"$ref\", $ref);\n return this;\n }\n $schema($schema) {\n super.set(\"$schema\", $schema);\n return this;\n }\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name) {\n this.#ref = true;\n super.set(\"name\", name);\n return this;\n }\n name(name) {\n super.set(\"name\", name);\n return this;\n }\n ignore(cb) {\n if (typeof cb !== \"boolean\") {\n this.$hooks.on(\"ignore\", cb);\n }\n this.$ignore = cb;\n return this;\n }\n /**\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3\n */\n default(value) {\n super.set(\"default\", value);\n return this;\n }\n /**\n * More readible form of a one-element \"enum\"\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24\n */\n const(value) {\n super.set(\"const\", value);\n return this;\n }\n /**\n * This attribute is a string that provides a full description of the of purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n discriminatorKey(propertyName) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n return this;\n }\n discriminatorValue(...values) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n this.isDiscriminator = true;\n const properties = this.get(\"properties\");\n const schema = properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n }\n else {\n schema.enum(...values);\n schema.examples(values);\n }\n properties[discriminator.propertyName] = schema;\n this.set(\"properties\", properties);\n return this;\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * If \"items\" is an array of schemas, validation succeeds if every instance element\n * at a position greater than the size of \"items\" validates against \"additionalItems\".\n * Otherwise, \"additionalItems\" MUST be ignored, as the \"items\" schema\n * (possibly the default value of an empty schema) is applied to all elements.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10\n */\n additionalItems(additionalItems) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n return this;\n }\n /**\n * An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14\n */\n contains(contains) {\n super.set(\"contains\", mapToJsonSchema(contains));\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n example(...examples) {\n return this.examples(examples);\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9\n */\n items(items) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11\n */\n maxItems(maxItems) {\n super.set(\"maxItems\", maxItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12\n */\n minItems(minItems) {\n super.set(\"minItems\", minItems);\n return this;\n }\n /**\n * If this keyword has boolean value false, the instance validates successfully.\n * If it has boolean value true, the instance validates successfully if all of its elements are unique.\n * Omitting this keyword has the same behavior as a value of false.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13\n */\n uniqueItems(uniqueItems) {\n super.set(\"uniqueItems\", uniqueItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15\n */\n maxProperties(maxProperties) {\n super.set(\"maxProperties\", maxProperties);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is greater than,\n * or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16\n */\n minProperties(minProperties) {\n super.set(\"minProperties\", minProperties);\n return this;\n }\n allow(...allow) {\n if ([].concat(this.getJsonType()).includes(\"string\") && !this.has(\"minLength\")) {\n this.minLength(1);\n }\n allow.forEach((value) => {\n switch (value) {\n case \"\":\n this.set(\"minLength\", undefined);\n break;\n case null:\n this.any(...[\"null\"].concat(this.getJsonType(), this.$allow.map((v) => typeof v)));\n break;\n }\n });\n this.$allow.push(...allow);\n return this;\n }\n /**\n * Elements of this array must be unique.\n * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.\n * Omitting this keyword has the same behavior as an empty array.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17\n */\n required(required = true) {\n if (isArray(required)) {\n this.$required.clear();\n required.forEach((value) => this.$required.add(value));\n }\n else {\n const schema = this.clone();\n schema.$selfRequired = required;\n if ([].concat(schema.getJsonType()).includes(\"string\")) {\n schema.minLength(1);\n }\n return schema;\n }\n return this;\n }\n addRequired(property) {\n this.$required.add(property);\n return this;\n }\n removeRequired(property) {\n this.$required.delete(property);\n return this;\n }\n isRequired(property) {\n return this.$required.has(property);\n }\n /**\n * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.\n * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,\n * the child instance for that name successfully validates against the corresponding schema.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18\n */\n properties(properties) {\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n addProperty(key, schema) {\n const properties = this.get(\"properties\") || {};\n properties[key] = schema;\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n /**\n * This attribute is an object that defines the schema for a set of property names of an object instance.\n * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.\n * If the pattern matches the name of a property on the instance object, the value of the instance's property\n * MUST be valid against the pattern name's schema value.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19\n */\n patternProperties(patternProperties) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n */\n additionalProperties(additionalProperties) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown = true) {\n return this.additionalProperties(unknown);\n }\n /**\n * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.\n * Each property specifies a dependency.\n * If the dependency value is an array, each element in the array must be unique.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21\n */\n dependencies(dependencies) {\n super.set(\"dependencies\", mapProperties(dependencies));\n return this;\n }\n /**\n * Takes a schema which validates the names of all properties rather than their values.\n * Note the property name that the schema is testing will always be a string.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22\n */\n propertyNames(propertyNames) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n return this;\n }\n enum(enumValue, ...enumValues) {\n if (enumsRegistry.has(enumValue)) {\n return this.enum(enumsRegistry.get(enumValue));\n }\n if (enumValue instanceof JsonSchema) {\n if (enumValue.getName()) {\n super.set(\"enum\", enumValue);\n }\n else {\n super.set(\"enum\", enumValue.get(\"enum\")).any(...enumValue.get(\"enum\").map((value) => typeof value));\n }\n }\n else {\n const { values, types } = serializeEnumValues([enumValue, enumValues].flat());\n super.set(\"enum\", values).any(...types);\n }\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions) {\n super.set(\"definitions\", mapProperties(definitions));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf) {\n this.setManyOf(\"allOf\", allOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf) {\n this.setManyOf(\"anyOf\", anyOf);\n return this;\n }\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf) {\n this.setManyOf(\"oneOf\", oneOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not) {\n super.set(\"not\", mapToJsonSchema(not));\n return this;\n }\n /**\n * Must be strictly greater than 0.\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1\n */\n multipleOf(multipleOf) {\n super.set(\"multipleOf\", multipleOf);\n return this;\n }\n /**\n * Representing an inclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is less than or exactly equal to \"maximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2\n */\n maximum(maximum) {\n super.set(\"maximum\", maximum);\n return this;\n }\n /**\n * Representing an exclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is strictly less than (not equal to) to \"exclusiveMaximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3\n */\n exclusiveMaximum(exclusiveMaximum) {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n return this;\n }\n /**\n * Representing an inclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is greater than or exactly equal to \"minimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4\n */\n minimum(minimum) {\n super.set(\"minimum\", minimum);\n return this;\n }\n /**\n * Representing an exclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is strictly greater than (not equal to) to \"exclusiveMinimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5\n */\n exclusiveMinimum(exclusiveMinimum) {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6\n */\n maxLength(maxLength) {\n super.set(\"maxLength\", maxLength);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7\n */\n minLength(minLength) {\n super.set(\"minLength\", minLength);\n return this;\n }\n /**\n * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8\n */\n pattern(pattern) {\n super.set(\"pattern\", toJsonRegex(pattern));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format) {\n super.set(\"format\", format);\n return this;\n }\n /**\n * A single type, or a union of simple types\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25\n */\n type(type) {\n switch (type) {\n case \"map\":\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n case \"array\":\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"set\":\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"integer\":\n this.integer();\n break;\n case \"number\":\n case \"string\":\n case \"boolean\":\n case \"object\":\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n }\n else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n }\n else {\n super.set(\"type\", jsonType);\n }\n }\n }\n return this;\n }\n any(...types) {\n types = types.length ? types : [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"];\n types = uniq(types).map((o) => {\n return isClass(o) ? o : { type: getJsonType(o) };\n });\n if (types.length > 1) {\n this.anyOf(types);\n }\n else {\n this.type(types[0]?.type || types[0]);\n }\n return this;\n }\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n return this;\n }\n /**\n * This attribute is a string that provides a short description of the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n title(title) {\n super.set(\"title\", title);\n return this;\n }\n readOnly(readOnly) {\n super.set(\"readOnly\", readOnly);\n return this;\n }\n writeOnly(readOnly) {\n super.set(\"writeOnly\", readOnly);\n return this;\n }\n customKey(key, value) {\n super.set(`#${key}`, value);\n return this;\n }\n toObject(options) {\n return this.toJSON(options);\n }\n toJSON(options) {\n return execMapper(\"schema\", [this], options);\n }\n assign(obj = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n this.#ref = obj.#ref;\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n this.#nullable = obj.#nullable;\n super.set(\"type\", obj.get(\"type\"));\n }\n return this;\n }\n set(key, value) {\n if (key in this) {\n isFunction(this[key]) && this[key](value);\n }\n else {\n super.set(key, value);\n }\n return this;\n }\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType() {\n return getComputedType(this.#target);\n }\n getComputedItemType() {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n /**\n * Return the Json type as string\n */\n getJsonType() {\n if (this.get(\"anyOf\")) {\n return this.get(\"anyOf\").map((o) => {\n return o.getJsonType();\n });\n }\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n getTarget() {\n return this.#target;\n }\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (isClass(this.#target) ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n clone() {\n return new JsonSchema(this);\n }\n setManyOf(keyword, value) {\n let resolved = value\n .filter((o) => {\n if (o?.type === \"null\") {\n this.nullable(true);\n return false;\n }\n return true;\n })\n .map(mapToJsonSchema);\n if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {\n if (!resolved[0].hasDiscriminator) {\n return this.type(value[0]);\n }\n const children = resolved[0].discriminator().children();\n if (!children.length) {\n return this.type(value[0]);\n }\n resolved = children.map(mapToJsonSchema);\n }\n super.set(keyword, resolved);\n const jsonSchema = resolved[0];\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const { propertyName } = discriminator;\n super.set(\"discriminator\", {\n propertyName,\n mapping: resolved.reduce((acc, schema) => {\n discriminator.types.get(schema.getTarget())?.forEach((key) => {\n acc[key] = schema;\n });\n return acc;\n }, {})\n });\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n }\n}\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonClassStore = class JsonClassStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n }\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n set path(path) {\n this.store.set(\"path\", path);\n }\n build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n this._type = this._type || Object;\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n};\nJsonClassStore = __decorate([\n JsonEntityComponent(DecoratorTypes.CLASS)\n], JsonClassStore);\nexport { JsonClassStore };\n","export const isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n","import { isFunction } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nexport class JsonMap extends Map {\n constructor(obj = {}) {\n super();\n this.$kind = \"map\";\n this.$isJsonDocument = true;\n this.assign(obj);\n }\n assign(obj = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n }\n else {\n this.set(key, value);\n }\n });\n return this;\n }\n toJSON(options) {\n return execMapper(\"map\", [this], options);\n }\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers) {\n return Object.keys(headers).reduce((newHeaders, key) => {\n const value = headers[key];\n let type = typeof value;\n let options = {\n example: value\n };\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n options.type = options.type || type;\n newHeaders[key] = cleanObject(options);\n return newHeaders;\n }, {});\n}\n","import { JsonMap } from \"../domain/JsonMap.js\";\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n return content;\n }, new JsonMap());\n}\n","import { JsonMap } from \"./JsonMap.js\";\nexport class JsonMedia extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationMedia\";\n this.groups = [];\n }\n schema(schema) {\n this.set(\"schema\", schema);\n return this;\n }\n examples(examples) {\n this.set(\"examples\", examples);\n return this;\n }\n}\n","import { mapHeaders } from \"../utils/mapHeaders.js\";\nimport { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonMedia } from \"./JsonMedia.js\";\nexport class JsonResponse extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationResponse\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n headers(headers) {\n this.set(\"headers\", mapHeaders(headers));\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content, JsonMedia));\n return this;\n }\n getContent() {\n return this.get(\"content\");\n }\n getMedia(mediaType, create = true) {\n create && this.addMedia(mediaType);\n return this.getContent()?.get(mediaType);\n }\n addMedia(mediaType) {\n const content = this.get(\"content\");\n if (!content.has(mediaType)) {\n content.set(mediaType, new JsonMedia());\n }\n return this;\n }\n isBinary() {\n return this.getContent().has(\"application/octet-stream\");\n }\n}\n","import { deepMerge, uniq, uniqBy } from \"@tsed/core\";\nimport { isRedirectionStatus, isSuccessStatus } from \"../utils/isSuccessStatus.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonResponse } from \"./JsonResponse.js\";\nexport class JsonOperation extends JsonMap {\n #status;\n #redirection;\n constructor(obj = {}) {\n super({ parameters: [], responses: new JsonMap(), ...obj });\n this.$kind = \"operation\";\n this.operationPaths = new Map();\n this.#redirection = false;\n }\n get response() {\n return this.getResponses().get(this.getStatus().toString());\n }\n get status() {\n return this.#status;\n }\n tags(tags) {\n super.set(\"tags\", tags);\n return this;\n }\n addTags(tags) {\n tags = uniqBy([...(this.get(\"tags\") || []), ...tags], \"name\");\n return this.tags(tags);\n }\n summary(summary) {\n super.set(\"summary\", summary);\n return this;\n }\n operationId(operationId) {\n this.set(\"operationId\", operationId);\n return this;\n }\n responses(responses) {\n this.set(\"responses\", responses);\n return this;\n }\n defaultStatus(status) {\n this.#status = status;\n return this;\n }\n getStatus() {\n return this.#status || 200;\n }\n setRedirection(status = 302) {\n this.#redirection = true;\n this.#status = status;\n return this;\n }\n isRedirection(status) {\n if (this.#redirection) {\n if (status) {\n return isRedirectionStatus(status);\n }\n }\n return this.#redirection;\n }\n addResponse(statusCode, response) {\n if ((isSuccessStatus(statusCode) || isRedirectionStatus(statusCode)) && !this.#status) {\n const res = this.getResponseOf(200);\n this.getResponses().set(statusCode.toString(), res).delete(\"200\");\n this.defaultStatus(Number(statusCode));\n }\n const currentCode = statusCode === \"default\" ? this.getStatus().toString() : statusCode.toString();\n const currentResponse = this.getResponses().get(currentCode);\n if (!currentResponse) {\n response.status = Number(currentCode);\n this.getResponses().set(currentCode, response);\n }\n else {\n response.forEach((value, key) => {\n if (![\"content\"].includes(key)) {\n currentResponse.set(key, deepMerge(currentResponse.get(key), value));\n }\n });\n currentResponse.status = Number(currentCode);\n }\n return this;\n }\n getResponses() {\n return this.get(\"responses\");\n }\n getResponseOf(status) {\n return (status === \"default\" ? this.response : this.getResponses().get(String(status))) || new JsonResponse();\n }\n ensureResponseOf(status) {\n this.addResponse(status, this.getResponseOf(status));\n return this.getResponseOf(status);\n }\n getHeadersOf(status) {\n return this.getResponseOf(status).get(\"headers\") || {};\n }\n getContentTypeOf(status) {\n return [...this.getResponseOf(status).get(\"content\").keys()].slice(-1)[0];\n }\n security(security) {\n this.set(\"security\", security);\n return this;\n }\n addSecurityScopes(name, scopes) {\n const security = this.get(\"security\") || {};\n security[name] = uniq([...(security[name] || []), ...scopes]);\n return this.security(security);\n }\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n deprecated(deprecated) {\n super.set(\"deprecated\", deprecated);\n return this;\n }\n parameters(parameters) {\n super.set(\"parameters\", parameters);\n return this;\n }\n addParameter(index, parameter) {\n if (index === -1) {\n index = this.get(\"parameters\").length;\n }\n this.get(\"parameters\")[index] = parameter;\n }\n consumes(consumes) {\n super.set(\"consumes\", consumes);\n return this;\n }\n produces(produces) {\n super.set(\"produces\", produces);\n return this;\n }\n addProduce(produce) {\n const produces = uniq([].concat(this.get(\"produces\"), produce)).filter(Boolean);\n this.set(\"produces\", produces);\n }\n addOperationPath(method, path, options = {}) {\n this.operationPaths.set(String(method) + String(path), {\n ...options,\n method,\n path\n });\n return this;\n }\n getAllowedOperationPath(allowedVerbs) {\n if (!allowedVerbs) {\n return [...this.operationPaths.values()];\n }\n return [...this.operationPaths.values()].filter(({ method }) => method && allowedVerbs.includes(method.toUpperCase()));\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonOperation } from \"./JsonOperation.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonMethodStore = class JsonMethodStore extends JsonEntityStore {\n constructor(options) {\n super({\n store: Store.fromMethod(options.target, options.propertyKey),\n descriptor: descriptorOf(options.target, options.propertyKey),\n ...options\n });\n this.parent = JsonEntityStore.from(this.target);\n this.middlewares = [];\n this.beforeMiddlewares = [];\n this.afterMiddlewares = [];\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n this.operation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n const { beforeMiddlewares = [], middlewares = [], afterMiddlewares = [] } = options;\n this.after(afterMiddlewares);\n this.before(beforeMiddlewares);\n this.use(middlewares);\n }\n get params() {\n return this.parameters;\n }\n get view() {\n return this.store.get(\"view\");\n }\n set view(view) {\n this.store.set(\"view\", view);\n }\n get acceptMimes() {\n return this.store.get(\"acceptMimes\", []);\n }\n set acceptMimes(mimes) {\n this.store.set(\"acceptMimes\", mimes);\n }\n get parameters() {\n return [...this.children.values()];\n }\n get operationPaths() {\n return this.operation.operationPaths;\n }\n /**\n * Get an endpoint.\n * @param target\n * @param propertyKey\n * @param descriptor\n */\n static get(target, propertyKey, descriptor) {\n descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n getResponseOptions(status, { contentType = \"application/json\", includes } = {}) {\n const media = this.operation.getResponseOf(status).getMedia(contentType, false);\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\");\n let groups = media.groups;\n if (includes && media.allowedGroups?.size) {\n groups = [...(groups || []), ...includes.filter((include) => media.allowedGroups.has(include))];\n }\n return { type: schema.getComputedItemType(), groups };\n }\n return { type: this.type };\n }\n /**\n * Append middlewares to the beforeMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n before(args) {\n this.beforeMiddlewares = this.beforeMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Append middlewares to the afterMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n after(args) {\n this.afterMiddlewares = this.afterMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Store all arguments collected via Annotation.\n * @param args\n */\n use(args) {\n this.middlewares = this.middlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.\n *\n * @param key\n * @returns {any}\n */\n get(key) {\n const ctrlValue = Store.from(this.target).get(key);\n return deepMerge(ctrlValue, this.store.get(key));\n }\n getParamTypes() {\n return [...this.children.values()].reduce((obj, item) => ({\n ...obj,\n [item.paramType]: true\n }), {});\n }\n build() {\n if (!this._type) {\n let type = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n this.buildType(type);\n }\n this._type = this._type || Object;\n this.parent.children.set(this.propertyName, this);\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n};\nJsonMethodStore = __decorate([\n JsonEntityComponent(DecoratorTypes.METHOD),\n __metadata(\"design:paramtypes\", [Object])\n], JsonMethodStore);\nexport { JsonMethodStore };\nexport const EndpointMetadata = JsonMethodStore;\n","export var JsonParameterTypes;\n(function (JsonParameterTypes) {\n JsonParameterTypes[\"BODY\"] = \"body\";\n JsonParameterTypes[\"PATH\"] = \"path\";\n JsonParameterTypes[\"QUERY\"] = \"query\";\n JsonParameterTypes[\"HEADER\"] = \"header\";\n JsonParameterTypes[\"COOKIES\"] = \"cookie\";\n JsonParameterTypes[\"FILES\"] = \"files\";\n})(JsonParameterTypes || (JsonParameterTypes = {}));\n/**\n * @ignore\n */\nexport function formatParameterType(type) {\n return String(type).toLowerCase().replace(\"raw_\", \"\").replace(\"cookies\", \"cookie\");\n}\n/**\n * @ignore\n */\nexport function isParameterType(type) {\n return Object.values(JsonParameterTypes).includes(formatParameterType(type));\n}\n","import { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { formatParameterType } from \"./JsonParameterTypes.js\";\nexport class JsonParameter extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationInParameter\";\n this.nestedGenerics = [];\n }\n getName() {\n const name = this.get(\"name\");\n if (this.get(\"in\") === \"files\") {\n return name.split(\".\")[0];\n }\n return name;\n }\n name(name) {\n this.set(\"name\", name);\n return this;\n }\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n in(inType, expression = \"\") {\n this.set(\"in\", formatParameterType(inType));\n this.expression = expression;\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n schema(schema) {\n this.$schema = schema;\n return this;\n }\n toJSON(options) {\n return execMapper(\"operationInParameter\", [this], options);\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonParameter } from \"./JsonParameter.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonParameterStore = class JsonParameterStore extends JsonEntityStore {\n constructor(options) {\n super(options);\n /**\n * Ref to JsonParameter when the decorated object is a parameter.\n */\n this.parameter = new JsonParameter();\n this.parent = JsonEntityStore.fromMethod(this.target, this.propertyKey);\n this.pipes = options.pipes || [];\n this.paramType = options.paramType || this.paramType;\n this.expression = options.expression || this.expression;\n this.dataPath = options.dataPath || this.dataPath;\n }\n get nestedGenerics() {\n return this.parameter.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.parameter.nestedGenerics = nestedGenerics;\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return !!this.parameter.get(\"required\");\n }\n set required(value) {\n this.parameter.required(value);\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n static getParams(target, propertyKey) {\n const params = [];\n const klass = ancestorsOf(target)\n .reverse()\n .find((target) => {\n return isMethodDescriptor(target, propertyKey) && JsonEntityStore.fromMethod(target, propertyKey).children.size;\n });\n if (klass) {\n JsonEntityStore.fromMethod(klass, propertyKey).children.forEach((param, index) => {\n params[+index] = param;\n });\n return params;\n }\n return [];\n }\n static get(target, propertyKey, index) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, index);\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n getSchema(type) {\n if (isCollection(type) || !isClass(type)) {\n return JsonSchema.from({\n type\n });\n }\n return JsonEntityStore.from(type).schema;\n }\n build() {\n if (!this._type) {\n const type = Metadata.getParamTypes(prototypeOf(this.target), this.propertyKey)[this.index];\n this.buildType(type);\n }\n this._type = this._type || Object;\n if (!this._schema) {\n this.parent.children.set(this.index, this);\n this._schema = this.getSchema(this.collectionType || this.type);\n this.parameter.schema(this._schema);\n if (this.collectionType) {\n this._schema.itemSchema(this.getSchema(this.type));\n }\n this.parent.operation.addParameter(this.index, this.parameter);\n }\n }\n};\nJsonParameterStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PARAM),\n __metadata(\"design:paramtypes\", [Object])\n], JsonParameterStore);\nexport { JsonParameterStore };\nexport const ParamMetadata = JsonParameterStore;\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonPropertyStore = class JsonPropertyStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n this.parent = JsonEntityStore.from(this.target);\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return this.parent.schema.isRequired(this.propertyKey);\n }\n /**\n * Change the state of the required data.\n * @param value\n */\n set required(value) {\n if (value) {\n this.parent.schema.addRequired(this.propertyKey);\n }\n else {\n this.parent.schema.removeRequired(this.propertyKey);\n }\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n discriminatorKey() {\n this.parent.schema.discriminatorKey(String(this.propertyKey));\n this.itemSchema.isDiscriminatorKey = true;\n return this;\n }\n isDiscriminatorKey() {\n return this.itemSchema.isDiscriminatorKey;\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n build() {\n if (!this._type) {\n this.buildType(Metadata.getType(prototypeOf(this.target), this.propertyKey));\n }\n this._type = this._type || Object;\n const properties = this.parent.schema.get(\"properties\");\n let schema = properties[this.propertyName];\n if (!schema) {\n this.parent.children.set(this.propertyName, this);\n schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n schema.itemSchema(this.type);\n }\n }\n this.parent.schema.addProperty(this.propertyName, schema);\n this._schema = schema;\n }\n static get(target, propertyKey) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey);\n }\n};\nJsonPropertyStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PROP)\n], JsonPropertyStore);\nexport { JsonPropertyStore };\nexport const PropertyMetadata = JsonPropertyStore;\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonClassStore } from \"../domain/JsonClassStore.js\";\nimport { JsonEntitiesContainer, JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonParameterStore } from \"../domain/JsonParameterStore.js\";\nimport { JsonPropertyStore } from \"../domain/JsonPropertyStore.js\";\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\nexport function getJsonEntityStore(...args) {\n return JsonEntityStore.from(...args);\n}\n","export class JsonOperationPathsMap extends Map {\n constructor() {\n super(...arguments);\n this.$kind = \"operationPaths\";\n this.$isJsonDocument = true;\n this.getKey = (method, path) => `${method}-${path}`;\n }\n setOperationPath(operationPath) {\n // if (operationPath.method !== OperationVerbs.CUSTOM) {\n const key = this.getKey(operationPath.method, operationPath.path);\n this.set(key, operationPath);\n // }\n }\n}\n","import { ancestorsOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n return store.$inherited;\n}\n","import { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonOperationPathsMap } from \"../domain/JsonOperationPathsMap.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nexport function getOperationsStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map();\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n store.$operations.forEach((store) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n operationPaths.clear();\n }\n return store.$operations;\n}\n","export function removeHiddenOperation(operationStore) {\n return !operationStore.store.get(\"hidden\");\n}\n","import { camelCase } from \"change-case\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\nfunction pushToChannels(options) {\n return (channels, { operationPath, operationStore }) => {\n const path = options.ctrlRootPath || \"/\";\n const method = operationPath.method.toLowerCase();\n const operationId = camelCase(`${method.toLowerCase()} ${operationStore.parent.schema.getName()}`);\n const message = execMapper(\"message\", [operationStore, operationPath], options);\n return {\n ...channels,\n [path]: {\n ...channels[path],\n [method]: {\n ...channels[path]?.[method],\n operationId,\n message: {\n oneOf: [...(channels[path]?.[method]?.message?.oneOf || []), message]\n }\n }\n }\n };\n };\n}\nfunction expandOperationPaths(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operationStore\n };\n });\n };\n}\nexport function channelsMapper(model, { channels, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .flatMap(expandOperationPaths(options))\n .reduce(pushToChannels(options), channels);\n}\nregisterJsonSchemaMapper(\"channels\", channelsMapper);\n","export var SpecTypes;\n(function (SpecTypes) {\n SpecTypes[\"JSON\"] = \"jsonschema\";\n SpecTypes[\"SWAGGER\"] = \"swagger2\";\n SpecTypes[\"OPENAPI\"] = \"openapi3\";\n SpecTypes[\"ASYNCAPI\"] = \"asyncapi2\";\n})(SpecTypes || (SpecTypes = {}));\n","export function makeOf(key, schemes) {\n if (schemes.length) {\n if (schemes.length === 1) {\n return schemes[0];\n }\n else {\n return { [key]: schemes };\n }\n }\n return null;\n}\n","import { cleanObject, getValue } from \"@tsed/core\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function messageMapper(jsonOperationStore, operationPath, { tags = [], defaultTags = [], ...options } = {}) {\n const { path: event, method } = operationPath;\n const messageKey = String(event);\n let message = getValue(options.components, \"messages.\" + event, cleanObject({\n description: jsonOperationStore.operation.get(\"description\"),\n summary: jsonOperationStore.operation.get(\"summary\")\n }));\n if (method.toUpperCase() === OperationVerbs.PUBLISH) {\n const payload = execMapper(\"payload\", [jsonOperationStore, operationPath], options);\n if (payload) {\n message.payload = payload;\n }\n const responses = jsonOperationStore.operation\n .getAllowedOperationPath([OperationVerbs.SUBSCRIBE])\n .map((operationPath) => {\n return execMapper(\"message\", [jsonOperationStore, operationPath], options);\n })\n .filter(Boolean);\n const responsesSchema = makeOf(\"oneOf\", responses);\n if (responsesSchema) {\n message[\"x-response\"] = responsesSchema;\n }\n }\n else {\n const response = execMapper(\"response\", [jsonOperationStore, operationPath], options);\n if (response) {\n message[\"x-response\"] = response;\n }\n }\n options.components.messages = options.components.messages || {};\n options.components.messages[messageKey] = message;\n return { $ref: `#/components/messages/${messageKey}` };\n}\nregisterJsonSchemaMapper(\"message\", messageMapper, SpecTypes.ASYNCAPI);\n","/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels, genericTypes) {\n return genericLabels.reduce((map, item, index) => map.set(item, genericTypes[index]), new Map());\n}\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options) {\n if (options.genericLabels && options.genericTypes) {\n const { genericLabels, genericTypes, ...ops } = options;\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n return options;\n}\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value) {\n const [genericTypes, ...out] = value.nestedGenerics;\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nfunction getParameters(jsonOperation, options) {\n return jsonOperation.get(\"parameters\").filter((parameter) => isParameterType(parameter.get(\"in\")));\n}\nexport function payloadMapper(jsonOperationStore, operationPath, options) {\n const parameters = getParameters(jsonOperationStore.operation, options);\n const payloadName = pascalCase([operationPath.path, operationPath.method, \"Payload\"].join(\" \"));\n setValue(options, `components.schemas.${payloadName}`, {});\n const allOf = parameters\n .map((parameter) => {\n const opts = mapOptions(parameter, options);\n const jsonSchema = execMapper(\"item\", [parameter.$schema], {\n ...opts,\n ...popGenerics(parameter)\n });\n switch (parameter.get(\"in\")) {\n case JsonParameterTypes.BODY:\n return jsonSchema;\n case JsonParameterTypes.QUERY:\n case JsonParameterTypes.PATH:\n case JsonParameterTypes.HEADER:\n return {\n type: \"object\",\n properties: {\n [parameter.get(\"name\")]: jsonSchema\n }\n };\n }\n return jsonSchema;\n }, {})\n .filter(Boolean);\n return makeOf(\"allOf\", allOf);\n}\nregisterJsonSchemaMapper(\"payload\", payloadMapper, SpecTypes.ASYNCAPI);\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function responsePayloadMapper(jsonOperationStore, operationPath, options) {\n const responses = jsonOperationStore.operation.getResponses();\n const statuses = [];\n const statusesTexts = [];\n const successSchemes = [];\n const errorSchemes = [];\n [...responses.entries()].forEach(([status, jsonResponse]) => {\n const response = execMapper(\"map\", [jsonResponse], options);\n statuses.push(+status);\n statusesTexts.push(response.description);\n if (+status !== 204) {\n const { content } = response;\n const schema = content[Object.keys(content)[0]];\n if (+status >= 200 && +status < 400) {\n successSchemes.push(schema);\n }\n else {\n successSchemes.push(schema);\n }\n }\n });\n const responsePayloadName = pascalCase([operationPath.path, operationPath.method, \"Response\"].join(\" \"));\n const responsePayload = {\n type: \"object\",\n properties: {\n status: {\n type: \"number\",\n enum: statuses\n },\n statusText: {\n type: \"string\",\n enum: statusesTexts\n }\n },\n required: [\"status\"]\n };\n const dataSchema = makeOf(\"oneOf\", successSchemes);\n if (dataSchema) {\n setValue(responsePayload, \"properties.data\", dataSchema);\n }\n const errorSchema = makeOf(\"oneOf\", errorSchemes);\n if (errorSchemes.length) {\n setValue(responsePayload, \"properties.error\", errorSchema);\n }\n setValue(options, `components.schemas.${responsePayloadName}`, responsePayload);\n return { $ref: `#/components/schemas/${responsePayloadName}` };\n}\nregisterJsonSchemaMapper(\"response\", responsePayloadMapper, SpecTypes.ASYNCAPI);\n","import { uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n const specJson = {\n channels: execMapper(\"channels\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (options.components?.schemas && Object.keys(options.components.schemas).length) {\n specJson.components = {\n ...options.components,\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.ASYNCAPI);\n","import { nameOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore.js\";\nexport class JsonLazyRef {\n constructor(getType) {\n this.getType = getType;\n this.isLazyRef = true;\n }\n get target() {\n return this.getType();\n }\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n get name() {\n return nameOf(this.getType());\n }\n}\n","import { cleanObject, setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * ignore\n * @param options\n */\nfunction getHost(options) {\n const { host = `#/${[SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType) ? \"components/schemas\" : \"definitions\"}` } = options;\n return host;\n}\n/**\n * @ignore\n */\nexport function createRefName(name, options) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groupsName || options.groups.join(\" \")}`);\n }\n return name;\n}\n/**\n * @ignore\n */\nexport function createRef(name, schema, options) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n const readOnly = schema.isReadOnly;\n const writeOnly = schema.isWriteOnly;\n return cleanObject({\n readOnly: readOnly ? true : undefined,\n writeOnly: writeOnly ? true : undefined,\n ...(readOnly || writeOnly\n ? {\n anyOf: [ref]\n }\n : ref)\n });\n}\n/**\n * @ignore\n */\nexport function toRef(value, schema, options) {\n const name = createRefName(value.getName(), options);\n if (schema) {\n setValue(options, `components.schemas.${name}`, schema);\n }\n return createRef(name, value, options);\n}\n","import { JsonLazyRef } from \"../../domain/JsonLazyRef.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, execOneOfMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function anyMapper(input, options = {}) {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", [input], options);\n }\n if (input instanceof JsonSchema && input.get(\"enum\") instanceof JsonSchema) {\n const enumSchema = input.get(\"enum\");\n return toRef(enumSchema, enumSchema.toJSON(options), options);\n }\n if (input.$kind && input.$isJsonDocument) {\n const kind = execOneOfMapper([input.$kind, \"map\"], options);\n const schema = execMapper(kind, [input], mapGenericsOptions(options));\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n return execMapper(\"object\", [input], options);\n}\nregisterJsonSchemaMapper(\"any\", anyMapper);\n","import { getValue, setValue } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions, popGenerics } from \"../../utils/generics.js\";\nimport { createRef, createRefName } from \"../../utils/ref.js\";\nexport function classMapper(value, options) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n if (value.hasGenerics) {\n // Inline generic\n const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", [store.schema], {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n if (schema.title) {\n const name = createRefName(schema.title, options);\n setValue(options.components, `schemas.${name}`, schema);\n delete schema.title;\n return createRef(name, value, options);\n }\n return schema;\n }\n if (!getValue(options, `components.schemas.${name}`)) {\n // avoid infinite calls\n setValue(options, `components.schemas.${name}`, {});\n options.components.schemas[name] = execMapper(\"any\", [store.schema], mapGenericsOptions({\n ...options,\n root: false\n }));\n }\n return createRef(name, value, options);\n}\nregisterJsonSchemaMapper(\"class\", classMapper);\n","import { isString } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function discriminatorMappingMapper(obj, _, options) {\n if (obj.discriminator?.mapping) {\n const entries = Object.entries(obj.discriminator.mapping);\n const newMapping = {};\n for (const [key, value] of entries) {\n newMapping[key] = isString(value) ? value : toRef(value, null, options).$ref;\n }\n obj.discriminator.mapping = newMapping;\n }\n return obj;\n}\nfunction defaultDiscriminatorMappingMapper(obj) {\n if (obj.discriminator?.mapping) {\n delete obj.discriminator.mapping;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"discriminatorMapping\", defaultDiscriminatorMappingMapper);\n","import { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function enumsMapper(obj, schema, options) {\n if (options.inlineEnums && obj.enum?.$isJsonDocument) {\n obj.enum = obj.enum.toJSON().enum;\n }\n if (obj.enum) {\n obj.type = obj.type === \"object\" || obj.type === undefined ? \"string\" : obj.type;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", enumsMapper);\n","import { isClass, isPrimitiveClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { getJsonType } from \"../../utils/getJsonType.js\";\n/**\n * @ignore\n */\nexport function genericsMapper(obj, options) {\n const { generics } = options;\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n if (isClass(type)) {\n const model = {\n class: type\n };\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", [model], {\n ...options,\n generics: undefined\n });\n }\n const store = JsonEntityStore.from(model.class);\n return execMapper(\"schema\", [store.schema], {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n","import { classOf, deepMerge } from \"@tsed/core\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { getInheritedStores } from \"../../utils/getInheritedStores.js\";\nfunction alterMerge(_, obj) {\n if (obj?.type && obj?.$ref) {\n const { $ref, ...schema } = obj;\n obj = {\n allOf: [\n {\n $ref\n },\n schema\n ]\n };\n }\n return obj;\n}\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj, { target, ...options }) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", [store.schema], options), { alter: alterMerge });\n }, {});\n return deepMerge(schema, obj, { alter: alterMerge });\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function itemMapper(value, options) {\n return value && value.isClass ? execMapper(\"class\", [value], options) : execMapper(\"any\", [value], options);\n}\nregisterJsonSchemaMapper(\"item\", itemMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { createRef, toRef } from \"../../utils/ref.js\";\nexport function lazyRefMapper(jsonLazyRef, options) {\n const name = jsonLazyRef.name;\n if (options.$refs?.find((t) => t === jsonLazyRef.target)) {\n return createRef(name, jsonLazyRef.schema, options);\n }\n options.$refs = [...(options.$refs || []), jsonLazyRef.target];\n const schema = jsonLazyRef.getType() && execMapper(\"schema\", [jsonLazyRef.schema], mapGenericsOptions(options));\n return toRef(jsonLazyRef.schema, schema, options);\n}\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input, { ignore = [], ...options } = {}) {\n options = mapGenericsOptions(options);\n return Array.from(input.entries()).reduce((obj, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n obj[key] = execMapper(\"item\", [value], options);\n return obj;\n }, {});\n}\nregisterJsonSchemaMapper(\"map\", mapMapper);\n","export const MANY_OF_PROPERTIES = [\"oneOf\", \"allOf\", \"anyOf\"];\nexport const STRING_PROPERTIES = [\"minLength\", \"maxLength\", \"pattern\", \"format\"];\nexport const BOOLEAN_PROPERTIES = [];\nexport const NUMBER_PROPERTIES = [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"];\nexport const ARRAY_PROPERTIES = [\"maxItems\", \"minItems\", \"uniqueItems\", \"items\", \"contains\", \"maxContains\", \"minContains\"];\nexport const OBJECT_PROPERTIES = [\n \"maxItems\",\n \"minItems\",\n \"uniqueItems\",\n \"items\",\n \"contains\",\n \"maxContains\",\n \"minContains\",\n \"patternProperties\",\n \"dependencies\"\n];\nexport const COMMON_PROPERTIES = [\"const\", \"enum\"];\n","import { cleanObject } from \"@tsed/core\";\nimport { MANY_OF_PROPERTIES } from \"../../constants/jsonSchemaProperties.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapper(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (!obj.discriminator) {\n if (obj.$ref) {\n obj = cleanObject({\n ...obj,\n $ref: undefined,\n anyOf: [\n { type: \"null\" },\n {\n $ref: obj.$ref\n }\n ]\n });\n }\n else {\n MANY_OF_PROPERTIES.some((keyword) => {\n if (obj[keyword]) {\n obj[keyword] = obj[keyword].filter((item) => item.type !== \"null\");\n if (obj[keyword].length === 1) {\n const base = obj[keyword];\n obj = cleanObject({\n ...obj,\n ...base[0],\n [keyword]: undefined,\n type: [\"null\", Number.isInteger(obj.multipleOf) ? \"integer\" : base[0].type]\n });\n }\n else {\n obj[keyword] = [{ type: \"null\" }].concat(obj[keyword]).map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n });\n delete obj.type;\n }\n }\n });\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapper);\n","import { isBoolean } from \"@tsed/core\";\n/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema, options) {\n if (isBoolean(schema.$ignore) && schema.$ignore) {\n return true;\n }\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n if (result) {\n return result;\n }\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n return result;\n}\n","import { isArray } from \"@tsed/core\";\nimport { alterIgnore } from \"../../hooks/alterIgnore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input, options) {\n const { specType, operationIdFormatter, root, components, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;\n return Object.entries(input).reduce((obj, [key, value]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", [value], opts);\n obj[key] = execMapper(\"nullable\", [obj[key], value], opts);\n }\n return obj;\n }, isArray(input) ? [] : {});\n}\nregisterJsonSchemaMapper(\"object\", objectMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function ofMapper(input, options, parent) {\n return input.map((value) => {\n return execMapper(\"item\", [value], {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function propertiesMapper(input, options, parent) {\n if (input.isClass) {\n return execMapper(\"class\", [input], options);\n }\n return execMapper(\"any\", [input], {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n","/**\n * @ignore\n */\nexport function alterRequiredGroups(required, schema, options) {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n return required;\n}\n","import { uniq } from \"@tsed/core\";\nimport { alterRequiredGroups } from \"../../hooks/alterRequiredGroups.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction mapRequiredProps(obj, schema, options = {}) {\n const { useAlias } = options;\n const props = Object.keys(obj.properties || {});\n return (keys, key) => {\n const aliasedKey = useAlias ? schema.alias.get(key) || key : key;\n if (props.includes(aliasedKey)) {\n return keys.concat(aliasedKey);\n }\n return keys;\n };\n}\nfunction extractRequiredProps(obj, schema, options) {\n let required = obj.required || [];\n required = [...required, ...schema.$required];\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n return required;\n }, required);\n }\n return alterRequiredGroups(uniq(required), schema, options);\n}\nexport function requiredMapper(obj, schema, options) {\n if (options.groups && options.groups.includes(\"partial\")) {\n if (obj.discriminator) {\n return {\n ...obj,\n required: [obj.discriminator.propertyName]\n };\n }\n return obj;\n }\n let required = extractRequiredProps(obj, schema, options);\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n if (required.length) {\n obj.required = required;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"required\", requiredMapper);\n","/**\n * @ignore\n */\nexport function mapAliasedProperties(value, alias) {\n return Object.entries(value).reduce((properties, [key, value]) => {\n key = alias.get(key) || key;\n properties[key] = value;\n return properties;\n }, {});\n}\n","import { isBoolean, isNumber, isString } from \"@tsed/core\";\nimport { ARRAY_PROPERTIES, BOOLEAN_PROPERTIES, COMMON_PROPERTIES, MANY_OF_PROPERTIES, NUMBER_PROPERTIES, OBJECT_PROPERTIES, STRING_PROPERTIES } from \"../constants/jsonSchemaProperties.js\";\nfunction findManyOf(obj) {\n return MANY_OF_PROPERTIES.find((keyword) => obj[keyword]);\n}\nconst RULES = {\n string: { properties: STRING_PROPERTIES, is: isString },\n number: { properties: NUMBER_PROPERTIES, is: isNumber },\n boolean: { properties: BOOLEAN_PROPERTIES, is: isBoolean },\n array: { properties: ARRAY_PROPERTIES, is: () => false },\n object: { properties: OBJECT_PROPERTIES, is: () => false }\n};\nfunction pickProperties(type, obj, item) {\n const rule = RULES[type];\n rule?.properties.concat(COMMON_PROPERTIES).forEach((keyword) => {\n if (obj[keyword] !== undefined) {\n if (COMMON_PROPERTIES.includes(keyword)) {\n item[keyword] = obj[keyword].filter(rule.is);\n }\n else {\n item[keyword] = obj[keyword];\n delete obj[keyword];\n }\n }\n });\n}\nexport function alterOneOf(obj, schema, options) {\n const kind = findManyOf(obj);\n if (kind) {\n obj[kind].forEach((item) => {\n pickProperties(item.type, obj, item);\n });\n MANY_OF_PROPERTIES.forEach((keyword) => {\n if (obj[keyword] && options.groups !== false && schema.$hooks.has(keyword)) {\n obj = { ...obj, [keyword]: schema.$hooks.alter(keyword, obj[keyword], [options.groups]) };\n }\n });\n delete obj.const;\n delete obj.enum;\n if (!(obj.items || obj.properties)) {\n delete obj.type;\n }\n }\n return obj;\n}\n","import { getValue, isObject } from \"@tsed/core\";\nimport { mapAliasedProperties } from \"../../domain/JsonAliasMap.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { alterOneOf } from \"../../hooks/alterOneOf.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [];\n/**\n * @ignore\n */\nfunction isEmptyProperties(key, value) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n/**\n * @ignore\n */\nfunction shouldMapAlias(key, value, useAlias) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n/**\n * @ignore\n */\nfunction shouldSkipKey(key, { specType = SpecTypes.JSON, customKeys = false }) {\n return (IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));\n}\nfunction isExample(key, value, options) {\n return key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType);\n}\nfunction mapOptions(options) {\n let addDef = false;\n if (!options) {\n addDef = true;\n options = { components: { schemas: {} }, inlineEnums: true };\n }\n const { useAlias = true, components = { schemas: {} } } = options;\n options = {\n ...options,\n useAlias,\n components\n };\n return {\n addDef,\n options\n };\n}\nfunction mapKeys(schema, options) {\n const { useAlias } = options;\n return [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item, key) => {\n let value = schema.get(key);\n key = key.replace(/^#/, \"\");\n if (key === \"type\") {\n item[key] = schema.getJsonType();\n return item;\n }\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, [value], options, schema);\n if (isEmptyProperties(key, value)) {\n return item;\n }\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n item[key] = value;\n return item;\n }, {});\n}\nfunction serializeSchema(schema, options) {\n let obj = mapKeys(schema, options);\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", [obj], {\n ...options,\n root: false,\n target: schema.getComputedType()\n });\n }\n obj = execMapper(\"generics\", [obj], {\n ...options,\n root: false\n });\n if (schema.has(options.specType)) {\n obj = {\n ...obj,\n ...schema.get(options.specType).toJSON(options)\n };\n }\n obj = execMapper(\"required\", [obj, schema], options);\n obj = execMapper(\"nullable\", [obj, schema], options);\n obj = alterOneOf(obj, schema, options);\n obj = execMapper(\"enums\", [obj, schema], options);\n obj = execMapper(\"discriminatorMapping\", [obj, schema], options);\n return obj;\n}\nexport function schemaMapper(schema, opts) {\n const { options, addDef } = mapOptions(opts);\n const obj = serializeSchema(schema, options);\n if (addDef && Object.keys(getValue(options, \"components.schemas\", {})).length) {\n obj.definitions = options.components.schemas;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { enumsMapper } from \"../default/enumsMapper.js\";\nexport function wrapEnumsMapper(obj, schema, options) {\n obj = enumsMapper(obj, schema, options);\n if (obj.const) {\n obj.enum = [obj.const];\n delete obj.const;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.ASYNCAPI);\n","import { getValue, uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n options = {\n ...options,\n specType: SpecTypes.OPENAPI\n };\n const specJson = {\n paths: execMapper(\"paths\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n specJson.components = {\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapperOpenApi(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (obj.$ref) {\n return cleanObject({\n ...obj,\n ...(obj.$ref && {\n anyOf: [\n {\n $ref: obj.$ref\n }\n ],\n type: undefined\n }),\n nullable: true,\n $ref: undefined\n });\n }\n return cleanObject({\n ...obj,\n ...(obj.anyOf?.length === 1\n ? {\n ...obj.anyOf[0],\n anyOf: undefined,\n type: Number.isInteger(obj.multipleOf) ? \"integer\" : obj.anyOf[0]?.type\n }\n : {\n type: obj.anyOf?.length > 1 ? undefined : obj.type,\n anyOf: obj.anyOf?.map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n })\n }),\n nullable: true\n });\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInFilesMapper(parameter, { jsonSchema }) {\n const schema = {\n type: \"string\",\n format: \"binary\",\n oneOf: undefined\n };\n if (jsonSchema.type === \"array\") {\n jsonSchema.items = cleanObject({\n ...jsonSchema.items,\n ...schema\n });\n parameter.schema = jsonSchema;\n return parameter;\n }\n parameter.schema = cleanObject({\n ...jsonSchema,\n ...schema\n });\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInFiles\", operationInFilesMapper);\n","import { camelCase } from \"change-case\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nexport function operationInParameterMapper(jsonParameter, opts) {\n const options = mapOptions(jsonParameter, opts);\n const schemas = { ...(options.components?.schemas || {}) };\n const { type, schema, ...parameter } = execMapper(\"map\", [jsonParameter], options);\n const jsonSchema = execMapper(\"item\", [jsonParameter.$schema], {\n ...options,\n ...popGenerics(jsonParameter)\n });\n parameter.required = parameter.required || jsonParameter.get(\"in\") === JsonParameterTypes.PATH;\n const paramOpts = {\n ...options,\n jsonSchema,\n jsonParameter,\n oldSchemas: schemas\n };\n const mapperName = camelCase(`operationIn ${jsonParameter.get(\"in\")}`);\n if (hasMapper(mapperName)) {\n return execMapper(mapperName, [parameter], paramOpts);\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInParameter\", operationInParameterMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInParametersMapper(parameters, options) {\n return parameters.flatMap((parameter) => execMapper(\"operationInParameter\", [parameter], options)).filter(Boolean);\n}\nregisterJsonSchemaMapper(\"operationInParameters\", operationInParametersMapper);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { createRefName } from \"../../utils/ref.js\";\nfunction buildExamples(property, examples) {\n if (!examples) {\n return undefined;\n }\n let hasKey = false;\n const newExamples = Object.entries(examples).reduce((acc, [key, { value, description, ...props }]) => {\n if (value[property] === undefined) {\n return acc;\n }\n hasKey = true;\n return {\n ...acc,\n [key]: {\n ...props,\n value: value[property],\n description\n }\n };\n }, {});\n return hasKey ? newExamples : undefined;\n}\nfunction inlineReference(parameter, { jsonParameter, ...options }) {\n const name = createRefName(jsonParameter.$schema.getName(), options);\n const schema = options.components?.schemas?.[name];\n if (schema && !options.oldSchemas?.[name]) {\n delete options.components.schemas[jsonParameter.$schema.getName()];\n }\n return Object.entries(schema?.properties || {}).reduce((params, [key, { description, ...prop }]) => {\n return [\n ...params,\n cleanObject({\n ...parameter,\n name: key,\n required: (schema?.required || []).includes(key),\n description,\n schema: prop,\n style: prop.$ref ? \"deepObject\" : undefined,\n examples: buildExamples(key, parameter.examples)\n })\n ];\n }, []);\n}\nexport function operationInQueryMapper(parameter, { jsonSchema, jsonParameters, ...options }) {\n if (jsonSchema.$ref) {\n if (!parameter.name) {\n return inlineReference(parameter, options);\n }\n parameter.style = \"deepObject\";\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInQuery\", operationInQueryMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { discriminatorMappingMapper } from \"../default/discriminatorMappingMapper.js\";\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.ASYNCAPI);\n","import { constantCase } from \"change-case\";\nimport statuses from \"statuses\";\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map, code) => {\n const message = String(statuses(code));\n return {\n ...map,\n [String(code)]: { label: message, code: constantCase(message) }\n };\n}, {});\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\nexport function getStatusConstant(status) {\n return HTTP_STATUS_MESSAGES[status]?.code;\n}\nexport function getStatusMessage(status) {\n return HTTP_STATUS_MESSAGES[status]?.label;\n}\n","import { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction extractParameters(jsonOperation, options) {\n return jsonOperation\n .get(\"parameters\")\n .filter((parameter) => isParameterType(parameter.get(\"in\")))\n .reduce((inputs, parameter) => {\n const [parameters, bodyParameters] = inputs;\n if ([JsonParameterTypes.BODY, JsonParameterTypes.FILES].includes(parameter.get(\"in\"))) {\n return [parameters, [...bodyParameters, parameter]];\n }\n return [[...parameters, parameter], bodyParameters];\n }, [[], []]);\n}\nexport function operationMapper(jsonOperation, { tags = [], defaultTags = [], ...options } = {}) {\n const { consumes, produces, ...operation } = execMapper(\"map\", [jsonOperation], { ...options, ignore: [\"parameters\"] });\n if (operation.security) {\n operation.security = [].concat(operation.security);\n }\n if (jsonOperation.get(\"responses\").size === 0) {\n operation.responses = {\n \"200\": {\n description: getStatusMessage(200)\n }\n };\n }\n const parametersOptions = {\n ...options,\n consumes: jsonOperation.get(\"consumes\")?.length ? jsonOperation.get(\"consumes\") : [\"application/json\"]\n };\n const [parameters, bodyParameters] = extractParameters(jsonOperation, parametersOptions);\n operation.parameters = execMapper(\"operationInParameters\", [parameters], options);\n if (bodyParameters.length) {\n operation.requestBody = execMapper(\"operationRequestBody\", [bodyParameters], parametersOptions);\n }\n const operationTags = operation.tags?.length ? operation.tags : defaultTags;\n if (operationTags.length) {\n operation.tags = operationTags.map(({ name }) => name);\n }\n tags.push(...operationTags);\n return operation;\n}\nregisterJsonSchemaMapper(\"operation\", operationMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationMediaMapper(jsonMedia, options) {\n let groups = [...(jsonMedia.groups || [])];\n return execMapper(\"map\", [jsonMedia], { ...options, groups, groupsName: jsonMedia.groupsName });\n}\nregisterJsonSchemaMapper(\"operationMedia\", operationMediaMapper);\n","import { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nexport class JsonRequestBody extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationRequestBody\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content));\n return this;\n }\n addContent(mediaType, schema, examples) {\n const content = this.get(\"content\");\n const mediaContent = new JsonMap();\n mediaContent.set(\"schema\", schema);\n examples && mediaContent.set(\"examples\", examples);\n content.set(mediaType, mediaContent);\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n}\n","import { JsonRequestBody } from \"../../domain/JsonRequestBody.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction buildSchemaFromBodyParameters(parameters, options) {\n let schema = new JsonSchema();\n const props = {};\n const refs = [];\n let propsLength = 0;\n const hasFile = parameters.some((param) => param.get(\"in\") === \"files\");\n parameters.forEach((parameter) => {\n const name = parameter.getName();\n [...parameter.entries()]\n .filter(([key]) => ![\"in\", \"name\"].includes(key))\n .forEach(([key, value]) => {\n if (props[key] === undefined) {\n props[key] = value;\n }\n });\n const jsonParameter = execMapper(\"operationInParameter\", [parameter], options);\n if (name) {\n const propSchema = {\n ...(jsonParameter.schema || {\n type: jsonParameter.type\n })\n };\n if (hasFile && jsonParameter.description) {\n propSchema.description = jsonParameter.description;\n }\n schema.addProperty(name, propSchema);\n if (parameter.get(\"required\")) {\n schema.addRequired(name);\n }\n propsLength++;\n }\n else {\n refs.push(jsonParameter);\n }\n });\n if (!propsLength) {\n if (refs.length === 1) {\n return refs[0];\n }\n }\n schema.type(\"object\");\n if (props.description && hasFile) {\n delete props.description;\n }\n return {\n schema: schema.toJSON(options),\n required: false,\n ...props\n };\n}\nexport function operationRequestBodyMapper(bodyParameters, { consumes, ...options }) {\n const { schema, examples, in: _, ...props } = buildSchemaFromBodyParameters(bodyParameters, options);\n const requestBody = new JsonRequestBody(props);\n consumes.forEach((consume) => {\n requestBody.addContent(consume, schema, examples);\n });\n return execMapper(\"map\", [requestBody], options);\n}\nregisterJsonSchemaMapper(\"operationRequestBody\", operationRequestBodyMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationResponseMapper(jsonResponse, options = {}) {\n const response = execMapper(\"map\", [jsonResponse], options);\n if (jsonResponse.status === 204) {\n delete response.content;\n }\n if (response.headers) {\n Object.entries(response.headers).forEach(([key, { type, ...props }]) => {\n response.headers[key] = {\n ...props,\n schema: {\n type\n }\n };\n });\n }\n return response;\n}\nregisterJsonSchemaMapper(\"operationResponse\", operationResponseMapper);\n","/**\n * @ignore\n */\nexport function concatParameters(parameters, operation) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p) => p.in === param.in && p.name === param.name);\n return f || param;\n })\n .concat(...operation.parameters.filter((param) => param.in !== \"path\"));\n}\n","/**\n * @ignore\n */\nfunction getVariable(subpath) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\nfunction parseUrl(key) {\n let inCapture = 0;\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n const result = inCapture === 0;\n if (c === \")\") {\n inCapture--;\n }\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base, path = \"\") {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n const params = [];\n const paths = [];\n let isOptional = false;\n let current = \"\";\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n const { prefix, name, postfix } = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n }\n else {\n current += `/${key}`;\n }\n });\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params)\n }\n ];\n}\n","import { camelCase } from \"change-case\";\nconst DEFAULT_PATTERN = \"%c.%m\";\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern = \"\") {\n const OPERATION_IDS = new Map();\n const transform = (name, propertyKey) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n return (name, propertyKey, path = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return operationId;\n }\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return camelCase(`${operationId} By ${result}`);\n }\n }\n const id = OPERATION_IDS.get(operationKey) + 1;\n OPERATION_IDS.set(operationKey, id);\n return `${operationId}_${id}`;\n };\n}\nexport function getOperationId(path, { store, operationIdFormatter }) {\n return operationIdFormatter(store.parent.schema.get(\"name\") || store.parent.targetName, store.propertyName, path);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { concatParameters } from \"../../utils/concatParameters.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getJsonPathParameters } from \"../../utils/getJsonPathParameters.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { getOperationId } from \"../../utils/operationIdFormatter.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.OPTIONS,\n OperationVerbs.DELETE,\n OperationVerbs.TRACE\n];\nfunction pushToPath(paths, { path, method, operation }) {\n return {\n ...paths,\n [path]: {\n ...paths[path],\n [method.toLowerCase()]: operation\n }\n };\n}\nfunction mapOperationInPathParameters(options) {\n return ({ operationPath, operation, operationStore }) => {\n const { path, method } = operationPath;\n return getJsonPathParameters(options.ctrlRootPath, path).map(({ path, parameters }) => {\n path = path ? path : \"/\";\n parameters = concatParameters(parameters.map(({ type, ...param }) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n }), operation);\n return {\n operation: {\n ...operation,\n parameters,\n operationId: operation.operationId ||\n getOperationId(path, {\n ...options,\n store: operationStore\n })\n },\n method,\n path\n };\n });\n };\n}\nfunction mapOperation(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n const operation = execMapper(\"operation\", [operationStore.operation], options);\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operation,\n operationStore\n };\n });\n };\n}\nexport function pathsMapper(model, { paths, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .filter((operationStore) => operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS).length > 0)\n .flatMap(mapOperation(options))\n .flatMap(mapOperationInPathParameters(options))\n .reduce(pushToPath, paths);\n}\nregisterJsonSchemaMapper(\"paths\", pathsMapper);\n","import { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn(fn) {\n return (...parameters) => {\n const result = fn(getJsonEntityStore(...parameters), parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n","import { Store } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children) {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n","import { snakeCase } from \"change-case\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value, ...values) {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type, collectionType) {\n if (!type) {\n throw new Error(\"A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.\");\n }\n const schema = {};\n let contains = false;\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n store.type = type;\n store.itemSchema.type(type);\n store.schema.assign(schema);\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n decorator.MinItems = (minItems) => {\n schema.minItems = minItems;\n return decorator;\n };\n decorator.MaxItems = (maxItems) => {\n schema.maxItems = maxItems;\n return decorator;\n };\n decorator.MinProperties = (minProperties) => {\n schema.minProperties = minProperties;\n return decorator;\n };\n decorator.MaxProperties = (maxProperties) => {\n schema.maxProperties = maxProperties;\n return decorator;\n };\n decorator.Contains = () => {\n contains = true;\n return decorator;\n };\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n return decorator;\n };\n return decorator;\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type) {\n return CollectionOf(type, Array);\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type) {\n return CollectionOf(type, Map);\n}\n","import { CollectionOf } from \"./collectionOf.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type) {\n return CollectionOf(type).Contains();\n}\n","import { deepMerge, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../decorators/common/jsonEntityFn.js\";\nexport function withErrorMsg(errorKey, originalDecorator) {\n const schema = {};\n return ((...decoratorOptions) => {\n const decorator = useDecorators(originalDecorator(...decoratorOptions));\n decorator.Error = (message) => {\n schema.message = message;\n return useDecorators(decorator, schema.message &&\n JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n if (errorKey === \"required\") {\n store.parentSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: {\n [store.propertyName]: message\n }\n }));\n }\n else {\n store.itemSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: message\n }));\n }\n }));\n };\n return decorator;\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxItems = withErrorMsg(\"maxItems\", (maxItems) => {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxProperties = withErrorMsg(\"maxProperties\", (maxProperties) => {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinItems = withErrorMsg(\"minItems\", (minItems) => {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinProperties = withErrorMsg(\"minProperties\", (minProperties) => {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const UniqueItems = withErrorMsg(\"uniqueItems\", (uniqueItems = true) => {\n return JsonEntityFn((store) => {\n store.schema.uniqueItems(uniqueItems);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n","import { isArrowFn, isClass } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type) || isArrowFn(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n","import { DecoratorTypes, isClass, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values) {\n const model = values.find((item) => isClass(item));\n return useDecorators(model && Property(model), JsonEntityFn((store, args) => {\n if (store.decoratorType === DecoratorTypes.PARAM) {\n store.required = true;\n }\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n store.schema.allow(...values);\n }));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key, value) {\n return JsonEntityFn((store) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj) {\n return JsonEntityFn((store) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an error message to the property.\n * @decorator\n * @ajv\n */\nexport function ErrorMsg(obj) {\n return JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n store.parentSchema.customKey(\"errorMessage\", { ...errorMessage, ...obj });\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\n/**\n * Set default error message.\n *\n * ## Example\n *\n * ```typescript\n * @DefaultMsg(\"foo should be a string\")\n * class Model {\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": \"number\"\n * }\n * \"errorMessage\": {\n * \"_\": \"foo should be a string\"\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function DefaultMsg(message) {\n return useDecorators(ErrorMsg({ _: message }));\n}\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.description(description);\n break;\n case DecoratorTypes.METHOD:\n store.operation?.description(description);\n break;\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\nexport function DiscriminatorKey() {\n return useDecorators(Property(), JsonEntityFn((store) => {\n store.discriminatorKey();\n }));\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nfunction EnumFn(enumValue, ...enumValues) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n/**\n * The enum keyword is used to restrict a value to a fixed set of values.\n * It must be an array with at least one element, where each element is unique.\n *\n * Elements in the array might be of any value, including null.\n *\n * ::: warning\n * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: \"value1\" | \"value2\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: (\"value1\" | \"value2\")[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * }\n * ```\n *\n * ### With Typescript Enum\n *\n * ```typescript\n * enum SomeEnum {\n * ENUM_1 = \"enum1\",\n * ENUM_2 = \"enum2\"\n * }\n *\n * class Model {\n * @Enum(SomeEnum)\n * property: SomeEnum;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"enum1\", \"enum2\"]\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} enumValue\n * @param enumValues\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Enum = withErrorMsg(\"enum\", EnumFn);\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples) {\n return JsonEntityFn((store) => {\n store.schema.examples(examples);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples) {\n return JsonEntityFn((store) => {\n store.parameter.examples(examples);\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Maximum } from \"./maximum.js\";\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMaximum = withErrorMsg(\"exclusiveMaximum\", (maximum, exclusiveMaximum = true) => {\n return Maximum(maximum, exclusiveMaximum);\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Minimum = withErrorMsg(\"minimum\", (minimum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n});\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Min = Minimum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Minimum } from \"./minimum.js\";\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum, exclusiveMinimum = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n","export var JsonFormatTypes;\n(function (JsonFormatTypes) {\n JsonFormatTypes[\"DATE_TIME\"] = \"date-time\";\n JsonFormatTypes[\"DATE\"] = \"date\";\n JsonFormatTypes[\"TIME\"] = \"time\";\n JsonFormatTypes[\"EMAIL\"] = \"email\";\n JsonFormatTypes[\"HOSTNAME\"] = \"hostname\";\n JsonFormatTypes[\"IPV4\"] = \"ipv4\";\n JsonFormatTypes[\"IPV6\"] = \"ipv6\";\n JsonFormatTypes[\"URI\"] = \"uri\";\n JsonFormatTypes[\"URL\"] = \"url\";\n JsonFormatTypes[\"URI_REF\"] = \"uri-reference\";\n JsonFormatTypes[\"URI_TEMPLATE\"] = \"uri-template\";\n JsonFormatTypes[\"JSON_POINTER\"] = \"json-pointer\";\n JsonFormatTypes[\"RELATIVE_JSON_POINTER\"] = \"relative-json-pointer\";\n JsonFormatTypes[\"UUID\"] = \"uuid\";\n JsonFormatTypes[\"REGEX\"] = \"regex\";\n})(JsonFormatTypes || (JsonFormatTypes = {}));\n","import { JsonFormatTypes } from \"../../domain/JsonFormatTypes.js\";\nimport { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true) {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n","import picomatch from \"picomatch\";\nfunction micromatch(list, patterns) {\n patterns = [].concat(patterns);\n list = [].concat(list);\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n let onResult = (state) => {\n items.add(state.output);\n };\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) {\n negatives++;\n }\n for (let item of list) {\n let matched = isMatch(item, true);\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match)\n continue;\n if (negated) {\n omit.add(matched.output);\n }\n else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n/**\n * @ignore\n */\nexport function matchGroups(groups, compareWith = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n if (groupsIncludes.length) {\n return !micromatch(groups.filter((group) => !group.startsWith(\"!\")), compareWith);\n }\n return false;\n}\n","import { DecoratorTypes, isArray } from \"@tsed/core\";\nimport { matchGroups } from \"../../utils/matchGroups.js\";\nimport { CustomKey } from \"./customKey.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * @ignore\n */\nfunction groupsClass(groups, entity) {\n const entries = Object.entries(groups[0]);\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator = Groups(...groups);\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\nexport function Groups(...groups) {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity);\n break;\n case DecoratorTypes.PROP:\n CustomKey(\"x-groups\", groups)(entity.target, entity.propertyKey);\n entity.schema.$hooks.on(\"groups\", (prev, givenGroups) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n entity.parameter.groups = groups;\n entity.parameter.groupsName = groupsName;\n break;\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.endpoint)\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Controller, BodyParams} from \"@tsed/platform-http\";\n * import {Post} from \"@tsed/schema\";\n * import {Person} from \"../models/Person.js\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @deprecated Since v7. Use @Groups decorator instead of and enable `jsonMapper.strictGroups` in your configuration.\n */\nexport function Ignore(cb = true) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Use label to create ref on the current decorated property.\n *\n * ### Example\n *\n * ```ts\n * class Model {\n * // For single property\n * @LabelledAs(\"UserSchema\")\n * name: string;\n *\n * // For collection\n * @LabelledAs(\"UserCollectionSchema\", \"collection\")\n * users: User[];\n * }\n * ```\n *\n * @param label The name of the label\n * @param includeCollection Add the label to the collection. By default, the label is added to the item of the collection it the property is a collection.\n * @returns PropertyDecorator\n *\n * @decorator\n */\nexport function LabelledAs(label, includeCollection = false) {\n return JsonEntityFn((entity) => {\n if (includeCollection) {\n entity.schema.label(label);\n }\n else {\n entity.itemSchema.label(label);\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MinLength = withErrorMsg(\"minLength\", (minLength) => {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MultipleOf = withErrorMsg(\"multipleOf\", (multipleOf) => {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n});\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { Any } from \"./any.js\";\nimport { Property } from \"./property.js\";\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type, ...types) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Pattern = withErrorMsg(\"pattern\", (pattern) => {\n return JsonEntityFn((store) => {\n store.itemSchema.pattern(pattern);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema) {\n return JsonEntityFn((entity) => {\n entity.schema.assign(partialSchema);\n });\n}\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType, schema) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n","import { Schema } from \"./schema.js\";\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model, ...keys) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Allow } from \"./allow.js\";\nimport { Optional } from \"./optional.js\";\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Required = withErrorMsg(\"required\", (required = true, ...allowedRequiredValues) => {\n return required ? Allow(...allowedRequiredValues) : Optional();\n});\n","import { matchGroups } from \"../../utils/matchGroups.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups) {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required, givenGroups) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key) => key !== entity.propertyKey);\n }\n return required;\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function TypeError(msg) {\n return JsonEntityFn(() => useDecorators(ErrorMsg({ type: msg })));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n","import { isClass } from \"@tsed/core\";\nimport { JsonSchema } from \"../domain/JsonSchema.js\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore.js\";\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type = Object) {\n if (isClass(type)) {\n const { schema } = getJsonEntityStore(type);\n schema.properties = function properties(obj) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n return this;\n };\n return schema;\n }\n return JsonSchema.from({ type });\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new string model.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function string() {\n return from(String);\n}\n","import { isObject } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { string } from \"../../fn/string.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics) {\n const nestedGenerics = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n decorator.Nested = (...generics) => {\n nestedGenerics.push(generics);\n return decorator;\n };\n return decorator;\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics) {\n return (target) => {\n const storedSchema = JsonEntityStore.from(target);\n storedSchema.schema.genericLabels = generics;\n };\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n","import { StoreSet, useDecorators } from \"@tsed/core\";\nimport { Produces } from \"./produces.js\";\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes) {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\n/**\n * @ignore\n */\nexport class DecoratorContext extends Map {\n constructor(opts = {}) {\n super();\n this.actions = [];\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n addAction(cb) {\n this.actions.push(cb);\n return this;\n }\n build() {\n const decorator = (...args) => this.bind(args, decorator);\n const wrap = (cb) => {\n return (...args) => {\n cb(...args);\n return decorator;\n };\n };\n const wrapKey = (key) => {\n return wrap((...values) => {\n key in this ? this[key](...values) : this.set(key, values[0]);\n });\n };\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n return decorator;\n }\n toObject() {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n getMergedKey(key, defaultValue) {\n let value = this.get(key) || defaultValue;\n if (!value) {\n return;\n }\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n bind(args, decorator) {\n this.entity = JsonEntityStore.from(...args);\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n onInit(args, decorator) {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n onMapKey(key, value) {\n this.entity.set(key, value);\n }\n runActions() {\n this.actions.forEach((action) => {\n action(this);\n });\n return this;\n }\n beforeInit() { }\n afterInit() { }\n}\n","const statusesModel = new Map();\nexport function defineStatusModel(status, model) {\n statusesModel.set(status, model);\n}\nexport function getStatusModel(status) {\n return statusesModel.get(status);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, isArray, isCollection, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, isString } from \"@tsed/core\";\nimport { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { string } from \"../../fn/string.js\";\nimport { getStatusModel } from \"../../utils/defineStatusModel.js\";\nimport { isSuccessStatus } from \"../../utils/isSuccessStatus.js\";\nimport { mapHeaders } from \"../../utils/mapHeaders.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\nfunction mapGenerics(types) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext {\n constructor({ status, model }) {\n super();\n this.methods = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\",\n \"binary\"\n ];\n this.model(model);\n this.status(status);\n }\n type(model) {\n return this.model(model);\n }\n model(model) {\n model && this.set(\"model\", model);\n return this;\n }\n status(status) {\n this.set(\"status\", status);\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n return this;\n }\n headers(headers) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n return this;\n }\n header(key, value) {\n if (value === undefined && isString(key)) {\n return this.headers({ [key]: { type: \"string\" } });\n }\n return this.headers({ [key]: value });\n }\n location(path, meta = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n return this;\n }\n groups(...groups) {\n if (groups.length === 2 && isArray(groups[1])) {\n this.set(\"groupsName\", groups[0]);\n this.set(\"groups\", groups[1]);\n }\n else {\n this.set(\"groups\", groups);\n }\n return this;\n }\n allowedGroups(...allowedGroups) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n nested(...generics) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n this.addAction((ctx) => {\n this.get(\"schema\").nestedGenerics.push(mapGenerics(generics));\n });\n return this;\n }\n of(...types) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema?.itemSchema({ type: types[0] });\n }\n else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n return this;\n }\n ofInteger() {\n return this.of(\"integer\");\n }\n oneOf(...types) {\n return this.manyOf(\"oneOf\", types);\n }\n allOf(...types) {\n return this.manyOf(\"allOf\", types);\n }\n anyOf(...types) {\n return this.manyOf(\"anyOf\", types);\n }\n schema(partial) {\n this.addAction(() => {\n const schema = this.get(\"schema\");\n schema.assign(partial);\n });\n return this;\n }\n examples(examples) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n title(title) {\n return this.schema({ title });\n }\n binary() {\n this.type(String);\n this.set(\"contentType\", \"application/octet-stream\");\n this.schema({ format: \"binary\" });\n return this;\n }\n checkPrimitive(model) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n checkCollection(model) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n if ((model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) || this.hasOfTypes) {\n contentType = contentType || \"application/json\";\n }\n return contentType;\n }\n getStatus() {\n return this.get(\"status\") || \"default\";\n }\n onInit(args, decorator) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n map() {\n const model = this.get(\"model\");\n const { entity, decoratorType } = this;\n const operation = this.entity.operation;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n let { description = response.get(\"description\") } = this.toObject();\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n if (headers) {\n response.headers(headers);\n }\n this.mapMedia(response);\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n // run additional actions\n return this.runActions();\n }\n mapMedia(response) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({ type: model });\n const groups = this.get(\"groups\");\n const groupsName = this.get(\"groupsName\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation;\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({ type })));\n }\n else {\n schema.type(model);\n }\n }\n this.set(\"schema\", schema);\n media.schema(schema);\n media.groups = groups;\n media.groupsName = groupsName;\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n }));\n operation.addParameter(-1, jsonParameter);\n }\n const examples = this.get(\"examples\");\n if (examples) {\n media.examples(examples);\n }\n return media;\n }\n manyOf(kind, types) {\n const model = this.get(\"model\");\n this.hasOfTypes = true;\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema.type(model || Object);\n schema.itemSchema().set(kind, types);\n }\n else {\n schema.set(kind, types);\n }\n });\n return this;\n }\n}\nexport function Returns(status, model) {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n return context.build();\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type) {\n return Returns().ContentType(type);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n store.parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n store.schema.set(\"deprecated\", deprecated);\n break;\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n","import { isString } from \"@tsed/core\";\nimport { Returns } from \"./returns.js\";\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers, value) {\n if (value !== undefined) {\n headers = { [headers]: value };\n }\n if (value === undefined && isString(headers)) {\n headers = { [headers]: { type: \"string\" } };\n }\n return Returns().Headers(headers);\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType) {\n const jsonParameter = new JsonParameter();\n const schema = {};\n const decorator = (target, propertyKey, index) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n store.operation.addParameter(-1, jsonParameter);\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n decorator.Type = (type) => {\n schema.type = type;\n return decorator;\n };\n decorator.Name = (name) => {\n jsonParameter.name(name);\n return decorator;\n };\n decorator.Description = (description) => {\n jsonParameter.description(description);\n return decorator;\n };\n decorator.Required = (required = true) => {\n jsonParameter.required(required);\n return decorator;\n };\n decorator.Pattern = (pattern) => {\n return decorator.Schema({ pattern: pattern.toString() });\n };\n decorator.Schema = (_schema) => {\n Object.assign(schema, _schema.toJSON ? _schema.toJSON() : _schema);\n return decorator;\n };\n return decorator;\n}\n","import { Metadata, useDecorators, useMethodDecorators } from \"@tsed/core\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { Name } from \"../common/name.js\";\nimport { Consumes } from \"./consumes.js\";\nimport { In } from \"./in.js\";\nimport { Returns } from \"./returns.js\";\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name) {\n return (...args) => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index] === Array;\n name = (typeof name === \"object\" ? undefined : name);\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n const decorators = useDecorators(In(JsonParameterTypes.FILES), Name(expression), useMethodDecorators(Returns(400).Description(`<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1`), Consumes(\"multipart/form-data\")));\n decorators(...args);\n };\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location, meta) {\n return Returns().Location(location, meta);\n}\n","import { OperationVerbs } from \"../constants/OperationVerbs.js\";\nconst ALLOWED_VERBS = new Set([\n ...Object.keys(OperationVerbs)\n .filter((v) => v !== OperationVerbs.CUSTOM)\n .map((v) => v.toLowerCase())\n]);\nexport function mapOperationOptions(args) {\n let method = undefined;\n let path = undefined;\n const handlers = args.filter((arg) => {\n if (typeof arg === \"string\" && ALLOWED_VERBS.has(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n return false;\n }\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n return false;\n }\n return !!arg;\n });\n return {\n path,\n method,\n use: handlers\n };\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { mapOperationOptions } from \"../../utils/mapOperationOptions.js\";\nclass OperationDecoratorContext extends DecoratorContext {\n constructor() {\n super(...arguments);\n this.methods = [\"name\", \"description\", \"summary\", \"method\", \"id\", \"use\", \"useAfter\", \"useBefore\"];\n }\n beforeInit() {\n const path = this.get(\"path\");\n const method = OperationVerbs[this.get(\"method\")] || OperationVerbs.CUSTOM;\n path && this.entity.operation.addOperationPath(method, path);\n }\n onMapKey(key, value) {\n switch (key) {\n case \"name\":\n case \"id\":\n this.entity.operation.operationId(value);\n return;\n case \"summary\":\n this.entity.operation.summary(value);\n return;\n case \"description\":\n this.entity.operation.description(value);\n return;\n case \"use\":\n this.entity.use(value);\n return;\n case \"useAfter\":\n this.entity.after(value);\n return;\n case \"useBefore\":\n this.entity.before(value);\n return;\n }\n return super.onMapKey(key, value);\n }\n}\nexport function Operation(...args) {\n const routeOptions = mapOperationOptions(args);\n const context = new OperationDecoratorContext(routeOptions);\n return context.build();\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n store.operation.operationId(operationId);\n });\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use theses decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method, path = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n store.operation.addOperationPath(method.toUpperCase(), path);\n });\n}\n","import { Groups } from \"../common/groups.js\";\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial() {\n return Groups(\"partial\");\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n store.path = path;\n });\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Publish(event) {\n return Operation(OperationVerbs.PUBLISH, event);\n}\n","import { isNumber, isString, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nimport { Returns } from \"./returns.js\";\nexport function Redirect(...args) {\n const { status, url, meta } = args.reduce((options, value) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n if (isString(value)) {\n options.url = value;\n return options;\n }\n options.meta = value;\n return options;\n }, { status: 302, url: \"\", meta: {} });\n return useDecorators(Returns(status).Location(url, meta), JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n }));\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function All(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.ALL, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Get(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.GET, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Post(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.POST, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Put(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PUT, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Delete(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.DELETE, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Head(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.HEAD, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Patch(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PATCH, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Options(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.OPTIONS, path].concat(args));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nexport function Security(nameOrSecurity, ...scopes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n if (Array.isArray(nameOrSecurity)) {\n store.operation.security(nameOrSecurity);\n }\n else {\n store.operation.addSecurityScopes(nameOrSecurity, scopes);\n }\n break;\n case DecoratorTypes.CLASS:\n if (Array.isArray(nameOrSecurity)) {\n decorateMethodsOf(args[0], Security(nameOrSecurity));\n }\n else {\n decorateMethodsOf(args[0], Security(nameOrSecurity, ...scopes));\n }\n break;\n default:\n throw new UnsupportedDecoratorType(Security, args);\n }\n });\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v6 API introducing the chaining decorator concept.\n * Now a decorator like Returns can be used with another decorators like Description.\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Status(404, String).Description(\"Not Found\")\n * @Status(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ### Declaring a generic model\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Status(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Post, Generics, Property, Returns} from \"@tsed/schema\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Status(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Status(status, model) {\n return Returns(status, model);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Subscribe(event) {\n return Operation(OperationVerbs.SUBSCRIBE, event);\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add summary metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Summary(\"summary\")\n * id: string;\n * }\n * ```\n *\n * @param summary\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Summary(summary) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(Summary, args);\n }\n store.operation.summary(summary);\n });\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nfunction mapTags(tags) {\n return tags.map((tag) => {\n if (typeof tag === \"string\") {\n return {\n name: tag\n };\n }\n return tag;\n });\n}\n/**\n * Add tags metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Tags(\"api\")\n * get() {}\n * }\n * ```\n *\n * @param tags\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Tags(...tags) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.addTags(mapTags(tags));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Tags(...tags));\n break;\n default:\n throw new UnsupportedDecoratorType(Tags, args);\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n */\nexport function View(path, options) {\n return StoreSet(\"view\", { path, options });\n}\n","export function concatPath(basePath, path) {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n if (!path) {\n return basePath;\n }\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n const result = (basePath || \"\") + (path || \"\");\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n","import { concatPath } from \"../utils/concatPath.js\";\nexport class JsonOperationRoute {\n constructor(options) {\n Object.assign(this, options);\n this.paramsTypes = this.endpoint.getParamTypes();\n }\n get url() {\n return this.fullPath;\n }\n get path() {\n return this.operationPath?.path;\n }\n get fullPath() {\n return concatPath(this.basePath, this.path);\n }\n get method() {\n return this.operationPath?.method || \"USE\";\n }\n get name() {\n return `${this.endpoint.targetName}.${this.methodClassName}()`;\n }\n get className() {\n return this.endpoint.targetName;\n }\n get methodClassName() {\n return this.propertyKey;\n }\n get parameters() {\n return this.endpoint.parameters;\n }\n get propertyKey() {\n return String(this.endpoint.propertyKey);\n }\n get propertyName() {\n return this.endpoint.propertyName;\n }\n get store() {\n return this.endpoint.store;\n }\n get operation() {\n return this.endpoint.operation;\n }\n get operationId() {\n return this.operation.get(\"operationId\") || this.endpoint.propertyKey;\n }\n has(key) {\n return this.paramsTypes[key];\n }\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\nexport function allOf(...allOf) {\n return from().allOf(allOf);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function any(...types) {\n return from().any(...types);\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\nexport function anyOf(...anyOf) {\n return from().anyOf(anyOf);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function boolean() {\n return from(Boolean);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array() {\n return from(Array);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map() {\n return from(Map).unknown(true);\n}\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function set() {\n return from(Array).uniqueItems(true);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: date`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function date() {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n/**\n * Declare a new string model with `format: datetime`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function datetime() {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n/**\n * Declare a new string model with `format: time`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function time() {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: email`.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const schema = email();\n * // Results in: { type: \"string\", format: \"email\" }\n * ```\n */\nexport function email() {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n","import { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { string } from \"./string.js\";\nexport function enums(e) {\n const schema = string().enum(e);\n enumsRegistry.set(e, schema);\n return schema;\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new integer model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * @returns {JsonSchema} A schema configured for integer values\n * @function\n */\nexport function integer() {\n return from(Number).integer();\n}\n","import { JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonLazyRef } from \"../domain/JsonLazyRef.js\";\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n */\nexport function lazyRef(cb) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema;\n }\n }\n catch (er) { }\n return new JsonLazyRef(cb);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function number() {\n return from(Number);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new object model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const userSchema = object({\n * name: string(),\n * age: number()\n * });\n * ```\n *\n * @param properties - An object containing property definitions where each value is a JsonSchema\n * @returns {JsonSchema} A new object model with the specified properties\n */\nexport function object(properties = {}) {\n return from(Object).properties(properties);\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf) {\n return from().oneOf(oneOf);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri() {\n return from(String).format(JsonFormatTypes.URI);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: url`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function url() {\n return from(String).format(JsonFormatTypes.URL);\n}\n","import { deepMerge, mergeReducerBuilder } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder((current, value) => {\n if (current.type && current.type && current.type === value.type && value.type === \"array\") {\n return JSON.stringify(current.items) === JSON.stringify(value.items);\n }\n return (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref);\n});\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec(spec, input) {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n","import { cleanObject, isArray } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { operationIdFormatter } from \"./operationIdFormatter.js\";\n/**\n * @ignore\n */\nconst caches = new Map();\n/**\n * @ignore\n */\nfunction get(model, options, cb) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n const cache = caches.get(model);\n const key = JSON.stringify(options);\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n return cache.get(key);\n}\nfunction generate(model, options) {\n const store = getJsonEntityStore(model);\n const { rootPath = \"/\" } = options;\n options = {\n ...options,\n rootPath,\n defaultTags: [\n cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n })\n ]\n };\n return execMapper(\"generate\", [store], options);\n}\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model, options = {}) {\n options = {\n specType: SpecTypes.OPENAPI,\n ...options,\n tags: [],\n paths: {},\n channels: {},\n components: {},\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n if (isArray(model)) {\n let finalSpec = {};\n options = {\n ...options,\n append(spec) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n model.forEach(({ token, ...opts }) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n options.append(spec);\n });\n return finalSpec;\n }\n return get(model, options, () => generate(model, options));\n}\n","import { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * @ignore\n * @param version\n */\nexport function getSpecType(version) {\n return version.startsWith(\"3.\") ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n/**\n * @ignore\n * @param spec\n */\nexport function getSpecTypeFromSpec(spec) {\n return \"openapi\" in spec ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info) {\n const { title, description, version, termsOfService, contact, license } = info;\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n","import { getValue, uniq } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(spec, { version, specVersion, acceptMimes = [\"application/json\"] }) {\n const { paths, security, tags, host, basePath, schemes, consumes = [], produces = [\"application/json\"], definitions, parameters, responses, securityDefinitions, externalDocs } = spec;\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n","import { getValue } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec, { specVersion }) {\n const { servers, paths, components, security, tags, externalDocs } = spec;\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n","import { getValue, setValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpecType } from \"./getSpecType.js\";\nimport { mapOpenSpec2 } from \"./mapOpenSpec2.js\";\nimport { mapOpenSpec3 } from \"./mapOpenSpec3.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec, { fileSpec, acceptMimes, specVersion, version }) {\n specVersion = specVersion || getValue(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n const options = {\n specVersion,\n acceptMimes\n };\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n spec = mergeSpec(spec, fileSpec);\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n return spec;\n}\n","\"use strict\";\nimport { cleanObject } from \"@tsed/core\";\nconst HTTP_METHODS = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"];\nconst SCHEMA_PROPERTIES = [\n \"format\",\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"minLength\",\n \"maxLength\",\n \"multipleOf\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"minProperties\",\n \"maxProperties\",\n \"additionalProperties\",\n \"pattern\",\n \"enum\",\n \"default\"\n];\nconst ARRAY_PROPERTIES = [\"type\", \"items\"];\nconst APPLICATION_JSON_REGEX = /^(application\\/json|[^;\\/ \\t]+\\/[^;\\/ \\t]+[+]json)[ \\t]*(;.*)?$/;\nconst SUPPORTED_MIME_TYPES = {\n APPLICATION_X_WWW_URLENCODED: \"application/x-www-form-urlencoded\",\n MULTIPART_FORM_DATA: \"multipart/form-data\"\n};\nfunction fixRef(ref) {\n return ref.replace(\"#/components/schemas/\", \"#/definitions/\").replace(\"#/components/\", \"#/x-components/\");\n}\nfunction fixRefs(obj) {\n if (Array.isArray(obj)) {\n obj.forEach(fixRefs);\n }\n else if (typeof obj === \"object\") {\n for (let key in obj) {\n if (key === \"$ref\") {\n obj.$ref = fixRef(obj.$ref);\n }\n else {\n fixRefs(obj[key]);\n }\n }\n }\n}\nfunction isJsonMimeType(type) {\n return new RegExp(APPLICATION_JSON_REGEX, \"i\").test(type);\n}\nfunction getSupportedMimeTypes(content) {\n const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {\n return SUPPORTED_MIME_TYPES[key];\n });\n return Object.keys(content).filter((key) => {\n return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);\n });\n}\nexport function transformSecurity(securitySchemes) {\n function map(security) {\n const { scheme, type, name, bearerFormat, flows, ...props } = security;\n switch (type) {\n case \"http\":\n if (scheme === \"basic\") {\n return {\n ...props,\n type: scheme\n };\n }\n if (scheme === \"bearer\") {\n return {\n ...props,\n type: \"apiKey\",\n name: \"Authorization\",\n in: \"header\"\n };\n }\n break;\n case \"oauth2\":\n const flowName = Object.keys(flows)[0];\n const flow = flows[flowName];\n let flowType = flowName;\n if (flowType === \"clientCredentials\") {\n flowType = \"application\";\n }\n else if (flowType === \"authorizationCode\") {\n flowType = \"accessCode\";\n }\n return {\n type,\n flow: flowType,\n authorizationUrl: flow.authorizationUrl,\n tokenUrl: flow.tokenUrl,\n scopes: flow.scopes\n };\n }\n }\n return Object.entries(securitySchemes).reduce((securityDefinitions, [key, security]) => {\n const securityDefinition = map(security);\n if (securityDefinition) {\n securityDefinitions[key] = securityDefinition;\n }\n return securityDefinitions;\n }, {});\n}\nexport function transformInformation(server) {\n let serverUrl = server.url;\n const variables = server[\"variables\"] || {};\n for (const variable in variables) {\n const variableObject = variables[variable] || {};\n if (variableObject[\"default\"]) {\n const re = RegExp(`{${variable}}`, \"g\");\n serverUrl = serverUrl.replace(re, variableObject[\"default\"]);\n }\n }\n const url = new URL(serverUrl);\n return {\n host: url.host ? url.host : undefined,\n basePath: url.pathname,\n schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined\n };\n}\nexport class Converter {\n constructor(spec) {\n this.spec = JSON.parse(JSON.stringify(spec));\n }\n convertInfos() {\n const server = this.spec.servers && this.spec.servers[0];\n if (server) {\n return transformInformation(server);\n }\n return {};\n }\n resolveReference(base, obj, shouldClone) {\n if (!obj || !obj.$ref) {\n return obj;\n }\n const ref = obj.$ref;\n if (ref.startsWith(\"#\")) {\n const keys = ref.split(\"/\").map((k) => k.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n keys.shift();\n let cur = base;\n keys.forEach((k) => {\n cur = cur[k];\n });\n return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;\n }\n }\n convert() {\n const spec = {\n swagger: \"2.0\",\n ...this.convertInfos(),\n paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined\n };\n if (this.spec.components) {\n this.convertSchemas();\n this.convertSecurityDefinitions();\n this.spec[\"x-components\"] = this.spec.components;\n delete this.spec.components;\n fixRefs(this.spec);\n }\n delete this.spec.servers;\n delete this.spec.openapi;\n delete this.spec[\"x-components\"];\n return cleanObject({\n ...spec,\n ...this.spec\n });\n }\n convertOperations(paths, spec) {\n return Object.entries(paths).reduce((paths, [path, operation]) => {\n const pathObject = (paths[path] = this.resolveReference({ ...spec, paths }, operation, true));\n this.convertParameters(pathObject); // converts common parameters\n Object.keys(pathObject).forEach((method) => {\n if (HTTP_METHODS.indexOf(method) >= 0) {\n const operation = (pathObject[method] = this.resolveReference({ ...spec, paths }, pathObject[method], true));\n this.convertOperationParameters(operation);\n this.convertResponses(operation);\n }\n });\n return paths;\n }, paths);\n }\n convertOperationParameters(operation) {\n let content, contentKey, mediaRanges, mediaTypes;\n operation.parameters = operation.parameters || [];\n if (operation.requestBody) {\n let param = this.resolveReference(this.spec, operation.requestBody, true);\n // fixing external $ref in body\n if (operation.requestBody.content) {\n const type = getSupportedMimeTypes(operation.requestBody.content)[0];\n const structuredObj = { content: {} };\n const data = operation.requestBody.content[type];\n if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith(\"#\")) {\n param = this.resolveReference(this.spec, data.schema, true);\n structuredObj[\"content\"][`${type}`] = { schema: param };\n param = structuredObj;\n }\n }\n param.name = \"body\";\n content = param.content;\n if (content && Object.keys(content).length) {\n mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf(\"/\") > 0);\n mediaTypes = mediaRanges.filter((range) => range.indexOf(\"*\") < 0);\n contentKey = getSupportedMimeTypes(content)[0];\n delete param.content;\n if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {\n operation.consumes = mediaTypes;\n param.in = \"formData\";\n param.schema = content[contentKey].schema;\n param.schema = this.resolveReference(this.spec, param.schema, true);\n if (param.schema.type === \"object\" && param.schema.properties) {\n const required = param.schema.required || [];\n Object.keys(param.schema.properties).forEach((name) => {\n const schema = param.schema.properties[name];\n // readOnly properties should not be sent in requests\n if (!schema.readOnly) {\n const formDataParam = {\n name,\n in: \"formData\",\n schema\n };\n if (required.indexOf(name) >= 0) {\n formDataParam.required = true;\n }\n operation.parameters?.push(formDataParam);\n }\n });\n }\n else {\n operation.parameters.push(param);\n }\n }\n else if (contentKey) {\n operation.consumes = mediaTypes;\n param.in = \"body\";\n param.schema = content[contentKey].schema;\n operation.parameters.push(param);\n }\n else if (mediaRanges) {\n operation.consumes = mediaTypes || [\"application/octet-stream\"];\n param.in = \"body\";\n param.name = param.name || \"file\";\n delete param.type;\n param.schema = content[mediaRanges[0]].schema || {\n type: \"string\",\n format: \"binary\"\n };\n operation.parameters.push(param);\n }\n if (param.schema) {\n this.convertSchema(param.schema, \"request\");\n }\n }\n delete operation.requestBody;\n }\n this.convertParameters(operation);\n }\n convertParameters(obj) {\n if (obj.parameters === undefined) {\n return;\n }\n obj.parameters = obj.parameters || [];\n (obj.parameters || []).forEach((param, i) => {\n param = obj.parameters[i] = this.resolveReference(this.spec, param, false);\n if (param.in !== \"body\") {\n this.copySchemaProperties(param, SCHEMA_PROPERTIES);\n this.copySchemaProperties(param, ARRAY_PROPERTIES);\n this.copySchemaXProperties(param);\n if (!param.description) {\n const schema = this.resolveReference(this.spec, param.schema, false);\n if (!!schema && schema.description) {\n param.description = schema.description;\n }\n }\n if (param.example !== undefined) {\n param[\"x-example\"] = param.example;\n }\n delete param.schema;\n delete param.allowReserved;\n delete param.example;\n }\n if (param.type === \"array\") {\n let style = param.style || (param.in === \"query\" || param.in === \"cookie\" ? \"form\" : \"simple\");\n switch (style) {\n case \"matrix\":\n param.collectionFormat = param.explode ? undefined : \"csv\";\n break;\n case \"label\":\n param.collectionFormat = undefined;\n break;\n case \"simple\":\n param.collectionFormat = \"csv\";\n break;\n case \"spaceDelimited\":\n param.collectionFormat = \"ssv\";\n break;\n case \"pipeDelimited\":\n param.collectionFormat = \"pipes\";\n break;\n case \"deepOpbject\":\n param.collectionFormat = \"multi\";\n break;\n case \"form\":\n param.collectionFormat = param.explode === false ? \"csv\" : \"multi\";\n break;\n }\n }\n delete param.style;\n delete param.explode;\n });\n }\n copySchemaProperties(obj, props) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n props.forEach((prop) => {\n const value = schema[prop];\n if (prop === \"additionalProperties\" && typeof value === \"boolean\") {\n return;\n }\n if (value !== undefined) {\n obj[prop] = value;\n }\n });\n }\n copySchemaXProperties(obj) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n Object.keys(schema).forEach((propName) => {\n if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith(\"x-\")) {\n obj[propName] = schema[propName];\n }\n });\n }\n convertResponses(operation) {\n // var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers\n Object.keys(operation.responses || {}).forEach((code) => {\n const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));\n if (response.content) {\n let anySchema = null;\n let jsonSchema = null;\n Object.keys(response.content).forEach((mediaRange) => {\n // produces and examples only allow media types, not ranges\n // use application/octet-stream as a catch-all type\n const mediaType = mediaRange.indexOf(\"*\") < 0 ? mediaRange : \"application/octet-stream\";\n if (!operation.produces) {\n operation.produces = [mediaType];\n }\n else if (operation.produces.indexOf(mediaType) < 0) {\n operation.produces.push(mediaType);\n }\n const content = response.content[mediaRange];\n anySchema = anySchema || content.schema;\n if (!jsonSchema && isJsonMimeType(mediaType)) {\n jsonSchema = content.schema;\n }\n if (content.example) {\n response.examples = response.examples || {};\n response.examples[mediaType] = content.example;\n }\n });\n if (anySchema) {\n response.schema = jsonSchema || anySchema;\n const resolved = this.resolveReference(this.spec, response.schema, true);\n if (resolved && response.schema.$ref && !response.schema.$ref.startsWith(\"#\")) {\n response.schema = resolved;\n }\n this.convertSchema(response.schema, \"response\");\n }\n }\n Object.keys(response.headers || {}).forEach((header) => {\n // Always resolve headers when converting to v2.\n const resolved = this.resolveReference(this.spec, response.headers[header], true);\n // Headers should be converted like parameters.\n if (resolved.schema) {\n resolved.type = resolved.schema.type;\n resolved.format = resolved.schema.format;\n delete resolved.schema;\n }\n response.headers[header] = resolved;\n });\n delete response.content;\n });\n }\n convertSchema(def, operationDirection) {\n if (def.oneOf) {\n delete def.oneOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.anyOf) {\n delete def.anyOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.allOf) {\n for (const i in def.allOf) {\n this.convertSchema(def.allOf[i], operationDirection);\n }\n }\n if (def.discriminator) {\n if (def.discriminator.mapping) {\n this.convertDiscriminatorMapping(def.discriminator.mapping);\n }\n def.discriminator = def.discriminator.propertyName;\n }\n switch (def.type) {\n case \"object\":\n if (def.properties) {\n Object.keys(def.properties).forEach((propName) => {\n if (def.properties[propName].writeOnly === true && operationDirection === \"response\") {\n delete def.properties[propName];\n }\n else {\n this.convertSchema(def.properties[propName], operationDirection);\n delete def.properties[propName].writeOnly;\n }\n });\n }\n break;\n case \"array\":\n if (def.items) {\n this.convertSchema(def.items, operationDirection);\n }\n }\n if (def.nullable) {\n def[\"x-nullable\"] = true;\n delete def.nullable;\n }\n // OpenAPI 3 has boolean \"deprecated\" on Schema, OpenAPI 2 does not\n // Convert to x-deprecated for Autorest (and perhaps others)\n if (def[\"deprecated\"] !== undefined) {\n // Move to x-deprecated, unless it is already defined\n if (def[\"x-deprecated\"] === undefined) {\n def[\"x-deprecated\"] = def.deprecated;\n }\n delete def.deprecated;\n }\n }\n convertSchemas() {\n this.spec.definitions = this.spec.components.schemas;\n Object.keys(this.spec.definitions || {}).forEach((defName) => {\n this.convertSchema(this.spec.definitions[defName]);\n });\n delete this.spec.components.schemas;\n }\n convertDiscriminatorMapping(mapping) {\n Object.keys(mapping).forEach((payload) => {\n const schemaNameOrRef = mapping[payload];\n if (typeof schemaNameOrRef !== \"string\") {\n console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n return;\n }\n // payload may be a schema name or JSON Reference string.\n // OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$\n // Note: Valid schema name could be JSON file name without extension.\n // Prefer schema name, with file name as fallback.\n let schema;\n if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {\n try {\n schema = this.resolveReference(this.spec, { $ref: `#/components/schemas/${schemaNameOrRef}` }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);\n }\n }\n // schemaNameRef is not a schema name. Try to resolve as JSON Ref.\n if (!schema) {\n try {\n schema = this.resolveReference(this.spec, { $ref: schemaNameOrRef }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);\n }\n }\n if (schema) {\n // Swagger Codegen + OpenAPI Generator extension\n // https://github.com/swagger-api/swagger-codegen/pull/4252\n schema[\"x-discriminator-value\"] = payload;\n // AutoRest extension\n // https://github.com/Azure/autorest/pull/474\n schema[\"x-ms-discriminator-value\"] = payload;\n }\n else {\n console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n }\n });\n }\n convertSecurityDefinitions() {\n if (this.spec.components.securitySchemes) {\n this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);\n delete this.spec.components.securitySchemes;\n }\n }\n}\nexport function transformToOS2(spec) {\n return new Converter(spec).convert();\n}\n","import { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpec } from \"./getSpec.js\";\nimport { getSpecTypeFromSpec } from \"./getSpecType.js\";\nimport { mapOpenSpec } from \"./mapOpenSpec.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { transformToOS2 } from \"./transformToOS2.js\";\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport function generateSpec({ tokens, ...options }) {\n const { version = \"1.0.0\", acceptMimes, fileSpec = {}, specVersion } = options;\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n const specType = getSpecTypeFromSpec(defaultSpec);\n let controllersSpec = getSpec(tokens, options);\n const spec = mergeSpec(defaultSpec, controllersSpec);\n if (options.sortPaths) {\n spec.paths = Object.fromEntries(Object.entries(spec.paths).sort(([k1], [k2]) => {\n return k1.localeCompare(k2);\n }));\n }\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec);\n }\n return spec;\n}\n","import \"../components/index.js\";\nimport { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n/**\n * @ignore\n */\nfunction getKey(options) {\n return JSON.stringify(options);\n}\n/**\n * @ignore\n */\nfunction get(entity, options) {\n const cache = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", [entity.schema], options);\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n schema.definitions = options.components.schemas;\n }\n cache.set(key, schema);\n }\n entity.store.set(CACHE_KEY, cache);\n return cache.get(key);\n}\nexport function getJsonSchema(model, options = {}) {\n const entity = getJsonEntityStore(model);\n const specType = options.specType || SpecTypes.JSON;\n options = {\n endpoint: true,\n groups: [],\n inlineEnums: specType === SpecTypes.JSON,\n ...options,\n specType,\n components: {\n schemas: {}\n }\n };\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n return get(entity, options);\n}\n","import { JsonOperationRoute } from \"../domain/JsonOperationRoute.js\";\nimport { concatPath } from \"./concatPath.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { getOperationsStores } from \"./getOperationsStores.js\";\nexport function getOperationsRoutes(token, options = {}) {\n const store = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes = [];\n if (options.withChildren) {\n const children = store.get(\"childrenControllers\", []);\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(getOperationsRoutes(token, {\n ...options,\n basePath\n }));\n }, operationsRoutes);\n }\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const { operation } = endpoint;\n if (operation) {\n operation.getAllowedOperationPath(options.allowedVerbs).forEach((operationPath) => {\n routes.push(new JsonOperationRoute({\n basePath,\n token,\n endpoint,\n operationPath\n }));\n });\n }\n return routes;\n }, operationsRoutes);\n}\n","import { alterIgnore } from \"../hooks/alterIgnore.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n return store.$properties;\n}\n/**\n * @ignore\n */\nexport function getProperties(target, options = {}) {\n const stores = getPropertiesStores(target);\n const map = new Map();\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n map.set(key, store);\n });\n return map;\n}\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__598__","__WEBPACK_EXTERNAL_MODULE__803__","__WEBPACK_EXTERNAL_MODULE__488__","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","SLASH_LITERAL","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","POSIX_CHARS","PLUS_LITERAL","QMARK_LITERAL","ONE_CHAR","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","SEP","WINDOWS_CHARS","MAX_LENGTH","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKWARD_SLASH","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_GRAVE_ACCENT","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","extglobChars","chars","type","open","close","globChars","win32","constants","utils","expandRange","args","options","sort","value","join","RegExp","ex","map","v","escapeRegex","syntaxError","char","parse","input","TypeError","opts","max","maxLength","Math","min","len","length","SyntaxError","bos","output","prepend","tokens","capture","PLATFORM_CHARS","windows","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","state","index","start","consumed","prefix","backtrack","negated","brackets","braces","parens","quotes","removePrefix","extglobs","stack","prev","eos","peek","n","advance","remaining","slice","consume","num","append","token","negate","count","increment","push","decrement","pop","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","extglobStar","includes","test","negatedExtglob","fastpaths","backslashes","replace","m","esc","first","rest","repeat","unescape","contains","wrapOutput","next","match","exec","slashes","posix","idx","lastIndexOf","pre","indexOf","keepQuotes","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","escaped","nobrace","outputIndex","tokensIndex","brace","dots","arr","range","i","unshift","comma","out","toks","t","supportsLookbehinds","Error","nonegate","regex","noglobstar","prior","before","isStart","afterStar","after","strictSlashes","end","escapeLast","suffix","slashDot","create","str","source","scan","picomatch","glob","returnState","Array","isArray","fns","arrayMatcher","isMatch","isState","val","compileRe","makeRe","isIgnored","ignore","ignoreOpts","onMatch","onResult","matcher","returnObject","result","onIgnore","format","toPosixSlashes","matchBase","basename","Boolean","patterns","pattern","p","parsed","returnOutput","toRegex","startsWith","undefined","flags","nocase","err","debug","isPathSeparator","code","depth","isPrefix","isGlobstar","Infinity","scanToEnd","parts","lastIndex","isBracket","isGlob","braceEscaped","finished","charCodeAt","noparen","base","removeBackslashes","maxDepth","prevIndex","isObject","isRegexChar","segs","process","version","split","Number","lastIdx","path","codes","getStatusMessage","Object","prototype","hasOwnProperty","call","status","message","parseInt","isNaN","msg","toLowerCase","getStatusCode","keys","forEach","createMessageToStatusCodeMap","createStatusCodeList","redirect","empty","retry","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","OperationVerbs","OPERATION_HTTP_VERBS","ALL","GET","POST","PUT","PATCH","HEAD","DELETE","OPTIONS","TRACE","CUSTOM","OPERATION_WS_VERBS","PUBLISH","SUBSCRIBE","JsonSchemaMappersContainer","Map","registerJsonSchemaMapper","mapper","spec","set","getJsonSchemaMapper","specType","execMapper","parent","hasMapper","has","execOneOfMapper","types","find","buildPath","filter","__decorate","decorators","target","desc","c","arguments","getOwnPropertyDescriptor","Reflect","decorate","__metadata","metadataKey","metadataValue","metadata","SuppressedError","JsonEntitiesContainer","JsonEntityStore","constructor","this","isStore","propertyKey","descriptor","decoratorType","propertyName","String","store","targetName","nameOf","isCollection","collectionType","isArrayOrArrayClass","discriminatorAncestor","ancestor","ancestorsOf","from","schema","isDiscriminator","isPrimitive","isPrimitiveOrPrimitiveClass","_type","isDate","computedType","isClass","_schema","nestedGenerics","build","itemSchema","getComputedType","parentSchema","isDiscriminatorChild","discriminator","static","prototypeOf","Store","decoratorTypeOf","jsonSchemaStore","classOf","descriptorOf","isGetterOnly","defaultValue","toString","buildType","isPlainObject","getBestType","hasDiscriminator","isClassObject","getTarget","isArrowFn","JsonEntityComponent","enumsRegistry","isPromise","Function","isSymbol","JSON_TYPES","getJsonType","primitiveOf","Set","isBuffer","serializeEnum","enumValue","entries","reduce","acc","concat","serializeEnumValues","enumValues","values","add","getValue","uniq","toJsonRegex","Discriminator","assign","cleanObject","getType","discriminatorValue","getValues","getDefaultValue","children","mapProperties","properties","JsonSchema","mapToJsonSchema","item","$isJsonDocument","isLazyRef","isPrimitiveClass","super","$kind","$hooks","Hooks","$required","$allow","$forwardGroups","$ignore","isDiscriminatorKey","alias","genericLabels","class","Date","isGeneric","hasGenerics","genericType","canRef","isNullable","isReadOnly","isWriteOnly","nullable","getAliasOf","property","addAlias","removeAlias","delete","$id","$ref","$schema","label","name","cb","on","default","const","description","discriminatorKey","examples","enum","additionalItems","example","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","allow","minLength","any","required","clone","$selfRequired","clear","addRequired","removeRequired","isRequired","addProperty","patternProperties","additionalProperties","unknown","dependencies","propertyNames","getName","flat","definitions","allOf","setManyOf","anyOf","oneOf","not","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","integer","isFunction","jsonType","title","readOnly","writeOnly","customKey","toObject","toJSON","getComputedItemType","keyword","resolved","jsonSchema","mapping","JsonClassStore","DecoratorTypes","isSuccessStatus","isRedirectionStatus","JsonMap","mapHeaders","headers","newHeaders","toJsonMapCollection","content","klass","JsonMedia","groups","JsonResponse","getContent","getMedia","mediaType","addMedia","isBinary","JsonOperation","parameters","responses","operationPaths","response","getResponses","getStatus","tags","addTags","uniqBy","summary","operationId","defaultStatus","setRedirection","isRedirection","addResponse","statusCode","res","getResponseOf","currentCode","currentResponse","deepMerge","ensureResponseOf","getHeadersOf","getContentTypeOf","security","addSecurityScopes","scopes","deprecated","addParameter","parameter","consumes","produces","addProduce","produce","addOperationPath","method","getAllowedOperationPath","allowedVerbs","toUpperCase","JsonMethodStore","middlewares","beforeMiddlewares","afterMiddlewares","operation","use","params","view","acceptMimes","mimes","getResponseOptions","contentType","media","allowedGroups","size","include","ctrlValue","getParamTypes","paramType","Metadata","EndpointMetadata","JsonParameterTypes","formatParameterType","isParameterType","JsonParameter","in","inType","expression","JsonParameterStore","fromMethod","pipes","dataPath","allowedRequiredValues","reverse","isMethodDescriptor","param","getSchema","ParamMetadata","JsonPropertyStore","PropertyMetadata","getJsonEntityStore","JsonOperationPathsMap","getKey","setOperationPath","operationPath","getInheritedStores","$inherited","context","model","getOperationsStores","$operations","currentStore","propStore","removeHiddenOperation","operationStore","ALLOWED_VERBS","channelsMapper","channels","rootPath","ctrlRootPath","flatMap","camelCase","pushToChannels","SpecTypes","makeOf","schemes","messageMapper","jsonOperationStore","defaultTags","event","messageKey","components","payload","responsesSchema","messages","getGenericsMap","genericTypes","mapGenericsOptions","ops","generics","popGenerics","payloadMapper","payloadName","pascalCase","setValue","groupsName","mapOptions","BODY","QUERY","PATH","HEADER","responsePayloadMapper","statuses","statusesTexts","successSchemes","errorSchemes","jsonResponse","responsePayloadName","responsePayload","statusText","dataSchema","errorSchema","specJson","schemas","ASYNCAPI","JsonLazyRef","createRefName","createRef","host","OPENAPI","getHost","ref","toRef","anyMapper","enumSchema","classMapper","props","discriminatorMappingMapper","_","newMapping","isString","enumsMapper","inlineEnums","genericsMapper","alterMerge","inheritedClassMapper","stores","alter","itemMapper","lazyRefMapper","jsonLazyRef","$refs","mapMapper","MANY_OF_PROPERTIES","STRING_PROPERTIES","BOOLEAN_PROPERTIES","NUMBER_PROPERTIES","ARRAY_PROPERTIES","OBJECT_PROPERTIES","COMMON_PROPERTIES","nullableMapper","some","isInteger","alterIgnore","isBoolean","objectMapper","operationIdFormatter","useAlias","ctx","withIgnoredProps","ofMapper","propertiesMapper","alterRequiredGroups","requiredMapper","k","extractRequiredProps","aliasedKey","mapRequiredProps","mapAliasedProperties","RULES","string","is","number","isNumber","boolean","array","object","alterOneOf","kind","findManyOf","rule","pickProperties","IGNORES","SWAGGER","JSON","IGNORES_OPENSPEC","schemaMapper","addDef","customKeys","shouldSkipKey","isExample","isEmptyProperties","shouldMapAlias","mapKeys","serializeSchema","wrapEnumsMapper","paths","nullableMapperOpenApi","operationInFilesMapper","operationInParameterMapper","jsonParameter","paramOpts","oldSchemas","mapperName","operationInParametersMapper","buildExamples","hasKey","newExamples","operationInQueryMapper","jsonParameters","style","inlineReference","HTTP_STATUS_MESSAGES","constantCase","getStatusConstant","operationMapper","jsonOperation","parametersOptions","bodyParameters","inputs","FILES","extractParameters","requestBody","operationTags","operationMediaMapper","jsonMedia","JsonRequestBody","addContent","mediaContent","operationRequestBodyMapper","refs","propsLength","hasFile","propSchema","buildSchemaFromBodyParameters","operationResponseMapper","concatParameters","getJsonPathParameters","isOptional","current","inCapture","parseUrl","subpath","optional","postfix","right","splited","splice","getVariable","OPERATION_IDS","transform","operationKey","id","getOperationId","pushToPath","pathsMapper","mapOperation","mapOperationInPathParameters","JsonEntityFn","fn","Children","childToken","DiscriminatorValue","snakeCase","CollectionOf","decorator","MinItems","MaxItems","MinProperties","MaxProperties","Contains","UniqueItems","ArrayOf","MapOf","CollectionContains","withErrorMsg","errorKey","originalDecorator","decoratorOptions","useDecorators","errorMessage","storedJson","AdditionalProperties","entity","AllOf","Property","Allow","Any","AnyOf","Const","constValue","CustomKey","CustomKeys","Default","ErrorMsg","DefaultMsg","Description","DiscriminatorKey","Enum","Example","Examples","Maximum","exclusive","Max","ExclusiveMaximum","Minimum","Min","ExclusiveMinimum","JsonFormatTypes","Format","Email","EMAIL","DateTime","DATE_TIME","DateFormat","DATE","TimeFormat","TIME","Uri","URI","Url","URL","ForwardGroups","bool","micromatch","list","omit","keep","negatives","matched","matchGroups","compareWith","groupsExcludes","group","groupsIncludes","Groups","propEntity","groupsClass","givenGroups","Hidden","StoreSet","Ignore","Integer","LabelledAs","includeCollection","MaxLength","MinLength","MultipleOf","Name","Nullable","OneOf","Optional","Pattern","ReadOnly","Schema","partialSchema","For","RecordOf","initial","Required","RequiredGroups","Title","WriteOnly","GenericOf","isEnum","Nested","Generics","Produces","decorateMethodsOf","UnsupportedDecoratorType","AcceptMime","Consumes","DecoratorContext","actions","addAction","bind","wrapKey","methods","getMergedKey","beforeInit","onInit","afterInit","onMapKey","runActions","action","statusesModel","defineStatusModel","getStatusModel","mapGenerics","ReturnDecoratorContext","header","location","meta","Location","nested","checkPrimitive","checkCollection","of","ofInteger","manyOf","partial","binary","getContentType","hasOfTypes","currentStatus","mapMedia","Returns","ContentType","Deprecated","Header","Headers","In","Type","InFile","multiple","useMethodDecorators","mapOperationOptions","handlers","arg","toLocaleUpperCase","OperationDecoratorContext","Operation","routeOptions","OperationId","OperationPath","Partial","Path","Publish","Redirect","url","All","Get","Post","Put","Delete","Head","Patch","Options","Security","nameOrSecurity","Status","Subscribe","Summary","Tags","tag","mapTags","View","concatPath","basePath","r1","r2","global","ignoreCase","multiline","endsWith","JsonOperationRoute","paramsTypes","endpoint","fullPath","methodClassName","className","date","datetime","time","email","enums","e","lazyRef","er","uri","schemesReducer","mergeReducerBuilder","stringify","tagsReducer","SPEC_REDUCERS","mergeSpec","reducers","cleanUndefinedProps","caches","getSpec","operationIdPattern","finalSpec","cache","getSpecType","getSpecTypeFromSpec","mapOpenSpecInfo","info","termsOfService","contact","license","mapOpenSpec2","specVersion","securityDefinitions","externalDocs","swagger","mapOpenSpec3","servers","openapi","mapOpenSpec","fileSpec","HTTP_METHODS","SCHEMA_PROPERTIES","APPLICATION_JSON_REGEX","SUPPORTED_MIME_TYPES","APPLICATION_X_WWW_URLENCODED","MULTIPART_FORM_DATA","fixRefs","isJsonMimeType","getSupportedMimeTypes","MIME_VALUES","transformSecurity","securitySchemes","securityDefinition","scheme","bearerFormat","flows","flowName","flow","flowType","authorizationUrl","tokenUrl","transformInformation","server","serverUrl","variables","variable","variableObject","re","pathname","protocol","substring","Converter","convertInfos","resolveReference","shouldClone","shift","cur","convert","convertOperations","convertSchemas","convertSecurityDefinitions","pathObject","convertParameters","convertOperationParameters","convertResponses","contentKey","mediaRanges","mediaTypes","structuredObj","data","mediaRange","formDataParam","convertSchema","copySchemaProperties","copySchemaXProperties","allowReserved","collectionFormat","explode","propName","anySchema","def","operationDirection","convertDiscriminatorMapping","defName","schemaNameOrRef","console","warn","transformToOS2","generateSpec","defaultSpec","sortPaths","fromEntries","k1","k2","localeCompare","CACHE_KEY","getJsonSchema","getOperationsRoutes","operationsRoutes","withChildren","routes","getPropertiesStores","$properties","getProperties"],"sourceRoot":""}
|