UNPKG

@asyncapi/react-component

Version:

A React component for AsyncAPI specification.

2 lines 2.84 MB
/*! For license information please see index.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("AsyncApiComponent",["react"],t):"object"==typeof exports?exports.AsyncApiComponent=t(require("react")):e.AsyncApiComponent=t(e.React)}("undefined"!=typeof self?self:this,(__WEBPACK_EXTERNAL_MODULE__59787__=>(()=>{var __webpack_modules__={11821:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.lastVersion=t.specVersions=t.EXTENSION_REGEX=t.xParserObjectUniqueId=t.xParserCircularProps=t.xParserCircular=t.xParserOriginalTraits=t.xParserOriginalPayload=t.xParserOriginalSchemaFormat=t.xParserSchemaId=t.xParserMessageParsed=t.xParserMessageName=t.xParserApiVersion=t.xParserSpecStringified=t.xParserSpecParsed=void 0;const r=n(i(24764));t.xParserSpecParsed="x-parser-spec-parsed",t.xParserSpecStringified="x-parser-spec-stringified",t.xParserApiVersion="x-parser-api-version",t.xParserMessageName="x-parser-message-name",t.xParserMessageParsed="x-parser-message-parsed",t.xParserSchemaId="x-parser-schema-id",t.xParserOriginalSchemaFormat="x-parser-original-schema-format",t.xParserOriginalPayload="x-parser-original-payload",t.xParserOriginalTraits="x-parser-original-traits",t.xParserCircular="x-parser-circular",t.xParserCircularProps="x-parser-circular-props",t.xParserObjectUniqueId="x-parser-unique-object-id",t.EXTENSION_REGEX=/^x-[\w\d.\-_]+$/,t.specVersions=Object.keys(r.default.schemas),t.lastVersion=t.specVersions[t.specVersions.length-1]},68009:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringifiedDocument=t.isParsedDocument=t.isOldAsyncAPIDocument=t.isAsyncAPIDocument=t.toAsyncAPIDocument=t.createAsyncAPIDocument=void 0;const n=i(6573),r=i(67943),o=i(1698),s=i(11821);function a(e){switch(e.semver.major){case 2:return new n.AsyncAPIDocumentV2(e.parsed,{asyncapi:e,pointer:"/"});case 3:return new n.AsyncAPIDocumentV3(e.parsed,{asyncapi:e,pointer:"/"});default:throw new Error(`Unsupported AsyncAPI version: ${e.semver.version}`)}}function c(e){return!!e&&(e instanceof n.AsyncAPIDocumentV2||e instanceof n.AsyncAPIDocumentV3||!(!e||"function"!=typeof e.json)&&e.json()[s.xParserApiVersion]===n.ParserAPIVersion)}function p(e){return"object"==typeof e&&null!==e&&Boolean(e[s.xParserSpecParsed])}t.createAsyncAPIDocument=a,t.toAsyncAPIDocument=function(e){return c(e)?e:p(e)?a((0,o.createDetailedAsyncAPI)(e,e)):(0,r.unstringify)(e)},t.isAsyncAPIDocument=c,t.isOldAsyncAPIDocument=function(e){if(e&&"function"==typeof e.json){const t=e.json()[s.xParserApiVersion];return void 0===t||0===t}return!1},t.isParsedDocument=p,t.isStringifiedDocument=function(e){try{return"object"==typeof(e="string"==typeof e?JSON.parse(e):e)&&null!==e&&Boolean(e[s.xParserSpecParsed])&&Boolean(e[s.xParserSpecStringified])}catch(e){return!1}}},31277:(e,t)=>{"use strict";var i,n;function r(e,t,o){if(!e)return;const{schemaTypesToIterate:s,callback:a,seenSchemas:c}=o,p=e.json();if(c.has(p))return;c.add(p);let d=e.type()||[];Array.isArray(d)||(d=[d]),!s.includes(n.Objects)&&d.includes("object")||!s.includes(n.Arrays)&&d.includes("array")||!1!==a(e,t,i.NEW_SCHEMA)&&(s.includes(n.Objects)&&d.includes("object")&&function(e,t){Object.entries(e.properties()||{}).forEach((([e,i])=>{r(i,e,t)}));const i=e.additionalProperties();"object"==typeof i&&r(i,null,t);const o=t.schemaTypesToIterate;o.includes(n.PropertyNames)&&e.propertyNames()&&r(e.propertyNames(),null,t),o.includes(n.PatternProperties)&&Object.entries(e.patternProperties()||{}).forEach((([e,i])=>{r(i,e,t)}))}(e,o),s.includes(n.Arrays)&&d.includes("array")&&function(e,t){const i=e.items();i&&(Array.isArray(i)?i.forEach(((e,i)=>{r(e,i,t)})):r(i,null,t));const n=e.additionalItems();"object"==typeof n&&r(n,null,t),t.schemaTypesToIterate.includes("contains")&&e.contains()&&r(e.contains(),null,t)}(e,o),s.includes(n.OneOfs)&&(e.oneOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(n.AnyOfs)&&(e.anyOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(n.AllOfs)&&(e.allOf()||[]).forEach(((e,t)=>{r(e,t,o)})),s.includes(n.Nots)&&e.not()&&r(e.not(),null,o),s.includes(n.Ifs)&&e.if()&&r(e.if(),null,o),s.includes(n.Thenes)&&e.then()&&r(e.then(),null,o),s.includes(n.Elses)&&e.else()&&r(e.else(),null,o),s.includes(n.Dependencies)&&Object.entries(e.dependencies()||{}).forEach((([e,t])=>{t&&!Array.isArray(t)&&r(t,e,o)})),s.includes(n.Definitions)&&Object.entries(e.definitions()||{}).forEach((([e,t])=>{r(t,e,o)})),a(e,t,i.END_SCHEMA),c.delete(p))}function o(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(n.Headers)&&e.hasHeaders()&&r(e.headers(),null,t),i.includes(n.Payloads)&&e.hasPayload()&&r(e.payload(),null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.traverseAsyncApiDocument=t.SchemaTypesToIterate=t.SchemaIteratorCallbackType=void 0,function(e){e.NEW_SCHEMA="NEW_SCHEMA",e.END_SCHEMA="END_SCHEMA"}(i=t.SchemaIteratorCallbackType||(t.SchemaIteratorCallbackType={})),function(e){e.Parameters="parameters",e.Payloads="payloads",e.Headers="headers",e.Components="components",e.Objects="objects",e.Arrays="arrays",e.OneOfs="oneOfs",e.AllOfs="allOfs",e.AnyOfs="anyOfs",e.Nots="nots",e.PropertyNames="propertyNames",e.PatternProperties="patternProperties",e.Contains="contains",e.Ifs="ifs",e.Thenes="thenes",e.Elses="elses",e.Dependencies="dependencies",e.Definitions="definitions"}(n=t.SchemaTypesToIterate||(t.SchemaTypesToIterate={})),t.traverseAsyncApiDocument=function(e,t,i=[]){0===i.length&&(i=Object.values(n));const s={callback:t,schemaTypesToIterate:i,seenSchemas:new Set};if(e.channels().isEmpty()||e.channels().all().forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(n.Parameters)&&Object.values(e.parameters().filterBy((e=>e.hasSchema()))||{}).forEach((e=>{r(e.schema(),null,t)})),e.messages().all().forEach((e=>{o(e,t)}))}(e,s)})),i.includes(n.Components)&&!e.components().isEmpty()){const t=e.components();Object.values(t.messages().all()||{}).forEach((e=>{o(e,s)})),Object.values(t.schemas().all()||{}).forEach((e=>{r(e,null,s)})),i.includes(n.Parameters)&&Object.values(t.channelParameters().filterBy((e=>e.hasSchema()))).forEach((e=>{r(e.schema(),null,s)})),Object.values(t.messageTraits().all()||{}).forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:i}=t;i.includes(n.Headers)&&e.hasHeaders()&&r(e.headers(),null,t)}(e,s)}))}}},100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserAPIVersion=void 0,t.ParserAPIVersion=3},64864:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseModel=void 0,t.BaseModel=class{constructor(e,t={}){this._json=e,this._meta=t}json(e){return void 0===e||null===this._json||void 0===this._json?this._json:this._json[e]}meta(e){return void 0===e?this._meta:this._meta?this._meta[e]:void 0}jsonPath(e){return"string"!=typeof e?this._meta.pointer:`${this._meta.pointer}/${e}`}createModel(e,t,i){return new e(t,Object.assign(Object.assign({},i),{asyncapi:this._meta.asyncapi}))}}},17187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},26044:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},64605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0,t.Collection=class extends Array{constructor(e,t={}){super(...e),this.collections=e,this._meta=t}has(e){return void 0!==this.get(e)}all(){return this.collections}isEmpty(){return 0===this.collections.length}filterBy(e){return this.collections.filter(e)}meta(e){return void 0===e?this._meta:this._meta?this._meta[String(e)]:void 0}}},99130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},11765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49487:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91679:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentations=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.ExternalDocumentations=r},6573:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(i(18063),t),r(i(60995),t),r(i(100),t),r(i(64864),t),r(i(17187),t),r(i(26044),t),r(i(64605),t),r(i(89130),t),r(i(93422),t),r(i(40956),t),r(i(60323),t),r(i(99130),t),r(i(23838),t),r(i(40937),t),r(i(11765),t),r(i(49487),t),r(i(24454),t),r(i(3112),t),r(i(38447),t),r(i(39402),t),r(i(34448),t),r(i(42584),t),r(i(3482),t),r(i(18522),t),r(i(97383),t),r(i(94856),t),r(i(43166),t),r(i(4327),t),r(i(85850),t),r(i(18895),t),r(i(36045),t),r(i(35510),t),r(i(2149),t),r(i(32653),t),r(i(21051),t),r(i(94627),t),r(i(63407),t),r(i(91506),t),r(i(83977),t),r(i(92512),t),r(i(24400),t),r(i(10933),t),r(i(13030),t),r(i(37876),t),r(i(18360),t),r(i(9998),t),r(i(55006),t),r(i(9159),t)},38447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},42584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},97383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85850:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35510:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10933:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18360:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38415:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemasFromDocument=t.createModel=void 0;const n=i(31277);t.createModel=function(e,t,i,n){return new e(t,Object.assign(Object.assign({},i),{asyncapi:i.asyncapi||(null==n?void 0:n.meta().asyncapi)}))},t.schemasFromDocument=function(e,t,i){const r=new Set,o=new Set;let s=Object.values(n.SchemaTypesToIterate);return i||(s=s.filter((e=>e!==n.SchemaTypesToIterate.Components))),(0,n.traverseAsyncApiDocument)(e,(function(e){r.has(e.json())||(r.add(e.json()),o.add(e))}),s),new t(Array.from(o))}},7961:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAPIDocument=void 0;const n=i(64864),r=i(78090),o=i(91346),s=i(13133),a=i(39775),c=i(57868),p=i(55975),d=i(33655),l=i(3813),f=i(50739),u=i(67695),h=i(31943),m=i(44886),y=i(1698),g=i(38415);class b extends n.BaseModel{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(r.Info,this._json.info,{pointer:"/info"})}servers(){return new d.Servers(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(l.Server,t,{id:e,pointer:`/servers/${e}`}))))}channels(){return new o.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(s.Channel,t,{id:e,address:e,pointer:`/channels/${(0,y.tilde)(e)}`}))))}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),new c.Messages(e)}schemas(){return(0,g.schemasFromDocument)(this,h.Schemas,!1)}securitySchemes(){var e;return new f.SecuritySchemes(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(u.SecurityScheme,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(a.Components,this._json.components||{},{pointer:"/components"})}allServers(){const e=this.servers().all();return this.components().servers().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new d.Servers(e)}allChannels(){const e=this.channels().all();return this.components().channels().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new o.Channels(e)}allOperations(){const e=[];return this.allChannels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}allMessages(){const e=[];return this.allOperations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),this.components().messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new c.Messages(e)}allSchemas(){return(0,g.schemasFromDocument)(this,h.Schemas,!0)}extensions(){return(0,m.extensions)(this)}}t.AsyncAPIDocument=b},32470:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return(0,r.extensions)(this)}}t.Binding=o},79492:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=i(60323),r=i(48300),o=i(41371),s=i(38415),a=i(11821);class c extends n.Collection{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,i])=>{a.EXTENSION_REGEX.test(t)&&e.push((0,s.createModel)(o.Extension,i,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new r.Extensions(e)}}t.Bindings=c},228:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameter=void 0;const n=i(64864),r=i(90193),o=i(44886);class s extends n.BaseModel{id(){return this._meta.id}hasSchema(){return!!this._json.schema}schema(){if(this._json.schema)return this.createModel(r.Schema,this._json.schema,{pointer:`${this._meta.pointer}/schema`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return(0,o.hasDescription)(this)}description(){return(0,o.description)(this)}extensions(){return(0,o.extensions)(this)}}t.ChannelParameter=s},51311:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameters=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ChannelParameters=r},13133:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channel=void 0;const n=i(64864),r=i(51311),o=i(228),s=i(57868),a=i(55975),c=i(27956),p=i(33655),d=i(3813),l=i(44886);class f extends n.BaseModel{id(){return this._meta.id}address(){return this._meta.address}hasDescription(){return(0,l.hasDescription)(this)}description(){return(0,l.description)(this)}servers(){var e;const t=[],i=this._json.servers||[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.servers)||{}).forEach((([e,n])=>{(0===i.length||i.includes(e))&&t.push(this.createModel(d.Server,n,{id:e,pointer:`/servers/${e}`}))})),new p.Servers(t)}operations(){const e=[];return["publish","subscribe"].forEach((t=>{const i=this._json[t],n=i&&i.operationId||t;i&&e.push(this.createModel(c.Operation,i,{id:n,action:t,pointer:`${this._meta.pointer}/${t}`}))})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new s.Messages(e)}parameters(){return new r.ChannelParameters(Object.entries(this._json.parameters||{}).map((([e,t])=>this.createModel(o.ChannelParameter,t,{id:e,pointer:`${this._meta.pointer}/parameters/${e}`}))))}bindings(){return(0,l.bindings)(this)}extensions(){return(0,l.extensions)(this)}}t.Channel=f},91346:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channels=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Channels=r},39775:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Components=void 0;const n=i(64864),r=i(79492),o=i(32470),s=i(13133),a=i(228),c=i(98031),p=i(13279),d=i(3657),l=i(90193),f=i(67695),u=i(3813),h=i(87126),m=i(44886),y=i(33655),g=i(91346),b=i(57868),v=i(31943),j=i(51311),_=i(48510),x=i(10214),$=i(82465),w=i(50739),S=i(37300),P=i(55975),O=i(68851),E=i(1698);class T extends n.BaseModel{servers(){return this.createCollection("servers",y.Servers,u.Server)}channels(){return new g.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(s.Channel,t,{id:e,address:"",pointer:`/components/channels/${(0,E.tilde)(e)}`}))))}operations(){return new P.Operations([])}messages(){return this.createCollection("messages",b.Messages,O.Message)}schemas(){return this.createCollection("schemas",v.Schemas,l.Schema)}channelParameters(){return this.createCollection("parameters",j.ChannelParameters,a.ChannelParameter)}serverVariables(){return this.createCollection("serverVariables",_.ServerVariables,h.ServerVariable)}operationTraits(){return this.createCollection("operationTraits",x.OperationTraits,d.OperationTrait)}messageTraits(){return this.createCollection("messageTraits",$.MessageTraits,p.MessageTrait)}correlationIds(){return this.createCollection("correlationIds",S.CorrelationIds,c.CorrelationId)}securitySchemes(){return this.createCollection("securitySchemes",w.SecuritySchemes,f.SecurityScheme)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return(0,m.extensions)(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,i){const n=[];return Object.entries(this._json[e]||{}).forEach((([t,r])=>{n.push(this.createModel(i,r,{id:t,pointer:`/components/${e}/${t}`}))})),new t(n)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[i,n])=>{const s=n||{},a=this.meta("asyncapi"),c=`components/${e}/${i}`;return t[i]=new r.Bindings(Object.entries(s).map((([e,t])=>this.createModel(o.Binding,t,{protocol:e,pointer:`${c}/${e}`}))),{originalData:s,asyncapi:a,pointer:c}),t}),{})}}t.Components=T},38033:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contact=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return(0,r.extensions)(this)}}t.Contact=o},98031:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationId=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{location(){return this._json.location}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.CorrelationId=o},37300:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationIds=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.CorrelationIds=r},41371:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const n=i(64864);class r extends n.BaseModel{id(){return this._meta.id}value(){return this._json}}t.Extension=r},48300:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=void 0;const n=i(60323);class r extends n.Collection{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}t.Extensions=r},13241:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentation=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{url(){return this._json.url}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.ExternalDocumentation=o},18063:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsV2=t.TagV2=t.ServersV2=t.ServerV2=t.ServerVariablesV2=t.ServerVariableV2=t.SecuritySchemesV2=t.SecuritySchemeV2=t.SchemasV2=t.SchemaV2=t.OperationsV2=t.OperationV2=t.OperationTraitsV2=t.OperationTraitV2=t.OAuthFlowsV2=t.OAuthFlowV2=t.MessagesV2=t.MessageV2=t.MessageTraitsV2=t.MessageTraitV2=t.MessageExamplesV2=t.MessageExampleV2=t.LicenseV2=t.InfoV2=t.ExternalDocumentationV2=t.ExtensionsV2=t.ExtensionV2=t.CorrelationIdV2=t.ContactV2=t.ComponentsV2=t.ChannelsV2=t.ChannelV2=t.ChannelParametersV2=t.ChannelParameterV2=t.BindingsV2=t.BindingV2=t.AsyncAPIDocumentV2=void 0;var n=i(7961);Object.defineProperty(t,"AsyncAPIDocumentV2",{enumerable:!0,get:function(){return n.AsyncAPIDocument}});var r=i(32470);Object.defineProperty(t,"BindingV2",{enumerable:!0,get:function(){return r.Binding}});var o=i(79492);Object.defineProperty(t,"BindingsV2",{enumerable:!0,get:function(){return o.Bindings}});var s=i(228);Object.defineProperty(t,"ChannelParameterV2",{enumerable:!0,get:function(){return s.ChannelParameter}});var a=i(51311);Object.defineProperty(t,"ChannelParametersV2",{enumerable:!0,get:function(){return a.ChannelParameters}});var c=i(13133);Object.defineProperty(t,"ChannelV2",{enumerable:!0,get:function(){return c.Channel}});var p=i(91346);Object.defineProperty(t,"ChannelsV2",{enumerable:!0,get:function(){return p.Channels}});var d=i(39775);Object.defineProperty(t,"ComponentsV2",{enumerable:!0,get:function(){return d.Components}});var l=i(38033);Object.defineProperty(t,"ContactV2",{enumerable:!0,get:function(){return l.Contact}});var f=i(98031);Object.defineProperty(t,"CorrelationIdV2",{enumerable:!0,get:function(){return f.CorrelationId}});var u=i(41371);Object.defineProperty(t,"ExtensionV2",{enumerable:!0,get:function(){return u.Extension}});var h=i(48300);Object.defineProperty(t,"ExtensionsV2",{enumerable:!0,get:function(){return h.Extensions}});var m=i(13241);Object.defineProperty(t,"ExternalDocumentationV2",{enumerable:!0,get:function(){return m.ExternalDocumentation}});var y=i(78090);Object.defineProperty(t,"InfoV2",{enumerable:!0,get:function(){return y.Info}});var g=i(47783);Object.defineProperty(t,"LicenseV2",{enumerable:!0,get:function(){return g.License}});var b=i(96115);Object.defineProperty(t,"MessageExampleV2",{enumerable:!0,get:function(){return b.MessageExample}});var v=i(68792);Object.defineProperty(t,"MessageExamplesV2",{enumerable:!0,get:function(){return v.MessageExamples}});var j=i(13279);Object.defineProperty(t,"MessageTraitV2",{enumerable:!0,get:function(){return j.MessageTrait}});var _=i(82465);Object.defineProperty(t,"MessageTraitsV2",{enumerable:!0,get:function(){return _.MessageTraits}});var x=i(68851);Object.defineProperty(t,"MessageV2",{enumerable:!0,get:function(){return x.Message}});var $=i(57868);Object.defineProperty(t,"MessagesV2",{enumerable:!0,get:function(){return $.Messages}});var w=i(18034);Object.defineProperty(t,"OAuthFlowV2",{enumerable:!0,get:function(){return w.OAuthFlow}});var S=i(47865);Object.defineProperty(t,"OAuthFlowsV2",{enumerable:!0,get:function(){return S.OAuthFlows}});var P=i(3657);Object.defineProperty(t,"OperationTraitV2",{enumerable:!0,get:function(){return P.OperationTrait}});var O=i(10214);Object.defineProperty(t,"OperationTraitsV2",{enumerable:!0,get:function(){return O.OperationTraits}});var E=i(27956);Object.defineProperty(t,"OperationV2",{enumerable:!0,get:function(){return E.Operation}});var T=i(55975);Object.defineProperty(t,"OperationsV2",{enumerable:!0,get:function(){return T.Operations}});var A=i(90193);Object.defineProperty(t,"SchemaV2",{enumerable:!0,get:function(){return A.Schema}});var I=i(31943);Object.defineProperty(t,"SchemasV2",{enumerable:!0,get:function(){return I.Schemas}});var k=i(67695);Object.defineProperty(t,"SecuritySchemeV2",{enumerable:!0,get:function(){return k.SecurityScheme}});var M=i(50739);Object.defineProperty(t,"SecuritySchemesV2",{enumerable:!0,get:function(){return M.SecuritySchemes}});var q=i(87126);Object.defineProperty(t,"ServerVariableV2",{enumerable:!0,get:function(){return q.ServerVariable}});var R=i(48510);Object.defineProperty(t,"ServerVariablesV2",{enumerable:!0,get:function(){return R.ServerVariables}});var N=i(3813);Object.defineProperty(t,"ServerV2",{enumerable:!0,get:function(){return N.Server}});var C=i(33655);Object.defineProperty(t,"ServersV2",{enumerable:!0,get:function(){return C.Servers}});var D=i(75124);Object.defineProperty(t,"TagV2",{enumerable:!0,get:function(){return D.Tag}});var F=i(64981);Object.defineProperty(t,"TagsV2",{enumerable:!0,get:function(){return F.Tags}})},78090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const n=i(64864),r=i(38033),o=i(13241),s=i(47783),a=i(64981),c=i(75124),p=i(44886);class d extends n.BaseModel{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(r.Contact,e,{pointer:"/info/contact"})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(s.License,e,{pointer:"/info/license"})}hasExternalDocs(){const e=this._meta.asyncapi.parsed;return Object.keys(e.externalDocs||{}).length>0}externalDocs(){if(this.hasExternalDocs()){const e=this._meta.asyncapi.parsed;return this.createModel(o.ExternalDocumentation,e.externalDocs,{pointer:"/externalDocs"})}}tags(){const e=this._meta.asyncapi.parsed.tags||[];return new a.Tags(e.map(((e,t)=>this.createModel(c.Tag,e,{pointer:`/tags/${t}`}))))}extensions(){return(0,p.extensions)(this)}}t.Info=d},47783:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.License=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return(0,r.extensions)(this)}}t.License=o},96115:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExample=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return(0,r.extensions)(this)}}t.MessageExample=o},68792:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExamples=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.name()===e))}}t.MessageExamples=r},13279:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTrait=void 0;const n=i(64864),r=i(98031),o=i(68792),s=i(96115),a=i(90193),c=i(11821),p=i(44886),d=i(52741);class l extends n.BaseModel{id(){return this._json.messageId||this._meta.id||this.json(c.xParserMessageName)}hasSchemaFormat(){return void 0!==this.schemaFormat()}schemaFormat(){return this._json.schemaFormat||(0,d.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}hasMessageId(){return!!this._json.messageId}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(r.CorrelationId,this._json.correlationId,{pointer:`${this._meta.pointer}/correlationId`})}hasContentType(){return!!this._json.contentType}contentType(){var e;return this._json.contentType||(null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(a.Schema,this._json.headers,{pointer:`${this._meta.pointer}/headers`})}hasName(){return!!this._json.name}name(){return this._json.name}hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasExternalDocs(){return(0,p.hasExternalDocs)(this)}externalDocs(){return(0,p.externalDocs)(this)}examples(){return new o.MessageExamples((this._json.examples||[]).map(((e,t)=>this.createModel(s.MessageExample,e,{pointer:`${this._meta.pointer}/examples/${t}`}))))}tags(){return(0,p.tags)(this)}bindings(){return(0,p.bindings)(this)}extensions(){return(0,p.extensions)(this)}}t.MessageTrait=l},82465:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTraits=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.MessageTraits=r},68851:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const n=i(91346),r=i(55975),o=i(27956),s=i(82465),a=i(13279),c=i(33655),p=i(90193),d=i(1698);class l extends a.MessageTrait{hasPayload(){return!!this._json.payload}payload(){if(this._json.payload)return this.createModel(p.Schema,this._json.payload,{pointer:`${this._meta.pointer}/payload`,schemaFormat:this._json.schemaFormat})}servers(){const e=[],t=[];return this.channels().forEach((i=>{i.servers().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new c.Servers(e)}channels(){const e=[],t=[];return this.operations().all().forEach((i=>{i.channels().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new n.Channels(e)}operations(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,i])=>{["subscribe","publish"].forEach((n=>{const r=i[n];r&&(r.message===this._json||(r.message.oneOf||[]).includes(this._json))&&t.push(this.createModel(o.Operation,r,{id:"",pointer:`/channels/${(0,d.tilde)(e)}/${n}`,action:n}))}))})),new r.Operations(t)}traits(){return new s.MessageTraits((this._json.traits||[]).map(((e,t)=>this.createModel(a.MessageTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`}))))}}t.Message=l},57868:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Messages=r},44886:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tags=t.externalDocs=t.hasExternalDocs=t.extensions=t.description=t.hasDescription=t.bindings=void 0;const n=i(79492),r=i(32470),o=i(48300),s=i(41371),a=i(13241),c=i(64981),p=i(75124),d=i(38415),l=i(11821);function f(e){return e.json("description")}function u(e){return Object.keys(e.json("externalDocs")||{}).length>0}t.bindings=function(e){const t=e.json("bindings")||{};return new n.Bindings(Object.entries(t||{}).map((([t,i])=>(0,d.createModel)(r.Binding,i,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})},t.hasDescription=function(e){return Boolean(f(e))},t.description=f,t.extensions=function(e){const t=[];return Object.entries(e.json()).forEach((([i,n])=>{l.EXTENSION_REGEX.test(i)&&t.push((0,d.createModel)(s.Extension,n,{id:i,pointer:e.jsonPath(i)},e))})),new o.Extensions(t)},t.hasExternalDocs=u,t.externalDocs=function(e){if(u(e))return new a.ExternalDocumentation(e.json("externalDocs"))},t.tags=function(e){return new c.Tags((e.json("tags")||[]).map(((t,i)=>(0,d.createModel)(p.Tag,t,{pointer:e.jsonPath(`tags/${i}`)},e))))}},18034:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlow=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{hasAuthorizationUrl(){return!!this.json().authorizationUrl}authorizationUrl(){return this.json().authorizationUrl}hasTokenUrl(){return!!this.json().tokenUrl}tokenUrl(){return this.json().tokenUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}extensions(){return(0,r.extensions)(this)}}t.OAuthFlow=o},47865:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlows=void 0;const n=i(64864),r=i(18034),o=i(44886);class s extends n.BaseModel{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new r.OAuthFlow(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new r.OAuthFlow(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new r.OAuthFlow(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new r.OAuthFlow(this._json.password)}extensions(){return(0,o.extensions)(this)}}t.OAuthFlows=s},3657:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTrait=void 0;const n=i(64864),r=i(67695),o=i(1631),s=i(41975),a=i(44886);class c extends n.BaseModel{id(){return this.operationId()||this._meta.id}hasOperationId(){return!!this._json.operationId}operationId(){return this._json.operationId}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,a.hasDescription)(this)}description(){return(0,a.description)(this)}hasExternalDocs(){return(0,a.hasExternalDocs)(this)}externalDocs(){return(0,a.externalDocs)(this)}security(){var e,t,i,n;const a=(null===(n=null===(i=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===i?void 0:i.components)||void 0===n?void 0:n.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const i=[];return Object.entries(e).forEach((([e,n])=>{const o=this.createModel(r.SecurityScheme,a[e],{id:e,pointer:`/components/securitySchemes/${e}`});i.push(this.createModel(s.SecurityRequirement,{scheme:o,scopes:n},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new o.SecurityRequirements(i)}))}tags(){return(0,a.tags)(this)}bindings(){return(0,a.bindings)(this)}extensions(){return(0,a.extensions)(this)}}t.OperationTrait=c},10214:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTraits=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.OperationTraits=r},27956:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const n=i(91346),r=i(13133),o=i(57868),s=i(68851),a=i(10214),c=i(3657),p=i(33655),d=i(1698);class l extends c.OperationTrait{action(){return this._meta.action}isSend(){return"subscribe"===this.action()}isReceive(){return"publish"===this.action()}servers(){const e=[],t=[];return this.channels().forEach((i=>{i.servers().forEach((i=>{t.includes(i.json())||(t.push(i.json()),e.push(i))}))})),new p.Servers(e)}channels(){const e=[];return Object.entries(this._meta.asyncapi.parsed.channels||{}).forEach((([t,i])=>{i.subscribe!==this._json&&i.publish!==this._json||e.push(this.createModel(r.Channel,i,{id:t,address:t,pointer:`/channels/${(0,d.tilde)(t)}`}))})),new n.Channels(e)}messages(){let e=!1,t=[];return this._json.message&&(Array.isArray(this._json.message.oneOf)?(t=this._json.message.oneOf,e=!0):t=[this._json.message]),new o.Messages(t.map(((t,i)=>this.createModel(s.Message,t,{id:"",pointer:`${this._meta.pointer}/message${e?`/oneOf/${i}`:""}`}))))}reply(){}traits(){return new a.OperationTraits((this._json.traits||[]).map(((e,t)=>this.createModel(c.OperationTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`,action:""}))))}}t.Operation=l},55975:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operations=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}t.Operations=r},90193:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;const n=i(64864),r=i(11821),o=i(44886),s=i(52741);class a extends n.BaseModel{id(){return this.$id()||this._meta.id||this.json(r.xParserSchemaId)}$comment(){if("boolean"!=typeof this._json)return this._json.$comment}$id(){if("boolean"!=typeof this._json)return this._json.$id}$schema(){return"boolean"==typeof this._json?"http://json-schema.org/draft-07/schema#":this._json.$schema||"http://json-schema.org/draft-07/schema#"}additionalItems(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalItems?this._json.additionalItems:void 0===this._json.additionalItems||null!==this._json.additionalItems&&this.createModel(a,this._json.additionalItems,{pointer:`${this._meta.pointer}/additionalItems`,parent:this})}additionalProperties(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalProperties?this._json.additionalProperties:void 0===this._json.additionalProperties||null!==this._json.additionalProperties&&this.createModel(a,this._json.additionalProperties,{pointer:`${this._meta.pointer}/additionalProperties`,parent:this})}allOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.allOf))return this._json.allOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.anyOf))return this._json.anyOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._json)return this._json.const}contains(){if("boolean"!=typeof this._json&&"object"==typeof this._json.contains)return this.createModel(a,this._json.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._json)return this._json.contentEncoding}contentMediaType(){if("boolean"!=typeof this._json)return this._json.contentMediaType}default(){if("boolean"!=typeof this._json)return this._json.default}definitions(){if("boolean"!=typeof this._json&&"object"==typeof this._json.definitions)return Object.entries(this._json.definitions).reduce(((e,[t,i])=>(e[t]=this.createModel(a,i,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._json)return this._json.description}dependencies(){if("boolean"!=typeof this._json&&"object"==typeof this._json.dependencies)return Object.entries(this._json.dependencies).reduce(((e,[t,i])=>(e[t]=Array.isArray(i)?i:this.createModel(a,i,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._json&&(this._json.deprecated||!1)}discriminator(){if("boolean"!=typeof this._json)return this._json.discriminator}else(){if("boolean"!=typeof this._json&&"object"==typeof this._json.else)return this.createModel(a,this._json.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._json)return this._json.enum}examples(){if("boolean"!=typeof this._json)return this._json.examples}exclusiveMaximum(){if("boolean"!=typeof this._json)return this._json.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._json)return this._json.exclusiveMinimum}format(){if("boolean"!=typeof this._json)return this._json.format}isBooleanSchema(){return"boolean"==typeof this._json}if(){if("boolean"!=typeof this._json&&"object"==typeof this._json.if)return this.createModel(a,this._json.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){let e=this._meta.parent;for(;e;){if(e._json===this._json)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._json&&"object"==typeof this._json.items)return Array.isArray(this._json.items)?this._json.items.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(a,this._json.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._json)return this._json.maximum}maxItems(){if("boolean"!=typeof this._json)return this._json.maxItems}maxLength(){if("boolean"!=typeof this._json)return this._json.maxLength}maxProperties(){if("boolean"!=typeof this._json)return this._json.maxProperties}minimum(){if("boolean"!=typeof this._json)return this._json.minimum}minItems(){if("boolean"!=typeof this._json)return this._json.minItems}minLength(){if("boolean"!=typeof this._json)return this._json.minLength}minProperties(){if("boolean"!=typeof this._json)return this._json.minProperties}multipleOf(){if("boolean"!=typeof this._json)return this._json.multipleOf}not(){if("boolean"!=typeof this._json&&"object"==typeof this._json.not)return this.createModel(a,this._json.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.oneOf))return this._json.oneOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._json)return this._json.pattern}patternProperties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.patternProperties)return Object.entries(this._json.patternProperties).reduce(((e,[t,i])=>(e[t]=this.createModel(a,i,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties)return Object.entries(this._json.properties).reduce(((e,[t,i])=>(e[t]=this.createModel(a,i,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties&&"object"==typeof this._json.properties[e])return this.createModel(a,this._json.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._json&&"object"==typeof this._json.propertyNames)return this.createModel(a,this._json.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._json&&(this._json.readOnly||!1)}required(){if("boolean"!=typeof this._json)return this._json.required}schemaFormat(){return this._meta.schemaFormat||(0,s.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}then(){if("boolean"!=typeof this._json&&"object"==typeof this._json.then)return this.createModel(a,this._json.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._json)return this._json.title}type(){if("boolean"!=typeof this._json)return this._json.type}uniqueItems(){return"boolean"!=typeof this._json&&(this._json.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._json&&(this._json.writeOnly||!1)}hasExternalDocs(){return(0,o.hasExternalDocs)(this)}externalDocs(){return(0,o.externalDocs)(this)}extensions(){return(0,o.extensions)(this)}}t.Schema=a},31943:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schemas=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.Schemas=r},41975:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirement=void 0;const n=i(64864);class r extends n.BaseModel{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}t.SecurityRequirement=r},1631:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirements=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.SecurityRequirements=r},67695:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityScheme=void 0;const n=i(64864),r=i(47865),o=i(44886);class s extends n.BaseModel{id(){return this._meta.id}type(){return this._json.type}hasDescription(){return(0,o.hasDescription)(this)}description(){return(0,o.description)(this)}hasName(){return!!this._json.name}name(){return this._json.name}hasIn(){return!!this._json.in}in(){return this._json.in}hasScheme(){return!!this._json.scheme}scheme(){return this._json.scheme}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}hasFlows(){return!!this._json.flows}flows(){if(this._json.flows)return new r.OAuthFlows(this._json.flows)}hasOpenIdConnectUrl(){return!!this._json.openIdConnectUrl}openIdConnectUrl(){return this._json.openIdConnectUrl}extensions(){return(0,o.extensions)(this)}}t.SecurityScheme=s},50739:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecuritySchemes=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.SecuritySchemes=r},87126:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariable=void 0;const n=i(64864),r=i(44886);class o extends n.BaseModel{id(){return this._meta.id}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return(0,r.extensions)(this)}}t.ServerVariable=o},48510:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariables=void 0;const n=i(60323);class r extends n.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ServerVariables=r},3813:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const n=i(64864),r=i(91346),o=i(13133),s=i(57868),a=i(55975),c=i(67695),p=i(48510),d=i(87126),l=i(1631),f=i(41975),u=i(44886),h=i(1698);class m extends n.BaseModel{id(){return this._meta.id}url(){return this._json.url}host(){return new URL(this.url()).host}hasPathname(){return!!this.pathname()}pathname(){return new URL(this.url()).pathname}protocol(){return this._json.protocol}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}hasDescription(){return(0,u.hasDescription)(this)}description(){return(0,u.description)(this)}channels(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,i])=>{const n=i.servers||[];(0===n.length||n.includes(this._meta.id))&&t.push(this.createModel(o.Channel,i,{id:e,address:e,pointer:`/channels/${(0,h.tilde)(e)}`}))})),new r.Channels(t)}operations(){const e=[];return this.channels().forEach((t=>{e.push(...t.operations().all())})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new s.Messages(e)}variables(){return new p.ServerVariables(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(d.ServerVariable,t,{id:e,pointer:`${this._meta.pointer}/variables/${e}`}))))}security(){var e,t,i,n;const r=(null===(n=null===(i=null===(t=nu