diff --git a/README.md b/README.md
index afe98f6d7..e5c0dd8e0 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,6 @@
-
-
-
-
- JavaScript Parser
-
-
- Use this package to parse and validate AsyncAPI documents —either YAML or JSON— in your Node.js or browser application. Updated bundle for the browser is always attached to the GitHub Release.
-
+[![AsyncAPI JavaScript Parser](./assets/logo.png)](https://www.asyncapi.com)
+
+Use this package to parse and validate AsyncAPI documents —either YAML or JSON— in your Node.js or browser application. Updated bundle for the browser is always attached to the GitHub Release.
![npm](https://img.shields.io/npm/v/@asyncapi/parser?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/parser?style=for-the-badge)
diff --git a/assets/logo.png b/assets/logo.png
index 66f97478c..047b032f1 100644
Binary files a/assets/logo.png and b/assets/logo.png differ
diff --git a/dist/bundle.js b/dist/bundle.js
index f3bd84434..b032cf18a 100644
--- a/dist/bundle.js
+++ b/dist/bundle.js
@@ -1 +1 @@
-(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i{const channel=doc.channel(channelName);assignIdToParameters(channel.parameters())})}function assignUidToComponentSchemas(doc){if(doc.hasComponents()){for(const[key,s]of Object.entries(doc.components().schemas())){s.json()[String(xParserSchemaId)]=key}}}function assignUidToComponentParameterSchemas(doc){if(doc.hasComponents()){assignIdToParameters(doc.components().parameters())}}function assignNameToAnonymousMessages(doc){let anonymousMessageCounter=0;if(doc.hasChannels()){doc.channelNames().forEach(channelName=>{const channel=doc.channel(channelName);if(channel.hasPublish())addNameToKey(channel.publish().messages(),++anonymousMessageCounter);if(channel.hasSubscribe())addNameToKey(channel.subscribe().messages(),++anonymousMessageCounter)})}}function addNameToKey(messages,number){messages.forEach(m=>{if(m.name()===undefined&&m.ext(xParserMessageName)===undefined){m.json()[String(xParserMessageName)]=``}})}function assignIdToAnonymousSchemas(doc){let anonymousSchemaCounter=0;const callback=schema=>{if(!schema.uid()){schema.json()[String(xParserSchemaId)]=``}};traverseAsyncApiDocument(doc,callback)}module.exports={assignNameToComponentMessages:assignNameToComponentMessages,assignUidToParameterSchemas:assignUidToParameterSchemas,assignUidToComponentSchemas:assignUidToComponentSchemas,assignUidToComponentParameterSchemas:assignUidToComponentParameterSchemas,assignNameToAnonymousMessages:assignNameToAnonymousMessages,assignIdToAnonymousSchemas:assignIdToAnonymousSchemas}},{"./constants":4,"./iterators":8}],2:[function(require,module,exports){const Ajv=require("ajv");const ParserError=require("./errors/parser-error");const asyncapi=require("@asyncapi/specs");const{improveAjvErrors:improveAjvErrors}=require("./utils");const cloneDeep=require("lodash.clonedeep");const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,getMimeTypes:getMimeTypes};async function parse({message:message,originalAsyncAPIDocument:originalAsyncAPIDocument,fileFormat:fileFormat,parsedAsyncAPIDocument:parsedAsyncAPIDocument,pathToPayload:pathToPayload,defaultSchemaFormat:defaultSchemaFormat}){const payload=message.payload;if(!payload)return;message["x-parser-original-schema-format"]=message.schemaFormat||defaultSchemaFormat;message["x-parser-original-payload"]=cloneDeep(message.payload);const validate=getValidator(parsedAsyncAPIDocument.asyncapi);const valid=validate(payload);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"schema-validation-errors",title:"This is not a valid AsyncAPI Schema Object.",parsedJSON:parsedAsyncAPIDocument,validationErrors:improveAjvErrors(addFullPathToDataPath(errors,pathToPayload),originalAsyncAPIDocument,fileFormat)})}function getMimeTypes(){const mimeTypes=["application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"];["2.0.0","2.1.0","2.2.0","2.3.0"].forEach(version=>{mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`,`application/vnd.aai.asyncapi+json;version=${version}`,`application/vnd.aai.asyncapi+yaml;version=${version}`)});return mimeTypes}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(preparePayloadSchema(asyncapi[String(version)]),version);validate=ajv.getSchema(version)}return validate}function preparePayloadSchema(asyncapiSchema){return{$ref:"#/definitions/schema",definitions:asyncapiSchema.definitions}}function addFullPathToDataPath(errors,path){return errors.map(err=>({...err,...{dataPath:`${path}${err.dataPath}`}}))}},{"./errors/parser-error":6,"./utils":42,"@asyncapi/specs":62,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,"lodash.clonedeep":170}],3:[function(require,module,exports){window.AsyncAPIParser=require("./index")},{"./index":7}],4:[function(require,module,exports){const xParserSpecParsed="x-parser-spec-parsed";const xParserSpecStringified="x-parser-spec-stringified";const xParserMessageName="x-parser-message-name";const xParserSchemaId="x-parser-schema-id";const xParserCircle="x-parser-circular";const xParserCircleProps="x-parser-circular-props";module.exports={xParserSpecParsed:xParserSpecParsed,xParserSpecStringified:xParserSpecStringified,xParserMessageName:xParserMessageName,xParserSchemaId:xParserSchemaId,xParserCircle:xParserCircle,xParserCircleProps:xParserCircleProps}},{}],5:[function(require,module,exports){const ParserError=require("./errors/parser-error");const Operation=require("./models/operation");const{parseUrlVariables:parseUrlVariables,getMissingProps:getMissingProps,groupValidationErrors:groupValidationErrors,tilde:tilde,parseUrlQueryParameters:parseUrlQueryParameters,setNotProvidedParams:setNotProvidedParams,getUnknownServers:getUnknownServers}=require("./utils");const validationError="validation-errors";function validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat){const srvs=parsedJSON.servers;if(!srvs)return true;const srvsMap=new Map(Object.entries(srvs));const notProvidedVariables=new Map;const notProvidedExamplesInEnum=new Map;srvsMap.forEach((srvr,srvrName)=>{const variables=parseUrlVariables(srvr.url);const variablesObj=srvr.variables;const notProvidedServerVars=notProvidedVariables.get(tilde(srvrName));if(!variables)return;const missingServerVariables=getMissingProps(variables,variablesObj);if(missingServerVariables.length){notProvidedVariables.set(tilde(srvrName),notProvidedServerVars?notProvidedServerVars.concat(missingServerVariables):missingServerVariables)}if(variablesObj){setNotValidExamples(variablesObj,srvrName,notProvidedExamplesInEnum)}});if(notProvidedVariables.size){throw new ParserError({type:validationError,title:"Not all server variables are described with variable object",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server does not have a corresponding variable object for",notProvidedVariables,asyncapiYAMLorJSON,initialFormat)})}if(notProvidedExamplesInEnum.size){throw new ParserError({type:validationError,title:"Check your server variables. The example does not match the enum list",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server variable provides an example that does not match the enum list",notProvidedExamplesInEnum,asyncapiYAMLorJSON,initialFormat)})}return true}function setNotValidExamples(variables,srvrName,notProvidedExamplesInEnum){const variablesMap=new Map(Object.entries(variables));variablesMap.forEach((variable,variableName)=>{if(variable.enum&&variable.examples){const wrongExamples=variable.examples.filter(r=>!variable.enum.includes(r));if(wrongExamples.length){notProvidedExamplesInEnum.set(`${tilde(srvrName)}/variables/${tilde(variableName)}`,wrongExamples)}}})}function validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,operations){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const duplicatedOperations=new Map;const allOperations=[];const addDuplicateToMap=(op,channelName,opName)=>{const operationId=op.operationId;if(!operationId)return;const operationPath=`${tilde(channelName)}/${opName}/operationId`;const isOperationIdDuplicated=allOperations.filter(v=>v[0]===operationId);if(!isOperationIdDuplicated.length)return allOperations.push([operationId,operationPath]);duplicatedOperations.set(operationPath,isOperationIdDuplicated[0][1])};chnlsMap.forEach((chnlObj,chnlName)=>{operations.forEach(opName=>{const op=chnlObj[String(opName)];if(op)addDuplicateToMap(op,chnlName,opName)})});if(duplicatedOperations.size){throw new ParserError({type:validationError,title:"operationId must be unique across all the operations.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("channels","is a duplicate of",duplicatedOperations,asyncapiYAMLorJSON,initialFormat)})}return true}function validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,specialSecTypes){const srvs=parsedJSON.servers;if(!srvs)return true;const root="servers";const srvsMap=new Map(Object.entries(srvs));const missingSecSchema=new Map,invalidSecurityValues=new Map;srvsMap.forEach((server,serverName)=>{const serverSecInfo=server.security;if(!serverSecInfo)return true;serverSecInfo.forEach(secObj=>{Object.keys(secObj).forEach(secName=>{const schema=findSecuritySchema(secName,parsedJSON.components);const srvrSecurityPath=`${serverName}/security/${secName}`;if(!schema.length)return missingSecSchema.set(srvrSecurityPath);const schemaType=schema[1];if(!isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName))invalidSecurityValues.set(srvrSecurityPath,schemaType)})})});if(missingSecSchema.size){throw new ParserError({type:validationError,title:"Server security name must correspond to a security scheme which is declared in the security schemes under the components object.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"doesn't have a corresponding security schema under the components object",missingSecSchema,asyncapiYAMLorJSON,initialFormat)})}if(invalidSecurityValues.size){throw new ParserError({type:validationError,title:"Server security value must be an empty array if corresponding security schema type is not oauth2 or openIdConnect.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"security info must have an empty array because its corresponding security schema type is",invalidSecurityValues,asyncapiYAMLorJSON,initialFormat)})}return true}function findSecuritySchema(securityName,components){const secSchemes=components&&components.securitySchemes;const secSchemesMap=secSchemes?new Map(Object.entries(secSchemes)):new Map;const schemaInfo=[];for(const[schemaName,schema]of secSchemesMap.entries()){if(schemaName===securityName){schemaInfo.push(schemaName,schema.type);return schemaInfo}}return schemaInfo}function isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName){if(!specialSecTypes.includes(schemaType)){const securityObjValue=secObj[String(secName)];return!securityObjValue.length}return true}function validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const notProvidedParams=new Map;const invalidChannelName=new Map;const unknownServers=new Map;chnlsMap.forEach((val,key)=>{const variables=parseUrlVariables(key);const notProvidedChannelParams=notProvidedParams.get(tilde(key));const queryParameters=parseUrlQueryParameters(key);const unknownServerNames=getUnknownServers(parsedJSON,val);if(variables){setNotProvidedParams(variables,val,key,notProvidedChannelParams,notProvidedParams)}if(queryParameters){invalidChannelName.set(tilde(key),queryParameters)}if(unknownServerNames.length>0){unknownServers.set(tilde(key),unknownServerNames)}});const parameterValidationErrors=groupValidationErrors("channels","channel does not have a corresponding parameter object for",notProvidedParams,asyncapiYAMLorJSON,initialFormat);const nameValidationErrors=groupValidationErrors("channels","channel contains invalid name with url query parameters",invalidChannelName,asyncapiYAMLorJSON,initialFormat);const serverValidationErrors=groupValidationErrors("channels","channel contains servers that are not on the servers list in the root of the document",unknownServers,asyncapiYAMLorJSON,initialFormat);const allValidationErrors=parameterValidationErrors.concat(nameValidationErrors).concat(serverValidationErrors);if(notProvidedParams.size||invalidChannelName.size||unknownServers.size){throw new ParserError({type:validationError,title:"Channel validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat){const invalidRoot=validateRootTags(parsedJSON);const invalidChannels=validateAllChannelsTags(parsedJSON);const invalidOperationTraits=validateOperationTraitTags(parsedJSON);const invalidMessages=validateMessageTags(parsedJSON);const invalidMessageTraits=validateMessageTraitsTags(parsedJSON);const errorMessage="contains duplicate tag names";let invalidRootValidationErrors=[];let invalidChannelsValidationErrors=[];let invalidOperationTraitsValidationErrors=[];let invalidMessagesValidationErrors=[];let invalidMessageTraitsValidationErrors=[];if(invalidRoot.size){invalidRootValidationErrors=groupValidationErrors(null,errorMessage,invalidRoot,asyncapiYAMLorJSON,initialFormat)}if(invalidChannels.size){invalidChannelsValidationErrors=groupValidationErrors("channels",errorMessage,invalidChannels,asyncapiYAMLorJSON,initialFormat)}if(invalidOperationTraits.size){invalidOperationTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidOperationTraits,asyncapiYAMLorJSON,initialFormat)}if(invalidMessages.size){invalidMessagesValidationErrors=groupValidationErrors("components",errorMessage,invalidMessages,asyncapiYAMLorJSON,initialFormat)}if(invalidMessageTraits.size){invalidMessageTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidMessageTraits,asyncapiYAMLorJSON,initialFormat)}const allValidationErrors=invalidRootValidationErrors.concat(invalidChannelsValidationErrors).concat(invalidOperationTraitsValidationErrors).concat(invalidMessagesValidationErrors).concat(invalidMessageTraitsValidationErrors);if(allValidationErrors.length){throw new ParserError({type:validationError,title:"Tags validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateRootTags(parsedJSON){const invalidRoot=new Map;const duplicateNames=parsedJSON.tags&&getDuplicateTagNames(parsedJSON.tags);if(duplicateNames&&duplicateNames.length){invalidRoot.set("tags",duplicateNames.toString())}return invalidRoot}function validateOperationTraitTags(parsedJSON){const invalidOperationTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.operationTraits){Object.keys(parsedJSON.components.operationTraits).forEach(operationTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.operationTraits[operationTrait].tags);if(duplicateNames&&duplicateNames.length){const operationTraitsPath=`operationTraits/${operationTrait}/tags`;invalidOperationTraits.set(operationTraitsPath,duplicateNames.toString())}})}return invalidOperationTraits}function validateAllChannelsTags(parsedJSON){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const invalidChannels=new Map;chnlsMap.forEach((channel,channelName)=>validateChannelTags(invalidChannels,channel,channelName));return invalidChannels}function validateChannelTags(invalidChannels,channel,channelName){if(channel.publish){validateOperationTags(invalidChannels,channel.publish,`${tilde(channelName)}/publish`)}if(channel.subscribe){validateOperationTags(invalidChannels,channel.subscribe,`${tilde(channelName)}/subscribe`)}}function validateOperationTags(invalidChannels,operation,operationPath){if(!operation)return;tryAddInvalidEntries(invalidChannels,`${operationPath}/tags`,operation.tags);if(operation.message){if(operation.message.oneOf){operation.message.oneOf.forEach((message,idx)=>{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/oneOf/${idx}/tags`,message.tags)})}else{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/tags`,operation.message.tags)}}}function tryAddInvalidEntries(invalidChannels,key,tags){const duplicateNames=tags&&getDuplicateTagNames(tags);if(duplicateNames&&duplicateNames.length){invalidChannels.set(key,duplicateNames.toString())}}function validateMessageTraitsTags(parsedJSON){const invalidMessageTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messageTraits){Object.keys(parsedJSON.components.messageTraits).forEach(messageTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messageTraits[messageTrait].tags);if(duplicateNames&&duplicateNames.length){const messageTraitsPath=`messageTraits/${messageTrait}/tags`;invalidMessageTraits.set(messageTraitsPath,duplicateNames.toString())}})}return invalidMessageTraits}function validateMessageTags(parsedJSON){const invalidMessages=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messages){Object.keys(parsedJSON.components.messages).forEach(message=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messages[message].tags);if(duplicateNames&&duplicateNames.length){const messagePath=`messages/${message}/tags`;invalidMessages.set(messagePath,duplicateNames.toString())}})}return invalidMessages}function getDuplicateTagNames(tags){if(!tags)return null;const tagNames=tags.map(item=>item.name);return tagNames.reduce((acc,item,idx,arr)=>{if(arr.indexOf(item)!==idx&&acc.indexOf(item)<0){acc.push(item)}return acc},[])}module.exports={validateServerVariables:validateServerVariables,validateOperationId:validateOperationId,validateServerSecurity:validateServerSecurity,validateChannels:validateChannels,validateTags:validateTags}},{"./errors/parser-error":6,"./models/operation":31,"./utils":42}],6:[function(require,module,exports){const ERROR_URL_PREFIX="https://github.com/asyncapi/parser-js/";const buildError=(from,to)=>{to.type=from.type.startsWith(ERROR_URL_PREFIX)?from.type:`${ERROR_URL_PREFIX}${from.type}`;to.title=from.title;if(from.detail)to.detail=from.detail;if(from.validationErrors)to.validationErrors=from.validationErrors;if(from.parsedJSON)to.parsedJSON=from.parsedJSON;if(from.location)to.location=from.location;if(from.refs)to.refs=from.refs;return to};class ParserError extends Error{constructor(def){super();buildError(def,this);this.message=def.title}toJS(){return buildError(this,{})}}module.exports=ParserError},{}],7:[function(require,module,exports){const parser=require("./parser");const defaultAsyncAPISchemaParser=require("./asyncapiSchemaFormatParser");parser.registerSchemaParser(defaultAsyncAPISchemaParser);module.exports=parser},{"./asyncapiSchemaFormatParser":2,"./parser":41}],8:[function(require,module,exports){const SchemaIteratorCallbackType=Object.freeze({NEW_SCHEMA:"NEW_SCHEMA",END_SCHEMA:"END_SCHEMA"});const SchemaTypesToIterate=Object.freeze({parameters:"parameters",payloads:"payloads",headers:"headers",components:"components",objects:"objects",arrays:"arrays",oneOfs:"oneOfs",allOfs:"allOfs",anyOfs:"anyOfs",nots:"nots",propertyNames:"propertyNames",patternProperties:"patternProperties",contains:"contains",ifs:"ifs",thenes:"thenes",elses:"elses",dependencies:"dependencies",definitions:"definitions"});function traverseSchema(schema,propOrIndex,options){if(!schema)return;const{callback:callback,schemaTypesToIterate:schemaTypesToIterate,seenSchemas:seenSchemas}=options;const jsonSchema=schema.json();if(seenSchemas.has(jsonSchema))return;seenSchemas.add(jsonSchema);let types=schema.type()||[];if(!Array.isArray(types)){types=[types]}if(!schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object"))return;if(!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array"))return;if(callback(schema,propOrIndex,SchemaIteratorCallbackType.NEW_SCHEMA)===false)return;if(schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object")){recursiveSchemaObject(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array")){recursiveSchemaArray(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)){(schema.oneOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)){(schema.anyOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)){(schema.allOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.nots)&&schema.not()){traverseSchema(schema.not(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.ifs)&&schema.if()){traverseSchema(schema.if(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.thenes)&&schema.then()){traverseSchema(schema.then(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.elses)&&schema.else()){traverseSchema(schema.else(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)){Object.entries(schema.dependencies()||{}).forEach(([depName,dep])=>{if(dep&&!Array.isArray(dep)){traverseSchema(dep,depName,options)}})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)){Object.entries(schema.definitions()||{}).forEach(([defName,def])=>{traverseSchema(def,defName,options)})}callback(schema,propOrIndex,SchemaIteratorCallbackType.END_SCHEMA);seenSchemas.delete(jsonSchema)}function recursiveSchemaObject(schema,options){Object.entries(schema.properties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)});const additionalProperties=schema.additionalProperties();if(typeof additionalProperties==="object"){traverseSchema(additionalProperties,null,options)}const schemaTypesToIterate=options.schemaTypesToIterate;if(schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames)&&schema.propertyNames()){traverseSchema(schema.propertyNames(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)){Object.entries(schema.patternProperties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)})}}function recursiveSchemaArray(schema,options){const items=schema.items();if(items){if(Array.isArray(items)){items.forEach((item,idx)=>{traverseSchema(item,idx,options)})}else{traverseSchema(items,null,options)}}const additionalItems=schema.additionalItems();if(typeof additionalItems==="object"){traverseSchema(additionalItems,null,options)}if(options.schemaTypesToIterate.includes(SchemaTypesToIterate.contains)&&schema.contains()){traverseSchema(schema.contains(),null,options)}}function traverseAsyncApiDocument(doc,callback,schemaTypesToIterate){if(!schemaTypesToIterate){schemaTypesToIterate=Object.values(SchemaTypesToIterate)}const options={callback:callback,schemaTypesToIterate:schemaTypesToIterate,seenSchemas:new Set};if(doc.hasChannels()){Object.values(doc.channels()).forEach(channel=>{traverseChannel(channel,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.components)&&doc.hasComponents()){const components=doc.components();Object.values(components.messages()||{}).forEach(message=>{traverseMessage(message,options)});Object.values(components.schemas()||{}).forEach(schema=>{traverseSchema(schema,null,options)});if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(components.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}Object.values(components.messageTraits()||{}).forEach(messageTrait=>{traverseMessageTrait(messageTrait,options)})}}function traverseChannel(channel,options){if(!channel)return;const{schemaTypesToIterate:schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(channel.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}if(channel.hasPublish()){channel.publish().messages().forEach(message=>{traverseMessage(message,options)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(message=>{traverseMessage(message,options)})}}function traverseMessage(message,options){if(!message)return;const{schemaTypesToIterate:schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(message.headers(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)){traverseSchema(message.payload(),null,options)}}function traverseMessageTrait(messageTrait,options){if(!messageTrait)return;const{schemaTypesToIterate:schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(messageTrait.headers(),null,options)}}module.exports={SchemaIteratorCallbackType:SchemaIteratorCallbackType,SchemaTypesToIterate:SchemaTypesToIterate,traverseAsyncApiDocument:traverseAsyncApiDocument}},{}],9:[function(require,module,exports){module.exports=((txt,reviver,context=20)=>{try{return JSON.parse(txt,reviver)}catch(e){handleJsonNotString(txt);const syntaxErr=e.message.match(/^Unexpected token.*position\s+(\d+)/i);const errIdxBrokenJson=e.message.match(/^Unexpected end of JSON.*/i)?txt.length-1:null;const errIdx=syntaxErr?+syntaxErr[1]:errIdxBrokenJson;handleErrIdxNotNull(e,txt,errIdx,context);e.offset=errIdx;const lines=txt.substr(0,errIdx).split("\n");e.startLine=lines.length;e.startColumn=lines[lines.length-1].length;throw e}});function handleJsonNotString(txt){if(typeof txt!=="string"){const isEmptyArray=Array.isArray(txt)&&txt.length===0;const errorMessage=`Cannot parse ${isEmptyArray?"an empty array":String(txt)}`;throw new TypeError(errorMessage)}}function handleErrIdxNotNull(e,txt,errIdx,context){if(errIdx!==null){const start=errIdx<=context?0:errIdx-context;const end=errIdx+context>=txt.length?txt.length:errIdx+context;e.message+=` while parsing near '${start===0?"":"..."}${txt.slice(start,end)}${end===txt.length?"":"..."}'`}else{e.message+=` while parsing '${txt.slice(0,context*2)}'`}}},{}],10:[function(require,module,exports){const{getMapValueByKey:getMapValueByKey}=require("../models/utils");const MixinBindings={hasBindings(){return!!(this._json.bindings&&Object.keys(this._json.bindings).length)},bindings(){return this.hasBindings()?this._json.bindings:{}},bindingProtocols(){return Object.keys(this.bindings())},hasBinding(name){return this.hasBindings()&&!!this._json.bindings[String(name)]},binding(name){return getMapValueByKey(this._json.bindings,name)}};module.exports=MixinBindings},{"../models/utils":40}],11:[function(require,module,exports){const{getMapValueByKey:getMapValueByKey}=require("../models/utils");const MixinDescription={hasDescription(){return!!this._json.description},description(){return getMapValueByKey(this._json,"description")}};module.exports=MixinDescription},{"../models/utils":40}],12:[function(require,module,exports){const{getMapValueOfType:getMapValueOfType}=require("../models/utils");const ExternalDocs=require("../models/external-docs");const MixinExternalDocs={hasExternalDocs(){return!!(this._json.externalDocs&&Object.keys(this._json.externalDocs).length)},externalDocs(){return getMapValueOfType(this._json,"externalDocs",ExternalDocs)}};module.exports=MixinExternalDocs},{"../models/external-docs":22,"../models/utils":40}],13:[function(require,module,exports){const MixinSpecificationExtensions={hasExtensions(){return!!this.extensionKeys().length},extensions(){const result={};Object.entries(this._json).forEach(([key,value])=>{if(/^x-[\w\d\.\-\_]+$/.test(key)){result[String(key)]=value}});return result},extensionKeys(){return Object.keys(this.extensions())},extKeys(){return this.extensionKeys()},hasExtension(key){if(!key.startsWith("x-")){return false}return!!this._json[String(key)]},extension(key){if(!key.startsWith("x-")){return null}return this._json[String(key)]},hasExt(key){return this.hasExtension(key)},ext(key){return this.extension(key)}};module.exports=MixinSpecificationExtensions},{}],14:[function(require,module,exports){const Tag=require("../models/tag");const MixinTags={hasTags(){return!!(Array.isArray(this._json.tags)&&this._json.tags.length)},tags(){return this.hasTags()?this._json.tags.map(t=>new Tag(t)):[]},tagNames(){return this.hasTags()?this._json.tags.map(t=>t.name):[]},hasTag(name){return this.hasTags()&&this._json.tags.some(t=>t.name===name)},tag(name){const tg=this.hasTags()&&this._json.tags.find(t=>t.name===name);return tg?new Tag(tg):null}};module.exports=MixinTags},{"../models/tag":39}],15:[function(require,module,exports){const{createMapOfType:createMapOfType,getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const Info=require("./info");const Server=require("./server");const Channel=require("./channel");const Components=require("./components");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinSpecificationExtensions=require("../mixins/specification-extensions");const{xParserSpecParsed:xParserSpecParsed,xParserSpecStringified:xParserSpecStringified,xParserCircle:xParserCircle}=require("../constants");const{assignNameToAnonymousMessages:assignNameToAnonymousMessages,assignNameToComponentMessages:assignNameToComponentMessages,assignUidToComponentSchemas:assignUidToComponentSchemas,assignUidToParameterSchemas:assignUidToParameterSchemas,assignIdToAnonymousSchemas:assignIdToAnonymousSchemas,assignUidToComponentParameterSchemas:assignUidToComponentParameterSchemas}=require("../anonymousNaming");const{traverseAsyncApiDocument:traverseAsyncApiDocument}=require("../iterators");class AsyncAPIDocument extends Base{constructor(...args){super(...args);if(this.ext(xParserSpecParsed)===true){return}assignNameToComponentMessages(this);assignNameToAnonymousMessages(this);assignUidToComponentSchemas(this);assignUidToComponentParameterSchemas(this);assignUidToParameterSchemas(this);assignIdToAnonymousSchemas(this);this.json()[String(xParserSpecParsed)]=true}version(){return this._json.asyncapi}info(){return new Info(this._json.info)}id(){return this._json.id}hasServers(){return!!this._json.servers}servers(){return createMapOfType(this._json.servers,Server)}serverNames(){if(!this._json.servers)return[];return Object.keys(this._json.servers)}server(name){return getMapValueOfType(this._json.servers,name,Server)}hasDefaultContentType(){return!!this._json.defaultContentType}defaultContentType(){return this._json.defaultContentType||null}hasChannels(){return!!this._json.channels}channels(){return createMapOfType(this._json.channels,Channel,this)}channelNames(){if(!this._json.channels)return[];return Object.keys(this._json.channels)}channel(name){return getMapValueOfType(this._json.channels,name,Channel,this)}hasComponents(){return!!this._json.components}components(){if(!this._json.components)return null;return new Components(this._json.components)}hasMessages(){return!!this.allMessages().size}allMessages(){const messages=new Map;if(this.hasChannels()){this.channelNames().forEach(channelName=>{const channel=this.channel(channelName);if(channel.hasPublish()){channel.publish().messages().forEach(m=>{messages.set(m.uid(),m)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(m=>{messages.set(m.uid(),m)})}})}if(this.hasComponents()){Object.values(this.components().messages()).forEach(m=>{messages.set(m.uid(),m)})}return messages}allSchemas(){const schemas=new Map;const allSchemasCallback=schema=>{if(schema.uid()){schemas.set(schema.uid(),schema)}};traverseAsyncApiDocument(this,allSchemasCallback);return schemas}hasCircular(){return!!this._json[String(xParserCircle)]}traverseSchemas(callback,schemaTypesToIterate){traverseAsyncApiDocument(this,callback,schemaTypesToIterate)}static stringify(doc,space){const rawDoc=doc.json();const copiedDoc={...rawDoc};copiedDoc[String(xParserSpecStringified)]=true;return JSON.stringify(copiedDoc,refReplacer(),space)}static parse(doc){let parsedJSON=doc;if(typeof doc==="string"){parsedJSON=JSON.parse(doc)}else if(typeof doc==="object"){parsedJSON={...parsedJSON}}if(typeof parsedJSON!=="object"||!parsedJSON[String(xParserSpecParsed)]){throw new Error("Cannot parse invalid AsyncAPI document")}if(!parsedJSON[String(xParserSpecStringified)]){return new AsyncAPIDocument(parsedJSON)}delete parsedJSON[String(xParserSpecStringified)];const objToPath=new Map;const pathToObj=new Map;traverseStringifiedDoc(parsedJSON,undefined,parsedJSON,objToPath,pathToObj);return new AsyncAPIDocument(parsedJSON)}}function refReplacer(){const modelPaths=new Map;const paths=new Map;let init=null;return function(field,value){const pathPart=modelPaths.get(this)+(Array.isArray(this)?`[${field}]`:`.${field}`);const isComplex=value===Object(value);if(isComplex){modelPaths.set(value,pathPart)}const savedPath=paths.get(value)||"";if(!savedPath&&isComplex){const valuePath=pathPart.replace(/undefined\.\.?/,"");paths.set(value,valuePath)}const prefixPath=savedPath[0]==="["?"$":"$.";let val=savedPath?`$ref:${prefixPath}${savedPath}`:value;if(init===null){init=value}else if(val===init){val="$ref:$"}return val}}function traverseStringifiedDoc(parent,field,root,objToPath,pathToObj){let objOrPath=parent;let path="$ref:$";if(field!==undefined){objOrPath=parent[String(field)];const concatenatedPath=field?`.${field}`:"";path=objToPath.get(parent)+(Array.isArray(parent)?`[${field}]`:concatenatedPath)}objToPath.set(objOrPath,path);pathToObj.set(path,objOrPath);const ref=pathToObj.get(objOrPath);if(ref){parent[String(field)]=ref}if(objOrPath==="$ref:$"||ref==="$ref:$"){parent[String(field)]=root}if(objOrPath===Object(objOrPath)){for(const f in objOrPath){traverseStringifiedDoc(objOrPath,f,root,objToPath,pathToObj)}}}module.exports=mix(AsyncAPIDocument,MixinTags,MixinExternalDocs,MixinSpecificationExtensions)},{"../anonymousNaming":1,"../constants":4,"../iterators":8,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./channel":18,"./components":19,"./info":23,"./server":37,"./utils":40}],16:[function(require,module,exports){const ParserError=require("../errors/parser-error");class Base{constructor(json){if(json===undefined||json===null)throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`);this._json=json}json(key){if(key===undefined)return this._json;if(!this._json)return;return this._json[String(key)]}}module.exports=Base},{"../errors/parser-error":6}],17:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ChannelParameter extends Base{location(){return this._json.location}schema(){if(!this._json.schema)return null;return new Schema(this._json.schema)}}module.exports=mix(ChannelParameter,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./schema":33,"./utils":40}],18:[function(require,module,exports){const{createMapOfType:createMapOfType,getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const ChannelParameter=require("./channel-parameter");const PublishOperation=require("./publish-operation");const SubscribeOperation=require("./subscribe-operation");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Channel extends Base{parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}hasParameters(){return!!this._json.parameters}hasServers(){return!!this._json.servers}servers(){if(!this._json.servers)return[];return this._json.servers}server(index){if(!this._json.servers)return null;if(typeof index!=="number")return null;if(index>this._json.servers.length-1)return null;return this._json.servers[+index]}publish(){if(!this._json.publish)return null;return new PublishOperation(this._json.publish)}subscribe(){if(!this._json.subscribe)return null;return new SubscribeOperation(this._json.subscribe)}hasPublish(){return!!this._json.publish}hasSubscribe(){return!!this._json.subscribe}}module.exports=mix(Channel,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./channel-parameter":17,"./publish-operation":32,"./subscribe-operation":38,"./utils":40}],19:[function(require,module,exports){const{createMapOfType:createMapOfType,getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const Channel=require("./channel");const Message=require("./message");const Schema=require("./schema");const SecurityScheme=require("./security-scheme");const Server=require("./server");const ChannelParameter=require("./channel-parameter");const CorrelationId=require("./correlation-id");const OperationTrait=require("./operation-trait");const MessageTrait=require("./message-trait");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Components extends Base{channels(){return createMapOfType(this._json.channels,Channel)}hasChannels(){return!!this._json.channels}channel(name){return getMapValueOfType(this._json.channels,name,Channel)}messages(){return createMapOfType(this._json.messages,Message)}hasMessages(){return!!this._json.messages}message(name){return getMapValueOfType(this._json.messages,name,Message)}schemas(){return createMapOfType(this._json.schemas,Schema)}hasSchemas(){return!!this._json.schemas}schema(name){return getMapValueOfType(this._json.schemas,name,Schema)}securitySchemes(){return createMapOfType(this._json.securitySchemes,SecurityScheme)}hasSecuritySchemes(){return!!this._json.securitySchemes}securityScheme(name){return getMapValueOfType(this._json.securitySchemes,name,SecurityScheme)}servers(){return createMapOfType(this._json.servers,Server)}hasServers(){return!!this._json.servers}server(name){return getMapValueOfType(this._json.servers,name,Server)}parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}hasParameters(){return!!this._json.parameters}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}correlationIds(){return createMapOfType(this._json.correlationIds,CorrelationId)}hasCorrelationIds(){return!!this._json.correlationIds}correlationId(name){return getMapValueOfType(this._json.correlationIds,name,CorrelationId)}operationTraits(){return createMapOfType(this._json.operationTraits,OperationTrait)}hasOperationTraits(){return!!this._json.operationTraits}operationTrait(name){return getMapValueOfType(this._json.operationTraits,name,OperationTrait)}messageTraits(){return createMapOfType(this._json.messageTraits,MessageTrait)}hasMessageTraits(){return!!this._json.messageTraits}messageTrait(name){return getMapValueOfType(this._json.messageTraits,name,MessageTrait)}}module.exports=mix(Components,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./channel":18,"./channel-parameter":17,"./correlation-id":21,"./message":27,"./message-trait":25,"./operation-trait":29,"./schema":33,"./security-scheme":34,"./server":37,"./utils":40}],20:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Contact extends Base{name(){return this._json.name}url(){return this._json.url}email(){return this._json.email}}module.exports=mix(Contact,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],21:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class CorrelationId extends Base{location(){return this._json.location}}module.exports=mix(CorrelationId,MixinSpecificationExtensions,MixinDescription)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],22:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ExternalDocs extends Base{url(){return this._json.url}}module.exports=mix(ExternalDocs,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],23:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const License=require("./license");const Contact=require("./contact");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Info extends Base{title(){return this._json.title}version(){return this._json.version}termsOfService(){return this._json.termsOfService}license(){if(!this._json.license)return null;return new License(this._json.license)}contact(){if(!this._json.contact)return null;return new Contact(this._json.contact)}}module.exports=mix(Info,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./contact":20,"./license":24,"./utils":40}],24:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class License extends Base{name(){return this._json.name}url(){return this._json.url}}module.exports=mix(License,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],25:[function(require,module,exports){const MessageTraitable=require("./message-traitable");class MessageTrait extends MessageTraitable{}module.exports=MessageTrait},{"./message-traitable":26}],26:[function(require,module,exports){const{getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const CorrelationId=require("./correlation-id");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class MessageTraitable extends Base{headers(){if(!this._json.headers)return null;return new Schema(this._json.headers)}header(name){if(!this._json.headers)return null;return getMapValueOfType(this._json.headers.properties,name,Schema)}correlationId(){if(!this._json.correlationId)return null;return new CorrelationId(this._json.correlationId)}schemaFormat(){return this._json.schemaFormat}contentType(){return this._json.contentType}name(){return this._json.name}title(){return this._json.title}summary(){return this._json.summary}examples(){return this._json.examples}}module.exports=mix(MessageTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./correlation-id":21,"./schema":33,"./utils":40}],27:[function(require,module,exports){(function(Buffer){const MessageTrait=require("./message-trait");const MessageTraitable=require("./message-traitable");const Schema=require("./schema");class Message extends MessageTraitable{uid(){return this.name()||this.ext("x-parser-message-name")||Buffer.from(JSON.stringify(this._json)).toString("base64")}payload(){if(!this._json.payload)return null;return new Schema(this._json.payload)}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new MessageTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}originalPayload(){return this._json["x-parser-original-payload"]||this.payload()}originalSchemaFormat(){return this._json["x-parser-original-schema-format"]||this.schemaFormat()}}module.exports=Message}).call(this,require("buffer").Buffer)},{"./message-trait":25,"./message-traitable":26,"./schema":33,buffer:128}],28:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OAuthFlow extends Base{authorizationUrl(){return this._json.authorizationUrl}tokenUrl(){return this._json.tokenUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}}module.exports=mix(OAuthFlow,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],29:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");class OperationTrait extends OperationTraitable{}module.exports=OperationTrait},{"./operation-traitable":30}],30:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinTags=require("../mixins/tags");const MixinExternalDocs=require("../mixins/external-docs");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OperationTraitable extends Base{id(){return this._json.operationId}summary(){return this._json.summary}}module.exports=mix(OperationTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./utils":40}],31:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");const Message=require("./message");const OperationTrait=require("./operation-trait");class Operation extends OperationTraitable{hasMultipleMessages(){if(this._json.message&&this._json.message.oneOf&&this._json.message.oneOf.length>1)return true;if(!this._json.message)return false;return false}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new OperationTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}messages(){if(!this._json.message)return[];if(this._json.message.oneOf)return this._json.message.oneOf.map(m=>new Message(m));return[new Message(this._json.message)]}message(index){if(!this._json.message)return null;if(!this._json.message.oneOf)return new Message(this._json.message);if(typeof index!=="number")return null;if(index>this._json.message.oneOf.length-1)return null;return new Message(this._json.message.oneOf[+index])}}module.exports=Operation},{"./message":27,"./operation-trait":29,"./operation-traitable":30}],32:[function(require,module,exports){const Operation=require("./operation");class PublishOperation extends Operation{isPublish(){return true}isSubscribe(){return false}kind(){return"publish"}}module.exports=PublishOperation},{"./operation":31}],33:[function(require,module,exports){const{createMapOfType:createMapOfType,getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const{xParserCircle:xParserCircle,xParserCircleProps:xParserCircleProps}=require("../constants");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Schema extends Base{constructor(json,options){super(json);this.options=options||{}}uid(){return this.$id()||this.ext("x-parser-schema-id")}$id(){return this._json.$id}multipleOf(){return this._json.multipleOf}maximum(){return this._json.maximum}exclusiveMaximum(){return this._json.exclusiveMaximum}minimum(){return this._json.minimum}exclusiveMinimum(){return this._json.exclusiveMinimum}maxLength(){return this._json.maxLength}minLength(){return this._json.minLength}pattern(){return this._json.pattern}maxItems(){return this._json.maxItems}minItems(){return this._json.minItems}uniqueItems(){return!!this._json.uniqueItems}maxProperties(){return this._json.maxProperties}minProperties(){return this._json.minProperties}required(){return this._json.required}enum(){return this._json.enum}type(){return this._json.type}allOf(){if(!this._json.allOf)return null;return this._json.allOf.map(s=>new Schema(s,{parent:this}))}oneOf(){if(!this._json.oneOf)return null;return this._json.oneOf.map(s=>new Schema(s,{parent:this}))}anyOf(){if(!this._json.anyOf)return null;return this._json.anyOf.map(s=>new Schema(s,{parent:this}))}not(){if(!this._json.not)return null;return new Schema(this._json.not,{parent:this})}items(){if(!this._json.items)return null;if(Array.isArray(this._json.items)){return this._json.items.map(s=>new Schema(s,{parent:this}))}return new Schema(this._json.items,{parent:this})}properties(){return createMapOfType(this._json.properties,Schema,{parent:this})}property(name){return getMapValueOfType(this._json.properties,name,Schema,{parent:this})}additionalProperties(){const ap=this._json.additionalProperties;if(ap===undefined||ap===null)return;if(typeof ap==="boolean")return ap;return new Schema(ap,{parent:this})}additionalItems(){const ai=this._json.additionalItems;if(ai===undefined||ai===null)return;return new Schema(ai,{parent:this})}patternProperties(){return createMapOfType(this._json.patternProperties,Schema,{parent:this})}const(){return this._json.const}contains(){if(!this._json.contains)return null;return new Schema(this._json.contains,{parent:this})}dependencies(){if(!this._json.dependencies)return null;const result={};Object.entries(this._json.dependencies).forEach(([key,value])=>{result[String(key)]=!Array.isArray(value)?new Schema(value,{parent:this}):value});return result}propertyNames(){if(!this._json.propertyNames)return null;return new Schema(this._json.propertyNames,{parent:this})}if(){if(!this._json.if)return null;return new Schema(this._json.if,{parent:this})}then(){if(!this._json.then)return null;return new Schema(this._json.then,{parent:this})}else(){if(!this._json.else)return null;return new Schema(this._json.else,{parent:this})}format(){return this._json.format}contentEncoding(){return this._json.contentEncoding}contentMediaType(){return this._json.contentMediaType}definitions(){return createMapOfType(this._json.definitions,Schema,{parent:this})}title(){return this._json.title}default(){return this._json.default}deprecated(){return this._json.deprecated}discriminator(){return this._json.discriminator}readOnly(){return!!this._json.readOnly}writeOnly(){return!!this._json.writeOnly}examples(){return this._json.examples}isBooleanSchema(){return typeof this._json==="boolean"}isCircular(){if(!!this.ext(xParserCircle)){return true}let parent=this.options.parent;while(parent){if(parent._json===this._json)return true;parent=parent.options&&parent.options.parent}return false}circularSchema(){let parent=this.options.parent;while(parent){if(parent._json===this._json)return parent;parent=parent.options&&parent.options.parent}}hasCircularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps).length>0}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean).length>0}circularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps)}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean)}}module.exports=mix(Schema,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../constants":4,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],34:[function(require,module,exports){const{createMapOfType:createMapOfType,mix:mix}=require("./utils");const Base=require("./base");const OAuthFlow=require("./oauth-flow");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class SecurityScheme extends Base{type(){return this._json.type}name(){return this._json.name}in(){return this._json.in}scheme(){return this._json.scheme}bearerFormat(){return this._json.bearerFormat}openIdConnectUrl(){return this._json.openIdConnectUrl}flows(){return createMapOfType(this._json.flows,OAuthFlow)}}module.exports=mix(SecurityScheme,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./oauth-flow":28,"./utils":40}],35:[function(require,module,exports){const Base=require("./base");class ServerSecurityRequirement extends Base{}module.exports=ServerSecurityRequirement},{"./base":16}],36:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ServerVariable extends Base{allowedValues(){return this._json.enum}allows(name){if(this._json.enum===undefined)return true;return this._json.enum.includes(name)}hasAllowedValues(){return this._json.enum!==undefined}defaultValue(){return this._json.default}hasDefaultValue(){return this._json.default!==undefined}examples(){return this._json.examples}}module.exports=mix(ServerVariable,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],37:[function(require,module,exports){const{createMapOfType:createMapOfType,getMapValueOfType:getMapValueOfType,mix:mix}=require("./utils");const Base=require("./base");const ServerVariable=require("./server-variable");const ServerSecurityRequirement=require("./server-security-requirement");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Server extends Base{url(){return this._json.url}protocol(){return this._json.protocol}protocolVersion(){return this._json.protocolVersion}variables(){return createMapOfType(this._json.variables,ServerVariable)}variable(name){return getMapValueOfType(this._json.variables,name,ServerVariable)}hasVariables(){return!!this._json.variables}security(){if(!this._json.security)return null;return this._json.security.map(sec=>new ServerSecurityRequirement(sec))}}module.exports=mix(Server,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./server-security-requirement":35,"./server-variable":36,"./utils":40}],38:[function(require,module,exports){const Operation=require("./operation");class SubscribeOperation extends Operation{isPublish(){return false}isSubscribe(){return true}kind(){return"subscribe"}}module.exports=SubscribeOperation},{"./operation":31}],39:[function(require,module,exports){const{mix:mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Tag extends Base{name(){return this._json.name}}module.exports=mix(Tag,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],40:[function(require,module,exports){const utils=module.exports;const getMapValue=(obj,key,Type,options)=>{if(typeof key!=="string"||!obj)return null;const v=obj[String(key)];if(v===undefined)return null;return Type?new Type(v,options):v};utils.createMapOfType=((obj,Type,options)=>{const result={};if(!obj)return result;Object.entries(obj).forEach(([key,value])=>{result[String(key)]=new Type(value,options)});return result});utils.getMapValueOfType=((obj,key,Type,options)=>{return getMapValue(obj,key,Type,options)});utils.getMapValueByKey=((obj,key)=>{return getMapValue(obj,key)});utils.mix=((model,...mixins)=>{let duplicatedMethods=false;function checkDuplication(mixin){if(model===mixin)return true;duplicatedMethods=Object.keys(mixin).some(mixinMethod=>model.prototype.hasOwnProperty(mixinMethod));return duplicatedMethods}if(mixins.some(checkDuplication)){if(duplicatedMethods){throw new Error(`invalid mix function: model ${model.name} has at least one method that it is trying to replace by mixin`)}else{throw new Error(`invalid mix function: cannot use the model ${model.name} as a mixin`)}}mixins.forEach(mixin=>Object.assign(model.prototype,mixin));return model})},{}],41:[function(require,module,exports){(function(process,global){const path=require("path");const fetch=typeof window!=="undefined"?window["fetch"]:typeof global!=="undefined"?global["fetch"]:null;const Ajv=require("ajv");const asyncapi=require("@asyncapi/specs");const $RefParser=require("@apidevtools/json-schema-ref-parser");const mergePatch=require("tiny-merge-patch").apply;const ParserError=require("./errors/parser-error");const{validateChannels:validateChannels,validateTags:validateTags,validateServerVariables:validateServerVariables,validateOperationId:validateOperationId,validateServerSecurity:validateServerSecurity}=require("./customValidators.js");const{toJS:toJS,findRefs:findRefs,getLocationOf:getLocationOf,improveAjvErrors:improveAjvErrors,getDefaultSchemaFormat:getDefaultSchemaFormat}=require("./utils");const AsyncAPIDocument=require("./models/asyncapi");const OPERATIONS=["publish","subscribe"];const SPECIAL_SECURITY_TYPES=["oauth2","openIdConnect"];const PARSERS={};const xParserCircle="x-parser-circular";const xParserMessageParsed="x-parser-message-parsed";const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,parseFromUrl:parseFromUrl,registerSchemaParser:registerSchemaParser,ParserError:ParserError,AsyncAPIDocument:AsyncAPIDocument};async function parse(asyncapiYAMLorJSON,options={}){let parsedJSON;let initialFormat;options.path=options.path||`${process.cwd()}${path.sep}`;try{({initialFormat:initialFormat,parsedJSON:parsedJSON}=toJS(asyncapiYAMLorJSON));if(typeof parsedJSON!=="object"){throw new ParserError({type:"impossible-to-convert-to-json",title:"Could not convert AsyncAPI to JSON.",detail:"Most probably the AsyncAPI document contains invalid YAML or YAML features not supported in JSON."})}if(!parsedJSON.asyncapi){throw new ParserError({type:"missing-asyncapi-field",title:"The `asyncapi` field is missing.",parsedJSON:parsedJSON})}if(parsedJSON.asyncapi.startsWith("1.")||!asyncapi[parsedJSON.asyncapi]){throw new ParserError({type:"unsupported-version",title:`Version ${parsedJSON.asyncapi} is not supported.`,detail:"Please use latest version of the specification.",parsedJSON:parsedJSON,validationErrors:[getLocationOf("/asyncapi",asyncapiYAMLorJSON,initialFormat)]})}if(options.applyTraits===undefined)options.applyTraits=true;const refParser=new $RefParser;await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:"ignore"}});const validate=getValidator(parsedJSON.asyncapi);const valid=validate(parsedJSON);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"validation-errors",title:"There were errors validating the AsyncAPI document.",parsedJSON:parsedJSON,validationErrors:improveAjvErrors(errors,asyncapiYAMLorJSON,initialFormat)});await customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);if(refParser.$refs.circular)await handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options)}catch(e){if(e instanceof ParserError)throw e;throw new ParserError({type:"unexpected-error",title:e.message,parsedJSON:parsedJSON})}return new AsyncAPIDocument(parsedJSON)}function parseFromUrl(url,fetchOptions,options){if(!fetchOptions)fetchOptions={};return new Promise((resolve,reject)=>{fetch(url,fetchOptions).then(res=>res.text()).then(doc=>parse(doc,options)).then(result=>resolve(result)).catch(e=>{if(e instanceof ParserError)return reject(e);return reject(new ParserError({type:"fetch-url-error",title:e.message}))})})}async function dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){try{return await refParser.dereference(options.path,parsedJSON,{continueOnError:true,parse:options.parse,resolve:options.resolve,dereference:options.dereference})}catch(err){throw new ParserError({type:"dereference-error",title:err.errors[0].message,parsedJSON:parsedJSON,refs:findRefs(err.errors,initialFormat,asyncapiYAMLorJSON)})}}async function handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:true}});parsedJSON[String(xParserCircle)]=true}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(asyncapi[String(version)],version);validate=ajv.getSchema(version)}return validate}async function customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,SPECIAL_SECURITY_TYPES);if(!parsedJSON.channels)return;validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,OPERATIONS);await customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);await customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options)}async function validateAndConvertMessage(msg,originalAsyncAPIDocument,fileFormat,parsedAsyncAPIDocument,pathToPayload){if(xParserMessageParsed in msg&&msg[String(xParserMessageParsed)]===true)return;const defaultSchemaFormat=getDefaultSchemaFormat(parsedAsyncAPIDocument.asyncapi);const schemaFormat=msg.schemaFormat||defaultSchemaFormat;await PARSERS[String(schemaFormat)]({schemaFormat:schemaFormat,message:msg,defaultSchemaFormat:defaultSchemaFormat,originalAsyncAPIDocument:originalAsyncAPIDocument,parsedAsyncAPIDocument:parsedAsyncAPIDocument,fileFormat:fileFormat,pathToPayload:pathToPayload});msg.schemaFormat=defaultSchemaFormat;msg[String(xParserMessageParsed)]=true}function registerSchemaParser(parserModule){if(typeof parserModule!=="object"||typeof parserModule.parse!=="function"||typeof parserModule.getMimeTypes!=="function")throw new ParserError({type:"impossible-to-register-parser",title:"parserModule must have parse() and getMimeTypes() functions."});parserModule.getMimeTypes().forEach(schemaFormat=>{PARSERS[String(schemaFormat)]=parserModule.parse})}function applyTraits(js){if(Array.isArray(js.traits)){for(const trait of js.traits){for(const key in trait){js[String(key)]=mergePatch(js[String(key)],trait[String(key)])}}js["x-parser-original-traits"]=js.traits;delete js.traits}}async function customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){const promisesArray=[];Object.entries(parsedJSON.channels).forEach(([channelName,channel])=>{promisesArray.push(...OPERATIONS.map(async opName=>{const op=channel[String(opName)];if(!op)return;const messages=op.message?op.message.oneOf||[op.message]:[];if(options.applyTraits){applyTraits(op);messages.forEach(m=>applyTraits(m))}const pathToPayload=`/channels/${channelName}/${opName}/message/payload`;for(const m of messages){await validateAndConvertMessage(m,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload)}}))});await Promise.all(promisesArray)}async function customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){if(!parsedJSON.components||!parsedJSON.components.messages)return;const promisesArray=[];Object.entries(parsedJSON.components.messages).forEach(([messageName,message])=>{if(options.applyTraits){applyTraits(message)}const pathToPayload=`/components/messages/${messageName}/payload`;promisesArray.push(validateAndConvertMessage(message,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload))});await Promise.all(promisesArray)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./customValidators.js":5,"./errors/parser-error":6,"./models/asyncapi":15,"./utils":42,"@apidevtools/json-schema-ref-parser":45,"@asyncapi/specs":62,_process:172,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,path:171,"tiny-merge-patch":197}],42:[function(require,module,exports){const YAML=require("js-yaml");const{yamlAST:yamlAST,loc:loc}=require("@fmvilas/pseudo-yaml-ast");const jsonAST=require("json-to-ast");const jsonParseBetterErrors=require("../lib/json-parse");const ParserError=require("./errors/parser-error");const jsonPointerToArray=jsonPointer=>(jsonPointer||"/").split("/").splice(1);const utils=module.exports;const getAST=(asyncapiYAMLorJSON,initialFormat)=>{if(initialFormat==="yaml"){return yamlAST(asyncapiYAMLorJSON)}else if(initialFormat==="json"){return jsonAST(asyncapiYAMLorJSON)}};const findNode=(obj,location)=>{for(const key of location){obj=obj?obj[utils.untilde(key)]:null}return obj};const findNodeInAST=(ast,location)=>{let obj=ast;for(const key of location){if(!Array.isArray(obj.children))return;let childArray;const child=obj.children.find(c=>{if(!c)return;if(c.type==="Object")return childArray=c.children.find(a=>a.key.value===utils.untilde(key));return c.type==="Property"&&c.key&&c.key.value===utils.untilde(key)});if(!child)return;obj=childArray?childArray.value:child.value}return obj};const findLocationOf=(keys,ast,initialFormat)=>{if(initialFormat==="js")return{jsonPointer:`/${keys.join("/")}`};let node;if(initialFormat==="yaml"){node=findNode(ast,keys)}else if(initialFormat==="json"){node=findNodeInAST(ast,keys)}if(!node)return{jsonPointer:`/${keys.join("/")}`};let info;if(initialFormat==="yaml"){info=node[loc]}else if(initialFormat==="json"){info=node.loc}if(!info)return{jsonPointer:`/${keys.join("/")}`};return{jsonPointer:`/${keys.join("/")}`,startLine:info.start.line,startColumn:info.start.column+1,startOffset:info.start.offset,endLine:info.end?info.end.line:undefined,endColumn:info.end?info.end.column+1:undefined,endOffset:info.end?info.end.offset:undefined}};utils.tilde=(str=>{return str.replace(/[~\/]{1}/g,m=>{switch(m){case"/":return"~1";case"~":return"~0"}return m})});utils.untilde=(str=>{if(!str.includes("~"))return str;return str.replace(/~[01]/g,m=>{switch(m){case"~1":return"/";case"~0":return"~"}return m})});utils.toJS=(asyncapiYAMLorJSON=>{if(!asyncapiYAMLorJSON){throw new ParserError({type:"null-or-falsey-document",title:"Document can't be null or falsey."})}if(asyncapiYAMLorJSON.constructor&&asyncapiYAMLorJSON.constructor.name==="Object"){return{initialFormat:"js",parsedJSON:asyncapiYAMLorJSON}}if(typeof asyncapiYAMLorJSON!=="string"){throw new ParserError({type:"invalid-document-type",title:"The AsyncAPI document has to be either a string or a JS object."})}if(asyncapiYAMLorJSON.trimLeft().startsWith("{")){try{return{initialFormat:"json",parsedJSON:jsonParseBetterErrors(asyncapiYAMLorJSON)}}catch(e){throw new ParserError({type:"invalid-json",title:"The provided JSON is not valid.",detail:e.message,location:{startOffset:e.offset,startLine:e.startLine,startColumn:e.startColumn}})}}else{try{return{initialFormat:"yaml",parsedJSON:YAML.safeLoad(asyncapiYAMLorJSON)}}catch(err){throw new ParserError({type:"invalid-yaml",title:"The provided YAML is not valid.",detail:err.message,location:{startOffset:err.mark.position,startLine:err.mark.line+1,startColumn:err.mark.column+1}})}}});utils.findRefs=((errors,initialFormat,asyncapiYAMLorJSON)=>{let refs=[];errors.map(({path:path})=>refs.push({location:[...path.map(utils.tilde),"$ref"]}));if(initialFormat==="js"){return refs.map(ref=>({jsonPointer:`/${ref.location.join("/")}`}))}if(initialFormat==="yaml"){const pseudoAST=yamlAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,pseudoAST,initialFormat))}else if(initialFormat==="json"){const ast=jsonAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,ast,initialFormat))}return refs});utils.getLocationOf=((jsonPointer,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);if(!ast)return{jsonPointer:jsonPointer};return findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat)});utils.improveAjvErrors=((errors,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);return errors.map(error=>{const defaultLocation={jsonPointer:error.dataPath||"/"};const additionalProperty=error.params.additionalProperty;const jsonPointer=additionalProperty?`${error.dataPath}/${additionalProperty}`:error.dataPath;return{title:`${error.dataPath||"/"} ${error.message}`,location:ast?findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat):defaultLocation}})});utils.parseUrlVariables=(str=>{if(typeof str!=="string")return;return str.match(/{(.+?)}/g)});utils.parseUrlQueryParameters=(str=>{if(typeof str!=="string")return;return str.match(/\?((.*=.*)(&?))/g)});utils.getMissingProps=((arr,obj)=>{arr=arr.map(val=>val.replace(/[{}]/g,""));if(!obj)return arr;return arr.filter(val=>{return!obj.hasOwnProperty(val)})});utils.groupValidationErrors=((root,errorMessage,errorElements,asyncapiYAMLorJSON,initialFormat)=>{const errors=[];errorElements.forEach((val,key)=>{if(typeof val==="string")val=utils.untilde(val);const jsonPointer=root?`/${root}/${key}`:`/${key}`;errors.push({title:val?`${utils.untilde(key)} ${errorMessage}: ${val}`:`${utils.untilde(key)} ${errorMessage}`,location:utils.getLocationOf(jsonPointer,asyncapiYAMLorJSON,initialFormat)})});return errors});utils.setNotProvidedParams=((variables,val,key,notProvidedChannelParams,notProvidedParams)=>{const missingChannelParams=utils.getMissingProps(variables,val.parameters);if(missingChannelParams.length){notProvidedParams.set(utils.tilde(key),notProvidedChannelParams?notProvidedChannelParams.concat(missingChannelParams):missingChannelParams)}});utils.getUnknownServers=((parsedJSON,channel)=>{if(!channel)return[];const channelServers=channel.servers;if(!channelServers||channelServers.length===0)return[];const servers=parsedJSON.servers;if(!servers)return channelServers;const serversMap=new Map(Object.entries(servers));return channelServers.filter(serverName=>{return!serversMap.has(serverName)})});utils.getDefaultSchemaFormat=(asyncapiVersion=>{return`application/vnd.aai.asyncapi;version=${asyncapiVersion}`})},{"../lib/json-parse":9,"./errors/parser-error":6,"@fmvilas/pseudo-yaml-ast":72,"js-yaml":138,"json-to-ast":169}],43:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const url=require("./util/url");module.exports=bundle;function bundle(parser,options){let inventory=[];crawl(parser,"schema",parser.$refs._root$Ref.path+"#","#",0,inventory,parser.$refs,options);remap(inventory)}function crawl(parent,key,path,pathFromRoot,indirections,inventory,$refs,options){let obj=key===null?parent:parent[key];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isAllowed$Ref(obj)){inventory$Ref(parent,key,path,pathFromRoot,indirections,inventory,$refs,options)}else{let keys=Object.keys(obj).sort((a,b)=>{if(a==="definitions"){return-1}else if(b==="definitions"){return 1}else{return a.length-b.length}});for(let key of keys){let keyPath=Pointer.join(path,key);let keyPathFromRoot=Pointer.join(pathFromRoot,key);let value=obj[key];if($Ref.isAllowed$Ref(value)){inventory$Ref(obj,key,path,keyPathFromRoot,indirections,inventory,$refs,options)}else{crawl(obj,key,keyPath,keyPathFromRoot,indirections,inventory,$refs,options)}}}}}function inventory$Ref($refParent,$refKey,path,pathFromRoot,indirections,inventory,$refs,options){let $ref=$refKey===null?$refParent:$refParent[$refKey];let $refPath=url.resolve(path,$ref.$ref);let pointer=$refs._resolve($refPath,pathFromRoot,options);if(pointer===null){return}let depth=Pointer.parse(pathFromRoot).length;let file=url.stripHash(pointer.path);let hash=url.getHash(pointer.path);let external=file!==$refs._root$Ref.path;let extended=$Ref.isExtended$Ref($ref);indirections+=pointer.indirections;let existingEntry=findInInventory(inventory,$refParent,$refKey);if(existingEntry){if(depth{if(a.file!==b.file){return a.file0){throw new JSONParserErrorGroup(parser)}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./bundle":43,"./dereference":44,"./normalize-args":46,"./parse":48,"./refs":55,"./resolve-external":56,"./util/errors":59,"./util/url":61,"@jsdevtools/ono":75,"call-me-maybe":130}],46:[function(require,module,exports){"use strict";const Options=require("./options");module.exports=normalizeArgs;function normalizeArgs(args){let path,schema,options,callback;args=Array.prototype.slice.call(args);if(typeof args[args.length-1]==="function"){callback=args.pop()}if(typeof args[0]==="string"){path=args[0];if(typeof args[2]==="object"){schema=args[1];options=args[2]}else{schema=undefined;options=args[1]}}else{path="";schema=args[0];options=args[1]}if(!(options instanceof Options)){options=new Options(options)}return{path:path,schema:schema,options:options,callback:callback}}},{"./options":47}],47:[function(require,module,exports){"use strict";const jsonParser=require("./parsers/json");const yamlParser=require("./parsers/yaml");const textParser=require("./parsers/text");const binaryParser=require("./parsers/binary");const fileResolver=require("./resolvers/file");const httpResolver=require("./resolvers/http");module.exports=$RefParserOptions;function $RefParserOptions(options){merge(this,$RefParserOptions.defaults);merge(this,options)}$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:true},continueOnError:false,dereference:{circular:true}};function merge(target,source){if(isMergeable(source)){let keys=Object.keys(source);for(let i=0;i{let resolvers=plugins.all(options.resolve);resolvers=plugins.filter(resolvers,"canRead",file);plugins.sort(resolvers);plugins.run(resolvers,"read",file,$refs).then(resolve,onError);function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedResolverError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to resolve $ref pointer "${file.url}"`))}else if(err.error instanceof ResolverError){reject(err.error)}else{reject(new ResolverError(err,file.url))}}})}function parseFile(file,options,$refs){return new Promise((resolve,reject)=>{let allParsers=plugins.all(options.parse);let filteredParsers=plugins.filter(allParsers,"canParse",file);let parsers=filteredParsers.length>0?filteredParsers:allParsers;plugins.sort(parsers);plugins.run(parsers,"parse",file,$refs).then(onParsed,onError);function onParsed(parser){if(!parser.plugin.allowEmpty&&isEmpty(parser.result)){reject(ono.syntax(`Error parsing "${file.url}" as ${parser.plugin.name}. \nParsed value is empty`))}else{resolve(parser)}}function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedParserError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to parse ${file.url}`))}else if(err.error instanceof ParserError){reject(err.error)}else{reject(new ParserError(err.error.message,file.url))}}})}function isEmpty(value){return value===undefined||typeof value==="object"&&Object.keys(value).length===0||typeof value==="string"&&value.trim().length===0||Buffer.isBuffer(value)&&value.length===0}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./util/errors":59,"./util/plugins":60,"./util/url":61,"@jsdevtools/ono":75}],49:[function(require,module,exports){(function(Buffer){"use strict";let BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:true,canParse(file){return Buffer.isBuffer(file.data)&&BINARY_REGEXP.test(file.url)},parse(file){if(Buffer.isBuffer(file.data)){return file.data}else{return Buffer.from(file.data)}}}}).call(this,require("buffer").Buffer)},{buffer:128}],50:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError:ParserError}=require("../util/errors");module.exports={order:100,allowEmpty:true,canParse:".json",async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){if(data.trim().length===0){return}else{try{return JSON.parse(data)}catch(e){throw new ParserError(e.message,file.url)}}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],51:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError:ParserError}=require("../util/errors");let TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:true,encoding:"utf8",canParse(file){return(typeof file.data==="string"||Buffer.isBuffer(file.data))&&TEXT_REGEXP.test(file.url)},parse(file){if(typeof file.data==="string"){return file.data}else if(Buffer.isBuffer(file.data)){return file.data.toString(this.encoding)}else{throw new ParserError("data is not text",file.url)}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],52:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError:ParserError}=require("../util/errors");const yaml=require("js-yaml");module.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){try{return yaml.safeLoad(data)}catch(e){throw new ParserError(e.message,file.url)}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59,"js-yaml":138}],53:[function(require,module,exports){"use strict";module.exports=Pointer;const $Ref=require("./ref");const url=require("./util/url");const{JSONParserError:JSONParserError,InvalidPointerError:InvalidPointerError,MissingPointerError:MissingPointerError,isHandledError:isHandledError}=require("./util/errors");const slashes=/\//g;const tildes=/~/g;const escapedSlash=/~1/g;const escapedTilde=/~0/g;function Pointer($ref,path,friendlyPath){this.$ref=$ref;this.path=path;this.originalPath=friendlyPath||path;this.value=undefined;this.circular=false;this.indirections=0}Pointer.prototype.resolve=function(obj,options,pathFromRoot){let tokens=Pointer.parse(this.path,this.originalPath);this.value=unwrapOrThrow(obj);for(let i=0;i0};$Ref.isExternal$Ref=function(value){return $Ref.is$Ref(value)&&value.$ref[0]!=="#"};$Ref.isAllowed$Ref=function(value,options){if($Ref.is$Ref(value)){if(value.$ref.substr(0,2)==="#/"||value.$ref==="#"){return true}else if(value.$ref[0]!=="#"&&(!options||options.resolve.external)){return true}}};$Ref.isExtended$Ref=function(value){return $Ref.is$Ref(value)&&Object.keys(value).length>1};$Ref.dereference=function($ref,resolvedValue){if(resolvedValue&&typeof resolvedValue==="object"&&$Ref.isExtended$Ref($ref)){let merged={};for(let key of Object.keys($ref)){if(key!=="$ref"){merged[key]=$ref[key]}}for(let key of Object.keys(resolvedValue)){if(!(key in merged)){merged[key]=resolvedValue[key]}}return merged}else{return resolvedValue}}},{"./pointer":53,"./util/errors":59,"./util/url":61}],55:[function(require,module,exports){"use strict";const{ono:ono}=require("@jsdevtools/ono");const $Ref=require("./ref");const url=require("./util/url");module.exports=$Refs;function $Refs(){this.circular=false;this._$refs={};this._root$Ref=null}$Refs.prototype.paths=function(types){let paths=getPaths(this._$refs,arguments);return paths.map(path=>{return path.decoded})};$Refs.prototype.values=function(types){let $refs=this._$refs;let paths=getPaths($refs,arguments);return paths.reduce((obj,path)=>{obj[path.decoded]=$refs[path.encoded].value;return obj},{})};$Refs.prototype.toJSON=$Refs.prototype.values;$Refs.prototype.exists=function(path,options){try{this._resolve(path,"",options);return true}catch(e){return false}};$Refs.prototype.get=function(path,options){return this._resolve(path,"",options).value};$Refs.prototype.set=function(path,value){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}$ref.set(absPath,value)};$Refs.prototype._add=function(path){let withoutHash=url.stripHash(path);let $ref=new $Ref;$ref.path=withoutHash;$ref.$refs=this;this._$refs[withoutHash]=$ref;this._root$Ref=this._root$Ref||$ref;return $ref};$Refs.prototype._resolve=function(path,pathFromRoot,options){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}return $ref.resolve(absPath,options,path,pathFromRoot)};$Refs.prototype._get$Ref=function(path){path=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(path);return this._$refs[withoutHash]};function getPaths($refs,types){let paths=Object.keys($refs);types=Array.isArray(types[0])?types[0]:Array.prototype.slice.call(types);if(types.length>0&&types[0]){paths=paths.filter(key=>{return types.indexOf($refs[key].pathType)!==-1})}return paths.map(path=>{return{encoded:path,decoded:$refs[path].pathType==="file"?url.toFileSystemPath(path,true):path}})}},{"./ref":54,"./util/url":61,"@jsdevtools/ono":75}],56:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const parse=require("./parse");const url=require("./util/url");const{isHandledError:isHandledError}=require("./util/errors");module.exports=resolveExternal;function resolveExternal(parser,options){if(!options.resolve.external){return Promise.resolve()}try{let promises=crawl(parser.schema,parser.$refs._root$Ref.path+"#",parser.$refs,options);return Promise.all(promises)}catch(e){return Promise.reject(e)}}function crawl(obj,path,$refs,options){let promises=[];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isExternal$Ref(obj)){promises.push(resolve$Ref(obj,path,$refs,options))}else{for(let key of Object.keys(obj)){let keyPath=Pointer.join(path,key);let value=obj[key];if($Ref.isExternal$Ref(value)){promises.push(resolve$Ref(value,keyPath,$refs,options))}else{promises=promises.concat(crawl(value,keyPath,$refs,options))}}}}return promises}async function resolve$Ref($ref,path,$refs,options){let resolvedPath=url.resolve(path,$ref.$ref);let withoutHash=url.stripHash(resolvedPath);$ref=$refs._$refs[withoutHash];if($ref){return Promise.resolve($ref.value)}try{const result=await parse(resolvedPath,$refs,options);let promises=crawl(result,withoutHash+"#",$refs,options);return Promise.all(promises)}catch(err){if(!options.continueOnError||!isHandledError(err)){throw err}if($refs._$refs[withoutHash]){err.source=url.stripHash(path);err.path=url.safePointerToPath(url.getHash(path))}return[]}}},{"./parse":48,"./pointer":53,"./ref":54,"./util/errors":59,"./util/url":61}],57:[function(require,module,exports){"use strict";const fs=require("fs");const{ono:ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError:ResolverError}=require("../util/errors");module.exports={order:100,canRead(file){return url.isFileSystemPath(file.url)},read(file){return new Promise((resolve,reject)=>{let path;try{path=url.toFileSystemPath(file.url)}catch(err){reject(new ResolverError(ono.uri(err,`Malformed URI: ${file.url}`),file.url))}try{fs.readFile(path,(err,data)=>{if(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}else{resolve(data)}})}catch(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}})}}},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,fs:126}],58:[function(require,module,exports){(function(process,Buffer){"use strict";const http=require("http");const https=require("https");const{ono:ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError:ResolverError}=require("../util/errors");module.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:false,canRead(file){return url.isHttp(file.url)},read(file){let u=url.parse(file.url);if(process.browser&&!u.protocol){u.protocol=url.parse(location.href).protocol}return download(u,this)}};function download(u,httpOptions,redirects){return new Promise((resolve,reject)=>{u=url.parse(u);redirects=redirects||[];redirects.push(u.href);get(u,httpOptions).then(res=>{if(res.statusCode>=400){throw ono({status:res.statusCode},`HTTP ERROR ${res.statusCode}`)}else if(res.statusCode>=300){if(redirects.length>httpOptions.redirects){reject(new ResolverError(ono({status:res.statusCode},`Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`)))}else if(!res.headers.location){throw ono({status:res.statusCode},`HTTP ${res.statusCode} redirect with no location header`)}else{let redirectTo=url.resolve(u,res.headers.location);download(redirectTo,httpOptions,redirects).then(resolve,reject)}}else{resolve(res.body||Buffer.alloc(0))}}).catch(err=>{reject(new ResolverError(ono(err,`Error downloading ${u.href}`),u.href))})})}function get(u,httpOptions){return new Promise((resolve,reject)=>{let protocol=u.protocol==="https:"?https:http;let req=protocol.get({hostname:u.hostname,port:u.port,path:u.path,auth:u.auth,protocol:u.protocol,headers:httpOptions.headers||{},withCredentials:httpOptions.withCredentials});if(typeof req.setTimeout==="function"){req.setTimeout(httpOptions.timeout)}req.on("timeout",()=>{req.abort()});req.on("error",reject);req.once("response",res=>{res.body=Buffer.alloc(0);res.on("data",data=>{res.body=Buffer.concat([res.body,Buffer.from(data)])});res.on("error",reject);res.on("end",()=>{resolve(res)})})})}}).call(this,require("_process"),require("buffer").Buffer)},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,_process:172,buffer:128,http:177,https:134}],59:[function(require,module,exports){"use strict";const{Ono:Ono}=require("@jsdevtools/ono");const{stripHash:stripHash,toFileSystemPath:toFileSystemPath}=require("./url");const JSONParserError=exports.JSONParserError=class JSONParserError extends Error{constructor(message,source){super();this.code="EUNKNOWN";this.message=message;this.source=source;this.path=null;Ono.extend(this)}};setErrorName(JSONParserError);const JSONParserErrorGroup=exports.JSONParserErrorGroup=class JSONParserErrorGroup extends Error{constructor(parser){super();this.files=parser;this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${toFileSystemPath(parser.$refs._root$Ref.path)}'`;Ono.extend(this)}static getParserErrors(parser){const errors=[];for(const $ref of Object.values(parser.$refs._$refs)){if($ref.errors){errors.push(...$ref.errors)}}return errors}get errors(){return JSONParserErrorGroup.getParserErrors(this.files)}};setErrorName(JSONParserErrorGroup);const ParserError=exports.ParserError=class ParserError extends JSONParserError{constructor(message,source){super(`Error parsing ${source}: ${message}`,source);this.code="EPARSER"}};setErrorName(ParserError);const UnmatchedParserError=exports.UnmatchedParserError=class UnmatchedParserError extends JSONParserError{constructor(source){super(`Could not find parser for "${source}"`,source);this.code="EUNMATCHEDPARSER"}};setErrorName(UnmatchedParserError);const ResolverError=exports.ResolverError=class ResolverError extends JSONParserError{constructor(ex,source){super(ex.message||`Error reading file "${source}"`,source);this.code="ERESOLVER";if("code"in ex){this.ioErrorCode=String(ex.code)}}};setErrorName(ResolverError);const UnmatchedResolverError=exports.UnmatchedResolverError=class UnmatchedResolverError extends JSONParserError{constructor(source){super(`Could not find resolver for "${source}"`,source);this.code="EUNMATCHEDRESOLVER"}};setErrorName(UnmatchedResolverError);const MissingPointerError=exports.MissingPointerError=class MissingPointerError extends JSONParserError{constructor(token,path){super(`Token "${token}" does not exist.`,stripHash(path));this.code="EMISSINGPOINTER"}};setErrorName(MissingPointerError);const InvalidPointerError=exports.InvalidPointerError=class InvalidPointerError extends JSONParserError{constructor(pointer,path){super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`,stripHash(path));this.code="EINVALIDPOINTER"}};setErrorName(InvalidPointerError);function setErrorName(err){Object.defineProperty(err.prototype,"name",{value:err.name,enumerable:true})}exports.isHandledError=function(err){return err instanceof JSONParserError||err instanceof JSONParserErrorGroup};exports.normalizeError=function(err){if(err.path===null){err.path=[]}return err}},{"./url":61,"@jsdevtools/ono":75}],60:[function(require,module,exports){"use strict";exports.all=function(plugins){return Object.keys(plugins).filter(key=>{return typeof plugins[key]==="object"}).map(key=>{plugins[key].name=key;return plugins[key]})};exports.filter=function(plugins,method,file){return plugins.filter(plugin=>{return!!getResult(plugin,method,file)})};exports.sort=function(plugins){for(let plugin of plugins){plugin.order=plugin.order||Number.MAX_SAFE_INTEGER}return plugins.sort((a,b)=>{return a.order-b.order})};exports.run=function(plugins,method,file,$refs){let plugin,lastError,index=0;return new Promise((resolve,reject)=>{runNextPlugin();function runNextPlugin(){plugin=plugins[index++];if(!plugin){return reject(lastError)}try{let result=getResult(plugin,method,file,callback,$refs);if(result&&typeof result.then==="function"){result.then(onSuccess,onError)}else if(result!==undefined){onSuccess(result)}else if(index===plugins.length){throw new Error("No promise has been returned or callback has been called.")}}catch(e){onError(e)}}function callback(err,result){if(err){onError(err)}else{onSuccess(result)}}function onSuccess(result){resolve({plugin:plugin,result:result})}function onError(error){lastError={plugin:plugin,error:error};runNextPlugin()}})};function getResult(obj,prop,file,callback,$refs){let value=obj[prop];if(typeof value==="function"){return value.apply(obj,[file,callback,$refs])}if(!callback){if(value instanceof RegExp){return value.test(file.url)}else if(typeof value==="string"){return value===file.extension}else if(Array.isArray(value)){return value.indexOf(file.extension)!==-1}}return value}},{}],61:[function(require,module,exports){(function(process){"use strict";let isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^(\w{2,}):\/\//i,url=module.exports,jsonPointerSlash=/~1/g,jsonPointerTilde=/~0/g;let urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23"];let urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];exports.parse=require("url").parse;exports.resolve=require("url").resolve;exports.cwd=function cwd(){if(process.browser){return location.href}let path=process.cwd();let lastChar=path.slice(-1);if(lastChar==="/"||lastChar==="\\"){return path}else{return path+"/"}};exports.getProtocol=function getProtocol(path){let match=protocolPattern.exec(path);if(match){return match[1].toLowerCase()}};exports.getExtension=function getExtension(path){let lastDot=path.lastIndexOf(".");if(lastDot>=0){return path.substr(lastDot).toLowerCase()}return""};exports.getHash=function getHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){return path.substr(hashIndex)}return"#"};exports.stripHash=function stripHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){path=path.substr(0,hashIndex)}return path};exports.isHttp=function isHttp(path){let protocol=url.getProtocol(path);if(protocol==="http"||protocol==="https"){return true}else if(protocol===undefined){return process.browser}else{return false}};exports.isFileSystemPath=function isFileSystemPath(path){if(process.browser){return false}let protocol=url.getProtocol(path);return protocol===undefined||protocol==="file"};exports.fromFileSystemPath=function fromFileSystemPath(path){if(isWindows){path=path.replace(/\\/g,"/")}path=encodeURI(path);for(let i=0;i{return decodeURIComponent(value).replace(jsonPointerSlash,"/").replace(jsonPointerTilde,"~")})}}).call(this,require("_process"))},{_process:172,url:199}],62:[function(require,module,exports){module.exports={"1.0.0":require("./schemas/1.0.0.json"),"1.1.0":require("./schemas/1.1.0.json"),"1.2.0":require("./schemas/1.2.0.json"),"2.0.0-rc1":require("./schemas/2.0.0-rc1.json"),"2.0.0-rc2":require("./schemas/2.0.0-rc2.json"),"2.0.0":require("./schemas/2.0.0.json"),"2.1.0":require("./schemas/2.1.0.json"),"2.2.0":require("./schemas/2.2.0.json"),"2.3.0":require("./schemas/2.3.0.json")}},{"./schemas/1.0.0.json":63,"./schemas/1.1.0.json":64,"./schemas/1.2.0.json":65,"./schemas/2.0.0-rc1.json":66,"./schemas/2.0.0-rc2.json":67,"./schemas/2.0.0.json":68,"./schemas/2.1.0.json":69,"./schemas/2.2.0.json":70,"./schemas/2.3.0.json":71}],63:[function(require,module,exports){module.exports={title:"AsyncAPI 1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},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:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},publish:{$ref:"#/definitions/message"},subscribe:{$ref:"#/definitions/message"},deprecated:{type:"boolean",default:false}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],64:[function(require,module,exports){module.exports={title:"AsyncAPI 1.1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,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."},schema:{$ref:"#/definitions/schema"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],65:[function(require,module,exports){module.exports={title:"AsyncAPI 1.2.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info"],oneOf:[{required:["topics"]},{required:["stream"]},{required:["events"]}],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0","1.2.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},stream:{$ref:"#/definitions/stream",description:"The list of messages a consumer can read or write from/to a streaming API."},events:{$ref:"#/definitions/events",description:"The list of messages an events API sends and/or receives."},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms","http","https"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable topic parameters."},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,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."},schema:{$ref:"#/definitions/schema"},$ref:{type:"string"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},stream:{title:"Stream Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{framing:{title:"Stream Framing Object",type:"object",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,oneOf:[{additionalProperties:false,properties:{type:{type:"string",enum:["chunked"]},delimiter:{type:"string",enum:["\\r\\n","\\n"],default:"\\r\\n"}}},{additionalProperties:false,properties:{type:{type:"string",enum:["sse"]},delimiter:{type:"string",enum:["\\n\\n"],default:"\\n\\n"}}}]},read:{title:"Stream Read Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},write:{title:"Stream Write Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},events:{title:"Events Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,anyOf:[{required:["receive"]},{required:["send"]}],properties:{receive:{title:"Events Receive Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},send:{title:"Events Send Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],66:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc1 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","id","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc1"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri-reference"},info:{$ref:"#/definitions/info"},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},baseChannel:{type:"string","x-format":"uri-path"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},traits:{$ref:"#/definitions/traits"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},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"},deprecated:{type:"boolean",default:false},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{},examples:{type:"array",items:{}}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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."},schema:{$ref:"#/definitions/schema"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}},message:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(/\\w+)+"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},traits:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/operationTrait"},{$ref:"#/definitions/messageTrait"}]}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],67:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc2 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc2"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{type:"object",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{$ref:"#/definitions/schema"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],68:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,properties:{headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],69:[function(require,module,exports){module.exports={title:"AsyncAPI 2.1.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.1.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],70:[function(require,module,exports){module.exports={title:"AsyncAPI 2.2.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.2.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],71:[function(require,module,exports){module.exports={title:"AsyncAPI 2.3.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.3.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{$ref:"#/definitions/servers"},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",anyOf:[{required:["url","protocol"]},{required:["$ref"]}],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},servers:{$ref:"#/definitions/servers"},channels:{$ref:"#/definitions/channels"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{},solace:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],72:[function(require,module,exports){const{load:load,Kind:Kind}=require("yaml-ast-parser");const loc=Symbol("pseudo-yaml-ast-loc");const hasOwnProp=(obj,key)=>obj&&typeof obj==="object"&&Object.prototype.hasOwnProperty.call(obj,key);const isUndefined=v=>v===undefined;const isNull=v=>v===null;const isPrimitive=v=>Number.isNaN(v)||isNull(v)||isUndefined(v)||typeof v==="symbol";const isPrimitiveNode=node=>isPrimitive(node.value)||!hasOwnProp(node,"value");const isBetween=(start,pos,end)=>pos<=end&&pos>=start;const getLoc=(input,{start:start=0,end:end=0})=>{const lines=input.split(/\n/);const loc={start:{},end:{}};let sum=0;for(const i of lines.keys()){const line=lines[i];const ls=sum;const le=sum+line.length;if(isUndefined(loc.start.line)&&isBetween(ls,start,le)){loc.start.line=i+1;loc.start.column=start-ls;loc.start.offset=start}if(isUndefined(loc.end.line)&&isBetween(ls,end,le)){loc.end.line=i+1;loc.end.column=end-ls;loc.end.offset=end}sum=le+1}return loc};const visitors={MAP:(node={},input="",ctx={})=>Object.assign(walk(node.mappings,input),{[loc]:getLoc(input,{start:node.startPosition,end:node.endPosition})}),MAPPING:(node={},input="",ctx={})=>{const value=walk([node.value],input);if(!isPrimitive(value)){value[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition})}return Object.assign(ctx,{[node.key.value]:value})},SCALAR:(node={},input="")=>{if(isPrimitiveNode(node)){return node.value}const _loc=getLoc(input,{start:node.startPosition,end:node.endPosition});const wrappable=Constructor=>()=>{const v=new Constructor(node.value);v[loc]=_loc;return v};const object=()=>{node.value[loc]=_loc;return node.value};const types={boolean:wrappable(Boolean),number:wrappable(Number),string:wrappable(String),function:object,object:object};return types[typeof node.value]()},SEQ:(node={},input="")=>{const items=walk(node.items,input,[]);items[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition});return items}};const walk=(nodes=[],input,ctx={})=>{const onNode=(node,ctx,fallback)=>{let visitor;if(node)visitor=visitors[Kind[node.kind]];return visitor?visitor(node,input,ctx):fallback};const walkObj=()=>nodes.reduce((sum,node)=>{return onNode(node,sum,sum)},ctx);const walkArr=()=>nodes.map(node=>onNode(node,ctx,null),ctx).filter(Boolean);return Array.isArray(ctx)?walkArr():walkObj()};module.exports.loc=loc;module.exports.yamlAST=(input=>walk([load(input)],input))},{"yaml-ast-parser":209}],73:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Ono=void 0;const extend_error_1=require("./extend-error");const normalize_1=require("./normalize");const to_json_1=require("./to-json");const constructor=Ono;exports.Ono=constructor;function Ono(ErrorConstructor,options){options=normalize_1.normalizeOptions(options);function ono(...args){let{originalError:originalError,props:props,message:message}=normalize_1.normalizeArgs(args,options);let newError=new ErrorConstructor(message);return extend_error_1.extendError(newError,originalError,props)}ono[Symbol.species]=ErrorConstructor;return ono}Ono.toJSON=function toJSON(error){return to_json_1.toJSON.call(error)};Ono.extend=function extend(error,originalError,props){if(props||originalError instanceof Error){return extend_error_1.extendError(error,originalError,props)}else if(originalError){return extend_error_1.extendError(error,undefined,originalError)}else{return extend_error_1.extendError(error)}}},{"./extend-error":74,"./normalize":77,"./to-json":80}],74:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.extendError=void 0;const isomorphic_node_1=require("./isomorphic.node");const stack_1=require("./stack");const to_json_1=require("./to-json");const protectedProps=["name","message","stack"];function extendError(error,originalError,props){let onoError=error;extendStack(onoError,originalError);if(originalError&&typeof originalError==="object"){mergeErrors(onoError,originalError)}onoError.toJSON=to_json_1.toJSON;if(isomorphic_node_1.addInspectMethod){isomorphic_node_1.addInspectMethod(onoError)}if(props&&typeof props==="object"){Object.assign(onoError,props)}return onoError}exports.extendError=extendError;function extendStack(newError,originalError){let stackProp=Object.getOwnPropertyDescriptor(newError,"stack");if(stack_1.isLazyStack(stackProp)){stack_1.lazyJoinStacks(stackProp,newError,originalError)}else if(stack_1.isWritableStack(stackProp)){newError.stack=stack_1.joinStacks(newError,originalError)}}function mergeErrors(newError,originalError){let keys=to_json_1.getDeepKeys(originalError,protectedProps);let _newError=newError;let _originalError=originalError;for(let key of keys){if(_newError[key]===undefined){try{_newError[key]=_originalError[key]}catch(e){}}}}},{"./isomorphic.node":76,"./stack":79,"./to-json":80}],75:[function(require,module,exports){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!exports.hasOwnProperty(p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const singleton_1=require("./singleton");Object.defineProperty(exports,"ono",{enumerable:true,get:function(){return singleton_1.ono}});var constructor_1=require("./constructor");Object.defineProperty(exports,"Ono",{enumerable:true,get:function(){return constructor_1.Ono}});__exportStar(require("./types"),exports);exports.default=singleton_1.ono;if(typeof module==="object"&&typeof module.exports==="object"){module.exports=Object.assign(module.exports.default,module.exports)}},{"./constructor":73,"./singleton":78,"./types":81}],76:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.addInspectMethod=exports.format=void 0;exports.format=false;exports.addInspectMethod=false},{}],77:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.normalizeArgs=exports.normalizeOptions=void 0;const isomorphic_node_1=require("./isomorphic.node");function normalizeOptions(options){options=options||{};return{concatMessages:options.concatMessages===undefined?true:Boolean(options.concatMessages),format:options.format===undefined?isomorphic_node_1.format:typeof options.format==="function"?options.format:false}}exports.normalizeOptions=normalizeOptions;function normalizeArgs(args,options){let originalError;let props;let formatArgs;let message="";if(typeof args[0]==="string"){formatArgs=args}else if(typeof args[1]==="string"){if(args[0]instanceof Error){originalError=args[0]}else{props=args[0]}formatArgs=args.slice(1)}else{originalError=args[0];props=args[1];formatArgs=args.slice(2)}if(formatArgs.length>0){if(options.format){message=options.format.apply(undefined,formatArgs)}else{message=formatArgs.join(" ")}}if(options.concatMessages&&originalError&&originalError.message){message+=(message?" \n":"")+originalError.message}return{originalError:originalError,props:props,message:message}}exports.normalizeArgs=normalizeArgs},{"./isomorphic.node":76}],78:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const constructor_1=require("./constructor");const singleton=ono;exports.ono=singleton;ono.error=new constructor_1.Ono(Error);ono.eval=new constructor_1.Ono(EvalError);ono.range=new constructor_1.Ono(RangeError);ono.reference=new constructor_1.Ono(ReferenceError);ono.syntax=new constructor_1.Ono(SyntaxError);ono.type=new constructor_1.Ono(TypeError);ono.uri=new constructor_1.Ono(URIError);const onoMap=ono;function ono(...args){let originalError=args[0];if(typeof originalError==="object"&&typeof originalError.name==="string"){for(let typedOno of Object.values(onoMap)){if(typeof typedOno==="function"&&typedOno.name==="ono"){let species=typedOno[Symbol.species];if(species&&species!==Error&&(originalError instanceof species||originalError.name===species.name)){return typedOno.apply(undefined,args)}}}}return ono.error.apply(undefined,args)}},{"./constructor":73}],79:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.lazyJoinStacks=exports.joinStacks=exports.isWritableStack=exports.isLazyStack=void 0;const newline=/\r?\n/;const onoCall=/\bono[ @]/;function isLazyStack(stackProp){return Boolean(stackProp&&stackProp.configurable&&typeof stackProp.get==="function")}exports.isLazyStack=isLazyStack;function isWritableStack(stackProp){return Boolean(!stackProp||stackProp.writable||typeof stackProp.set==="function")}exports.isWritableStack=isWritableStack;function joinStacks(newError,originalError){let newStack=popStack(newError.stack);let originalStack=originalError?originalError.stack:undefined;if(newStack&&originalStack){return newStack+"\n\n"+originalStack}else{return newStack||originalStack}}exports.joinStacks=joinStacks;function lazyJoinStacks(lazyStack,newError,originalError){if(originalError){Object.defineProperty(newError,"stack",{get:()=>{let newStack=lazyStack.get.apply(newError);return joinStacks({stack:newStack},originalError)},enumerable:false,configurable:true})}else{lazyPopStack(newError,lazyStack)}}exports.lazyJoinStacks=lazyJoinStacks;function popStack(stack){if(stack){let lines=stack.split(newline);let onoStart;for(let i=0;i0){return lines.join("\n")}}return stack}function lazyPopStack(error,lazyStack){Object.defineProperty(error,"stack",{get:()=>popStack(lazyStack.get.apply(error)),enumerable:false,configurable:true})}},{}],80:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getDeepKeys=exports.toJSON=void 0;const nonJsonTypes=["function","symbol","undefined"];const protectedProps=["constructor","prototype","__proto__"];const objectPrototype=Object.getPrototypeOf({});function toJSON(){let pojo={};let error=this;for(let key of getDeepKeys(error)){if(typeof key==="string"){let value=error[key];let type=typeof value;if(!nonJsonTypes.includes(type)){pojo[key]=value}}}return pojo}exports.toJSON=toJSON;function getDeepKeys(obj,omit=[]){let keys=[];while(obj&&obj!==objectPrototype){keys=keys.concat(Object.getOwnPropertyNames(obj),Object.getOwnPropertySymbols(obj));obj=Object.getPrototypeOf(obj)}let uniqueKeys=new Set(keys);for(let key of omit.concat(protectedProps)){uniqueKeys.delete(key)}return uniqueKeys}exports.getDeepKeys=getDeepKeys},{}],81:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});const util_1=require("util")},{util:204}],82:[function(require,module,exports){"use strict";var compileSchema=require("./compile"),resolve=require("./compile/resolve"),Cache=require("./cache"),SchemaObject=require("./compile/schema_obj"),stableStringify=require("fast-json-stable-stringify"),formats=require("./compile/formats"),rules=require("./compile/rules"),$dataMetaSchema=require("./data"),util=require("./compile/util");module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=require("./compile/async");var customKeyword=require("./keyword");Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=require("./compile/error_classes");Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema";var META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=formats(opts.format);this._cache=opts.cache||new Cache;this._loadingSchemas={};this._compilations=[];this.RULES=rules();this._getId=chooseGetId(opts);opts.loopRequired=opts.loopRequired||Infinity;if(opts.errorDataPath=="property")opts._errorDataPathProperty=true;if(opts.serialize===undefined)opts.serialize=stableStringify;this._metaOpts=getMetaSchemaOptions(this);if(opts.formats)addInitialFormats(this);if(opts.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof opts.meta=="object")this.addMetaSchema(opts.meta);if(opts.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){v=this.getSchema(schemaKeyRef);if(!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);if(v.$async!==true)this.errors=v.errors;return valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,undefined,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i%\\^`{|}]|%[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;var URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){mode=mode=="full"?"full":"fast";return util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\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,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,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,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,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:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return false;var year=+matches[1];var month=+matches[2];var day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return false;var hour=matches[1];var minute=matches[2];var second=matches[3];var timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],true)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return false;try{new RegExp(str);return true}catch(e){return false}}},{"./util":92}],87:[function(require,module,exports){"use strict";var resolve=require("./resolve"),util=require("./util"),errorClasses=require("./error_classes"),stableStringify=require("fast-json-stable-stringify");var validateGenerator=require("../dotjs/validate");var ucs2length=util.ucs2length;var equal=require("fast-deep-equal");var ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[undefined],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var c=checkCompiling.call(this,schema,root,baseId);var compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats;var RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;if(cv){cv.schema=v.schema;cv.errors=null;cv.refs=v.refs;cv.refVal=v.refVal;cv.root=v.root;cv.$async=v.$async;if(opts.sourceCode)cv.source=v.source}return v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate;var result=validate.apply(this,arguments);callValidate.errors=validate.errors;return result}function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===true;var sourceCode=validateGenerator({isTop:true,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,logger:self.logger,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode;if(opts.processCode)sourceCode=opts.processCode(sourceCode);var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError);refVal[0]=validate}catch(e){self.logger.error("Error compiling schema, function code:",sourceCode);throw e}validate.schema=_schema;validate.errors=null;validate.refs=refs;validate.refVal=refVal;validate.root=isRoot?validate:_root;if($async)validate.$async=true;if(opts.sourceCode===true){validate.source={code:sourceCode,patterns:patterns,defaults:defaults}}return validate}function resolveRef(baseId,ref,isRoot){ref=resolve.url(baseId,ref);var refIndex=refs[ref];var _refVal,refCode;if(refIndex!==undefined){_refVal=refVal[refIndex];refCode="refVal["+refIndex+"]";return resolvedRef(_refVal,refCode)}if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==undefined){_refVal=root.refVal[rootRefId];refCode=addLocalRef(ref,_refVal);return resolvedRef(_refVal,refCode)}}refCode=addLocalRef(ref);var v=resolve.call(self,localCompile,root,ref);if(v===undefined){var localSchema=localRefs&&localRefs[ref];if(localSchema){v=resolve.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId)}}if(v===undefined){removeLocalRef(ref)}else{replaceLocalRef(ref,v);return resolvedRef(v,refCode)}}function addLocalRef(ref,v){var refId=refVal.length;refVal[refId]=v;refs[ref]=refId;return"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v){var refId=refs[ref];refVal[refId]=v}function resolvedRef(refVal,code){return typeof refVal=="object"||typeof refVal=="boolean"?{code:code,schema:refVal,inline:true}:{code:code,$async:refVal&&!!refVal.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];if(index===undefined){index=patternsHash[regexStr]=patterns.length;patterns[index]=regexStr}return"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value);var index=defaultsHash[valueStr];if(index===undefined){index=defaultsHash[valueStr]=defaults.length;defaults[index]=value}return"default"+index}}function useCustomRule(rule,schema,parentSchema,it){if(self._opts.validateSchema!==false){var deps=rule.definition.dependencies;if(deps&&!deps.every(function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)}))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro;var validate;if(compile){validate=compile.call(self,schema,parentSchema,it)}else if(macro){validate=macro.call(self,schema,parentSchema,it);if(opts.validateSchema!==false)self.validateSchema(validate,true)}else if(inline){validate=inline.call(self,it,rule.keyword,schema,parentSchema)}else{validate=rule.definition.validate;if(!validate)return}if(validate===undefined)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;customRules[index]=validate;return{code:"customRule"+index,validate:validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);if(index>=0)return{index:index,compiling:true};index=this._compilations.length;this._compilations[index]={schema:schema,root:root,baseId:baseId};return{index:index,compiling:false}}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);if(i>=0)this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i=55296&&value<=56319&&pos=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);data="data"+(lvl-up||"");if(!jsonPointer)return data}var expr=data;var segments=jsonPointer.split("/");for(var i=0;i",$notOp=$isMax?">":"<",$errorKeyword=undefined;if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ";$schemaValueExcl="schemaExcl"+$lvl;out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: '"+$exclusiveKeyword+" should be boolean' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ";if($schema===undefined){$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaValueExcl;$isData=$isDataExcl}}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{if($exclIsNumber&&$schema===undefined){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaExcl;$notOp+="="}else{if($exclIsNumber)$schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema);if($schemaExcl===($exclIsNumber?$schemaValue:true)){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$notOp+="="}else{$exclusive=false;$opStr+="="}}var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ";if(it.opts.messages!==false){out+=" , message: 'should be "+$opStr+" ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],96:[function(require,module,exports){"use strict";module.exports=function generate__limitItems(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $op=$keyword=="maxItems"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxItems"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" items' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],97:[function(require,module,exports){"use strict";module.exports=function generate__limitLength(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $op=$keyword=="maxLength"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}if(it.opts.unicode===false){out+=" "+$data+".length "}else{out+=" ucs2length("+$data+") "}out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT be ";if($keyword=="maxLength"){out+="longer"}else{out+="shorter"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" characters' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],98:[function(require,module,exports){"use strict";module.exports=function generate__limitProperties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $op=$keyword=="maxProperties"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxProperties"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" properties' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],99:[function(require,module,exports){"use strict";module.exports=function generate_allOf(it,$keyword,$ruleType){var out=" ";var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$allSchemasEmpty=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$allSchemasEmpty=false;$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($breakOnError){if($allSchemasEmpty){out+=" if (true) { "}else{out+=" "+$closingBraces.slice(0,-1)+" "}}out=it.util.cleanUpCode(out);return out}},{}],100:[function(require,module,exports){"use strict";module.exports=function generate_anyOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $noEmptySchema=$schema.every(function($sch){return it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)});if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($schema,it.RULES.all);out+="var "+$errs+" = errors;var "+$valid+";";if($nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" if ("+$nextValid+") break; } ";it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else{out+=" if ("+$data+".length == 0) {"}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should contain a valid item' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { ";if($nonEmptySchema){out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "}if(it.opts.allErrors){out+=" } "}out=it.util.cleanUpCode(out);return out}},{}],104:[function(require,module,exports){"use strict";module.exports=function generate_custom(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="";var $compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{$ruleValidate=it.useCustomRule($rule,$schema,it.schema,it);if(!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath;$validateCode=$ruleValidate.code;$compile=$rDef.compile;$inline=$rDef.inline;$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if(!($inline||$macro)){out+=""+$ruleErrs+" = null;"}out+="var "+$errs+" = errors;var "+$valid+";";if($isData&&$rDef.$data){$closingBraces+="}";out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ";if($validateSchema){$closingBraces+="}";out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { "}}if($inline){if($rDef.statements){out+=" "+$ruleValidate.validate+" "}else{out+=" "+$valid+" = "+$ruleValidate.validate+"; "}}else if($macro){var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate;$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out);out="";out+=" "+$validateCode+".call( ";if(it.opts.passContext){out+="this"}else{out+="self"}if($compile||$rDef.schema===false){out+=" , "+$data+" "}else{out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" "}out+=" , (dataPath || '')";if(it.errorPath!='""'){out+=" + "+it.errorPath}var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop();if($rDef.errors===false){out+=" "+$valid+" = ";if($asyncKeyword){out+="await "}out+=""+def_callRuleValidate+"; "}else{if($asyncKeyword){$ruleErrs="customErrors"+$lvl;out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "}else{out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}}}if($rDef.modifying){out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"}out+=""+$closingBraces;if($rDef.valid){if($breakOnError){out+=" if (true) { "}}else{out+=" if ( ";if($rDef.valid===undefined){out+=" !";if($macro){out+=""+$nextValid}else{out+=""+$valid}}else{out+=" "+!$rDef.valid+" "}out+=") { ";$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ";if(it.opts.messages!==false){out+=" , message: 'should pass \""+$rule.keyword+"\" keyword validation' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var def_customError=out;out=$$outStack.pop();if($inline){if($rDef.errors){if($rDef.errors!="full"){out+=" for (var "+$i+"="+$errs+"; "+$i+"0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "}out+=") { ";$it.schema=$sch;$it.schemaPath=$schemaPath+it.util.getProperty($property);$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property);out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}out=it.util.cleanUpCode(out);return out}},{}],106:[function(require,module,exports){"use strict";module.exports=function generate_enum(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $i="i"+$lvl,$vSchema="schema"+$lvl;if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"}out+="var "+$valid+";";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length; "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ";if(it.opts.messages!==false){out+=" , message: 'should be equal to one of the allowed values' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" }";if($breakOnError){out+=" else { "}return out}},{}],107:[function(require,module,exports){"use strict";module.exports=function generate_format(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");if(it.opts.format===false){if($breakOnError){out+=" if (true) { "}return out}var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ";if(it.async){out+=" var async"+$lvl+" = "+$format+".async; "}out+=" "+$format+" = "+$format+".validate; } if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" (";if($unknownFormats!="ignore"){out+=" ("+$schemaValue+" && !"+$format+" ";if($allowUnknown){out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "}out+=") || "}out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ";if(it.async){out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) "}else{out+=" "+$format+"("+$data+") "}out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore"){it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"');if($breakOnError){out+=" if (true) { "}return out}else if($allowUnknown&&$unknownFormats.indexOf($schema)>=0){if($breakOnError){out+=" if (true) { "}return out}else{throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate;var $formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===true;$format=$format.validate}if($formatType!=$ruleType){if($breakOnError){out+=" if (true) { "}return out}if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);if($isObject)$formatRef+=".validate";if(typeof $format=="function"){out+=" "+$formatRef+"("+$data+") "}else{out+=" "+$formatRef+".test("+$data+") "}out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match format \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],108:[function(require,module,exports){"use strict";module.exports=function generate_if(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;var $thenSch=it.schema["then"],$elseSch=it.schema["else"],$thenPresent=$thenSch!==undefined&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==undefined&&(it.opts.strictKeywords?typeof $elseSch=="object"&&Object.keys($elseSch).length>0:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=false;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;$it.createErrors=true;out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";it.compositeRule=$it.compositeRule=$wasComposite;if($thenPresent){out+=" if ("+$nextValid+") { ";$it.schema=it.schema["then"];$it.schemaPath=it.schemaPath+".then";$it.errSchemaPath=it.errSchemaPath+"/then";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'then'; "}else{$ifClause="'then'"}out+=" } ";if($elsePresent){out+=" else { "}}else{out+=" if (!"+$nextValid+") { "}if($elsePresent){$it.schema=it.schema["else"];$it.schemaPath=it.schemaPath+".else";$it.errSchemaPath=it.errSchemaPath+"/else";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'else'; "}else{$ifClause="'else'"}out+=" } "}out+=" if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ";if(it.opts.messages!==false){out+=" , message: 'should match \"' + "+$ifClause+" + '\" schema' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+=" } ";if($breakOnError){out+=" else { "}out=it.util.cleanUpCode(out)}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],109:[function(require,module,exports){"use strict";module.exports={$ref:require("./ref"),allOf:require("./allOf"),anyOf:require("./anyOf"),$comment:require("./comment"),const:require("./const"),contains:require("./contains"),dependencies:require("./dependencies"),enum:require("./enum"),format:require("./format"),if:require("./if"),items:require("./items"),maximum:require("./_limit"),minimum:require("./_limit"),maxItems:require("./_limitItems"),minItems:require("./_limitItems"),maxLength:require("./_limitLength"),minLength:require("./_limitLength"),maxProperties:require("./_limitProperties"),minProperties:require("./_limitProperties"),multipleOf:require("./multipleOf"),not:require("./not"),oneOf:require("./oneOf"),pattern:require("./pattern"),properties:require("./properties"),propertyNames:require("./propertyNames"),required:require("./required"),uniqueItems:require("./uniqueItems"),validate:require("./validate")}},{"./_limit":95,"./_limitItems":96,"./_limitLength":97,"./_limitProperties":98,"./allOf":99,"./anyOf":100,"./comment":101,"./const":102,"./contains":103,"./dependencies":105,"./enum":106,"./format":107,"./if":108,"./items":110,"./multipleOf":111,"./not":112,"./oneOf":113,"./pattern":114,"./properties":115,"./propertyNames":116,"./ref":117,"./required":118,"./uniqueItems":119,"./validate":120}],110:[function(require,module,exports){"use strict";module.exports=function generate_items(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;out+="var "+$errs+" = errors;var "+$valid+";";if(Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===false){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have more than "+$schema.length+" items' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";$errSchemaPath=$currErrSchemaPath;if($breakOnError){$closingBraces+="}";out+=" else { "}}var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,true);$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems;$it.schemaPath=it.schemaPath+".additionalItems";$it.errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" for (var "+$idx+" = "+0+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" }"}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}out=it.util.cleanUpCode(out);return out}},{}],111:[function(require,module,exports){"use strict";module.exports=function generate_multipleOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}out+="var division"+$lvl+";if (";if($isData){out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "}out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ";if(it.opts.multipleOfPrecision){out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" "}else{out+=" division"+$lvl+" !== parseInt(division"+$lvl+") "}out+=" ) ";if($isData){out+=" ) "}out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should be multiple of ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],112:[function(require,module,exports){"use strict";module.exports=function generate_not(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.createErrors=false;var $allErrorsOption;if($it.opts.allErrors){$allErrorsOption=$it.opts.allErrors;$it.opts.allErrors=false}out+=" "+it.validate($it)+" ";$it.createErrors=true;if($allErrorsOption)$it.opts.allErrors=$allErrorsOption;it.compositeRule=$it.compositeRule=$wasComposite;out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";if(it.opts.allErrors){out+=" } "}}else{out+=" var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($breakOnError){out+=" if (false) { "}}return out}},{}],113:[function(require,module,exports){"use strict";module.exports=function generate_oneOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId}else{out+=" var "+$nextValid+" = true; "}if($i){out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ";$closingBraces+="}"}out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }"}}it.compositeRule=$it.compositeRule=$wasComposite;out+=""+$closingBraces+"if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ";if(it.opts.messages!==false){out+=" , message: 'should match exactly one schema in oneOf' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }";if(it.opts.allErrors){out+=" } "}return out}},{}],114:[function(require,module,exports){"use strict";module.exports=function generate_pattern(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $regexp=$isData?"(new RegExp("+$schemaValue+"))":it.usePattern($schema);out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" !"+$regexp+".test("+$data+") ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match pattern \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],115:[function(require,module,exports){"use strict";module.exports=function generate_properties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl;var $schemaKeys=Object.keys($schema||{}),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===false,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;var $required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length8){out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") "}else{var arr1=$schemaKeys;if(arr1){var $propertyKey,i1=-1,l1=arr1.length-1;while(i10:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sch.default!==undefined;$it.schema=$sch;$it.schemaPath=$schemaPath+$prop;$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey);$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers);$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault){out+=" "+$code+" "}else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$errSchemaPath=$currErrSchemaPath;it.errorPath=$currentErrorPath;out+=" } else { "}else{if($breakOnError){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = true; } else { "}else{out+=" if ("+$useData+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=" ) { "}}out+=" "+$code+" } "}}if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4){var $pProperty,i4=-1,l4=arr4.length-1;while(i40:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty);$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty);if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } ";if($breakOnError){out+=" else "+$nextValid+" = true; "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}out=it.util.cleanUpCode(out);return out}},{}],116:[function(require,module,exports){"use strict";module.exports=function generate_propertyNames(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;out+="var "+$errs+" = errors;";if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;if($ownProperties){out+=" var "+$dataProperties+" = undefined; "}if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key;var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}it.compositeRule=$it.compositeRule=$wasComposite;out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"0:it.util.schemaHasRules($propertySch,it.RULES.all)))){$required[$required.length]=$property}}}}else{var $required=$schema}}if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError){out+=" var missing"+$lvl+"; ";if($loopRequired){if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; "}var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)}out+=" var "+$valid+" = true; ";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "}out+="; if (!"+$valid+") break; } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2){var $propertyKey,$i=-1,l2=arr2.length-1;while($i 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0)){out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } "}else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",true)+") continue; ";if($typeIsArray){out+=" if (typeof item == 'string') item = '\"' + item; "}out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],120:[function(require,module,exports){"use strict";module.exports=function generate_validate(it,$keyword,$ruleType){var out="";var $async=it.schema.$async===true,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}if(it.isTop){out+=" var validate = ";if($async){it.async=true;out+="async "}out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if($id&&(it.opts.sourceCode||it.opts.processCode)){out+=" "+("/*# sourceURL="+$id+" */")+" "}}if(typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;if(it.schema===false){if(it.isTop){$breakOnError=true}else{out+=" var "+$valid+" = false; "}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'boolean schema is false' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(it.isTop){if($async){out+=" return data; "}else{out+=" validate.errors = null; return true; "}}else{out+=" var "+$valid+" = true; "}}if(it.isTop){out+=" }; return validate; "}return out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema));it.baseId=it.baseId||it.rootId;delete it.isTop;it.dataPathArr=[undefined];if(it.schema.default!==undefined&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ";out+=" var errors = 0; ";out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id)it.baseId=it.resolve.url(it.baseId,$id);if($async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="";var $errorKeyword;var $typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===true){if($typeIsArray){if($typeSchema.indexOf("null")==-1)$typeSchema=$typeSchema.concat("null")}else if($typeSchema!="null"){$typeSchema=[$typeSchema,"null"];$typeIsArray=true}}if($typeIsArray&&$typeSchema.length==1){$typeSchema=$typeSchema[0];$typeIsArray=false}if(it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)')}else if(it.opts.extendRefs!==true){$refKeywords=false;it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"')}}if(it.schema.$comment&&it.opts.$comment){out+=" "+it.RULES.all.$comment.code(it,"$comment")}if($typeSchema){if(it.opts.coerceTypes){var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema)}var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===true||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";out+=" if ("+it.util[$method]($typeSchema,$data,true)+") { ";if($coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; ";if(it.opts.coerceTypes=="array"){out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+")) "+$dataType+" = 'array'; "}out+=" var "+$coerced+" = undefined; ";var $bracesCoercion="";var arr1=$coerceToTypes;if(arr1){var $type,$i=-1,l1=arr1.length-1;while($i0){throw new Error("Invalid string. Length must be a multiple of 4")}var validLen=b64.indexOf("=");if(validLen===-1)validLen=len;var placeHoldersLen=validLen===len?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength(b64){var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray(b64){var tmp;var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];var arr=new Arr(_byteLength(b64,validLen,placeHoldersLen));var curByte=0;var len=placeHoldersLen>0?validLen-4:validLen;var i;for(i=0;i>16&255;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}if(placeHoldersLen===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[curByte++]=tmp&255}if(placeHoldersLen===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"=")}return parts.join("")}},{}],126:[function(require,module,exports){},{}],127:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter=55296&&value<=56319&&counter65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;jmaxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(qK_MAX_LENGTH){throw new RangeError('The value "'+length+'" is invalid for option "size"')}var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new TypeError('The "string" argument must be of type string. Received type number')}return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species!=null&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="string"){return fromString(value,encodingOrOffset)}if(ArrayBuffer.isView(value)){return fromArrayLike(value)}if(value==null){throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)){return fromArrayBuffer(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('The "value" argument must not be of type number. Received type number')}var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value){return Buffer.from(valueOf,encodingOrOffset,length)}var b=fromObject(value);if(b)return b;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]==="function"){return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be of type number')}else if(size<0){throw new RangeError('The value "'+size+'" is invalid for option "size"')}}function alloc(size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}var length=byteLength(string,encoding)|0;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length){buf=buf.slice(0,actual)}return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i=K_MAX_LENGTH){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+K_MAX_LENGTH.toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true&&b!==Buffer.prototype};Buffer.compare=function compare(a,b){if(isInstance(a,Uint8Array))a=Buffer.from(a,a.offset,a.byteLength);if(isInstance(b,Uint8Array))b=Buffer.from(b,b.offset,b.byteLength);if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array')}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i2&&arguments[2]===true;if(!mustMatch&&len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase){return mustMatch?-1:utf8ToBytes(string).length}encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;imax)str+=" ... ";return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)){target=Buffer.from(target,target.offset,target.byteLength)}if(!Buffer.isBuffer(target)){throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof target)}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(numberIsNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(length>strLen/2){length=strLen/2}for(var i=0;i>>0;if(isFinite(length)){length=length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}if(val.length===1){var code=val.charCodeAt(0);if(encoding==="utf8"&&code<128||encoding==="latin1"){val=code}}}else if(typeof val==="number"){val=val&255}if(start<0||this.length>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}}).call(this,require("buffer").Buffer)},{"base64-js":125,buffer:128,ieee754:135}],129:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],130:[function(require,module,exports){(function(process,global){"use strict";var next=global.process&&process.nextTick||global.setImmediate||function(f){setTimeout(f,0)};module.exports=function maybe(cb,promise){if(cb){promise.then(function(result){next(function(){cb(null,result)})},function(err){next(function(){cb(err)})});return undefined}else{return promise}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:172}],131:[function(require,module,exports){var objectCreate=Object.create||objectCreatePolyfill;var objectKeys=Object.keys||objectKeysPolyfill;var bind=Function.prototype.bind||functionBindPolyfill;function EventEmitter(){if(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events")){this._events=objectCreate(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;var defaultMaxListeners=10;var hasDefineProperty;try{var o={};if(Object.defineProperty)Object.defineProperty(o,"x",{value:0});hasDefineProperty=o.x===0}catch(err){hasDefineProperty=false}if(hasDefineProperty){Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:true,get:function(){return defaultMaxListeners},set:function(arg){if(typeof arg!=="number"||arg<0||arg!==arg)throw new TypeError('"defaultMaxListeners" must be a positive number');defaultMaxListeners=arg}})}else{EventEmitter.defaultMaxListeners=defaultMaxListeners}EventEmitter.prototype.setMaxListeners=function setMaxListeners(n){if(typeof n!=="number"||n<0||isNaN(n))throw new TypeError('"n" argument must be a positive number');this._maxListeners=n;return this};function $getMaxListeners(that){if(that._maxListeners===undefined)return EventEmitter.defaultMaxListeners;return that._maxListeners}EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return $getMaxListeners(this)};function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i1)er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Unhandled "error" event. ('+er+")");err.context=er;throw err}return false}handler=events[type];if(!handler)return false;var isFn=typeof handler==="function";len=arguments.length;switch(len){case 1:emitNone(handler,isFn,this);break;case 2:emitOne(handler,isFn,this,arguments[1]);break;case 3:emitTwo(handler,isFn,this,arguments[1],arguments[2]);break;case 4:emitThree(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:args=new Array(len-1);for(i=1;i0&&existing.length>m){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners '+"added. Use emitter.setMaxListeners() to "+"increase limit.");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;if(typeof console==="object"&&console.warn){console.warn("%s: %s",w.name,w.message)}}}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;switch(arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:var args=new Array(arguments.length);for(var i=0;i=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else spliceOne(list,position);if(list.length===1)events[type]=list[0];if(events.removeListener)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(!events)return this;if(!events.removeListener){if(arguments.length===0){this._events=objectCreate(null);this._eventsCount=0}else if(events[type]){if(--this._eventsCount===0)this._events=objectCreate(null);else delete events[type]}return this}if(arguments.length===0){var keys=objectKeys(events);var key;for(i=0;i=0;i--){this.removeListener(type,listeners[i])}}return this};function _listeners(target,type,unwrap){var events=target._events;if(!events)return[];var evlistener=events[type];if(!evlistener)return[];if(typeof evlistener==="function")return unwrap?[evlistener.listener||evlistener]:[evlistener];return unwrap?unwrapListeners(evlistener):arrayClone(evlistener,evlistener.length)}EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,true)};EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,false)};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],136:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}}else{module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}}},{}],137:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],138:[function(require,module,exports){"use strict";var yaml=require("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":139}],139:[function(require,module,exports){"use strict";var loader=require("./js-yaml/loader");var dumper=require("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}module.exports.Type=require("./js-yaml/type");module.exports.Schema=require("./js-yaml/schema");module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.JSON_SCHEMA=require("./js-yaml/schema/json");module.exports.CORE_SCHEMA=require("./js-yaml/schema/core");module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full");module.exports.load=loader.load;module.exports.loadAll=loader.loadAll;module.exports.safeLoad=loader.safeLoad;module.exports.safeLoadAll=loader.safeLoadAll;module.exports.dump=dumper.dump;module.exports.safeDump=dumper.safeDump;module.exports.YAMLException=require("./js-yaml/exception");module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full");module.exports.scan=deprecated("scan");module.exports.parse=deprecated("parse");module.exports.compose=deprecated("compose");module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":141,"./js-yaml/exception":142,"./js-yaml/loader":143,"./js-yaml/schema":145,"./js-yaml/schema/core":146,"./js-yaml/schema/default_full":147,"./js-yaml/schema/default_safe":148,"./js-yaml/schema/failsafe":149,"./js-yaml/schema/json":150,"./js-yaml/type":151}],140:[function(require,module,exports){"use strict";function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;indexlineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0){return"''"}if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1){return"'"+string+"'"}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char,nextChar;var escapeSeq;for(var i=0;i=55296&&char<=56319){nextChar=string.charCodeAt(i+1);if(nextChar>=56320&&nextChar<=57343){result+=encodeHex((char-55296)*1024+nextChar-56320+65536);i++;continue}}escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){var arrayLevel=state.noArrayIndent&&level>0?level-1:level;if(block&&state.dump.length!==0){writeBlockSequence(state,arrayLevel,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,arrayLevel,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey)}}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndenttextIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndentnodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndentnodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else{throwError(state,"unknown tag !<"+state.tag+">")}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position0&&"\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(endmaxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};module.exports=Mark},{"./common":140}],145:[function(require,module,exports){"use strict";var common=require("./common");var YAMLException=require("./exception");var Type=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return exclude.indexOf(index)===-1})}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type){result[type.kind][type.tag]=result["fallback"][type.tag]=type}for(index=0,length=arguments.length;index64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":151}],153:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":151}],154:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":140,"../type":151}],155:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0"+obj.toString(8):"-0"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":140,"../type":151}],156:[function(require,module,exports){"use strict";var esprima;try{var _require=require;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=require("../../type");function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;if(ast.body[0].expression.body.type==="BlockStatement"){return new Function(params,source.slice(body[0]+1,body[1]-1))}return new Function(params,"return "+source.slice(body[0],body[1]))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":151}],157:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":151}],158:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object==="undefined"}module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":151}],159:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})},{"../type":151}],160:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlMerge(data){return data==="<<"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":151}],161:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":151}],162:[function(require,module,exports){"use strict";var Type=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index=1){var hi=str.charCodeAt(idx-1);var low=code;if(55296<=hi&&hi<=56319){return(hi-55296)*1024+(low-56320)+65536}return low}return code}function shouldBreak(start,mid,end){var all=[start].concat(mid).concat([end]);var previous=all[all.length-2];var next=end;var eModifierIndex=all.lastIndexOf(E_Modifier);if(eModifierIndex>1&&all.slice(1,eModifierIndex).every(function(c){return c==Extend})&&[Extend,E_Base,E_Base_GAZ].indexOf(start)==-1){return Break}var rIIndex=all.lastIndexOf(Regional_Indicator);if(rIIndex>0&&all.slice(1,rIIndex).every(function(c){return c==Regional_Indicator})&&[Prepend,Regional_Indicator].indexOf(previous)==-1){if(all.filter(function(c){return c==Regional_Indicator}).length%2==1){return BreakLastRegional}else{return BreakPenultimateRegional}}if(previous==CR&&next==LF){return NotBreak}else if(previous==Control||previous==CR||previous==LF){if(next==E_Modifier&&mid.every(function(c){return c==Extend})){return Break}else{return BreakStart}}else if(next==Control||next==CR||next==LF){return BreakStart}else if(previous==L&&(next==L||next==V||next==LV||next==LVT)){return NotBreak}else if((previous==LV||previous==V)&&(next==V||next==T)){return NotBreak}else if((previous==LVT||previous==T)&&next==T){return NotBreak}else if(next==Extend||next==ZWJ){return NotBreak}else if(next==SpacingMark){return NotBreak}else if(previous==Prepend){return NotBreak}var previousNonExtendIndex=all.indexOf(Extend)!=-1?all.lastIndexOf(Extend)-1:all.length-2;if([E_Base,E_Base_GAZ].indexOf(all[previousNonExtendIndex])!=-1&&all.slice(previousNonExtendIndex+1,-1).every(function(c){return c==Extend})&&next==E_Modifier){return NotBreak}if(previous==ZWJ&&[Glue_After_Zwj,E_Base_GAZ].indexOf(next)!=-1){return NotBreak}if(mid.indexOf(Regional_Indicator)!=-1){return Break}if(previous==Regional_Indicator&&next==Regional_Indicator){return NotBreak}return BreakStart}this.nextBreak=function(string,index){if(index===undefined){index=0}if(index<0){return 0}if(index>=string.length-1){return string.length}var prev=getGraphemeBreakProperty(codePointAt(string,index));var mid=[];for(var i=index+1;i=max){return res.substr(0,max)}while(max>res.length&&num>1){if(num&1){res+=str}num>>=1;str+=str}res+=str;res=res.substr(0,max);return res}"use strict";var padStart=function padStart(string,maxLength,fillString){if(string==null||maxLength==null){return string}var result=String(string);var targetLen=typeof maxLength==="number"?maxLength:parseInt(maxLength,10);if(isNaN(targetLen)||!isFinite(targetLen)){return result}var length=result.length;if(length>=targetLen){return result}var fill=fillString==null?"":String(fillString);if(fill===""){fill=" "}var fillLen=targetLen-length;while(fill.lengthfillLen?fill.substr(0,fillLen):fill;return truncated+result};var _extends=Object.assign||function(target){for(var i=1;i1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected token <"+token+"> at "+position.filter(Boolean).join(":")}};var tokenizeErrorTypes={unexpectedSymbol:function unexpectedSymbol(symbol){for(var _len=arguments.length,position=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected symbol <"+symbol+"> at "+position.filter(Boolean).join(":")}};var tokenTypes={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10};var punctuatorTokensMap={"{":tokenTypes.LEFT_BRACE,"}":tokenTypes.RIGHT_BRACE,"[":tokenTypes.LEFT_BRACKET,"]":tokenTypes.RIGHT_BRACKET,":":tokenTypes.COLON,",":tokenTypes.COMMA};var keywordTokensMap={true:tokenTypes.TRUE,false:tokenTypes.FALSE,null:tokenTypes.NULL};var stringStates={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2};var escapes$1={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8};var numberStates={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function isDigit1to9(char){return char>="1"&&char<="9"}function isDigit(char){return char>="0"&&char<="9"}function isHex(char){return isDigit(char)||char>="a"&&char<="f"||char>="A"&&char<="F"}function isExp(char){return char==="e"||char==="E"}function parseWhitespace(input,index,line,column){var char=input.charAt(index);if(char==="\r"){index++;line++;column=1;if(input.charAt(index)==="\n"){index++}}else if(char==="\n"){index++;line++;column=1}else if(char==="\t"||char===" "){index++;column++}else{return null}return{index:index,line:line,column:column}}function parseChar(input,index,line,column){var char=input.charAt(index);if(char in punctuatorTokensMap){return{type:punctuatorTokensMap[char],line:line,column:column+1,index:index+1,value:null}}return null}function parseKeyword(input,index,line,column){for(var name in keywordTokensMap){if(keywordTokensMap.hasOwnProperty(name)&&input.substr(index,name.length)===name){return{type:keywordTokensMap[name],line:line,column:column+name.length,index:index+name.length,value:name}}}return null}function parseString$1(input,index,line,column){var startIndex=index;var state=stringStates._START_;while(index0){return{type:tokenTypes.NUMBER,line:line,column:column+passedValueIndex-startIndex,index:passedValueIndex,value:input.slice(startIndex,passedValueIndex)}}return null}var tokenize=function tokenize(input,settings){var line=1;var column=1;var index=0;var tokens=[];while(index0?tokenList[tokenList.length-1].loc.end:{line:1,column:1};error(parseErrorTypes.unexpectedEnd(),input,settings.source,loc.line,loc.column)}function parseHexEscape(hexCode){var charCode=0;for(var i=0;i<4;i++){charCode=charCode*16+parseInt(hexCode[i],16)}return String.fromCharCode(charCode)}var escapes={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};var passEscapes=['"',"\\","/"];function parseString(string){var result="";for(var i=0;i-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function stubArray(){return[]}function stubFalse(){return false}module.exports=cloneDeep}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],171:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i1){for(var i=1;i0&&len>maxKeys){len=maxKeys}for(var i=0;i=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],174:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;iself._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=Buffer.alloc(newData.length);for(var i=0;iself._pos){self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&self._mode!=="ms-stream"){self.push(null)}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":178,_process:172,buffer:128,inherits:136,"readable-stream":195}],181:[function(require,module,exports){"use strict";function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error}function getMessage(arg1,arg2,arg3){if(typeof message==="string"){return message}else{return message(arg1,arg2,arg3)}}var NodeError=function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this}return NodeError}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;expected=expected.map(function(i){return String(i)});if(len>2){return"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]}else if(len===2){return"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1])}else{return"of ".concat(thing," ").concat(expected[0])}}else{return"of ".concat(thing," ").concat(String(expected))}}function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}function endsWith(str,search,this_len){if(this_len===undefined||this_len>str.length){this_len=str.length}return str.substring(this_len-search.length,this_len)===search}function includes(str,search,start){if(typeof start!=="number"){start=0}if(start+search.length>str.length){return false}else{return str.indexOf(search,start)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(name,expected,actual){var determiner;if(typeof expected==="string"&&startsWith(expected,"not ")){determiner="must not be";expected=expected.replace(/^not /,"")}else{determiner="must be"}var msg;if(endsWith(name," argument")){msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"))}else{var type=includes(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}msg+=". Received type ".concat(typeof actual);return msg},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(name){return"The "+name+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(name){return"Cannot call "+name+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(arg){return"Unknown encoding: "+arg},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");module.exports.codes=codes},{}],182:[function(require,module,exports){(function(process){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys};module.exports=Duplex;var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);{var keys=objectKeys(Writable.prototype);for(var v=0;v0){if(typeof chunk!=="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer.prototype){chunk=_uint8ArrayToBuffer(chunk)}if(addToFront){if(state.endEmitted)errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT);else addChunk(stream,state,chunk,true)}else if(state.ended){errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF)}else if(state.destroyed){return false}else{state.reading=false;if(state.decoder&&!encoding){chunk=state.decoder.write(chunk);if(state.objectMode||chunk.length!==0)addChunk(stream,state,chunk,false);else maybeReadMore(stream,state)}else{addChunk(stream,state,chunk,false)}}}else if(!addToFront){state.reading=false;maybeReadMore(stream,state)}}return!state.ended&&(state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&((state.highWaterMark!==0?state.length>=state.highWaterMark:state.length>0)||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=state.length<=state.highWaterMark;n=0}else{state.length-=n;state.awaitDrain=0}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function onEofChunk(stream,state){debug("onEofChunk");if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;if(state.sync){emitReadable(stream)}else{state.needReadable=false;if(!state.emittedReadable){state.emittedReadable=true;emitReadable_(stream)}}}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable);state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;process.nextTick(emitReadable_,stream)}}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended);if(!state.destroyed&&(state.length||state.ended)){stream.emit("readable");state.emittedReadable=false}state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark;flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){while(!state.reading&&!state.ended&&(state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",state.awaitDrain);state.awaitDrain++}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)errorOrDestroy(dest,er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function pipeOnDrainFunctionResult(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;var unpipeInfo={hasUnpiped:false};if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this,unpipeInfo);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i0;if(state.flowing!==false)this.resume()}else if(ev==="readable"){if(!state.endEmitted&&!state.readableListening){state.readableListening=state.needReadable=true;state.flowing=false;state.emittedReadable=false;debug("on readable",state.length,state.reading);if(state.length){emitReadable(this)}else if(!state.reading){process.nextTick(nReadingNextTick,this)}}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);if(ev==="readable"){process.nextTick(updateReadableListening,this)}return res};Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);if(ev==="readable"||ev===undefined){process.nextTick(updateReadableListening,this)}return res};function updateReadableListening(self){var state=self._readableState;state.readableListening=self.listenerCount("readable")>0;if(state.resumeScheduled&&!state.paused){state.flowing=true}else if(self.listenerCount("data")>0){self.resume()}}function nReadingNextTick(self){debug("readable nexttick read 0");self.read(0)}Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=!state.readableListening;resume(this,state)}state.paused=false;return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;process.nextTick(resume_,stream,state)}}function resume_(stream,state){debug("resume",state.reading);if(!state.reading){stream.read(0)}state.resumeScheduled=false;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){debug("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);while(state.flowing&&stream.read()!==null){}}Readable.prototype.wrap=function(stream){var _this=this;var state=this._readableState;var paused=false;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)_this.push(chunk)}_this.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=_this.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(this[i]===undefined&&typeof stream[i]==="function"){this[i]=function methodWrap(method){return function methodWrapReturnFunction(){return stream[method].apply(stream,arguments)}}(i)}}for(var n=0;n=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.first();else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=state.buffer.consume(n,state.decoder)}return ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted);if(!state.endEmitted){state.ended=true;process.nextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){debug("endReadableNT",state.endEmitted,state.length);if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end");if(state.autoDestroy){var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(iterable,opts){if(from===undefined){from=require("./internal/streams/from")}return from(Readable,iterable,opts)}}function indexOf(xs,x){for(var i=0,l=xs.length;i-1))throw new ERR_UNKNOWN_ENCODING(encoding);this._writableState.defaultEncoding=encoding;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=Buffer.from(chunk,encoding)}return chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);if(chunk!==newChunk){isBuf=true;encoding="buffer";chunk=newChunk}}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next}return ret}},{key:"consume",value:function consume(n,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null}else{this.head=p;p.data=str.slice(nb)}break}++c}this.length-=c;return ret}},{key:"_getBuffer",value:function _getBuffer(n){var ret=Buffer.allocUnsafe(n);var p=this.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null}else{this.head=p;p.data=buf.slice(nb)}break}++c}this.length-=c;return ret}},{key:custom,value:function value(_,options){return inspect(this,_objectSpread({},options,{depth:0,customInspect:false}))}}]);return BufferList}()},{buffer:128,util:126}],189:[function(require,module,exports){(function(process){"use strict";function destroy(err,cb){var _this=this;var readableDestroyed=this._readableState&&this._readableState.destroyed;var writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb){cb(err)}else if(err){if(!this._writableState){process.nextTick(emitErrorNT,this,err)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,err)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(err||null,function(err){if(!cb&&err){if(!_this._writableState){process.nextTick(emitErrorAndCloseNT,_this,err)}else if(!_this._writableState.errorEmitted){_this._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,_this,err)}else{process.nextTick(emitCloseNT,_this)}}else if(cb){process.nextTick(emitCloseNT,_this);cb(err)}else{process.nextTick(emitCloseNT,_this)}});return this}function emitErrorAndCloseNT(self,err){emitErrorNT(self,err);emitCloseNT(self)}function emitCloseNT(self){if(self._writableState&&!self._writableState.emitClose)return;if(self._readableState&&!self._readableState.emitClose)return;self.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(self,err){self.emit("error",err)}function errorOrDestroy(stream,err){var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit("error",err)}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}}).call(this,require("_process"))},{_process:172}],190:[function(require,module,exports){"use strict";var ERR_STREAM_PREMATURE_CLOSE=require("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function once(callback){var called=false;return function(){if(called)return;called=true;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}callback.apply(this,args)}}function noop(){}function isRequest(stream){return stream.setHeader&&typeof stream.abort==="function"}function eos(stream,opts,callback){if(typeof opts==="function")return eos(stream,null,opts);if(!opts)opts={};callback=once(callback||noop);var readable=opts.readable||opts.readable!==false&&stream.readable;var writable=opts.writable||opts.writable!==false&&stream.writable;var onlegacyfinish=function onlegacyfinish(){if(!stream.writable)onfinish()};var writableEnded=stream._writableState&&stream._writableState.finished;var onfinish=function onfinish(){writable=false;writableEnded=true;if(!readable)callback.call(stream)};var readableEnded=stream._readableState&&stream._readableState.endEmitted;var onend=function onend(){readable=false;readableEnded=true;if(!writable)callback.call(stream)};var onerror=function onerror(err){callback.call(stream,err)};var onclose=function onclose(){var err;if(readable&&!readableEnded){if(!stream._readableState||!stream._readableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE;return callback.call(stream,err)}if(writable&&!writableEnded){if(!stream._writableState||!stream._writableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE;return callback.call(stream,err)}};var onrequest=function onrequest(){stream.req.on("finish",onfinish)};if(isRequest(stream)){stream.on("complete",onfinish);stream.on("abort",onclose);if(stream.req)onrequest();else stream.on("request",onrequest)}else if(writable&&!stream._writableState){stream.on("end",onlegacyfinish);stream.on("close",onlegacyfinish)}stream.on("end",onend);stream.on("finish",onfinish);if(opts.error!==false)stream.on("error",onerror);stream.on("close",onclose);return function(){stream.removeListener("complete",onfinish);stream.removeListener("abort",onclose);stream.removeListener("request",onrequest);if(stream.req)stream.req.removeListener("finish",onfinish);stream.removeListener("end",onlegacyfinish);stream.removeListener("close",onlegacyfinish);stream.removeListener("finish",onfinish);stream.removeListener("end",onend);stream.removeListener("error",onerror);stream.removeListener("close",onclose)}}module.exports=eos},{"../../../errors":181}],191:[function(require,module,exports){module.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],192:[function(require,module,exports){"use strict";var eos;function once(callback){var called=false;return function(){if(called)return;called=true;callback.apply(void 0,arguments)}}var _require$codes=require("../../../errors").codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){if(err)throw err}function isRequest(stream){return stream.setHeader&&typeof stream.abort==="function"}function destroyer(stream,reading,writing,callback){callback=once(callback);var closed=false;stream.on("close",function(){closed=true});if(eos===undefined)eos=require("./end-of-stream");eos(stream,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=true;callback()});var destroyed=false;return function(err){if(closed)return;if(destroyed)return;destroyed=true;if(isRequest(stream))return stream.abort();if(typeof stream.destroy==="function")return stream.destroy();callback(err||new ERR_STREAM_DESTROYED("pipe"))}}function call(fn){fn()}function pipe(from,to){return from.pipe(to)}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=="function")return noop;return streams.pop()}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key]}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS("streams")}var error;var destroys=streams.map(function(stream,i){var reading=i0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error)})});return streams.reduce(pipe)}module.exports=pipeline},{"../../../errors":181,"./end-of-stream":190}],193:[function(require,module,exports){"use strict";var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(name,hwm)}return Math.floor(hwm)}return state.objectMode?16:16*1024}module.exports={getHighWaterMark:getHighWaterMark}},{"../../../errors":181}],194:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:131}],195:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");exports.finished=require("./lib/internal/streams/end-of-stream.js");exports.pipeline=require("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":182,"./lib/_stream_passthrough.js":183,"./lib/_stream_readable.js":184,"./lib/_stream_transform.js":185,"./lib/_stream_writable.js":186,"./lib/internal/streams/end-of-stream.js":190,"./lib/internal/streams/pipeline.js":192}],196:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer;var isEncoding=Buffer.isEncoding||function(encoding){encoding=""+encoding;switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(enc){if(!enc)return"utf8";var retried;while(true){switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase();retried=true}}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!=="string"&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;nb=4;break;case"utf8":this.fillLast=utf8FillLast;nb=4;break;case"base64":this.text=base64Text;this.end=base64End;nb=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=Buffer.allocUnsafe(nb)}StringDecoder.prototype.write=function(buf){if(buf.length===0)return"";var r;var i;if(this.lastNeed){r=this.fillLast(buf);if(r===undefined)return"";i=this.lastNeed;this.lastNeed=0}else{i=0}if(i>5===6)return 2;else if(byte>>4===14)return 3;else if(byte>>3===30)return 4;return byte>>6===2?-1:-2}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j=0){if(nb>0)self.lastNeed=nb-1;return nb}if(--j=0){if(nb>0)self.lastNeed=nb-2;return nb}if(--j=0){if(nb>0){if(nb===2)nb=0;else self.lastNeed=nb-3}return nb}return 0}function utf8CheckExtraBytes(self,buf,p){if((buf[0]&192)!==128){self.lastNeed=0;return"�"}if(self.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128){self.lastNeed=1;return"�"}if(self.lastNeed>2&&buf.length>2){if((buf[2]&192)!==128){self.lastNeed=2;return"�"}}}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,buf,p);if(r!==undefined)return r;if(this.lastNeed<=buf.length){buf.copy(this.lastChar,p,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}buf.copy(this.lastChar,p,0,buf.length);this.lastNeed-=buf.length}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+"�";return r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString("base64",i);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=buf[buf.length-1]}else{this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1]}return buf.toString("base64",i,buf.length-n)}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}},{"safe-buffer":176}],197:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.apply=apply;var isObject=function isObject(val){return val!=null&&(typeof val==="undefined"?"undefined":_typeof(val))==="object"&&Array.isArray(val)===false};function apply(origin,patch){if(!isObject(patch)){return patch}var result=!isObject(origin)?{}:Object.assign({},origin);Object.keys(patch).forEach(function(key){var patchVal=patch[key];if(patchVal===null){delete result[key]}else{result[key]=apply(result[key],patchVal)}});return result}exports.default=apply},{}],198:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):factory(global.URI=global.URI||{})})(this,function(exports){"use strict";function merge(){for(var _len=arguments.length,sets=Array(_len),_key=0;_key<_len;_key++){sets[_key]=arguments[_key]}if(sets.length>1){sets[0]=sets[0].slice(0,-1);var xl=sets.length-1;for(var x=1;x= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var baseMinusTMin=base-tMin;var floor=Math.floor;var stringFromCharCode=String.fromCharCode;function error$1(type){throw new RangeError(errors[type])}function map(array,fn){var result=[];var length=array.length;while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[];var counter=0;var length=string.length;while(counter=55296&&value<=56319&&counter>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))};var decode=function decode(input){var output=[];var inputLength=input.length;var i=0;var n=initialN;var bias=initialBias;var basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(var j=0;j=128){error$1("not-basic")}output.push(input.charCodeAt(j))}for(var index=basic>0?basic+1:0;index=inputLength){error$1("invalid-input")}var digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error$1("overflow")}i+=digit*w;var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error$1("overflow")}w*=baseMinusT}var out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error$1("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return String.fromCodePoint.apply(String,output)};var encode=function encode(input){var output=[];input=ucs2decode(input);var inputLength=input.length;var n=initialN;var delta=0;var bias=initialBias;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=input[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _currentValue2=_step.value;if(_currentValue2<128){output.push(stringFromCharCode(_currentValue2))}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var basicLength=output.length;var handledCPCount=basicLength;if(basicLength){output.push(delimiter)}while(handledCPCount=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error$1("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=input[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var _currentValue=_step3.value;if(_currentValuemaxInt){error$1("overflow")}if(_currentValue==n){var q=delta;for(var k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();else e="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();return e}function pctDecChars(str){var newStr="";var i=0;var il=str.length;while(i=194&&c<224){if(il-i>=6){var c2=parseInt(str.substr(i+4,2),16);newStr+=String.fromCharCode((c&31)<<6|c2&63)}else{newStr+=str.substr(i,6)}i+=6}else if(c>=224){if(il-i>=9){var _c=parseInt(str.substr(i+4,2),16);var c3=parseInt(str.substr(i+7,2),16);newStr+=String.fromCharCode((c&15)<<12|(_c&63)<<6|c3&63)}else{newStr+=str.substr(i,9)}i+=9}else{newStr+=str.substr(i,3);i+=3}}return newStr}function _normalizeComponentEncoding(components,protocol){function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(protocol.UNRESERVED)?str:decStr}if(components.scheme)components.scheme=String(components.scheme).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME,"");if(components.userinfo!==undefined)components.userinfo=String(components.userinfo).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_USERINFO,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.host!==undefined)components.host=String(components.host).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.path!==undefined)components.path=String(components.path).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(components.scheme?protocol.NOT_PATH:protocol.NOT_PATH_NOSCHEME,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.query!==undefined)components.query=String(components.query).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_QUERY,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.fragment!==undefined)components.fragment=String(components.fragment).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_FRAGMENT,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);return components}function _stripLeadingZeros(str){return str.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(host,protocol){var matches=host.match(protocol.IPV4ADDRESS)||[];var _matches=slicedToArray(matches,2),address=_matches[1];if(address){return address.split(".").map(_stripLeadingZeros).join(".")}else{return host}}function _normalizeIPv6(host,protocol){var matches=host.match(protocol.IPV6ADDRESS)||[];var _matches2=slicedToArray(matches,3),address=_matches2[1],zone=_matches2[2];if(address){var _address$toLowerCase$=address.toLowerCase().split("::").reverse(),_address$toLowerCase$2=slicedToArray(_address$toLowerCase$,2),last=_address$toLowerCase$2[0],first=_address$toLowerCase$2[1];var firstFields=first?first.split(":").map(_stripLeadingZeros):[];var lastFields=last.split(":").map(_stripLeadingZeros);var isLastFieldIPv4Address=protocol.IPV4ADDRESS.test(lastFields[lastFields.length-1]);var fieldCount=isLastFieldIPv4Address?7:8;var lastFieldsStart=lastFields.length-fieldCount;var fields=Array(fieldCount);for(var x=0;x1){var newFirst=fields.slice(0,longestZeroFields.index);var newLast=fields.slice(longestZeroFields.index+longestZeroFields.length);newHost=newFirst.join(":")+"::"+newLast.join(":")}else{newHost=fields.join(":")}if(zone){newHost+="%"+zone}return newHost}else{return host}}var URI_PARSE=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var NO_MATCH_IS_UNDEFINED="".match(/(){0}/)[1]===undefined;function parse(uriString){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var components={};var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;if(options.reference==="suffix")uriString=(options.scheme?options.scheme+":":"")+"//"+uriString;var matches=uriString.match(URI_PARSE);if(matches){if(NO_MATCH_IS_UNDEFINED){components.scheme=matches[1];components.userinfo=matches[3];components.host=matches[4];components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=matches[7];components.fragment=matches[8];if(isNaN(components.port)){components.port=matches[5]}}else{components.scheme=matches[1]||undefined;components.userinfo=uriString.indexOf("@")!==-1?matches[3]:undefined;components.host=uriString.indexOf("//")!==-1?matches[4]:undefined;components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=uriString.indexOf("?")!==-1?matches[7]:undefined;components.fragment=uriString.indexOf("#")!==-1?matches[8]:undefined;if(isNaN(components.port)){components.port=uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?matches[4]:undefined}}if(components.host){components.host=_normalizeIPv6(_normalizeIPv4(components.host,protocol),protocol)}if(components.scheme===undefined&&components.userinfo===undefined&&components.host===undefined&&components.port===undefined&&!components.path&&components.query===undefined){components.reference="same-document"}else if(components.scheme===undefined){components.reference="relative"}else if(components.fragment===undefined){components.reference="absolute"}else{components.reference="uri"}if(options.reference&&options.reference!=="suffix"&&options.reference!==components.reference){components.error=components.error||"URI is not a "+options.reference+" reference."}var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)){if(components.host&&(options.domainHost||schemeHandler&&schemeHandler.domainHost)){try{components.host=punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(components,URI_PROTOCOL)}else{_normalizeComponentEncoding(components,protocol)}if(schemeHandler&&schemeHandler.parse){schemeHandler.parse(components,options)}}else{components.error=components.error||"URI can not be parsed."}return components}function _recomposeAuthority(components,options){var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];if(components.userinfo!==undefined){uriTokens.push(components.userinfo);uriTokens.push("@")}if(components.host!==undefined){uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host),protocol),protocol).replace(protocol.IPV6ADDRESS,function(_,$1,$2){return"["+$1+($2?"%25"+$2:"")+"]"}))}if(typeof components.port==="number"){uriTokens.push(":");uriTokens.push(components.port.toString(10))}return uriTokens.length?uriTokens.join(""):undefined}var RDS1=/^\.\.?\//;var RDS2=/^\/\.(\/|$)/;var RDS3=/^\/\.\.(\/|$)/;var RDS5=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(input){var output=[];while(input.length){if(input.match(RDS1)){input=input.replace(RDS1,"")}else if(input.match(RDS2)){input=input.replace(RDS2,"/")}else if(input.match(RDS3)){input=input.replace(RDS3,"/");output.pop()}else if(input==="."||input===".."){input=""}else{var im=input.match(RDS5);if(im){var s=im[0];input=input.slice(s.length);output.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return output.join("")}function serialize(components){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var protocol=options.iri?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(schemeHandler&&schemeHandler.serialize)schemeHandler.serialize(components,options);if(components.host){if(protocol.IPV6ADDRESS.test(components.host)){}else if(options.domainHost||schemeHandler&&schemeHandler.domainHost){try{components.host=!options.iri?punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase()):punycode.toUnicode(components.host)}catch(e){components.error=components.error||"Host's domain name can not be converted to "+(!options.iri?"ASCII":"Unicode")+" via punycode: "+e}}}_normalizeComponentEncoding(components,protocol);if(options.reference!=="suffix"&&components.scheme){uriTokens.push(components.scheme);uriTokens.push(":")}var authority=_recomposeAuthority(components,options);if(authority!==undefined){if(options.reference!=="suffix"){uriTokens.push("//")}uriTokens.push(authority);if(components.path&&components.path.charAt(0)!=="/"){uriTokens.push("/")}}if(components.path!==undefined){var s=components.path;if(!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)){s=removeDotSegments(s)}if(authority===undefined){s=s.replace(/^\/\//,"/%2F")}uriTokens.push(s)}if(components.query!==undefined){uriTokens.push("?");uriTokens.push(components.query)}if(components.fragment!==undefined){uriTokens.push("#");uriTokens.push(components.fragment)}return uriTokens.join("")}function resolveComponents(base,relative){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var skipNormalization=arguments[3];var target={};if(!skipNormalization){base=parse(serialize(base,options),options);relative=parse(serialize(relative,options),options)}options=options||{};if(!options.tolerant&&relative.scheme){target.scheme=relative.scheme;target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(relative.userinfo!==undefined||relative.host!==undefined||relative.port!==undefined){target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(!relative.path){target.path=base.path;if(relative.query!==undefined){target.query=relative.query}else{target.query=base.query}}else{if(relative.path.charAt(0)==="/"){target.path=removeDotSegments(relative.path)}else{if((base.userinfo!==undefined||base.host!==undefined||base.port!==undefined)&&!base.path){target.path="/"+relative.path}else if(!base.path){target.path=relative.path}else{target.path=base.path.slice(0,base.path.lastIndexOf("/")+1)+relative.path}target.path=removeDotSegments(target.path)}target.query=relative.query}target.userinfo=base.userinfo;target.host=base.host;target.port=base.port}target.scheme=base.scheme}target.fragment=relative.fragment;return target}function resolve(baseURI,relativeURI,options){var schemelessOptions=assign({scheme:"null"},options);return serialize(resolveComponents(parse(baseURI,schemelessOptions),parse(relativeURI,schemelessOptions),schemelessOptions,true),schemelessOptions)}function normalize(uri,options){if(typeof uri==="string"){uri=serialize(parse(uri,options),options)}else if(typeOf(uri)==="object"){uri=parse(serialize(uri,options),options)}return uri}function equal(uriA,uriB,options){if(typeof uriA==="string"){uriA=serialize(parse(uriA,options),options)}else if(typeOf(uriA)==="object"){uriA=serialize(uriA,options)}if(typeof uriB==="string"){uriB=serialize(parse(uriB,options),options)}else if(typeOf(uriB)==="object"){uriB=serialize(uriB,options)}return uriA===uriB}function escapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.ESCAPE:IRI_PROTOCOL.ESCAPE,pctEncChar)}function unescapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.PCT_ENCODED:IRI_PROTOCOL.PCT_ENCODED,pctDecChars)}var handler={scheme:"http",domainHost:true,parse:function parse(components,options){if(!components.host){components.error=components.error||"HTTP URIs must have a host."}return components},serialize:function serialize(components,options){if(components.port===(String(components.scheme).toLowerCase()!=="https"?80:443)||components.port===""){components.port=undefined}if(!components.path){components.path="/"}return components}};var handler$1={scheme:"https",domainHost:handler.domainHost,parse:handler.parse,serialize:handler.serialize};var O={};var isIRI=true;var UNRESERVED$$="[A-Za-z0-9\\-\\.\\_\\~"+(isIRI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var HEXDIG$$="[0-9A-Fa-f]";var PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$));var ATEXT$$="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var QTEXT$$="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var VCHAR$$=merge(QTEXT$$,'[\\"\\\\]');var SOME_DELIMS$$="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var UNRESERVED=new RegExp(UNRESERVED$$,"g");var PCT_ENCODED=new RegExp(PCT_ENCODED$,"g");var NOT_LOCAL_PART=new RegExp(merge("[^]",ATEXT$$,"[\\.]",'[\\"]',VCHAR$$),"g");var NOT_HFNAME=new RegExp(merge("[^]",UNRESERVED$$,SOME_DELIMS$$),"g");var NOT_HFVALUE=NOT_HFNAME;function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(UNRESERVED)?str:decStr}var handler$2={scheme:"mailto",parse:function parse$$1(components,options){var mailtoComponents=components;var to=mailtoComponents.to=mailtoComponents.path?mailtoComponents.path.split(","):[];mailtoComponents.path=undefined;if(mailtoComponents.query){var unknownHeaders=false;var headers={};var hfields=mailtoComponents.query.split("&");for(var x=0,xl=hfields.length;x",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){this.hostname=punycode.toASCII(this.hostname)}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last==="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":200,punycode:127,querystring:175}],200:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],201:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],202:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],203:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],204:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":203,_process:172,inherits:202}],205:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i checkpoint");er.position=position;er.checkpoint=this.checkpoint;throw er}this.result+=this.source.slice(this.checkpoint,position);this.checkpoint=position;return this};StringBuilder.prototype.escapeChar=function(){var character,esc;character=this.source.charCodeAt(this.checkpoint);esc=ESCAPE_SEQUENCES[character]||encodeHex(character);this.result+=esc;this.checkpoint+=1;return this};StringBuilder.prototype.finish=function(){if(this.source.length>this.checkpoint){this.takeUpTo(this.source.length)}};function writeScalar(state,object,level){var simple,first,spaceWrap,folded,literal,single,double,sawLineFeed,linePosition,longestLine,indent,max,character,position,escapeSeq,hexEsc,previous,lineLength,modifier,trailingLineBreaks,result;if(0===object.length){state.dump="''";return}if(object.indexOf("!include")==0){state.dump=""+object;return}if(object.indexOf("!$$$novalue")==0){state.dump="";return}if(-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)){state.dump="'"+object+"'";return}simple=true;first=object.length?object.charCodeAt(0):0;spaceWrap=CHAR_SPACE===first||CHAR_SPACE===object.charCodeAt(object.length-1);if(CHAR_MINUS===first||CHAR_QUESTION===first||CHAR_COMMERCIAL_AT===first||CHAR_GRAVE_ACCENT===first){simple=false}if(spaceWrap){simple=false;folded=false;literal=false}else{folded=true;literal=true}single=true;double=new StringBuilder(object);sawLineFeed=false;linePosition=0;longestLine=0;indent=state.indent*level;max=80;if(indent<40){max-=indent}else{max=40}for(position=0;position0){previous=object.charCodeAt(position-1);if(previous===CHAR_SPACE){literal=false;folded=false}}if(folded){lineLength=position-linePosition;linePosition=position;if(lineLength>longestLine){longestLine=lineLength}}}if(character!==CHAR_DOUBLE_QUOTE){single=false}double.takeUpTo(position);double.escapeChar()}if(simple&&testImplicitResolving(state,object)){simple=false}modifier="";if(folded||literal){trailingLineBreaks=0;if(object.charCodeAt(object.length-1)===CHAR_LINE_FEED){trailingLineBreaks+=1;if(object.charCodeAt(object.length-2)===CHAR_LINE_FEED){trailingLineBreaks+=1}}if(trailingLineBreaks===0){modifier="-"}else if(trailingLineBreaks===2){modifier="+"}}if(literal&&longestLine"+modifier+"\n"+indentString(result,indent)}else if(literal){if(!modifier){object=object.replace(/\n$/,"")}state.dump="|"+modifier+"\n"+indentString(object,indent)}else if(double){double.finish();state.dump='"'+double.result+'"'}else{throw new Error("Failed to dump scalar value")}return}function fold(object,max){var result="",position=0,length=object.length,trailing=/\n+$/.exec(object),newLine;if(trailing){length=trailing.index+1}while(positionlength||newLine===-1){if(result){result+="\n\n"}result+=foldLine(object.slice(position,length),max);position=length}else{if(result){result+="\n\n"}result+=foldLine(object.slice(position,newLine),max);position=newLine+1}}if(trailing&&trailing[0]!=="\n"){result+=trailing[0]}return result}function foldLine(line,max){if(line===""){return line}var foldRe=/[^\s] [^\s]/g,result="",prevMatch=0,foldStart=0,match=foldRe.exec(line),index,foldEnd,folded;while(match){index=match.index;if(index-foldStart>max){if(prevMatch!==foldStart){foldEnd=prevMatch}else{foldEnd=index}if(result){result+="\n"}folded=line.slice(foldStart,foldEnd);result+=folded;foldStart=foldEnd+1}prevMatch=index+1;match=foldRe.exec(line)}if(result){result+="\n"}if(foldStart!==prevMatch&&line.length-foldStart>max){result+=line.slice(foldStart,prevMatch)+"\n"+line.slice(prevMatch+1)}else{result+=line.slice(foldStart)}return result}function simpleChar(character){return CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character&&CHAR_COMMA!==character&&CHAR_LEFT_SQUARE_BRACKET!==character&&CHAR_RIGHT_SQUARE_BRACKET!==character&&CHAR_LEFT_CURLY_BRACKET!==character&&CHAR_RIGHT_CURLY_BRACKET!==character&&CHAR_SHARP!==character&&CHAR_AMPERSAND!==character&&CHAR_ASTERISK!==character&&CHAR_EXCLAMATION!==character&&CHAR_VERTICAL_LINE!==character&&CHAR_GREATER_THAN!==character&&CHAR_SINGLE_QUOTE!==character&&CHAR_DOUBLE_QUOTE!==character&&CHAR_PERCENT!==character&&CHAR_COLON!==character&&!ESCAPE_SEQUENCES[character]&&!needsHexEscape(character)}function needsHexEscape(character){return!(32<=character&&character<=126||133===character||160<=character&&character<=55295||57344<=character&&character<=65533||65536<=character&&character<=1114111)}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index1024){pairBuffer+="? "}pairBuffer+=state.dump+": ";if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;for(index=0,length=objectKeyList.length;index1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=0>state.flowLevel||state.flowLevel>level}if(null!==state.tag&&"?"!==state.tag||2!==state.indent&&level>0){compact=false}var objectOrArray="[object Object]"===type||"[object Array]"===type,duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if("[object Object]"===type){if(block&&0!==Object.keys(state.dump).length){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+(0===level?"\n":"")+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if("[object Array]"===type){if(block&&0!==state.dump.length){writeBlockSequence(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+(0===level?"\n":"")+state.dump}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if("[object String]"===type){if("?"!==state.tag){writeScalar(state,state.dump,level)}}else{if(state.skipInvalid){return false}throw new YAMLException("unacceptable kind of an object to dump "+type)}if(null!==state.tag&&"?"!==state.tag){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);var customEscapeCheck=new Array(256);var customEscapeMap=new Array(256);for(var i=0;i<256;i++){customEscapeMap[i]=simpleEscapeMap[i]=simpleEscapeSequence(i);simpleEscapeCheck[i]=simpleEscapeMap[i]?1:0;customEscapeCheck[i]=1;if(!simpleEscapeCheck[i]){customEscapeMap[i]="\\"+String.fromCharCode(i)}}var State=function(){function State(input,options){this.errorMap={};this.errors=[];this.lines=[];this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.allowAnyEscape=options["allowAnyEscape"]||false;this.ignoreDuplicateKeys=options["ignoreDuplicateKeys"]||false;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}return State}();function generateError(state,message,isWarning){if(isWarning===void 0){isWarning=false}return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart),isWarning)}function throwErrorFromPosition(state,position,message,isWarning,toLineEnd){if(isWarning===void 0){isWarning=false}if(toLineEnd===void 0){toLineEnd=false}var line=positionToLine(state,position);if(!line){return}var hash=message+position;if(state.errorMap[hash]){return}var mark=new Mark(state.filename,state.input,position,line.line,position-line.start);if(toLineEnd){mark.toLineEnd=true}var error=new YAMLException(message,mark,isWarning);state.errors.push(error)}function throwError(state,message){var error=generateError(state,message);var hash=error.message+error.mark.position;if(state.errorMap[hash]){return}state.errors.push(error);state.errorMap[hash]=1;var or=state.position;while(true){if(state.position>=state.input.length-1){return}var c=state.input.charAt(state.position);if(c=="\n"){state.position--;if(state.position==or){state.position+=1}return}if(c=="\r"){state.position--;if(state.position==or){state.position+=1}return}state.position++}}function throwWarning(state,message){var error=generateError(state,message);if(state.onWarning){state.onWarning.call(null,error)}else{}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(null!==state.version){throwError(state,"duplication of %YAML directive")}if(1!==args.length){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(null===match){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(1!==major){throwError(state,"found incompatible YAML document (version 1.2 is required)")}state.version=args[0];state.checkLineBreaks=minor<2;if(2!==minor){throwError(state,"found incompatible YAML document (version 1.2 is required)")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(2!==args.length){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;var scalar=state.result;if(scalar.startPosition==-1){scalar.startPosition=start}if(start<=end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(9===_character||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}scalar.value+=_result;scalar.endPosition=end}}function mergeMappings(state,destination,source){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;indexposition){break}line=state.lines[i]}if(!line){return{start:0,line:0}}return line}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(0!==ch){while(is_WHITE_SPACE(ch)){if(ch===9){state.errors.push(generateError(state,"Using tabs can lead to unpredictable results",true))}ch=state.input.charCodeAt(++state.position)}if(allowComments&&35===ch){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&0!==ch)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(32===ch){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(-1!==checkIndent&&0!==lineBreaks&&state.lineIndent1){scalar.value+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;var state_result=ast.newScalar();state_result.plainScalar=true;state.result=state_result;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||35===ch||38===ch||42===ch||33===ch||124===ch||62===ch||39===ch||34===ch||37===ch||64===ch||96===ch){return false}if(63===ch||45===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";captureStart=captureEnd=state.position;hasPendingContent=false;while(0!==ch){if(58===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(35===ch){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state_result,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position);if(state.position>=state.input.length){return false}}captureSegment(state,captureStart,captureEnd,false);if(state.result.startPosition!=-1){state_result.rawValue=state.input.substring(state_result.startPosition,state_result.endPosition);return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(39!==ch){return false}var scalar=ast.newScalar();scalar.singleQuoted=true;state.kind="scalar";state.result=scalar;scalar.startPosition=state.position;state.position++;captureStart=captureEnd=state.position;while(0!==(ch=state.input.charCodeAt(state.position))){if(39===ch){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);scalar.endPosition=state.position;if(39===ch){captureStart=captureEnd=state.position;state.position++}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,scalar,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position;scalar.endPosition=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,tmpEsc,ch;ch=state.input.charCodeAt(state.position);if(34!==ch){return false}state.kind="scalar";var scalar=ast.newScalar();scalar.doubleQuoted=true;state.result=scalar;scalar.startPosition=state.position;state.position++;captureStart=captureEnd=state.position;while(0!==(ch=state.input.charCodeAt(state.position))){if(34===ch){captureSegment(state,captureStart,state.position,true);state.position++;scalar.endPosition=state.position;scalar.rawValue=state.input.substring(scalar.startPosition,scalar.endPosition);return true}else if(92===ch){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&(state.allowAnyEscape?customEscapeCheck[ch]:simpleEscapeCheck[ch])){scalar.value+=state.allowAnyEscape?customEscapeMap[ch]:simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}scalar.value+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,scalar,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=ast.newItems();_result.startPosition=state.position}else if(ch===123){terminator=125;isMapping=true;_result=ast.newMap();_result.startPosition=state.position}else{return false}if(null!==state.anchor){_result.anchorId=state.anchor;state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(0!==ch){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;_result.endPosition=state.position;return true}else if(!readNext){var p=state.position;throwError(state,"missed comma between flow collection entries");state.position=p+1}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(63===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&58===ch){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,keyTag,keyNode,valueNode)}else if(isPair){var mp=storeMappingPair(state,null,keyTag,keyNode,valueNode);mp.parent=_result;_result.items.push(mp)}else{if(keyNode){keyNode.parent=_result}_result.items.push(keyNode)}_result.endPosition=state.position+1;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(44===ch){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}var sc=ast.newScalar();state.kind="scalar";state.result=sc;sc.startPosition=state.position;while(0!==ch){ch=state.input.charCodeAt(++state.position);if(43===ch||45===ch){if(CHOMPING_CLIP===chomping){chomping=43===ch?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(35===ch){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&0!==ch)}}while(0!==ch){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndenttextIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndentnodeIndent)&&0!==ch){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent0){ch=state.input.charCodeAt(--state.position);if(is_EOL(ch)){state.position++;break}}}else{state.tag=_tag;state.anchor=_anchor;return true}}else{break}if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,keyTag,keyNode,valueNode);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&0!==ch){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(null!==state.anchor){state.result.anchorId=state.anchor;state.anchorMap[state.anchor]=state.result}}}else{throwErrorFromPosition(state,tagStart,"unknown tag <"+state.tag+">",false,true)}}return null!==state.tag||null!==state.anchor||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while(0!==(ch=state.input.charCodeAt(state.position))){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||37!==ch){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(0!==ch&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(0!==ch){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(35===ch){do{ch=state.input.charCodeAt(++state.position)}while(0!==ch&&!is_EOL(ch));break}if(is_EOL(ch)){break}_position=state.position;while(0!==ch&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(0!==ch){readLineBreak(state)}if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"');state.position++}}skipSeparationSpace(state,true,-1);if(0===state.lineIndent&&45===state.input.charCodeAt(state.position)&&45===state.input.charCodeAt(state.position+1)&&45===state.input.charCodeAt(state.position+2)){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(46===state.input.charCodeAt(state.position)){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position0){documents[docsCount-1].endPosition=inputLength}for(var _i=0,documents_1=documents;_ix.endPosition){x.startPosition=x.endPosition}}return documents}function loadAll(input,iterator,options){if(options===void 0){options={}}var documents=loadDocuments(input,options),index,length;for(index=0,length=documents.length;index0&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(start-1))){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(endmaxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function(compact){if(compact===void 0){compact=true}var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};return Mark}();module.exports=Mark},{"./common":206}],212:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function parseYamlBoolean(input){if(["true","True","TRUE"].lastIndexOf(input)>=0){return true}else if(["false","False","FALSE"].lastIndexOf(input)>=0){return false}throw'Invalid boolean "'+input+'"'}exports.parseYamlBoolean=parseYamlBoolean;function safeParseYamlInteger(input){if(input.lastIndexOf("0o",0)===0){return parseInt(input.substring(2),8)}return parseInt(input)}function parseYamlInteger(input){var result=safeParseYamlInteger(input);if(isNaN(result)){throw'Invalid integer "'+input+'"'}return result}exports.parseYamlInteger=parseYamlInteger;function parseYamlFloat(input){if([".nan",".NaN",".NAN"].lastIndexOf(input)>=0){return NaN}var infinity=/^([-+])?(?:\.inf|\.Inf|\.INF)$/;var match=infinity.exec(input);if(match){return match[1]==="-"?-Infinity:Infinity}var result=parseFloat(input);if(!isNaN(result)){return result}throw'Invalid float "'+input+'"'}exports.parseYamlFloat=parseYamlFloat;var ScalarType;(function(ScalarType){ScalarType[ScalarType["null"]=0]="null";ScalarType[ScalarType["bool"]=1]="bool";ScalarType[ScalarType["int"]=2]="int";ScalarType[ScalarType["float"]=3]="float";ScalarType[ScalarType["string"]=4]="string"})(ScalarType=exports.ScalarType||(exports.ScalarType={}));function determineScalarType(node){if(node===undefined){return ScalarType.null}if(node.doubleQuoted||!node.plainScalar||node["singleQuoted"]){return ScalarType.string}var value=node.value;if(["null","Null","NULL","~",""].indexOf(value)>=0){return ScalarType.null}if(value===null||value===undefined){return ScalarType.null}if(["true","True","TRUE","false","False","FALSE"].indexOf(value)>=0){return ScalarType.bool}var base10=/^[-+]?[0-9]+$/;var base8=/^0o[0-7]+$/;var base16=/^0x[0-9a-fA-F]+$/;if(base10.test(value)||base8.test(value)||base16.test(value)){return ScalarType.int}var float=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/;var infinity=/^[-+]?(\.inf|\.Inf|\.INF)$/;if(float.test(value)||infinity.test(value)||[".nan",".NaN",".NAN"].indexOf(value)>=0){return ScalarType.float}return ScalarType.string}exports.determineScalarType=determineScalarType},{}],213:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var common=require("./common");var YAMLException=require("./exception");var type_1=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return-1===exclude.indexOf(index)})}function compileMap(){var result={},index,length;function collectType(type){result[type.tag]=type}for(index=0,length=arguments.length;index64){continue}if(code<0){return false}bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var code,idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new type_1.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":219,buffer:128}],221:[function(require,module,exports){"use strict";"use strict";var type_1=require("../type");function resolveYamlBoolean(data){if(null===data){return false}var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return"[object Boolean]"===Object.prototype.toString.call(object)}module.exports=new type_1.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":219}],222:[function(require,module,exports){"use strict";var common=require("../common");var type_1=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+][0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(null===data){return false}var value,sign,base,digits;if(!YAML_FLOAT_PATTERN.test(data)){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign="-"===value[0]?-1:1;digits=[];if(0<="+-".indexOf(value[0])){value=value.slice(1)}if(".inf"===value){return 1===sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(".nan"===value){return NaN}else if(0<=value.indexOf(":")){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}function representYamlFloat(object,style){if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}return object.toString(10)}function isFloat(object){return"[object Number]"===Object.prototype.toString.call(object)&&(0!==object%1||common.isNegativeZero(object))}module.exports=new type_1.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":206,"../type":219}],223:[function(require,module,exports){"use strict";var common=require("../common");var type_1=require("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(null===data){return false}var max=data.length,index=0,hasDigits=false,ch;if(!max){return false}ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max){return true}ch=data[++index];if(ch==="b"){index++;for(;index3){return false}if(regexp[regexp.length-modifiers.length-1]!=="/"){return false}regexp=regexp.slice(1,regexp.length-modifiers.length-1)}try{var dummy=new RegExp(regexp,modifiers);return true}catch(error){return false}}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if("/"===regexp[0]){if(tail){modifiers=tail[1]}regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global){result+="g"}if(object.multiline){result+="m"}if(object.ignoreCase){result+="i"}return result}function isRegExp(object){return"[object RegExp]"===Object.prototype.toString.call(object)}module.exports=new type_1.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":219}],225:[function(require,module,exports){"use strict";var type_1=require("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return"undefined"===typeof object}module.exports=new type_1.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":219}],226:[function(require,module,exports){"use strict";var type_1=require("../type");module.exports=new type_1.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return null!==data?data:{}}})},{"../type":219}],227:[function(require,module,exports){"use strict";var type_1=require("../type");function resolveYamlMerge(data){return"<<"===data||null===data}module.exports=new type_1.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":219}],228:[function(require,module,exports){"use strict";var type_1=require("../type");function resolveYamlNull(data){if(null===data){return true}var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return null===object}module.exports=new type_1.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":219}],229:[function(require,module,exports){"use strict";var type_1=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(null===data){return true}var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index{const channel=doc.channel(channelName);assignIdToParameters(channel.parameters())})}function assignUidToComponentSchemas(doc){if(doc.hasComponents()){for(const[key,s]of Object.entries(doc.components().schemas())){s.json()[String(xParserSchemaId)]=key}}}function assignUidToComponentParameterSchemas(doc){if(doc.hasComponents()){assignIdToParameters(doc.components().parameters())}}function assignNameToAnonymousMessages(doc){let anonymousMessageCounter=0;if(doc.hasChannels()){doc.channelNames().forEach(channelName=>{const channel=doc.channel(channelName);if(channel.hasPublish())addNameToKey(channel.publish().messages(),++anonymousMessageCounter);if(channel.hasSubscribe())addNameToKey(channel.subscribe().messages(),++anonymousMessageCounter)})}}function addNameToKey(messages,number){messages.forEach(m=>{if(m.name()===undefined&&m.ext(xParserMessageName)===undefined){m.json()[String(xParserMessageName)]=``}})}function assignIdToAnonymousSchemas(doc){let anonymousSchemaCounter=0;const callback=schema=>{if(!schema.uid()){schema.json()[String(xParserSchemaId)]=``}};traverseAsyncApiDocument(doc,callback)}module.exports={assignNameToComponentMessages:assignNameToComponentMessages,assignUidToParameterSchemas:assignUidToParameterSchemas,assignUidToComponentSchemas:assignUidToComponentSchemas,assignUidToComponentParameterSchemas:assignUidToComponentParameterSchemas,assignNameToAnonymousMessages:assignNameToAnonymousMessages,assignIdToAnonymousSchemas:assignIdToAnonymousSchemas}},{"./constants":4,"./iterators":8}],2:[function(require,module,exports){const Ajv=require("ajv");const ParserError=require("./errors/parser-error");const asyncapi=require("@asyncapi/specs");const{improveAjvErrors}=require("./utils");const cloneDeep=require("lodash.clonedeep");const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,getMimeTypes:getMimeTypes};async function parse({message,originalAsyncAPIDocument,fileFormat,parsedAsyncAPIDocument,pathToPayload,defaultSchemaFormat}){const payload=message.payload;if(!payload)return;message["x-parser-original-schema-format"]=message.schemaFormat||defaultSchemaFormat;message["x-parser-original-payload"]=cloneDeep(message.payload);const validate=getValidator(parsedAsyncAPIDocument.asyncapi);const valid=validate(payload);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"schema-validation-errors",title:"This is not a valid AsyncAPI Schema Object.",parsedJSON:parsedAsyncAPIDocument,validationErrors:improveAjvErrors(addFullPathToDataPath(errors,pathToPayload),originalAsyncAPIDocument,fileFormat)})}function getMimeTypes(){const mimeTypes=["application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"];["2.0.0","2.1.0","2.2.0","2.3.0"].forEach(version=>{mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`,`application/vnd.aai.asyncapi+json;version=${version}`,`application/vnd.aai.asyncapi+yaml;version=${version}`)});return mimeTypes}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(preparePayloadSchema(asyncapi[String(version)]),version);validate=ajv.getSchema(version)}return validate}function preparePayloadSchema(asyncapiSchema){return{$ref:"#/definitions/schema",definitions:asyncapiSchema.definitions}}function addFullPathToDataPath(errors,path){return errors.map(err=>({...err,...{dataPath:`${path}${err.dataPath}`}}))}},{"./errors/parser-error":6,"./utils":42,"@asyncapi/specs":62,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,"lodash.clonedeep":170}],3:[function(require,module,exports){window.AsyncAPIParser=require("./index")},{"./index":7}],4:[function(require,module,exports){const xParserSpecParsed="x-parser-spec-parsed";const xParserSpecStringified="x-parser-spec-stringified";const xParserMessageName="x-parser-message-name";const xParserSchemaId="x-parser-schema-id";const xParserCircle="x-parser-circular";const xParserCircleProps="x-parser-circular-props";module.exports={xParserSpecParsed:xParserSpecParsed,xParserSpecStringified:xParserSpecStringified,xParserMessageName:xParserMessageName,xParserSchemaId:xParserSchemaId,xParserCircle:xParserCircle,xParserCircleProps:xParserCircleProps}},{}],5:[function(require,module,exports){const ParserError=require("./errors/parser-error");const Operation=require("./models/operation");const{parseUrlVariables,getMissingProps,groupValidationErrors,tilde,parseUrlQueryParameters,setNotProvidedParams,getUnknownServers}=require("./utils");const validationError="validation-errors";function validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat){const srvs=parsedJSON.servers;if(!srvs)return true;const srvsMap=new Map(Object.entries(srvs));const notProvidedVariables=new Map;const notProvidedExamplesInEnum=new Map;srvsMap.forEach((srvr,srvrName)=>{const variables=parseUrlVariables(srvr.url);const variablesObj=srvr.variables;const notProvidedServerVars=notProvidedVariables.get(tilde(srvrName));if(!variables)return;const missingServerVariables=getMissingProps(variables,variablesObj);if(missingServerVariables.length){notProvidedVariables.set(tilde(srvrName),notProvidedServerVars?notProvidedServerVars.concat(missingServerVariables):missingServerVariables)}if(variablesObj){setNotValidExamples(variablesObj,srvrName,notProvidedExamplesInEnum)}});if(notProvidedVariables.size){throw new ParserError({type:validationError,title:"Not all server variables are described with variable object",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server does not have a corresponding variable object for",notProvidedVariables,asyncapiYAMLorJSON,initialFormat)})}if(notProvidedExamplesInEnum.size){throw new ParserError({type:validationError,title:"Check your server variables. The example does not match the enum list",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server variable provides an example that does not match the enum list",notProvidedExamplesInEnum,asyncapiYAMLorJSON,initialFormat)})}return true}function setNotValidExamples(variables,srvrName,notProvidedExamplesInEnum){const variablesMap=new Map(Object.entries(variables));variablesMap.forEach((variable,variableName)=>{if(variable.enum&&variable.examples){const wrongExamples=variable.examples.filter(r=>!variable.enum.includes(r));if(wrongExamples.length){notProvidedExamplesInEnum.set(`${tilde(srvrName)}/variables/${tilde(variableName)}`,wrongExamples)}}})}function validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,operations){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const duplicatedOperations=new Map;const allOperations=[];const addDuplicateToMap=(op,channelName,opName)=>{const operationId=op.operationId;if(!operationId)return;const operationPath=`${tilde(channelName)}/${opName}/operationId`;const isOperationIdDuplicated=allOperations.filter(v=>v[0]===operationId);if(!isOperationIdDuplicated.length)return allOperations.push([operationId,operationPath]);duplicatedOperations.set(operationPath,isOperationIdDuplicated[0][1])};chnlsMap.forEach((chnlObj,chnlName)=>{operations.forEach(opName=>{const op=chnlObj[String(opName)];if(op)addDuplicateToMap(op,chnlName,opName)})});if(duplicatedOperations.size){throw new ParserError({type:validationError,title:"operationId must be unique across all the operations.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("channels","is a duplicate of",duplicatedOperations,asyncapiYAMLorJSON,initialFormat)})}return true}function validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,specialSecTypes){const srvs=parsedJSON.servers;if(!srvs)return true;const root="servers";const srvsMap=new Map(Object.entries(srvs));const missingSecSchema=new Map,invalidSecurityValues=new Map;srvsMap.forEach((server,serverName)=>{const serverSecInfo=server.security;if(!serverSecInfo)return true;serverSecInfo.forEach(secObj=>{Object.keys(secObj).forEach(secName=>{const schema=findSecuritySchema(secName,parsedJSON.components);const srvrSecurityPath=`${serverName}/security/${secName}`;if(!schema.length)return missingSecSchema.set(srvrSecurityPath);const schemaType=schema[1];if(!isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName))invalidSecurityValues.set(srvrSecurityPath,schemaType)})})});if(missingSecSchema.size){throw new ParserError({type:validationError,title:"Server security name must correspond to a security scheme which is declared in the security schemes under the components object.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"doesn't have a corresponding security schema under the components object",missingSecSchema,asyncapiYAMLorJSON,initialFormat)})}if(invalidSecurityValues.size){throw new ParserError({type:validationError,title:"Server security value must be an empty array if corresponding security schema type is not oauth2 or openIdConnect.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"security info must have an empty array because its corresponding security schema type is",invalidSecurityValues,asyncapiYAMLorJSON,initialFormat)})}return true}function findSecuritySchema(securityName,components){const secSchemes=components&&components.securitySchemes;const secSchemesMap=secSchemes?new Map(Object.entries(secSchemes)):new Map;const schemaInfo=[];for(const[schemaName,schema]of secSchemesMap.entries()){if(schemaName===securityName){schemaInfo.push(schemaName,schema.type);return schemaInfo}}return schemaInfo}function isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName){if(!specialSecTypes.includes(schemaType)){const securityObjValue=secObj[String(secName)];return!securityObjValue.length}return true}function validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const notProvidedParams=new Map;const invalidChannelName=new Map;const unknownServers=new Map;chnlsMap.forEach((val,key)=>{const variables=parseUrlVariables(key);const notProvidedChannelParams=notProvidedParams.get(tilde(key));const queryParameters=parseUrlQueryParameters(key);const unknownServerNames=getUnknownServers(parsedJSON,val);if(variables){setNotProvidedParams(variables,val,key,notProvidedChannelParams,notProvidedParams)}if(queryParameters){invalidChannelName.set(tilde(key),queryParameters)}if(unknownServerNames.length>0){unknownServers.set(tilde(key),unknownServerNames)}});const parameterValidationErrors=groupValidationErrors("channels","channel does not have a corresponding parameter object for",notProvidedParams,asyncapiYAMLorJSON,initialFormat);const nameValidationErrors=groupValidationErrors("channels","channel contains invalid name with url query parameters",invalidChannelName,asyncapiYAMLorJSON,initialFormat);const serverValidationErrors=groupValidationErrors("channels","channel contains servers that are not on the servers list in the root of the document",unknownServers,asyncapiYAMLorJSON,initialFormat);const allValidationErrors=parameterValidationErrors.concat(nameValidationErrors).concat(serverValidationErrors);if(notProvidedParams.size||invalidChannelName.size||unknownServers.size){throw new ParserError({type:validationError,title:"Channel validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat){const invalidRoot=validateRootTags(parsedJSON);const invalidChannels=validateAllChannelsTags(parsedJSON);const invalidOperationTraits=validateOperationTraitTags(parsedJSON);const invalidMessages=validateMessageTags(parsedJSON);const invalidMessageTraits=validateMessageTraitsTags(parsedJSON);const errorMessage="contains duplicate tag names";let invalidRootValidationErrors=[];let invalidChannelsValidationErrors=[];let invalidOperationTraitsValidationErrors=[];let invalidMessagesValidationErrors=[];let invalidMessageTraitsValidationErrors=[];if(invalidRoot.size){invalidRootValidationErrors=groupValidationErrors(null,errorMessage,invalidRoot,asyncapiYAMLorJSON,initialFormat)}if(invalidChannels.size){invalidChannelsValidationErrors=groupValidationErrors("channels",errorMessage,invalidChannels,asyncapiYAMLorJSON,initialFormat)}if(invalidOperationTraits.size){invalidOperationTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidOperationTraits,asyncapiYAMLorJSON,initialFormat)}if(invalidMessages.size){invalidMessagesValidationErrors=groupValidationErrors("components",errorMessage,invalidMessages,asyncapiYAMLorJSON,initialFormat)}if(invalidMessageTraits.size){invalidMessageTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidMessageTraits,asyncapiYAMLorJSON,initialFormat)}const allValidationErrors=invalidRootValidationErrors.concat(invalidChannelsValidationErrors).concat(invalidOperationTraitsValidationErrors).concat(invalidMessagesValidationErrors).concat(invalidMessageTraitsValidationErrors);if(allValidationErrors.length){throw new ParserError({type:validationError,title:"Tags validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateRootTags(parsedJSON){const invalidRoot=new Map;const duplicateNames=parsedJSON.tags&&getDuplicateTagNames(parsedJSON.tags);if(duplicateNames&&duplicateNames.length){invalidRoot.set("tags",duplicateNames.toString())}return invalidRoot}function validateOperationTraitTags(parsedJSON){const invalidOperationTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.operationTraits){Object.keys(parsedJSON.components.operationTraits).forEach(operationTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.operationTraits[operationTrait].tags);if(duplicateNames&&duplicateNames.length){const operationTraitsPath=`operationTraits/${operationTrait}/tags`;invalidOperationTraits.set(operationTraitsPath,duplicateNames.toString())}})}return invalidOperationTraits}function validateAllChannelsTags(parsedJSON){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const invalidChannels=new Map;chnlsMap.forEach((channel,channelName)=>validateChannelTags(invalidChannels,channel,channelName));return invalidChannels}function validateChannelTags(invalidChannels,channel,channelName){if(channel.publish){validateOperationTags(invalidChannels,channel.publish,`${tilde(channelName)}/publish`)}if(channel.subscribe){validateOperationTags(invalidChannels,channel.subscribe,`${tilde(channelName)}/subscribe`)}}function validateOperationTags(invalidChannels,operation,operationPath){if(!operation)return;tryAddInvalidEntries(invalidChannels,`${operationPath}/tags`,operation.tags);if(operation.message){if(operation.message.oneOf){operation.message.oneOf.forEach((message,idx)=>{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/oneOf/${idx}/tags`,message.tags)})}else{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/tags`,operation.message.tags)}}}function tryAddInvalidEntries(invalidChannels,key,tags){const duplicateNames=tags&&getDuplicateTagNames(tags);if(duplicateNames&&duplicateNames.length){invalidChannels.set(key,duplicateNames.toString())}}function validateMessageTraitsTags(parsedJSON){const invalidMessageTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messageTraits){Object.keys(parsedJSON.components.messageTraits).forEach(messageTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messageTraits[messageTrait].tags);if(duplicateNames&&duplicateNames.length){const messageTraitsPath=`messageTraits/${messageTrait}/tags`;invalidMessageTraits.set(messageTraitsPath,duplicateNames.toString())}})}return invalidMessageTraits}function validateMessageTags(parsedJSON){const invalidMessages=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messages){Object.keys(parsedJSON.components.messages).forEach(message=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messages[message].tags);if(duplicateNames&&duplicateNames.length){const messagePath=`messages/${message}/tags`;invalidMessages.set(messagePath,duplicateNames.toString())}})}return invalidMessages}function getDuplicateTagNames(tags){if(!tags)return null;const tagNames=tags.map(item=>item.name);return tagNames.reduce((acc,item,idx,arr)=>{if(arr.indexOf(item)!==idx&&acc.indexOf(item)<0){acc.push(item)}return acc},[])}module.exports={validateServerVariables:validateServerVariables,validateOperationId:validateOperationId,validateServerSecurity:validateServerSecurity,validateChannels:validateChannels,validateTags:validateTags}},{"./errors/parser-error":6,"./models/operation":31,"./utils":42}],6:[function(require,module,exports){const ERROR_URL_PREFIX="https://github.com/asyncapi/parser-js/";const buildError=(from,to)=>{to.type=from.type.startsWith(ERROR_URL_PREFIX)?from.type:`${ERROR_URL_PREFIX}${from.type}`;to.title=from.title;if(from.detail)to.detail=from.detail;if(from.validationErrors)to.validationErrors=from.validationErrors;if(from.parsedJSON)to.parsedJSON=from.parsedJSON;if(from.location)to.location=from.location;if(from.refs)to.refs=from.refs;return to};class ParserError extends Error{constructor(def){super();buildError(def,this);this.message=def.title}toJS(){return buildError(this,{})}}module.exports=ParserError},{}],7:[function(require,module,exports){const parser=require("./parser");const defaultAsyncAPISchemaParser=require("./asyncapiSchemaFormatParser");parser.registerSchemaParser(defaultAsyncAPISchemaParser);module.exports=parser},{"./asyncapiSchemaFormatParser":2,"./parser":41}],8:[function(require,module,exports){const SchemaIteratorCallbackType=Object.freeze({NEW_SCHEMA:"NEW_SCHEMA",END_SCHEMA:"END_SCHEMA"});const SchemaTypesToIterate=Object.freeze({parameters:"parameters",payloads:"payloads",headers:"headers",components:"components",objects:"objects",arrays:"arrays",oneOfs:"oneOfs",allOfs:"allOfs",anyOfs:"anyOfs",nots:"nots",propertyNames:"propertyNames",patternProperties:"patternProperties",contains:"contains",ifs:"ifs",thenes:"thenes",elses:"elses",dependencies:"dependencies",definitions:"definitions"});function traverseSchema(schema,propOrIndex,options){if(!schema)return;const{callback,schemaTypesToIterate,seenSchemas}=options;const jsonSchema=schema.json();if(seenSchemas.has(jsonSchema))return;seenSchemas.add(jsonSchema);let types=schema.type()||[];if(!Array.isArray(types)){types=[types]}if(!schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object"))return;if(!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array"))return;if(callback(schema,propOrIndex,SchemaIteratorCallbackType.NEW_SCHEMA)===false)return;if(schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object")){recursiveSchemaObject(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array")){recursiveSchemaArray(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)){(schema.oneOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)){(schema.anyOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)){(schema.allOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.nots)&&schema.not()){traverseSchema(schema.not(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.ifs)&&schema.if()){traverseSchema(schema.if(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.thenes)&&schema.then()){traverseSchema(schema.then(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.elses)&&schema.else()){traverseSchema(schema.else(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)){Object.entries(schema.dependencies()||{}).forEach(([depName,dep])=>{if(dep&&!Array.isArray(dep)){traverseSchema(dep,depName,options)}})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)){Object.entries(schema.definitions()||{}).forEach(([defName,def])=>{traverseSchema(def,defName,options)})}callback(schema,propOrIndex,SchemaIteratorCallbackType.END_SCHEMA);seenSchemas.delete(jsonSchema)}function recursiveSchemaObject(schema,options){Object.entries(schema.properties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)});const additionalProperties=schema.additionalProperties();if(typeof additionalProperties==="object"){traverseSchema(additionalProperties,null,options)}const schemaTypesToIterate=options.schemaTypesToIterate;if(schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames)&&schema.propertyNames()){traverseSchema(schema.propertyNames(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)){Object.entries(schema.patternProperties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)})}}function recursiveSchemaArray(schema,options){const items=schema.items();if(items){if(Array.isArray(items)){items.forEach((item,idx)=>{traverseSchema(item,idx,options)})}else{traverseSchema(items,null,options)}}const additionalItems=schema.additionalItems();if(typeof additionalItems==="object"){traverseSchema(additionalItems,null,options)}if(options.schemaTypesToIterate.includes(SchemaTypesToIterate.contains)&&schema.contains()){traverseSchema(schema.contains(),null,options)}}function traverseAsyncApiDocument(doc,callback,schemaTypesToIterate){if(!schemaTypesToIterate){schemaTypesToIterate=Object.values(SchemaTypesToIterate)}const options={callback:callback,schemaTypesToIterate:schemaTypesToIterate,seenSchemas:new Set};if(doc.hasChannels()){Object.values(doc.channels()).forEach(channel=>{traverseChannel(channel,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.components)&&doc.hasComponents()){const components=doc.components();Object.values(components.messages()||{}).forEach(message=>{traverseMessage(message,options)});Object.values(components.schemas()||{}).forEach(schema=>{traverseSchema(schema,null,options)});if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(components.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}Object.values(components.messageTraits()||{}).forEach(messageTrait=>{traverseMessageTrait(messageTrait,options)})}}function traverseChannel(channel,options){if(!channel)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(channel.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}if(channel.hasPublish()){channel.publish().messages().forEach(message=>{traverseMessage(message,options)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(message=>{traverseMessage(message,options)})}}function traverseMessage(message,options){if(!message)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(message.headers(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)){traverseSchema(message.payload(),null,options)}}function traverseMessageTrait(messageTrait,options){if(!messageTrait)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(messageTrait.headers(),null,options)}}module.exports={SchemaIteratorCallbackType:SchemaIteratorCallbackType,SchemaTypesToIterate:SchemaTypesToIterate,traverseAsyncApiDocument:traverseAsyncApiDocument}},{}],9:[function(require,module,exports){module.exports=(txt,reviver,context=20)=>{try{return JSON.parse(txt,reviver)}catch(e){handleJsonNotString(txt);const syntaxErr=e.message.match(/^Unexpected token.*position\s+(\d+)/i);const errIdxBrokenJson=e.message.match(/^Unexpected end of JSON.*/i)?txt.length-1:null;const errIdx=syntaxErr?+syntaxErr[1]:errIdxBrokenJson;handleErrIdxNotNull(e,txt,errIdx,context);e.offset=errIdx;const lines=txt.substr(0,errIdx).split("\n");e.startLine=lines.length;e.startColumn=lines[lines.length-1].length;throw e}};function handleJsonNotString(txt){if(typeof txt!=="string"){const isEmptyArray=Array.isArray(txt)&&txt.length===0;const errorMessage=`Cannot parse ${isEmptyArray?"an empty array":String(txt)}`;throw new TypeError(errorMessage)}}function handleErrIdxNotNull(e,txt,errIdx,context){if(errIdx!==null){const start=errIdx<=context?0:errIdx-context;const end=errIdx+context>=txt.length?txt.length:errIdx+context;e.message+=` while parsing near '${start===0?"":"..."}${txt.slice(start,end)}${end===txt.length?"":"..."}'`}else{e.message+=` while parsing '${txt.slice(0,context*2)}'`}}},{}],10:[function(require,module,exports){const{getMapValueByKey}=require("../models/utils");const MixinBindings={hasBindings(){return!!(this._json.bindings&&Object.keys(this._json.bindings).length)},bindings(){return this.hasBindings()?this._json.bindings:{}},bindingProtocols(){return Object.keys(this.bindings())},hasBinding(name){return this.hasBindings()&&!!this._json.bindings[String(name)]},binding(name){return getMapValueByKey(this._json.bindings,name)}};module.exports=MixinBindings},{"../models/utils":40}],11:[function(require,module,exports){const{getMapValueByKey}=require("../models/utils");const MixinDescription={hasDescription(){return!!this._json.description},description(){return getMapValueByKey(this._json,"description")}};module.exports=MixinDescription},{"../models/utils":40}],12:[function(require,module,exports){const{getMapValueOfType}=require("../models/utils");const ExternalDocs=require("../models/external-docs");const MixinExternalDocs={hasExternalDocs(){return!!(this._json.externalDocs&&Object.keys(this._json.externalDocs).length)},externalDocs(){return getMapValueOfType(this._json,"externalDocs",ExternalDocs)}};module.exports=MixinExternalDocs},{"../models/external-docs":22,"../models/utils":40}],13:[function(require,module,exports){const MixinSpecificationExtensions={hasExtensions(){return!!this.extensionKeys().length},extensions(){const result={};Object.entries(this._json).forEach(([key,value])=>{if(/^x-[\w\d\.\-\_]+$/.test(key)){result[String(key)]=value}});return result},extensionKeys(){return Object.keys(this.extensions())},extKeys(){return this.extensionKeys()},hasExtension(key){if(!key.startsWith("x-")){return false}return!!this._json[String(key)]},extension(key){if(!key.startsWith("x-")){return null}return this._json[String(key)]},hasExt(key){return this.hasExtension(key)},ext(key){return this.extension(key)}};module.exports=MixinSpecificationExtensions},{}],14:[function(require,module,exports){const Tag=require("../models/tag");const MixinTags={hasTags(){return!!(Array.isArray(this._json.tags)&&this._json.tags.length)},tags(){return this.hasTags()?this._json.tags.map(t=>new Tag(t)):[]},tagNames(){return this.hasTags()?this._json.tags.map(t=>t.name):[]},hasTag(name){return this.hasTags()&&this._json.tags.some(t=>t.name===name)},tag(name){const tg=this.hasTags()&&this._json.tags.find(t=>t.name===name);return tg?new Tag(tg):null}};module.exports=MixinTags},{"../models/tag":39}],15:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Info=require("./info");const Server=require("./server");const Channel=require("./channel");const Components=require("./components");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinSpecificationExtensions=require("../mixins/specification-extensions");const{xParserSpecParsed,xParserSpecStringified,xParserCircle}=require("../constants");const{assignNameToAnonymousMessages,assignNameToComponentMessages,assignUidToComponentSchemas,assignUidToParameterSchemas,assignIdToAnonymousSchemas,assignUidToComponentParameterSchemas}=require("../anonymousNaming");const{traverseAsyncApiDocument}=require("../iterators");class AsyncAPIDocument extends Base{constructor(...args){super(...args);if(this.ext(xParserSpecParsed)===true){return}assignNameToComponentMessages(this);assignNameToAnonymousMessages(this);assignUidToComponentSchemas(this);assignUidToComponentParameterSchemas(this);assignUidToParameterSchemas(this);assignIdToAnonymousSchemas(this);this.json()[String(xParserSpecParsed)]=true}version(){return this._json.asyncapi}info(){return new Info(this._json.info)}id(){return this._json.id}hasServers(){return!!this._json.servers}servers(){return createMapOfType(this._json.servers,Server)}serverNames(){if(!this._json.servers)return[];return Object.keys(this._json.servers)}server(name){return getMapValueOfType(this._json.servers,name,Server)}hasDefaultContentType(){return!!this._json.defaultContentType}defaultContentType(){return this._json.defaultContentType||null}hasChannels(){return!!this._json.channels}channels(){return createMapOfType(this._json.channels,Channel,this)}channelNames(){if(!this._json.channels)return[];return Object.keys(this._json.channels)}channel(name){return getMapValueOfType(this._json.channels,name,Channel,this)}hasComponents(){return!!this._json.components}components(){if(!this._json.components)return null;return new Components(this._json.components)}hasMessages(){return!!this.allMessages().size}allMessages(){const messages=new Map;if(this.hasChannels()){this.channelNames().forEach(channelName=>{const channel=this.channel(channelName);if(channel.hasPublish()){channel.publish().messages().forEach(m=>{messages.set(m.uid(),m)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(m=>{messages.set(m.uid(),m)})}})}if(this.hasComponents()){Object.values(this.components().messages()).forEach(m=>{messages.set(m.uid(),m)})}return messages}allSchemas(){const schemas=new Map;const allSchemasCallback=schema=>{if(schema.uid()){schemas.set(schema.uid(),schema)}};traverseAsyncApiDocument(this,allSchemasCallback);return schemas}hasCircular(){return!!this._json[String(xParserCircle)]}traverseSchemas(callback,schemaTypesToIterate){traverseAsyncApiDocument(this,callback,schemaTypesToIterate)}static stringify(doc,space){const rawDoc=doc.json();const copiedDoc={...rawDoc};copiedDoc[String(xParserSpecStringified)]=true;return JSON.stringify(copiedDoc,refReplacer(),space)}static parse(doc){let parsedJSON=doc;if(typeof doc==="string"){parsedJSON=JSON.parse(doc)}else if(typeof doc==="object"){parsedJSON={...parsedJSON}}if(typeof parsedJSON!=="object"||!parsedJSON[String(xParserSpecParsed)]){throw new Error("Cannot parse invalid AsyncAPI document")}if(!parsedJSON[String(xParserSpecStringified)]){return new AsyncAPIDocument(parsedJSON)}delete parsedJSON[String(xParserSpecStringified)];const objToPath=new Map;const pathToObj=new Map;traverseStringifiedDoc(parsedJSON,undefined,parsedJSON,objToPath,pathToObj);return new AsyncAPIDocument(parsedJSON)}}function refReplacer(){const modelPaths=new Map;const paths=new Map;let init=null;return function(field,value){const pathPart=modelPaths.get(this)+(Array.isArray(this)?`[${field}]`:`.${field}`);const isComplex=value===Object(value);if(isComplex){modelPaths.set(value,pathPart)}const savedPath=paths.get(value)||"";if(!savedPath&&isComplex){const valuePath=pathPart.replace(/undefined\.\.?/,"");paths.set(value,valuePath)}const prefixPath=savedPath[0]==="["?"$":"$.";let val=savedPath?`$ref:${prefixPath}${savedPath}`:value;if(init===null){init=value}else if(val===init){val="$ref:$"}return val}}function traverseStringifiedDoc(parent,field,root,objToPath,pathToObj){let objOrPath=parent;let path="$ref:$";if(field!==undefined){objOrPath=parent[String(field)];const concatenatedPath=field?`.${field}`:"";path=objToPath.get(parent)+(Array.isArray(parent)?`[${field}]`:concatenatedPath)}objToPath.set(objOrPath,path);pathToObj.set(path,objOrPath);const ref=pathToObj.get(objOrPath);if(ref){parent[String(field)]=ref}if(objOrPath==="$ref:$"||ref==="$ref:$"){parent[String(field)]=root}if(objOrPath===Object(objOrPath)){for(const f in objOrPath){traverseStringifiedDoc(objOrPath,f,root,objToPath,pathToObj)}}}module.exports=mix(AsyncAPIDocument,MixinTags,MixinExternalDocs,MixinSpecificationExtensions)},{"../anonymousNaming":1,"../constants":4,"../iterators":8,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./channel":18,"./components":19,"./info":23,"./server":37,"./utils":40}],16:[function(require,module,exports){const ParserError=require("../errors/parser-error");class Base{constructor(json){if(json===undefined||json===null)throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`);this._json=json}json(key){if(key===undefined)return this._json;if(!this._json)return;return this._json[String(key)]}}module.exports=Base},{"../errors/parser-error":6}],17:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ChannelParameter extends Base{location(){return this._json.location}schema(){if(!this._json.schema)return null;return new Schema(this._json.schema)}}module.exports=mix(ChannelParameter,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./schema":33,"./utils":40}],18:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const ChannelParameter=require("./channel-parameter");const PublishOperation=require("./publish-operation");const SubscribeOperation=require("./subscribe-operation");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Channel extends Base{parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}hasParameters(){return!!this._json.parameters}hasServers(){return!!this._json.servers}servers(){if(!this._json.servers)return[];return this._json.servers}server(index){if(!this._json.servers)return null;if(typeof index!=="number")return null;if(index>this._json.servers.length-1)return null;return this._json.servers[+index]}publish(){if(!this._json.publish)return null;return new PublishOperation(this._json.publish)}subscribe(){if(!this._json.subscribe)return null;return new SubscribeOperation(this._json.subscribe)}hasPublish(){return!!this._json.publish}hasSubscribe(){return!!this._json.subscribe}}module.exports=mix(Channel,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./channel-parameter":17,"./publish-operation":32,"./subscribe-operation":38,"./utils":40}],19:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Channel=require("./channel");const Message=require("./message");const Schema=require("./schema");const SecurityScheme=require("./security-scheme");const Server=require("./server");const ChannelParameter=require("./channel-parameter");const CorrelationId=require("./correlation-id");const OperationTrait=require("./operation-trait");const MessageTrait=require("./message-trait");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Components extends Base{channels(){return createMapOfType(this._json.channels,Channel)}hasChannels(){return!!this._json.channels}channel(name){return getMapValueOfType(this._json.channels,name,Channel)}messages(){return createMapOfType(this._json.messages,Message)}hasMessages(){return!!this._json.messages}message(name){return getMapValueOfType(this._json.messages,name,Message)}schemas(){return createMapOfType(this._json.schemas,Schema)}hasSchemas(){return!!this._json.schemas}schema(name){return getMapValueOfType(this._json.schemas,name,Schema)}securitySchemes(){return createMapOfType(this._json.securitySchemes,SecurityScheme)}hasSecuritySchemes(){return!!this._json.securitySchemes}securityScheme(name){return getMapValueOfType(this._json.securitySchemes,name,SecurityScheme)}servers(){return createMapOfType(this._json.servers,Server)}hasServers(){return!!this._json.servers}server(name){return getMapValueOfType(this._json.servers,name,Server)}parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}hasParameters(){return!!this._json.parameters}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}correlationIds(){return createMapOfType(this._json.correlationIds,CorrelationId)}hasCorrelationIds(){return!!this._json.correlationIds}correlationId(name){return getMapValueOfType(this._json.correlationIds,name,CorrelationId)}operationTraits(){return createMapOfType(this._json.operationTraits,OperationTrait)}hasOperationTraits(){return!!this._json.operationTraits}operationTrait(name){return getMapValueOfType(this._json.operationTraits,name,OperationTrait)}messageTraits(){return createMapOfType(this._json.messageTraits,MessageTrait)}hasMessageTraits(){return!!this._json.messageTraits}messageTrait(name){return getMapValueOfType(this._json.messageTraits,name,MessageTrait)}}module.exports=mix(Components,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./channel":18,"./channel-parameter":17,"./correlation-id":21,"./message":27,"./message-trait":25,"./operation-trait":29,"./schema":33,"./security-scheme":34,"./server":37,"./utils":40}],20:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Contact extends Base{name(){return this._json.name}url(){return this._json.url}email(){return this._json.email}}module.exports=mix(Contact,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],21:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class CorrelationId extends Base{location(){return this._json.location}}module.exports=mix(CorrelationId,MixinSpecificationExtensions,MixinDescription)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],22:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ExternalDocs extends Base{url(){return this._json.url}}module.exports=mix(ExternalDocs,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],23:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const License=require("./license");const Contact=require("./contact");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Info extends Base{title(){return this._json.title}version(){return this._json.version}termsOfService(){return this._json.termsOfService}license(){if(!this._json.license)return null;return new License(this._json.license)}contact(){if(!this._json.contact)return null;return new Contact(this._json.contact)}}module.exports=mix(Info,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./contact":20,"./license":24,"./utils":40}],24:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class License extends Base{name(){return this._json.name}url(){return this._json.url}}module.exports=mix(License,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],25:[function(require,module,exports){const MessageTraitable=require("./message-traitable");class MessageTrait extends MessageTraitable{}module.exports=MessageTrait},{"./message-traitable":26}],26:[function(require,module,exports){const{getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const CorrelationId=require("./correlation-id");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class MessageTraitable extends Base{headers(){if(!this._json.headers)return null;return new Schema(this._json.headers)}header(name){if(!this._json.headers)return null;return getMapValueOfType(this._json.headers.properties,name,Schema)}correlationId(){if(!this._json.correlationId)return null;return new CorrelationId(this._json.correlationId)}schemaFormat(){return this._json.schemaFormat}contentType(){return this._json.contentType}name(){return this._json.name}title(){return this._json.title}summary(){return this._json.summary}examples(){return this._json.examples}}module.exports=mix(MessageTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./correlation-id":21,"./schema":33,"./utils":40}],27:[function(require,module,exports){(function(Buffer){const MessageTrait=require("./message-trait");const MessageTraitable=require("./message-traitable");const Schema=require("./schema");class Message extends MessageTraitable{uid(){return this.name()||this.ext("x-parser-message-name")||Buffer.from(JSON.stringify(this._json)).toString("base64")}payload(){if(!this._json.payload)return null;return new Schema(this._json.payload)}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new MessageTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}originalPayload(){return this._json["x-parser-original-payload"]||this.payload()}originalSchemaFormat(){return this._json["x-parser-original-schema-format"]||this.schemaFormat()}}module.exports=Message}).call(this,require("buffer").Buffer)},{"./message-trait":25,"./message-traitable":26,"./schema":33,buffer:128}],28:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OAuthFlow extends Base{authorizationUrl(){return this._json.authorizationUrl}tokenUrl(){return this._json.tokenUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}}module.exports=mix(OAuthFlow,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],29:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");class OperationTrait extends OperationTraitable{}module.exports=OperationTrait},{"./operation-traitable":30}],30:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinTags=require("../mixins/tags");const MixinExternalDocs=require("../mixins/external-docs");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OperationTraitable extends Base{id(){return this._json.operationId}summary(){return this._json.summary}}module.exports=mix(OperationTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./utils":40}],31:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");const Message=require("./message");const OperationTrait=require("./operation-trait");class Operation extends OperationTraitable{hasMultipleMessages(){if(this._json.message&&this._json.message.oneOf&&this._json.message.oneOf.length>1)return true;if(!this._json.message)return false;return false}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new OperationTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}messages(){if(!this._json.message)return[];if(this._json.message.oneOf)return this._json.message.oneOf.map(m=>new Message(m));return[new Message(this._json.message)]}message(index){if(!this._json.message)return null;if(!this._json.message.oneOf)return new Message(this._json.message);if(typeof index!=="number")return null;if(index>this._json.message.oneOf.length-1)return null;return new Message(this._json.message.oneOf[+index])}}module.exports=Operation},{"./message":27,"./operation-trait":29,"./operation-traitable":30}],32:[function(require,module,exports){const Operation=require("./operation");class PublishOperation extends Operation{isPublish(){return true}isSubscribe(){return false}kind(){return"publish"}}module.exports=PublishOperation},{"./operation":31}],33:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const{xParserCircle,xParserCircleProps}=require("../constants");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Schema extends Base{constructor(json,options){super(json);this.options=options||{}}uid(){return this.$id()||this.ext("x-parser-schema-id")}$id(){return this._json.$id}multipleOf(){return this._json.multipleOf}maximum(){return this._json.maximum}exclusiveMaximum(){return this._json.exclusiveMaximum}minimum(){return this._json.minimum}exclusiveMinimum(){return this._json.exclusiveMinimum}maxLength(){return this._json.maxLength}minLength(){return this._json.minLength}pattern(){return this._json.pattern}maxItems(){return this._json.maxItems}minItems(){return this._json.minItems}uniqueItems(){return!!this._json.uniqueItems}maxProperties(){return this._json.maxProperties}minProperties(){return this._json.minProperties}required(){return this._json.required}enum(){return this._json.enum}type(){return this._json.type}allOf(){if(!this._json.allOf)return null;return this._json.allOf.map(s=>new Schema(s,{parent:this}))}oneOf(){if(!this._json.oneOf)return null;return this._json.oneOf.map(s=>new Schema(s,{parent:this}))}anyOf(){if(!this._json.anyOf)return null;return this._json.anyOf.map(s=>new Schema(s,{parent:this}))}not(){if(!this._json.not)return null;return new Schema(this._json.not,{parent:this})}items(){if(!this._json.items)return null;if(Array.isArray(this._json.items)){return this._json.items.map(s=>new Schema(s,{parent:this}))}return new Schema(this._json.items,{parent:this})}properties(){return createMapOfType(this._json.properties,Schema,{parent:this})}property(name){return getMapValueOfType(this._json.properties,name,Schema,{parent:this})}additionalProperties(){const ap=this._json.additionalProperties;if(ap===undefined||ap===null)return;if(typeof ap==="boolean")return ap;return new Schema(ap,{parent:this})}additionalItems(){const ai=this._json.additionalItems;if(ai===undefined||ai===null)return;return new Schema(ai,{parent:this})}patternProperties(){return createMapOfType(this._json.patternProperties,Schema,{parent:this})}const(){return this._json.const}contains(){if(!this._json.contains)return null;return new Schema(this._json.contains,{parent:this})}dependencies(){if(!this._json.dependencies)return null;const result={};Object.entries(this._json.dependencies).forEach(([key,value])=>{result[String(key)]=!Array.isArray(value)?new Schema(value,{parent:this}):value});return result}propertyNames(){if(!this._json.propertyNames)return null;return new Schema(this._json.propertyNames,{parent:this})}if(){if(!this._json.if)return null;return new Schema(this._json.if,{parent:this})}then(){if(!this._json.then)return null;return new Schema(this._json.then,{parent:this})}else(){if(!this._json.else)return null;return new Schema(this._json.else,{parent:this})}format(){return this._json.format}contentEncoding(){return this._json.contentEncoding}contentMediaType(){return this._json.contentMediaType}definitions(){return createMapOfType(this._json.definitions,Schema,{parent:this})}title(){return this._json.title}default(){return this._json.default}deprecated(){return this._json.deprecated}discriminator(){return this._json.discriminator}readOnly(){return!!this._json.readOnly}writeOnly(){return!!this._json.writeOnly}examples(){return this._json.examples}isBooleanSchema(){return typeof this._json==="boolean"}isCircular(){if(!!this.ext(xParserCircle)){return true}let parent=this.options.parent;while(parent){if(parent._json===this._json)return true;parent=parent.options&&parent.options.parent}return false}circularSchema(){let parent=this.options.parent;while(parent){if(parent._json===this._json)return parent;parent=parent.options&&parent.options.parent}}hasCircularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps).length>0}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean).length>0}circularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps)}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean)}}module.exports=mix(Schema,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../constants":4,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],34:[function(require,module,exports){const{createMapOfType,mix}=require("./utils");const Base=require("./base");const OAuthFlow=require("./oauth-flow");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class SecurityScheme extends Base{type(){return this._json.type}name(){return this._json.name}in(){return this._json.in}scheme(){return this._json.scheme}bearerFormat(){return this._json.bearerFormat}openIdConnectUrl(){return this._json.openIdConnectUrl}flows(){return createMapOfType(this._json.flows,OAuthFlow)}}module.exports=mix(SecurityScheme,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./oauth-flow":28,"./utils":40}],35:[function(require,module,exports){const Base=require("./base");class ServerSecurityRequirement extends Base{}module.exports=ServerSecurityRequirement},{"./base":16}],36:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ServerVariable extends Base{allowedValues(){return this._json.enum}allows(name){if(this._json.enum===undefined)return true;return this._json.enum.includes(name)}hasAllowedValues(){return this._json.enum!==undefined}defaultValue(){return this._json.default}hasDefaultValue(){return this._json.default!==undefined}examples(){return this._json.examples}}module.exports=mix(ServerVariable,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],37:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const ServerVariable=require("./server-variable");const ServerSecurityRequirement=require("./server-security-requirement");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Server extends Base{url(){return this._json.url}protocol(){return this._json.protocol}protocolVersion(){return this._json.protocolVersion}variables(){return createMapOfType(this._json.variables,ServerVariable)}variable(name){return getMapValueOfType(this._json.variables,name,ServerVariable)}hasVariables(){return!!this._json.variables}security(){if(!this._json.security)return null;return this._json.security.map(sec=>new ServerSecurityRequirement(sec))}}module.exports=mix(Server,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./server-security-requirement":35,"./server-variable":36,"./utils":40}],38:[function(require,module,exports){const Operation=require("./operation");class SubscribeOperation extends Operation{isPublish(){return false}isSubscribe(){return true}kind(){return"subscribe"}}module.exports=SubscribeOperation},{"./operation":31}],39:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Tag extends Base{name(){return this._json.name}}module.exports=mix(Tag,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],40:[function(require,module,exports){const utils=module.exports;const getMapValue=(obj,key,Type,options)=>{if(typeof key!=="string"||!obj)return null;const v=obj[String(key)];if(v===undefined)return null;return Type?new Type(v,options):v};utils.createMapOfType=(obj,Type,options)=>{const result={};if(!obj)return result;Object.entries(obj).forEach(([key,value])=>{result[String(key)]=new Type(value,options)});return result};utils.getMapValueOfType=(obj,key,Type,options)=>{return getMapValue(obj,key,Type,options)};utils.getMapValueByKey=(obj,key)=>{return getMapValue(obj,key)};utils.mix=(model,...mixins)=>{let duplicatedMethods=false;function checkDuplication(mixin){if(model===mixin)return true;duplicatedMethods=Object.keys(mixin).some(mixinMethod=>model.prototype.hasOwnProperty(mixinMethod));return duplicatedMethods}if(mixins.some(checkDuplication)){if(duplicatedMethods){throw new Error(`invalid mix function: model ${model.name} has at least one method that it is trying to replace by mixin`)}else{throw new Error(`invalid mix function: cannot use the model ${model.name} as a mixin`)}}mixins.forEach(mixin=>Object.assign(model.prototype,mixin));return model}},{}],41:[function(require,module,exports){(function(process,global){const path=require("path");const fetch=typeof window!=="undefined"?window["fetch"]:typeof global!=="undefined"?global["fetch"]:null;const Ajv=require("ajv");const asyncapi=require("@asyncapi/specs");const $RefParser=require("@apidevtools/json-schema-ref-parser");const mergePatch=require("tiny-merge-patch").apply;const ParserError=require("./errors/parser-error");const{validateChannels,validateTags,validateServerVariables,validateOperationId,validateServerSecurity}=require("./customValidators.js");const{toJS,findRefs,getLocationOf,improveAjvErrors,getDefaultSchemaFormat}=require("./utils");const AsyncAPIDocument=require("./models/asyncapi");const OPERATIONS=["publish","subscribe"];const SPECIAL_SECURITY_TYPES=["oauth2","openIdConnect"];const PARSERS={};const xParserCircle="x-parser-circular";const xParserMessageParsed="x-parser-message-parsed";const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,parseFromUrl:parseFromUrl,registerSchemaParser:registerSchemaParser,ParserError:ParserError,AsyncAPIDocument:AsyncAPIDocument};async function parse(asyncapiYAMLorJSON,options={}){let parsedJSON;let initialFormat;options.path=options.path||`${process.cwd()}${path.sep}`;try{({initialFormat:initialFormat,parsedJSON:parsedJSON}=toJS(asyncapiYAMLorJSON));if(typeof parsedJSON!=="object"){throw new ParserError({type:"impossible-to-convert-to-json",title:"Could not convert AsyncAPI to JSON.",detail:"Most probably the AsyncAPI document contains invalid YAML or YAML features not supported in JSON."})}if(!parsedJSON.asyncapi){throw new ParserError({type:"missing-asyncapi-field",title:"The `asyncapi` field is missing.",parsedJSON:parsedJSON})}if(parsedJSON.asyncapi.startsWith("1.")||!asyncapi[parsedJSON.asyncapi]){throw new ParserError({type:"unsupported-version",title:`Version ${parsedJSON.asyncapi} is not supported.`,detail:"Please use latest version of the specification.",parsedJSON:parsedJSON,validationErrors:[getLocationOf("/asyncapi",asyncapiYAMLorJSON,initialFormat)]})}if(options.applyTraits===undefined)options.applyTraits=true;const refParser=new $RefParser;await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:"ignore"}});const validate=getValidator(parsedJSON.asyncapi);const valid=validate(parsedJSON);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"validation-errors",title:"There were errors validating the AsyncAPI document.",parsedJSON:parsedJSON,validationErrors:improveAjvErrors(errors,asyncapiYAMLorJSON,initialFormat)});await customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);if(refParser.$refs.circular)await handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options)}catch(e){if(e instanceof ParserError)throw e;throw new ParserError({type:"unexpected-error",title:e.message,parsedJSON:parsedJSON})}return new AsyncAPIDocument(parsedJSON)}function parseFromUrl(url,fetchOptions,options){if(!fetchOptions)fetchOptions={};return new Promise((resolve,reject)=>{fetch(url,fetchOptions).then(res=>res.text()).then(doc=>parse(doc,options)).then(result=>resolve(result)).catch(e=>{if(e instanceof ParserError)return reject(e);return reject(new ParserError({type:"fetch-url-error",title:e.message}))})})}async function dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){try{return await refParser.dereference(options.path,parsedJSON,{continueOnError:true,parse:options.parse,resolve:options.resolve,dereference:options.dereference})}catch(err){throw new ParserError({type:"dereference-error",title:err.errors[0].message,parsedJSON:parsedJSON,refs:findRefs(err.errors,initialFormat,asyncapiYAMLorJSON)})}}async function handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:true}});parsedJSON[String(xParserCircle)]=true}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(asyncapi[String(version)],version);validate=ajv.getSchema(version)}return validate}async function customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,SPECIAL_SECURITY_TYPES);if(!parsedJSON.channels)return;validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,OPERATIONS);await customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);await customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options)}async function validateAndConvertMessage(msg,originalAsyncAPIDocument,fileFormat,parsedAsyncAPIDocument,pathToPayload){if(xParserMessageParsed in msg&&msg[String(xParserMessageParsed)]===true)return;const defaultSchemaFormat=getDefaultSchemaFormat(parsedAsyncAPIDocument.asyncapi);const schemaFormat=msg.schemaFormat||defaultSchemaFormat;await PARSERS[String(schemaFormat)]({schemaFormat:schemaFormat,message:msg,defaultSchemaFormat:defaultSchemaFormat,originalAsyncAPIDocument:originalAsyncAPIDocument,parsedAsyncAPIDocument:parsedAsyncAPIDocument,fileFormat:fileFormat,pathToPayload:pathToPayload});msg.schemaFormat=defaultSchemaFormat;msg[String(xParserMessageParsed)]=true}function registerSchemaParser(parserModule){if(typeof parserModule!=="object"||typeof parserModule.parse!=="function"||typeof parserModule.getMimeTypes!=="function")throw new ParserError({type:"impossible-to-register-parser",title:"parserModule must have parse() and getMimeTypes() functions."});parserModule.getMimeTypes().forEach(schemaFormat=>{PARSERS[String(schemaFormat)]=parserModule.parse})}function applyTraits(js){if(Array.isArray(js.traits)){for(const trait of js.traits){for(const key in trait){js[String(key)]=mergePatch(js[String(key)],trait[String(key)])}}js["x-parser-original-traits"]=js.traits;delete js.traits}}async function customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){const promisesArray=[];Object.entries(parsedJSON.channels).forEach(([channelName,channel])=>{promisesArray.push(...OPERATIONS.map(async opName=>{const op=channel[String(opName)];if(!op)return;const messages=op.message?op.message.oneOf||[op.message]:[];if(options.applyTraits){applyTraits(op);messages.forEach(m=>applyTraits(m))}const pathToPayload=`/channels/${channelName}/${opName}/message/payload`;for(const m of messages){await validateAndConvertMessage(m,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload)}}))});await Promise.all(promisesArray)}async function customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){if(!parsedJSON.components||!parsedJSON.components.messages)return;const promisesArray=[];Object.entries(parsedJSON.components.messages).forEach(([messageName,message])=>{if(options.applyTraits){applyTraits(message)}const pathToPayload=`/components/messages/${messageName}/payload`;promisesArray.push(validateAndConvertMessage(message,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload))});await Promise.all(promisesArray)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./customValidators.js":5,"./errors/parser-error":6,"./models/asyncapi":15,"./utils":42,"@apidevtools/json-schema-ref-parser":45,"@asyncapi/specs":62,_process:172,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,path:171,"tiny-merge-patch":197}],42:[function(require,module,exports){const YAML=require("js-yaml");const{yamlAST,loc}=require("@fmvilas/pseudo-yaml-ast");const jsonAST=require("json-to-ast");const jsonParseBetterErrors=require("../lib/json-parse");const ParserError=require("./errors/parser-error");const jsonPointerToArray=jsonPointer=>(jsonPointer||"/").split("/").splice(1);const utils=module.exports;const getAST=(asyncapiYAMLorJSON,initialFormat)=>{if(initialFormat==="yaml"){return yamlAST(asyncapiYAMLorJSON)}else if(initialFormat==="json"){return jsonAST(asyncapiYAMLorJSON)}};const findNode=(obj,location)=>{for(const key of location){obj=obj?obj[utils.untilde(key)]:null}return obj};const findNodeInAST=(ast,location)=>{let obj=ast;for(const key of location){if(!Array.isArray(obj.children))return;let childArray;const child=obj.children.find(c=>{if(!c)return;if(c.type==="Object")return childArray=c.children.find(a=>a.key.value===utils.untilde(key));return c.type==="Property"&&c.key&&c.key.value===utils.untilde(key)});if(!child)return;obj=childArray?childArray.value:child.value}return obj};const findLocationOf=(keys,ast,initialFormat)=>{if(initialFormat==="js")return{jsonPointer:`/${keys.join("/")}`};let node;if(initialFormat==="yaml"){node=findNode(ast,keys)}else if(initialFormat==="json"){node=findNodeInAST(ast,keys)}if(!node)return{jsonPointer:`/${keys.join("/")}`};let info;if(initialFormat==="yaml"){info=node[loc]}else if(initialFormat==="json"){info=node.loc}if(!info)return{jsonPointer:`/${keys.join("/")}`};return{jsonPointer:`/${keys.join("/")}`,startLine:info.start.line,startColumn:info.start.column+1,startOffset:info.start.offset,endLine:info.end?info.end.line:undefined,endColumn:info.end?info.end.column+1:undefined,endOffset:info.end?info.end.offset:undefined}};utils.tilde=str=>{return str.replace(/[~\/]{1}/g,m=>{switch(m){case"/":return"~1";case"~":return"~0"}return m})};utils.untilde=str=>{if(!str.includes("~"))return str;return str.replace(/~[01]/g,m=>{switch(m){case"~1":return"/";case"~0":return"~"}return m})};utils.toJS=asyncapiYAMLorJSON=>{if(!asyncapiYAMLorJSON){throw new ParserError({type:"null-or-falsey-document",title:"Document can't be null or falsey."})}if(asyncapiYAMLorJSON.constructor&&asyncapiYAMLorJSON.constructor.name==="Object"){return{initialFormat:"js",parsedJSON:asyncapiYAMLorJSON}}if(typeof asyncapiYAMLorJSON!=="string"){throw new ParserError({type:"invalid-document-type",title:"The AsyncAPI document has to be either a string or a JS object."})}if(asyncapiYAMLorJSON.trimLeft().startsWith("{")){try{return{initialFormat:"json",parsedJSON:jsonParseBetterErrors(asyncapiYAMLorJSON)}}catch(e){throw new ParserError({type:"invalid-json",title:"The provided JSON is not valid.",detail:e.message,location:{startOffset:e.offset,startLine:e.startLine,startColumn:e.startColumn}})}}else{try{return{initialFormat:"yaml",parsedJSON:YAML.safeLoad(asyncapiYAMLorJSON)}}catch(err){throw new ParserError({type:"invalid-yaml",title:"The provided YAML is not valid.",detail:err.message,location:{startOffset:err.mark.position,startLine:err.mark.line+1,startColumn:err.mark.column+1}})}}};utils.findRefs=(errors,initialFormat,asyncapiYAMLorJSON)=>{let refs=[];errors.map(({path})=>refs.push({location:[...path.map(utils.tilde),"$ref"]}));if(initialFormat==="js"){return refs.map(ref=>({jsonPointer:`/${ref.location.join("/")}`}))}if(initialFormat==="yaml"){const pseudoAST=yamlAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,pseudoAST,initialFormat))}else if(initialFormat==="json"){const ast=jsonAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,ast,initialFormat))}return refs};utils.getLocationOf=(jsonPointer,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);if(!ast)return{jsonPointer:jsonPointer};return findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat)};utils.improveAjvErrors=(errors,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);return errors.map(error=>{const defaultLocation={jsonPointer:error.dataPath||"/"};const additionalProperty=error.params.additionalProperty;const jsonPointer=additionalProperty?`${error.dataPath}/${additionalProperty}`:error.dataPath;return{title:`${error.dataPath||"/"} ${error.message}`,location:ast?findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat):defaultLocation}})};utils.parseUrlVariables=str=>{if(typeof str!=="string")return;return str.match(/{(.+?)}/g)};utils.parseUrlQueryParameters=str=>{if(typeof str!=="string")return;return str.match(/\?((.*=.*)(&?))/g)};utils.getMissingProps=(arr,obj)=>{arr=arr.map(val=>val.replace(/[{}]/g,""));if(!obj)return arr;return arr.filter(val=>{return!obj.hasOwnProperty(val)})};utils.groupValidationErrors=(root,errorMessage,errorElements,asyncapiYAMLorJSON,initialFormat)=>{const errors=[];errorElements.forEach((val,key)=>{if(typeof val==="string")val=utils.untilde(val);const jsonPointer=root?`/${root}/${key}`:`/${key}`;errors.push({title:val?`${utils.untilde(key)} ${errorMessage}: ${val}`:`${utils.untilde(key)} ${errorMessage}`,location:utils.getLocationOf(jsonPointer,asyncapiYAMLorJSON,initialFormat)})});return errors};utils.setNotProvidedParams=(variables,val,key,notProvidedChannelParams,notProvidedParams)=>{const missingChannelParams=utils.getMissingProps(variables,val.parameters);if(missingChannelParams.length){notProvidedParams.set(utils.tilde(key),notProvidedChannelParams?notProvidedChannelParams.concat(missingChannelParams):missingChannelParams)}};utils.getUnknownServers=(parsedJSON,channel)=>{if(!channel)return[];const channelServers=channel.servers;if(!channelServers||channelServers.length===0)return[];const servers=parsedJSON.servers;if(!servers)return channelServers;const serversMap=new Map(Object.entries(servers));return channelServers.filter(serverName=>{return!serversMap.has(serverName)})};utils.getDefaultSchemaFormat=asyncapiVersion=>{return`application/vnd.aai.asyncapi;version=${asyncapiVersion}`}},{"../lib/json-parse":9,"./errors/parser-error":6,"@fmvilas/pseudo-yaml-ast":72,"js-yaml":138,"json-to-ast":169}],43:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const url=require("./util/url");module.exports=bundle;function bundle(parser,options){let inventory=[];crawl(parser,"schema",parser.$refs._root$Ref.path+"#","#",0,inventory,parser.$refs,options);remap(inventory)}function crawl(parent,key,path,pathFromRoot,indirections,inventory,$refs,options){let obj=key===null?parent:parent[key];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isAllowed$Ref(obj)){inventory$Ref(parent,key,path,pathFromRoot,indirections,inventory,$refs,options)}else{let keys=Object.keys(obj).sort((a,b)=>{if(a==="definitions"){return-1}else if(b==="definitions"){return 1}else{return a.length-b.length}});for(let key of keys){let keyPath=Pointer.join(path,key);let keyPathFromRoot=Pointer.join(pathFromRoot,key);let value=obj[key];if($Ref.isAllowed$Ref(value)){inventory$Ref(obj,key,path,keyPathFromRoot,indirections,inventory,$refs,options)}else{crawl(obj,key,keyPath,keyPathFromRoot,indirections,inventory,$refs,options)}}}}}function inventory$Ref($refParent,$refKey,path,pathFromRoot,indirections,inventory,$refs,options){let $ref=$refKey===null?$refParent:$refParent[$refKey];let $refPath=url.resolve(path,$ref.$ref);let pointer=$refs._resolve($refPath,pathFromRoot,options);if(pointer===null){return}let depth=Pointer.parse(pathFromRoot).length;let file=url.stripHash(pointer.path);let hash=url.getHash(pointer.path);let external=file!==$refs._root$Ref.path;let extended=$Ref.isExtended$Ref($ref);indirections+=pointer.indirections;let existingEntry=findInInventory(inventory,$refParent,$refKey);if(existingEntry){if(depth{if(a.file!==b.file){return a.file0){throw new JSONParserErrorGroup(parser)}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./bundle":43,"./dereference":44,"./normalize-args":46,"./parse":48,"./refs":55,"./resolve-external":56,"./util/errors":59,"./util/url":61,"@jsdevtools/ono":75,"call-me-maybe":130}],46:[function(require,module,exports){"use strict";const Options=require("./options");module.exports=normalizeArgs;function normalizeArgs(args){let path,schema,options,callback;args=Array.prototype.slice.call(args);if(typeof args[args.length-1]==="function"){callback=args.pop()}if(typeof args[0]==="string"){path=args[0];if(typeof args[2]==="object"){schema=args[1];options=args[2]}else{schema=undefined;options=args[1]}}else{path="";schema=args[0];options=args[1]}if(!(options instanceof Options)){options=new Options(options)}return{path:path,schema:schema,options:options,callback:callback}}},{"./options":47}],47:[function(require,module,exports){"use strict";const jsonParser=require("./parsers/json");const yamlParser=require("./parsers/yaml");const textParser=require("./parsers/text");const binaryParser=require("./parsers/binary");const fileResolver=require("./resolvers/file");const httpResolver=require("./resolvers/http");module.exports=$RefParserOptions;function $RefParserOptions(options){merge(this,$RefParserOptions.defaults);merge(this,options)}$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:true},continueOnError:false,dereference:{circular:true}};function merge(target,source){if(isMergeable(source)){let keys=Object.keys(source);for(let i=0;i{let resolvers=plugins.all(options.resolve);resolvers=plugins.filter(resolvers,"canRead",file);plugins.sort(resolvers);plugins.run(resolvers,"read",file,$refs).then(resolve,onError);function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedResolverError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to resolve $ref pointer "${file.url}"`))}else if(err.error instanceof ResolverError){reject(err.error)}else{reject(new ResolverError(err,file.url))}}})}function parseFile(file,options,$refs){return new Promise((resolve,reject)=>{let allParsers=plugins.all(options.parse);let filteredParsers=plugins.filter(allParsers,"canParse",file);let parsers=filteredParsers.length>0?filteredParsers:allParsers;plugins.sort(parsers);plugins.run(parsers,"parse",file,$refs).then(onParsed,onError);function onParsed(parser){if(!parser.plugin.allowEmpty&&isEmpty(parser.result)){reject(ono.syntax(`Error parsing "${file.url}" as ${parser.plugin.name}. \nParsed value is empty`))}else{resolve(parser)}}function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedParserError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to parse ${file.url}`))}else if(err.error instanceof ParserError){reject(err.error)}else{reject(new ParserError(err.error.message,file.url))}}})}function isEmpty(value){return value===undefined||typeof value==="object"&&Object.keys(value).length===0||typeof value==="string"&&value.trim().length===0||Buffer.isBuffer(value)&&value.length===0}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./util/errors":59,"./util/plugins":60,"./util/url":61,"@jsdevtools/ono":75}],49:[function(require,module,exports){(function(Buffer){"use strict";let BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:true,canParse(file){return Buffer.isBuffer(file.data)&&BINARY_REGEXP.test(file.url)},parse(file){if(Buffer.isBuffer(file.data)){return file.data}else{return Buffer.from(file.data)}}}}).call(this,require("buffer").Buffer)},{buffer:128}],50:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");module.exports={order:100,allowEmpty:true,canParse:".json",async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){if(data.trim().length===0){return}else{try{return JSON.parse(data)}catch(e){throw new ParserError(e.message,file.url)}}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],51:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");let TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:true,encoding:"utf8",canParse(file){return(typeof file.data==="string"||Buffer.isBuffer(file.data))&&TEXT_REGEXP.test(file.url)},parse(file){if(typeof file.data==="string"){return file.data}else if(Buffer.isBuffer(file.data)){return file.data.toString(this.encoding)}else{throw new ParserError("data is not text",file.url)}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],52:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");const yaml=require("js-yaml");module.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){try{return yaml.safeLoad(data)}catch(e){throw new ParserError(e.message,file.url)}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59,"js-yaml":138}],53:[function(require,module,exports){"use strict";module.exports=Pointer;const $Ref=require("./ref");const url=require("./util/url");const{JSONParserError,InvalidPointerError,MissingPointerError,isHandledError}=require("./util/errors");const slashes=/\//g;const tildes=/~/g;const escapedSlash=/~1/g;const escapedTilde=/~0/g;function Pointer($ref,path,friendlyPath){this.$ref=$ref;this.path=path;this.originalPath=friendlyPath||path;this.value=undefined;this.circular=false;this.indirections=0}Pointer.prototype.resolve=function(obj,options,pathFromRoot){let tokens=Pointer.parse(this.path,this.originalPath);this.value=unwrapOrThrow(obj);for(let i=0;i0};$Ref.isExternal$Ref=function(value){return $Ref.is$Ref(value)&&value.$ref[0]!=="#"};$Ref.isAllowed$Ref=function(value,options){if($Ref.is$Ref(value)){if(value.$ref.substr(0,2)==="#/"||value.$ref==="#"){return true}else if(value.$ref[0]!=="#"&&(!options||options.resolve.external)){return true}}};$Ref.isExtended$Ref=function(value){return $Ref.is$Ref(value)&&Object.keys(value).length>1};$Ref.dereference=function($ref,resolvedValue){if(resolvedValue&&typeof resolvedValue==="object"&&$Ref.isExtended$Ref($ref)){let merged={};for(let key of Object.keys($ref)){if(key!=="$ref"){merged[key]=$ref[key]}}for(let key of Object.keys(resolvedValue)){if(!(key in merged)){merged[key]=resolvedValue[key]}}return merged}else{return resolvedValue}}},{"./pointer":53,"./util/errors":59,"./util/url":61}],55:[function(require,module,exports){"use strict";const{ono}=require("@jsdevtools/ono");const $Ref=require("./ref");const url=require("./util/url");module.exports=$Refs;function $Refs(){this.circular=false;this._$refs={};this._root$Ref=null}$Refs.prototype.paths=function(types){let paths=getPaths(this._$refs,arguments);return paths.map(path=>{return path.decoded})};$Refs.prototype.values=function(types){let $refs=this._$refs;let paths=getPaths($refs,arguments);return paths.reduce((obj,path)=>{obj[path.decoded]=$refs[path.encoded].value;return obj},{})};$Refs.prototype.toJSON=$Refs.prototype.values;$Refs.prototype.exists=function(path,options){try{this._resolve(path,"",options);return true}catch(e){return false}};$Refs.prototype.get=function(path,options){return this._resolve(path,"",options).value};$Refs.prototype.set=function(path,value){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}$ref.set(absPath,value)};$Refs.prototype._add=function(path){let withoutHash=url.stripHash(path);let $ref=new $Ref;$ref.path=withoutHash;$ref.$refs=this;this._$refs[withoutHash]=$ref;this._root$Ref=this._root$Ref||$ref;return $ref};$Refs.prototype._resolve=function(path,pathFromRoot,options){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}return $ref.resolve(absPath,options,path,pathFromRoot)};$Refs.prototype._get$Ref=function(path){path=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(path);return this._$refs[withoutHash]};function getPaths($refs,types){let paths=Object.keys($refs);types=Array.isArray(types[0])?types[0]:Array.prototype.slice.call(types);if(types.length>0&&types[0]){paths=paths.filter(key=>{return types.indexOf($refs[key].pathType)!==-1})}return paths.map(path=>{return{encoded:path,decoded:$refs[path].pathType==="file"?url.toFileSystemPath(path,true):path}})}},{"./ref":54,"./util/url":61,"@jsdevtools/ono":75}],56:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const parse=require("./parse");const url=require("./util/url");const{isHandledError}=require("./util/errors");module.exports=resolveExternal;function resolveExternal(parser,options){if(!options.resolve.external){return Promise.resolve()}try{let promises=crawl(parser.schema,parser.$refs._root$Ref.path+"#",parser.$refs,options);return Promise.all(promises)}catch(e){return Promise.reject(e)}}function crawl(obj,path,$refs,options){let promises=[];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isExternal$Ref(obj)){promises.push(resolve$Ref(obj,path,$refs,options))}else{for(let key of Object.keys(obj)){let keyPath=Pointer.join(path,key);let value=obj[key];if($Ref.isExternal$Ref(value)){promises.push(resolve$Ref(value,keyPath,$refs,options))}else{promises=promises.concat(crawl(value,keyPath,$refs,options))}}}}return promises}async function resolve$Ref($ref,path,$refs,options){let resolvedPath=url.resolve(path,$ref.$ref);let withoutHash=url.stripHash(resolvedPath);$ref=$refs._$refs[withoutHash];if($ref){return Promise.resolve($ref.value)}try{const result=await parse(resolvedPath,$refs,options);let promises=crawl(result,withoutHash+"#",$refs,options);return Promise.all(promises)}catch(err){if(!options.continueOnError||!isHandledError(err)){throw err}if($refs._$refs[withoutHash]){err.source=url.stripHash(path);err.path=url.safePointerToPath(url.getHash(path))}return[]}}},{"./parse":48,"./pointer":53,"./ref":54,"./util/errors":59,"./util/url":61}],57:[function(require,module,exports){"use strict";const fs=require("fs");const{ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError}=require("../util/errors");module.exports={order:100,canRead(file){return url.isFileSystemPath(file.url)},read(file){return new Promise((resolve,reject)=>{let path;try{path=url.toFileSystemPath(file.url)}catch(err){reject(new ResolverError(ono.uri(err,`Malformed URI: ${file.url}`),file.url))}try{fs.readFile(path,(err,data)=>{if(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}else{resolve(data)}})}catch(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}})}}},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,fs:126}],58:[function(require,module,exports){(function(process,Buffer){"use strict";const http=require("http");const https=require("https");const{ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError}=require("../util/errors");module.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:false,canRead(file){return url.isHttp(file.url)},read(file){let u=url.parse(file.url);if(process.browser&&!u.protocol){u.protocol=url.parse(location.href).protocol}return download(u,this)}};function download(u,httpOptions,redirects){return new Promise((resolve,reject)=>{u=url.parse(u);redirects=redirects||[];redirects.push(u.href);get(u,httpOptions).then(res=>{if(res.statusCode>=400){throw ono({status:res.statusCode},`HTTP ERROR ${res.statusCode}`)}else if(res.statusCode>=300){if(redirects.length>httpOptions.redirects){reject(new ResolverError(ono({status:res.statusCode},`Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`)))}else if(!res.headers.location){throw ono({status:res.statusCode},`HTTP ${res.statusCode} redirect with no location header`)}else{let redirectTo=url.resolve(u,res.headers.location);download(redirectTo,httpOptions,redirects).then(resolve,reject)}}else{resolve(res.body||Buffer.alloc(0))}}).catch(err=>{reject(new ResolverError(ono(err,`Error downloading ${u.href}`),u.href))})})}function get(u,httpOptions){return new Promise((resolve,reject)=>{let protocol=u.protocol==="https:"?https:http;let req=protocol.get({hostname:u.hostname,port:u.port,path:u.path,auth:u.auth,protocol:u.protocol,headers:httpOptions.headers||{},withCredentials:httpOptions.withCredentials});if(typeof req.setTimeout==="function"){req.setTimeout(httpOptions.timeout)}req.on("timeout",()=>{req.abort()});req.on("error",reject);req.once("response",res=>{res.body=Buffer.alloc(0);res.on("data",data=>{res.body=Buffer.concat([res.body,Buffer.from(data)])});res.on("error",reject);res.on("end",()=>{resolve(res)})})})}}).call(this,require("_process"),require("buffer").Buffer)},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,_process:172,buffer:128,http:177,https:134}],59:[function(require,module,exports){"use strict";const{Ono}=require("@jsdevtools/ono");const{stripHash,toFileSystemPath}=require("./url");const JSONParserError=exports.JSONParserError=class JSONParserError extends Error{constructor(message,source){super();this.code="EUNKNOWN";this.message=message;this.source=source;this.path=null;Ono.extend(this)}};setErrorName(JSONParserError);const JSONParserErrorGroup=exports.JSONParserErrorGroup=class JSONParserErrorGroup extends Error{constructor(parser){super();this.files=parser;this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${toFileSystemPath(parser.$refs._root$Ref.path)}'`;Ono.extend(this)}static getParserErrors(parser){const errors=[];for(const $ref of Object.values(parser.$refs._$refs)){if($ref.errors){errors.push(...$ref.errors)}}return errors}get errors(){return JSONParserErrorGroup.getParserErrors(this.files)}};setErrorName(JSONParserErrorGroup);const ParserError=exports.ParserError=class ParserError extends JSONParserError{constructor(message,source){super(`Error parsing ${source}: ${message}`,source);this.code="EPARSER"}};setErrorName(ParserError);const UnmatchedParserError=exports.UnmatchedParserError=class UnmatchedParserError extends JSONParserError{constructor(source){super(`Could not find parser for "${source}"`,source);this.code="EUNMATCHEDPARSER"}};setErrorName(UnmatchedParserError);const ResolverError=exports.ResolverError=class ResolverError extends JSONParserError{constructor(ex,source){super(ex.message||`Error reading file "${source}"`,source);this.code="ERESOLVER";if("code"in ex){this.ioErrorCode=String(ex.code)}}};setErrorName(ResolverError);const UnmatchedResolverError=exports.UnmatchedResolverError=class UnmatchedResolverError extends JSONParserError{constructor(source){super(`Could not find resolver for "${source}"`,source);this.code="EUNMATCHEDRESOLVER"}};setErrorName(UnmatchedResolverError);const MissingPointerError=exports.MissingPointerError=class MissingPointerError extends JSONParserError{constructor(token,path){super(`Token "${token}" does not exist.`,stripHash(path));this.code="EMISSINGPOINTER"}};setErrorName(MissingPointerError);const InvalidPointerError=exports.InvalidPointerError=class InvalidPointerError extends JSONParserError{constructor(pointer,path){super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`,stripHash(path));this.code="EINVALIDPOINTER"}};setErrorName(InvalidPointerError);function setErrorName(err){Object.defineProperty(err.prototype,"name",{value:err.name,enumerable:true})}exports.isHandledError=function(err){return err instanceof JSONParserError||err instanceof JSONParserErrorGroup};exports.normalizeError=function(err){if(err.path===null){err.path=[]}return err}},{"./url":61,"@jsdevtools/ono":75}],60:[function(require,module,exports){"use strict";exports.all=function(plugins){return Object.keys(plugins).filter(key=>{return typeof plugins[key]==="object"}).map(key=>{plugins[key].name=key;return plugins[key]})};exports.filter=function(plugins,method,file){return plugins.filter(plugin=>{return!!getResult(plugin,method,file)})};exports.sort=function(plugins){for(let plugin of plugins){plugin.order=plugin.order||Number.MAX_SAFE_INTEGER}return plugins.sort((a,b)=>{return a.order-b.order})};exports.run=function(plugins,method,file,$refs){let plugin,lastError,index=0;return new Promise((resolve,reject)=>{runNextPlugin();function runNextPlugin(){plugin=plugins[index++];if(!plugin){return reject(lastError)}try{let result=getResult(plugin,method,file,callback,$refs);if(result&&typeof result.then==="function"){result.then(onSuccess,onError)}else if(result!==undefined){onSuccess(result)}else if(index===plugins.length){throw new Error("No promise has been returned or callback has been called.")}}catch(e){onError(e)}}function callback(err,result){if(err){onError(err)}else{onSuccess(result)}}function onSuccess(result){resolve({plugin:plugin,result:result})}function onError(error){lastError={plugin:plugin,error:error};runNextPlugin()}})};function getResult(obj,prop,file,callback,$refs){let value=obj[prop];if(typeof value==="function"){return value.apply(obj,[file,callback,$refs])}if(!callback){if(value instanceof RegExp){return value.test(file.url)}else if(typeof value==="string"){return value===file.extension}else if(Array.isArray(value)){return value.indexOf(file.extension)!==-1}}return value}},{}],61:[function(require,module,exports){(function(process){"use strict";let isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^(\w{2,}):\/\//i,url=module.exports,jsonPointerSlash=/~1/g,jsonPointerTilde=/~0/g;let urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23"];let urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];exports.parse=require("url").parse;exports.resolve=require("url").resolve;exports.cwd=function cwd(){if(process.browser){return location.href}let path=process.cwd();let lastChar=path.slice(-1);if(lastChar==="/"||lastChar==="\\"){return path}else{return path+"/"}};exports.getProtocol=function getProtocol(path){let match=protocolPattern.exec(path);if(match){return match[1].toLowerCase()}};exports.getExtension=function getExtension(path){let lastDot=path.lastIndexOf(".");if(lastDot>=0){return path.substr(lastDot).toLowerCase()}return""};exports.getHash=function getHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){return path.substr(hashIndex)}return"#"};exports.stripHash=function stripHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){path=path.substr(0,hashIndex)}return path};exports.isHttp=function isHttp(path){let protocol=url.getProtocol(path);if(protocol==="http"||protocol==="https"){return true}else if(protocol===undefined){return process.browser}else{return false}};exports.isFileSystemPath=function isFileSystemPath(path){if(process.browser){return false}let protocol=url.getProtocol(path);return protocol===undefined||protocol==="file"};exports.fromFileSystemPath=function fromFileSystemPath(path){if(isWindows){path=path.replace(/\\/g,"/")}path=encodeURI(path);for(let i=0;i{return decodeURIComponent(value).replace(jsonPointerSlash,"/").replace(jsonPointerTilde,"~")})}}).call(this,require("_process"))},{_process:172,url:199}],62:[function(require,module,exports){module.exports={"1.0.0":require("./schemas/1.0.0.json"),"1.1.0":require("./schemas/1.1.0.json"),"1.2.0":require("./schemas/1.2.0.json"),"2.0.0-rc1":require("./schemas/2.0.0-rc1.json"),"2.0.0-rc2":require("./schemas/2.0.0-rc2.json"),"2.0.0":require("./schemas/2.0.0.json"),"2.1.0":require("./schemas/2.1.0.json"),"2.2.0":require("./schemas/2.2.0.json"),"2.3.0":require("./schemas/2.3.0.json")}},{"./schemas/1.0.0.json":63,"./schemas/1.1.0.json":64,"./schemas/1.2.0.json":65,"./schemas/2.0.0-rc1.json":66,"./schemas/2.0.0-rc2.json":67,"./schemas/2.0.0.json":68,"./schemas/2.1.0.json":69,"./schemas/2.2.0.json":70,"./schemas/2.3.0.json":71}],63:[function(require,module,exports){module.exports={title:"AsyncAPI 1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},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:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},publish:{$ref:"#/definitions/message"},subscribe:{$ref:"#/definitions/message"},deprecated:{type:"boolean",default:false}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],64:[function(require,module,exports){module.exports={title:"AsyncAPI 1.1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,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."},schema:{$ref:"#/definitions/schema"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],65:[function(require,module,exports){module.exports={title:"AsyncAPI 1.2.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info"],oneOf:[{required:["topics"]},{required:["stream"]},{required:["events"]}],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0","1.2.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},stream:{$ref:"#/definitions/stream",description:"The list of messages a consumer can read or write from/to a streaming API."},events:{$ref:"#/definitions/events",description:"The list of messages an events API sends and/or receives."},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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:false,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"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms","http","https"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable topic parameters."},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,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."},schema:{$ref:"#/definitions/schema"},$ref:{type:"string"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},stream:{title:"Stream Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{framing:{title:"Stream Framing Object",type:"object",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,oneOf:[{additionalProperties:false,properties:{type:{type:"string",enum:["chunked"]},delimiter:{type:"string",enum:["\\r\\n","\\n"],default:"\\r\\n"}}},{additionalProperties:false,properties:{type:{type:"string",enum:["sse"]},delimiter:{type:"string",enum:["\\n\\n"],default:"\\n\\n"}}}]},read:{title:"Stream Read Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},write:{title:"Stream Write Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},events:{title:"Events Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,anyOf:[{required:["receive"]},{required:["send"]}],properties:{receive:{title:"Events Receive Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},send:{title:"Events Send Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{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"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],66:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc1 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","id","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc1"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri-reference"},info:{$ref:"#/definitions/info"},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},baseChannel:{type:"string","x-format":"uri-path"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},traits:{$ref:"#/definitions/traits"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},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"},deprecated:{type:"boolean",default:false},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"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{},examples:{type:"array",items:{}}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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."},schema:{$ref:"#/definitions/schema"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}},message:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(/\\w+)+"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},traits:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/operationTrait"},{$ref:"#/definitions/messageTrait"}]}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],67:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc2 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc2"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{type:"object",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{$ref:"#/definitions/schema"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],68:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,properties:{headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],69:[function(require,module,exports){module.exports={title:"AsyncAPI 2.1.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.1.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],70:[function(require,module,exports){module.exports={title:"AsyncAPI 2.2.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.2.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],71:[function(require,module,exports){module.exports={title:"AsyncAPI 2.3.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.3.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{$ref:"#/definitions/servers"},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},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. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,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-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",anyOf:[{required:["url","protocol"]},{required:["$ref"]}],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},servers:{$ref:"#/definitions/servers"},channels:{$ref:"#/definitions/channels"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{},solace:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],72:[function(require,module,exports){const{load,Kind}=require("yaml-ast-parser");const loc=Symbol("pseudo-yaml-ast-loc");const hasOwnProp=(obj,key)=>obj&&typeof obj==="object"&&Object.prototype.hasOwnProperty.call(obj,key);const isUndefined=v=>v===undefined;const isNull=v=>v===null;const isPrimitive=v=>Number.isNaN(v)||isNull(v)||isUndefined(v)||typeof v==="symbol";const isPrimitiveNode=node=>isPrimitive(node.value)||!hasOwnProp(node,"value");const isBetween=(start,pos,end)=>pos<=end&&pos>=start;const getLoc=(input,{start:start=0,end:end=0})=>{const lines=input.split(/\n/);const loc={start:{},end:{}};let sum=0;for(const i of lines.keys()){const line=lines[i];const ls=sum;const le=sum+line.length;if(isUndefined(loc.start.line)&&isBetween(ls,start,le)){loc.start.line=i+1;loc.start.column=start-ls;loc.start.offset=start}if(isUndefined(loc.end.line)&&isBetween(ls,end,le)){loc.end.line=i+1;loc.end.column=end-ls;loc.end.offset=end}sum=le+1}return loc};const visitors={MAP:(node={},input="",ctx={})=>Object.assign(walk(node.mappings,input),{[loc]:getLoc(input,{start:node.startPosition,end:node.endPosition})}),MAPPING:(node={},input="",ctx={})=>{const value=walk([node.value],input);if(!isPrimitive(value)){value[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition})}return Object.assign(ctx,{[node.key.value]:value})},SCALAR:(node={},input="")=>{if(isPrimitiveNode(node)){return node.value}const _loc=getLoc(input,{start:node.startPosition,end:node.endPosition});const wrappable=Constructor=>()=>{const v=new Constructor(node.value);v[loc]=_loc;return v};const object=()=>{node.value[loc]=_loc;return node.value};const types={boolean:wrappable(Boolean),number:wrappable(Number),string:wrappable(String),function:object,object:object};return types[typeof node.value]()},SEQ:(node={},input="")=>{const items=walk(node.items,input,[]);items[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition});return items}};const walk=(nodes=[],input,ctx={})=>{const onNode=(node,ctx,fallback)=>{let visitor;if(node)visitor=visitors[Kind[node.kind]];return visitor?visitor(node,input,ctx):fallback};const walkObj=()=>nodes.reduce((sum,node)=>{return onNode(node,sum,sum)},ctx);const walkArr=()=>nodes.map(node=>onNode(node,ctx,null),ctx).filter(Boolean);return Array.isArray(ctx)?walkArr():walkObj()};module.exports.loc=loc;module.exports.yamlAST=input=>walk([load(input)],input)},{"yaml-ast-parser":209}],73:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Ono=void 0;const extend_error_1=require("./extend-error");const normalize_1=require("./normalize");const to_json_1=require("./to-json");const constructor=Ono;exports.Ono=constructor;function Ono(ErrorConstructor,options){options=normalize_1.normalizeOptions(options);function ono(...args){let{originalError,props,message}=normalize_1.normalizeArgs(args,options);let newError=new ErrorConstructor(message);return extend_error_1.extendError(newError,originalError,props)}ono[Symbol.species]=ErrorConstructor;return ono}Ono.toJSON=function toJSON(error){return to_json_1.toJSON.call(error)};Ono.extend=function extend(error,originalError,props){if(props||originalError instanceof Error){return extend_error_1.extendError(error,originalError,props)}else if(originalError){return extend_error_1.extendError(error,undefined,originalError)}else{return extend_error_1.extendError(error)}}},{"./extend-error":74,"./normalize":77,"./to-json":80}],74:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.extendError=void 0;const isomorphic_node_1=require("./isomorphic.node");const stack_1=require("./stack");const to_json_1=require("./to-json");const protectedProps=["name","message","stack"];function extendError(error,originalError,props){let onoError=error;extendStack(onoError,originalError);if(originalError&&typeof originalError==="object"){mergeErrors(onoError,originalError)}onoError.toJSON=to_json_1.toJSON;if(isomorphic_node_1.addInspectMethod){isomorphic_node_1.addInspectMethod(onoError)}if(props&&typeof props==="object"){Object.assign(onoError,props)}return onoError}exports.extendError=extendError;function extendStack(newError,originalError){let stackProp=Object.getOwnPropertyDescriptor(newError,"stack");if(stack_1.isLazyStack(stackProp)){stack_1.lazyJoinStacks(stackProp,newError,originalError)}else if(stack_1.isWritableStack(stackProp)){newError.stack=stack_1.joinStacks(newError,originalError)}}function mergeErrors(newError,originalError){let keys=to_json_1.getDeepKeys(originalError,protectedProps);let _newError=newError;let _originalError=originalError;for(let key of keys){if(_newError[key]===undefined){try{_newError[key]=_originalError[key]}catch(e){}}}}},{"./isomorphic.node":76,"./stack":79,"./to-json":80}],75:[function(require,module,exports){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!exports.hasOwnProperty(p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const singleton_1=require("./singleton");Object.defineProperty(exports,"ono",{enumerable:true,get:function(){return singleton_1.ono}});var constructor_1=require("./constructor");Object.defineProperty(exports,"Ono",{enumerable:true,get:function(){return constructor_1.Ono}});__exportStar(require("./types"),exports);exports.default=singleton_1.ono;if(typeof module==="object"&&typeof module.exports==="object"){module.exports=Object.assign(module.exports.default,module.exports)}},{"./constructor":73,"./singleton":78,"./types":81}],76:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.addInspectMethod=exports.format=void 0;exports.format=false;exports.addInspectMethod=false},{}],77:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.normalizeArgs=exports.normalizeOptions=void 0;const isomorphic_node_1=require("./isomorphic.node");function normalizeOptions(options){options=options||{};return{concatMessages:options.concatMessages===undefined?true:Boolean(options.concatMessages),format:options.format===undefined?isomorphic_node_1.format:typeof options.format==="function"?options.format:false}}exports.normalizeOptions=normalizeOptions;function normalizeArgs(args,options){let originalError;let props;let formatArgs;let message="";if(typeof args[0]==="string"){formatArgs=args}else if(typeof args[1]==="string"){if(args[0]instanceof Error){originalError=args[0]}else{props=args[0]}formatArgs=args.slice(1)}else{originalError=args[0];props=args[1];formatArgs=args.slice(2)}if(formatArgs.length>0){if(options.format){message=options.format.apply(undefined,formatArgs)}else{message=formatArgs.join(" ")}}if(options.concatMessages&&originalError&&originalError.message){message+=(message?" \n":"")+originalError.message}return{originalError:originalError,props:props,message:message}}exports.normalizeArgs=normalizeArgs},{"./isomorphic.node":76}],78:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const constructor_1=require("./constructor");const singleton=ono;exports.ono=singleton;ono.error=new constructor_1.Ono(Error);ono.eval=new constructor_1.Ono(EvalError);ono.range=new constructor_1.Ono(RangeError);ono.reference=new constructor_1.Ono(ReferenceError);ono.syntax=new constructor_1.Ono(SyntaxError);ono.type=new constructor_1.Ono(TypeError);ono.uri=new constructor_1.Ono(URIError);const onoMap=ono;function ono(...args){let originalError=args[0];if(typeof originalError==="object"&&typeof originalError.name==="string"){for(let typedOno of Object.values(onoMap)){if(typeof typedOno==="function"&&typedOno.name==="ono"){let species=typedOno[Symbol.species];if(species&&species!==Error&&(originalError instanceof species||originalError.name===species.name)){return typedOno.apply(undefined,args)}}}}return ono.error.apply(undefined,args)}},{"./constructor":73}],79:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.lazyJoinStacks=exports.joinStacks=exports.isWritableStack=exports.isLazyStack=void 0;const newline=/\r?\n/;const onoCall=/\bono[ @]/;function isLazyStack(stackProp){return Boolean(stackProp&&stackProp.configurable&&typeof stackProp.get==="function")}exports.isLazyStack=isLazyStack;function isWritableStack(stackProp){return Boolean(!stackProp||stackProp.writable||typeof stackProp.set==="function")}exports.isWritableStack=isWritableStack;function joinStacks(newError,originalError){let newStack=popStack(newError.stack);let originalStack=originalError?originalError.stack:undefined;if(newStack&&originalStack){return newStack+"\n\n"+originalStack}else{return newStack||originalStack}}exports.joinStacks=joinStacks;function lazyJoinStacks(lazyStack,newError,originalError){if(originalError){Object.defineProperty(newError,"stack",{get:()=>{let newStack=lazyStack.get.apply(newError);return joinStacks({stack:newStack},originalError)},enumerable:false,configurable:true})}else{lazyPopStack(newError,lazyStack)}}exports.lazyJoinStacks=lazyJoinStacks;function popStack(stack){if(stack){let lines=stack.split(newline);let onoStart;for(let i=0;i0){return lines.join("\n")}}return stack}function lazyPopStack(error,lazyStack){Object.defineProperty(error,"stack",{get:()=>popStack(lazyStack.get.apply(error)),enumerable:false,configurable:true})}},{}],80:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getDeepKeys=exports.toJSON=void 0;const nonJsonTypes=["function","symbol","undefined"];const protectedProps=["constructor","prototype","__proto__"];const objectPrototype=Object.getPrototypeOf({});function toJSON(){let pojo={};let error=this;for(let key of getDeepKeys(error)){if(typeof key==="string"){let value=error[key];let type=typeof value;if(!nonJsonTypes.includes(type)){pojo[key]=value}}}return pojo}exports.toJSON=toJSON;function getDeepKeys(obj,omit=[]){let keys=[];while(obj&&obj!==objectPrototype){keys=keys.concat(Object.getOwnPropertyNames(obj),Object.getOwnPropertySymbols(obj));obj=Object.getPrototypeOf(obj)}let uniqueKeys=new Set(keys);for(let key of omit.concat(protectedProps)){uniqueKeys.delete(key)}return uniqueKeys}exports.getDeepKeys=getDeepKeys},{}],81:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});const util_1=require("util")},{util:204}],82:[function(require,module,exports){"use strict";var compileSchema=require("./compile"),resolve=require("./compile/resolve"),Cache=require("./cache"),SchemaObject=require("./compile/schema_obj"),stableStringify=require("fast-json-stable-stringify"),formats=require("./compile/formats"),rules=require("./compile/rules"),$dataMetaSchema=require("./data"),util=require("./compile/util");module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=require("./compile/async");var customKeyword=require("./keyword");Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=require("./compile/error_classes");Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema";var META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=formats(opts.format);this._cache=opts.cache||new Cache;this._loadingSchemas={};this._compilations=[];this.RULES=rules();this._getId=chooseGetId(opts);opts.loopRequired=opts.loopRequired||Infinity;if(opts.errorDataPath=="property")opts._errorDataPathProperty=true;if(opts.serialize===undefined)opts.serialize=stableStringify;this._metaOpts=getMetaSchemaOptions(this);if(opts.formats)addInitialFormats(this);if(opts.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof opts.meta=="object")this.addMetaSchema(opts.meta);if(opts.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){v=this.getSchema(schemaKeyRef);if(!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);if(v.$async!==true)this.errors=v.errors;return valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,undefined,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i%\\^`{|}]|%[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;var URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){mode=mode=="full"?"full":"fast";return util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\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,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,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,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,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:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return false;var year=+matches[1];var month=+matches[2];var day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return false;var hour=matches[1];var minute=matches[2];var second=matches[3];var timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],true)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return false;try{new RegExp(str);return true}catch(e){return false}}},{"./util":92}],87:[function(require,module,exports){"use strict";var resolve=require("./resolve"),util=require("./util"),errorClasses=require("./error_classes"),stableStringify=require("fast-json-stable-stringify");var validateGenerator=require("../dotjs/validate");var ucs2length=util.ucs2length;var equal=require("fast-deep-equal");var ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[undefined],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var c=checkCompiling.call(this,schema,root,baseId);var compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats;var RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;if(cv){cv.schema=v.schema;cv.errors=null;cv.refs=v.refs;cv.refVal=v.refVal;cv.root=v.root;cv.$async=v.$async;if(opts.sourceCode)cv.source=v.source}return v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate;var result=validate.apply(this,arguments);callValidate.errors=validate.errors;return result}function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===true;var sourceCode=validateGenerator({isTop:true,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,logger:self.logger,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode;if(opts.processCode)sourceCode=opts.processCode(sourceCode,_schema);var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError);refVal[0]=validate}catch(e){self.logger.error("Error compiling schema, function code:",sourceCode);throw e}validate.schema=_schema;validate.errors=null;validate.refs=refs;validate.refVal=refVal;validate.root=isRoot?validate:_root;if($async)validate.$async=true;if(opts.sourceCode===true){validate.source={code:sourceCode,patterns:patterns,defaults:defaults}}return validate}function resolveRef(baseId,ref,isRoot){ref=resolve.url(baseId,ref);var refIndex=refs[ref];var _refVal,refCode;if(refIndex!==undefined){_refVal=refVal[refIndex];refCode="refVal["+refIndex+"]";return resolvedRef(_refVal,refCode)}if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==undefined){_refVal=root.refVal[rootRefId];refCode=addLocalRef(ref,_refVal);return resolvedRef(_refVal,refCode)}}refCode=addLocalRef(ref);var v=resolve.call(self,localCompile,root,ref);if(v===undefined){var localSchema=localRefs&&localRefs[ref];if(localSchema){v=resolve.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId)}}if(v===undefined){removeLocalRef(ref)}else{replaceLocalRef(ref,v);return resolvedRef(v,refCode)}}function addLocalRef(ref,v){var refId=refVal.length;refVal[refId]=v;refs[ref]=refId;return"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v){var refId=refs[ref];refVal[refId]=v}function resolvedRef(refVal,code){return typeof refVal=="object"||typeof refVal=="boolean"?{code:code,schema:refVal,inline:true}:{code:code,$async:refVal&&!!refVal.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];if(index===undefined){index=patternsHash[regexStr]=patterns.length;patterns[index]=regexStr}return"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value);var index=defaultsHash[valueStr];if(index===undefined){index=defaultsHash[valueStr]=defaults.length;defaults[index]=value}return"default"+index}}function useCustomRule(rule,schema,parentSchema,it){if(self._opts.validateSchema!==false){var deps=rule.definition.dependencies;if(deps&&!deps.every(function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)}))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro;var validate;if(compile){validate=compile.call(self,schema,parentSchema,it)}else if(macro){validate=macro.call(self,schema,parentSchema,it);if(opts.validateSchema!==false)self.validateSchema(validate,true)}else if(inline){validate=inline.call(self,it,rule.keyword,schema,parentSchema)}else{validate=rule.definition.validate;if(!validate)return}if(validate===undefined)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;customRules[index]=validate;return{code:"customRule"+index,validate:validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);if(index>=0)return{index:index,compiling:true};index=this._compilations.length;this._compilations[index]={schema:schema,root:root,baseId:baseId};return{index:index,compiling:false}}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);if(i>=0)this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i=55296&&value<=56319&&pos=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);data="data"+(lvl-up||"");if(!jsonPointer)return data}var expr=data;var segments=jsonPointer.split("/");for(var i=0;i",$notOp=$isMax?">":"<",$errorKeyword=undefined;if(!($isData||typeof $schema=="number"||$schema===undefined)){throw new Error($keyword+" must be number")}if(!($isDataExcl||$schemaExcl===undefined||typeof $schemaExcl=="number"||typeof $schemaExcl=="boolean")){throw new Error($exclusiveKeyword+" must be number or boolean")}if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ";$schemaValueExcl="schemaExcl"+$lvl;out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: '"+$exclusiveKeyword+" should be boolean' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ";if($schema===undefined){$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaValueExcl;$isData=$isDataExcl}}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{if($exclIsNumber&&$schema===undefined){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaExcl;$notOp+="="}else{if($exclIsNumber)$schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema);if($schemaExcl===($exclIsNumber?$schemaValue:true)){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$notOp+="="}else{$exclusive=false;$opStr+="="}}var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ";if(it.opts.messages!==false){out+=" , message: 'should be "+$opStr+" ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],96:[function(require,module,exports){"use strict";module.exports=function generate__limitItems(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxItems"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxItems"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" items' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],97:[function(require,module,exports){"use strict";module.exports=function generate__limitLength(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxLength"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}if(it.opts.unicode===false){out+=" "+$data+".length "}else{out+=" ucs2length("+$data+") "}out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT be ";if($keyword=="maxLength"){out+="longer"}else{out+="shorter"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" characters' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],98:[function(require,module,exports){"use strict";module.exports=function generate__limitProperties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxProperties"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxProperties"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" properties' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],99:[function(require,module,exports){"use strict";module.exports=function generate_allOf(it,$keyword,$ruleType){var out=" ";var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$allSchemasEmpty=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$allSchemasEmpty=false;$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($breakOnError){if($allSchemasEmpty){out+=" if (true) { "}else{out+=" "+$closingBraces.slice(0,-1)+" "}}return out}},{}],100:[function(require,module,exports){"use strict";module.exports=function generate_anyOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $noEmptySchema=$schema.every(function($sch){return it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)});if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($schema,it.RULES.all);out+="var "+$errs+" = errors;var "+$valid+";";if($nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" if ("+$nextValid+") break; } ";it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else{out+=" if ("+$data+".length == 0) {"}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should contain a valid item' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { ";if($nonEmptySchema){out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "}if(it.opts.allErrors){out+=" } "}return out}},{}],104:[function(require,module,exports){"use strict";module.exports=function generate_custom(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="";var $compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{$ruleValidate=it.useCustomRule($rule,$schema,it.schema,it);if(!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath;$validateCode=$ruleValidate.code;$compile=$rDef.compile;$inline=$rDef.inline;$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if(!($inline||$macro)){out+=""+$ruleErrs+" = null;"}out+="var "+$errs+" = errors;var "+$valid+";";if($isData&&$rDef.$data){$closingBraces+="}";out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ";if($validateSchema){$closingBraces+="}";out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { "}}if($inline){if($rDef.statements){out+=" "+$ruleValidate.validate+" "}else{out+=" "+$valid+" = "+$ruleValidate.validate+"; "}}else if($macro){var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate;$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out);out="";out+=" "+$validateCode+".call( ";if(it.opts.passContext){out+="this"}else{out+="self"}if($compile||$rDef.schema===false){out+=" , "+$data+" "}else{out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" "}out+=" , (dataPath || '')";if(it.errorPath!='""'){out+=" + "+it.errorPath}var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop();if($rDef.errors===false){out+=" "+$valid+" = ";if($asyncKeyword){out+="await "}out+=""+def_callRuleValidate+"; "}else{if($asyncKeyword){$ruleErrs="customErrors"+$lvl;out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "}else{out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}}}if($rDef.modifying){out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"}out+=""+$closingBraces;if($rDef.valid){if($breakOnError){out+=" if (true) { "}}else{out+=" if ( ";if($rDef.valid===undefined){out+=" !";if($macro){out+=""+$nextValid}else{out+=""+$valid}}else{out+=" "+!$rDef.valid+" "}out+=") { ";$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ";if(it.opts.messages!==false){out+=" , message: 'should pass \""+$rule.keyword+"\" keyword validation' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var def_customError=out;out=$$outStack.pop();if($inline){if($rDef.errors){if($rDef.errors!="full"){out+=" for (var "+$i+"="+$errs+"; "+$i+"0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "}out+=") { ";$it.schema=$sch;$it.schemaPath=$schemaPath+it.util.getProperty($property);$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property);out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],106:[function(require,module,exports){"use strict";module.exports=function generate_enum(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $i="i"+$lvl,$vSchema="schema"+$lvl;if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"}out+="var "+$valid+";";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length; "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ";if(it.opts.messages!==false){out+=" , message: 'should be equal to one of the allowed values' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" }";if($breakOnError){out+=" else { "}return out}},{}],107:[function(require,module,exports){"use strict";module.exports=function generate_format(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");if(it.opts.format===false){if($breakOnError){out+=" if (true) { "}return out}var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ";if(it.async){out+=" var async"+$lvl+" = "+$format+".async; "}out+=" "+$format+" = "+$format+".validate; } if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" (";if($unknownFormats!="ignore"){out+=" ("+$schemaValue+" && !"+$format+" ";if($allowUnknown){out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "}out+=") || "}out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ";if(it.async){out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) "}else{out+=" "+$format+"("+$data+") "}out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore"){it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"');if($breakOnError){out+=" if (true) { "}return out}else if($allowUnknown&&$unknownFormats.indexOf($schema)>=0){if($breakOnError){out+=" if (true) { "}return out}else{throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate;var $formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===true;$format=$format.validate}if($formatType!=$ruleType){if($breakOnError){out+=" if (true) { "}return out}if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);if($isObject)$formatRef+=".validate";if(typeof $format=="function"){out+=" "+$formatRef+"("+$data+") "}else{out+=" "+$formatRef+".test("+$data+") "}out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match format \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],108:[function(require,module,exports){"use strict";module.exports=function generate_if(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;var $thenSch=it.schema["then"],$elseSch=it.schema["else"],$thenPresent=$thenSch!==undefined&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==undefined&&(it.opts.strictKeywords?typeof $elseSch=="object"&&Object.keys($elseSch).length>0:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=false;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;$it.createErrors=true;out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";it.compositeRule=$it.compositeRule=$wasComposite;if($thenPresent){out+=" if ("+$nextValid+") { ";$it.schema=it.schema["then"];$it.schemaPath=it.schemaPath+".then";$it.errSchemaPath=it.errSchemaPath+"/then";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'then'; "}else{$ifClause="'then'"}out+=" } ";if($elsePresent){out+=" else { "}}else{out+=" if (!"+$nextValid+") { "}if($elsePresent){$it.schema=it.schema["else"];$it.schemaPath=it.schemaPath+".else";$it.errSchemaPath=it.errSchemaPath+"/else";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'else'; "}else{$ifClause="'else'"}out+=" } "}out+=" if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ";if(it.opts.messages!==false){out+=" , message: 'should match \"' + "+$ifClause+" + '\" schema' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],109:[function(require,module,exports){"use strict";module.exports={$ref:require("./ref"),allOf:require("./allOf"),anyOf:require("./anyOf"),$comment:require("./comment"),const:require("./const"),contains:require("./contains"),dependencies:require("./dependencies"),enum:require("./enum"),format:require("./format"),if:require("./if"),items:require("./items"),maximum:require("./_limit"),minimum:require("./_limit"),maxItems:require("./_limitItems"),minItems:require("./_limitItems"),maxLength:require("./_limitLength"),minLength:require("./_limitLength"),maxProperties:require("./_limitProperties"),minProperties:require("./_limitProperties"),multipleOf:require("./multipleOf"),not:require("./not"),oneOf:require("./oneOf"),pattern:require("./pattern"),properties:require("./properties"),propertyNames:require("./propertyNames"),required:require("./required"),uniqueItems:require("./uniqueItems"),validate:require("./validate")}},{"./_limit":95,"./_limitItems":96,"./_limitLength":97,"./_limitProperties":98,"./allOf":99,"./anyOf":100,"./comment":101,"./const":102,"./contains":103,"./dependencies":105,"./enum":106,"./format":107,"./if":108,"./items":110,"./multipleOf":111,"./not":112,"./oneOf":113,"./pattern":114,"./properties":115,"./propertyNames":116,"./ref":117,"./required":118,"./uniqueItems":119,"./validate":120}],110:[function(require,module,exports){"use strict";module.exports=function generate_items(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;out+="var "+$errs+" = errors;var "+$valid+";";if(Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===false){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have more than "+$schema.length+" items' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";$errSchemaPath=$currErrSchemaPath;if($breakOnError){$closingBraces+="}";out+=" else { "}}var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,true);$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems;$it.schemaPath=it.schemaPath+".additionalItems";$it.errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" for (var "+$idx+" = "+0+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" }"}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],111:[function(require,module,exports){"use strict";module.exports=function generate_multipleOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}out+="var division"+$lvl+";if (";if($isData){out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "}out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ";if(it.opts.multipleOfPrecision){out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" "}else{out+=" division"+$lvl+" !== parseInt(division"+$lvl+") "}out+=" ) ";if($isData){out+=" ) "}out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should be multiple of ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],112:[function(require,module,exports){"use strict";module.exports=function generate_not(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.createErrors=false;var $allErrorsOption;if($it.opts.allErrors){$allErrorsOption=$it.opts.allErrors;$it.opts.allErrors=false}out+=" "+it.validate($it)+" ";$it.createErrors=true;if($allErrorsOption)$it.opts.allErrors=$allErrorsOption;it.compositeRule=$it.compositeRule=$wasComposite;out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";if(it.opts.allErrors){out+=" } "}}else{out+=" var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($breakOnError){out+=" if (false) { "}}return out}},{}],113:[function(require,module,exports){"use strict";module.exports=function generate_oneOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId}else{out+=" var "+$nextValid+" = true; "}if($i){out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ";$closingBraces+="}"}out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }"}}it.compositeRule=$it.compositeRule=$wasComposite;out+=""+$closingBraces+"if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ";if(it.opts.messages!==false){out+=" , message: 'should match exactly one schema in oneOf' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }";if(it.opts.allErrors){out+=" } "}return out}},{}],114:[function(require,module,exports){"use strict";module.exports=function generate_pattern(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $regexp=$isData?"(new RegExp("+$schemaValue+"))":it.usePattern($schema);out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" !"+$regexp+".test("+$data+") ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match pattern \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],115:[function(require,module,exports){"use strict";module.exports=function generate_properties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl;var $schemaKeys=Object.keys($schema||{}).filter(notProto),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties).filter(notProto),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===false,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;var $required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length8){out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") "}else{var arr1=$schemaKeys;if(arr1){var $propertyKey,i1=-1,l1=arr1.length-1;while(i10:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sch.default!==undefined;$it.schema=$sch;$it.schemaPath=$schemaPath+$prop;$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey);$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers);$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault){out+=" "+$code+" "}else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$errSchemaPath=$currErrSchemaPath;it.errorPath=$currentErrorPath;out+=" } else { "}else{if($breakOnError){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = true; } else { "}else{out+=" if ("+$useData+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=" ) { "}}out+=" "+$code+" } "}}if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4){var $pProperty,i4=-1,l4=arr4.length-1;while(i40:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty);$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty);if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } ";if($breakOnError){out+=" else "+$nextValid+" = true; "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],116:[function(require,module,exports){"use strict";module.exports=function generate_propertyNames(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;out+="var "+$errs+" = errors;";if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;if($ownProperties){out+=" var "+$dataProperties+" = undefined; "}if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key;var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}it.compositeRule=$it.compositeRule=$wasComposite;out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"0:it.util.schemaHasRules($propertySch,it.RULES.all)))){$required[$required.length]=$property}}}}else{var $required=$schema}}if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError){out+=" var missing"+$lvl+"; ";if($loopRequired){if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; "}var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)}out+=" var "+$valid+" = true; ";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "}out+="; if (!"+$valid+") break; } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2){var $propertyKey,$i=-1,l2=arr2.length-1;while($i 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0)){out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } "}else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",it.opts.strictNumbers,true)+") continue; ";if($typeIsArray){out+=" if (typeof item == 'string') item = '\"' + item; "}out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],120:[function(require,module,exports){"use strict";module.exports=function generate_validate(it,$keyword,$ruleType){var out="";var $async=it.schema.$async===true,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}if(it.isTop){out+=" var validate = ";if($async){it.async=true;out+="async "}out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if($id&&(it.opts.sourceCode||it.opts.processCode)){out+=" "+("/*# sourceURL="+$id+" */")+" "}}if(typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;if(it.schema===false){if(it.isTop){$breakOnError=true}else{out+=" var "+$valid+" = false; "}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'boolean schema is false' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(it.isTop){if($async){out+=" return data; "}else{out+=" validate.errors = null; return true; "}}else{out+=" var "+$valid+" = true; "}}if(it.isTop){out+=" }; return validate; "}return out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema));it.baseId=it.baseId||it.rootId;delete it.isTop;it.dataPathArr=[undefined];if(it.schema.default!==undefined&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ";out+=" var errors = 0; ";out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id)it.baseId=it.resolve.url(it.baseId,$id);if($async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="";var $errorKeyword;var $typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===true){if($typeIsArray){if($typeSchema.indexOf("null")==-1)$typeSchema=$typeSchema.concat("null")}else if($typeSchema!="null"){$typeSchema=[$typeSchema,"null"];$typeIsArray=true}}if($typeIsArray&&$typeSchema.length==1){$typeSchema=$typeSchema[0];$typeIsArray=false}if(it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)')}else if(it.opts.extendRefs!==true){$refKeywords=false;it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"')}}if(it.schema.$comment&&it.opts.$comment){out+=" "+it.RULES.all.$comment.code(it,"$comment")}if($typeSchema){if(it.opts.coerceTypes){var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema)}var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===true||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";out+=" if ("+it.util[$method]($typeSchema,$data,it.opts.strictNumbers,true)+") { ";if($coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; ";if(it.opts.coerceTypes=="array"){out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+")) "+$dataType+" = 'array'; "}out+=" var "+$coerced+" = undefined; ";var $bracesCoercion="";var arr1=$coerceToTypes;if(arr1){var $type,$i=-1,l1=arr1.length-1;while($i0){throw new Error("Invalid string. Length must be a multiple of 4")}var validLen=b64.indexOf("=");if(validLen===-1)validLen=len;var placeHoldersLen=validLen===len?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength(b64){var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray(b64){var tmp;var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];var arr=new Arr(_byteLength(b64,validLen,placeHoldersLen));var curByte=0;var len=placeHoldersLen>0?validLen-4:validLen;var i;for(i=0;i>16&255;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}if(placeHoldersLen===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[curByte++]=tmp&255}if(placeHoldersLen===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"=")}return parts.join("")}},{}],126:[function(require,module,exports){},{}],127:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter=55296&&value<=56319&&counter65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;jmaxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(qK_MAX_LENGTH){throw new RangeError('The value "'+length+'" is invalid for option "size"')}var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new TypeError('The "string" argument must be of type string. Received type number')}return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species!=null&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="string"){return fromString(value,encodingOrOffset)}if(ArrayBuffer.isView(value)){return fromArrayLike(value)}if(value==null){throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)){return fromArrayBuffer(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('The "value" argument must not be of type number. Received type number')}var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value){return Buffer.from(valueOf,encodingOrOffset,length)}var b=fromObject(value);if(b)return b;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]==="function"){return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be of type number')}else if(size<0){throw new RangeError('The value "'+size+'" is invalid for option "size"')}}function alloc(size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}var length=byteLength(string,encoding)|0;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length){buf=buf.slice(0,actual)}return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i=K_MAX_LENGTH){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+K_MAX_LENGTH.toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true&&b!==Buffer.prototype};Buffer.compare=function compare(a,b){if(isInstance(a,Uint8Array))a=Buffer.from(a,a.offset,a.byteLength);if(isInstance(b,Uint8Array))b=Buffer.from(b,b.offset,b.byteLength);if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array')}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i2&&arguments[2]===true;if(!mustMatch&&len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase){return mustMatch?-1:utf8ToBytes(string).length}encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;imax)str+=" ... ";return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)){target=Buffer.from(target,target.offset,target.byteLength)}if(!Buffer.isBuffer(target)){throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof target)}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(numberIsNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(length>strLen/2){length=strLen/2}for(var i=0;i>>0;if(isFinite(length)){length=length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}if(val.length===1){var code=val.charCodeAt(0);if(encoding==="utf8"&&code<128||encoding==="latin1"){val=code}}}else if(typeof val==="number"){val=val&255}if(start<0||this.length>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}}).call(this,require("buffer").Buffer)},{"base64-js":125,buffer:128,ieee754:135}],129:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],130:[function(require,module,exports){(function(process,global){"use strict";var next=global.process&&process.nextTick||global.setImmediate||function(f){setTimeout(f,0)};module.exports=function maybe(cb,promise){if(cb){promise.then(function(result){next(function(){cb(null,result)})},function(err){next(function(){cb(err)})});return undefined}else{return promise}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:172}],131:[function(require,module,exports){var objectCreate=Object.create||objectCreatePolyfill;var objectKeys=Object.keys||objectKeysPolyfill;var bind=Function.prototype.bind||functionBindPolyfill;function EventEmitter(){if(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events")){this._events=objectCreate(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;var defaultMaxListeners=10;var hasDefineProperty;try{var o={};if(Object.defineProperty)Object.defineProperty(o,"x",{value:0});hasDefineProperty=o.x===0}catch(err){hasDefineProperty=false}if(hasDefineProperty){Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:true,get:function(){return defaultMaxListeners},set:function(arg){if(typeof arg!=="number"||arg<0||arg!==arg)throw new TypeError('"defaultMaxListeners" must be a positive number');defaultMaxListeners=arg}})}else{EventEmitter.defaultMaxListeners=defaultMaxListeners}EventEmitter.prototype.setMaxListeners=function setMaxListeners(n){if(typeof n!=="number"||n<0||isNaN(n))throw new TypeError('"n" argument must be a positive number');this._maxListeners=n;return this};function $getMaxListeners(that){if(that._maxListeners===undefined)return EventEmitter.defaultMaxListeners;return that._maxListeners}EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return $getMaxListeners(this)};function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i1)er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Unhandled "error" event. ('+er+")");err.context=er;throw err}return false}handler=events[type];if(!handler)return false;var isFn=typeof handler==="function";len=arguments.length;switch(len){case 1:emitNone(handler,isFn,this);break;case 2:emitOne(handler,isFn,this,arguments[1]);break;case 3:emitTwo(handler,isFn,this,arguments[1],arguments[2]);break;case 4:emitThree(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:args=new Array(len-1);for(i=1;i0&&existing.length>m){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners '+"added. Use emitter.setMaxListeners() to "+"increase limit.");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;if(typeof console==="object"&&console.warn){console.warn("%s: %s",w.name,w.message)}}}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;switch(arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:var args=new Array(arguments.length);for(var i=0;i=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else spliceOne(list,position);if(list.length===1)events[type]=list[0];if(events.removeListener)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(!events)return this;if(!events.removeListener){if(arguments.length===0){this._events=objectCreate(null);this._eventsCount=0}else if(events[type]){if(--this._eventsCount===0)this._events=objectCreate(null);else delete events[type]}return this}if(arguments.length===0){var keys=objectKeys(events);var key;for(i=0;i=0;i--){this.removeListener(type,listeners[i])}}return this};function _listeners(target,type,unwrap){var events=target._events;if(!events)return[];var evlistener=events[type];if(!evlistener)return[];if(typeof evlistener==="function")return unwrap?[evlistener.listener||evlistener]:[evlistener];return unwrap?unwrapListeners(evlistener):arrayClone(evlistener,evlistener.length)}EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,true)};EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,false)};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],136:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}}else{module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}}},{}],137:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],138:[function(require,module,exports){"use strict";var yaml=require("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":139}],139:[function(require,module,exports){"use strict";var loader=require("./js-yaml/loader");var dumper=require("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}module.exports.Type=require("./js-yaml/type");module.exports.Schema=require("./js-yaml/schema");module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.JSON_SCHEMA=require("./js-yaml/schema/json");module.exports.CORE_SCHEMA=require("./js-yaml/schema/core");module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full");module.exports.load=loader.load;module.exports.loadAll=loader.loadAll;module.exports.safeLoad=loader.safeLoad;module.exports.safeLoadAll=loader.safeLoadAll;module.exports.dump=dumper.dump;module.exports.safeDump=dumper.safeDump;module.exports.YAMLException=require("./js-yaml/exception");module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full");module.exports.scan=deprecated("scan");module.exports.parse=deprecated("parse");module.exports.compose=deprecated("compose");module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":141,"./js-yaml/exception":142,"./js-yaml/loader":143,"./js-yaml/schema":145,"./js-yaml/schema/core":146,"./js-yaml/schema/default_full":147,"./js-yaml/schema/default_safe":148,"./js-yaml/schema/failsafe":149,"./js-yaml/schema/json":150,"./js-yaml/type":151}],140:[function(require,module,exports){"use strict";function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;indexlineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0){return"''"}if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1){return"'"+string+"'"}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char,nextChar;var escapeSeq;for(var i=0;i=55296&&char<=56319){nextChar=string.charCodeAt(i+1);if(nextChar>=56320&&nextChar<=57343){result+=encodeHex((char-55296)*1024+nextChar-56320+65536);i++;continue}}escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){var arrayLevel=state.noArrayIndent&&level>0?level-1:level;if(block&&state.dump.length!==0){writeBlockSequence(state,arrayLevel,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,arrayLevel,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey)}}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndenttextIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndentnodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndentnodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else{throwError(state,"unknown tag !<"+state.tag+">")}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position0&&"\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(endmaxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};module.exports=Mark},{"./common":140}],145:[function(require,module,exports){"use strict";var common=require("./common");var YAMLException=require("./exception");var Type=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return exclude.indexOf(index)===-1})}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type){result[type.kind][type.tag]=result["fallback"][type.tag]=type}for(index=0,length=arguments.length;index64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":151}],153:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":151}],154:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":140,"../type":151}],155:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0"+obj.toString(8):"-0"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":140,"../type":151}],156:[function(require,module,exports){"use strict";var esprima;try{var _require=require;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=require("../../type");function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;if(ast.body[0].expression.body.type==="BlockStatement"){return new Function(params,source.slice(body[0]+1,body[1]-1))}return new Function(params,"return "+source.slice(body[0],body[1]))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":151}],157:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":151}],158:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object==="undefined"}module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":151}],159:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})},{"../type":151}],160:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlMerge(data){return data==="<<"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":151}],161:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":151}],162:[function(require,module,exports){"use strict";var Type=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index=1){var hi=str.charCodeAt(idx-1);var low=code;if(55296<=hi&&hi<=56319){return(hi-55296)*1024+(low-56320)+65536}return low}return code}function shouldBreak(start,mid,end){var all=[start].concat(mid).concat([end]);var previous=all[all.length-2];var next=end;var eModifierIndex=all.lastIndexOf(E_Modifier);if(eModifierIndex>1&&all.slice(1,eModifierIndex).every(function(c){return c==Extend})&&[Extend,E_Base,E_Base_GAZ].indexOf(start)==-1){return Break}var rIIndex=all.lastIndexOf(Regional_Indicator);if(rIIndex>0&&all.slice(1,rIIndex).every(function(c){return c==Regional_Indicator})&&[Prepend,Regional_Indicator].indexOf(previous)==-1){if(all.filter(function(c){return c==Regional_Indicator}).length%2==1){return BreakLastRegional}else{return BreakPenultimateRegional}}if(previous==CR&&next==LF){return NotBreak}else if(previous==Control||previous==CR||previous==LF){if(next==E_Modifier&&mid.every(function(c){return c==Extend})){return Break}else{return BreakStart}}else if(next==Control||next==CR||next==LF){return BreakStart}else if(previous==L&&(next==L||next==V||next==LV||next==LVT)){return NotBreak}else if((previous==LV||previous==V)&&(next==V||next==T)){return NotBreak}else if((previous==LVT||previous==T)&&next==T){return NotBreak}else if(next==Extend||next==ZWJ){return NotBreak}else if(next==SpacingMark){return NotBreak}else if(previous==Prepend){return NotBreak}var previousNonExtendIndex=all.indexOf(Extend)!=-1?all.lastIndexOf(Extend)-1:all.length-2;if([E_Base,E_Base_GAZ].indexOf(all[previousNonExtendIndex])!=-1&&all.slice(previousNonExtendIndex+1,-1).every(function(c){return c==Extend})&&next==E_Modifier){return NotBreak}if(previous==ZWJ&&[Glue_After_Zwj,E_Base_GAZ].indexOf(next)!=-1){return NotBreak}if(mid.indexOf(Regional_Indicator)!=-1){return Break}if(previous==Regional_Indicator&&next==Regional_Indicator){return NotBreak}return BreakStart}this.nextBreak=function(string,index){if(index===undefined){index=0}if(index<0){return 0}if(index>=string.length-1){return string.length}var prev=getGraphemeBreakProperty(codePointAt(string,index));var mid=[];for(var i=index+1;i=max){return res.substr(0,max)}while(max>res.length&&num>1){if(num&1){res+=str}num>>=1;str+=str}res+=str;res=res.substr(0,max);return res}"use strict";var padStart=function padStart(string,maxLength,fillString){if(string==null||maxLength==null){return string}var result=String(string);var targetLen=typeof maxLength==="number"?maxLength:parseInt(maxLength,10);if(isNaN(targetLen)||!isFinite(targetLen)){return result}var length=result.length;if(length>=targetLen){return result}var fill=fillString==null?"":String(fillString);if(fill===""){fill=" "}var fillLen=targetLen-length;while(fill.lengthfillLen?fill.substr(0,fillLen):fill;return truncated+result};var _extends=Object.assign||function(target){for(var i=1;i1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected token <"+token+"> at "+position.filter(Boolean).join(":")}};var tokenizeErrorTypes={unexpectedSymbol:function unexpectedSymbol(symbol){for(var _len=arguments.length,position=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected symbol <"+symbol+"> at "+position.filter(Boolean).join(":")}};var tokenTypes={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10};var punctuatorTokensMap={"{":tokenTypes.LEFT_BRACE,"}":tokenTypes.RIGHT_BRACE,"[":tokenTypes.LEFT_BRACKET,"]":tokenTypes.RIGHT_BRACKET,":":tokenTypes.COLON,",":tokenTypes.COMMA};var keywordTokensMap={true:tokenTypes.TRUE,false:tokenTypes.FALSE,null:tokenTypes.NULL};var stringStates={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2};var escapes$1={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8};var numberStates={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function isDigit1to9(char){return char>="1"&&char<="9"}function isDigit(char){return char>="0"&&char<="9"}function isHex(char){return isDigit(char)||char>="a"&&char<="f"||char>="A"&&char<="F"}function isExp(char){return char==="e"||char==="E"}function parseWhitespace(input,index,line,column){var char=input.charAt(index);if(char==="\r"){index++;line++;column=1;if(input.charAt(index)==="\n"){index++}}else if(char==="\n"){index++;line++;column=1}else if(char==="\t"||char===" "){index++;column++}else{return null}return{index:index,line:line,column:column}}function parseChar(input,index,line,column){var char=input.charAt(index);if(char in punctuatorTokensMap){return{type:punctuatorTokensMap[char],line:line,column:column+1,index:index+1,value:null}}return null}function parseKeyword(input,index,line,column){for(var name in keywordTokensMap){if(keywordTokensMap.hasOwnProperty(name)&&input.substr(index,name.length)===name){return{type:keywordTokensMap[name],line:line,column:column+name.length,index:index+name.length,value:name}}}return null}function parseString$1(input,index,line,column){var startIndex=index;var state=stringStates._START_;while(index0){return{type:tokenTypes.NUMBER,line:line,column:column+passedValueIndex-startIndex,index:passedValueIndex,value:input.slice(startIndex,passedValueIndex)}}return null}var tokenize=function tokenize(input,settings){var line=1;var column=1;var index=0;var tokens=[];while(index0?tokenList[tokenList.length-1].loc.end:{line:1,column:1};error(parseErrorTypes.unexpectedEnd(),input,settings.source,loc.line,loc.column)}function parseHexEscape(hexCode){var charCode=0;for(var i=0;i<4;i++){charCode=charCode*16+parseInt(hexCode[i],16)}return String.fromCharCode(charCode)}var escapes={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};var passEscapes=['"',"\\","/"];function parseString(string){var result="";for(var i=0;i-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function stubArray(){return[]}function stubFalse(){return false}module.exports=cloneDeep}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],171:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i1){for(var i=1;i0&&len>maxKeys){len=maxKeys}for(var i=0;i