@scalar/fastify-api-reference 1.25.127 → 1.25.130
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/CHANGELOG.md +31 -0
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/index.cjs +1 -7
- package/dist/index.js +4000 -19349
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -8
- package/dist/js/standalone.js +0 -30966
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty,t=(t,r,n)=>((t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n)(t,"symbol"!=typeof r?r+"":r,n);const r=require("fastify-plugin"),n=require("node:fs"),s=require("node:path"),i=require("node:url"),o=require("@scalar/api-reference/lib/html-rendering");var a="undefined"!=typeof document?document.currentScript:null;const c={"2.0":{title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:!0},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},termsOfService:{type:"string",description:"The terms of service for the API."},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:!1,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},paths:{type:"object",description:"Relative paths to the individual endpoints. They must be relative to the 'basePath'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^/":{$ref:"#/definitions/pathItem"}},additionalProperties:!1},definitions:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"One or more JSON objects describing the schemas being consumed and produced by the API."},parameterDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"One or more JSON representations for parameters"},responseDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/response"},description:"One or more JSON representations for responses"},externalDocs:{type:"object",additionalProperties:!1,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},examples:{type:"object",additionalProperties:!0},mimeType:{type:"string",description:"The MIME type of the HTTP message."},operation:{type:"object",required:["responses"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{tags:{type:"array",items:{type:"string"},uniqueItems:!0},summary:{type:"string",description:"A brief summary of the operation."},description:{type:"string",description:"A longer description of the operation, GitHub Flavored Markdown is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string",description:"A unique identifier of the operation."},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},consumes:{description:"A list of MIME types the API can consume.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},parameters:{$ref:"#/definitions/parametersList"},responses:{$ref:"#/definitions/responses"},schemes:{$ref:"#/definitions/schemesList"},deprecated:{type:"boolean",default:!1},security:{$ref:"#/definitions/security"}}},pathItem:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},get:{$ref:"#/definitions/operation"},put:{$ref:"#/definitions/operation"},post:{$ref:"#/definitions/operation"},delete:{$ref:"#/definitions/operation"},options:{$ref:"#/definitions/operation"},head:{$ref:"#/definitions/operation"},patch:{$ref:"#/definitions/operation"},parameters:{$ref:"#/definitions/parametersList"}}},responses:{type:"object",description:"Response objects names can either be any valid HTTP status code or 'default'.",minProperties:1,additionalProperties:!1,patternProperties:{"^([0-9]{3})$|^(default)$":{$ref:"#/definitions/responseValue"},"^x-":{$ref:"#/definitions/vendorExtension"}},not:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}}},responseValue:{oneOf:[{$ref:"#/definitions/response"},{$ref:"#/definitions/jsonReference"}]},response:{type:"object",required:["description"],properties:{description:{type:"string"},schema:{oneOf:[{$ref:"#/definitions/schema"},{$ref:"#/definitions/fileSchema"}]},headers:{$ref:"#/definitions/headers"},examples:{$ref:"#/definitions/examples"}},additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},headers:{type:"object",additionalProperties:{$ref:"#/definitions/header"}},header:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:!0,additionalItems:!0},bodyParameter:{type:"object",required:["name","in","schema"],patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},in:{type:"string",description:"Determines the location of the parameter.",enum:["body"]},required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},schema:{$ref:"#/definitions/schema"}},additionalProperties:!1},headerParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["header"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},queryParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["query"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},formDataParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["formData"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array","file"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},pathParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["required"],properties:{required:{type:"boolean",enum:[!0],description:"Determines whether or not this parameter is required or optional."},in:{type:"string",description:"Determines the location of the parameter.",enum:["path"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},nonBodyParameter:{type:"object",required:["name","in","type"],oneOf:[{$ref:"#/definitions/headerParameterSubSchema"},{$ref:"#/definitions/formDataParameterSubSchema"},{$ref:"#/definitions/queryParameterSubSchema"},{$ref:"#/definitions/pathParameterSubSchema"}]},parameter:{oneOf:[{$ref:"#/definitions/bodyParameter"},{$ref:"#/definitions/nonBodyParameter"}]},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:!1},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},fileSchema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["type"],properties:{format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},type:{type:"string",enum:["file"]},readOnly:{type:"boolean",default:!1},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},primitivesItems:{type:"object",additionalProperties:!1,properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},security:{type:"array",items:{$ref:"#/definitions/securityRequirement"},uniqueItems:!0},securityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},xml:{type:"object",additionalProperties:!1,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},tag:{type:"object",additionalProperties:!1,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},securityDefinitions:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/basicAuthenticationSecurity"},{$ref:"#/definitions/apiKeySecurity"},{$ref:"#/definitions/oauth2ImplicitSecurity"},{$ref:"#/definitions/oauth2PasswordSecurity"},{$ref:"#/definitions/oauth2ApplicationSecurity"},{$ref:"#/definitions/oauth2AccessCodeSecurity"}]}},basicAuthenticationSecurity:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["basic"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},apiKeySecurity:{type:"object",additionalProperties:!1,required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ImplicitSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["implicit"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2PasswordSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["password"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ApplicationSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["application"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2AccessCodeSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["accessCode"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},mediaTypeList:{type:"array",items:{$ref:"#/definitions/mimeType"},uniqueItems:!0},parametersList:{type:"array",description:"The parameters needed to send a valid API call.",additionalItems:!1,items:{oneOf:[{$ref:"#/definitions/parameter"},{$ref:"#/definitions/jsonReference"}]},uniqueItems:!0},schemesList:{type:"array",description:"The transfer protocol of the API.",items:{type:"string",enum:["http","https","ws","wss"]},uniqueItems:!0},collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes"],default:"csv"},collectionFormatWithMulti:{type:"string",enum:["csv","ssv","tsv","pipes","multi"],default:"csv"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},jsonReference:{type:"object",required:["$ref"],additionalProperties:!1,properties:{$ref:{type:"string"}}}}},"3.0":{id:"https://spec.openapis.org/oas/3.0/schema/2021-09-28",$schema:"http://json-schema.org/draft-04/schema#",description:"The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3",type:"object",required:["openapi","info","paths"],properties:{openapi:{type:"string",pattern:"^3\\.0\\.\\d(-.+)?$"},info:{$ref:"#/definitions/Info"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},tags:{type:"array",items:{$ref:"#/definitions/Tag"},uniqueItems:!0},paths:{$ref:"#/definitions/Paths"},components:{$ref:"#/definitions/Components"}},patternProperties:{"^x-":{}},additionalProperties:!1,definitions:{Reference:{type:"object",required:["$ref"],patternProperties:{"^\\$ref$":{type:"string",format:"uri-reference"}}},Info:{type:"object",required:["title","version"],properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/definitions/Contact"},license:{$ref:"#/definitions/License"},version:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{}},additionalProperties:!1},License:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Server:{type:"object",required:["url"],properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/definitions/ServerVariable"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ServerVariable:{type:"object",required:["default"],properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Components:{type:"object",properties:{schemas:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}}},responses:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Response"}]}}},parameters:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Parameter"}]}}},examples:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Example"}]}}},requestBodies:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/RequestBody"}]}}},headers:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Header"}]}}},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},links:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Link"}]}}},callbacks:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Callback"}]}}}},patternProperties:{"^x-":{}},additionalProperties:!1},Schema:{type:"object",properties:{title:{type:"string"},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0,default:0},pattern:{type:"string",format:"regex"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0,default:0},uniqueItems:{type:"boolean",default:!1},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0,default:0},required:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},enum:{type:"array",items:{},minItems:1,uniqueItems:!1},type:{type:"string",enum:["array","boolean","integer","number","object","string"]},not:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},allOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},oneOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},anyOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},properties:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"},{type:"boolean"}],default:!0},description:{type:"string"},format:{type:"string"},default:{},nullable:{type:"boolean",default:!1},discriminator:{$ref:"#/definitions/Discriminator"},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},example:{},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},deprecated:{type:"boolean",default:!1},xml:{$ref:"#/definitions/XML"}},patternProperties:{"^x-":{}},additionalProperties:!1},Discriminator:{type:"object",required:["propertyName"],properties:{propertyName:{type:"string"},mapping:{type:"object",additionalProperties:{type:"string"}}}},XML:{type:"object",properties:{name:{type:"string"},namespace:{type:"string",format:"uri"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},Response:{type:"object",required:["description"],properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},links:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Link"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1},MediaType:{type:"object",properties:{schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}},encoding:{type:"object",additionalProperties:{$ref:"#/definitions/Encoding"}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"}]},Example:{type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:{},externalValue:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Header:{type:"object",properties:{description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string",enum:["simple"],default:"simple"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"}]},Paths:{type:"object",patternProperties:{"^\\/":{$ref:"#/definitions/PathItem"},"^x-":{}},additionalProperties:!1},PathItem:{type:"object",properties:{$ref:{type:"string"},summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0}},patternProperties:{"^(get|put|post|delete|options|head|patch|trace)$":{$ref:"#/definitions/Operation"},"^x-":{}},additionalProperties:!1},Operation:{type:"object",required:["responses"],properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},operationId:{type:"string"},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0},requestBody:{oneOf:[{$ref:"#/definitions/RequestBody"},{$ref:"#/definitions/Reference"}]},responses:{$ref:"#/definitions/Responses"},callbacks:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Callback"},{$ref:"#/definitions/Reference"}]}},deprecated:{type:"boolean",default:!1},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},servers:{type:"array",items:{$ref:"#/definitions/Server"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Responses:{type:"object",properties:{default:{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]}},patternProperties:{"^[1-5](?:\\d{2}|XX)$":{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]},"^x-":{}},minProperties:1,additionalProperties:!1},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},Tag:{type:"object",required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExternalDocumentation:{type:"object",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExampleXORExamples:{description:"Example and examples are mutually exclusive",not:{required:["example","examples"]}},SchemaXORContent:{description:"Schema and content are mutually exclusive, at least one is required",not:{required:["schema","content"]},oneOf:[{required:["schema"]},{required:["content"],description:"Some properties are not allowed if content is present",allOf:[{not:{required:["style"]}},{not:{required:["explode"]}},{not:{required:["allowReserved"]}},{not:{required:["example"]}},{not:{required:["examples"]}}]}]},Parameter:{type:"object",properties:{name:{type:"string"},in:{type:"string"},description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,required:["name","in"],allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"},{$ref:"#/definitions/ParameterLocation"}]},ParameterLocation:{description:"Parameter location",oneOf:[{description:"Parameter in path",required:["required"],properties:{in:{enum:["path"]},style:{enum:["matrix","label","simple"],default:"simple"},required:{enum:[!0]}}},{description:"Parameter in query",properties:{in:{enum:["query"]},style:{enum:["form","spaceDelimited","pipeDelimited","deepObject"],default:"form"}}},{description:"Parameter in header",properties:{in:{enum:["header"]},style:{enum:["simple"],default:"simple"}}},{description:"Parameter in cookie",properties:{in:{enum:["cookie"]},style:{enum:["form"],default:"form"}}}]},RequestBody:{type:"object",required:["content"],properties:{description:{type:"string"},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},required:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},SecurityScheme:{oneOf:[{$ref:"#/definitions/APIKeySecurityScheme"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/OAuth2SecurityScheme"},{$ref:"#/definitions/OpenIdConnectSecurityScheme"}]},APIKeySecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},HTTPSecurityScheme:{type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:!1,oneOf:[{description:"Bearer",properties:{scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}},{description:"Non Bearer",not:{required:["bearerFormat"]},properties:{scheme:{not:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}}}]},OAuth2SecurityScheme:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},flows:{$ref:"#/definitions/OAuthFlows"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OpenIdConnectSecurityScheme:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},openIdConnectUrl:{type:"string",format:"uri-reference"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OAuthFlows:{type:"object",properties:{implicit:{$ref:"#/definitions/ImplicitOAuthFlow"},password:{$ref:"#/definitions/PasswordOAuthFlow"},clientCredentials:{$ref:"#/definitions/ClientCredentialsFlow"},authorizationCode:{$ref:"#/definitions/AuthorizationCodeOAuthFlow"}},patternProperties:{"^x-":{}},additionalProperties:!1},ImplicitOAuthFlow:{type:"object",required:["authorizationUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},PasswordOAuthFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ClientCredentialsFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},AuthorizationCodeOAuthFlow:{type:"object",required:["authorizationUrl","tokenUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Link:{type:"object",properties:{operationId:{type:"string"},operationRef:{type:"string",format:"uri-reference"},parameters:{type:"object",additionalProperties:{}},requestBody:{},description:{type:"string"},server:{$ref:"#/definitions/Server"}},patternProperties:{"^x-":{}},additionalProperties:!1,not:{description:"Operation Id and Operation Ref are mutually exclusive",required:["operationId","operationRef"]}},Callback:{type:"object",additionalProperties:{$ref:"#/definitions/PathItem"},patternProperties:{"^x-":{}}},Encoding:{type:"object",properties:{contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},style:{type:"string",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1}},additionalProperties:!1}}},3.1:{$id:"https://spec.openapis.org/oas/3.1/schema/2022-10-07",$schema:"https://json-schema.org/draft/2020-12/schema",description:"The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri-reference",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{info:{$comment:"https://spec.openapis.org/oas/v3.1.0#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.1.0#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.1.0#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.1.0#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.1.0#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.1.0#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}}},patternProperties:{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.1.0#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.1.0#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.1.0#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.1.0#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameter:{$comment:"https://spec.openapis.org/oas/v3.1.0#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}},dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}},required:["in"]},then:{properties:{name:{pattern:"[^/#?]+$"},style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}},required:["in"]},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},allowReserved:{default:!1,type:"boolean"}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}},required:["in"]},then:{properties:{style:{default:"form",const:"form"}}}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.1.0#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.1.0#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.1.0#media-type-object",type:"object",properties:{schema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/examples"}],unevaluatedProperties:!1},encoding:{$comment:"https://spec.openapis.org/oas/v3.1.0#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/encoding/$defs/explode-default"}],unevaluatedProperties:!1,$defs:{"explode-default":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},responses:{$comment:"https://spec.openapis.org/oas/v3.1.0#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},response:{$comment:"https://spec.openapis.org/oas/v3.1.0#response-object",type:"object",properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},required:["description"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.1.0#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.1.0#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:!0,externalValue:{type:"string",format:"uri-reference"}},not:{required:["value","externalValue"]},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.1.0#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},body:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.1.0#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"}},$ref:"#/$defs/examples"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.1.0#tag-object",type:"object",properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.1.0#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}},unevaluatedProperties:!1},schema:{$comment:"https://spec.openapis.org/oas/v3.1.0#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}},required:["type"]},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}},required:["type"]},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}},required:["type"]},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}},required:["type"]},then:{properties:{openIdConnectUrl:{type:"string",format:"uri-reference"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.1.0#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}}}}},u=Object.keys(c),l={EMPTY_OR_INVALID:"Can’t find JSON, YAML or filename in data",OPENAPI_VERSION_NOT_SUPPORTED:"Can’t find supported Swagger/OpenAPI version in specification, version must be a string.",INVALID_REFERENCE:"Can’t resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can’t resolve external reference: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f={exports:{}},p={},m={},h={},y={},g={},$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)a(r,t[s]),r.push(e[++s]);return new n(r)}e._Code=n,e.nil=new n(""),e._=s;const i=new n("+");function o(e,...t){const r=[u(e[0])];let s=0;for(;s<t.length;)r.push(i),a(r,t[s]),r.push(i,u(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===i){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function a(e,t){var s;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(s=t)||"boolean"==typeof s||null===s?s:u(Array.isArray(s)?s.join(","):s))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=o,e.addCodeArg=a,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`},e.stringify=function(e){return new n(u(e))},e.safeStringify=u,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):s`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}($);var v={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=$;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n,s;(s=n||(e.UsedValueState=n={}))[s.Started=0]="Started",s[s.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=i;class o extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=o;const a=t._`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?a:t.nil}}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:s}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[s];if(o){const e=o.get(i);if(e)return e}else o=this._values[s]=new Map;o.set(i,n);const a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(s,i,o={},a){let c=t.nil;for(const u in s){const l=s[u];if(!l)continue;const d=o[u]=o[u]||new Map;l.forEach((s=>{if(d.has(s))return;d.set(s,n.Started);let o=i(s);if(o){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${s} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(s)))throw new r(s);c=t._`${c}${o}${this.opts._n}`}d.set(s,n.Completed)}))}return c}}}(v),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=$,r=v;var n=$;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=v;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class o extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=j(this.rhs,e,r),this}get names(){return S(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(C(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class m extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class h extends p{}class y extends m{}y.kind="else";class g extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(O(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){const e=super.names;return S(e,this.condition),this.else&&A(e,this.else.names),e}}g.kind="if";class b extends m{}b.kind="for";class w extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class D extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){const e=S(super.names,this.from);return S(e,this.to)}}class E extends b{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class _ extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}_.kind="func";class k extends p{render(e){return"return "+super.render(e)}}k.kind="return";class P extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class x extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class F extends m{render(e){return"finally"+super.render(e)}}F.kind="finally";function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function S(e,r){return r instanceof t._CodeOrName?A(e,r.names):e}function j(e,r,n){return e instanceof t.Name?i(e):(s=e)instanceof t._Code&&s._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=i(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var s;function i(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function C(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function O(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${R(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new o(e,s,r)),s}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){const r=["{"];for(const[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,s));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,n,s,i=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new D(i,o,t,n),(()=>s(o)))}forOf(e,n,s,i=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(o,t._`${e}[${r}]`),s(o)}))}return this._for(new E("of",i,o,n),(()=>s(o)))}forIn(e,n,s,i=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,s);const o=this._scope.toName(e);return this._for(new E("in",i,o,n),(()=>s(o)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new x(e),t(e)}return r&&(this._currNode=n.finally=new F,this.code(r)),this._endBlockNode(x,F)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,s){return this._blockNode(new _(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=O;const N=T(e.operators.AND);e.and=function(...e){return e.reduce(N)};const I=T(e.operators.OR);function T(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${R(r)} ${e} ${R(n)}`}function R(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(I)}}(g);var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.checkStrictMode=b.getErrorPath=b.Type=b.useFunc=b.setEvaluated=b.evaluatedPropsToName=b.mergeEvaluated=b.eachItem=b.unescapeJsonPointer=b.escapeJsonPointer=b.escapeFragment=b.unescapeFragment=b.schemaRefOrVal=b.schemaHasRulesButRef=b.schemaHasRules=b.checkUnknownRules=b.alwaysValidSchema=b.toHash=void 0;const w=g,D=$;function E(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const i in t)s[i]||O(e,`unknown keyword: "${i}"`)}function _(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function k(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function P(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function x({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,i,o,a)=>{const c=void 0===o?i:o instanceof w.Name?(i instanceof w.Name?e(s,i,o):t(s,i,o),o):i instanceof w.Name?(t(s,o,i),i):r(i,o);return a!==w.Name||c instanceof w.Name?c:n(s,c)}}function F(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",w._`{}`);return void 0!==t&&A(e,r,t),r}function A(e,t,r){Object.keys(r).forEach((r=>e.assign(w._`${t}${(0,w.getProperty)(r)}`,!0)))}b.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},b.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(E(e,t),!_(t,e.self.RULES.all))},b.checkUnknownRules=E,b.schemaHasRules=_,b.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},b.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return w._`${r}`}return w._`${e}${t}${(0,w.getProperty)(n)}`},b.unescapeFragment=function(e){return P(decodeURIComponent(e))},b.escapeFragment=function(e){return encodeURIComponent(k(e))},b.escapeJsonPointer=k,b.unescapeJsonPointer=P,b.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},b.mergeEvaluated={props:x({mergeNames:(e,t,r)=>e.if(w._`${r} !== true && ${t} !== undefined`,(()=>{e.if(w._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,w._`${r} || {}`).code(w._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(w._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,w._`${r} || {}`),A(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:F}),items:x({mergeNames:(e,t,r)=>e.if(w._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,w._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(w._`${r} !== true`,(()=>e.assign(r,!0===t||w._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},b.evaluatedPropsToName=F,b.setEvaluated=A;const S={};var j,C;function O(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}b.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:S[t.code]||(S[t.code]=new D._Code(t.code))})},(C=j||(b.Type=j={}))[C.Num=0]="Num",C[C.Str=1]="Str",b.getErrorPath=function(e,t,r){if(e instanceof w.Name){const n=t===j.Num;return r?n?w._`"[" + ${e} + "]"`:w._`"['" + ${e} + "']"`:n?w._`"/" + ${e}`:w._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,w.getProperty)(e).toString():"/"+k(e)},b.checkStrictMode=O;var N={};Object.defineProperty(N,"__esModule",{value:!0});const I=g,T={data:new I.Name("data"),valCxt:new I.Name("valCxt"),instancePath:new I.Name("instancePath"),parentData:new I.Name("parentData"),parentDataProperty:new I.Name("parentDataProperty"),rootData:new I.Name("rootData"),dynamicAnchors:new I.Name("dynamicAnchors"),vErrors:new I.Name("vErrors"),errors:new I.Name("errors"),this:new I.Name("this"),self:new I.Name("self"),scope:new I.Name("scope"),json:new I.Name("json"),jsonPos:new I.Name("jsonPos"),jsonLen:new I.Name("jsonLen"),jsonPart:new I.Name("jsonPart")};N.default=T,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=g,r=b,n=N;function s(e,r){const s=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${s}]`)),t._`${n.default.vErrors}.push(${s})`),e.code(t._`${n.default.errors}++`)}function i(e,r){const{gen:n,validateName:s,schemaEnv:i}=e;i.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${s}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,o,c){const{it:u}=r,{gen:l,compositeRule:d,allErrors:f}=u,p=a(r,n,o);(null!=c?c:d||f)?s(l,p):i(u,t._`[${p}]`)},e.reportExtraError=function(t,r=e.keywordError,o){const{it:c}=t,{gen:u,compositeRule:l,allErrors:d}=c;s(u,a(t,r,o)),l||d||i(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:s,data:i,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,n.default.errors,(o=>{e.const(c,t._`${n.default.vErrors}[${o}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${c}.schema`,s),e.assign(t._`${c}.data`,i))}))};const o={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,s){const{createErrors:i}=e.it;return!1===i?t._`{}`:function(e,r,s={}){const{gen:i,it:a}=e,l=[c(a,s),u(e,s)];return function(e,{params:r,message:s},i){const{keyword:a,data:c,schemaValue:u,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;i.push([o.keyword,a],[o.params,"function"==typeof r?r(e):r||t._`{}`]),d.messages&&i.push([o.message,"function"==typeof s?s(e):s]);d.verbose&&i.push([o.schema,u],[o.parentSchema,t._`${p}${m}`],[n.default.data,c]);f&&i.push([o.propertyName,f])}(e,r,l),i.object(...l)}(e,r,s)}function c({errorPath:e},{instancePath:s}){const i=s?t.str`${e}${(0,r.getErrorPath)(s,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,i)]}function u({keyword:e,it:{errSchemaPath:n}},{schemaPath:s,parentSchema:i}){let a=i?n:t.str`${n}/${e}`;return s&&(a=t.str`${a}${(0,r.getErrorPath)(s,r.Type.Str)}`),[o.schemaPath,a]}}(y),Object.defineProperty(h,"__esModule",{value:!0}),h.boolOrEmptySchema=h.topBoolOrEmptySchema=void 0;const R=y,B=g,q=N,M={message:"boolean schema is false"};function L(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,R.reportError)(s,M,void 0,t)}h.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?L(e,!1):"object"==typeof r&&!0===r.$async?t.return(q.default.data):(t.assign(B._`${n}.errors`,null),t.return(!0))},h.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),L(e)):r.var(t,!0)};var V={},U={};Object.defineProperty(U,"__esModule",{value:!0}),U.getRules=U.isJSONType=void 0;const K=new Set(["string","number","integer","boolean","null","object","array"]);U.isJSONType=function(e){return"string"==typeof e&&K.has(e)},U.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var z={};function G(e,t){return t.rules.some((t=>J(e,t)))}function J(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(z,"__esModule",{value:!0}),z.shouldUseRule=z.shouldUseGroup=z.schemaHasRulesForType=void 0,z.schemaHasRulesForType=function({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&G(e,n)},z.shouldUseGroup=G,z.shouldUseRule=J,Object.defineProperty(V,"__esModule",{value:!0}),V.reportTypeError=V.checkDataTypes=V.checkDataType=V.coerceAndCheckDataType=V.getJSONTypes=V.getSchemaTypes=V.DataType=void 0;const H=U,W=z,Y=y,X=g,Q=b;var Z,ee;function te(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(H.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}(ee=Z||(V.DataType=Z={}))[ee.Correct=0]="Correct",ee[ee.Wrong=1]="Wrong",V.getSchemaTypes=function(e){const t=te(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},V.getJSONTypes=te,V.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:s}=e,i=function(e,t){return t?e.filter((e=>re.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),o=t.length>0&&!(0===i.length&&1===t.length&&(0,W.schemaHasRulesForType)(e,t[0]));if(o){const o=se(t,n,s.strictNumbers,Z.Wrong);r.if(o,(()=>{i.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,o=n.let("dataType",X._`typeof ${s}`),a=n.let("coerced",X._`undefined`);"array"===i.coerceTypes&&n.if(X._`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,X._`${s}[0]`).assign(o,X._`typeof ${s}`).if(se(t,s,i.strictNumbers),(()=>n.assign(a,s)))));n.if(X._`${a} !== undefined`);for(const u of r)(re.has(u)||"array"===u&&"array"===i.coerceTypes)&&c(u);function c(e){switch(e){case"string":return void n.elseIf(X._`${o} == "number" || ${o} == "boolean"`).assign(a,X._`"" + ${s}`).elseIf(X._`${s} === null`).assign(a,X._`""`);case"number":return void n.elseIf(X._`${o} == "boolean" || ${s} === null
|
|
2
|
-
|| (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,X._`+${s}`);case"integer":return void n.elseIf(X._`${o} === "boolean" || ${s} === null
|
|
3
|
-
|| (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,X._`+${s}`);case"boolean":return void n.elseIf(X._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf(X._`${s} === "true" || ${s} === 1`).assign(a,!0);case"null":return n.elseIf(X._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(a,null);case"array":n.elseIf(X._`${o} === "string" || ${o} === "number"
|
|
4
|
-
|| ${o} === "boolean" || ${s} === null`).assign(a,X._`[${s}]`)}}n.else(),oe(e),n.endIf(),n.if(X._`${a} !== undefined`,(()=>{n.assign(s,a),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(X._`${t} !== undefined`,(()=>e.assign(X._`${t}[${r}]`,n)))}(e,a)}))}(e,t,i):oe(e)}))}return o};const re=new Set(["string","number","integer","boolean","null"]);function ne(e,t,r,n=Z.Correct){const s=n===Z.Correct?X.operators.EQ:X.operators.NEQ;let i;switch(e){case"null":return X._`${t} ${s} null`;case"array":i=X._`Array.isArray(${t})`;break;case"object":i=X._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=o(X._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=o();break;default:return X._`typeof ${t} ${s} ${e}`}return n===Z.Correct?i:(0,X.not)(i);function o(e=X.nil){return(0,X.and)(X._`typeof ${t} == "number"`,e,r?X._`isFinite(${t})`:X.nil)}}function se(e,t,r,n){if(1===e.length)return ne(e[0],t,r,n);let s;const i=(0,Q.toHash)(e);if(i.array&&i.object){const e=X._`typeof ${t} != "object"`;s=i.null?e:X._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=X.nil;i.number&&delete i.integer;for(const o in i)s=(0,X.and)(s,ne(o,t,r,n));return s}V.checkDataType=ne,V.checkDataTypes=se;const ie={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?X._`{type: ${e}}`:X._`{type: ${t}}`};function oe(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,Q.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,Y.reportError)(t,ie)}V.reportTypeError=oe;var ae={};Object.defineProperty(ae,"__esModule",{value:!0}),ae.assignDefaults=void 0;const ce=g,ue=b;function le(e,t,r){const{gen:n,compositeRule:s,data:i,opts:o}=e;if(void 0===r)return;const a=ce._`${i}${(0,ce.getProperty)(t)}`;if(s)return void(0,ue.checkStrictMode)(e,`default is ignored for: ${a}`);let c=ce._`${a} === undefined`;"empty"===o.useDefaults&&(c=ce._`${c} || ${a} === null || ${a} === ""`),n.if(c,ce._`${a} = ${(0,ce.stringify)(r)}`)}ae.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const s in r)le(e,s,r[s].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>le(e,r,t.default)))};var de={},fe={};Object.defineProperty(fe,"__esModule",{value:!0}),fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;const pe=g,me=b,he=N,ye=b;function ge(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:pe._`Object.prototype.hasOwnProperty`})}function $e(e,t,r){return pe._`${ge(e)}.call(${t}, ${r})`}function ve(e,t,r,n){const s=pe._`${t}${(0,pe.getProperty)(r)} === undefined`;return n?(0,pe.or)(s,(0,pe.not)($e(e,t,r))):s}function be(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}fe.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:s}=e;r.if(ve(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:pe._`${t}`},!0),e.error()}))},fe.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,s){return(0,pe.or)(...n.map((n=>(0,pe.and)(ve(e,t,n,r.ownProperties),pe._`${s} = ${n}`))))},fe.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},fe.hasPropFunc=ge,fe.isOwnProperty=$e,fe.propertyInData=function(e,t,r,n){const s=pe._`${t}${(0,pe.getProperty)(r)} !== undefined`;return n?pe._`${s} && ${$e(e,t,r)}`:s},fe.noPropertyInData=ve,fe.allSchemaProperties=be,fe.schemaProperties=function(e,t){return be(t).filter((r=>!(0,me.alwaysValidSchema)(e,t[r])))},fe.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},a,c,u){const l=u?pe._`${e}, ${t}, ${n}${s}`:t,d=[[he.default.instancePath,(0,pe.strConcat)(he.default.instancePath,i)],[he.default.parentData,o.parentData],[he.default.parentDataProperty,o.parentDataProperty],[he.default.rootData,he.default.rootData]];o.opts.dynamicRef&&d.push([he.default.dynamicAnchors,he.default.dynamicAnchors]);const f=pe._`${l}, ${r.object(...d)}`;return c!==pe.nil?pe._`${a}.call(${c}, ${f})`:pe._`${a}(${f})`};const we=pe._`new RegExp`;fe.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,i=s(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:pe._`${"new RegExp"===s.code?we:(0,ye.useFunc)(e,s)}(${r}, ${n})`})},fe.validateArray=function(e){const{gen:t,data:r,keyword:n,it:s}=e,i=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return o((()=>t.assign(e,!1))),e}return t.var(i,!0),o((()=>t.break())),i;function o(s){const o=t.const("len",pe._`${r}.length`);t.forRange("i",0,o,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:me.Type.Num},i),t.if((0,pe.not)(i),s)}))}},fe.validateUnion=function(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,me.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const i=t.let("valid",!1),o=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const a=e.subschema({keyword:n,schemaProp:s,compositeRule:!0},o);t.assign(i,pe._`${i} || ${o}`);e.mergeValidEvaluated(a,o)||t.if((0,pe.not)(i))})))),e.result(i,(()=>e.reset()),(()=>e.error(!0)))},Object.defineProperty(de,"__esModule",{value:!0}),de.validateKeywordUsage=de.validSchemaType=de.funcKeywordCode=de.macroKeywordCode=void 0;const De=g,Ee=N,_e=fe,ke=y;function Pe(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,De._`${n.parentData}[${n.parentDataProperty}]`)))}function xe(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,De.stringify)(r)})}de.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=e,a=t.macro.call(o.self,s,i,o),c=xe(r,n,a);!1!==o.opts.validateSchema&&o.self.validateSchema(a,!0);const u=r.name("valid");e.subschema({schema:a,schemaPath:De.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},de.funcKeywordCode=function(e,t){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:a,it:c}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(c,t);const u=!a&&t.compile?t.compile.call(c.self,i,o,c):t.validate,l=xe(n,s,u),d=n.let("valid");function f(r=(t.async?De._`await `:De.nil)){const s=c.opts.passContext?Ee.default.this:Ee.default.self,i=!("compile"in t&&!a||!1===t.schema);n.assign(d,De._`${r}${(0,_e.callValidateCode)(e,l,s,i)}`,t.modifying)}function p(e){var r;n.if((0,De.not)(null!==(r=t.valid)&&void 0!==r?r:d),e)}e.block$data(d,(function(){if(!1===t.errors)f(),t.modifying&&Pe(e),p((()=>e.error()));else{const r=t.async?function(){const e=n.let("ruleErrs",null);return n.try((()=>f(De._`await `)),(t=>n.assign(d,!1).if(De._`${t} instanceof ${c.ValidationError}`,(()=>n.assign(e,De._`${t}.errors`)),(()=>n.throw(t))))),e}():function(){const e=De._`${l}.errors`;return n.assign(e,null),f(De.nil),e}();t.modifying&&Pe(e),p((()=>function(e,t){const{gen:r}=e;r.if(De._`Array.isArray(${t})`,(()=>{r.assign(Ee.default.vErrors,De._`${Ee.default.vErrors} === null ? ${t} : ${Ee.default.vErrors}.concat(${t})`).assign(Ee.default.errors,De._`${Ee.default.vErrors}.length`),(0,ke.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:d)},de.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},de.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}};var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.extendSubschemaMode=Fe.extendSubschemaData=Fe.getSubschema=void 0;const Ae=g,Se=b;Fe.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(void 0!==t&&void 0!==n)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const n=e.schema[t];return void 0===r?{schema:n,schemaPath:Ae._`${e.schemaPath}${(0,Ae.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:Ae._`${e.schemaPath}${(0,Ae.getProperty)(t)}${(0,Ae.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Se.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===s||void 0===i||void 0===o)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},Fe.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(void 0!==r){const{errorPath:s,dataPathArr:i,opts:o}=t;c(a.let("data",Ae._`${t.data}${(0,Ae.getProperty)(r)}`,!0)),e.errorPath=Ae.str`${s}${(0,Se.getErrorPath)(r,n,o.jsPropertySyntax)}`,e.parentDataProperty=Ae._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}if(void 0!==s){c(s instanceof Ae.Name?s:a.let("data",s,!0)),void 0!==o&&(e.propertyName=o)}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}i&&(e.dataTypes=i)},Fe.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r};var je={},Ce=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r},Oe={exports:{}},Ne=Oe.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Ie(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Ie(e,t,r,n,s,i,o,a,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,s,i,o,a,c,u),n){var d=n[l];if(Array.isArray(d)){if(l in Ne.arrayKeywords)for(var f=0;f<d.length;f++)Ie(e,t,r,d[f],s+"/"+l+"/"+f,i,s,l,n,f)}else if(l in Ne.propsKeywords){if(d&&"object"==typeof d)for(var p in d)Ie(e,t,r,d[p],s+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),i,s,l,n,p)}else(l in Ne.keywords||e.allKeys&&!(l in Ne.skipKeywords))&&Ie(e,t,r,d,s+"/"+l,i,s,l,n)}r(n,s,i,o,a,c,u)}}Ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ne.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var Te=Oe.exports;Object.defineProperty(je,"__esModule",{value:!0}),je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;const Re=b,Be=Ce,qe=Te,Me=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);je.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!Ve(e):!!t&&Ue(e)<=t)};const Le=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ve(e){for(const t in e){if(Le.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Ve))return!0;if("object"==typeof r&&Ve(r))return!0}return!1}function Ue(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!Me.has(r)&&("object"==typeof e[r]&&(0,Re.eachItem)(e[r],(e=>t+=Ue(e))),t===1/0))return 1/0}return t}function Ke(e,t="",r){!1!==r&&(t=Je(t));const n=e.parse(t);return ze(e,n)}function ze(e,t){return e.serialize(t).split("#")[0]+"#"}je.getFullPath=Ke,je._getFullPath=ze;const Ge=/#\/?$/;function Je(e){return e?e.replace(Ge,""):""}je.normalizeId=Je,je.resolveUrl=function(e,t,r){return r=Je(r),e.resolve(t,r)};const He=/^[a-z_][-a-z0-9._]*$/i;je.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=Je(e[r]||t),i={"":s},o=Ke(n,s,!1),a={},c=new Set;return qe(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const d=o+t;let f=i[s];function p(t){const r=this.opts.uriResolver.resolve;if(t=Je(f?r(f,t):t),c.has(t))throw l(t);c.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==Je(d)&&("#"===t[0]?(u(e,a[t],t),a[t]=e):this.refs[t]=d),t}function m(e){if("string"==typeof e){if(!He.test(e))throw new Error(`invalid anchor "${e}"`);p.call(this,`#${e}`)}}"string"==typeof e[r]&&(f=p.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),i[t]=f})),a;function u(e,t,r){if(void 0!==t&&!Be(e,t))throw l(r)}function l(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Object.defineProperty(m,"__esModule",{value:!0}),m.getData=m.KeywordCxt=m.validateFunctionCode=void 0;const We=h,Ye=V,Xe=z,Qe=V,Ze=ae,et=de,tt=Fe,rt=g,nt=N,st=je,it=b,ot=y;function at({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,rt._`${nt.default.data}, ${nt.default.valCxt}`,n.$async,(()=>{e.code(rt._`"use strict"; ${ct(r,s)}`),function(e,t){e.if(nt.default.valCxt,(()=>{e.var(nt.default.instancePath,rt._`${nt.default.valCxt}.${nt.default.instancePath}`),e.var(nt.default.parentData,rt._`${nt.default.valCxt}.${nt.default.parentData}`),e.var(nt.default.parentDataProperty,rt._`${nt.default.valCxt}.${nt.default.parentDataProperty}`),e.var(nt.default.rootData,rt._`${nt.default.valCxt}.${nt.default.rootData}`),t.dynamicRef&&e.var(nt.default.dynamicAnchors,rt._`${nt.default.valCxt}.${nt.default.dynamicAnchors}`)}),(()=>{e.var(nt.default.instancePath,rt._`""`),e.var(nt.default.parentData,rt._`undefined`),e.var(nt.default.parentDataProperty,rt._`undefined`),e.var(nt.default.rootData,nt.default.data),t.dynamicRef&&e.var(nt.default.dynamicAnchors,rt._`{}`)}))}(e,s),e.code(i)})):e.func(t,rt._`${nt.default.data}, ${function(e){return rt._`{${nt.default.instancePath}="", ${nt.default.parentData}, ${nt.default.parentDataProperty}, ${nt.default.rootData}=${nt.default.data}${e.dynamicRef?rt._`, ${nt.default.dynamicAnchors}={}`:rt.nil}}={}`}(s)}`,n.$async,(()=>e.code(ct(r,s)).code(i)))}function ct(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?rt._`/*# sourceURL=${r} */`:rt.nil}function ut(e,t){dt(e)&&(ft(e),lt(e))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&mt(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,st.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",nt.default.errors);pt(e,i),n.var(t,rt._`${i} === ${nt.default.errors}`)}(e,t):(0,We.boolOrEmptySchema)(e,t)}function lt({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function dt(e){return"boolean"!=typeof e.schema}function ft(e){(0,it.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,it.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function pt(e,t){if(e.opts.jtd)return ht(e,[],!1,t);const r=(0,Ye.getSchemaTypes)(e.schema);ht(e,r,!(0,Ye.coerceAndCheckDataType)(e,r),t)}function mt({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(!0===s.$comment)e.code(rt._`${nt.default.self}.logger.log(${i})`);else if("function"==typeof s.$comment){const r=rt.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(rt._`${nt.default.self}.opts.$comment(${i}, ${r}, ${s}.schema)`)}}function ht(e,t,r,n){const{gen:s,schema:i,data:o,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;function d(u){(0,Xe.shouldUseGroup)(i,u)&&(u.type?(s.if((0,Qe.checkDataType)(u.type,o,c.strictNumbers)),yt(e,u),1===t.length&&t[0]===u.type&&r&&(s.else(),(0,Qe.reportTypeError)(e)),s.endIf()):yt(e,u),a||s.if(rt._`${nt.default.errors} === ${n||0}`))}!i.$ref||!c.ignoreKeywordsWithRef&&(0,it.schemaHasRulesButRef)(i,l)?(c.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{$t(e.dataTypes,t)||vt(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)$t(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&vt(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,Xe.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>gt(t,e)))&&vt(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),s.block((()=>{for(const e of l.rules)d(e);d(l.post)}))):s.block((()=>wt(e,"$ref",l.all.$ref.definition)))}function yt(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,Ze.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,Xe.shouldUseRule)(n,r)&&wt(e,r.keyword,r.definition,t.type)}))}function gt(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function $t(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function vt(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,it.checkStrictMode)(e,t,e.opts.strictTypes)}m.validateFunctionCode=function(e){dt(e)&&(ft(e),lt(e))?function(e){const{schema:t,opts:r,gen:n}=e;at(e,(()=>{r.$comment&&t.$comment&&mt(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,it.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(nt.default.vErrors,null),n.let(nt.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",rt._`${r}.evaluated`),t.if(rt._`${e.evaluated}.dynamicProps`,(()=>t.assign(rt._`${e.evaluated}.props`,rt._`undefined`))),t.if(rt._`${e.evaluated}.dynamicItems`,(()=>t.assign(rt._`${e.evaluated}.items`,rt._`undefined`)))}(e),pt(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if(rt._`${nt.default.errors} === 0`,(()=>t.return(nt.default.data)),(()=>t.throw(rt._`new ${s}(${nt.default.vErrors})`))):(t.assign(rt._`${n}.errors`,nt.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof rt.Name&&e.assign(rt._`${t}.props`,r);n instanceof rt.Name&&e.assign(rt._`${t}.items`,n)}(e),t.return(rt._`${nt.default.errors} === 0`))}(e)}))}(e):at(e,(()=>(0,We.topBoolOrEmptySchema)(e)))};class bt{constructor(e,t,r){if((0,et.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,it.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",_t(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,et.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",nt.default.errors))}result(e,t,r){this.failResult((0,rt.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,rt.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(rt._`${t} !== undefined && (${(0,rt.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?ot.reportExtraError:ot.reportError)(this,this.def.error,t)}$dataError(){(0,ot.reportError)(this,this.def.$dataError||ot.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,ot.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=rt.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=rt.nil,t=rt.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:i}=this;r.if((0,rt.or)(rt._`${n} === undefined`,t)),e!==rt.nil&&r.assign(e,!0),(s.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==rt.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return(0,rt.or)(function(){if(r.length){if(!(t instanceof rt.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return rt._`${(0,Qe.checkDataTypes)(e,t,s.opts.strictNumbers,Qe.DataType.Wrong)}`}return rt.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return rt._`!${r}(${t})`}return rt.nil}())}subschema(e,t){const r=(0,tt.getSubschema)(this.it,e);(0,tt.extendSubschemaData)(r,this.it,e),(0,tt.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return ut(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=it.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=it.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,rt.Name))),!0}}function wt(e,t,r,n){const s=new bt(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,et.funcKeywordCode)(s,r):"macro"in r?(0,et.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,et.funcKeywordCode)(s,r)}m.KeywordCxt=bt;const Dt=/^\/(?:[^~]|~0|~1)*$/,Et=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function _t(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(""===e)return nt.default.rootData;if("/"===e[0]){if(!Dt.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=nt.default.rootData}else{const o=Et.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(s=o[2],"#"===s){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!s)return i}let o=i;const a=s.split("/");for(const u of a)u&&(i=rt._`${i}${(0,rt.getProperty)((0,it.unescapeJsonPointer)(u))}`,o=rt._`${o} && ${i}`);return o;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}m.getData=_t;var kt={};Object.defineProperty(kt,"__esModule",{value:!0});class Pt extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}kt.default=Pt;var xt={};Object.defineProperty(xt,"__esModule",{value:!0});const Ft=je;class At extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,Ft.resolveUrl)(e,t,r),this.missingSchema=(0,Ft.normalizeId)((0,Ft.getFullPath)(e,this.missingRef))}}xt.default=At;var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.resolveSchema=St.getCompilingSchema=St.resolveRef=St.compileSchema=St.SchemaEnv=void 0;const jt=g,Ct=kt,Ot=N,Nt=je,It=b,Tt=m;class Rt{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,Nt.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function Bt(e){const t=Mt.call(this,e);if(t)return t;const r=(0,Nt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new jt.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let a;e.$async&&(a=o.scopeValue("Error",{ref:Ct.default,code:jt._`require("ajv/dist/runtime/validation_error").default`}));const c=o.scopeName("validate");e.validateName=c;const u={gen:o,allErrors:this.opts.allErrors,data:Ot.default.data,parentData:Ot.default.parentData,parentDataProperty:Ot.default.parentDataProperty,dataNames:[Ot.default.data],dataPathArr:[jt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,jt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:jt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:jt._`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,Tt.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);const t=o.toString();l=`${o.scopeRefs(Ot.default.scope)}return ${t}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const r=new Function(`${Ot.default.self}`,`${Ot.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:c,validateCode:t,scopeValues:o._values}),this.opts.unevaluated){const{props:e,items:t}=u;r.evaluated={props:e instanceof jt.Name?void 0:e,items:t instanceof jt.Name?void 0:t,dynamicProps:e instanceof jt.Name,dynamicItems:t instanceof jt.Name},r.source&&(r.source.evaluated=(0,jt.stringify)(r.evaluated))}return e.validate=r,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}function qt(e){return(0,Nt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Bt.call(this,e)}function Mt(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function Lt(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||Vt.call(this,e,t)}function Vt(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Nt._getFullPath)(this.opts.uriResolver,r);let s=(0,Nt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return Kt.call(this,r,e);const i=(0,Nt.normalizeId)(n),o=this.refs[i]||this.schemas[i];if("string"==typeof o){const t=Vt.call(this,e,o);if("object"!=typeof(null==t?void 0:t.schema))return;return Kt.call(this,r,t)}if("object"==typeof(null==o?void 0:o.schema)){if(o.validate||Bt.call(this,o),i===(0,Nt.normalizeId)(t)){const{schema:t}=o,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,Nt.resolveUrl)(this.opts.uriResolver,s,n)),new Rt({schema:t,schemaId:r,root:e,baseId:s})}return Kt.call(this,r,o)}}St.SchemaEnv=Rt,St.compileSchema=Bt,St.resolveRef=function(e,t,r){var n;r=(0,Nt.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=Lt.call(this,e,r);if(void 0===i){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;s&&(i=new Rt({schema:s,schemaId:o,root:e,baseId:t}))}return void 0!==i?e.refs[r]=qt.call(this,i):void 0},St.getCompilingSchema=Mt,St.resolveSchema=Vt;const Ut=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Kt(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const a of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,It.unescapeFragment)(a)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!Ut.has(a)&&n&&(t=(0,Nt.resolveUrl)(this.opts.uriResolver,t,n))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,It.schemaHasRulesButRef)(r,this.RULES)){const e=(0,Nt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Vt.call(this,n,e)}const{schemaId:o}=this.opts;return i=i||new Rt({schema:r,schemaId:o,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}const zt={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Gt={},Jt={exports:{}};var Ht={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:Wt}=Ht;function Yt(e){if(er(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:Zt(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Xt(e,t=!1){let r="",n=!0;for(const s of e){if(void 0===Wt[s])return;"0"!==s&&!0===n&&(n=!1),n||(r+=s)}return t&&0===r.length&&(r="0"),r}function Qt(e,t={}){if(er(e,":")<2)return{host:e,isIPV6:!1};const r=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],s=[];let i=!1,o=!1,a=!1;function c(){if(s.length){if(!1===i){const e=Xt(s);if(void 0===e)return r.error=!0,!1;n.push(e)}s.length=0}return!0}for(let u=0;u<e.length;u++){const l=e[u];if("["!==l&&"]"!==l)if(":"!==l)if("%"===l){if(!c())break;i=!0}else s.push(l);else{if(!0===o&&(a=!0),!c())break;if(t++,n.push(":"),t>7){r.error=!0;break}u-1>=0&&":"===e[u-1]&&(o=!0)}}return s.length&&(i?r.zone=s.join(""):a?n.push(s.join("")):n.push(Xt(s))),r.address=n.join(""),r}(e);if(r.error)return{host:e,isIPV6:!1};{let e=r.address,t=r.address;return r.zone&&(e+="%"+r.zone,t+="%25"+r.zone),{host:e,escapedHost:t,isIPV6:!0}}}function Zt(e,t){let r="",n=!0;const s=e.length;for(let i=0;i<s;i++){const o=e[i];"0"===o&&n?(i+1<=s&&e[i+1]===t||i+1===s)&&(r+=o,n=!1):(n=o===t,r+=o)}return r}function er(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const tr=/^\.\.?\//u,rr=/^\/\.(?:\/|$)/u,nr=/^\/\.\.(?:\/|$)/u,sr=/^\/?(?:.|\n)*?(?=\/|$)/u;var ir={recomposeAuthority:function(e,t){const r=[];if(void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host){let t=unescape(e.host);const n=Yt(t);if(n.isIPV4)t=n.host;else{const r=Qt(n.host,{isIPV4:!1});t=!0===r.isIPV6?`[${r.escapedHost}]`:e.host}r.push(t)}return"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){const t=[];for(;e.length;)if(e.match(tr))e=e.replace(tr,"");else if(e.match(rr))e=e.replace(rr,"/");else if(e.match(nr))e=e.replace(nr,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(sr);if(!r)throw new Error("Unexpected dot segment condition");{const n=r[0];e=e.slice(n.length),t.push(n)}}return t.join("")},normalizeIPv4:Yt,normalizeIPv6:Qt,stringArrayToHexStripped:Xt};const or=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,ar=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function cr(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function ur(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function lr(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const dr={scheme:"http",domainHost:!0,parse:ur,serialize:lr},fr={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=cr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(cr(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},pr={http:dr,https:{scheme:"https",domainHost:dr.domainHost,parse:ur,serialize:lr},ws:fr,wss:{scheme:"wss",domainHost:fr.domainHost,parse:fr.parse,serialize:fr.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(ar);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const s=`${n}:${t.nid||e.nid}`,i=pr[s];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=`${r}:${t.nid||n}`,i=pr[s];i&&(e=i.serialize(e,t));const o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&or.test(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};var mr=pr;const{normalizeIPv6:hr,normalizeIPv4:yr,removeDotSegments:gr,recomposeAuthority:$r,normalizeComponentEncoding:vr}=ir,br=mr;function wr(e,t,r,n){const s={};return n||(e=kr(Dr(e,r),r),t=kr(Dr(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=gr(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=gr(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=gr(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=gr(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function Dr(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),s=[],i=br[(n.scheme||r.scheme||"").toLowerCase()];i&&i.serialize&&i.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&(s.push(r.scheme),s.push(":"));const o=$r(r,n);if(void 0!==o&&("suffix"!==n.reference&&s.push("//"),s.push(o),r.path&&"/"!==r.path.charAt(0)&&s.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||i&&i.absolutePath||(e=gr(e)),void 0===o&&(e=e.replace(/^\/\//u,"/%2F")),s.push(e)}return void 0!==r.query&&(s.push("?"),s.push(r.query)),void 0!==r.fragment&&(s.push("#"),s.push(r.fragment)),s.join("")}const Er=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));const _r=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function kr(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let i=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const o=e.match(_r);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host){const e=yr(n.host);if(!1===e.isIPV4){const t=hr(e.host,{isIPV4:!1});n.host=t.host.toLowerCase(),i=t.isIPV6}else n.host=e.host,i=!0}void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const e=br[(r.scheme||n.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&n.host&&(r.domainHost||e&&e.domainHost)&&!1===i&&function(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||Er[t])return!0;return!1}(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!e||e&&!e.skipNormalize)&&(s&&void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),s&&void 0!==n.userinfo&&(n.userinfo=unescape(n.userinfo)),s&&void 0!==n.host&&(n.host=unescape(n.host)),void 0!==n.path&&n.path.length&&(n.path=escape(unescape(n.path))),void 0!==n.fragment&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),e&&e.parse&&e.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const Pr={SCHEMES:br,normalize:function(e,t){return"string"==typeof e?e=Dr(kr(e,t),t):"object"==typeof e&&(e=kr(Dr(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return Dr(wr(kr(e,n),kr(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:wr,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=Dr(vr(kr(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=Dr(vr(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=Dr(vr(kr(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=Dr(vr(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:Dr,parse:kr};Jt.exports=Pr,Jt.exports.default=Pr,Jt.exports.fastUri=Pr;var xr=Jt.exports;Object.defineProperty(Gt,"__esModule",{value:!0});const Fr=xr;Fr.code='require("ajv/dist/runtime/uri").default',Gt.default=Fr,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=m;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=g;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=kt,s=xt,i=U,o=St,a=g,c=je,u=V,l=b,d=zt,f=Gt,p=(e,t)=>new RegExp(e,t);p.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),$={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,s,i,o,a,c,u,l,d,m,h,y,g,$,v,b,w,D,E,_,k,P,x;const F=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,S=!0===A||void 0===A?1:A||0,j=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:p,C=null!==(s=e.uriResolver)&&void 0!==s?s:f.default;return{strictSchema:null===(o=null!==(i=e.strictSchema)&&void 0!==i?i:F)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:F)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:F)&&void 0!==l?l:"log",strictTuples:null!==(m=null!==(d=e.strictTuples)&&void 0!==d?d:F)&&void 0!==m?m:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:F)&&void 0!==y&&y,code:e.code?{...e.code,optimize:S,regExp:j}:{optimize:S,regExp:j},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==($=e.loopEnum)&&void 0!==$?$:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(D=e.schemaId)&&void 0!==D?D:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(_=e.validateSchema)||void 0===_||_,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:C}}class D{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),E.call(this,$,e,"NOT SUPPORTED"),E.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=F.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=_.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new o.SchemaEnv({schema:{},schemaId:r});if(t=o.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=_.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,l.eachItem)(r,(e=>C.call(this,e))),this;N.call(this,t);const n={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=s[e];n&&i&&(s[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(void 0!==u)return u;r=(0,c.normalizeId)(i||r);const l=c.getSchemaRefs.call(this,e,r);return u=new o.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:l}),this._cache.set(u.schema,u),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=u),n&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}}function E(e,t,r,n="error"){for(const s in e){const i=s;i in t&&this.logger[n](`${r}: option ${s}. ${e[i]}`)}}function _(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function F(){const e={...this.opts};for(const t of h)delete e[t];return e}D.ValidationError=n.default,D.MissingRefError=s.default,e.default=D;const A={log(){},warn(){},error(){}};const S=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,l.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!S.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=s?i.post:i.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},i.rules.push(o)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?O.call(this,o,a,t.before):o.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function O(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=T(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,I]}}}(p);var Ar={},Sr={},jr={};Object.defineProperty(jr,"__esModule",{value:!0}),jr.callRef=jr.getValidate=void 0;const Cr=xt,Or=fe,Nr=g,Ir=N,Tr=St,Rr=b,Br={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:i,validateName:o,opts:a,self:c}=n,{root:u}=i;if(("#"===r||"#/"===r)&&s===u.baseId)return function(){if(i===u)return Mr(e,o,i,i.$async);const r=t.scopeValue("root",{ref:u});return Mr(e,Nr._`${r}.validate`,u,u.$async)}();const l=Tr.resolveRef.call(c,u,s,r);if(void 0===l)throw new Cr.default(n.opts.uriResolver,s,r);return l instanceof Tr.SchemaEnv?function(t){const r=qr(e,t);Mr(e,r,t,t.$async)}(l):function(n){const s=t.scopeValue("schema",!0===a.code.source?{ref:n,code:(0,Nr.stringify)(n)}:{ref:n}),i=t.name("valid"),o=e.subschema({schema:n,dataTypes:[],schemaPath:Nr.nil,topSchemaRef:s,errSchemaPath:r},i);e.mergeEvaluated(o),e.ok(i)}(l)}};function qr(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):Nr._`${r.scopeValue("wrapper",{ref:t})}.validate`}function Mr(e,t,r,n){const{gen:s,it:i}=e,{allErrors:o,schemaEnv:a,opts:c}=i,u=c.passContext?Ir.default.this:Nr.nil;function l(e){const t=Nr._`${e}.errors`;s.assign(Ir.default.vErrors,Nr._`${Ir.default.vErrors} === null ? ${t} : ${Ir.default.vErrors}.concat(${t})`),s.assign(Ir.default.errors,Nr._`${Ir.default.vErrors}.length`)}function d(e){var t;if(!i.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==i.props)if(n&&!n.dynamicProps)void 0!==n.props&&(i.props=Rr.mergeEvaluated.props(s,n.props,i.props));else{const t=s.var("props",Nr._`${e}.evaluated.props`);i.props=Rr.mergeEvaluated.props(s,t,i.props,Nr.Name)}if(!0!==i.items)if(n&&!n.dynamicItems)void 0!==n.items&&(i.items=Rr.mergeEvaluated.items(s,n.items,i.items));else{const t=s.var("items",Nr._`${e}.evaluated.items`);i.items=Rr.mergeEvaluated.items(s,t,i.items,Nr.Name)}}n?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(Nr._`await ${(0,Or.callValidateCode)(e,t,u)}`),d(t),o||s.assign(r,!0)}),(e=>{s.if(Nr._`!(${e} instanceof ${i.ValidationError})`,(()=>s.throw(e))),l(e),o||s.assign(r,!1)})),e.ok(r)}():e.result((0,Or.callValidateCode)(e,t,u),(()=>d(t)),(()=>l(t)))}jr.getValidate=qr,jr.callRef=Mr,jr.default=Br,Object.defineProperty(Sr,"__esModule",{value:!0});const Lr=["$schema","id","$defs",{keyword:"$comment"},"definitions",jr.default];Sr.default=Lr;var Vr={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});const Kr=p,zr=g.operators,Gr={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:zr.LTE,fail:zr.GT},{okStr:"<",ok:zr.LT,fail:zr.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:zr.GTE,fail:zr.LT},{okStr:">",ok:zr.GT,fail:zr.LTE}]}},Jr={message:e=>Kr.str`must be ${Wr(e).okStr} ${e.schemaCode}`,params:e=>Kr._`{comparison: ${Wr(e).okStr}, limit: ${e.schemaCode}}`},Hr={keyword:Object.keys(Gr),type:"number",schemaType:"number",$data:!0,error:Jr,code(e){const{data:t,schemaCode:r}=e;e.fail$data(Kr._`${t} ${Wr(e).fail} ${r} || isNaN(${t})`)}};function Wr(e){var t;const r=e.keyword,n=(null===(t=e.parentSchema)||void 0===t?void 0:t[Gr[r].exclusive])?1:0;return Gr[r].ops[n]}Ur.default=Hr;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});const Xr={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},Qr={keyword:Object.keys(Xr),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){const r=Xr[e];if(void 0===t[r])throw new Error(`${e} can only be used with ${r}`)}};Yr.default=Qr;var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});const en=g,tn={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>en.str`must be multiple of ${e}`,params:({schemaCode:e})=>en._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,o=t.let("res"),a=i?en._`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:en._`${o} !== parseInt(${o})`;e.fail$data(en._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};Zr.default=tn;var rn={},nn={};function sn(e){const t=e.length;let r,n=0,s=0;for(;s<t;)n++,r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<t&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return n}Object.defineProperty(nn,"__esModule",{value:!0}),nn.default=sn,sn.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(rn,"__esModule",{value:!0});const on=g,an=b,cn=nn,un={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>on.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>on._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,i="maxLength"===t?on.operators.GT:on.operators.LT,o=!1===s.opts.unicode?on._`${r}.length`:on._`${(0,an.useFunc)(e.gen,cn.default)}(${r})`;e.fail$data(on._`${o} ${i} ${n}`)}};rn.default=un;var ln={};Object.defineProperty(ln,"__esModule",{value:!0});const dn=fe,fn=g,pn={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>fn.str`must match pattern "${e}"`,params:({schemaCode:e})=>fn._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:i}=e,o=i.opts.unicodeRegExp?"u":"",a=r?fn._`(new RegExp(${s}, ${o}))`:(0,dn.usePattern)(e,n);e.fail$data(fn._`!${a}.test(${t})`)}};ln.default=pn;var mn={};Object.defineProperty(mn,"__esModule",{value:!0});const hn=g,yn={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>hn.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>hn._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?hn.operators.GT:hn.operators.LT;e.fail$data(hn._`Object.keys(${r}).length ${s} ${n}`)}};mn.default=yn;var gn={};Object.defineProperty(gn,"__esModule",{value:!0});const $n=fe,vn=g,bn=b,wn={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>vn.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>vn._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:i,it:o}=e,{opts:a}=o;if(!i&&0===r.length)return;const c=r.length>=a.loopRequired;if(o.allErrors?function(){if(c||i)e.block$data(vn.nil,u);else for(const t of r)(0,$n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(c||i){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(i,(0,$n.propertyInData)(t,s,r,a.ownProperties)),t.if((0,vn.not)(i),(()=>{e.error(),t.break()}))}),vn.nil)}(o,r))),e.ok(r)}else t.if((0,$n.checkMissingProp)(e,r,o)),(0,$n.reportMissingProp)(e,o),t.else()}(),a.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${o.schemaEnv.baseId+o.errSchemaPath}" (strictRequired)`;(0,bn.checkStrictMode)(o,t,o.opts.strictRequired)}}function u(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,$n.noPropertyInData)(t,s,r,a.ownProperties),(()=>e.error()))}))}}};gn.default=wn;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const En=g,_n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>En.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>En._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?En.operators.GT:En.operators.LT;e.fail$data(En._`${r}.length ${s} ${n}`)}};Dn.default=_n;var kn={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});const xn=Ce;xn.code='require("ajv/dist/runtime/equal").default',Pn.default=xn,Object.defineProperty(kn,"__esModule",{value:!0});const Fn=V,An=g,Sn=b,jn=Pn,Cn={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>An.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>An._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:a}=e;if(!n&&!s)return;const c=t.let("valid"),u=i.items?(0,Fn.getSchemaTypes)(i.items):[];function l(n,s){const i=t.name("item"),o=(0,Fn.checkDataTypes)(u,i,a.opts.strictNumbers,Fn.DataType.Wrong),l=t.const("indices",An._`{}`);t.for(An._`;${n}--;`,(()=>{t.let(i,An._`${r}[${n}]`),t.if(o,An._`continue`),u.length>1&&t.if(An._`typeof ${i} == "string"`,An._`${i} += "_"`),t.if(An._`typeof ${l}[${i}] == "number"`,(()=>{t.assign(s,An._`${l}[${i}]`),e.error(),t.assign(c,!1).break()})).code(An._`${l}[${i}] = ${n}`)}))}function d(n,s){const i=(0,Sn.useFunc)(t,jn.default),o=t.name("outer");t.label(o).for(An._`;${n}--;`,(()=>t.for(An._`${s} = ${n}; ${s}--;`,(()=>t.if(An._`${i}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(c,!1).break(o)}))))))}e.block$data(c,(function(){const n=t.let("i",An._`${r}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(c,!0),t.if(An._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?l:d)(n,s)))}),An._`${o} === false`),e.ok(c)}};kn.default=Cn;var On={};Object.defineProperty(On,"__esModule",{value:!0});const Nn=g,In=b,Tn=Pn,Rn={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>Nn._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:i}=e;n||i&&"object"==typeof i?e.fail$data(Nn._`!${(0,In.useFunc)(t,Tn.default)}(${r}, ${s})`):e.fail(Nn._`${i} !== ${r}`)}};On.default=Rn;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const qn=g,Mn=b,Ln=Pn,Vn={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>qn._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:i,it:o}=e;if(!n&&0===s.length)throw new Error("enum must have non-empty array");const a=s.length>=o.opts.loopEnum;let c;const u=()=>null!=c?c:c=(0,Mn.useFunc)(t,Ln.default);let l;if(a||n)l=t.let("valid"),e.block$data(l,(function(){t.assign(l,!1),t.forOf("v",i,(e=>t.if(qn._`${u()}(${r}, ${e})`,(()=>t.assign(l,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",i);l=(0,qn.or)(...s.map(((t,n)=>function(e,t){const n=s[t];return"object"==typeof n&&null!==n?qn._`${u()}(${r}, ${e}[${t}])`:qn._`${r} === ${n}`}(e,n))))}e.pass(l)}};Bn.default=Vn,Object.defineProperty(Vr,"__esModule",{value:!0});const Un=Yr,Kn=Zr,zn=rn,Gn=ln,Jn=mn,Hn=gn,Wn=Dn,Yn=kn,Xn=On,Qn=Bn,Zn=[Ur.default,Un.default,Kn.default,zn.default,Gn.default,Jn.default,Hn.default,Wn.default,Yn.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Xn.default,Qn.default];Vr.default=Zn;var es={},ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.validateAdditionalItems=void 0;const rs=g,ns=b,ss={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>rs.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>rs._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?is(e,n):(0,ns.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function is(e,t){const{gen:r,schema:n,data:s,keyword:i,it:o}=e;o.items=!0;const a=r.const("len",rs._`${s}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(rs._`${a} <= ${t.length}`);else if("object"==typeof n&&!(0,ns.alwaysValidSchema)(o,n)){const n=r.var("valid",rs._`${a} <= ${t.length}`);r.if((0,rs.not)(n),(()=>function(n){r.forRange("i",t.length,a,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:ns.Type.Num},n),o.allErrors||r.if((0,rs.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}ts.validateAdditionalItems=is,ts.default=ss;var os={},as={};Object.defineProperty(as,"__esModule",{value:!0}),as.validateTuple=void 0;const cs=g,us=b,ls=fe,ds={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return fs(e,"additionalItems",t);r.items=!0,(0,us.alwaysValidSchema)(r,t)||e.ok((0,ls.validateArray)(e))}};function fs(e,t,r=e.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:a}=e;!function(e){const{opts:n,errSchemaPath:s}=a,i=r.length,c=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(n.strictTuples&&!c){const e=`"${o}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,us.checkStrictMode)(a,e,n.strictTuples)}}(s),a.opts.unevaluated&&r.length&&!0!==a.items&&(a.items=us.mergeEvaluated.items(n,r.length,a.items));const c=n.name("valid"),u=n.const("len",cs._`${i}.length`);r.forEach(((t,r)=>{(0,us.alwaysValidSchema)(a,t)||(n.if(cs._`${u} > ${r}`,(()=>e.subschema({keyword:o,schemaProp:r,dataProp:r},c))),e.ok(c))}))}as.validateTuple=fs,as.default=ds,Object.defineProperty(os,"__esModule",{value:!0});const ps=as,ms={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,ps.validateTuple)(e,"items")};os.default=ms;var hs={};Object.defineProperty(hs,"__esModule",{value:!0});const ys=g,gs=b,$s=fe,vs=ts,bs={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>ys.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ys._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,gs.alwaysValidSchema)(n,t)||(s?(0,vs.validateAdditionalItems)(e,s):e.ok((0,$s.validateArray)(e)))}};hs.default=bs;var ws={};Object.defineProperty(ws,"__esModule",{value:!0});const Ds=g,Es=b,_s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?Ds.str`must contain at least ${e} valid item(s)`:Ds.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?Ds._`{minContains: ${e}}`:Ds._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;let o,a;const{minContains:c,maxContains:u}=n;i.opts.next?(o=void 0===c?1:c,a=u):o=1;const l=t.const("len",Ds._`${s}.length`);if(e.setParams({min:o,max:a}),void 0===a&&0===o)return void(0,Es.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==a&&o>a)return(0,Es.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,Es.alwaysValidSchema)(i,r)){let t=Ds._`${l} >= ${o}`;return void 0!==a&&(t=Ds._`${t} && ${l} <= ${a}`),void e.pass(t)}i.items=!0;const d=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);p(e,(()=>t.if(e,(()=>function(e){t.code(Ds._`${e}++`),void 0===a?t.if(Ds._`${e} >= ${o}`,(()=>t.assign(d,!0).break())):(t.if(Ds._`${e} > ${a}`,(()=>t.assign(d,!1).break())),1===o?t.assign(d,!0):t.if(Ds._`${e} >= ${o}`,(()=>t.assign(d,!0))))}(r)))))}function p(r,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:Es.Type.Num,compositeRule:!0},r),n()}))}void 0===a&&1===o?p(d,(()=>t.if(d,(()=>t.break())))):0===o?(t.let(d,!0),void 0!==a&&t.if(Ds._`${s}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,(()=>e.reset()))}};ws.default=_s;var ks={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=g,r=b,n=fe;e.error={message:({params:{property:e,depsCount:r,deps:n}})=>t.str`must have ${1===r?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:n,missingProperty:s}})=>t._`{property: ${e},
|
|
5
|
-
missingProperty: ${s},
|
|
6
|
-
depsCount: ${r},
|
|
7
|
-
deps: ${n}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);i(e,t),o(e,r)}};function i(e,r=e.schema){const{gen:s,data:i,it:o}=e;if(0===Object.keys(r).length)return;const a=s.let("missing");for(const c in r){const u=r[c];if(0===u.length)continue;const l=(0,n.propertyInData)(s,i,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),o.allErrors?s.if(l,(()=>{for(const t of u)(0,n.checkReportMissingProp)(e,t)})):(s.if(t._`${l} && (${(0,n.checkMissingProp)(e,u,a)})`),(0,n.reportMissingProp)(e,a),s.else())}}function o(e,t=e.schema){const{gen:s,data:i,keyword:o,it:a}=e,c=s.name("valid");for(const u in t)(0,r.alwaysValidSchema)(a,t[u])||(s.if((0,n.propertyInData)(s,i,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>s.var(c,!0))),e.ok(c))}e.validatePropertyDeps=i,e.validateSchemaDeps=o,e.default=s}(ks);var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});const xs=g,Fs=b,As={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>xs._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,Fs.alwaysValidSchema)(s,r))return;const i=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,xs.not)(i),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(i)}};Ps.default=As;var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});const js=fe,Cs=g,Os=N,Ns=b,Is={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>Cs._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:c}=o;if(o.props=!0,"all"!==c.removeAdditional&&(0,Ns.alwaysValidSchema)(o,r))return;const u=(0,js.allSchemaProperties)(n.properties),l=(0,js.allSchemaProperties)(n.patternProperties);function d(e){t.code(Cs._`delete ${s}[${e}]`)}function f(n){if("all"===c.removeAdditional||c.removeAdditional&&!1===r)d(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(a||t.break());if("object"==typeof r&&!(0,Ns.alwaysValidSchema)(o,r)){const r=t.name("valid");"failing"===c.removeAdditional?(p(n,r,!1),t.if((0,Cs.not)(r),(()=>{e.reset(),d(n)}))):(p(n,r),a||t.if((0,Cs.not)(r),(()=>t.break())))}}}function p(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:Ns.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",s,(r=>{u.length||l.length?t.if(function(r){let s;if(u.length>8){const e=(0,Ns.schemaRefOrVal)(o,n.properties,"properties");s=(0,js.isOwnProperty)(t,e,r)}else s=u.length?(0,Cs.or)(...u.map((e=>Cs._`${r} === ${e}`))):Cs.nil;return l.length&&(s=(0,Cs.or)(s,...l.map((t=>Cs._`${(0,js.usePattern)(e,t)}.test(${r})`)))),(0,Cs.not)(s)}(r),(()=>f(r))):f(r)})),e.ok(Cs._`${i} === ${Os.default.errors}`)}};Ss.default=Is;var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0});const Rs=m,Bs=fe,qs=b,Ms=Ss,Ls={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;"all"===i.opts.removeAdditional&&void 0===n.additionalProperties&&Ms.default.code(new Rs.KeywordCxt(i,Ms.default,"additionalProperties"));const o=(0,Bs.allSchemaProperties)(r);for(const d of o)i.definedProperties.add(d);i.opts.unevaluated&&o.length&&!0!==i.props&&(i.props=qs.mergeEvaluated.props(t,(0,qs.toHash)(o),i.props));const a=o.filter((e=>!(0,qs.alwaysValidSchema)(i,r[e])));if(0===a.length)return;const c=t.name("valid");for(const d of a)u(d)?l(d):(t.if((0,Bs.propertyInData)(t,s,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(e){return i.opts.useDefaults&&!i.compositeRule&&void 0!==r[e].default}function l(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c)}}};Ts.default=Ls;var Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});const Us=fe,Ks=g,zs=b,Gs=b,Js={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:i}=e,{opts:o}=i,a=(0,Us.allSchemaProperties)(r),c=a.filter((e=>(0,zs.alwaysValidSchema)(i,r[e])));if(0===a.length||c.length===a.length&&(!i.opts.unevaluated||!0===i.props))return;const u=o.strictSchema&&!o.allowMatchingProperties&&s.properties,l=t.name("valid");!0===i.props||i.props instanceof Ks.Name||(i.props=(0,Gs.evaluatedPropsToName)(t,i.props));const{props:d}=i;function f(e){for(const t in u)new RegExp(e).test(t)&&(0,zs.checkStrictMode)(i,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function p(r){t.forIn("key",n,(n=>{t.if(Ks._`${(0,Us.usePattern)(e,r)}.test(${n})`,(()=>{const s=c.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:Gs.Type.Str},l),i.opts.unevaluated&&!0!==d?t.assign(Ks._`${d}[${n}]`,!0):s||i.allErrors||t.if((0,Ks.not)(l),(()=>t.break()))}))}))}!function(){for(const e of a)u&&f(e),i.allErrors?p(e):(t.var(l,!0),p(e),t.if(l))}()}};Vs.default=Js;var Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});const Ws=b,Ys={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Ws.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Hs.default=Ys;var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});const Qs={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fe.validateUnion,error:{message:"must match a schema in anyOf"}};Xs.default=Qs;var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});const ei=g,ti=b,ri={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>ei._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block((function(){i.forEach(((r,n)=>{let i;(0,ti.alwaysValidSchema)(s,r)?t.var(c,!0):i=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&t.if(ei._`${c} && ${o}`).assign(o,!1).assign(a,ei._`[${a}, ${n}]`).else(),t.if(c,(()=>{t.assign(o,!0),t.assign(a,n),i&&e.mergeEvaluated(i,ei.Name)}))}))})),e.result(o,(()=>e.reset()),(()=>e.error(!0)))}};Zs.default=ri;var ni={};Object.defineProperty(ni,"__esModule",{value:!0});const si=b,ii={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,si.alwaysValidSchema)(n,t))return;const i=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(i)}))}};ni.default=ii;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});const ai=g,ci=b,ui={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>ai.str`must match "${e.ifClause}" schema`,params:({params:e})=>ai._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,ci.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=li(n,"then"),i=li(n,"else");if(!s&&!i)return;const o=t.let("valid",!0),a=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(t)}(),e.reset(),s&&i){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(a,c("then",r),c("else",r))}else s?t.if(a,c("then")):t.if((0,ai.not)(a),c("else"));function c(r,n){return()=>{const s=e.subschema({keyword:r},a);t.assign(o,a),e.mergeValidEvaluated(s,o),n?t.assign(n,ai._`${r}`):e.setParams({ifClause:r})}}e.pass(o,(()=>e.error(!0)))}};function li(e,t){const r=e.schema[t];return void 0!==r&&!(0,ci.alwaysValidSchema)(e,r)}oi.default=ui;var di={};Object.defineProperty(di,"__esModule",{value:!0});const fi=b,pi={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,fi.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};di.default=pi,Object.defineProperty(es,"__esModule",{value:!0});const mi=ts,hi=os,yi=as,gi=hs,$i=ws,vi=ks,bi=Ps,wi=Ss,Di=Ts,Ei=Vs,_i=Hs,ki=Xs,Pi=Zs,xi=ni,Fi=oi,Ai=di;es.default=function(e=!1){const t=[_i.default,ki.default,Pi.default,xi.default,Fi.default,Ai.default,bi.default,wi.default,vi.default,Di.default,Ei.default];return e?t.push(hi.default,gi.default):t.push(mi.default,yi.default),t.push($i.default),t};var Si={},ji={};Object.defineProperty(ji,"__esModule",{value:!0});const Ci=g,Oi={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>Ci.str`must match format "${e}"`,params:({schemaCode:e})=>Ci._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;c.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),i=r.const("fDef",Ci._`${s}[${o}]`),a=r.let("fType"),u=r.let("format");r.if(Ci._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>r.assign(a,Ci._`${i}.type || "string"`).assign(u,Ci._`${i}.validate`)),(()=>r.assign(a,Ci._`"string"`).assign(u,i))),e.fail$data((0,Ci.or)(!1===c.strictSchema?Ci.nil:Ci._`${o} && !${u}`,function(){const e=l.$async?Ci._`(${i}.async ? await ${u}(${n}) : ${u}(${n}))`:Ci._`${u}(${n})`,r=Ci._`(typeof ${u} == "function" ? ${e} : ${u}.test(${n}))`;return Ci._`${u} && ${u} !== true && ${a} === ${t} && !${r}`}()))}():function(){const s=d.formats[i];if(!s)return void function(){if(!1===c.strictSchema)return void d.logger.warn(e());throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}}();if(!0===s)return;const[o,a,f]=function(e){const t=e instanceof RegExp?(0,Ci.regexpCode)(e):c.code.formats?Ci._`${c.code.formats}${(0,Ci.getProperty)(i)}`:void 0,n=r.scopeValue("formats",{key:i,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,Ci._`${n}.validate`];return["string",e,n]}(s);o===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return Ci._`await ${f}(${n})`}return"function"==typeof a?Ci._`${f}(${n})`:Ci._`${f}.test(${n})`}())}())}};ji.default=Oi,Object.defineProperty(Si,"__esModule",{value:!0});const Ni=[ji.default];Si.default=Ni,Object.defineProperty(Ar,"__esModule",{value:!0});const Ii=Vr,Ti=es,Ri=Si,Bi=[Sr.default,Ii.default,Ti.default(),Ri.default,["title","description","default"]];Ar.default=Bi;var qi,Mi,Li={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.DiscrError=void 0,(Mi=qi||(Vi.DiscrError=qi={})).Tag="tag",Mi.Mapping="mapping",Object.defineProperty(Li,"__esModule",{value:!0});const Ui=g,Ki=Vi,zi=St,Gi=xt,Ji=b,Hi={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Ki.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>Ui._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:i}=e,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const c=t.let("valid",!1),u=t.const("tag",Ui._`${r}${(0,Ui.getProperty)(a)}`);function l(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,Ui.Name),n}t.if(Ui._`typeof ${u} == "string"`,(()=>function(){const r=function(){var e;const t={},r=c(s);let n=!0;for(let s=0;s<o.length;s++){let t=o[s];if((null==t?void 0:t.$ref)&&!(0,Ji.schemaHasRulesButRef)(t,i.self.RULES)){const e=t.$ref;if(t=zi.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,e),t instanceof zi.SchemaEnv&&(t=t.schema),void 0===t)throw new Gi.default(i.opts.uriResolver,i.baseId,e)}const l=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[a];if("object"!=typeof l)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);n=n&&(r||c(t)),u(l,s)}if(!n)throw new Error(`discriminator: "${a}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(a)}function u(e,t){if(e.const)l(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`);for(const r of e.enum)l(r,t)}}function l(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${a}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(Ui._`${u} === ${e}`),t.assign(c,l(r[e]));t.else(),e.error(!1,{discrError:Ki.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}()),(()=>e.error(!1,{discrError:Ki.DiscrError.Tag,tag:u,tagName:a}))),e.ok(c)}};Li.default=Hi;const Wi={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=p,n=Ar,s=Li,i=Wi,o=["/properties"],a="http://json-schema.org/draft-04/schema";class c extends r.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=p;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=p;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}})}(f,f.exports);const Yi=d(f.exports);var Xi={exports:{}},Qi={};!function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(s,i),time:t(a(!0),c),"date-time":t(d(!0),f),"iso-time":t(a(),u),"iso-date-time":t(d(),p),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return m.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=$&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=r.exec(e);if(!t)return!1;const s=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(s)?29:n[i])}function i(e,t){if(e&&t)return e>t?1:e<t?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function a(e){return function(t){const r=o.exec(t);if(!r)return!1;const n=+r[1],s=+r[2],i=+r[3],a=r[4],c="-"===r[5]?-1:1,u=+(r[6]||0),l=+(r[7]||0);if(u>23||l>59||e&&!a)return!1;if(n<=23&&s<=59&&i<60)return!0;const d=s-l*c,f=n-u*c-(d<0?1:0);return(23===f||-1===f)&&(59===d||-1===d)&&i<61}}function c(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return r&&n?r-n:void 0}function u(e,t){if(!e||!t)return;const r=o.exec(e),n=o.exec(t);return r&&n?(e=r[1]+r[2]+r[3])>(t=n[1]+n[2]+n[3])?1:e<t?-1:0:void 0}const l=/t|\s/i;function d(e){const t=a(e);return function(e){const r=e.split(l);return 2===r.length&&s(r[0])&&t(r[1])}}function f(e,t){if(!e||!t)return;const r=new Date(e).valueOf(),n=new Date(t).valueOf();return r&&n?r-n:void 0}function p(e,t){if(!e||!t)return;const[r,n]=e.split(l),[s,o]=t.split(l),a=i(r,s);return void 0!==a?a||c(n,o):void 0}const m=/\/|:/,h=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const g=-(2**31),$=2**31-1;function v(){return!0}const b=/[^\\]\\Z/}(Qi);var Zi={},eo={exports:{}},to={},ro={},no={};Object.defineProperty(no,"__esModule",{value:!0});const so={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};no.default=so,Object.defineProperty(ro,"__esModule",{value:!0});const io=jr,oo=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",no.default,io.default];ro.default=oo;var ao={},co={};Object.defineProperty(co,"__esModule",{value:!0});const uo=g,lo=uo.operators,fo={maximum:{okStr:"<=",ok:lo.LTE,fail:lo.GT},minimum:{okStr:">=",ok:lo.GTE,fail:lo.LT},exclusiveMaximum:{okStr:"<",ok:lo.LT,fail:lo.GTE},exclusiveMinimum:{okStr:">",ok:lo.GT,fail:lo.LTE}},po={message:({keyword:e,schemaCode:t})=>uo.str`must be ${fo[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>uo._`{comparison: ${fo[e].okStr}, limit: ${t}}`},mo={keyword:Object.keys(fo),type:"number",schemaType:"number",$data:!0,error:po,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(uo._`${r} ${fo[t].fail} ${n} || isNaN(${r})`)}};co.default=mo,Object.defineProperty(ao,"__esModule",{value:!0});const ho=Zr,yo=rn,go=ln,$o=mn,vo=gn,bo=Dn,wo=kn,Do=On,Eo=Bn,_o=[co.default,ho.default,yo.default,go.default,$o.default,vo.default,bo.default,wo.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Do.default,Eo.default];ao.default=_o;var ko={};Object.defineProperty(ko,"__esModule",{value:!0}),ko.contentVocabulary=ko.metadataVocabulary=void 0,ko.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ko.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(to,"__esModule",{value:!0});const Po=ao,xo=es,Fo=Si,Ao=ko,So=[ro.default,Po.default,(0,xo.default)(),Fo.default,Ao.metadataVocabulary,Ao.contentVocabulary];to.default=So;const jo={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=p,n=to,s=Li,i=jo,o=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=m;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=g;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=kt;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=xt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(eo,eo.exports);var Co=eo.exports;!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Co,r=g,n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},i={message:({keyword:e,schemaCode:t})=>r.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${s[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(e){const{gen:n,data:i,schemaCode:o,keyword:a,it:c}=e,{opts:u,self:l}=c;if(!u.validateFormats)return;const d=new t.KeywordCxt(c,l.RULES.all.format.definition,"format");function f(e){return r._`${e}.compare(${i}, ${o}) ${s[a].fail} 0`}d.$data?function(){const t=n.scopeValue("formats",{ref:l.formats,code:u.code.formats}),s=n.const("fmt",r._`${t}[${d.schemaCode}]`);e.fail$data((0,r.or)(r._`typeof ${s} != "object"`,r._`${s} instanceof RegExp`,r._`typeof ${s}.compare != "function"`,f(s)))}():function(){const t=d.schema,s=l.formats[t];if(!s||!0===s)return;if("object"!=typeof s||s instanceof RegExp||"function"!=typeof s.compare)throw new Error(`"${a}": format "${t}" does not define "compare" function`);const i=n.scopeValue("formats",{key:t,ref:s,code:u.code.formats?r._`${u.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(i))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(Zi),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Qi,n=Zi,s=g,i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,i),e;const[s,a]="fast"===t.mode?[r.fastFormats,o]:[r.fullFormats,i];return c(e,t.formats||r.formatNames,s,a),t.keywords&&(0,n.default)(e),e};function c(e,t,r,n){var i,o;null!==(i=(o=e.opts.code).formats)&&void 0!==i||(o.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const s of t)e.addFormat(s,r[s])}a.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(Xi,Xi.exports);const Oo=d(Xi.exports);var No={exports:{}},Io={},To={},Ro={};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.dynamicAnchor=void 0;const Bo=g,qo=N,Mo=St,Lo=jr,Vo={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Uo(e,e.schema)};function Uo(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;const s=Bo._`${qo.default.dynamicAnchors}${(0,Bo.getProperty)(t)}`,i="#"===n.errSchemaPath?n.validateName:function(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:s,baseId:i,localRefs:o,meta:a}=t.root,{schemaId:c}=n.opts,u=new Mo.SchemaEnv({schema:r,schemaId:c,root:s,baseId:i,localRefs:o,meta:a});return Mo.compileSchema.call(n,u),(0,Lo.getValidate)(e,u)}(e);r.if(Bo._`!${s}`,(()=>r.assign(s,i)))}Ro.dynamicAnchor=Uo,Ro.default=Vo;var Ko={};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.dynamicRef=void 0;const zo=g,Go=N,Jo=jr,Ho={keyword:"$dynamicRef",schemaType:"string",code:e=>Wo(e,e.schema)};function Wo(e,t){const{gen:r,keyword:n,it:s}=e;if("#"!==t[0])throw new Error(`"${n}" only supports hash fragment reference`);const i=t.slice(1);if(s.allErrors)o();else{const t=r.let("valid",!1);o(t),e.ok(t)}function o(e){if(s.schemaEnv.root.dynamicAnchors[i]){const t=r.let("_v",zo._`${Go.default.dynamicAnchors}${(0,zo.getProperty)(i)}`);r.if(t,a(t,e),a(s.validateName,e))}else a(s.validateName,e)()}function a(t,n){return n?()=>r.block((()=>{(0,Jo.callRef)(e,t),r.let(n,!0)})):()=>(0,Jo.callRef)(e,t)}}Ko.dynamicRef=Wo,Ko.default=Ho;var Yo={};Object.defineProperty(Yo,"__esModule",{value:!0});const Xo=Ro,Qo=b,Zo={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,Xo.dynamicAnchor)(e,""):(0,Qo.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Yo.default=Zo;var ea={};Object.defineProperty(ea,"__esModule",{value:!0});const ta=Ko,ra={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,ta.dynamicRef)(e,e.schema)};ea.default=ra,Object.defineProperty(To,"__esModule",{value:!0});const na=Ko,sa=Yo,ia=ea,oa=[Ro.default,na.default,sa.default,ia.default];To.default=oa;var aa={},ca={};Object.defineProperty(ca,"__esModule",{value:!0});const ua=ks,la={keyword:"dependentRequired",type:"object",schemaType:"object",error:ua.error,code:e=>(0,ua.validatePropertyDeps)(e)};ca.default=la;var da={};Object.defineProperty(da,"__esModule",{value:!0});const fa=ks,pa={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,fa.validateSchemaDeps)(e)};da.default=pa;var ma={};Object.defineProperty(ma,"__esModule",{value:!0});const ha=b,ya={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){void 0===t.contains&&(0,ha.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};ma.default=ya,Object.defineProperty(aa,"__esModule",{value:!0});const ga=da,$a=ma,va=[ca.default,ga.default,$a.default];aa.default=va;var ba={},wa={};Object.defineProperty(wa,"__esModule",{value:!0});const Da=g,Ea=b,_a=N,ka={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>Da._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:r,data:n,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,props:a}=i;function c(n){if(!1===r)return e.setParams({unevaluatedProperty:n}),e.error(),void(o||t.break());if(!(0,Ea.alwaysValidSchema)(i,r)){const r=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:n,dataPropType:Ea.Type.Str},r),o||t.if((0,Da.not)(r),(()=>t.break()))}}a instanceof Da.Name?t.if(Da._`${a} !== true`,(()=>t.forIn("key",n,(e=>t.if(function(e,t){return Da._`!${e} || !${e}[${t}]`}(a,e),(()=>c(e))))))):!0!==a&&t.forIn("key",n,(e=>void 0===a?c(e):t.if(function(e,t){const r=[];for(const n in e)!0===e[n]&&r.push(Da._`${t} !== ${n}`);return(0,Da.and)(...r)}(a,e),(()=>c(e))))),i.props=!0,e.ok(Da._`${s} === ${_a.default.errors}`)}};wa.default=ka;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});const xa=g,Fa=b,Aa={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>xa.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>xa._`{limit: ${e}}`},code(e){const{gen:t,schema:r,data:n,it:s}=e,i=s.items||0;if(!0===i)return;const o=t.const("len",xa._`${n}.length`);if(!1===r)e.setParams({len:i}),e.fail(xa._`${o} > ${i}`);else if("object"==typeof r&&!(0,Fa.alwaysValidSchema)(s,r)){const r=t.var("valid",xa._`${o} <= ${i}`);t.if((0,xa.not)(r),(()=>function(r,n){t.forRange("i",n,o,(n=>{e.subschema({keyword:"unevaluatedItems",dataProp:n,dataPropType:Fa.Type.Num},r),s.allErrors||t.if((0,xa.not)(r),(()=>t.break()))}))}(r,i))),e.ok(r)}s.items=!0}};Pa.default=Aa,Object.defineProperty(ba,"__esModule",{value:!0});const Sa=Pa,ja=[wa.default,Sa.default];ba.default=ja,Object.defineProperty(Io,"__esModule",{value:!0});const Ca=ro,Oa=ao,Na=es,Ia=aa,Ta=ba,Ra=Si,Ba=ko,qa=[To.default,Ca.default,Oa.default,(0,Na.default)(!0),Ra.default,Ba.metadataVocabulary,Ba.contentVocabulary,Ia.default,Ta.default];Io.default=qa;var Ma={};const La={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},Va={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},Ua={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},Ka={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},za={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},Ga={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Ja={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Ha={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(Ma,"__esModule",{value:!0});const Wa=La,Ya=Va,Xa=Ua,Qa=Ka,Za=za,ec=Ga,tc=Ja,rc=Ha,nc=["/properties"];Ma.default=function(e){return[Wa,Ya,Xa,Qa,Za,t(this,ec),tc,t(this,rc)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,r){return e?t.$dataMetaSchema(r,nc):r}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=p,n=Io,s=Li,i=Ma,o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(i.default.call(this,e),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var c=m;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=g;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=kt;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=xt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(No,No.exports);const sc=d(No.exports);function ic(e){if(null===e)return{version:void 0,specificationType:void 0,specificationVersion:void 0};for(const t of new Set(u)){const r="2.0"===t?"swagger":"openapi",n=e[r];if("string"==typeof n&&n.startsWith(t))return{version:t,specificationType:r,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function oc(e){return null==e?void 0:e.find((e=>e.isEntrypoint))}function ac(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function cc(e,t,r=[]){const n={};for(const[s,i]of Object.entries(e)){const e=[...r,s];Array.isArray(i)?n[s]=i.map(((r,n)=>"object"!=typeof r||Array.isArray(r)||null===r?r:cc(r,t,[...e,n.toString()]))):"object"!=typeof i||Array.isArray(i)||null===i?n[s]=i:n[s]=cc(i,t,e)}return t(n,r)}function uc(e){const t=[];return e&&"object"==typeof e?(cc(e,(e=>(e.$ref&&"string"==typeof e.$ref&&!e.$ref.startsWith("#")&&t.push(e.$ref.split("#")[0]),e))),[...new Set(t)]):t}function lc(e){return void 0!==e&&Array.isArray(e)&&e.length>0&&e.some((e=>!0===e.isEntrypoint))}const dc=Symbol.for("yaml.alias"),fc=Symbol.for("yaml.document"),pc=Symbol.for("yaml.map"),mc=Symbol.for("yaml.pair"),hc=Symbol.for("yaml.scalar"),yc=Symbol.for("yaml.seq"),gc=Symbol.for("yaml.node.type"),$c=e=>!!e&&"object"==typeof e&&e[gc]===dc,vc=e=>!!e&&"object"==typeof e&&e[gc]===fc,bc=e=>!!e&&"object"==typeof e&&e[gc]===pc,wc=e=>!!e&&"object"==typeof e&&e[gc]===mc,Dc=e=>!!e&&"object"==typeof e&&e[gc]===hc,Ec=e=>!!e&&"object"==typeof e&&e[gc]===yc;function _c(e){if(e&&"object"==typeof e)switch(e[gc]){case pc:case yc:return!0}return!1}function kc(e){if(e&&"object"==typeof e)switch(e[gc]){case dc:case pc:case hc:case yc:return!0}return!1}const Pc=e=>(Dc(e)||_c(e))&&!!e.anchor,xc=Symbol("break visit"),Fc=Symbol("skip children"),Ac=Symbol("remove node");function Sc(e,t){const r=function(e){if("object"==typeof e&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}(t);if(vc(e)){jc(null,e.contents,r,Object.freeze([e]))===Ac&&(e.contents=null)}else jc(null,e,r,Object.freeze([]))}function jc(e,t,r,n){const s=function(e,t,r,n){var s,i,o,a,c;return"function"==typeof r?r(e,t,n):bc(t)?null==(s=r.Map)?void 0:s.call(r,e,t,n):Ec(t)?null==(i=r.Seq)?void 0:i.call(r,e,t,n):wc(t)?null==(o=r.Pair)?void 0:o.call(r,e,t,n):Dc(t)?null==(a=r.Scalar)?void 0:a.call(r,e,t,n):$c(t)?null==(c=r.Alias)?void 0:c.call(r,e,t,n):void 0}(e,t,r,n);if(kc(s)||wc(s))return function(e,t,r){const n=t[t.length-1];if(_c(n))n.items[e]=r;else if(wc(n))"key"===e?n.key=r:n.value=r;else{if(!vc(n)){const e=$c(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}(e,n,s),jc(e,s,r,n);if("symbol"!=typeof s)if(_c(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const s=jc(e,t.items[e],r,n);if("number"==typeof s)e=s-1;else{if(s===xc)return xc;s===Ac&&(t.items.splice(e,1),e-=1)}}}else if(wc(t)){n=Object.freeze(n.concat(t));const e=jc("key",t.key,r,n);if(e===xc)return xc;e===Ac&&(t.key=null);const s=jc("value",t.value,r,n);if(s===xc)return xc;s===Ac&&(t.value=null)}return s}Sc.BREAK=xc,Sc.SKIP=Fc,Sc.REMOVE=Ac;const Cc={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class Oc{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Oc.defaultYaml,e),this.tags=Object.assign({},Oc.defaultTags,t)}clone(){const e=new Oc(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Oc(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Oc.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Oc.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Oc.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Oc.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(i){return t(String(i)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+e.substring(r.length).replace(/[!,[\]{}]/g,(e=>Cc[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&kc(e.contents)){const t={};Sc(e.contents,((e,r)=>{kc(r)&&r.tag&&(t[r.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[s,i]of r)"!!"===s&&"tag:yaml.org,2002:"===i||e&&!n.some((e=>e.startsWith(i)))||t.push(`%TAG ${s} ${i}`);return t.join("\n")}}function Nc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function Ic(e){const t=new Set;return Sc(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function Tc(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function Rc(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let s=0,i=n.length;s<i;++s){const t=n[s],r=Rc(e,n,String(s),t);void 0===r?delete n[s]:r!==t&&(n[s]=r)}else if(n instanceof Map)for(const s of Array.from(n.keys())){const t=n.get(s),r=Rc(e,n,s,t);void 0===r?n.delete(s):r!==t&&n.set(s,r)}else if(n instanceof Set)for(const s of Array.from(n)){const t=Rc(e,n,s,s);void 0===t?n.delete(s):t!==s&&(n.delete(s),n.add(t))}else for(const[s,i]of Object.entries(n)){const t=Rc(e,n,s,i);void 0===t?delete n[s]:t!==i&&(n[s]=t)}return e.call(t,r,n)}function Bc(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>Bc(e,String(t),r)));if(e&&"function"==typeof e.toJSON){if(!r||!Pc(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const s=e.toJSON(t,r);return r.onCreate&&r.onCreate(s),s}return"bigint"!=typeof e||(null==r?void 0:r.keep)?e:Number(e)}Oc.defaultYaml={explicit:!1,version:"1.2"},Oc.defaultTags={"!!":"tag:yaml.org,2002:"};class qc{constructor(e){Object.defineProperty(this,gc,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!vc(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},o=Bc(this,"",i);if("function"==typeof n)for(const{count:a,res:c}of i.anchors.values())n(c,a);return"function"==typeof s?Rc(s,{"":o},"",o):o}}class Mc extends qc{constructor(e){super(dc),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Sc(e,{Node:(e,r)=>{if(r===this)return Sc.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:s}=t,i=this.resolve(n);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=r.get(i);if(o||(Bc(i,null,t),o=r.get(i)),!o||void 0===o.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(s>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=Lc(n,i,r)),o.count*o.aliasCount>s)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return o.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(Nc(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function Lc(e,t,r){if($c(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(_c(t)){let n=0;for(const s of t.items){const t=Lc(e,s,r);t>n&&(n=t)}return n}if(wc(t)){const n=Lc(e,t.key,r),s=Lc(e,t.value,r);return Math.max(n,s)}return 1}const Vc=e=>!e||"function"!=typeof e&&"object"!=typeof e;class Uc extends qc{constructor(e){super(hc),this.value=e}toJSON(e,t){return(null==t?void 0:t.keep)?this.value:Bc(this.value,e,t)}toString(){return String(this.value)}}Uc.BLOCK_FOLDED="BLOCK_FOLDED",Uc.BLOCK_LITERAL="BLOCK_LITERAL",Uc.PLAIN="PLAIN",Uc.QUOTE_DOUBLE="QUOTE_DOUBLE",Uc.QUOTE_SINGLE="QUOTE_SINGLE";const Kc="tag:yaml.org,2002:";function zc(e,t,r){var n,s,i;if(vc(e)&&(e=e.contents),kc(e))return e;if(wc(e)){const t=null==(s=(n=r.schema[pc]).createNode)?void 0:s.call(n,r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=r;let d;if(o&&e&&"object"==typeof e){if(d=l.get(e),d)return d.anchor||(d.anchor=a(e)),new Mc(d.anchor);d={anchor:null,node:null},l.set(e,d)}(null==t?void 0:t.startsWith("!!"))&&(t=Kc+t.slice(2));let f=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>{var r;return(null==(r=t.identify)?void 0:r.call(t,e))&&!t.format}))}(e,t,u.tags);if(!f){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new Uc(e);return d&&(d.node=t),t}f=e instanceof Map?u[pc]:Symbol.iterator in Object(e)?u[yc]:u[pc]}c&&(c(f),delete r.onTagObj);const p=(null==f?void 0:f.createNode)?f.createNode(r.schema,e,r):"function"==typeof(null==(i=null==f?void 0:f.nodeClass)?void 0:i.from)?f.nodeClass.from(r.schema,e,r):new Uc(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function Gc(e,t,r){let n=r;for(let s=t.length-1;s>=0;--s){const e=t[s];if("number"==typeof e&&Number.isInteger(e)&&e>=0){const t=[];t[e]=n,n=t}else n=new Map([[e,n]])}return zc(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Jc=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Hc extends qc{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>kc(t)||wc(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Jc(e))this.add(t);else{const[r,...n]=e,s=this.get(r,!0);if(_c(s))s.addIn(n,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,Gc(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(_c(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,s=this.get(r,!0);return 0===n.length?!t&&Dc(s)?s.value:s:_c(s)?s.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!wc(t))return!1;const r=t.value;return null==r||e&&Dc(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!_c(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(_c(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,Gc(this.schema,n,t))}}}}Hc.maxFlowStringSingleLineLength=60;const Wc=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Yc(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Xc=(e,t,r)=>e.endsWith("\n")?Yc(r,t):r.includes("\n")?"\n"+Yc(r,t):(e.endsWith(" ")?"":" ")+r,Qc="flow",Zc="block",eu="quoted";function tu(e,t,r="flow",{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let d,f,p=s-t.length;"number"==typeof n&&(n>s-Math.max(2,i)?u.push(0):p=s-n);let m=!1,h=-1,y=-1,g=-1;r===Zc&&(h=ru(e,h,t.length),-1!==h&&(p=h+c));for(let v;v=e[h+=1];){if(r===eu&&"\\"===v){switch(y=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}g=h}if("\n"===v)r===Zc&&(h=ru(e,h,t.length)),p=h+t.length+c,d=void 0;else{if(" "===v&&f&&" "!==f&&"\n"!==f&&"\t"!==f){const t=e[h+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(d=h)}if(h>=p)if(d)u.push(d),p=d+c,d=void 0;else if(r===eu){for(;" "===f||"\t"===f;)f=v,v=e[h+=1],m=!0;const t=h>g+1?h-2:y-1;if(l[t])return e;u.push(t),l[t]=!0,p=t+c,d=void 0}else m=!0}f=v}if(m&&a&&a(),0===u.length)return e;o&&o();let $=e.slice(0,u[0]);for(let v=0;v<u.length;++v){const n=u[v],s=u[v+1]||e.length;0===n?$=`\n${t}${e.slice(0,s)}`:(r===eu&&l[n]&&($+=`${e[n]}\\`),$+=`\n${t}${e.slice(n+1,s)}`)}return $}function ru(e,t,r){let n=t,s=t+1,i=e[s];for(;" "===i||"\t"===i;)if(t<s+r)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);n=t,s=t+1,i=e[s]}return n}const nu=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),su=e=>/^(%|---|\.\.\.)/m.test(e);function iu(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(su(e)?" ":"");let o="",a=0;for(let c=0,u=r[c];u;u=r[++c])if(" "===u&&"\\"===r[c+1]&&"n"===r[c+2]&&(o+=r.slice(a,c)+"\\ ",c+=1,a=c,u="\\"),"\\"===u)switch(r[c+1]){case"u":{o+=r.slice(a,c);const e=r.substr(c+2,4);switch(e){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:"00"===e.substr(0,2)?o+="\\x"+e.substr(2):o+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||'"'===r[c+2]||r.length<s)c+=1;else{for(o+=r.slice(a,c)+"\n\n";"\\"===r[c+2]&&"n"===r[c+3]&&'"'!==r[c+4];)o+="\n",c+=2;o+=i," "===r[c+2]&&(o+="\\"),c+=1,a=c+1}break;default:c+=1}return o=a?o+r.slice(a):r,n?o:tu(o,i,eu,nu(t,!1))}function ou(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return iu(e,t);const r=t.indent||(su(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:tu(n,r,Qc,nu(t,!1))}function au(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=iu;else{const t=e.includes('"'),s=e.includes("'");n=t&&!s?ou:s&&!t?iu:r?ou:iu}return n(e,t)}let cu;try{cu=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{cu=/\n+(?!\n|$)/g}function uu({comment:e,type:t,value:r},n,s,i){const{blockQuote:o,commentString:a,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return au(r,n);const u=n.indent||(n.forceBlockIndent||su(r)?" ":""),l="literal"===o||"folded"!==o&&t!==Uc.BLOCK_FOLDED&&(t===Uc.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,s=e.length;if(s<=n)return!1;for(let i=0,o=0;i<s;++i)if("\n"===e[i]){if(i-o>n)return!0;if(o=i+1,s-o<=n)return!1}return!0}(r,c,u.length));if(!r)return l?"|\n":">\n";let d,f;for(f=r.length;f>0;--f){const e=r[f-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(f);const m=p.indexOf("\n");-1===m?d="-":r===p||m!==p.length-1?(d="+",i&&i()):d="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(cu,`$&${u}`));let h,y=!1,g=-1;for(h=0;h<r.length;++h){const e=r[h];if(" "===e)y=!0;else{if("\n"!==e)break;g=h}}let $=r.substring(0,g<h?g+1:h);$&&(r=r.substring($.length),$=$.replace(/\n+/g,`$&${u}`));let v=(l?"|":">")+(y?u?"2":"1":"")+d;if(e&&(v+=" "+a(e.replace(/ ?[\r\n]+/g," ")),s&&s()),l)return`${v}\n${u}${$}${r=r.replace(/\n+/g,`$&${u}`)}${p}`;return`${v}\n${u}${tu(`${$}${r=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`)}${p}`,u,Zc,nu(n,!0))}`}function lu(e,t,r,n){const{implicitKey:s,inFlow:i}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==Uc.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Uc.QUOTE_DOUBLE);const c=e=>{switch(e){case Uc.BLOCK_FOLDED:case Uc.BLOCK_LITERAL:return s||i?au(o.value,t):uu(o,t,r,n);case Uc.QUOTE_DOUBLE:return iu(o.value,t);case Uc.QUOTE_SINGLE:return ou(o.value,t);case Uc.PLAIN:return function(e,t,r,n){const{type:s,value:i}=e,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:l}=t;if(a&&i.includes("\n")||l&&/[[\]{},]/.test(i))return au(i,t);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||l||!i.includes("\n")?au(i,t):uu(e,t,r,n);if(!a&&!l&&s!==Uc.PLAIN&&i.includes("\n"))return uu(e,t,r,n);if(su(i)){if(""===c)return t.forceBlockIndent=!0,uu(e,t,r,n);if(a&&c===u)return au(i,t)}const d=i.replace(/\n+/g,`$&\n${c}`);if(o){const e=e=>{var t;return e.default&&"tag:yaml.org,2002:str"!==e.tag&&(null==(t=e.test)?void 0:t.test(d))},{compat:r,tags:n}=t.doc.schema;if(n.some(e)||(null==r?void 0:r.some(e)))return au(i,t)}return a?d:tu(d,c,Qc,nu(t,!1))}(o,t,r,n);default:return null}};let u=c(a);if(null===u){const{defaultKeyType:e,defaultStringType:r}=t.options,n=s&&e||r;if(u=c(n),null===u)throw new Error(`Unsupported default string type ${n}`)}return u}function du(e,t){const r=Object.assign({blockQuote:!0,commentString:Wc,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function fu(e,t,r,n){var s;if(wc(e))return e.toString(t,r,n);if($c(e)){if(t.doc.directives)return e.toString(t);if(null==(s=t.resolvedAliases)?void 0:s.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const o=kc(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i||(i=function(e,t){var r;if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let n,s;if(Dc(t)){s=t.value;const r=e.filter((e=>{var t;return null==(t=e.identify)?void 0:t.call(e,s)}));n=r.find((e=>e.format===t.format))??r.find((e=>!e.format))}else s=t,n=e.find((e=>e.nodeClass&&s instanceof e.nodeClass));if(!n){const e=(null==(r=null==s?void 0:s.constructor)?void 0:r.name)??typeof s;throw new Error(`Tag not resolved for ${e} value`)}return n}(t.doc.schema.tags,o));const a=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const s=[],i=(Dc(e)||_c(e))&&e.anchor;i&&Nc(i)&&(r.add(i),s.push(`&${i}`));const o=e.tag?e.tag:t.default?null:t.tag;return o&&s.push(n.directives.tagString(o)),s.join(" ")}(o,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const c="function"==typeof i.stringify?i.stringify(o,t,r,n):Dc(o)?lu(o,t,r,n):o.toString(t,r,n);return a?Dc(o)||"{"===c[0]||"["===c[0]?`${a} ${c}`:`${a}\n${t.indent}${c}`:c}function pu(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}function mu(e,t,{key:r,value:n}){if((null==e?void 0:e.doc.schema.merge)&&hu(r))if(n=$c(n)?n.resolve(e.doc):n,Ec(n))for(const s of n.items)yu(e,t,s);else if(Array.isArray(n))for(const s of n)yu(e,t,s);else yu(e,t,n);else{const s=Bc(r,"",e);if(t instanceof Map)t.set(s,Bc(n,s,e));else if(t instanceof Set)t.add(s);else{const i=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(kc(e)&&(null==r?void 0:r.doc)){const t=du(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),pu(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,s,e),o=Bc(n,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}}return t}const hu=e=>"<<"===e||Dc(e)&&"<<"===e.value&&(!e.type||e.type===Uc.PLAIN);function yu(e,t,r){const n=e&&$c(r)?r.resolve(e.doc):r;if(!bc(n))throw new Error("Merge sources must be maps or map aliases");const s=n.toJSON(null,e,Map);for(const[i,o]of s)t instanceof Map?t.has(i)||t.set(i,o):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function gu(e,t,r){const n=zc(e,void 0,r),s=zc(t,void 0,r);return new $u(n,s)}class $u{constructor(e,t=null){Object.defineProperty(this,gc,{value:mc}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return kc(t)&&(t=t.clone(e)),kc(r)&&(r=r.clone(e)),new $u(t,r)}toJSON(e,t){return mu(t,(null==t?void 0:t.mapAsMap)?new Map:{},this)}toString(e,t,r){return(null==e?void 0:e.doc)?function({key:e,value:t},r,n,s){const{allNullValues:i,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:l,simpleKeys:d}}=r;let f=kc(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(_c(e)||!kc(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!d&&(!e||f&&null==t&&!r.inFlow||_c(e)||(Dc(e)?e.type===Uc.BLOCK_FOLDED||e.type===Uc.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(d||!i),indent:a+c});let m,h,y,g=!1,$=!1,v=fu(e,r,(()=>g=!0),(()=>$=!0));if(!p&&!r.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||null==t)return g&&n&&n(),""===v?"?":p?`? ${v}`:v}else if(i&&!d||null==t&&p)return v=`? ${v}`,f&&!g?v+=Xc(v,r.indent,u(f)):$&&s&&s(),v;g&&(f=null),p?(f&&(v+=Xc(v,r.indent,u(f))),v=`? ${v}\n${a}:`):(v=`${v}:`,f&&(v+=Xc(v,r.indent,u(f)))),kc(t)?(m=!!t.spaceBefore,h=t.commentBefore,y=t.comment):(m=!1,h=null,y=null,t&&"object"==typeof t&&(t=o.createNode(t))),r.implicitKey=!1,p||f||!Dc(t)||(r.indentAtStart=v.length+1),$=!1,l||!(c.length>=2)||r.inFlow||p||!Ec(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let b=!1;const w=fu(t,r,(()=>b=!0),(()=>$=!0));let D=" ";if(f||m||h)D=m?"\n":"",h&&(D+=`\n${Yc(u(h),r.indent)}`),""!==w||r.inFlow?D+=`\n${r.indent}`:"\n"===D&&(D="\n\n");else if(!p&&_c(t)){const e=w[0],n=w.indexOf("\n"),s=-1!==n,i=r.inFlow??t.flow??0===t.items.length;if(s||!i){let t=!1;if(s&&("&"===e||"!"===e)){let r=w.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===w[r+1]&&(r=w.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(D=`\n${r.indent}`)}}else""!==w&&"\n"!==w[0]||(D="");return v+=D+w,r.inFlow?b&&n&&n():y&&!b?v+=Xc(v,r.indent,u(y)):$&&s&&s(),v}(this,e,t,r):JSON.stringify(this)}}function vu(e,t,r){return(t.inFlow??e.flow?wu:bu)(e,t,r)}function bu({comment:e,items:t},r,{blockItemPrefix:n,flowChars:s,itemIndent:i,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:u}}=r,l=Object.assign({},r,{indent:i,type:null});let d=!1;const f=[];for(let m=0;m<t.length;++m){const e=t[m];let s=null;if(kc(e))!d&&e.spaceBefore&&f.push(""),Du(r,f,e.commentBefore,d),e.comment&&(s=e.comment);else if(wc(e)){const t=kc(e.key)?e.key:null;t&&(!d&&t.spaceBefore&&f.push(""),Du(r,f,t.commentBefore,d))}d=!1;let o=fu(e,l,(()=>s=null),(()=>d=!0));s&&(o+=Xc(o,i,u(s))),d&&s&&(d=!1),f.push(n+o)}let p;if(0===f.length)p=s.start+s.end;else{p=f[0];for(let e=1;e<f.length;++e){const t=f[e];p+=t?`\n${c}${t}`:"\n"}}return e?(p+="\n"+Yc(u(e),c),a&&a()):d&&o&&o(),p}function wu({items:e},t,{flowChars:r,itemIndent:n}){const{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=t;n+=i;const c=Object.assign({},t,{indent:n,inFlow:!0,type:null});let u=!1,l=0;const d=[];for(let m=0;m<e.length;++m){const r=e[m];let s=null;if(kc(r))r.spaceBefore&&d.push(""),Du(t,d,r.commentBefore,!1),r.comment&&(s=r.comment);else if(wc(r)){const e=kc(r.key)?r.key:null;e&&(e.spaceBefore&&d.push(""),Du(t,d,e.commentBefore,!1),e.comment&&(u=!0));const n=kc(r.value)?r.value:null;n?(n.comment&&(s=n.comment),n.commentBefore&&(u=!0)):null==r.value&&(null==e?void 0:e.comment)&&(s=e.comment)}s&&(u=!0);let i=fu(r,c,(()=>s=null));m<e.length-1&&(i+=","),s&&(i+=Xc(i,n,a(s))),!u&&(d.length>l||i.includes("\n"))&&(u=!0),d.push(i),l=d.length}const{start:f,end:p}=r;if(0===d.length)return f+p;if(!u){const e=d.reduce(((e,t)=>e+t.length+2),2);u=t.options.lineWidth>0&&e>t.options.lineWidth}if(u){let e=f;for(const t of d)e+=t?`\n${i}${s}${t}`:"\n";return`${e}\n${s}${p}`}return`${f}${o}${d.join(" ")}${o}${p}`}function Du({indent:e,options:{commentString:t}},r,n,s){if(n&&s&&(n=n.replace(/^\n+/,"")),n){const s=Yc(t(n),e);r.push(s.trimStart())}}function Eu(e,t){const r=Dc(t)?t.value:t;for(const n of e)if(wc(n)){if(n.key===t||n.key===r)return n;if(Dc(n.key)&&n.key.value===r)return n}}class _u extends Hc{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(pc,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:s}=r,i=new this(e),o=(e,o)=>{if("function"==typeof s)o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==o||n)&&i.items.push(gu(e,o,r))};if(t instanceof Map)for(const[a,c]of t)o(a,c);else if(t&&"object"==typeof t)for(const a of Object.keys(t))o(a,t[a]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){var r;let n;n=wc(e)?e:e&&"object"==typeof e&&"key"in e?new $u(e.key,e.value):new $u(e,null==e?void 0:e.value);const s=Eu(this.items,n.key),i=null==(r=this.schema)?void 0:r.sortMapEntries;if(s){if(!t)throw new Error(`Key ${n.key} already set`);Dc(s.value)&&Vc(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const e=this.items.findIndex((e=>i(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=Eu(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Eu(this.items,e),n=null==r?void 0:r.value;return(!t&&Dc(n)?n.value:n)??void 0}has(e){return!!Eu(this.items,e)}set(e,t){this.add(new $u(e,t),!0)}toJSON(e,t,r){const n=r?new r:(null==t?void 0:t.mapAsMap)?new Map:{};(null==t?void 0:t.onCreate)&&t.onCreate(n);for(const s of this.items)mu(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const n of this.items)if(!wc(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),vu(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const ku={collection:"map",default:!0,nodeClass:_u,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(bc(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>_u.from(e,t,r)};class Pu extends Hc{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(yc,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=xu(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const r=xu(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&Dc(n)?n.value:n}has(e){const t=xu(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=xu(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];Dc(n)&&Vc(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];(null==t?void 0:t.onCreate)&&t.onCreate(r);let n=0;for(const s of this.items)r.push(Bc(s,String(n++),t));return r}toString(e,t,r){return e?vu(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let i of t){if("function"==typeof n){const r=t instanceof Set?i:String(e++);i=n.call(t,r,i)}s.items.push(zc(i,void 0,r))}}return s}}function xu(e){let t=Dc(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const Fu={collection:"seq",default:!0,nodeClass:Pu,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(Ec(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>Pu.from(e,t,r)},Au={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>lu(e,t=Object.assign({actualString:!0},t),r,n)},Su={identify:e=>null==e,createNode:()=>new Uc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Uc(null),stringify:({source:e},t)=>"string"==typeof e&&Su.test.test(e)?e:t.options.nullStr},ju={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Uc("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},r){if(e&&ju.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?r.options.trueStr:r.options.falseStr}};function Cu({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const s="number"==typeof n?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}const Ou={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Cu},Nu={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Cu(e)}},Iu={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Uc(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Cu},Tu=e=>"bigint"==typeof e||Number.isInteger(e),Ru=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Bu(e,t,r){const{value:n}=e;return Tu(n)&&n>=0?r+n.toString(t):Cu(e)}const qu={identify:e=>Tu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ru(e,2,8,r),stringify:e=>Bu(e,8,"0o")},Mu={identify:Tu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ru(e,0,10,r),stringify:Cu},Lu={identify:e=>Tu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ru(e,2,16,r),stringify:e=>Bu(e,16,"0x")},Vu=[ku,Fu,Au,Su,ju,qu,Mu,Lu,Ou,Nu,Iu];function Uu(e){return"bigint"==typeof e||Number.isInteger(e)}const Ku=({value:e})=>JSON.stringify(e),zu=[ku,Fu].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Ku},{identify:e=>null==e,createNode:()=>new Uc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ku},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:Ku},{identify:Uu,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Uu(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Ku}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Gu={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,s,i){const o=r;let a;if("function"==typeof Buffer)a=o instanceof Buffer?o.toString("base64"):Buffer.from(o.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);a=btoa(e)}}if(t||(t=Uc.BLOCK_LITERAL),t!==Uc.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(a.length/e),s=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)s[t]=a.substr(n,e);a=s.join(t===Uc.BLOCK_LITERAL?"\n":" ")}return lu({comment:e,type:t,value:a},n,s,i)}};function Ju(e,t){if(Ec(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!wc(n)){if(bc(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new $u(new Uc(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=wc(n)?n:new $u(n)}}else t("Expected a sequence for this tag");return e}function Hu(e,t,r){const{replacer:n}=r,s=new Pu(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){let e,a;if("function"==typeof n&&(o=n.call(t,String(i++),o)),Array.isArray(o)){if(2!==o.length)throw new TypeError(`Expected [key, value] tuple: ${o}`);e=o[0],a=o[1]}else if(o&&o instanceof Object){const t=Object.keys(o);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);e=t[0],a=o[e]}else e=o;s.items.push(gu(e,a,r))}return s}const Wu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ju,createNode:Hu};class Yu extends Pu{constructor(){super(),this.add=_u.prototype.add.bind(this),this.delete=_u.prototype.delete.bind(this),this.get=_u.prototype.get.bind(this),this.has=_u.prototype.has.bind(this),this.set=_u.prototype.set.bind(this),this.tag=Yu.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;(null==t?void 0:t.onCreate)&&t.onCreate(r);for(const n of this.items){let e,s;if(wc(n)?(e=Bc(n.key,"",t),s=Bc(n.value,e,t)):e=Bc(n,"",t),r.has(e))throw new Error("Ordered maps must not include duplicate keys");r.set(e,s)}return r}static from(e,t,r){const n=Hu(e,t,r),s=new this;return s.items=n.items,s}}Yu.tag="tag:yaml.org,2002:omap";const Xu={collection:"seq",identify:e=>e instanceof Map,nodeClass:Yu,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Ju(e,t),n=[];for(const{key:s}of r.items)Dc(s)&&(n.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):n.push(s.value));return Object.assign(new Yu,r)},createNode:(e,t,r)=>Yu.from(e,t,r)};function Qu({value:e,source:t},r){return t&&(e?Zu:el).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Zu={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Uc(!0),stringify:Qu},el={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Uc(!1),stringify:Qu},tl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Cu},rl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Cu(e)}},nl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Uc(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Cu},sl=e=>"bigint"==typeof e||Number.isInteger(e);function il(e,t,r,{intAsBigInt:n}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,r);return"-"===s?-1*i:i}function ol(e,t,r){const{value:n}=e;if(sl(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Cu(e)}const al={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>il(e,2,2,r),stringify:e=>ol(e,2,"0b")},cl={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>il(e,1,8,r),stringify:e=>ol(e,8,"0")},ul={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>il(e,0,10,r),stringify:Cu},ll={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>il(e,2,16,r),stringify:e=>ol(e,16,"0x")};class dl extends _u{constructor(e){super(e),this.tag=dl.tag}add(e){let t;t=wc(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new $u(e.key,null):new $u(e,null);Eu(this.items,t.key)||this.items.push(t)}get(e,t){const r=Eu(this.items,e);return!t&&wc(r)?Dc(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Eu(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new $u(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let i of t)"function"==typeof n&&(i=n.call(t,i,i)),s.items.push(gu(i,null,r));return s}}dl.tag="tag:yaml.org,2002:set";const fl={collection:"map",identify:e=>e instanceof Set,nodeClass:dl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>dl.from(e,t,r),resolve(e,t){if(bc(e)){if(e.hasAllNullValues(!0))return Object.assign(new dl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function pl(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*s(60)+s(t)),s(0));return"-"===r?s(-1)*i:i}function ml(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Cu(e);let n="";t<0&&(n="-",t*=r(-1));const s=r(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),n+i.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const hl={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>pl(e,r),stringify:ml},yl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>pl(e,!1),stringify:ml},gl={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(gl.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,i,o,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(r,n-1,s,i||0,o||0,a||0,c);const l=t[8];if(l&&"Z"!==l){let e=pl(l,!1);Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},$l=[ku,Fu,Au,Su,Zu,el,al,cl,ul,ll,tl,rl,nl,Gu,Xu,Wu,fl,hl,yl,gl],vl=new Map([["core",Vu],["failsafe",[ku,Fu,Au]],["json",zu],["yaml11",$l],["yaml-1.1",$l]]),bl={binary:Gu,bool:ju,float:Iu,floatExp:Nu,floatNaN:Ou,floatTime:yl,int:Mu,intHex:Lu,intOct:qu,intTime:hl,map:ku,null:Su,omap:Xu,pairs:Wu,seq:Fu,set:fl,timestamp:gl},wl={"tag:yaml.org,2002:binary":Gu,"tag:yaml.org,2002:omap":Xu,"tag:yaml.org,2002:pairs":Wu,"tag:yaml.org,2002:set":fl,"tag:yaml.org,2002:timestamp":gl};function Dl(e,t){let r=vl.get(t);if(!r){if(!Array.isArray(e)){const e=Array.from(vl.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}r=[]}if(Array.isArray(e))for(const n of e)r=r.concat(n);else"function"==typeof e&&(r=e(r.slice()));return r.map((e=>{if("string"!=typeof e)return e;const t=bl[e];if(t)return t;const r=Object.keys(bl).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${r}`)}))}const El=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _l{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(e)?Dl(e,"compat"):e?Dl(null,e):null,this.merge=!!r,this.name="string"==typeof s&&s||"core",this.knownTags=n?wl:{},this.tags=Dl(t,this.name),this.toStringOptions=o??null,Object.defineProperty(this,pc,{value:ku}),Object.defineProperty(this,hc,{value:Au}),Object.defineProperty(this,yc,{value:Fu}),this.sortMapEntries="function"==typeof i?i:!0===i?El:null}clone(){const e=Object.create(_l.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class kl{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,gc,{value:fc});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:i}=s;(null==r?void 0:r._directives)?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new Oc({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(kl.prototype,{[gc]:{value:fc}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=kc(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Pl(this.contents)&&this.contents.add(e)}addIn(e,t){Pl(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=Ic(this);e.anchor=!t||r.has(t)?Tc(t||"a",r):t}return new Mc(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:i,flow:o,keepUndefined:a,onTagObj:c,tag:u}=r??{},{onAnchor:l,setAnchors:d,sourceObjects:f}=function(e,t){const r=[],n=new Map;let s=null;return{onAnchor:n=>{r.push(n),s||(s=Ic(e));const i=Tc(t,s);return s.add(i),i},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!Dc(t.node)&&!_c(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,i||"a"),p=zc(e,u,{aliasDuplicateObjects:s??!0,keepUndefined:a??!1,onAnchor:l,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:f});return o&&_c(p)&&(p.flow=!0),d(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new $u(n,s)}delete(e){return!!Pl(this.contents)&&this.contents.delete(e)}deleteIn(e){return Jc(e)?null!=this.contents&&(this.contents=null,!0):!!Pl(this.contents)&&this.contents.deleteIn(e)}get(e,t){return _c(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Jc(e)?!t&&Dc(this.contents)?this.contents.value:this.contents:_c(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!_c(this.contents)&&this.contents.has(e)}hasIn(e){return Jc(e)?void 0!==this.contents:!!_c(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=Gc(this.schema,[e],t):Pl(this.contents)&&this.contents.set(e,t)}setIn(e,t){Jc(e)?this.contents=t:null==this.contents?this.contents=Gc(this.schema,Array.from(e),t):Pl(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Oc({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Oc({version:e}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new _l(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},a=Bc(this.contents,t??"",o);if("function"==typeof s)for(const{count:c,res:u}of o.anchors.values())s(u,c);return"function"==typeof i?Rc(i,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){var r;const n=[];let s=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),s=!0):e.directives.docStart&&(s=!0)}s&&n.push("---");const i=du(e,t),{commentString:o}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=o(e.commentBefore);n.unshift(Yc(t,""))}let a=!1,c=null;if(e.contents){if(kc(e.contents)){if(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore){const t=o(e.contents.commentBefore);n.push(Yc(t,""))}i.forceBlockIndent=!!e.comment,c=e.contents.comment}const t=c?void 0:()=>a=!0;let r=fu(e.contents,i,(()=>c=null),t);c&&(r+=Xc(r,"",o(c))),"|"!==r[0]&&">"!==r[0]||"---"!==n[n.length-1]?n.push(r):n[n.length-1]=`--- ${r}`}else n.push(fu(e.contents,i));if(null==(r=e.directives)?void 0:r.docEnd)if(e.comment){const t=o(e.comment);t.includes("\n")?(n.push("..."),n.push(Yc(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&a&&(t=t.replace(/^\n+/,"")),t&&(a&&!c||""===n[n.length-1]||n.push(""),n.push(Yc(o(t),"")))}return n.join("\n")+"\n"}(this,e)}}function Pl(e){if(_c(e))return!0;throw new Error("Expected a YAML collection as document contents")}class xl extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class Fl extends xl{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Al extends xl{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Sl=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),o=r+o}if(/[^ ]/.test(o)){let e=1;const t=r.linePos[1];t&&t.line===n&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);r.message+=`:\n\n${o}\n${a}\n`}};function jl(e,{flow:t,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,d="",f="",p=!1,m=!1,h=!1,y=null,g=null,$=null,v=null,b=null,w=null;for(const _ of e)switch(h&&("space"!==_.type&&"newline"!==_.type&&"comma"!==_.type&&i(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),y&&(u&&"comment"!==_.type&&"newline"!==_.type&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),_.type){case"space":t||"doc-start"===r&&"flow-collection"===(null==n?void 0:n.type)||!_.source.includes("\t")||(y=_),l=!0;break;case"comment":{l||i(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=_.source.substring(1)||" ";d?d+=f+e:d=e,f="",u=!1;break}case"newline":u?d?d+=_.source:c=!0:f+=_.source,u=!0,p=!0,(g||$)&&(m=!0),l=!0;break;case"anchor":g&&i(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&i(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=_,null===w&&(w=_.offset),u=!1,l=!1,h=!0;break;case"tag":$&&i(_,"MULTIPLE_TAGS","A node can have at most one tag"),$=_,null===w&&(w=_.offset),u=!1,l=!1,h=!0;break;case r:(g||$)&&i(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),b&&i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${t??"collection"}`),b=_,u="seq-item-ind"===r||"explicit-key-ind"===r,l=!1;break;case"comma":if(t){v&&i(_,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=_,u=!1,l=!1;break}default:i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),u=!1,l=!1}const D=e[e.length-1],E=D?D.offset+D.source.length:s;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(u&&y.indent<=o||"block-map"===(null==n?void 0:n.type)||"block-seq"===(null==n?void 0:n.type))&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:b,spaceBefore:c,comment:d,hasNewline:p,hasNewlineAfterProp:m,anchor:g,tag:$,end:E,start:w??E}}function Cl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Cl(t.key)||Cl(t.value))return!0}return!1;default:return!0}}function Ol(e,t,r){if("flow-collection"===(null==t?void 0:t.type)){const n=t.end[0];if(n.indent===e&&("]"===n.source||"}"===n.source)&&Cl(t)){r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}function Nl(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const s="function"==typeof n?n:(t,r)=>t===r||Dc(t)&&Dc(r)&&t.value===r.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>s(e.key,r)))}const Il="All mapping items must start at the same column";function Tl(e,t,r,n){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{r&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}const Rl="Block collections are not allowed within flow collections",Bl=e=>e&&("block-map"===e.type||"block-seq"===e.type);function ql(e,t,r,n,s,i){const o="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,s,i){var o;const a=new((null==i?void 0:i.nodeClass)??_u)(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,u=null;for(const l of n.items){const{start:i,key:d,sep:f,value:p}=l,m=jl(i,{indicator:"explicit-key-ind",next:d??(null==f?void 0:f[0]),offset:c,onError:s,parentIndent:n.indent,startOnNewline:!0}),h=!m.found;if(h){if(d&&("block-seq"===d.type?s(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&s(c,"BAD_INDENT",Il)),!m.anchor&&!m.tag&&!f){u=m.end,m.comment&&(a.comment?a.comment+="\n"+m.comment:a.comment=m.comment);continue}(m.hasNewlineAfterProp||Cl(d))&&s(d??i[i.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else(null==(o=m.found)?void 0:o.indent)!==n.indent&&s(c,"BAD_INDENT",Il);const y=m.end,g=d?e(r,d,m,s):t(r,y,i,null,m,s);r.schema.compat&&Ol(n.indent,d,s),Nl(r,a.items,g)&&s(y,"DUPLICATE_KEY","Map keys must be unique");const $=jl(f??[],{indicator:"map-value-ind",next:p,offset:g.range[2],onError:s,parentIndent:n.indent,startOnNewline:!d||"block-scalar"===d.type});if(c=$.end,$.found){h&&("block-map"!==(null==p?void 0:p.type)||$.hasNewline||s(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<$.found.offset-1024&&s(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const i=p?e(r,p,$,s):t(r,c,f,null,$,s);r.schema.compat&&Ol(n.indent,p,s),c=i.range[2];const o=new $u(g,i);r.options.keepSourceTokens&&(o.srcToken=l),a.items.push(o)}else{h&&s(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),$.comment&&(g.comment?g.comment+="\n"+$.comment:g.comment=$.comment);const e=new $u(g);r.options.keepSourceTokens&&(e.srcToken=l),a.items.push(e)}}return u&&u<c&&s(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,c,u??c],a}(e,t,r,n,i):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,s,i){const o=new((null==i?void 0:i.nodeClass)??Pu)(r.schema);r.atRoot&&(r.atRoot=!1);let a=n.offset,c=null;for(const{start:u,value:l}of n.items){const i=jl(u,{indicator:"seq-item-ind",next:l,offset:a,onError:s,parentIndent:n.indent,startOnNewline:!0});if(!i.found){if(!(i.anchor||i.tag||l)){c=i.end,i.comment&&(o.comment=i.comment);continue}l&&"block-seq"===l.type?s(i.end,"BAD_INDENT","All sequence items must start at the same column"):s(a,"MISSING_CHAR","Sequence item without - indicator")}const d=l?e(r,l,i,s):t(r,i.end,u,null,i,s);r.schema.compat&&Ol(n.indent,l,s),a=d.range[2],o.items.push(d)}return o.range=[n.offset,a,c??a],o}(e,t,r,n,i):function({composeNode:e,composeEmptyNode:t},r,n,s,i){const o="{"===n.start.source,a=o?"flow map":"flow sequence",c=new((null==i?void 0:i.nodeClass)??(o?_u:Pu))(r.schema);c.flow=!0;const u=r.atRoot;u&&(r.atRoot=!1);let l=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){const i=n.items[h],{start:u,key:d,sep:f,value:p}=i,m=jl(u,{flow:a,indicator:"explicit-key-ind",next:d??(null==f?void 0:f[0]),offset:l,onError:s,parentIndent:n.indent,startOnNewline:!1});if(!m.found){if(!(m.anchor||m.tag||f||p)){0===h&&m.comma?s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):h<n.items.length-1&&s(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),m.comment&&(c.comment?c.comment+="\n"+m.comment:c.comment=m.comment),l=m.end;continue}!o&&r.options.strict&&Cl(d)&&s(d,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===h)m.comma&&s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(m.comma||s(m.start,"MISSING_CHAR",`Missing , between ${a} items`),m.comment){let e="";e:for(const t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];wc(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(o||f||m.found){const h=m.end,y=d?e(r,d,m,s):t(r,h,u,null,m,s);Bl(d)&&s(y.range,"BLOCK_IN_FLOW",Rl);const g=jl(f??[],{flow:a,indicator:"map-value-ind",next:p,offset:y.range[2],onError:s,parentIndent:n.indent,startOnNewline:!1});if(g.found){if(!o&&!m.found&&r.options.strict){if(f)for(const e of f){if(e===g.found)break;if("newline"===e.type){s(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<g.found.offset-1024&&s(g.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else p&&("source"in p&&p.source&&":"===p.source[0]?s(p,"MISSING_CHAR",`Missing space after : in ${a}`):s(g.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const $=p?e(r,p,g,s):g.found?t(r,g.end,f,null,g,s):null;$?Bl(p)&&s($.range,"BLOCK_IN_FLOW",Rl):g.comment&&(y.comment?y.comment+="\n"+g.comment:y.comment=g.comment);const v=new $u(y,$);if(r.options.keepSourceTokens&&(v.srcToken=i),o){const e=c;Nl(r,e.items,y)&&s(h,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(v)}else{const e=new _u(r.schema);e.flow=!0,e.items.push(v),c.items.push(e)}l=$?$.range[2]:g.end}else{const n=p?e(r,p,m,s):t(r,m.end,f,null,m,s);c.items.push(n),l=n.range[2],Bl(p)&&s(n.range,"BLOCK_IN_FLOW",Rl)}}const d=o?"}":"]",[f,...p]=n.end;let m=l;if(f&&f.source===d)m=f.offset+f.source.length;else{const e=a[0].toUpperCase()+a.substring(1);s(l,u?"MISSING_CHAR":"BAD_INDENT",u?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`),f&&1!==f.source.length&&p.unshift(f)}if(p.length>0){const e=Tl(p,m,r.options.strict,s);e.comment&&(c.comment?c.comment+="\n"+e.comment:c.comment=e.comment),c.range=[n.offset,m,e.offset]}else c.range=[n.offset,m,m];return c}(e,t,r,n,i),a=o.constructor;return"!"===s||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function Ml(e,t,r){const n=t.offset,s=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let f=1;f<s.length;++f){const t=s[f];if(a||"-"!==t&&"+"!==t){const r=Number(t);!o&&r?o=r:-1===c&&(c=e+f)}else a=t}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",d=s.length;for(let f=1;f<t.length;++f){const e=t[f];switch(e.type){case"space":u=!0;case"newline":d+=e.source.length;break;case"comment":if(r&&!u){n(e,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}d+=e.source.length,l=e.source.substring(1);break;case"error":n(e,"UNEXPECTED_TOKEN",e.message),d+=e.source.length;break;default:{n(e,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${e.type}`);const t=e.source;t&&"string"==typeof t&&(d+=t.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:d}}(t,e.options.strict,r);if(!s)return{value:"",type:null,comment:"",range:[n,n,n]};const i=">"===s.mode?Uc.BLOCK_FOLDED:Uc.BLOCK_LITERAL,o=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[(null==n?void 0:n[1])?[n[1],r.slice(n[1].length)]:["",r]];for(let i=1;i<t.length;i+=2)s.push([t[i],t[i+1]]);return s}(t.source):[];let a=o.length;for(let h=o.length-1;h>=0;--h){const e=o[h][1];if(""!==e&&"\r"!==e)break;a=h}if(0===a){const e="+"===s.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"";let r=n+s.length;return t.source&&(r+=t.source.length),{value:e,type:i,comment:s.comment,range:[n,r,r]}}let c=t.indent+s.indent,u=t.offset+s.length,l=0;for(let h=0;h<a;++h){const[t,n]=o[h];if(""!==n&&"\r"!==n){if(t.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(u+t.length,"MISSING_CHAR",e)}if(0===s.indent&&(c=t.length),l=h,0===c&&!e.atRoot){r(u,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===s.indent&&t.length>c&&(c=t.length),u+=t.length+n.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>c&&(a=h+1);let d="",f="",p=!1;for(let h=0;h<l;++h)d+=o[h][0].slice(c)+"\n";for(let h=l;h<a;++h){let[e,t]=o[h];u+=e.length+t.length+1;const n="\r"===t[t.length-1];if(n&&(t=t.slice(0,-1)),t&&e.length<c){const i=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;r(u-t.length-(n?2:1),"BAD_INDENT",i),e=""}i===Uc.BLOCK_LITERAL?(d+=f+e.slice(c)+t,f="\n"):e.length>c||"\t"===t[0]?(" "===f?f="\n":p||"\n"!==f||(f="\n\n"),d+=f+e.slice(c)+t,f="\n",p=!0):""===t?"\n"===f?d+="\n":f="\n":(d+=f+t,f=" ",p=!1)}switch(s.chomp){case"-":break;case"+":for(let e=a;e<o.length;++e)d+="\n"+o[e][0].slice(c);"\n"!==d[d.length-1]&&(d+="\n");break;default:d+="\n"}const m=n+s.length+t.source.length;return{value:d,type:i,comment:s.comment,range:[n,m,m]}}function Ll(e,t,r){const{offset:n,type:s,source:i,end:o}=e;let a,c;const u=(e,t,s)=>r(n+e,t,s);switch(s){case"scalar":a=Uc.PLAIN,c=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Vl(e)}(i,u);break;case"single-quoted-scalar":a=Uc.QUOTE_SINGLE,c=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return Vl(e.slice(1,-1)).replace(/''/g,"'")}(i,u);break;case"double-quoted-scalar":a=Uc.QUOTE_DOUBLE,c=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const s=e[n];if("\r"!==s||"\n"!==e[n+1])if("\n"===s){const{fold:t,offset:s}=Ul(e,n);r+=t,n=s}else if("\\"===s){let s=e[++n];const i=Kl[s];if(i)r+=i;else if("\n"===s)for(s=e[n+1];" "===s||"\t"===s;)s=e[1+ ++n];else if("\r"===s&&"\n"===e[n+1])for(s=e[1+ ++n];" "===s||"\t"===s;)s=e[1+ ++n];else if("x"===s||"u"===s||"U"===s){const i={x:2,u:4,U:8}[s];r+=zl(e,n+1,i,t),n+=i}else{const s=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),r+=s}}else if(" "===s||"\t"===s){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):s)}else r+=s}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}(i,u);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const l=n+i.length,d=Tl(o,l,t,r);return{value:c,type:a,comment:d.comment,range:[n,l,d.offset]}}function Vl(e){let t,r;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),r=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(c){t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let s=n[1],i=" ",o=t.lastIndex;for(r.lastIndex=o;n=r.exec(e);)""===n[1]?"\n"===i?s+=i:i="\n":(s+=i+n[1],i=" "),o=r.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),s+i+((null==n?void 0:n[1])??"")}function Ul(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const Kl={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function zl(e,t,r,n){const s=e.substr(t,r),i=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(i)){const s=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(i)}function Gl(e,t,r,n){const{value:s,type:i,comment:o,range:a}="block-scalar"===t.type?Ml(e,t,n):Ll(t,e.options.strict,n),c=r?e.directives.tagName(r.source,(e=>n(r,"TAG_RESOLVE_FAILED",e))):null,u=r&&c?function(e,t,r,n,s){var i;if("!"===r)return e[hc];const o=[];for(const c of e.tags)if(!c.collection&&c.tag===r){if(!c.default||!c.test)return c;o.push(c)}for(const c of o)if(null==(i=c.test)?void 0:i.test(t))return c;const a=e.knownTags[r];if(a&&!a.collection)return e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[hc]}(e.schema,s,c,r,n):"scalar"===t.type?function({directives:e,schema:t},r,n,s){const i=t.tags.find((e=>{var t;return e.default&&(null==(t=e.test)?void 0:t.test(r))}))||t[hc];if(t.compat){const o=t.compat.find((e=>{var t;return e.default&&(null==(t=e.test)?void 0:t.test(r))}))??t[hc];if(i.tag!==o.tag){s(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(i.tag)} or ${e.tagString(o.tag)}`,!0)}}return i}(e,s,t,n):e.schema[hc];let l;try{const i=u.resolve(s,(e=>n(r??t,"TAG_RESOLVE_FAILED",e)),e.options);l=Dc(i)?i:new Uc(i)}catch(d){const e=d instanceof Error?d.message:String(d);n(r??t,"TAG_RESOLVE_FAILED",e),l=new Uc(s)}return l.range=a,l.source=s,i&&(l.type=i),c&&(l.tag=c),u.format&&(l.format=u.format),o&&(l.comment=o),l}function Jl(e,t,r){if(t){null===r&&(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===(null==r?void 0:r.type);)e+=r.source.length,r=t[++n];break}}return e}const Hl={composeNode:Wl,composeEmptyNode:Yl};function Wl(e,t,r,n){const{spaceBefore:s,comment:i,anchor:o,tag:a}=r;let c,u=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},s){const i=new Mc(r.substring(1));""===i.source&&s(t,"BAD_ALIAS","Alias cannot be an empty string");i.source.endsWith(":")&&s(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=t+r.length,a=Tl(n,o,e.strict,s);i.range=[t,o,a.offset],a.comment&&(i.comment=a.comment);return i}(e,t,n),(o||a)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Gl(e,t,a,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=function(e,t,r,n,s){var i;const o=n?t.directives.tagName(n.source,(e=>s(n,"TAG_RESOLVE_FAILED",e))):null,a="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!n||!o||"!"===o||o===_u.tagName&&"map"===a||o===Pu.tagName&&"seq"===a||!a)return ql(e,t,r,s,o);let c=t.schema.tags.find((e=>e.tag===o&&e.collection===a));if(!c){const i=t.schema.knownTags[o];if(!i||i.collection!==a)return(null==i?void 0:i.collection)?s(n,"BAD_COLLECTION_TYPE",`${i.tag} used for ${a} collection, but expects ${i.collection}`,!0):s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),ql(e,t,r,s,o);t.schema.tags.push(Object.assign({},i,{default:!1})),c=i}const u=ql(e,t,r,s,o,c),l=(null==(i=c.resolve)?void 0:i.call(c,u,(e=>s(n,"TAG_RESOLVE_FAILED",e)),t.options))??u,d=kc(l)?l:new Uc(l);return d.range=u.range,d.tag=o,(null==c?void 0:c.format)&&(d.format=c.format),d}(Hl,e,t,a,n),o&&(c.anchor=o.source.substring(1));break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),c=Yl(e,t.offset,void 0,null,r,n),u=!1}return o&&""===c.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&(c.spaceBefore=!0),i&&("scalar"===t.type&&""===t.source?c.comment=i:c.commentBefore=i),e.options.keepSourceTokens&&u&&(c.srcToken=t),c}function Yl(e,t,r,n,{spaceBefore:s,comment:i,anchor:o,tag:a,end:c},u){const l=Gl(e,{type:"scalar",offset:Jl(t,r,n),indent:-1,source:""},a,u);return o&&(l.anchor=o.source.substring(1),""===l.anchor&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(l.spaceBefore=!0),i&&(l.comment=i,l.range[2]=c),l}function Xl(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Ql(e){var t;let r="",n=!1,s=!1;for(let i=0;i<e.length;++i){const o=e[i];switch(o[0]){case"#":r+=(""===r?"":s?"\n\n":"\n")+(o.substring(1)||" "),n=!0,s=!1;break;case"%":"#"!==(null==(t=e[i+1])?void 0:t[0])&&(i+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:r,afterEmptyLine:s}}class Zl{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const s=Xl(e);n?this.warnings.push(new Al(s,t,r)):this.errors.push(new Fl(s,t,r))},this.directives=new Oc({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Ql(this.prelude);if(r){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(_c(s)&&!s.flow&&s.items.length>0){let e=s.items[0];wc(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=s.commentBefore;s.commentBefore=e?`${r}\n${e}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ql(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const s=Xl(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:s,end:i},o){const a=Object.assign({_directives:t},e),c=new kl(void 0,a),u={atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},l=jl(n,{indicator:"doc-start",next:s??(null==i?void 0:i[0]),offset:r,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(c.directives.docStart=!0,!s||"block-map"!==s.type&&"block-seq"!==s.type||l.hasNewline||o(l.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=s?Wl(u,s,l,o):Yl(u,l.end,n,null,l,o);const d=c.contents.range[2],f=Tl(i,d,!1,o);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Fl(Xl(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new Fl(Xl(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Tl(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Fl(Xl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new kl(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function ed(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const td=new Set("0123456789ABCDEFabcdef"),rd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),nd=new Set(",[]{}"),sd=new Set(" ,[]{}\n\r\t"),id=e=>!e||sd.has(e);class od{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&ed(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\ufeff"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"",yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if("---"===e&&ed(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&ed(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ed(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&ed(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(id),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if(-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&ed(n[3])){if(!(r===this.indentNext-1&&1===this.flowLevel&&("]"===n[0]||"}"===n[0])))return this.flowLevel=0,yield"",yield*this.parseLineStart()}let s=0;for(;","===n[s];)s+=(yield*this.pushCount(1)),s+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(s+=(yield*this.pushIndicators()),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(id),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||ed(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>ed(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":r+=1;break;case"\n":t=s,r=0;break;case"\r":{const e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const s=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>s))break;t=e}return yield"",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(ed(t)||e&&nd.has(t))break;r=n}else if(ed(t)){let s=this.buffer[n+1];if("\r"===t&&("\n"===s?(n+=1,t="\n",s=this.buffer[n+1]):r=n),"#"===s||e&&nd.has(s))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&nd.has(t))break;r=n}return t||this.atEnd?(yield"",yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(id))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(ed(t)||e&&nd.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!ed(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(rd.has(t))t=this.buffer[++e];else{if("%"!==t||!td.has(this.buffer[e+1])||!td.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class ad{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}}function cd(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function ud(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function ld(e){switch(null==e?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function dd(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function fd(e){var t;if(0===e.length)return[];let r=e.length;e:for(;--r>=0;)switch(e[r].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===(null==(t=e[++r])?void 0:t.type););return e.splice(r,e.length)}function pd(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||cd(t.start,"explicit-key-ind")||cd(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,ld(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class md{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new od,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&pd(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===ud(r.start)&&(0===t.indent||r.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==ud(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=fd(dd(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var t;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const t="end"in r.value?r.value.end:void 0,n=Array.isArray(t)?t[t.length-1]:void 0;"comment"===(null==n?void 0:n.type)?null==t||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){const n=e.items[e.items.length-2],s=null==(t=null==n?void 0:n.value)?void 0:t.end;if(Array.isArray(s))return Array.prototype.push.apply(s,r.start),s.push(this.sourceToken),void e.items.pop()}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const t=!this.onKeyLine&&this.indent===e.indent,n=t&&(r.sep||r.explicitKey)&&"seq-item-ind"!==this.type;let s=[];if(n&&r.sep&&!r.value){const t=[];for(let n=0;n<r.sep.length;++n){const s=r.sep[n];switch(s.type){case"newline":t.push(n);break;case"space":break;case"comment":s.indent>e.indent&&(t.length=0);break;default:t.length=0}}t.length>=2&&(s=r.sep.splice(t[1]))}switch(this.type){case"anchor":case"tag":return void(n||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken));case"explicit-key-ind":return r.sep||r.explicitKey?n||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(r.start.push(this.sourceToken),r.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(cd(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(ld(r.key)&&!cd(r.sep,"newline")){const e=fd(r.start),t=r.key,n=r.sep;n.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:t,sep:n}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(cd(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const e=fd(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:s,key:null,sep:[this.sourceToken]}):cd(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const t=this.flowScalar(this.type);return void(n||r.value?(e.items.push({start:s,key:t,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(t):(Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!0))}default:{const r=this.startBlockValue(e);if(r)return t&&"block-seq"!==r.type&&e.items.push({start:s}),void this.stack.push(r)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){const t="end"in r.value?r.value.end:void 0,n=Array.isArray(t)?t[t.length-1]:void 0;"comment"===(null==n?void 0:n.type)?null==t||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){const n=e.items[e.items.length-2],s=null==(t=null==n?void 0:n.value)?void 0:t.end;if(Array.isArray(s))return Array.prototype.push.apply(s,r.start),s.push(this.sourceToken),void e.items.pop()}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;return void r.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(r.value||cd(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=fd(dd(t));pd(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=fd(dd(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=fd(dd(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type)))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function hd(e,t={}){const{lineCounter:r,prettyErrors:n}=function(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new ad||null,prettyErrors:t}}(t),s=new md(null==r?void 0:r.addNewLine),i=new Zl(t);let o=null;for(const a of i.compose(s.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new Fl(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=a;return n&&r&&(o.errors.forEach(Sl(e,r)),o.warnings.forEach(Sl(e,r))),o}function yd(e){if(null===e)return{};if("string"==typeof e){if(""===e.trim())return{};try{return JSON.parse(e)}catch(t){return function(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const s=hd(e,r);if(!s)return null;if(s.warnings.forEach((e=>pu(s.options.logLevel,e))),s.errors.length>0){if("silent"!==s.options.logLevel)throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}(e,{maxAliasCount:1e4})}}return lc(e),e}function gd(e,t={}){if(lc(e))return e;const r=yd(e);return[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:uc(r),...t}]}function $d(e,t,r,n=[]){const s=gd(structuredClone(e)),i=oc(s),o=(null==r?void 0:r.specification)??i.specification;return vd(o,s,r??i,new WeakSet,n,t),{valid:0===(n=n.filter(((e,t,r)=>t===r.findIndex((t=>t.message===e.message&&t.code===e.code))))).length,errors:n,schema:o}}function vd(e,t,r,n,s,i){var o;if(null!==e&&!n.has(e)){for(n.add(e);void 0!==e.$ref;){const n=bd(e.$ref,i,r,t,a,s);if("object"!=typeof n||null===n)break;const c=e.$ref;delete e.$ref;for(const t of Object.keys(n))void 0===e[t]&&(e[t]=n[t]);c&&(null==(o=null==i?void 0:i.onDereference)||o.call(i,{schema:e,ref:c}))}for(const o of Object.values(e))"object"==typeof o&&null!==o&&vd(o,t,r,n,s,i)}function a(e){return vd(e.specification,t,e,n,s,i),e}}function bd(e,t,r,n,s,i){if("string"!=typeof e){if(null==t?void 0:t.throwOnError)throw new Error(l.INVALID_REFERENCE.replace("%s",e));return void i.push({code:"INVALID_REFERENCE",message:l.INVALID_REFERENCE.replace("%s",e)})}const[o,a]=e.split("#",2),c=o!==r.filename;if(o&&c){const e=n.find((e=>e.filename===o));if(!e){if(null==t?void 0:t.throwOnError)throw new Error(l.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o));return void i.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:l.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o)})}return void 0===a?e.specification:bd(`#${a}`,t,s(e),n,s,i)}const u=function(e){return e.split("/").slice(1).map(ac)}(a);try{return u.reduce(((e,t)=>e[t]),r.specification)}catch(d){if(null==t?void 0:t.throwOnError)throw new Error(l.INVALID_REFERENCE.replace("%s",e));i.push({code:"INVALID_REFERENCE",message:l.INVALID_REFERENCE.replace("%s",e)})}}const wd=e=>void 0!==e,Dd=e=>t=>t.keyword===e,Ed=Dd("required"),_d=Dd("anyOf"),kd=Dd("enum"),Pd=e=>(null==e?void 0:e.errors)||[],xd=e=>{return e&&(t=e.children,Object.values(t))||[];var t},Fd=e=>t=>{return xd(e).filter((n=t,r=e=>n===e,e=>!r(e)));var r,n},Ad=e=>t=>t.reduce(((e,t)=>e.concat(t)),e);var Sd={},jd=/~/,Cd=/~[01]/g;function Od(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function Nd(e){return jd.test(e)?e.replace(Cd,Od):e}function Id(e){if("string"==typeof e){if(""===(e=e.split("/"))[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e)){for(const t of e)if("string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function Td(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");var r=(t=Id(t)).length;if(1===r)return e;for(var n=1;n<r;){if(e=e[Nd(t[n++])],r===n)return e;if("object"!=typeof e||null===e)return}}function Rd(e,t,r){if("object"!=typeof e)throw new Error("Invalid input object.");if(0===(t=Id(t)).length)throw new Error("Invalid JSON pointer for set.");return function(e,t,r){for(var n,s,i=1,o=t.length;i<o;){if("constructor"===t[i]||"prototype"===t[i]||"__proto__"===t[i])return e;if(n=Nd(t[i++]),s=o>i,void 0===e[n]&&(Array.isArray(e)&&"-"===n&&(n=e.length),s&&(""!==t[i]&&t[i]<1/0||"-"===t[i]?e[n]=[]:e[n]={})),!s)break;e=e[n]}var a=e[n];return void 0===r?delete e[n]:e[n]=r,a}(e,t,r)}Sd.get=Td,Sd.set=Rd,Sd.compile=function(e){var t=Id(e);return{get:function(e){return Td(e,t)},set:function(e,r){return Rd(e,t,r)}}};const Bd=[],qd=[];function Md(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,s=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-s);)n--,s--;let i,o,a,c,u=0;for(;u<n&&e.charCodeAt(u)===t.charCodeAt(u);)u++;if(n-=u,s-=u,0===n)return s;let l=0,d=0;for(;l<n;)qd[l]=e.charCodeAt(u+l),Bd[l]=++l;for(;d<s;)for(i=t.charCodeAt(u+d),a=d++,o=d,l=0;l<n;l++)c=i===qd[l]?a:a+1,a=Bd[l],o=Bd[l]=a>o?c>o?o+1:c:c>a?a+1:c;return o}class Ld{constructor(e={isIdentifierLocation:!1},{data:t,schema:r,jsonAst:n,jsonRaw:s}){this.options=e,this.data=t,this.schema=r,this.jsonAst=n,this.jsonRaw=s}get instancePath(){return void 0!==this.options.instancePath?this.options.instancePath:this.options.dataPath}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class Vd extends Ld{constructor(...e){super(...e),this.name="EnumValidationError"}getError(){const{message:e,params:t}=this.options,r=this.findBestMatch(),n={message:`${e}: ${t.allowedValues.join(", ")}`,path:this.instancePath};return null!==r&&(n.suggestion=`Did you mean ${r}?`),n}findBestMatch(){const{params:{allowedValues:e}}=this.options,t=""===this.instancePath?this.data:Sd.get(this.data,this.instancePath);if(!t)return null;const r=e.map((e=>({value:e,weight:Md(e,t.toString())}))).sort(((e,t)=>e.weight>t.weight?1:e.weight<t.weight?-1:0))[0];return 1===e.length||r.weight<r.value.length?r.value:null}}class Ud extends Ld{constructor(...e){super(...e),this.name="DefaultValidationError",this.options.isSkipEndLocation=!0}getError(){const{keyword:e,message:t}=this.options;return{message:`${e} ${t}`,path:this.instancePath}}}class Kd extends Ld{constructor(...e){super(...e),this.name="UnevaluatedPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.unevaluatedProperty} is not expected to be here`,path:this.instancePath}}}class zd extends Ld{constructor(...e){super(...e),this.name="RequiredValidationError"}getError(){const{message:e}=this.options;return{message:`${e}`,path:this.instancePath}}}class Gd extends Ld{constructor(...e){super(...e),this.name="PatternValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e,propertyName:t}=this.options;return{message:`Property "${t}" must match pattern ${e.pattern}`,path:this.instancePath}}}class Jd extends Ld{constructor(...e){super(...e),this.name="AdditionalPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.additionalProperty} is not expected to be here`,path:this.instancePath}}}const Hd=/\/[\w_-]+(\/\d+)?/g;function Wd(e,t,r){var n;Pd(e).forEach((t=>{Ed(t)&&(e.errors=[t],e.children={})})),Pd(e).some(_d)&&Object.keys(e.children).length>0&&delete e.errors,(null==(n=e.errors)?void 0:n.length)&&Pd(e).every(kd)&&Fd(t)(e).filter(wd).some(Pd)&&delete t.children[r],Object.entries(e.children).forEach((([t,r])=>Wd(r,e,t)))}function Yd(e,t){const r=Pd(e);if(r.length&&r.every(kd)){const e=[...new Set(Ad([])(r.map((e=>e.params.allowedValues))))],n=r[0];return[new Vd({...n,params:{allowedValues:e}},t)]}return Ad(r.reduce(((e,r)=>{switch(r.keyword){case"additionalProperties":return e.concat(new Jd(r,t));case"pattern":return e.concat(new Gd(r,t));case"required":return e.concat(new zd(r,t));case"unevaluatedProperties":return e.concat(new Kd(r,t));default:return e.concat(new Ud(r,t))}}),[]))(xd(e).map((e=>Yd(e,t))))}function Xd(e,t){const r=function(e=[]){const t={children:{}};return e.forEach((e=>{const r=void 0!==e.instancePath?e.instancePath:e.dataPath,n=""===r?[""]:r.match(Hd);n&&n.reduce(((t,r,s)=>(t.children[r]=t.children[r]||{children:{},errors:[]},s===n.length-1&&t.children[r].errors.push(e),t.children[r])),t)})),t}(e||[]);return Wd(r),Yd(r,t)}function Qd(e,t){return"string"==typeof t?[{message:t}]:function(e,t,r,n={}){const{indent:s=null,json:i=null}=n;return Xd(r,{data:t,schema:e,jsonRaw:i||JSON.stringify(t,null,s)}).map((e=>e.getError()))}(e,null,t,{indent:2}).map((e=>(e.message=e.message.trim(),e)))}const Zd={"http://json-schema.org/draft-04/schema#":Yi,"https://json-schema.org/draft/2020-12/schema":sc};class ef{constructor(){t(this,"version"),t(this,"ajvValidators",{}),t(this,"errors"),t(this,"specificationVersion"),t(this,"specificationType"),t(this,"specification")}async validate(e,t){var r;const n=e.find((e=>e.isEntrypoint)),s=null==n?void 0:n.specification;this.specification=s,(null==(r=this.specification)?void 0:r.info)&&!this.specification.info.version&&(this.specification.info.version="0.0.1");try{if(null==s){if(null==t?void 0:t.throwOnError)throw new Error(l.EMPTY_OR_INVALID);return{valid:!1,errors:Qd(n,l.EMPTY_OR_INVALID)}}const{version:r,specificationType:i,specificationVersion:o}=ic(s);if(this.version=r,this.specificationVersion=o,this.specificationType=i,!r){if(null==t?void 0:t.throwOnError)throw new Error(l.OPENAPI_VERSION_NOT_SUPPORTED);return{valid:!1,errors:Qd(n,l.OPENAPI_VERSION_NOT_SUPPORTED)}}const a=await this.getAjvValidator(r),c=a(s);if(a.errors&&a.errors.length>0){if(null==t?void 0:t.throwOnError)throw new Error(a.errors[0]);return{valid:!1,errors:Qd(n,a.errors)}}const u=$d(e,t);return{valid:c&&u.valid,errors:[...c.errors??[],...u.errors],schema:u.schema}}catch(i){if(null==t?void 0:t.throwOnError)throw i;return{valid:!1,errors:Qd(n,i.message??i)}}}async getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const t=c[e],r=new(0,Zd[t.$schema])({strict:!1});return Oo(r),"3.1"===e&&r.addFormat("media-range",!0),this.ajvValidators[e]=r.compile(t)}}async function tf(e,t){const r=gd(e),n=oc(r),s=$d(r,t);return{specification:n.specification,errors:s.errors,schema:s.schema,...ic(n.specification)}}function rf(e,t){return{specification:cc(oc(gd(e)).specification,(e=>t(e)?e:void 0))}}async function nf(e,t){var r,n,s,i,o,a;const c=[];if(null==(r=null==t?void 0:t.filesystem)?void 0:r.find((t=>t.filename===e)))return{specification:null==(n=oc(t.filesystem))?void 0:n.specification,filesystem:t.filesystem,errors:c};const u=null==(s=null==t?void 0:t.plugins)?void 0:s.find((t=>t.check(e)));let d;if(u)try{d=yd(await u.get(e))}catch(m){if(null==t?void 0:t.throwOnError)throw new Error(l.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return c.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:l.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:c}}else d=yd(e);if(void 0===d){if(null==t?void 0:t.throwOnError)throw new Error("No content to load");return c.push({code:"NO_CONTENT",message:l.NO_CONTENT}),{specification:null,filesystem:[],errors:c}}let f=gd(d,{filename:(null==t?void 0:t.filename)??null});const p=((null==t?void 0:t.filename)?f.find((e=>e.filename===(null==t?void 0:t.filename))):oc(f)).references??uc(d);if(0===p.length)return{specification:null==(i=oc(f))?void 0:i.specification,filesystem:f,errors:c};for(const l of p){const r=null==(o=null==t?void 0:t.plugins)?void 0:o.find((e=>e.check(l)));if(!r)continue;const n=r.check(l)&&r.resolvePath?r.resolvePath(e,l):l;if(f.find((e=>e.filename===l)))continue;const{filesystem:s,errors:i}=await nf(n,{...t,filename:l});c.push(...i),f=[...f,...s.map((e=>({...e,isEntrypoint:!1})))]}return{specification:null==(a=oc(f))?void 0:a.specification,filesystem:f,errors:c}}function sf(e){let t=e;return null!==t&&"string"==typeof t.openapi&&t.openapi.startsWith("3.0")?(t.openapi="3.1.1",t=cc(t,(e=>("undefined"!==e.type&&!0===e.nullable&&(e.type=[e.type,"null"],delete e.nullable),e))),t=cc(t,(e=>(!0===e.exclusiveMinimum?(e.exclusiveMinimum=e.minimum,delete e.minimum):!1===e.exclusiveMinimum&&delete e.exclusiveMinimum,!0===e.exclusiveMaximum?(e.exclusiveMaximum=e.maximum,delete e.maximum):!1===e.exclusiveMaximum&&delete e.exclusiveMaximum,e))),t=cc(t,((e,t)=>(void 0!==e.example&&(!function(e){return[["components","schemas"],"properties","items","allOf","anyOf","oneOf","not","additionalProperties"].some((t=>Array.isArray(t)?t.every(((t,r)=>e[r]===t)):e.includes(t)))||e.includes("schema")||e.some((e=>e.endsWith("Schema")))}(t)?e.examples={default:{value:e.example}}:e.examples=[e.example],delete e.example),e))),t=cc(t,((e,t)=>{if("object"===e.type&&void 0!==e.properties){if(t.slice(0,-1).some(((e,r)=>"content"===e&&"multipart/form-data"===t[r+1]))){const t=Object.entries(e.properties);for(const[e,r]of t)"object"==typeof r&&"string"===r.type&&"binary"===r.format&&(r.contentMediaType="application/octet-stream",delete r.format)}}return e})),t=cc(t,((e,t)=>t.includes("content")&&t.includes("application/octet-stream")?{}:"string"===e.type&&"binary"===e.format?{type:"string",contentMediaType:"application/octet-stream"}:e)),t=cc(t,(e=>"string"===e.type&&"base64"===e.format?{type:"string",contentEncoding:"base64"}:e)),t):t}function of(e){var t,r,n;let s=e;if(null===s||"string"!=typeof s.swagger||!(null==(t=s.swagger)?void 0:t.startsWith("2.0")))return s;if(s.openapi="3.0.4",delete s.swagger,console.warn("[upgradeFromTwoToThree] The upgrade from Swagger 2.0 to OpenAPI 3.0 documents is experimental and lacks features."),s.host){const e=Array.isArray(s.schemes)&&(null==(r=s.schemes)?void 0:r.length)?s.schemes:["http"];s.servers=e.map((e=>({url:`${e}://${s.host}${s.basePath??""}`}))),delete s.basePath,delete s.schemes,delete s.host}if(s.definitions&&(s.components=Object.assign({},s.components,{schemas:s.definitions}),delete s.definitions,s=cc(s,(e=>{var t;return(null==(t=e.$ref)?void 0:t.startsWith("#/definitions/"))&&(e.$ref=e.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),e}))),"object"==typeof s.paths)for(const i in s.paths)if(Object.hasOwn(s.paths,i)){const e=s.paths[i];for(const t in e)if(Object.hasOwn(e,t)){const r=e[t];if(r.parameters){const e=structuredClone(r.parameters.find((e=>"body"===e.in))??{});if(e&&Object.keys(e).length){delete e.name,delete e.in;const t=s.consumes??r.consumes??["application/json"];"object"!=typeof r.requestBody&&(r.requestBody={}),"object"!=typeof r.requestBody.content&&(r.requestBody.content={});const{schema:n,...i}=e;r.requestBody={...r.requestBody,...i};for(const e of t)r.requestBody.content[e]={schema:n}}r.parameters=r.parameters.filter((e=>"body"!==e.in)),delete r.consumes;const t=r.parameters.filter((e=>"formData"===e.in));if(t.length>0){"object"!=typeof r.requestBody&&(r.requestBody={}),"object"!=typeof r.requestBody.content&&(r.requestBody.content={}),r.requestBody.content["application/x-www-form-urlencoded"]={schema:{type:"object",properties:{},required:[]}};for(const e of t)r.requestBody.content["application/x-www-form-urlencoded"].schema.properties[e.name]={type:e.type,description:e.description},e.required&&r.requestBody.content["application/x-www-form-urlencoded"].schema.required.push(e.name);r.parameters=r.parameters.filter((e=>"formData"!==e.in))}}if(r.responses)for(const e in r.responses)if(Object.hasOwn(r.responses,e)){const t=r.responses[e];if(t.schema){const e=s.produces??r.produces??["application/json"];"object"!=typeof t.content&&(t.content={});for(const r of e)t.content[r]={schema:t.schema};delete t.schema}}delete r.produces,0===(null==(n=r.parameters)?void 0:n.length)&&delete r.parameters}}if(s.securityDefinitions){"object"!=typeof s.components&&(s.components={}),s.components=s.components,Object.assign(s.components,{securitySchemes:{}});for(const[e,t]of Object.entries(s.securityDefinitions))if("object"==typeof t)if("type"in t&&"oauth2"===t.type){const{flow:r,authorizationUrl:n,tokenUrl:i,scopes:o}=t;Object.assign(s.components.securitySchemes,{[e]:{type:"oauth2",flows:{[r]:Object.assign({},n&&{authorizationUrl:n},i&&{tokenUrl:i},o&&{scopes:o})}}})}else Object.assign(s.components.securitySchemes,{[e]:t});delete s.securityDefinitions}return s}function af(e){if(!e)return{specification:null,version:"3.1"};return{specification:[of,sf].reduce(((e,t)=>t(e)),oc(gd(e)).specification),version:"3.1"}}async function cf(e,t){const r=gd(e),n=new ef;return{...await n.validate(r,t),specification:n.specification,version:n.version}}async function uf(e){const{input:t}={...e};let r={};for(const n of e.tasks){const e=n.name,s="options"in n?n.options:void 0,i=r.specification?r.specification:"object"==typeof t?structuredClone(t):t;"load"===e?r={...r,...await nf(t,s)}:"filter"===e?r={...r,...rf(i,s)}:"dereference"===e?r={...r,...await tf(i,s)}:"upgrade"===e?r={...r,...af(i)}:"validate"===e&&(r={...r,...await cf(i,s)})}return r}async function lf(e){const{filesystem:t}=await uf(e);return ic(oc(t).specification)}async function df(e){const{filesystem:t}=await uf(e);return t}async function ff(e){return{filesystem:[],...await uf(e)}}t(ef,"supportedVersions",u);const pf=e=>JSON.stringify(e,null,2);async function mf(e){const{filesystem:t}=await uf(e);return pf(oc(t).specification)}const hf=e=>function(e,t,r){let n=null;if(Array.isArray(t)&&(n=t),void 0===e){const{keepUndefined:e}={};if(!e)return}return new kl(e,n,r).toString(r)}(e);async function yf(e){const{filesystem:t}=await uf(e);return hf(oc(t).specification)}function gf(e,t){return{...e,tasks:[...e.tasks,t]}}function $f(e,t){var r;const n=gf(e,{name:"dereference",options:{throwOnError:null==(r=e.options)?void 0:r.throwOnError,...t??{}}});return{details:()=>lf(n),files:()=>df(n),get:()=>ff(n),toJson:()=>mf(n),toYaml:()=>yf(n)}}function vf(e,t){const r=gf(e,{name:"filter",options:t});return{dereference:e=>$f(r,e),details:()=>lf(r),files:()=>df(r),get:()=>ff(r),toJson:()=>mf(r),toYaml:()=>yf(r)}}function bf(e,t){var r;const n=gf(e,{name:"validate",options:{throwOnError:null==(r=e.options)?void 0:r.throwOnError,...t??{}}});return{dereference:e=>$f(n,e),details:()=>lf(n),files:()=>df(n),filter:e=>vf(n,e),get:()=>ff(n),toJson:()=>mf(n),toYaml:()=>yf(n),upgrade:()=>wf(n)}}function wf(e){const t=gf(e,{name:"upgrade"});return{dereference:e=>$f(t,e),details:()=>lf(t),files:()=>df(t),filter:e=>vf(t,e),get:()=>ff(t),toJson:()=>mf(t),toYaml:()=>yf(t),validate:e=>bf(t,e)}}function Df(e){const t={input:null,options:e,tasks:[]};return{load:(e,r)=>function(e,t,r){var n;const s={...gf(e,{name:"load",options:{throwOnError:null==(n=e.options)?void 0:n.throwOnError,...r}}),input:t};return{dereference:e=>$f(s,e),details:()=>lf(s),files:()=>df(s),filter:e=>vf(s,e),get:()=>ff(s),upgrade:()=>wf(s),toJson:()=>mf(s),toYaml:()=>yf(s),validate:e=>bf(s,e)}}(t,e,r)}}const Ef={limit:20},_f=e=>{let t=0;const r={...Ef,...e};return{check:e=>"string"==typeof e&&!(!e.startsWith("http://")&&!e.startsWith("https://")),async get(e){if(!1!==(null==r?void 0:r.limit)&&t>=(null==r?void 0:r.limit))console.warn(`[fetchUrls] Maximum number of requests reeached (${null==r?void 0:r.limit}), skipping request`);else try{t++;const n=await((null==r?void 0:r.fetch)?r.fetch(e):fetch(e));return await n.text()}catch(n){return void console.error("[fetchUrls]",n.message,`(${e})`)}}}},kf=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;const Pf="js/scalar.js",xf={_integration:"fastify"},Ff={hide:!0},Af=e=>{const t=e??"/reference";return t.endsWith("/")?t.slice(0,-1):t},Sf=e=>{const{json:t="/openapi.json",yaml:r="/openapi.yaml"}=e??{};return{json:t,yaml:r}},jf=r((async(e,t)=>{const{configuration:r}=t;let c={...xf,...r};const u=(()=>{const{content:t,url:r}=(null==c?void 0:c.spec)??{};return t?{type:"content",get:()=>"function"==typeof t?t():t}:r?{type:"url",get:()=>r}:e.hasPlugin("@fastify/swagger")?{type:"swagger",get:()=>e.swagger()}:void 0})();if(!u)return void e.log.warn("[@scalar/fastify-api-reference] You didn’t provide a spec.content or spec.url, and @fastify/swagger could not be found. Please provide one of these options.");const l=function(){const e=s.dirname(i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("index.cjs",document.baseURI).href)),t=[s.resolve(`${e}/js/standalone.js`),s.resolve(`${e}/../../dist/js/standalone.js`)].find((e=>n.existsSync(e)));if(void 0===t)throw new Error(`JavaScript file not found: ${s.resolve(`${e}/js/standalone.js`)}`);return n.readFileSync(t,"utf8")}(),d={};if(t.hooks){const e=["onRequest","preHandler"];for(const r of e)t.hooks[r]&&(d[r]=t.hooks[r])}const f=()=>Df().load(u.get(),{plugins:[_f()]}),p=async e=>{var t,r;const n=await(null==e?void 0:e.get());return"string"!=typeof(s=(null==(r=null==(t=null==n?void 0:n.specification)?void 0:t.info)?void 0:r.title)??"spec")?"":(s=s.toLowerCase()).replace(kf,"").replace(/ /g,"-");var s},m=`${Af(t.routePrefix)}${Sf(t.openApiDocumentEndpoints).json}`;e.route({method:"GET",url:m,schema:Ff,...d,...t.logLevel&&{logLevel:t.logLevel},async handler(e,t){const r=f(),n=await p(r),s=JSON.parse(await r.toJson());return t.header("Content-Type","application/json").header("Content-Disposition",`filename=${n}.json`).header("Access-Control-Allow-Origin","*").header("Access-Control-Allow-Methods","*").send(s)}});const h=`${Af(t.routePrefix)}${Sf(t.openApiDocumentEndpoints).yaml}`;e.route({method:"GET",url:h,schema:Ff,...d,...t.logLevel&&{logLevel:t.logLevel},async handler(e,t){const r=f(),n=await p(r),s=await r.toYaml();return t.header("Content-Type","application/yaml").header("Content-Disposition",`filename=${n}.yaml`).header("Access-Control-Allow-Origin","*").header("Access-Control-Allow-Methods","*").send(s)}});var y;!0!==e.initialConfig.ignoreTrailingSlash&&Af(t.routePrefix)&&e.route({method:"GET",url:Af(t.routePrefix),schema:Ff,...d,...t.logLevel&&{logLevel:t.logLevel},handler:(e,r)=>r.redirect(Af(t.routePrefix)+"/",302)}),e.route({method:"GET",url:`${Af(t.routePrefix)}/`,schema:Ff,...d,...t.logLevel&&{logLevel:t.logLevel},handler(e,r){const n=new URL(e.url,`${e.protocol}://${e.hostname}`);return n.pathname.endsWith("/")?("url"!==u.type&&(c={...c,spec:{url:`.${Sf(t.openApiDocumentEndpoints).json}`}}),r.header("Content-Type","text/html; charset=utf-8").send(o.getHtmlDocument({cdn:Pf,...c},"\n.light-mode {\n color-scheme: light;\n --scalar-color-1: #1c1e21;\n --scalar-color-2: #757575;\n --scalar-color-3: #8e8e8e;\n --scalar-color-disabled: #b4b1b1;\n --scalar-color-ghost: #a7a7a7;\n --scalar-color-accent: #2f8555;\n --scalar-background-1: #fff;\n --scalar-background-2: #f5f5f5;\n --scalar-background-3: #ededed;\n --scalar-background-4: rgba(0, 0, 0, 0.06);\n --scalar-background-accent: #2f85551f;\n\n --scalar-border-color: rgba(0, 0, 0, 0.1);\n --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);\n --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);\n --scalar-lifted-brightness: 1;\n --scalar-backdrop-brightness: 1;\n\n --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);\n --scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px,\n rgba(0, 0, 0, 0.08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;\n\n --scalar-button-1: rgb(49 53 56);\n --scalar-button-1-color: #fff;\n --scalar-button-1-hover: rgb(28 31 33);\n\n --scalar-color-green: #007300;\n --scalar-color-red: #af272b;\n --scalar-color-yellow: #b38200;\n --scalar-color-blue: #3b8ba5;\n --scalar-color-orange: #fb892c;\n --scalar-color-purple: #5203d1;\n}\n\n.dark-mode {\n color-scheme: dark;\n --scalar-color-1: rgba(255, 255, 255, 0.9);\n --scalar-color-2: rgba(255, 255, 255, 0.62);\n --scalar-color-3: rgba(255, 255, 255, 0.44);\n --scalar-color-disabled: rgba(255, 255, 255, 0.34);\n --scalar-color-ghost: rgba(255, 255, 255, 0.26);\n --scalar-color-accent: #27c2a0;\n --scalar-background-1: #1b1b1d;\n --scalar-background-2: #242526;\n --scalar-background-3: #3b3b3b;\n --scalar-background-4: rgba(255, 255, 255, 0.06);\n --scalar-background-accent: #27c2a01f;\n\n --scalar-border-color: rgba(255, 255, 255, 0.1);\n --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);\n --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);\n --scalar-lifted-brightness: 1.45;\n --scalar-backdrop-brightness: 0.5;\n\n --scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);\n --scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px,\n rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, 0.1);\n\n --scalar-button-1: #f6f6f6;\n --scalar-button-1-color: #000;\n --scalar-button-1-hover: #e7e7e7;\n\n --scalar-color-green: #26b226;\n --scalar-color-red: #fb565b;\n --scalar-color-yellow: #ffc426;\n --scalar-color-blue: #6ecfef;\n --scalar-color-orange: #ff8d4d;\n --scalar-color-purple: #b191f9;\n}\n"))):r.redirect(`${n.pathname}/`,301)}}),e.route({method:"GET",url:(y=t.routePrefix,`${Af(y)}/${Pf}`.replace(/\/\//g,"/")),schema:Ff,...d,...t.logLevel&&{logLevel:t.logLevel},handler:(e,t)=>t.header("Content-Type","application/javascript; charset=utf-8").send(l)})}),{name:"@scalar/fastify-api-reference"});module.exports=jf;
|
|
1
|
+
"use strict";const e=require("@scalar/openapi-parser"),t=require("@scalar/openapi-parser/plugins/fetch-urls"),a=require("fastify-plugin"),n=require("github-slugger"),r=require("node:fs"),s=require("node:path"),i=require("node:url");var o,d,c,u="undefined"!=typeof document?document.currentScript:null;(d=o||(o={})).assertEqual=e=>e,d.assertIs=function(e){},d.assertNever=function(e){throw new Error},d.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},d.getValidEnumValues=e=>{const t=d.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),a={};for(const n of t)a[n]=e[n];return d.objectValues(a)},d.objectValues=e=>d.objectKeys(e).map((function(t){return e[t]})),d.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},d.find=(e,t)=>{for(const a of e)if(t(a))return a},d.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,d.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},d.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(c||(c={})).mergeShapes=(e,t)=>({...e,...t});const l=o.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),p=e=>{switch(typeof e){case"undefined":return l.undefined;case"string":return l.string;case"number":return isNaN(e)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(e)?l.array:null===e?l.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?l.promise:"undefined"!=typeof Map&&e instanceof Map?l.map:"undefined"!=typeof Set&&e instanceof Set?l.set:"undefined"!=typeof Date&&e instanceof Date?l.date:l.object;default:return l.unknown}},h=o.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class m extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(n);else if("invalid_return_type"===r.code)n(r.returnTypeError);else if("invalid_arguments"===r.code)n(r.argumentsError);else if(0===r.path.length)a._errors.push(t(r));else{let e=a,n=0;for(;n<r.path.length;){const a=r.path[n];n===r.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(r))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}static assert(e){if(!(e instanceof m))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,o.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}m.create=e=>new m(e);const f=(e,t)=>{let a;switch(e.code){case h.invalid_type:a=e.received===l.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case h.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,o.jsonStringifyReplacer)}`;break;case h.unrecognized_keys:a=`Unrecognized key(s) in object: ${o.joinValues(e.keys,", ")}`;break;case h.invalid_union:a="Invalid input";break;case h.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${o.joinValues(e.options)}`;break;case h.invalid_enum_value:a=`Invalid enum value. Expected ${o.joinValues(e.options)}, received '${e.received}'`;break;case h.invalid_arguments:a="Invalid function arguments";break;case h.invalid_return_type:a="Invalid function return type";break;case h.invalid_date:a="Invalid date";break;case h.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:o.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case h.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case h.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case h.custom:a="Invalid input";break;case h.invalid_intersection_types:a="Intersection results could not be merged";break;case h.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case h.not_finite:a="Number must be finite";break;default:a=t.defaultError,o.assertNever(e)}return{message:a}};let g=f;function y(){return g}const v=e=>{const{data:t,path:a,errorMaps:n,issueData:r}=e,s=[...a,...r.path||[]],i={...r,path:s};if(void 0!==r.message)return{...r,path:s,message:r.message};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...r,path:s,message:o}};function _(e,t){const a=y(),n=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===f?void 0:f].filter((e=>!!e))});e.common.issues.push(n)}class b{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return x;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const e=await n.key,t=await n.value;a.push({key:e,value:t})}return b.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return x;if("aborted"===r.status)return x;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(a[t.value]=r.value)}return{status:e.value,value:a}}}const x=Object.freeze({status:"aborted"}),k=e=>({status:"dirty",value:e}),w=e=>({status:"valid",value:e}),T=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,C=e=>"valid"===e.status,S=e=>"undefined"!=typeof Promise&&e instanceof Promise;function j(e,t,a,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function O(e,t,a,n,r){if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,a),a}var E,N,R,P;"function"==typeof SuppressedError&&SuppressedError,(N=E||(E={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},N.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class ${constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const A=(e,t)=>{if(C(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new m(e.common.issues);return this._error=t,this._error}}};function I(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:r}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:r.defaultError}:void 0===r.data?{message:null!==(s=null!=o?o:n)&&void 0!==s?s:r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:null!==(i=null!=o?o:a)&&void 0!==i?i:r.defaultError}},description:r}}class L{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return p(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(S(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},r=this._parseSync({data:e,path:n.path,parent:n});return A(n,r)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},n=this._parse({data:e,path:a.path,parent:a}),r=await(S(n)?n:Promise.resolve(n));return A(a,r)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const r=e(t),s=()=>n.addIssue({code:h.custom,...a(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(s(),!1))):!!r||(s(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Ne({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Re.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this,this._def)}promise(){return Ee.create(this,this._def)}or(e){return fe.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Ne({...I(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new $e({...I(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new Me({typeName:Ke.ZodBranded,type:this,...I(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ae({...I(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return Ue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M=/^c[^\s-]{8,}$/i,D=/^[0-9a-z]+$/,U=/^[0-9A-HJKMNP-TV-Z]{26}$/,z=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,V=/^[a-z0-9_-]{21}$/i,K=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,q=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let W;const B=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,F=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,J=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",G=new RegExp(`^${Y}$`);function H(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function X(e){let t=`${Y}T${H(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}class Q extends L{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==l.string){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.string,received:t.parsedType}),x}const t=new b;let a;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),_(a,{code:h.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),_(a,{code:h.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const n=e.data.length>i.value,r=e.data.length<i.value;(n||r)&&(a=this._getOrReturnCtx(e,a),n?_(a,{code:h.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):r&&_(a,{code:h.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)q.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"email",code:h.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)W||(W=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),W.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"emoji",code:h.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)z.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"uuid",code:h.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"nanoid",code:h.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)M.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"cuid",code:h.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)D.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"cuid2",code:h.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)U.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"ulid",code:h.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(s){a=this._getOrReturnCtx(e,a),_(a,{validation:"url",code:h.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"regex",code:h.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){X(i).test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else if("date"===i.kind){G.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:"date",message:i.message}),t.dirty())}else if("time"===i.kind){new RegExp(`^${H(i)}$`).test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{code:h.invalid_string,validation:"time",message:i.message}),t.dirty())}else"duration"===i.kind?K.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"duration",code:h.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(n=e.data,("v4"!==(r=i.version)&&r||!B.test(n))&&("v6"!==r&&r||!F.test(n))&&(a=this._getOrReturnCtx(e,a),_(a,{validation:"ip",code:h.invalid_string,message:i.message}),t.dirty())):"base64"===i.kind?J.test(e.data)||(a=this._getOrReturnCtx(e,a),_(a,{validation:"base64",code:h.invalid_string,message:i.message}),t.dirty()):o.assertNever(i);var n,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:h.invalid_string,...E.errToObj(a)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...E.errToObj(e)})}url(e){return this._addCheck({kind:"url",...E.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...E.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...E.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...E.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...E.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...E.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...E.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...E.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...E.errToObj(e)})}datetime(e){var t,a;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(a=null==e?void 0:e.local)&&void 0!==a&&a,...E.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...E.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...E.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...E.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...E.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...E.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...E.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...E.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...E.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...E.errToObj(t)})}nonempty(e){return this.min(1,E.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ee(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=a>n?a:n;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}Q.create=e=>{var t;return new Q({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...I(e)})};class te extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==l.number){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.number,received:t.parsedType}),x}let t;const a=new b;for(const n of this._def.checks)if("int"===n.kind)o.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),_(t,{code:h.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==ee(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),_(t,{code:h.not_finite,message:n.message}),a.dirty()):o.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,E.toString(t))}gt(e,t){return this.setLimit("min",e,!1,E.toString(t))}lte(e,t){return this.setLimit("max",e,!0,E.toString(t))}lt(e,t){return this.setLimit("max",e,!1,E.toString(t))}setLimit(e,t,a,n){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:E.toString(n)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:E.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:E.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:E.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:E.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:E.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&o.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}te.create=e=>new te({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...I(e)});class ae extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==l.bigint){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.bigint,received:t.parsedType}),x}let t;const a=new b;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),_(t,{code:h.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):o.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,E.toString(t))}gt(e,t){return this.setLimit("min",e,!1,E.toString(t))}lte(e,t){return this.setLimit("max",e,!0,E.toString(t))}lt(e,t){return this.setLimit("max",e,!1,E.toString(t))}setLimit(e,t,a,n){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:E.toString(n)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:E.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ae.create=e=>{var t;return new ae({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...I(e)})};class ne extends L{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==l.boolean){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.boolean,received:t.parsedType}),x}return w(e.data)}}ne.create=e=>new ne({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...I(e)});class re extends L{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==l.date){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.date,received:t.parsedType}),x}if(isNaN(e.data.getTime())){return _(this._getOrReturnCtx(e),{code:h.invalid_date}),x}const t=new b;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),_(a,{code:h.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),_(a,{code:h.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):o.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:E.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:E.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}re.create=e=>new re({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...I(e)});class se extends L{_parse(e){if(this._getType(e)!==l.symbol){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.symbol,received:t.parsedType}),x}return w(e.data)}}se.create=e=>new se({typeName:Ke.ZodSymbol,...I(e)});class ie extends L{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.undefined,received:t.parsedType}),x}return w(e.data)}}ie.create=e=>new ie({typeName:Ke.ZodUndefined,...I(e)});class oe extends L{_parse(e){if(this._getType(e)!==l.null){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.null,received:t.parsedType}),x}return w(e.data)}}oe.create=e=>new oe({typeName:Ke.ZodNull,...I(e)});class de extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}de.create=e=>new de({typeName:Ke.ZodAny,...I(e)});class ce extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}ce.create=e=>new ce({typeName:Ke.ZodUnknown,...I(e)});class ue extends L{_parse(e){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.never,received:t.parsedType}),x}}ue.create=e=>new ue({typeName:Ke.ZodNever,...I(e)});class le extends L{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.void,received:t.parsedType}),x}return w(e.data)}}le.create=e=>new le({typeName:Ke.ZodVoid,...I(e)});class pe extends L{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.array)return _(t,{code:h.invalid_type,expected:l.array,received:t.parsedType}),x;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,r=t.data.length<n.exactLength.value;(e||r)&&(_(t,{code:e?h.too_big:h.too_small,minimum:r?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(_(t,{code:h.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(_(t,{code:h.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new $(t,e,t.path,a))))).then((e=>b.mergeArray(a,e)));const r=[...t.data].map(((e,a)=>n.type._parseSync(new $(t,e,t.path,a))));return b.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new pe({...this._def,minLength:{value:e,message:E.toString(t)}})}max(e,t){return new pe({...this._def,maxLength:{value:e,message:E.toString(t)}})}length(e,t){return new pe({...this._def,exactLength:{value:e,message:E.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof me){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=Re.create(he(n))}return new me({...e._def,shape:()=>t})}return e instanceof pe?new pe({...e._def,type:he(e.element)}):e instanceof Re?Re.create(he(e.unwrap())):e instanceof Pe?Pe.create(he(e.unwrap())):e instanceof be?be.create(e.items.map((e=>he(e)))):e}pe.create=(e,t)=>new pe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...I(t)});class me extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=o.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==l.object){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.object,received:t.parsedType}),x}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:r}=this._getCached(),s=[];if(!(this._def.catchall instanceof ue&&"strip"===this._def.unknownKeys))for(const o in a.data)r.includes(o)||s.push(o);const i=[];for(const o of r){const e=n[o],t=a.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new $(a,t,a.path,o)),alwaysSet:o in a.data})}if(this._def.catchall instanceof ue){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of s)i.push({key:{status:"valid",value:t},value:{status:"valid",value:a.data[t]}});else if("strict"===e)s.length>0&&(_(a,{code:h.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new $(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key,n=await t.value;e.push({key:a,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>b.mergeObjectSync(t,e))):b.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return E.errToObj,new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,r,s,i;const o=null!==(s=null===(r=(n=this._def).errorMap)||void 0===r?void 0:r.call(n,t,a).message)&&void 0!==s?s:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=E.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return o.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new me({...this._def,shape:()=>t})}omit(e){const t={};return o.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new me({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};return o.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new me({...this._def,shape:()=>t})}required(e){const t={};return o.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Re;)e=e._def.innerType;t[a]=e}})),new me({...this._def,shape:()=>t})}keyof(){return Se(o.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ue.create(),typeName:Ke.ZodObject,...I(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ue.create(),typeName:Ke.ZodObject,...I(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ue.create(),typeName:Ke.ZodObject,...I(t)});class fe extends L{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const a=e.map((e=>new m(e.ctx.common.issues)));return _(t,{code:h.invalid_union,unionErrors:a}),x}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=n.map((e=>new m(e)));return _(t,{code:h.invalid_union,unionErrors:r}),x}}get options(){return this._def.options}}fe.create=(e,t)=>new fe({options:e,typeName:Ke.ZodUnion,...I(t)});const ge=e=>e instanceof Ze?ge(e.schema):e instanceof Ne?ge(e.innerType()):e instanceof Ce?[e.value]:e instanceof je?e.options:e instanceof Oe?o.objectValues(e.enum):e instanceof $e?ge(e._def.innerType):e instanceof ie?[void 0]:e instanceof oe?[null]:e instanceof Re?[void 0,...ge(e.unwrap())]:e instanceof Pe?[null,...ge(e.unwrap())]:e instanceof Me||e instanceof Ue?ge(e.unwrap()):e instanceof Ae?ge(e._def.innerType):[];class ye extends L{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.object)return _(t,{code:h.invalid_type,expected:l.object,received:t.parsedType}),x;const a=this.discriminator,n=t.data[a],r=this.optionsMap.get(n);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(_(t,{code:h.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const n=new Map;for(const r of t){const t=ge(r.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,r)}}return new ye({typeName:Ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...I(a)})}}function ve(e,t){const a=p(e),n=p(t);if(e===t)return{valid:!0,data:e};if(a===l.object&&n===l.object){const a=o.objectKeys(t),n=o.objectKeys(e).filter((e=>-1!==a.indexOf(e))),r={...e,...t};for(const s of n){const a=ve(e[s],t[s]);if(!a.valid)return{valid:!1};r[s]=a.data}return{valid:!0,data:r}}if(a===l.array&&n===l.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const r=ve(e[n],t[n]);if(!r.valid)return{valid:!1};a.push(r.data)}return{valid:!0,data:a}}return a===l.date&&n===l.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _e extends L{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(T(e)||T(n))return x;const r=ve(e.value,n.value);return r.valid?((Z(e)||Z(n))&&t.dirty(),{status:t.value,value:r.data}):(_(a,{code:h.invalid_intersection_types}),x)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}_e.create=(e,t,a)=>new _e({left:e,right:t,typeName:Ke.ZodIntersection,...I(a)});class be extends L{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return _(a,{code:h.invalid_type,expected:l.array,received:a.parsedType}),x;if(a.data.length<this._def.items.length)return _(a,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&a.data.length>this._def.items.length&&(_(a,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new $(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>b.mergeArray(t,e))):b.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new be({...this._def,rest:e})}}be.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:e,typeName:Ke.ZodTuple,rest:null,...I(t)})};class xe extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return _(a,{code:h.invalid_type,expected:l.object,received:a.parsedType}),x;const n=[],r=this._def.keyType,s=this._def.valueType;for(const i in a.data)n.push({key:r._parse(new $(a,i,a.path,i)),value:s._parse(new $(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,a){return new xe(t instanceof L?{keyType:e,valueType:t,typeName:Ke.ZodRecord,...I(a)}:{keyType:Q.create(),valueType:e,typeName:Ke.ZodRecord,...I(t)})}}class ke extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return _(a,{code:h.invalid_type,expected:l.map,received:a.parsedType}),x;const n=this._def.keyType,r=this._def.valueType,s=[...a.data.entries()].map((([e,t],s)=>({key:n._parse(new $(a,e,a.path,[s,"key"])),value:r._parse(new $(a,t,a.path,[s,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of s){const n=await a.key,r=await a.value;if("aborted"===n.status||"aborted"===r.status)return x;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of s){const n=a.key,r=a.value;if("aborted"===n.status||"aborted"===r.status)return x;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}ke.create=(e,t,a)=>new ke({valueType:t,keyType:e,typeName:Ke.ZodMap,...I(a)});class we extends L{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return _(a,{code:h.invalid_type,expected:l.set,received:a.parsedType}),x;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(_(a,{code:h.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(_(a,{code:h.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function s(e){const a=new Set;for(const n of e){if("aborted"===n.status)return x;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>r._parse(new $(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new we({...this._def,minSize:{value:e,message:E.toString(t)}})}max(e,t){return new we({...this._def,maxSize:{value:e,message:E.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}we.create=(e,t)=>new we({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...I(t)});class Te extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.function)return _(t,{code:h.invalid_type,expected:l.function,received:t.parsedType}),x;function a(e,a){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),f].filter((e=>!!e)),issueData:{code:h.invalid_arguments,argumentsError:a}})}function n(e,a){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),f].filter((e=>!!e)),issueData:{code:h.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ee){const e=this;return w((async function(...t){const i=new m([]),o=await e._def.args.parseAsync(t,r).catch((e=>{throw i.addIssue(a(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,r).catch((e=>{throw i.addIssue(n(d,e)),i}))}))}{const e=this;return w((function(...t){const i=e._def.args.safeParse(t,r);if(!i.success)throw new m([a(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,r);if(!d.success)throw new m([n(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Te({...this._def,args:be.create(e).rest(ce.create())})}returns(e){return new Te({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Te({args:e||be.create([]).rest(ce.create()),returns:t||ce.create(),typeName:Ke.ZodFunction,...I(a)})}}class Ze extends L{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ze.create=(e,t)=>new Ze({getter:e,typeName:Ke.ZodLazy,...I(t)});class Ce extends L{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return _(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Se(e,t){return new je({values:e,typeName:Ke.ZodEnum,...I(t)})}Ce.create=(e,t)=>new Ce({value:e,typeName:Ke.ZodLiteral,...I(t)});class je extends L{constructor(){super(...arguments),R.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return _(t,{expected:o.joinValues(a),received:t.parsedType,code:h.invalid_type}),x}if(j(this,R)||O(this,R,new Set(this._def.values)),!j(this,R).has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return _(t,{received:t.data,code:h.invalid_enum_value,options:a}),x}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return je.create(e,{...this._def,...t})}exclude(e,t=this._def){return je.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}R=new WeakMap,je.create=Se;class Oe extends L{constructor(){super(...arguments),P.set(this,void 0)}_parse(e){const t=o.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const e=o.objectValues(t);return _(a,{expected:o.joinValues(e),received:a.parsedType,code:h.invalid_type}),x}if(j(this,P)||O(this,P,new Set(o.getValidEnumValues(this._def.values))),!j(this,P).has(e.data)){const e=o.objectValues(t);return _(a,{received:a.data,code:h.invalid_enum_value,options:e}),x}return w(e.data)}get enum(){return this._def.values}}P=new WeakMap,Oe.create=(e,t)=>new Oe({values:e,typeName:Ke.ZodNativeEnum,...I(t)});class Ee extends L{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&!1===t.common.async)return _(t,{code:h.invalid_type,expected:l.promise,received:t.parsedType}),x;const a=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return w(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ee.create=(e,t)=>new Ee({type:e,typeName:Ke.ZodPromise,...I(t)});class Ne extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{_(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(a.data,r);if(a.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return x;const n=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n}));{if("aborted"===t.value)return x;const n=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?x:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?x:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!C(e))return e;const s=n.transform(e.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>C(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}o.assertNever(n)}}Ne.create=(e,t,a)=>new Ne({schema:e,typeName:Ke.ZodEffects,effect:t,...I(a)}),Ne.createWithPreprocess=(e,t,a)=>new Ne({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...I(a)});class Re extends L{_parse(e){return this._getType(e)===l.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:Ke.ZodOptional,...I(t)});class Pe extends L{_parse(e){return this._getType(e)===l.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ke.ZodNullable,...I(t)});class $e extends L{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}$e.create=(e,t)=>new $e({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...I(t)});class Ae extends L{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return S(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new m(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new m(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...I(t)});class Ie extends L{_parse(e){if(this._getType(e)!==l.nan){const t=this._getOrReturnCtx(e);return _(t,{code:h.invalid_type,expected:l.nan,received:t.parsedType}),x}return{status:"valid",value:e.data}}}Ie.create=e=>new Ie({typeName:Ke.ZodNaN,...I(e)});const Le=Symbol("zod_brand");class Me extends L{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class De extends L{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),k(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new De({in:e,out:t,typeName:Ke.ZodPipeline})}}class Ue extends L{_parse(e){const t=this._def.innerType._parse(e),a=e=>(C(e)&&(e.value=Object.freeze(e.value)),e);return S(t)?t.then((e=>a(e))):a(t)}unwrap(){return this._def.innerType}}function ze(e,t={},a){return e?de.create().superRefine(((n,r)=>{var s,i;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...d,fatal:o})}})):de.create()}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Ke.ZodReadonly,...I(t)});const Ve={object:me.lazycreate};var Ke,qe;(qe=Ke||(Ke={})).ZodString="ZodString",qe.ZodNumber="ZodNumber",qe.ZodNaN="ZodNaN",qe.ZodBigInt="ZodBigInt",qe.ZodBoolean="ZodBoolean",qe.ZodDate="ZodDate",qe.ZodSymbol="ZodSymbol",qe.ZodUndefined="ZodUndefined",qe.ZodNull="ZodNull",qe.ZodAny="ZodAny",qe.ZodUnknown="ZodUnknown",qe.ZodNever="ZodNever",qe.ZodVoid="ZodVoid",qe.ZodArray="ZodArray",qe.ZodObject="ZodObject",qe.ZodUnion="ZodUnion",qe.ZodDiscriminatedUnion="ZodDiscriminatedUnion",qe.ZodIntersection="ZodIntersection",qe.ZodTuple="ZodTuple",qe.ZodRecord="ZodRecord",qe.ZodMap="ZodMap",qe.ZodSet="ZodSet",qe.ZodFunction="ZodFunction",qe.ZodLazy="ZodLazy",qe.ZodLiteral="ZodLiteral",qe.ZodEnum="ZodEnum",qe.ZodEffects="ZodEffects",qe.ZodNativeEnum="ZodNativeEnum",qe.ZodOptional="ZodOptional",qe.ZodNullable="ZodNullable",qe.ZodDefault="ZodDefault",qe.ZodCatch="ZodCatch",qe.ZodPromise="ZodPromise",qe.ZodBranded="ZodBranded",qe.ZodPipeline="ZodPipeline",qe.ZodReadonly="ZodReadonly";const We=Q.create,Be=te.create,Fe=Ie.create,Je=ae.create,Ye=ne.create,Ge=re.create,He=se.create,Xe=ie.create,Qe=oe.create,et=de.create,tt=ce.create,at=ue.create,nt=le.create,rt=pe.create,st=me.create,it=me.strictCreate,ot=fe.create,dt=ye.create,ct=_e.create,ut=be.create,lt=xe.create,pt=ke.create,ht=we.create,mt=Te.create,ft=Ze.create,gt=Ce.create,yt=je.create,vt=Oe.create,_t=Ee.create,bt=Ne.create,xt=Re.create,kt=Pe.create,wt=Ne.createWithPreprocess,Tt=De.create,Zt={string:e=>Q.create({...e,coerce:!0}),number:e=>te.create({...e,coerce:!0}),boolean:e=>ne.create({...e,coerce:!0}),bigint:e=>ae.create({...e,coerce:!0}),date:e=>re.create({...e,coerce:!0})},Ct=x;var St=Object.freeze({__proto__:null,defaultErrorMap:f,setErrorMap:function(e){g=e},getErrorMap:y,makeIssue:v,EMPTY_PATH:[],addIssueToContext:_,ParseStatus:b,INVALID:x,DIRTY:k,OK:w,isAborted:T,isDirty:Z,isValid:C,isAsync:S,get util(){return o},get objectUtil(){return c},ZodParsedType:l,getParsedType:p,ZodType:L,datetimeRegex:X,ZodString:Q,ZodNumber:te,ZodBigInt:ae,ZodBoolean:ne,ZodDate:re,ZodSymbol:se,ZodUndefined:ie,ZodNull:oe,ZodAny:de,ZodUnknown:ce,ZodNever:ue,ZodVoid:le,ZodArray:pe,ZodObject:me,ZodUnion:fe,ZodDiscriminatedUnion:ye,ZodIntersection:_e,ZodTuple:be,ZodRecord:xe,ZodMap:ke,ZodSet:we,ZodFunction:Te,ZodLazy:Ze,ZodLiteral:Ce,ZodEnum:je,ZodNativeEnum:Oe,ZodPromise:Ee,ZodEffects:Ne,ZodTransformer:Ne,ZodOptional:Re,ZodNullable:Pe,ZodDefault:$e,ZodCatch:Ae,ZodNaN:Ie,BRAND:Le,ZodBranded:Me,ZodPipeline:De,ZodReadonly:Ue,custom:ze,Schema:L,ZodSchema:L,late:Ve,get ZodFirstPartyTypeKind(){return Ke},coerce:Zt,any:et,array:rt,bigint:Je,boolean:Ye,date:Ge,discriminatedUnion:dt,effect:bt,enum:yt,function:mt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ze((t=>t instanceof e),t),intersection:ct,lazy:ft,literal:gt,map:pt,nan:Fe,nativeEnum:vt,never:at,null:Qe,nullable:kt,number:Be,object:st,oboolean:()=>Ye().optional(),onumber:()=>Be().optional(),optional:xt,ostring:()=>We().optional(),pipeline:Tt,preprocess:wt,promise:_t,record:lt,set:ht,strictObject:it,string:We,symbol:He,transformer:bt,tuple:ut,undefined:Xe,union:ot,unknown:tt,void:nt,NEVER:Ct,ZodIssueCode:h,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:m});const jt=[["--theme-","--scalar-"],["--sidebar-","--scalar-sidebar-"]],Ot=jt.map((([e])=>e));const Et=St.enum(["alternate","default","moon","purple","solarized","bluePlanet","deepSpace","saturn","kepler","elysiajs","fastify","mars","none"]),Nt=St.enum(["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]),Rt=St.enum(["adonisjs","docusaurus","dotnet","elysiajs","express","fastapi","fastify","go","hono","html","laravel","litestar","nestjs","nextjs","nitro","nuxt","platformatic","react","rust","vue"]).nullable(),Pt=St.object({url:St.string().optional(),content:St.union([St.string(),St.record(St.any()),St.function().returns(St.record(St.any())),St.null()]).optional()}),$t=St.object({basePath:St.string()}),At=St.object({authentication:St.any().optional(),baseServerURL:St.string().optional(),hideClientButton:St.boolean().optional().default(!1).catch(!1),proxyUrl:St.string().optional(),searchHotKey:Nt.optional(),servers:St.array(St.any()).optional(),showSidebar:St.boolean().optional().default(!0).catch(!0),spec:Pt.optional(),theme:Et.optional().default("default").catch("default"),_integration:Rt.optional()}),It="https://api.scalar.com/request-proxy",Lt="https://proxy.scalar.com",Mt=At.merge(St.object({layout:St.enum(["modern","classic"]).optional().default("modern").catch("modern"),proxy:St.string().optional(),isEditable:St.boolean().optional().default(!1).catch(!1),hideModels:St.boolean().optional().default(!1).catch(!1),hideDownloadButton:St.boolean().optional().default(!1).catch(!1),hideTestRequestButton:St.boolean().optional().default(!1).catch(!1),hideSearch:St.boolean().optional().default(!1).catch(!1),darkMode:St.boolean().optional(),forceDarkModeState:St.enum(["dark","light"]).optional(),hideDarkModeToggle:St.boolean().optional().default(!1).catch(!1),metaData:St.any().optional(),favicon:St.string().optional(),hiddenClients:St.union([St.record(St.union([St.boolean(),St.array(St.string())])),St.array(St.string()),St.literal(!0)]).optional(),defaultHttpClient:St.object({targetKey:St.custom(),clientKey:St.string()}).optional(),customCss:St.string().optional(),onSpecUpdate:St.function().args(St.string()).returns(St.void()).optional(),onServerChange:St.function().args(St.string()).returns(St.void()).optional(),pathRouting:$t.optional(),generateHeadingSlug:St.function().args(St.object({slug:St.string().default("headingSlug")})).returns(St.string()).optional(),generateModelSlug:St.function().args(St.object({name:St.string().default("modelName")})).returns(St.string()).optional(),generateTagSlug:St.function().args(St.object({name:St.string().default("tagName")})).returns(St.string()).optional(),generateOperationSlug:St.function().args(St.object({path:St.string(),operationId:St.string().optional(),method:St.string(),summary:St.string().optional()})).returns(St.string()).optional(),generateWebhookSlug:St.function().args(St.object({name:St.string(),method:St.string().optional()})).returns(St.string()).optional(),onLoaded:St.union([St.function().returns(St.void()),St.undefined()]).optional(),redirect:St.function().args(St.string()).returns(St.string().nullable().optional()).optional(),withDefaultFonts:St.boolean().optional().default(!0).catch(!0),defaultOpenAllTags:St.boolean().optional(),tagsSorter:St.union([St.literal("alpha"),St.function().args(St.any(),St.any()).returns(St.number())]).optional(),operationsSorter:St.union([St.literal("alpha"),St.literal("method"),St.function().args(St.any(),St.any()).returns(St.number())]).optional()})).transform((e=>{const t={...e};var a;return t.customCss&&(t.customCss=(a=t.customCss,Ot.some((e=>a.includes(e)))?(console.warn("DEPRECATION WARNING: It looks like you're using legacy CSS variables in your custom CSS string. Please migrate them to use the updated prefixes. See https://github.com/scalar/scalar/blob/main/documentation/themes.md#theme-prefix-changes"),jt.reduce(((e,[t,a])=>e.replaceAll(t,a)),a)):a)),t.proxy&&(console.warn("[DEPRECATED] You’re using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package."),t.proxyUrl||(t.proxyUrl=t.proxy),delete t.proxy),t.proxyUrl===It&&(console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${It}).`),console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${Lt}) instead.`),console.warn(`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${Lt}). Read more: https://github.com/scalar/scalar`),t.proxyUrl=Lt),t})),Dt=St.object({cdn:St.string().optional().default("https://cdn.jsdelivr.net/npm/@scalar/api-reference"),pageTitle:St.string().optional().default("Scalar API Reference")}),Ut=(e,t="")=>{const{cdn:a,pageTitle:n,...r}=e,s=Dt.parse({cdn:a,pageTitle:n,customTheme:t}),i=Mt.parse(r);return`\n <!DOCTYPE html>\n <html>\n <head>\n <title>${s.pageTitle}</title>\n <meta charset="utf-8" />\n <meta\n name="viewport"\n content="width=device-width, initial-scale=1" />\n <style>\n ${e.theme?"":t}\n </style>\n </head>\n <body>\n ${function(e,t){return`\n <script\n id="api-reference"\n type="application/json"\n data-configuration="${zt(e)}">${Vt(e)}<\/script>\n <script src="${t}"><\/script>\n `}(i,s.cdn)}\n </body>\n </html>\n `};const zt=e=>{var t,a,n;const r={...e};return(null==(t=r.spec)?void 0:t.url)?(null==(a=r.spec)?void 0:a.content)&&(null==(n=r.spec)||delete n.content):delete r.spec,JSON.stringify(r).split('"').join(""")},Vt=e=>{var t,a,n,r;return(null==(t=e.spec)?void 0:t.content)?"function"==typeof(null==(a=e.spec)?void 0:a.content)?JSON.stringify(null==(n=e.spec)?void 0:n.content()):JSON.stringify(null==(r=e.spec)?void 0:r.content):""},Kt="js/scalar.js",qt={hide:!0},Wt=e=>{const t=e??"/reference";return t.endsWith("/")?t.slice(0,-1):t},Bt=e=>{const{json:t="/openapi.json",yaml:a="/openapi.yaml"}=e??{};return{json:t,yaml:a}},Ft={_integration:"fastify"},Jt=a((async(a,o)=>{const{configuration:d}=o;let c={...Ft,...d};const l=(()=>{const{content:e,url:t}=(null==c?void 0:c.spec)??{};return e?{type:"content",get:()=>"function"==typeof e?e():e}:t?{type:"url",get:()=>t}:a.hasPlugin("@fastify/swagger")?{type:"swagger",get:()=>a.swagger()}:void 0})();if(!l)return void a.log.warn("[@scalar/fastify-api-reference] You didn’t provide a spec.content or spec.url, and @fastify/swagger could not be found. Please provide one of these options.");const p=function(){const e=s.dirname(i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:u&&"SCRIPT"===u.tagName.toUpperCase()&&u.src||new URL("index.cjs",document.baseURI).href)),t=[s.resolve(`${e}/js/standalone.js`),s.resolve(`${e}/../../dist/js/standalone.js`)].find((e=>r.existsSync(e)));if(void 0===t)throw new Error(`JavaScript file not found: ${s.resolve(`${e}/js/standalone.js`)}`);return r.readFileSync(t,"utf8")}(),h={};if(o.hooks){const e=["onRequest","preHandler"];for(const t of e)o.hooks[t]&&(h[t]=o.hooks[t])}const m=()=>e.openapi().load(l.get(),{plugins:[t.fetchUrls()]}),f=async e=>{var t,a;const r=await(null==e?void 0:e.get());return n.slug((null==(a=null==(t=null==r?void 0:r.specification)?void 0:t.info)?void 0:a.title)??"spec")},g=`${Wt(o.routePrefix)}${Bt(o.openApiDocumentEndpoints).json}`;a.route({method:"GET",url:g,schema:qt,...h,...o.logLevel&&{logLevel:o.logLevel},async handler(e,t){const a=m(),n=await f(a),r=JSON.parse(await a.toJson());return t.header("Content-Type","application/json").header("Content-Disposition",`filename=${n}.json`).header("Access-Control-Allow-Origin","*").header("Access-Control-Allow-Methods","*").send(r)}});const y=`${Wt(o.routePrefix)}${Bt(o.openApiDocumentEndpoints).yaml}`;a.route({method:"GET",url:y,schema:qt,...h,...o.logLevel&&{logLevel:o.logLevel},async handler(e,t){const a=m(),n=await f(a),r=await a.toYaml();return t.header("Content-Type","application/yaml").header("Content-Disposition",`filename=${n}.yaml`).header("Access-Control-Allow-Origin","*").header("Access-Control-Allow-Methods","*").send(r)}});var v;!0!==a.initialConfig.ignoreTrailingSlash&&Wt(o.routePrefix)&&a.route({method:"GET",url:Wt(o.routePrefix),schema:qt,...h,...o.logLevel&&{logLevel:o.logLevel},handler:(e,t)=>t.redirect(Wt(o.routePrefix)+"/",302)}),a.route({method:"GET",url:`${Wt(o.routePrefix)}/`,schema:qt,...h,...o.logLevel&&{logLevel:o.logLevel},handler(e,t){const a=new URL(e.url,`${e.protocol}://${e.hostname}`);return a.pathname.endsWith("/")?("url"!==l.type&&(c={...c,spec:{url:`.${Bt(o.openApiDocumentEndpoints).json}`}}),t.header("Content-Type","text/html; charset=utf-8").send(Ut({cdn:Kt,...c},"\n.light-mode {\n color-scheme: light;\n --scalar-color-1: #1c1e21;\n --scalar-color-2: #757575;\n --scalar-color-3: #8e8e8e;\n --scalar-color-disabled: #b4b1b1;\n --scalar-color-ghost: #a7a7a7;\n --scalar-color-accent: #2f8555;\n --scalar-background-1: #fff;\n --scalar-background-2: #f5f5f5;\n --scalar-background-3: #ededed;\n --scalar-background-4: rgba(0, 0, 0, 0.06);\n --scalar-background-accent: #2f85551f;\n\n --scalar-border-color: rgba(0, 0, 0, 0.1);\n --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);\n --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);\n --scalar-lifted-brightness: 1;\n --scalar-backdrop-brightness: 1;\n\n --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);\n --scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px,\n rgba(0, 0, 0, 0.08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;\n\n --scalar-button-1: rgb(49 53 56);\n --scalar-button-1-color: #fff;\n --scalar-button-1-hover: rgb(28 31 33);\n\n --scalar-color-green: #007300;\n --scalar-color-red: #af272b;\n --scalar-color-yellow: #b38200;\n --scalar-color-blue: #3b8ba5;\n --scalar-color-orange: #fb892c;\n --scalar-color-purple: #5203d1;\n}\n\n.dark-mode {\n color-scheme: dark;\n --scalar-color-1: rgba(255, 255, 255, 0.9);\n --scalar-color-2: rgba(255, 255, 255, 0.62);\n --scalar-color-3: rgba(255, 255, 255, 0.44);\n --scalar-color-disabled: rgba(255, 255, 255, 0.34);\n --scalar-color-ghost: rgba(255, 255, 255, 0.26);\n --scalar-color-accent: #27c2a0;\n --scalar-background-1: #1b1b1d;\n --scalar-background-2: #242526;\n --scalar-background-3: #3b3b3b;\n --scalar-background-4: rgba(255, 255, 255, 0.06);\n --scalar-background-accent: #27c2a01f;\n\n --scalar-border-color: rgba(255, 255, 255, 0.1);\n --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);\n --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);\n --scalar-lifted-brightness: 1.45;\n --scalar-backdrop-brightness: 0.5;\n\n --scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);\n --scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px,\n rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, 0.1);\n\n --scalar-button-1: #f6f6f6;\n --scalar-button-1-color: #000;\n --scalar-button-1-hover: #e7e7e7;\n\n --scalar-color-green: #26b226;\n --scalar-color-red: #fb565b;\n --scalar-color-yellow: #ffc426;\n --scalar-color-blue: #6ecfef;\n --scalar-color-orange: #ff8d4d;\n --scalar-color-purple: #b191f9;\n}\n"))):t.redirect(`${a.pathname}/`,301)}}),a.route({method:"GET",url:(v=o.routePrefix,`${Wt(v)}/${Kt}`.replace(/\/\//g,"/")),schema:qt,...h,...o.logLevel&&{logLevel:o.logLevel},handler:(e,t)=>t.header("Content-Type","application/javascript; charset=utf-8").send(p)})}),{name:"@scalar/fastify-api-reference"});module.exports=Jt;
|