apiuikit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/{index-CCaYgYrJ.js → index-BNFHYany.js} +2 -2
- package/dist/{index-aiNXwruk.js → index-C9n8KtvI.js} +1 -1
- package/dist/{index-BNxgjuJI.cjs → index-DquNnDqb.cjs} +1 -1
- package/dist/{index-Dg7zwvip.cjs → index-gbcd1jej.cjs} +2 -2
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# apiuikit
|
|
2
|
+
|
|
3
|
+
React component library for rendering API specifications. Point it at an AsyncAPI document and get a full interactive UI, which includes: servers, channels, operations, messages, schemas, with no manual mapping required.
|
|
4
|
+
|
|
5
|
+
> **Status:** AsyncAPI 3.x is fully supported today. OpenAPI support is coming soon, the same components will render OpenAPI documents once that lands.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install apiuikit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If you want to hand it a raw YAML/JSON string instead of a pre-parsed object, also install the peer dependency:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @asyncapi/parser
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage in React
|
|
20
|
+
|
|
21
|
+
The quickest path to use the kit for AsyncAPI is to pass a pre-resolved AsyncAPI document object (e.g. imported from a JSON file, or fetched from your own backend):
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import AsyncAPI from "apiuikit";
|
|
25
|
+
import "apiuikit/style.css";
|
|
26
|
+
import doc from "./asyncapi.json";
|
|
27
|
+
|
|
28
|
+
export default function App() {
|
|
29
|
+
return <AsyncAPI asyncapi={doc} />;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If you have a raw YAML/JSON string instead (e.g. entered by a user, or loaded from a file at runtime), use `AsyncAPIRenderer`, which parses and validates it for you:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { AsyncAPIRenderer } from "apiuikit";
|
|
37
|
+
import "apiuikit/style.css";
|
|
38
|
+
|
|
39
|
+
export default function App() {
|
|
40
|
+
return <AsyncAPIRenderer raw={rawYamlOrJsonString} />;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Avro and Protobuf message payloads are supported out of the box in both entry points, no extra install required.
|
|
45
|
+
|
|
46
|
+
See the full usage docs for props, configuration options, and more:
|
|
47
|
+
|
|
48
|
+
- [Without Parser](./docs/usage/no-parser.md) (`AsyncAPI` component)
|
|
49
|
+
- [With Parser](./docs/usage/with-parser.md) (`AsyncAPIRenderer` component, `parseAndRender` utility)
|
|
50
|
+
- [Avro schemas](./docs/usage/avro.md)
|
|
51
|
+
- [Protobuf schemas](./docs/usage/protobuf.md)
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
This is a monorepo. The sections below are for contributors working on the library itself, skip these if you're just consuming the published package.
|
|
56
|
+
|
|
57
|
+
### Structure
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
packages/
|
|
61
|
+
lib/ — the component library (published as "apiuikit")
|
|
62
|
+
playground/ — local dev app that consumes the library as a real package would
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Commands
|
|
66
|
+
|
|
67
|
+
All commands run from the repo root.
|
|
68
|
+
|
|
69
|
+
#### Library
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run build:lib # build the library → packages/lib/dist/
|
|
73
|
+
npm run dev:lib # start the library dev server (Vite)
|
|
74
|
+
npm run storybook # run Storybook on localhost:6006
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Playground
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm run build:lib # required once before first run
|
|
81
|
+
npm run playground # starts both the library watcher and the playground dev server
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The library rebuilds automatically whenever you change a file in `packages/lib/src/`. Reload the playground tab to pick up the new build.
|
|
85
|
+
|
|
86
|
+
### Publishing
|
|
87
|
+
|
|
88
|
+
From `packages/lib/`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm publish # runs prepublishOnly (vite build) automatically, then publishes
|
|
92
|
+
```
|
package/dist/apiuikit.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-gbcd1jej.cjs");require("react/jsx-runtime");exports.AsyncAPI=e.AsyncAPI;exports.AsyncAPIRenderer=e.AsyncAPIRenderer;exports.SchemaTab=e.SchemaTabs;exports.SchemaTree=e.SchemaTree;exports.default=e.AsyncAPI;exports.defaultConfig=e.defaultConfig;exports.parseAndRender=e.parseAndRender;exports.useAsyncAPIDocument=e.useAsyncAPIDocument;
|
package/dist/apiuikit.es.js
CHANGED
|
@@ -5080,7 +5080,7 @@ function Ts(e) {
|
|
|
5080
5080
|
return e;
|
|
5081
5081
|
}
|
|
5082
5082
|
const Vl = ({ schema: e }) => {
|
|
5083
|
-
const t = JSON.stringify(Ts(e), null, 2);
|
|
5083
|
+
const t = typeof e == "string" ? e : JSON.stringify(Ts(e), null, 2);
|
|
5084
5084
|
return /* @__PURE__ */ p(Hl, { code: t });
|
|
5085
5085
|
}, ge = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Jt = (e) => ge(e) ? e : null, Uo = "^[\0-ÿ]*$", Zf = Math.pow(-2, 31), Xf = Math.pow(2, 31) - 1, Yf = Math.pow(-2, 63), $f = Math.pow(2, 63) - 1, Kf = {
|
|
5086
5086
|
null: "null",
|
|
@@ -15250,7 +15250,7 @@ function Gh(e) {
|
|
|
15250
15250
|
}
|
|
15251
15251
|
async function em() {
|
|
15252
15252
|
try {
|
|
15253
|
-
const e = await import("./index-
|
|
15253
|
+
const e = await import("./index-C9n8KtvI.js").then((n) => n.i), t = e.default ?? e;
|
|
15254
15254
|
if (typeof t != "function")
|
|
15255
15255
|
throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");
|
|
15256
15256
|
return t;
|
|
@@ -5,7 +5,7 @@ var Vp = (xi) => {
|
|
|
5
5
|
var vd = (xi, Oi, Ai) => Oi in xi ? bd(xi, Oi, { enumerable: !0, configurable: !0, writable: !0, value: Ai }) : xi[Oi] = Ai;
|
|
6
6
|
var Np = (xi, Oi, Ai) => vd(xi, typeof Oi != "symbol" ? Oi + "" : Oi, Ai), Fp = (xi, Oi, Ai) => Oi.has(xi) || Vp("Cannot " + Ai);
|
|
7
7
|
var ir = (xi, Oi, Ai) => (Fp(xi, Oi, "read from private field"), Ai ? Ai.call(xi) : Oi.get(xi)), so = (xi, Oi, Ai) => Oi.has(xi) ? Vp("Cannot add the same private member more than once") : Oi instanceof WeakSet ? Oi.add(xi) : Oi.set(xi, Ai), da = (xi, Oi, Ai, sn) => (Fp(xi, Oi, "write to private field"), sn ? sn.call(xi, Ai) : Oi.set(xi, Ai), Ai);
|
|
8
|
-
import { g as jd } from "./index-
|
|
8
|
+
import { g as jd } from "./index-BNFHYany.js";
|
|
9
9
|
function $d(xi, Oi) {
|
|
10
10
|
for (var Ai = 0; Ai < Oi.length; Ai++) {
|
|
11
11
|
const sn = Oi[Ai];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bd=Object.defineProperty;var Vp=xi=>{throw TypeError(xi)};var vd=(xi,Oi,Ai)=>Oi in xi?bd(xi,Oi,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):xi[Oi]=Ai;var Np=(xi,Oi,Ai)=>vd(xi,typeof Oi!="symbol"?Oi+"":Oi,Ai),Fp=(xi,Oi,Ai)=>Oi.has(xi)||Vp("Cannot "+Ai);var ir=(xi,Oi,Ai)=>(Fp(xi,Oi,"read from private field"),Ai?Ai.call(xi):Oi.get(xi)),so=(xi,Oi,Ai)=>Oi.has(xi)?Vp("Cannot add the same private member more than once"):Oi instanceof WeakSet?Oi.add(xi):Oi.set(xi,Ai),da=(xi,Oi,Ai,sn)=>(Fp(xi,Oi,"write to private field"),sn?sn.call(xi,Ai):Oi.set(xi,Ai),Ai);const jd=require("./index-Dg7zwvip.cjs");function $d(xi,Oi){for(var Ai=0;Ai<Oi.length;Ai++){const sn=Oi[Ai];if(typeof sn!="string"&&!Array.isArray(sn)){for(const li in sn)if(li!=="default"&&!(li in xi)){const xr=Object.getOwnPropertyDescriptor(sn,li);xr&&Object.defineProperty(xi,li,xr.get?xr:{enumerable:!0,get:()=>sn[li]})}}}return Object.freeze(Object.defineProperty(xi,Symbol.toStringTag,{value:"Module"}))}var es={exports:{}};/*! For license information please see index.js.LICENSE.txt */var xd=es.exports,Up;function _d(){return Up||(Up=1,(function(xi,Oi){(function(Ai,sn){xi.exports=sn()})(typeof self<"u"?self:xd,(()=>(()=>{var Ai={37233:(E,e,r)=>{E.exports={schemas:{"2.0.0":r(4023),"2.1.0":r(88520),"2.2.0":r(83105),"2.3.0":r(11306),"2.4.0":r(64939),"2.5.0":r(55708),"2.6.0":r(11669),"3.0.0":r(64292),"3.1.0":r(28243)},schemasWithoutId:{"2.0.0":r(69486),"2.1.0":r(61401),"2.2.0":r(30192),"2.3.0":r(85323),"2.4.0":r(45002),"2.5.0":r(85765),"2.6.0":r(94220),"3.0.0":r(95309),"3.1.0":r(88178)}}},64868:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(8839);e.resolveFile=function(n){return new Promise(((c,f)=>{const t=n.href();i.readFile(t,"utf8",((d,l)=>{d?f(d):c(l)}))}))}},71602:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(55478),n=r(98203);class c extends Error{constructor(){super(...arguments),this.name="OpenError"}}e.OpenError=c;class f extends Error{constructor(){super(...arguments),this.name="ReadError"}}function t(d,l={}){return i.__awaiter(this,void 0,void 0,(function*(){const h=d.href(),u=yield n.default(h,l);if(u.ok)return u.text();throw u.status===404?new c(`Page not found: ${h}`):new f(`${u.status} ${u.statusText}`)}))}e.NetworkError=f,e.resolveHttp=t,e.createResolveHttp=function(d={}){return l=>t(l,d)}},54668:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});var i=r(71602);e.createResolveHttp=i.createResolveHttp,e.resolveHttp=i.resolveHttp,e.NetworkError=i.NetworkError,e.OpenError=i.OpenError;var n=r(64868);e.resolveFile=n.resolveFile},30924:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Cache=void 0,e.Cache=class{constructor(r={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=r.stdTTL}get stats(){return this._stats}get(r){const i=this._data[r];if(i&&(!this._stdTTL||new Date().getTime()-i.ts<this._stdTTL))return this._stats.hits+=1,i.val;this._stats.misses+=1}set(r,i){this._data[r]={ts:new Date().getTime(),val:i}}has(r){return r in this._data}purge(){Object.assign(this._stats,{hits:0,misses:0}),this._data={}}}},91226:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveCrawler=void 0;const i=r(46734),n=r(30524),c=r(46123),f=r(19899);e.ResolveCrawler=class{constructor(t,d,l){this._resolved=l,this.resolvers=[],this.pointerGraph=new n.DepGraph({circular:!0}),this.pointerStemGraph=new n.DepGraph({circular:!0}),this.computeGraph=(h,u=[],j="#",b=[])=>{j||(j="#");let O=this._runner.computeRef({val:h,jsonPointer:j,pointerStack:b});if(O!==void 0)this._resolveRef({ref:O,val:h,parentPath:u,pointerStack:b,parentPointer:j,cacheKey:j,resolvingPointer:this.jsonPointer});else if(typeof h=="object")for(const x in h){if(!h.hasOwnProperty(x))continue;const _=h[x],g=f.addToJSONPointer(j,x);O=this._runner.computeRef({key:x,val:_,jsonPointer:g,pointerStack:b}),u.push(x),O!==void 0?this._resolveRef({ref:O,val:_,parentPath:u,parentPointer:g,pointerStack:b,cacheKey:f.uriToJSONPointer(O),resolvingPointer:this.jsonPointer}):typeof _=="object"&&this.computeGraph(_,u,g,b),u.pop()}},this._resolveRef=h=>{const{pointerStack:u,parentPath:j,parentPointer:b,ref:O}=h;if(f.uriIsJSONPointer(O)){if(this._runner.dereferenceInline){const x=f.uriToJSONPointer(O);let _;try{_=(0,i.pointerToPath)(x)}catch{return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${O}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let g=_.length>0;for(const D in _)if(j[D]!==_[D]){g=!1;break}if(g)return;this.pointerStemGraph.hasNode(x)||this.pointerStemGraph.addNode(x);let S="#",R="";for(let D=0;D<j.length;D++){const N=j[D];if(N===_[D])S+=`/${N}`;else{R+=`/${N}`;const w=`${S}${R}`;w!==b&&w!==x&&(this.pointerStemGraph.hasNode(w)||this.pointerStemGraph.addNode(w),this.pointerStemGraph.addDependency(w,x))}}this.pointerGraph.hasNode(b)||this.pointerGraph.addNode(b),this.pointerGraph.hasNode(x)||this.pointerGraph.addNode(x);const q=`${this._runner.baseUri.toString()}${x}`;this._runner.graph.hasNode(q)||this._runner.graph.addNode(q,{refMap:{}}),this._runner.root!==q&&this._runner.graph.addDependency(this._runner.root,q),this.pointerGraph.addDependency(b,x),this.jsonPointer&&(u.length<2||!u.includes(x))&&(u.push(x),this.computeGraph(c(this._runner.source,_),_,x,u),u.pop())}}else{const x=O.toString();this._runner.graph.hasNode(x)||this._runner.graph.addNode(x,{refMap:{}}),this._runner.root!==x&&this._runner.graph.addDependency(this._runner.root,x),this._runner.dereferenceRemote&&!this._runner.atMaxUriDepth()&&this.resolvers.push(this._runner.lookupAndResolveUri(h))}},this.jsonPointer=d,this._runner=t}}},16586:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGetRef=e.Cache=void 0,r(70824).__exportStar(r(65582),e);var i=r(30924);Object.defineProperty(e,"Cache",{enumerable:!0,get:function(){return i.Cache}});var n=r(49850);Object.defineProperty(e,"defaultGetRef",{enumerable:!0,get:function(){return n.defaultGetRef}})},65582:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Resolver=void 0;const i=r(30524),n=r(30924),c=r(49850);e.Resolver=class{constructor(f={}){this.ctx={},this.uriCache=f.uriCache||new n.Cache,this.resolvers=f.resolvers||{},this.getRef=f.getRef,this.transformRef=f.transformRef,this.dereferenceInline=f.dereferenceInline===void 0||f.dereferenceInline,this.dereferenceRemote=f.dereferenceRemote===void 0||f.dereferenceRemote,this.parseResolveResult=f.parseResolveResult,this.transformDereferenceResult=f.transformDereferenceResult,this.ctx=f.ctx}resolve(f,t={}){const d=new i.DepGraph({circular:!0});return new c.ResolveRunner(f,d,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},49850:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveRunner=e.defaultGetRef=void 0;const i=r(70824),n=r(46734),c=r(98136),f=r(30524),t=r(79725),d=r(46123),l=r(41263),h=r(99472),u=r(99960),j=r(30924),b=r(91226),O=r(19899),x=r(2940);let _=0;e.defaultGetRef=(S,R)=>{if(R&&typeof R=="object"&&typeof R.$ref=="string")return R.$ref};class g{constructor(R,q=new f.DepGraph({circular:!0}),D={}){this.ctx={},this.computeRef=T=>{const z=this.getRef(T.key,T.val);if(z===void 0)return;let J=new u.ExtendedURI(z);if(z[0]!=="#")if(this.isFile(J)){let F=J.toString();J.is("absolute")||(F=this.baseUri.toString()?(0,c.join)((0,c.dirname)(this.baseUri.toString()),(0,c.stripRoot)(F)):""),F&&(J=new h((0,c.toFSPath)(F)).fragment(J.fragment()))}else(J.scheme().includes("http")||J.scheme()===""&&this.baseUri.scheme().includes("http"))&&this.baseUri.authority()!==""&&J.authority()===""&&(J=J.absoluteTo(this.baseUri));return String(J).length>0&&this.isFile(this.baseUri)&&this.isFile(J)&&this.baseUri.path()===J.path()&&(J=new u.ExtendedURI(`#${J.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},T),{ref:J,uri:this.baseUri}),this.ctx):J},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=T=>i.__awaiter(this,void 0,void 0,(function*(){const{ref:z}=T;let J=z.scheme();!this.resolvers[J]&&this.isFile(z)&&(J="file");const F=this.resolvers[J];if(!F)throw new Error(`No resolver defined for scheme '${z.scheme()||"file"}' in ref ${z.toString()}`);let H=yield F.resolve(z,this.ctx);if(this.parseResolveResult)try{H=(yield this.parseResolveResult({uriResult:H,result:H,targetAuthority:z,parentAuthority:this.baseUri,parentPath:T.parentPath,fragment:T.fragment})).result}catch(K){throw new Error(`Could not parse remote reference response for '${z.toString()}' - ${String(K)}`)}return new g(H,this.graph,{depth:this.depth+1,baseUri:z.toString(),root:z,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=T=>i.__awaiter(this,void 0,void 0,(function*(){const{val:z,ref:J,resolvingPointer:F,parentPointer:H,pointerStack:K}=T,Y=T.parentPath?T.parentPath.slice():[],ee=this.computeUriCacheKey(J),Z={uri:J,pointerStack:K,targetPath:F===H?[]:Y};if(this.uriStack.includes(ee))return Z.resolved={result:z,graph:this.graph,refMap:{},errors:[],runner:this},Z;{let A;const V=this.baseUri.toString(),Q=V&&this.depth!==0?V:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);A=yield this.lookupUri({ref:J.clone().fragment(""),fragment:J.fragment(),cacheKey:ee,parentPath:Y}),Q&&(A.uriStack=A.uriStack.concat(Q))}catch(te){Z.error={code:"RESOLVE_URI",message:String(te),uri:J,uriStack:Q?this.uriStack.concat(Q):this.uriStack,pointerStack:K,path:Y}}if(A&&(Z.resolved=yield A.resolve({jsonPointer:O.uriToJSONPointer(J),parentPath:Y}),Z.resolved.errors.length)){for(const te of Z.resolved.errors)if(te.code==="POINTER_MISSING"&&te.path.join("/")===J.fragment().slice(1)){const W=J.fragment?(0,n.trimStart)(te.path,(0,n.trimStart)(J.fragment(),"/").split("/")):te.path;W&&W.length?l(Z.resolved.result,W,z):Z.resolved.result&&(Z.resolved.result=z)}}}return Z})),this.id=_+=1,this.depth=D.depth||0,this._source=R,this.resolvers=D.resolvers||{};const N=D.baseUri||"";let w=new h(N||"");this.isFile(w)&&(w=new h((0,c.toFSPath)(N))),this.baseUri=w,this.uriStack=D.uriStack||[],this.uriCache=D.uriCache||new j.Cache,this.root=D.root&&D.root.toString()||this.baseUri.toString()||"root",this.graph=q,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&this.depth===0&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=D.getRef||e.defaultGetRef,this.transformRef=D.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=D.dereferenceInline===void 0||D.dereferenceInline,this.dereferenceRemote=D.dereferenceRemote===void 0||D.dereferenceRemote,this.parseResolveResult=D.parseResolveResult,this.transformDereferenceResult=D.transformDereferenceResult,this.ctx=D.ctx,this.lookupUri=x(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(R){return i.__awaiter(this,void 0,void 0,(function*(){const q={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let D;const N=R&&R.jsonPointer&&R.jsonPointer.trim();if(N&&N!=="#"&&N!=="#/"){try{D=(0,n.pointerToPath)(N)}catch{return q.errors.push({code:"PARSE_POINTER",message:`'${N}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),q}q.result=d(q.result,D)}if(q.result===void 0)return q.errors.push({code:"POINTER_MISSING",message:`'${N}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:D||[]}),q;const w=new b.ResolveCrawler(this,N,q);w.computeGraph(q.result,D,N||"");let T=[];if(w.resolvers.length&&(T=yield Promise.all(w.resolvers)),T.length)for(const z of T){let J=z.targetPath;J.length||(J=D||[]),q.refMap[String(this.baseUri.clone().fragment((0,n.pathToPointer)(J)))]=String(z.uri),this._setGraphNodeEdge(String(this.root),(0,n.pathToPointer)(J),String(z.uri)),z.error&&q.errors.push(z.error),z.resolved&&(z.resolved.errors&&(q.errors=q.errors.concat(z.resolved.errors)),z.resolved.result!==void 0&&(this._source=(0,t.default)(this._source,(F=>{if(z.resolved){if(!J.length)return z.resolved.result;l(F,J,z.resolved.result),this._setGraphNodeData(String(z.uri),z.resolved.result)}}))))}if(typeof this._source=="object"?(this.dereferenceInline&&(this._source=(0,t.default)(this._source,(z=>{let J=[];try{J=w.pointerGraph.overallOrder();for(const F of J){const H=w.pointerGraph.dependantsOf(F);if(!H.length)continue;const K=(0,n.pointerToPath)(F),Y=K.length===0?(0,t.original)(z):d(z,K);for(const ee of H){let Z;const A=(0,n.pointerToPath)(ee),V=w.pointerStemGraph.dependenciesOf(F);for(const Q of V)if((0,n.startsWith)(A,(0,n.pointerToPath)(Q))){Z=!0;break}Z||(q.refMap[(0,n.pathToPointer)(A)]=(0,n.pathToPointer)(K),this._setGraphNodeEdge(this.root,(0,n.pathToPointer)(A),(0,n.pathToPointer)(K)),Y!==void 0?(l(z,A,Y),this._setGraphNodeData((0,n.pathToPointer)(K),Y)):q.errors.push({code:"POINTER_MISSING",message:`'${F}' does not exist`,path:A,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch{}}))),q.result=D?d(this._source,D):this._source):q.result=this._source,this.transformDereferenceResult){const z=new h(N||"");try{const{result:J,error:F}=yield this.transformDereferenceResult({source:this.source,result:q.result,targetAuthority:z,parentAuthority:this.baseUri,parentPath:R&&R.parentPath||[],fragment:z.fragment()});if(q.result=J,F)throw new Error(`Could not transform dereferenced result for '${z.toString()}' - ${String(F)}`)}catch(J){q.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${z.fragment()!==""?`#${z.fragment()}`:""}' - ${String(J)}`,uri:z,uriStack:this.uriStack,pointerStack:[],path:D})}}return this._setGraphNodeData(this.root,this._source),q}))}_cacheKeySerializer(R){return R&&typeof R=="object"&&R.cacheKey?R.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(R){return R.clone().fragment("").toString()}isFile(R){const q=R.scheme();if(q==="file")return!0;if(q){if(!this.resolvers[q])return!0}else{if(R.toString().charAt(0)==="/")return!0;if(this.baseUri){const D=this.baseUri.scheme();return!D||D==="file"||!this.resolvers[D]}}return!1}_setGraphNodeData(R,q){if(!this.graph.hasNode(R))return;const D=this.graph.getNodeData(R)||{};D.data=q,this.graph.setNodeData(R,D)}_setGraphNodeEdge(R,q,D){if(!this.graph.hasNode(R))return;const N=this.graph.getNodeData(R)||{};N.refMap=N.refMap||{},N.refMap[q]=D,this.graph.setNodeData(R,N)}}e.ResolveRunner=g},99960:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedURI=void 0;const i=r(99472);e.ExtendedURI=class extends i{constructor(n){super(n),this._value=n.trim()}get length(){return this._value.length}}},19899:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriIsJSONPointer=e.uriToJSONPointer=e.addToJSONPointer=void 0;const r=(i,n,c)=>{const f=i.toString();let t="",d=f,l=0,h=d.indexOf(n);for(;h>-1;)t+=f.substring(l,l+h)+c,d=d.substring(h+n.length,d.length),l+=h+n.length,h=d.indexOf(n);return d.length>0&&(t+=f.substring(f.length-d.length,f.length)),t};e.addToJSONPointer=(i,n)=>{return`${i}/${c=n,r(r(c,"~","~0"),"/","~1")}`;var c},e.uriToJSONPointer=i=>"length"in i&&i.length===0?"":i.fragment()!==""?`#${i.fragment()}`:i.href()===""?"#":"",e.uriIsJSONPointer=i=>(!("length"in i)||i.length>0)&&i.path()===""},46734:(E,e,r)=>{r.r(e),r.d(e,{BUNDLE_ROOT:()=>Ee,ERRORS_ROOT:()=>Fe,KEYS:()=>ut,bundleTarget:()=>Ue,decodePointer:()=>a,decodePointerFragment:()=>qe,decodePointerUriFragment:()=>a,decycle:()=>_e,encodePointer:()=>It,encodePointerFragment:()=>Y,encodePointerUriFragment:()=>A,encodeUriPointer:()=>Z,extractPointerFromRef:()=>_t,extractSourceFromRef:()=>U,getFirstPrimitiveProperty:()=>Wt,getJsonPathForPosition:()=>X,getLastPathSegment:()=>he,getLocationForJsonPath:()=>ke,hasRef:()=>F,isExternalRef:()=>I,isLocalRef:()=>H,isPlainObject:()=>w,parseTree:()=>Qe,parseWithPointers:()=>Ae,pathToPointer:()=>V,pointerToPath:()=>s,remapRefs:()=>P,renameObjectKey:()=>Te,reparentBundleTarget:()=>Ce,resolveExternalRef:()=>ot,resolveExternalRefWithLocation:()=>Oe,resolveInlineRef:()=>B,resolveInlineRefWithLocation:()=>pe,safeParse:()=>Ve,safeStringify:()=>ze,startsWith:()=>Ye,stringify:()=>oe,toPropertyPath:()=>tt,trapAccess:()=>mt,traverse:()=>p,trimStart:()=>Ke});var i,n=r(45250),c=r(98136);function f(ne,je){je===void 0&&(je=!1);var ge=ne.length,ce=0,ye="",Ze=0,it=16,de=0,yt=0,kt=0,Bt=0,Ot=0;function lt(Ct,Mt){for(var At=0,He=0;At<Ct;){var Lt=ne.charCodeAt(ce);if(Lt>=48&&Lt<=57)He=16*He+Lt-48;else if(Lt>=65&&Lt<=70)He=16*He+Lt-65+10;else{if(!(Lt>=97&&Lt<=102))break;He=16*He+Lt-97+10}ce++,At++}return At<Ct&&(He=-1),He}function $i(){if(ye="",Ot=0,Ze=ce,yt=de,Bt=kt,ce>=ge)return Ze=ge,it=17;var Ct=ne.charCodeAt(ce);if(t(Ct)){do ce++,ye+=String.fromCharCode(Ct),Ct=ne.charCodeAt(ce);while(t(Ct));return it=15}if(d(Ct))return ce++,ye+=String.fromCharCode(Ct),Ct===13&&ne.charCodeAt(ce)===10&&(ce++,ye+=`
|
|
1
|
+
"use strict";var bd=Object.defineProperty;var Vp=xi=>{throw TypeError(xi)};var vd=(xi,Oi,Ai)=>Oi in xi?bd(xi,Oi,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):xi[Oi]=Ai;var Np=(xi,Oi,Ai)=>vd(xi,typeof Oi!="symbol"?Oi+"":Oi,Ai),Fp=(xi,Oi,Ai)=>Oi.has(xi)||Vp("Cannot "+Ai);var ir=(xi,Oi,Ai)=>(Fp(xi,Oi,"read from private field"),Ai?Ai.call(xi):Oi.get(xi)),so=(xi,Oi,Ai)=>Oi.has(xi)?Vp("Cannot add the same private member more than once"):Oi instanceof WeakSet?Oi.add(xi):Oi.set(xi,Ai),da=(xi,Oi,Ai,sn)=>(Fp(xi,Oi,"write to private field"),sn?sn.call(xi,Ai):Oi.set(xi,Ai),Ai);const jd=require("./index-gbcd1jej.cjs");function $d(xi,Oi){for(var Ai=0;Ai<Oi.length;Ai++){const sn=Oi[Ai];if(typeof sn!="string"&&!Array.isArray(sn)){for(const li in sn)if(li!=="default"&&!(li in xi)){const xr=Object.getOwnPropertyDescriptor(sn,li);xr&&Object.defineProperty(xi,li,xr.get?xr:{enumerable:!0,get:()=>sn[li]})}}}return Object.freeze(Object.defineProperty(xi,Symbol.toStringTag,{value:"Module"}))}var es={exports:{}};/*! For license information please see index.js.LICENSE.txt */var xd=es.exports,Up;function _d(){return Up||(Up=1,(function(xi,Oi){(function(Ai,sn){xi.exports=sn()})(typeof self<"u"?self:xd,(()=>(()=>{var Ai={37233:(E,e,r)=>{E.exports={schemas:{"2.0.0":r(4023),"2.1.0":r(88520),"2.2.0":r(83105),"2.3.0":r(11306),"2.4.0":r(64939),"2.5.0":r(55708),"2.6.0":r(11669),"3.0.0":r(64292),"3.1.0":r(28243)},schemasWithoutId:{"2.0.0":r(69486),"2.1.0":r(61401),"2.2.0":r(30192),"2.3.0":r(85323),"2.4.0":r(45002),"2.5.0":r(85765),"2.6.0":r(94220),"3.0.0":r(95309),"3.1.0":r(88178)}}},64868:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(8839);e.resolveFile=function(n){return new Promise(((c,f)=>{const t=n.href();i.readFile(t,"utf8",((d,l)=>{d?f(d):c(l)}))}))}},71602:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(55478),n=r(98203);class c extends Error{constructor(){super(...arguments),this.name="OpenError"}}e.OpenError=c;class f extends Error{constructor(){super(...arguments),this.name="ReadError"}}function t(d,l={}){return i.__awaiter(this,void 0,void 0,(function*(){const h=d.href(),u=yield n.default(h,l);if(u.ok)return u.text();throw u.status===404?new c(`Page not found: ${h}`):new f(`${u.status} ${u.statusText}`)}))}e.NetworkError=f,e.resolveHttp=t,e.createResolveHttp=function(d={}){return l=>t(l,d)}},54668:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});var i=r(71602);e.createResolveHttp=i.createResolveHttp,e.resolveHttp=i.resolveHttp,e.NetworkError=i.NetworkError,e.OpenError=i.OpenError;var n=r(64868);e.resolveFile=n.resolveFile},30924:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Cache=void 0,e.Cache=class{constructor(r={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=r.stdTTL}get stats(){return this._stats}get(r){const i=this._data[r];if(i&&(!this._stdTTL||new Date().getTime()-i.ts<this._stdTTL))return this._stats.hits+=1,i.val;this._stats.misses+=1}set(r,i){this._data[r]={ts:new Date().getTime(),val:i}}has(r){return r in this._data}purge(){Object.assign(this._stats,{hits:0,misses:0}),this._data={}}}},91226:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveCrawler=void 0;const i=r(46734),n=r(30524),c=r(46123),f=r(19899);e.ResolveCrawler=class{constructor(t,d,l){this._resolved=l,this.resolvers=[],this.pointerGraph=new n.DepGraph({circular:!0}),this.pointerStemGraph=new n.DepGraph({circular:!0}),this.computeGraph=(h,u=[],j="#",b=[])=>{j||(j="#");let O=this._runner.computeRef({val:h,jsonPointer:j,pointerStack:b});if(O!==void 0)this._resolveRef({ref:O,val:h,parentPath:u,pointerStack:b,parentPointer:j,cacheKey:j,resolvingPointer:this.jsonPointer});else if(typeof h=="object")for(const x in h){if(!h.hasOwnProperty(x))continue;const _=h[x],g=f.addToJSONPointer(j,x);O=this._runner.computeRef({key:x,val:_,jsonPointer:g,pointerStack:b}),u.push(x),O!==void 0?this._resolveRef({ref:O,val:_,parentPath:u,parentPointer:g,pointerStack:b,cacheKey:f.uriToJSONPointer(O),resolvingPointer:this.jsonPointer}):typeof _=="object"&&this.computeGraph(_,u,g,b),u.pop()}},this._resolveRef=h=>{const{pointerStack:u,parentPath:j,parentPointer:b,ref:O}=h;if(f.uriIsJSONPointer(O)){if(this._runner.dereferenceInline){const x=f.uriToJSONPointer(O);let _;try{_=(0,i.pointerToPath)(x)}catch{return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${O}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let g=_.length>0;for(const D in _)if(j[D]!==_[D]){g=!1;break}if(g)return;this.pointerStemGraph.hasNode(x)||this.pointerStemGraph.addNode(x);let S="#",R="";for(let D=0;D<j.length;D++){const N=j[D];if(N===_[D])S+=`/${N}`;else{R+=`/${N}`;const w=`${S}${R}`;w!==b&&w!==x&&(this.pointerStemGraph.hasNode(w)||this.pointerStemGraph.addNode(w),this.pointerStemGraph.addDependency(w,x))}}this.pointerGraph.hasNode(b)||this.pointerGraph.addNode(b),this.pointerGraph.hasNode(x)||this.pointerGraph.addNode(x);const q=`${this._runner.baseUri.toString()}${x}`;this._runner.graph.hasNode(q)||this._runner.graph.addNode(q,{refMap:{}}),this._runner.root!==q&&this._runner.graph.addDependency(this._runner.root,q),this.pointerGraph.addDependency(b,x),this.jsonPointer&&(u.length<2||!u.includes(x))&&(u.push(x),this.computeGraph(c(this._runner.source,_),_,x,u),u.pop())}}else{const x=O.toString();this._runner.graph.hasNode(x)||this._runner.graph.addNode(x,{refMap:{}}),this._runner.root!==x&&this._runner.graph.addDependency(this._runner.root,x),this._runner.dereferenceRemote&&!this._runner.atMaxUriDepth()&&this.resolvers.push(this._runner.lookupAndResolveUri(h))}},this.jsonPointer=d,this._runner=t}}},16586:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGetRef=e.Cache=void 0,r(70824).__exportStar(r(65582),e);var i=r(30924);Object.defineProperty(e,"Cache",{enumerable:!0,get:function(){return i.Cache}});var n=r(49850);Object.defineProperty(e,"defaultGetRef",{enumerable:!0,get:function(){return n.defaultGetRef}})},65582:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Resolver=void 0;const i=r(30524),n=r(30924),c=r(49850);e.Resolver=class{constructor(f={}){this.ctx={},this.uriCache=f.uriCache||new n.Cache,this.resolvers=f.resolvers||{},this.getRef=f.getRef,this.transformRef=f.transformRef,this.dereferenceInline=f.dereferenceInline===void 0||f.dereferenceInline,this.dereferenceRemote=f.dereferenceRemote===void 0||f.dereferenceRemote,this.parseResolveResult=f.parseResolveResult,this.transformDereferenceResult=f.transformDereferenceResult,this.ctx=f.ctx}resolve(f,t={}){const d=new i.DepGraph({circular:!0});return new c.ResolveRunner(f,d,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},49850:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveRunner=e.defaultGetRef=void 0;const i=r(70824),n=r(46734),c=r(98136),f=r(30524),t=r(79725),d=r(46123),l=r(41263),h=r(99472),u=r(99960),j=r(30924),b=r(91226),O=r(19899),x=r(2940);let _=0;e.defaultGetRef=(S,R)=>{if(R&&typeof R=="object"&&typeof R.$ref=="string")return R.$ref};class g{constructor(R,q=new f.DepGraph({circular:!0}),D={}){this.ctx={},this.computeRef=T=>{const z=this.getRef(T.key,T.val);if(z===void 0)return;let J=new u.ExtendedURI(z);if(z[0]!=="#")if(this.isFile(J)){let F=J.toString();J.is("absolute")||(F=this.baseUri.toString()?(0,c.join)((0,c.dirname)(this.baseUri.toString()),(0,c.stripRoot)(F)):""),F&&(J=new h((0,c.toFSPath)(F)).fragment(J.fragment()))}else(J.scheme().includes("http")||J.scheme()===""&&this.baseUri.scheme().includes("http"))&&this.baseUri.authority()!==""&&J.authority()===""&&(J=J.absoluteTo(this.baseUri));return String(J).length>0&&this.isFile(this.baseUri)&&this.isFile(J)&&this.baseUri.path()===J.path()&&(J=new u.ExtendedURI(`#${J.fragment()}`)),this.transformRef?this.transformRef(Object.assign(Object.assign({},T),{ref:J,uri:this.baseUri}),this.ctx):J},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=T=>i.__awaiter(this,void 0,void 0,(function*(){const{ref:z}=T;let J=z.scheme();!this.resolvers[J]&&this.isFile(z)&&(J="file");const F=this.resolvers[J];if(!F)throw new Error(`No resolver defined for scheme '${z.scheme()||"file"}' in ref ${z.toString()}`);let H=yield F.resolve(z,this.ctx);if(this.parseResolveResult)try{H=(yield this.parseResolveResult({uriResult:H,result:H,targetAuthority:z,parentAuthority:this.baseUri,parentPath:T.parentPath,fragment:T.fragment})).result}catch(K){throw new Error(`Could not parse remote reference response for '${z.toString()}' - ${String(K)}`)}return new g(H,this.graph,{depth:this.depth+1,baseUri:z.toString(),root:z,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=T=>i.__awaiter(this,void 0,void 0,(function*(){const{val:z,ref:J,resolvingPointer:F,parentPointer:H,pointerStack:K}=T,Y=T.parentPath?T.parentPath.slice():[],ee=this.computeUriCacheKey(J),Z={uri:J,pointerStack:K,targetPath:F===H?[]:Y};if(this.uriStack.includes(ee))return Z.resolved={result:z,graph:this.graph,refMap:{},errors:[],runner:this},Z;{let A;const V=this.baseUri.toString(),Q=V&&this.depth!==0?V:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);A=yield this.lookupUri({ref:J.clone().fragment(""),fragment:J.fragment(),cacheKey:ee,parentPath:Y}),Q&&(A.uriStack=A.uriStack.concat(Q))}catch(te){Z.error={code:"RESOLVE_URI",message:String(te),uri:J,uriStack:Q?this.uriStack.concat(Q):this.uriStack,pointerStack:K,path:Y}}if(A&&(Z.resolved=yield A.resolve({jsonPointer:O.uriToJSONPointer(J),parentPath:Y}),Z.resolved.errors.length)){for(const te of Z.resolved.errors)if(te.code==="POINTER_MISSING"&&te.path.join("/")===J.fragment().slice(1)){const W=J.fragment?(0,n.trimStart)(te.path,(0,n.trimStart)(J.fragment(),"/").split("/")):te.path;W&&W.length?l(Z.resolved.result,W,z):Z.resolved.result&&(Z.resolved.result=z)}}}return Z})),this.id=_+=1,this.depth=D.depth||0,this._source=R,this.resolvers=D.resolvers||{};const N=D.baseUri||"";let w=new h(N||"");this.isFile(w)&&(w=new h((0,c.toFSPath)(N))),this.baseUri=w,this.uriStack=D.uriStack||[],this.uriCache=D.uriCache||new j.Cache,this.root=D.root&&D.root.toString()||this.baseUri.toString()||"root",this.graph=q,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&this.depth===0&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=D.getRef||e.defaultGetRef,this.transformRef=D.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=D.dereferenceInline===void 0||D.dereferenceInline,this.dereferenceRemote=D.dereferenceRemote===void 0||D.dereferenceRemote,this.parseResolveResult=D.parseResolveResult,this.transformDereferenceResult=D.transformDereferenceResult,this.ctx=D.ctx,this.lookupUri=x(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(R){return i.__awaiter(this,void 0,void 0,(function*(){const q={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let D;const N=R&&R.jsonPointer&&R.jsonPointer.trim();if(N&&N!=="#"&&N!=="#/"){try{D=(0,n.pointerToPath)(N)}catch{return q.errors.push({code:"PARSE_POINTER",message:`'${N}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),q}q.result=d(q.result,D)}if(q.result===void 0)return q.errors.push({code:"POINTER_MISSING",message:`'${N}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:D||[]}),q;const w=new b.ResolveCrawler(this,N,q);w.computeGraph(q.result,D,N||"");let T=[];if(w.resolvers.length&&(T=yield Promise.all(w.resolvers)),T.length)for(const z of T){let J=z.targetPath;J.length||(J=D||[]),q.refMap[String(this.baseUri.clone().fragment((0,n.pathToPointer)(J)))]=String(z.uri),this._setGraphNodeEdge(String(this.root),(0,n.pathToPointer)(J),String(z.uri)),z.error&&q.errors.push(z.error),z.resolved&&(z.resolved.errors&&(q.errors=q.errors.concat(z.resolved.errors)),z.resolved.result!==void 0&&(this._source=(0,t.default)(this._source,(F=>{if(z.resolved){if(!J.length)return z.resolved.result;l(F,J,z.resolved.result),this._setGraphNodeData(String(z.uri),z.resolved.result)}}))))}if(typeof this._source=="object"?(this.dereferenceInline&&(this._source=(0,t.default)(this._source,(z=>{let J=[];try{J=w.pointerGraph.overallOrder();for(const F of J){const H=w.pointerGraph.dependantsOf(F);if(!H.length)continue;const K=(0,n.pointerToPath)(F),Y=K.length===0?(0,t.original)(z):d(z,K);for(const ee of H){let Z;const A=(0,n.pointerToPath)(ee),V=w.pointerStemGraph.dependenciesOf(F);for(const Q of V)if((0,n.startsWith)(A,(0,n.pointerToPath)(Q))){Z=!0;break}Z||(q.refMap[(0,n.pathToPointer)(A)]=(0,n.pathToPointer)(K),this._setGraphNodeEdge(this.root,(0,n.pathToPointer)(A),(0,n.pathToPointer)(K)),Y!==void 0?(l(z,A,Y),this._setGraphNodeData((0,n.pathToPointer)(K),Y)):q.errors.push({code:"POINTER_MISSING",message:`'${F}' does not exist`,path:A,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch{}}))),q.result=D?d(this._source,D):this._source):q.result=this._source,this.transformDereferenceResult){const z=new h(N||"");try{const{result:J,error:F}=yield this.transformDereferenceResult({source:this.source,result:q.result,targetAuthority:z,parentAuthority:this.baseUri,parentPath:R&&R.parentPath||[],fragment:z.fragment()});if(q.result=J,F)throw new Error(`Could not transform dereferenced result for '${z.toString()}' - ${String(F)}`)}catch(J){q.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${z.fragment()!==""?`#${z.fragment()}`:""}' - ${String(J)}`,uri:z,uriStack:this.uriStack,pointerStack:[],path:D})}}return this._setGraphNodeData(this.root,this._source),q}))}_cacheKeySerializer(R){return R&&typeof R=="object"&&R.cacheKey?R.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(R){return R.clone().fragment("").toString()}isFile(R){const q=R.scheme();if(q==="file")return!0;if(q){if(!this.resolvers[q])return!0}else{if(R.toString().charAt(0)==="/")return!0;if(this.baseUri){const D=this.baseUri.scheme();return!D||D==="file"||!this.resolvers[D]}}return!1}_setGraphNodeData(R,q){if(!this.graph.hasNode(R))return;const D=this.graph.getNodeData(R)||{};D.data=q,this.graph.setNodeData(R,D)}_setGraphNodeEdge(R,q,D){if(!this.graph.hasNode(R))return;const N=this.graph.getNodeData(R)||{};N.refMap=N.refMap||{},N.refMap[q]=D,this.graph.setNodeData(R,N)}}e.ResolveRunner=g},99960:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedURI=void 0;const i=r(99472);e.ExtendedURI=class extends i{constructor(n){super(n),this._value=n.trim()}get length(){return this._value.length}}},19899:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriIsJSONPointer=e.uriToJSONPointer=e.addToJSONPointer=void 0;const r=(i,n,c)=>{const f=i.toString();let t="",d=f,l=0,h=d.indexOf(n);for(;h>-1;)t+=f.substring(l,l+h)+c,d=d.substring(h+n.length,d.length),l+=h+n.length,h=d.indexOf(n);return d.length>0&&(t+=f.substring(f.length-d.length,f.length)),t};e.addToJSONPointer=(i,n)=>{return`${i}/${c=n,r(r(c,"~","~0"),"/","~1")}`;var c},e.uriToJSONPointer=i=>"length"in i&&i.length===0?"":i.fragment()!==""?`#${i.fragment()}`:i.href()===""?"#":"",e.uriIsJSONPointer=i=>(!("length"in i)||i.length>0)&&i.path()===""},46734:(E,e,r)=>{r.r(e),r.d(e,{BUNDLE_ROOT:()=>Ee,ERRORS_ROOT:()=>Fe,KEYS:()=>ut,bundleTarget:()=>Ue,decodePointer:()=>a,decodePointerFragment:()=>qe,decodePointerUriFragment:()=>a,decycle:()=>_e,encodePointer:()=>It,encodePointerFragment:()=>Y,encodePointerUriFragment:()=>A,encodeUriPointer:()=>Z,extractPointerFromRef:()=>_t,extractSourceFromRef:()=>U,getFirstPrimitiveProperty:()=>Wt,getJsonPathForPosition:()=>X,getLastPathSegment:()=>he,getLocationForJsonPath:()=>ke,hasRef:()=>F,isExternalRef:()=>I,isLocalRef:()=>H,isPlainObject:()=>w,parseTree:()=>Qe,parseWithPointers:()=>Ae,pathToPointer:()=>V,pointerToPath:()=>s,remapRefs:()=>P,renameObjectKey:()=>Te,reparentBundleTarget:()=>Ce,resolveExternalRef:()=>ot,resolveExternalRefWithLocation:()=>Oe,resolveInlineRef:()=>B,resolveInlineRefWithLocation:()=>pe,safeParse:()=>Ve,safeStringify:()=>ze,startsWith:()=>Ye,stringify:()=>oe,toPropertyPath:()=>tt,trapAccess:()=>mt,traverse:()=>p,trimStart:()=>Ke});var i,n=r(45250),c=r(98136);function f(ne,je){je===void 0&&(je=!1);var ge=ne.length,ce=0,ye="",Ze=0,it=16,de=0,yt=0,kt=0,Bt=0,Ot=0;function lt(Ct,Mt){for(var At=0,He=0;At<Ct;){var Lt=ne.charCodeAt(ce);if(Lt>=48&&Lt<=57)He=16*He+Lt-48;else if(Lt>=65&&Lt<=70)He=16*He+Lt-65+10;else{if(!(Lt>=97&&Lt<=102))break;He=16*He+Lt-97+10}ce++,At++}return At<Ct&&(He=-1),He}function $i(){if(ye="",Ot=0,Ze=ce,yt=de,Bt=kt,ce>=ge)return Ze=ge,it=17;var Ct=ne.charCodeAt(ce);if(t(Ct)){do ce++,ye+=String.fromCharCode(Ct),Ct=ne.charCodeAt(ce);while(t(Ct));return it=15}if(d(Ct))return ce++,ye+=String.fromCharCode(Ct),Ct===13&&ne.charCodeAt(ce)===10&&(ce++,ye+=`
|
|
2
2
|
`),de++,kt=ce,it=14;switch(Ct){case 123:return ce++,it=1;case 125:return ce++,it=2;case 91:return ce++,it=3;case 93:return ce++,it=4;case 58:return ce++,it=6;case 44:return ce++,it=5;case 34:return ce++,ye=(function(){for(var Vt="",St=ce;;){if(ce>=ge){Vt+=ne.substring(St,ce),Ot=2;break}var fi=ne.charCodeAt(ce);if(fi===34){Vt+=ne.substring(St,ce),ce++;break}if(fi!==92){if(fi>=0&&fi<=31){if(d(fi)){Vt+=ne.substring(St,ce),Ot=2;break}Ot=6}ce++}else{if(Vt+=ne.substring(St,ce),++ce>=ge){Ot=2;break}switch(ne.charCodeAt(ce++)){case 34:Vt+='"';break;case 92:Vt+="\\";break;case 47:Vt+="/";break;case 98:Vt+="\b";break;case 102:Vt+="\f";break;case 110:Vt+=`
|
|
3
3
|
`;break;case 114:Vt+="\r";break;case 116:Vt+=" ";break;case 117:var ni=lt(4);ni>=0?Vt+=String.fromCharCode(ni):Ot=4;break;default:Ot=5}St=ce}}return Vt})(),it=10;case 47:var Mt=ce-1;if(ne.charCodeAt(ce+1)===47){for(ce+=2;ce<ge&&!d(ne.charCodeAt(ce));)ce++;return ye=ne.substring(Mt,ce),it=12}if(ne.charCodeAt(ce+1)===42){ce+=2;for(var At=ge-1,He=!1;ce<At;){var Lt=ne.charCodeAt(ce);if(Lt===42&&ne.charCodeAt(ce+1)===47){ce+=2,He=!0;break}ce++,d(Lt)&&(Lt===13&&ne.charCodeAt(ce)===10&&ce++,de++,kt=ce)}return He||(ce++,Ot=1),ye=ne.substring(Mt,ce),it=13}return ye+=String.fromCharCode(Ct),ce++,it=16;case 45:if(ye+=String.fromCharCode(Ct),++ce===ge||!l(ne.charCodeAt(ce)))return it=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ye+=(function(){var Vt=ce;if(ne.charCodeAt(ce)===48)ce++;else for(ce++;ce<ne.length&&l(ne.charCodeAt(ce));)ce++;if(ce<ne.length&&ne.charCodeAt(ce)===46){if(!(++ce<ne.length&&l(ne.charCodeAt(ce))))return Ot=3,ne.substring(Vt,ce);for(ce++;ce<ne.length&&l(ne.charCodeAt(ce));)ce++}var St=ce;if(ce<ne.length&&(ne.charCodeAt(ce)===69||ne.charCodeAt(ce)===101))if((++ce<ne.length&&ne.charCodeAt(ce)===43||ne.charCodeAt(ce)===45)&&ce++,ce<ne.length&&l(ne.charCodeAt(ce))){for(ce++;ce<ne.length&&l(ne.charCodeAt(ce));)ce++;St=ce}else Ot=3;return ne.substring(Vt,St)})(),it=11;default:for(;ce<ge&&pi(Ct);)ce++,Ct=ne.charCodeAt(ce);if(Ze!==ce){switch(ye=ne.substring(Ze,ce)){case"true":return it=8;case"false":return it=9;case"null":return it=7}return it=16}return ye+=String.fromCharCode(Ct),ce++,it=16}}function pi(Ct){if(t(Ct)||d(Ct))return!1;switch(Ct){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(Ct){ce=Ct,ye="",Ze=0,it=16,Ot=0},getPosition:function(){return ce},scan:je?function(){var Ct;do Ct=$i();while(Ct>=12&&Ct<=15);return Ct}:$i,getToken:function(){return it},getTokenValue:function(){return ye},getTokenOffset:function(){return Ze},getTokenLength:function(){return ce-Ze},getTokenStartLine:function(){return yt},getTokenStartCharacter:function(){return Ze-Bt},getTokenError:function(){return Ot}}}function t(ne){return ne===32||ne===9||ne===11||ne===12||ne===160||ne===5760||ne>=8192&&ne<=8203||ne===8239||ne===8287||ne===12288||ne===65279}function d(ne){return ne===10||ne===13||ne===8232||ne===8233}function l(ne){return ne>=48&&ne<=57}(function(ne){ne.DEFAULT={allowTrailingComma:!1}})(i||(i={}));var h=f,u=function ne(je,ge,ce){if((function(de,yt,kt){return yt>=de.offset&&yt<de.offset+de.length||yt===de.offset+de.length})(je,ge)){var ye=je.children;if(Array.isArray(ye))for(var Ze=0;Ze<ye.length&&ye[Ze].offset<=ge;Ze++){var it=ne(ye[Ze],ge);if(it)return it}return je}},j=function ne(je){if(!je.parent||!je.parent.children)return[];var ge=ne(je.parent);if(je.parent.type==="property"){var ce=je.parent.children[0].value;ge.push(ce)}else if(je.parent.type==="array"){var ye=je.parent.children.indexOf(je);ye!==-1&&ge.push(ye)}return ge},b=function(ne,je,ge){ge===void 0&&(ge=i.DEFAULT);var ce=f(ne,!1);function ye(Vt){return Vt?function(){return Vt(ce.getTokenOffset(),ce.getTokenLength(),ce.getTokenStartLine(),ce.getTokenStartCharacter())}:function(){return!0}}function Ze(Vt){return Vt?function(St){return Vt(St,ce.getTokenOffset(),ce.getTokenLength(),ce.getTokenStartLine(),ce.getTokenStartCharacter())}:function(){return!0}}var it=ye(je.onObjectBegin),de=Ze(je.onObjectProperty),yt=ye(je.onObjectEnd),kt=ye(je.onArrayBegin),Bt=ye(je.onArrayEnd),Ot=Ze(je.onLiteralValue),lt=Ze(je.onSeparator),$i=ye(je.onComment),pi=Ze(je.onError),Ct=ge&&ge.disallowComments,Mt=ge&&ge.allowTrailingComma;function At(){for(;;){var Vt=ce.scan();switch(ce.getTokenError()){case 4:He(14);break;case 5:He(15);break;case 3:He(13);break;case 1:Ct||He(11);break;case 2:He(12);break;case 6:He(16)}switch(Vt){case 12:case 13:Ct?He(10):$i();break;case 16:He(1);break;case 15:case 14:break;default:return Vt}}}function He(Vt,St,fi){if(St===void 0&&(St=[]),fi===void 0&&(fi=[]),pi(Vt),St.length+fi.length>0)for(var ni=ce.getToken();ni!==17;){if(St.indexOf(ni)!==-1){At();break}if(fi.indexOf(ni)!==-1)break;ni=At()}}function Lt(Vt){var St=ce.getTokenValue();return Vt?Ot(St):de(St),At(),!0}return At(),ce.getToken()===17?!!ge.allowEmptyContent||(He(4,[],[]),!1):(function Vt(){switch(ce.getToken()){case 3:return(function(){kt(),At();for(var St=!1;ce.getToken()!==4&&ce.getToken()!==17;){if(ce.getToken()===5){if(St||He(4,[],[]),lt(","),At(),ce.getToken()===4&&Mt)break}else St&&He(6,[],[]);Vt()||He(4,[],[4,5]),St=!0}return Bt(),ce.getToken()!==4?He(8,[4],[]):At(),!0})();case 1:return(function(){it(),At();for(var St=!1;ce.getToken()!==2&&ce.getToken()!==17;){if(ce.getToken()===5){if(St||He(4,[],[]),lt(","),At(),ce.getToken()===2&&Mt)break}else St&&He(6,[],[]);(ce.getToken()!==10?(He(3,[],[2,5]),0):(Lt(!1),ce.getToken()===6?(lt(":"),At(),Vt()||He(4,[],[2,5])):He(5,[],[2,5]),1))||He(4,[],[2,5]),St=!0}return yt(),ce.getToken()!==2?He(7,[2],[]):At(),!0})();case 10:return Lt(!0);default:return(function(){switch(ce.getToken()){case 11:var St=0;try{typeof(St=JSON.parse(ce.getTokenValue()))!="number"&&(He(2),St=0)}catch{He(2)}Ot(St);break;case 7:Ot(null);break;case 8:Ot(!0);break;case 9:Ot(!1);break;default:return!1}return At(),!0})()}})()?(ce.getToken()!==17&&He(9,[],[]),!0):(He(4,[],[]),!1)};function O(ne){switch(ne){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const x=`__object_order_${Math.floor(Date.now()/36e5)}__`,_=Symbol.for(x),g={defineProperty:(ne,je,ge)=>(!Object.prototype.hasOwnProperty.call(ne,je)&&_ in ne?ne[_].push(je):"value"in ge&&je===_&&ge.value.lastIndexOf(_)===-1&&ge.value.push(_),Reflect.defineProperty(ne,je,ge)),deleteProperty(ne,je){const ge=Object.prototype.hasOwnProperty.call(ne,je),ce=Reflect.deleteProperty(ne,je);if(ce&&ge&&_ in ne){const ye=ne[_].indexOf(je);ye!==-1&&ne[_].splice(ye,1)}return ce},ownKeys:ne=>_ in ne?ne[_]:Reflect.ownKeys(ne),set(ne,je,ge){const ce=Object.prototype.hasOwnProperty.call(ne,je),ye=Reflect.set(ne,je,ge);return ye&&!ce&&_ in ne&&ne[_].push(je),ye}};function S(ne,je=Reflect.ownKeys(ne)){typeof process<"u"&&R(process)&&R(process.env);const ge=new Proxy(ne,g);return(function(ce,ye){_ in ce?(ce[_].length=0,ce[_].push(...ye)):Reflect.defineProperty(ce,_,{configurable:!0,value:ye})})(ge,je),ge}function R(ne){return ne!==null&&typeof ne=="object"}var q=r(94169),D=r(11145),N=r.n(D);function w(ne){if(typeof ne!="object"||ne===null)return!1;const je=Object.getPrototypeOf(ne);return je===null||je===Object.prototype||typeof ne.constructor=="function"&&Function.toString.call(Object)===Function.toString.call(ne.constructor)}function T(ne,je,ge){if(!w(ne)&&!Array.isArray(ne)||!(je in ne))throw new ReferenceError(`Could not resolve '${ge}'`)}function z(ne){if(typeof ne.$ref!="string")throw new TypeError("$ref should be a string")}const J=ne=>w(ne)&&"$ref"in ne,F=ne=>J(ne)&&typeof ne.$ref=="string",H=ne=>ne.length>0&&(ne==="#"||/^#\S*$/.test(ne)),K=(ne,je,ge)=>{const ce=ne.toString();let ye="",Ze=ce,it=0,de=Ze.indexOf(je);for(;de>-1;)ye+=ce.substring(it,it+de)+ge,Ze=Ze.substring(de+je.length,Ze.length),it+=de+je.length,de=Ze.indexOf(je);return Ze.length>0&&(ye+=ce.substring(ce.length-Ze.length,ce.length)),ye},Y=ne=>typeof ne=="number"?ne:K(K(ne,"~","~0"),"/","~1"),ee=/[^a-zA–Z0–9_.!~*'()\/\-\u{D800}-\u{DFFF}]/gu;function Z(ne){return ne.replace(ee,encodeURIComponent)}const A=ne=>{const je=Y(ne);return typeof je=="number"?je:Z(je)},V=ne=>Q(ne),Q=ne=>{if(ne&&typeof ne!="object")throw new TypeError("Invalid type: path must be an array of segments.");return ne.length===0?"#":`#/${ne.map(A).join("/")}`};function te(ne){try{return decodeURIComponent(ne)}catch{return ne}}const W=/%[0-9a-f]+/gi,a=ne=>{let je;try{je=decodeURIComponent(ne)}catch{je=ne.replace(W,te)}return K(K(je,"~1","/"),"~0","~")},s=ne=>v(ne),v=ne=>{if(typeof ne!="string")throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(ne.length===0||ne[0]!=="#")throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(ne.length===1)return[];if(ne[1]!=="/")throw new URIError("Invalid JSON Pointer syntax.");return(je=>{const ge=je.length,ce=[];let ye=-1;for(;++ye<ge;)ce.push(a(je[ye]));return ce})(ne.substring(2).split("/"))},y=(ne,je,ge)=>{const ce={value:ne,path:ge};je.onEnter&&je.onEnter(ce);for(const ye of Object.keys(ne)){const Ze=ne[ye];je.onProperty&&je.onProperty({parent:ne,parentPath:ge,property:ye,propertyValue:Ze}),typeof Ze=="object"&&Ze!==null&&y(Ze,je,ge.concat(ye))}je.onLeave&&je.onLeave(ce)},p=(ne,je)=>{typeof ne=="object"&&ne!==null&&y(ne,typeof je=="function"?{onProperty:je}:je,[])};function P(ne,je,ge){p(ne,{onProperty({property:ce,propertyValue:ye,parent:Ze}){ce==="$ref"&&typeof ye=="string"&&ye.startsWith(je)&&(Ze.$ref=`${ge}${ye.slice(je.length)}`)}})}const I=ne=>ne.length>0&&ne[0]!=="#",U=ne=>{if(typeof ne!="string"||ne.length===0||!I(ne))return null;const je=ne.indexOf("#");return je===-1?ne:ne.slice(0,je)};function ie(ne,je){return w(je)&&w(ne)&&("summary"in ne||"description"in ne)?Object.assign(Object.assign(Object.assign({},je),"description"in ne?{description:ne.description}:null),"summary"in ne?{summary:ne.summary}:null):je}function*ae(ne,je,ge){J(ne.value)&&(z(ne.value),yield[-1,ne.value]);for(const[ce,ye]of je.entries())T(ne.value,ye,ge),ne.value=ne.value[ye],J(ne.value)&&(z(ne.value),yield[ce,ne.value])}function B(ne,je){return pe(ne,je).value}function pe(ne,je){return(function ge(ce,ye,Ze,it){if(U(ye)!==null)throw new ReferenceError("Cannot resolve external references");const de=s(ye);let yt=[...de];ye==="#"&&J(ce)&&(z(ce),de.unshift(...s(ce.$ref)));const kt={value:ce};for(const[Bt,Ot]of ae(kt,de,ye)){if(Ze.includes(Ot))return{source:null,location:it??yt,value:Ze[Ze.length-1]};Ze.push(Ot);const lt=ge(ce,Ot.$ref,Ze,yt);kt.value=lt.value,(yt=lt.location).push(...de.slice(Bt+1))}return{source:null,location:yt,value:Ze.length>0?ie(Ze[Ze.length-1],kt.value):kt.value}})(ne,je,[])}const Ee="#/__bundled__",Fe="#/__errors__",Ue=({document:ne,path:je,bundleRoot:ge="#/__bundled__",errorsRoot:ce="#/__errors__",cloneDocument:ye=!0,keyProvider:Ze},it)=>{if(je===ge||je===ce)throw new Error("Roots do not make any sense");const de=ye?(0,n.cloneDeep)(ne):ne;return Xe(de,s(ge),s(ce),je,Ze)(je,{[je]:!0},it)},Xe=(ne,je,ge,ce,ye)=>{const Ze=new Set,it=(de,yt,kt,Bt={},Ot={},lt={})=>{const $i=s(de),pi=(0,n.get)(ne,$i);p(kt||pi,{onEnter:({value:Mt})=>{if(F(Mt)&&H(Mt.$ref)){const At=Mt.$ref;if(lt[At])return;if(At===de&&(Bt[At]="#"),Bt[At])return void(Mt.$ref=Bt[At]);let He,Lt,Vt,St,fi;try{let ni;He=s(At),ye&&(ni=ye({document:ne,path:He})),ni||(ni=(({document:fn,path:Ii})=>Ii.length===0?"root":Array.isArray((0,n.get)(fn,Ii.slice(0,-1)))?`${Ii[Ii.length-2]}_${Ii[Ii.length-1]}`:String(Ii[Ii.length-1]))({document:ne,path:He})),Vt=ni;let Ci=1;for(;Ze.has(Vt);)if(Vt=`${ni}_${++Ci}`,Ci>20)throw new Error(`Keys ${ni}_2 through ${ni}_20 already taken.`);Ze.add(Vt),Lt=[...je,Vt],St=V(Lt)}catch(ni){lt[At]=ni instanceof Error?ni.message:String(ni)}if(!He||!Lt||!St)return;if(typeof ne=="object"&&ne!==null&&!(fi=(0,n.get)(ne,He)))try{fi=B(Object(ne),At)}catch{}fi!==void 0&&(Bt[At]=St,Mt.$ref=St,(0,n.has)(Ot,Lt)||(Array.isArray(fi)?(0,n.set)(Ot,Lt,new Array(fi.length).fill(null)):typeof fi=="object"&&(0,n.setWith)(Ot,Lt,{},Object),(0,n.set)(Ot,Lt,fi),At==="#"?(function(ni,Ci,fn,Ii){const vn=fn.map((Vi=>`[${JSON.stringify(Vi)}]`)).join(""),ci=JSON.parse(JSON.stringify((0,n.omit)(Object(ni),vn))),ei={};(0,n.set)(Ci,Ii,ci),(0,n.set)(ci,fn,ei),P(ci,"#",V(Ii)),ei.$ref="#"})(ne,Ot,s(ce),Lt):yt[At]||(yt[At]=!0,it(de,yt,fi,Bt,Ot,lt),yt[At]=!1)))}}});const Ct=(0,n.get)(Ot,je);return Ct&&Object.keys(Ct).length&&(0,n.set)(pi,je,Ct),(Object.keys(lt).length||(0,n.has)(ne,ge))&&(0,n.set)(pi,ge,(0,n.has)(ne,ge)?(0,n.get)(ne,ge):lt),pi};return it},qe=ne=>K(K(ne,"~1","/"),"~0","~"),_e=(ne,je)=>{const ge=new WeakMap;return(function ce(ye,Ze){let it;if(je&&(ye=je(ye)),w(ye)||Array.isArray(ye)){const de=ge.get(ye);return de?{$ref:de}:(ge.set(ye,V(Ze)),Array.isArray(ye)?it=ye.map(((yt,kt)=>ce(yt,[...Ze,String(kt)]))):(it={},Object.keys(ye).forEach((yt=>{it[yt]=ce(ye[yt],[...Ze,yt])}))),ge.delete(ye),it)}return ye})(ne,[])},It=ne=>K(K(ne,"~","~0"),"//","/~1"),_t=ne=>{if(typeof ne!="string"||ne.length===0)return null;const je=ne.indexOf("#");return je===-1?null:ne.slice(je)},Wt=ne=>{const je=h(ne,!0);if(je.scan(),je.getToken()!==1||(je.scan(),je.getToken()===2))return;if(je.getToken()!==10)throw new SyntaxError("Unexpected character");const ge=je.getTokenValue();if(je.scan(),je.getToken()!==6)throw new SyntaxError("Colon expected");switch(je.scan(),je.getToken()){case 10:return[ge,je.getTokenValue()];case 11:return[ge,Number(je.getTokenValue())];case 8:return[ge,!0];case 9:return[ge,!1];case 7:return[ge,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},X=({lineMap:ne,ast:je},ge)=>{const ce=ne[ge.line],ye=ne[ge.line+1];if(ce===void 0)return;const Ze=u(je,ye===void 0?ce+ge.character:Math.min(ye,ce+ge.character));if(Ze===void 0)return;const it=j(Ze);return it.length!==0?it:void 0};function he(ne){return qe(ne.split("/").pop()||"")}const ke=({ast:ne},je,ge=!1)=>{const ce=(function(ye,Ze,it){e:for(const de of Ze){const yt=Number.isInteger(Number(de))?Number(de):de;if(typeof yt=="string"||typeof yt=="number"&&ye.type!=="array"){if(ye.type!=="object"||!Array.isArray(ye.children))return it?ye:void 0;for(const kt of ye.children)if(Array.isArray(kt.children)&&kt.children[0].value===String(yt)&&kt.children.length===2){ye=kt.children[1];continue e}return it?ye:void 0}if(ye.type!=="array"||yt<0||!Array.isArray(ye.children)||yt>=ye.children.length)return it?ye:void 0;ye=ye.children[yt]}return ye})(ne,je,ge);if(ce!==void 0&&ce.range!==void 0)return{range:ce.range}},Ae=(ne,je={disallowComments:!0})=>{const ge=[],{ast:ce,data:ye,lineMap:Ze}=Qe(ne,ge,je);return{data:ye,diagnostics:ge,ast:ce,lineMap:Ze}};function Qe(ne,je=[],ge){const ce=le(ne);let ye={type:"array",offset:-1,length:-1,children:[],parent:void 0},Ze=null,it=[];const de=new WeakMap,yt=[];function kt(Mt){ye.type==="property"&&(ye.length=Mt-ye.offset,ye=ye.parent)}function Bt(Mt,At,He){return{start:{line:Mt,character:At},end:{line:Mt,character:At+He}}}function Ot(Mt){return ye.children.push(Mt),Mt}function lt(Mt){Array.isArray(it)?it.push(Mt):Ze!==null&&(it[Ze]=Mt)}function $i(Mt){lt(Mt),yt.push(it),it=Mt,Ze=null}function pi(){it=yt.pop()}b(ne,{onObjectBegin:(Mt,At,He,Lt)=>{ye=Ot({type:"object",offset:Mt,length:-1,parent:ye,children:[],range:Bt(He,Lt,At)}),ge.ignoreDuplicateKeys===!1&&de.set(ye,[]),$i((function(Vt){return Vt?S({}):{}})(ge.preserveKeyOrder===!0))},onObjectProperty:(Mt,At,He,Lt,Vt)=>{if((ye=Ot({type:"property",offset:At,length:-1,parent:ye,children:[]})).children.push({type:"string",value:Mt,offset:At,length:He,parent:ye}),ge.ignoreDuplicateKeys===!1){const St=de.get(ye.parent);St&&(St.length!==0&&St.includes(Mt)?je.push({range:Bt(Lt,Vt,He),message:"DuplicateKey",severity:q.h_.Error,path:ve(ye),code:20}):St.push(Mt))}ge.preserveKeyOrder===!0&&(function(St,fi){if(!(fi in St))return;const ni=St[_],Ci=ni.indexOf(fi);Ci!==-1&&(ni.splice(Ci,1),ni.push(fi))})(it,Mt),Ze=Mt},onObjectEnd:(Mt,At,He,Lt)=>{ge.ignoreDuplicateKeys===!1&&de.delete(ye),ye.length=Mt+At-ye.offset,ye.range&&(ye.range.end.line=He,ye.range.end.character=Lt+At),ye=ye.parent,kt(Mt+At),pi()},onArrayBegin:(Mt,At,He,Lt)=>{ye=Ot({type:"array",offset:Mt,length:-1,parent:ye,children:[],range:Bt(He,Lt,At)}),$i([])},onArrayEnd:(Mt,At,He,Lt)=>{ye.length=Mt+At-ye.offset,ye.range&&(ye.range.end.line=He,ye.range.end.character=Lt+At),ye=ye.parent,kt(Mt+At),pi()},onLiteralValue:(Mt,At,He,Lt,Vt)=>{Ot({type:ct(Mt),offset:At,length:He,parent:ye,value:Mt,range:Bt(Lt,Vt,He)}),kt(At+He),lt(Mt)},onSeparator:(Mt,At)=>{ye.type==="property"&&(Mt===":"?ye.colonOffset=At:Mt===","&&kt(At))},onError:(Mt,At,He,Lt,Vt)=>{je.push({range:Bt(Lt,Vt,He),message:O(Mt),severity:q.h_.Error,code:Mt})}},ge);const Ct=ye.children[0];return Ct&&delete Ct.parent,{ast:Ct,data:it[0],lineMap:ce}}function ct(ne){switch(typeof ne){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const le=ne=>{const je=[0];let ge=0;for(;ge<ne.length;ge++)ne[ge]===`
|
|
4
4
|
`&&je.push(ge+1);return je.push(ge+1),je};function ve(ne,je=[]){return ne.type==="property"&&je.unshift(ne.children[0].value),ne.parent!==void 0?(ne.parent.type==="array"&&ne.parent.parent!==void 0&&je.unshift(ne.parent.children.indexOf(ne)),ve(ne.parent,je)):je}const Te=(ne,je,ge)=>{if(!ne||!Object.hasOwnProperty.call(ne,je)||je===ge)return ne;const ce={};for(const[ye,Ze]of Object.entries(ne))ye===je?ce[ge]=Ze:ye in ce||(ce[ye]=Ze);return ce};function be(ne){return w(ne)||Array.isArray(ne)}function Ce(ne,je,ge){if(ge.length<=1||je.length<=1)throw Error("Source/target path must not be empty and point at root");if(je.indexOf(ge)===0)throw Error("Target path cannot be contained within source");const ce=s(je);let ye=ne;for(const de of ce){if(!be(ye))return;ye=ye[de]}if(!be(ye))return;const Ze=s(ge);let it=ne;for(const[de,yt]of Ze.entries()){if(!be(it)||yt in it)return;const kt=de===Ze.length-1?ye:{};it[yt]=kt,it=kt}delete ne[ce[0]],(function de(yt,kt,Bt){for(const Ot of Object.keys(yt)){const lt=yt[Ot];if(Ot!=="$ref")be(lt)&&de(lt,kt,Bt);else{if(typeof lt!="string"||!H(lt))continue;lt.indexOf(kt)===0&&(yt[Ot]=lt.replace(kt,Bt))}}})(ne,je,ge)}async function We(ne,je,ge,ce,ye){let Ze=(function(Ot,lt){const $i=U(lt);return $i===null?Ot:(0,c.isAbsolute)($i)?$i:(0,c.join)((0,c.dirname)(Ot),$i)})(je,ge);const it=_t(ge)||"#",de=await ne[Ze],yt=s(it);let kt=[...yt];const Bt={value:de};for(const[Ot,lt]of ae(Bt,yt,it)){if(ce.includes(lt))return{source:je,location:ye??kt,value:ce[ce.length-1]};ce.push(lt);const $i=await We(ne,Ze,lt.$ref,ce,kt);({source:Ze,location:kt}=$i),Bt.value=$i.value,kt.push(...yt.slice(Ot+1))}return{source:Ze,location:kt,value:ce.length>0?ie(ce[ce.length-1],Bt.value):Bt.value}}async function ot(ne,je,ge){return(await Oe(ne,je,ge)).value}function Oe(ne,je,ge){return We(ne,je,ge,[])}const Ve=(ne,je)=>{if(typeof ne!="string")return ne;try{const ge=Re(ne);return typeof ge=="string"?ge:JSON.parse(ne,je)}catch{return}},Re=ne=>{const je=Number(ne);return Number.isFinite(je)?String(je)===ne?je:ne:NaN},ze=(ne,je,ge)=>{if(typeof ne=="string")return ne;try{return JSON.stringify(ne,je,ge)}catch{return N()(ne,je,ge)}},Ye=(ne,je)=>{if(ne instanceof Array){if(je instanceof Array){if(je.length>ne.length)return!1;for(const ge in je){if(!je.hasOwnProperty(ge))continue;const ce=parseInt(ne[ge]),ye=parseInt(je[ge]);if(isNaN(ce)&&isNaN(ye)){if(ne[ge]!==je[ge])return!1}else if(ce!==ye)return!1}}}else{if(typeof ne!="string")return!1;if(typeof je=="string")return ne.startsWith(je)}return!0},oe=(ne,je,ge)=>{const ce=ze(ne,je,ge);if(ce===void 0)throw new Error("The value could not be stringified");return ce};function tt(ne){return ne.replace(/^(\/|#\/)/,"").split("/").map(qe).map(rt).join(".")}function rt(ne){return ne.includes(".")?`["${ne.replace(/"/g,'\\"')}"]`:ne}const ut=Symbol.for(x),vt={ownKeys:ne=>ut in ne?ne[ut]:Reflect.ownKeys(ne)},mt=ne=>new Proxy(ne,vt);function Ke(ne,je){if(typeof ne=="string"&&typeof je=="string")return(0,n.trimStart)(ne,je);if(!(ne&&Array.isArray(ne)&&ne.length&&je&&Array.isArray(je)&&je.length))return ne;let ge=0;for(const ce in ne)if(ne.hasOwnProperty(ce)){if(ne[ce]!==je[ce])break;ge++}return ne.slice(ge)}},98136:(E,e,r)=>{function i(w){let T="";return w.absolute&&(w.protocol==="file"?(w.drive&&(T+=w.drive),T+="/"):(T+=w.protocol+"://",w.origin&&(T+=w.origin+"/"))),(T+=w.path.join("/"))===""&&(T="."),T}function n(w,T,z,J){this.message=w,this.expected=T,this.found=z,this.location=J,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,n)}r.r(e),r.d(e,{basename:()=>h,deserializeSrn:()=>D,dirname:()=>u,extname:()=>j,format:()=>i,isAbsolute:()=>b,isURL:()=>O,join:()=>x,normalize:()=>t,parse:()=>f,relative:()=>_,resolve:()=>g,sep:()=>S,serializeSrn:()=>N,startsWithWindowsDrive:()=>R,stripRoot:()=>q,toFSPath:()=>t}),(function(w,T){function z(){this.constructor=w}z.prototype=T.prototype,w.prototype=new z})(n,Error),n.buildMessage=function(w,T){var z={literal:function(K){return'"'+F(K.text)+'"'},class:function(K){var Y,ee="";for(Y=0;Y<K.parts.length;Y++)ee+=K.parts[Y]instanceof Array?H(K.parts[Y][0])+"-"+H(K.parts[Y][1]):H(K.parts[Y]);return"["+(K.inverted?"^":"")+ee+"]"},any:function(K){return"any character"},end:function(K){return"end of input"},other:function(K){return K.description}};function J(K){return K.charCodeAt(0).toString(16).toUpperCase()}function F(K){return K.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(Y){return"\\x0"+J(Y)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(Y){return"\\x"+J(Y)}))}function H(K){return K.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(Y){return"\\x0"+J(Y)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(Y){return"\\x"+J(Y)}))}return"Expected "+(function(K){var Y,ee,Z,A=new Array(K.length);for(Y=0;Y<K.length;Y++)A[Y]=(Z=K[Y],z[Z.type](Z));if(A.sort(),A.length>0){for(Y=1,ee=1;Y<A.length;Y++)A[Y-1]!==A[Y]&&(A[ee]=A[Y],ee++);A.length=ee}switch(A.length){case 1:return A[0];case 2:return A[0]+" or "+A[1];default:return A.slice(0,-1).join(", ")+", or "+A[A.length-1]}})(w)+" but "+(function(K){return K?'"'+F(K)+'"':"end of input"})(T)+" found."};var c=function(w,T){T=T!==void 0?T:{};var z,J,F,H,K={},Y={Path:oe},ee=oe,Z=function(ge,ce,ye,Ze){return{protocol:ge,origin:ce,absolute:!0,...ye,...Ze}},A=function(ge,ce,ye){return{protocol:ge,origin:ce,absolute:!0,...ye,path:[]}},V="http://",Q=Oe("http://",!0),te=function(ge){return"http"},W="https://",a=Oe("https://",!0),s=function(ge){return"https"},v="",y=function(){return null},p=function(ge,ce,ye){return{protocol:ge,origin:null,absolute:!0,...ce,...ye}},P="file://",I=Oe("file://",!0),U="file:",ie=Oe("file:",!0),ae=function(ge){return"file"},B=function(ge,ce){return{protocol:"file",origin:null,absolute:!0,...ge,...ce}},pe=/^[A-Za-z]/,Ee=Ve([["A","Z"],["a","z"]],!1,!1),Fe=":",Ue=Oe(":",!1),Xe=function(ge){return{drive:ge.toLowerCase()+":"}},qe=function(){return{drive:null}},_e=function(){return{drive:null}},It=function(ge){return{protocol:null,origin:null,absolute:!1,drive:null,...ge}},_t=function(ge){return{path:ge}},Wt=function(ge,ce){return[ge,...ce]},X=function(ge){return[ge]},he=".",ke=Oe(".",!1),Ae="/",Qe=Oe("/",!1),ct="\\",le=Oe("\\",!1),ve=/^[^\/\\]/,Te=Ve(["/","\\"],!0,!1),be=0,Ce=[{line:1,column:1}],We=0,ot=[];if("startRule"in T){if(!(T.startRule in Y))throw new Error(`Can't start parsing from rule "`+T.startRule+'".');ee=Y[T.startRule]}function Oe(ge,ce){return{type:"literal",text:ge,ignoreCase:ce}}function Ve(ge,ce,ye){return{type:"class",parts:ge,inverted:ce,ignoreCase:ye}}function Re(ge){var ce,ye=Ce[ge];if(ye)return ye;for(ce=ge-1;!Ce[ce];)ce--;for(ye={line:(ye=Ce[ce]).line,column:ye.column};ce<ge;)w.charCodeAt(ce)===10?(ye.line++,ye.column=1):ye.column++,ce++;return Ce[ge]=ye,ye}function ze(ge,ce){var ye=Re(ge),Ze=Re(ce);return{start:{offset:ge,line:ye.line,column:ye.column},end:{offset:ce,line:Ze.line,column:Ze.column}}}function Ye(ge){be<We||(be>We&&(We=be,ot=[]),ot.push(ge))}function oe(){var ge;return(ge=(function(){var ce,ye,Ze,it,de;return ce=be,(ye=tt())!==K&&(Ze=rt())!==K&&(it=vt())!==K&&(de=mt())!==K?ce=ye=Z(ye,Ze,it,de):(be=ce,ce=K),ce===K&&(ce=be,(ye=tt())!==K&&(Ze=rt())!==K&&(it=(function(){var yt;return(yt=v)!==K&&(yt=_e()),yt})())!==K?ce=ye=A(ye,Ze,it):(be=ce,ce=K)),ce})())===K&&(ge=(function(){var ce,ye,Ze,it;return ce=be,(ye=(function(){var de;return w.substr(be,7).toLowerCase()===P?(de=w.substr(be,7),be+=7):(de=K,Ye(I)),de===K&&(w.substr(be,5).toLowerCase()===U?(de=w.substr(be,5),be+=5):(de=K,Ye(ie))),de!==K&&(de=ae()),de})())!==K&&(Ze=ut())!==K&&(it=mt())!==K?ce=ye=p(ye,Ze,it):(be=ce,ce=K),ce})())===K&&(ge=(function(){var ce,ye,Ze;return ce=be,(ye=ut())!==K&&(Ze=mt())!==K?ce=ye=B(ye,Ze):(be=ce,ce=K),ce})())===K&&(ge=(function(){var ce,ye;return ce=be,(function(){var Ze;return(Ze=(function(){var it,de,yt;return it=be,w.charCodeAt(be)===46?(de=he,be++):(de=K,Ye(ke)),de!==K&&(yt=ne())!==K?it=de=[de,yt]:(be=it,it=K),it})())===K&&(Ze=v),Ze})()!==K&&(ye=mt())!==K?ce=It(ye):(be=ce,ce=K),ce})()),ge}function tt(){var ge,ce;return w.substr(be,7).toLowerCase()===V?(ce=w.substr(be,7),be+=7):(ce=K,Ye(Q)),ce!==K&&(ce=te()),(ge=ce)===K&&(ge=(function(){var ye;return w.substr(be,8).toLowerCase()===W?(ye=w.substr(be,8),be+=8):(ye=K,Ye(a)),ye!==K&&(ye=s()),ye})()),ge}function rt(){var ge,ce,ye;if(ge=be,ce=[],(ye=je())!==K)for(;ye!==K;)ce.push(ye),ye=je();else ce=K;return(ge=ce!==K?w.substring(ge,be):ce)===K&&(ge=be,(ce=v)!==K&&(ce=y()),ge=ce),ge}function ut(){var ge;return(ge=(function(){var ce,ye,Ze,it;return ce=be,(ye=ne())===K&&(ye=null),ye!==K?(pe.test(w.charAt(be))?(Ze=w.charAt(be),be++):(Ze=K,Ye(Ee)),Ze!==K?(w.charCodeAt(be)===58?(it=Fe,be++):(it=K,Ye(Ue)),it!==K&&ne()!==K?ce=ye=Xe(Ze):(be=ce,ce=K)):(be=ce,ce=K)):(be=ce,ce=K),ce})())===K&&(ge=vt()),ge}function vt(){var ge;return(ge=ne())!==K&&(ge=qe()),ge}function mt(){var ge;return(ge=(function ce(){var ye,Ze,it;return ye=be,(Ze=Ke())!==K&&ne()!==K&&(it=ce())!==K?ye=Ze=Wt(Ze,it):(be=ye,ye=K),ye===K&&(ye=be,(Ze=Ke())!==K&&(Ze=X(Ze)),ye=Ze),ye})())!==K&&(ge=_t(ge)),ge}function Ke(){var ge,ce,ye;if(ge=be,ce=[],(ye=je())!==K)for(;ye!==K;)ce.push(ye),ye=je();else ce=K;return(ge=ce!==K?w.substring(ge,be):ce)===K&&(ge=v),ge}function ne(){var ge;return w.charCodeAt(be)===47?(ge=Ae,be++):(ge=K,Ye(Qe)),ge===K&&(w.charCodeAt(be)===92?(ge=ct,be++):(ge=K,Ye(le))),ge}function je(){var ge;return ve.test(w.charAt(be))?(ge=w.charAt(be),be++):(ge=K,Ye(Te)),ge}if((z=ee())!==K&&be===w.length)return z;throw z!==K&&be<w.length&&Ye({type:"end"}),J=ot,F=We<w.length?w.charAt(We):null,H=We<w.length?ze(We,We+1):ze(We,We),new n(n.buildMessage(J,F),J,F,H)};function f(w){if(typeof w!="string")throw new Error(`@stoplight/path: Cannot parse ${w} because it is not a string`);return c(w,{})}function t(w){return i(d(f(w)))}function d(w){let T=w.path;T=T.filter((J=>J!==""&&J!=="."));const z=[];for(const J of T)J===".."&&z.length&&z[z.length-1]!==".."?z.pop():J===".."&&w.absolute||z.push(J);return w.path=z,w}function l(w){let T=w.lastIndexOf(".");w===".."&&(T=-1),w==="."&&(T=-1);let z=w,J="";return T>0&&(z=w.slice(0,T),J=w.slice(T)),{name:z,ext:J}}const h=(w,T)=>{const z=d(f(w)).path.pop();if(!z)return"";const{name:J,ext:F}=l(z);return T===!0||T===F?J:`${J}${F}`},u=w=>{const T=d(f(w));return T.path.pop(),i(d(T))},j=w=>{const T=d(f(w)).path.pop();if(!T)return"";const{ext:z}=l(T);return z};function b(w){return f(w).absolute}function O(w){const T=f(w);return T.protocol==="http"||T.protocol==="https"}const x=(...w)=>{if(w.length===0)return".";const T=w.map(f),z=Object.assign({},T[0]);for(let J=1;J<T.length;J++){const F=T[J];if(F.absolute)throw new Error('Cannot join an absolute path "'+w[J]+'" in the middle of other paths.');for(const H of F.path)z.path.push(H)}return i(d(z))};function _(w,T){const z=d(f(T));if(!z.absolute)return i(z);const J=d(f(w));if(z.origin!==J.origin||!J.absolute||J.drive!==z.drive)return i(z);const F=Math.min(J.path.length,z.path.length);for(let H=0;H<F&&J.path[0]===z.path[0];H++)J.path.shift(),z.path.shift();return z.path.unshift(...J.path.fill("..")),i({origin:null,drive:null,absolute:!1,protocol:null,path:z.path})}function g(...w){if(w.length===0)return".";const T=d(f(w[w.length-1]));return T.absolute?i(T):x(...w)}const S="/",R=w=>f(w).drive!==null,q=w=>f(w).path.filter(Boolean).join("/");function D(w){const[T,z,J,...F]=w.split("/"),H=F.length?`/${F.join("/")}`:void 0;let K,Y;return H&&(K=F.find((ee=>ee.includes("."))))&&(Y=l(K).ext),{shortcode:T,orgSlug:z,projectSlug:J,uri:H,file:K,ext:Y}}function N({shortcode:w,orgSlug:T,projectSlug:z,uri:J=""}){return[w,T,z,J.replace(/^\//,"")].filter(Boolean).join("/")}},99999:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.aas2_6=e.aas2_5=e.aas2_4=e.aas2_3=e.aas2_2=e.aas2_1=e.aas2_0=e.asyncapi2=e.asyncApi2=e.aas2=void 0;const i=r(46734),n=/^2\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/,c=/^2\.0(?:\.[0-9]*)?$/,f=/^2\.1(?:\.[0-9]*)?$/,t=/^2\.2(?:\.[0-9]*)?$/,d=/^2\.3(?:\.[0-9]*)?$/,l=/^2\.4(?:\.[0-9]*)?$/,h=/^2\.5(?:\.[0-9]*)?$/,u=/^2\.6(?:\.[0-9]*)?$/,j=b=>(0,i.isPlainObject)(b)&&"asyncapi"in b&&n.test(String(b.asyncapi));e.aas2=j,e.aas2.displayName="AsyncAPI 2.x",e.asyncApi2=e.aas2,e.asyncapi2=e.aas2,e.aas2_0=b=>j(b)&&c.test(String(b.asyncapi)),e.aas2_0.displayName="AsyncAPI 2.0.x",e.aas2_1=b=>j(b)&&f.test(String(b.asyncapi)),e.aas2_1.displayName="AsyncAPI 2.1.x",e.aas2_2=b=>j(b)&&t.test(String(b.asyncapi)),e.aas2_2.displayName="AsyncAPI 2.2.x",e.aas2_3=b=>j(b)&&d.test(String(b.asyncapi)),e.aas2_3.displayName="AsyncAPI 2.3.x",e.aas2_4=b=>j(b)&&l.test(String(b.asyncapi)),e.aas2_4.displayName="AsyncAPI 2.4.x",e.aas2_5=b=>j(b)&&h.test(String(b.asyncapi)),e.aas2_5.displayName="AsyncAPI 2.5.x",e.aas2_6=b=>j(b)&&u.test(String(b.asyncapi)),e.aas2_6.displayName="AsyncAPI 2.6.x"},67423:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(57494);(0,i.__exportStar)(r(59171),e),(0,i.__exportStar)(r(99999),e),(0,i.__exportStar)(r(86202),e)},86202:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.detectDialect=e.extractDraftVersion=e.jsonSchemaDraft2020_12=e.jsonSchemaDraft2019_09=e.jsonSchemaDraft7=e.jsonSchemaDraft6=e.jsonSchemaDraft4=e.jsonSchemaLoose=e.jsonSchema=void 0;const i=r(46734),n=["array","boolean","integer","null","number","object","string"],c=["allOf","oneOf","anyOf","not","if"],f=/^https?:\/\/json-schema.org\/(?:draft-0([467])|draft\/(20(?:19-09|20-12)))\/(?:hyper-)?schema#?$/,t=h=>(function(u){return(0,i.isPlainObject)(u)&&"$schema"in u&&typeof u.$schema=="string"})(h)&&h.$schema.includes("//json-schema.org/");function d(h,u){const j=b=>t(b)&&l(b.$schema)===h;return j.displayName=u,j}function l(h){var u;const j=f.exec(h);return j!==null?`draft${(u=j[1])!==null&&u!==void 0?u:j[2]}`:null}e.jsonSchema=t,e.jsonSchema.displayName="JSON Schema",e.jsonSchemaLoose=h=>(0,i.isPlainObject)(h)&&(t(h)||(u=>"type"in u&&(typeof u.type=="string"?n.includes(u.type):Array.isArray(u.type)&&u.type.every((j=>n.includes(j)))))(h)||(u=>Array.isArray(u.enum))(h)||(u=>c.some((j=>j in u&&typeof u[j]=="object"&&u[j]!==null)))(h)),e.jsonSchemaLoose.displayName="JSON Schema (loose)",e.jsonSchemaDraft4=d("draft4","JSON Schema Draft 4"),e.jsonSchemaDraft6=d("draft6","JSON Schema Draft 6"),e.jsonSchemaDraft7=d("draft7","JSON Schema Draft 7"),e.jsonSchemaDraft2019_09=d("draft2019-09","JSON Schema Draft 2019-09"),e.jsonSchemaDraft2020_12=d("draft2020-12","JSON Schema Draft 2020-12"),e.extractDraftVersion=l,e.detectDialect=function(h){return t(h)?l(h.$schema):null}},59171:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.oas3_1=e.oas3_0=e.oas3=e.oas2=void 0;const i=r(46734);e.oas2=c=>(0,i.isPlainObject)(c)&&"swagger"in c&&parseInt(String(c.swagger))===2,e.oas2.displayName="OpenAPI 2.0 (Swagger)";const n=c=>(0,i.isPlainObject)(c)&&"openapi"in c&&Number.parseInt(String(c.openapi))===3;e.oas3=n,e.oas3.displayName="OpenAPI 3.x",e.oas3_0=c=>n(c)&&/^3\.0(?:\.[0-9]*)?$/.test(String(c.openapi)),e.oas3_0.displayName="OpenAPI 3.0.x",e.oas3_1=c=>n(c)&&/^3\.1(?:\.[0-9]*)?$/.test(String(c.openapi)),e.oas3_1.displayName="OpenAPI 3.1.x"},40456:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(45250),n=r(23859),c=r(95955),f=r(9251),t=(l,h)=>typeof l!="number"&&!Number.isNaN(Number(l))||typeof h!="number"&&Number.isNaN(Number(h))?typeof l!="string"||typeof h!="string"?0:l.localeCompare(h):Math.min(1,Math.max(-1,Number(l)-Number(h)));function d(l){return typeof l=="string"||typeof l=="number"}e.default=(0,n.createRulesetFunction)({input:{type:["object","array"]},options:f.optionSchemas.alphabetical},(function(l,h,{path:u,documentInventory:j}){var b,O;let x;if(x=Array.isArray(l)?l:Object.keys((O=(b=j.findAssociatedItemForPath(u,!0))===null||b===void 0?void 0:b.document.trapAccess(l))!==null&&O!==void 0?O:l),x.length<2)return;const _=h==null?void 0:h.keyedBy;if(_!==void 0){const S=[];for(const R of x){if(!(0,i.isObject)(R))return[{message:'#{{print("property")}}must be an object'}];S.push(R[_])}x=S}if(!x.every(d))return[{message:'#{{print("property")}}must be one of the allowed types: number, string'}];const g=((S,R)=>{for(let q=0;q<S.length-1;q+=1)if(R(S[q],S[q+1])>=1)return[q,q+1];return null})(x,t);return g!=null?[{..._===void 0?{path:[...u,Array.isArray(l)?g[0]:x[g[0]]]}:null,message:_!==void 0?"properties must follow the alphabetical order":`${(0,c.printValue)(x[g[0]])} must be placed after ${(0,c.printValue)(x[g[1]])}`}]:void 0}))},97685:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CasingType=void 0;const i=r(45250),n=r(23859),c=r(9251),f=r(92805);Object.defineProperty(e,"CasingType",{enumerable:!0,get:function(){return f.CasingType}});const t={[f.CasingType.flat]:"[a-z][a-z{__DIGITS__}]*",[f.CasingType.camel]:"[a-z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[f.CasingType.pascal]:"[A-Z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[f.CasingType.kebab]:"[a-z][a-z{__DIGITS__}]*(?:-[a-z{__DIGITS__}]+)*",[f.CasingType.cobol]:"[A-Z][A-Z{__DIGITS__}]*(?:-[A-Z{__DIGITS__}]+)*",[f.CasingType.snake]:"[a-z][a-z{__DIGITS__}]*(?:_[a-z{__DIGITS__}]+)*",[f.CasingType.macro]:"[A-Z][A-Z{__DIGITS__}]*(?:_[A-Z{__DIGITS__}]+)*"};e.default=(0,n.createRulesetFunction)({input:{type:"string",minLength:1},options:c.optionSchemas.casing},(function(l,h){if(l.length!==1||h.separator===void 0||h.separator.allowLeading!==!0||l!==h.separator.char)return d(t[h.type],h).test(l)?void 0:[{message:`must be ${h.type} case`}]}));const d=(l,h)=>{const u=h.disallowDigits!==!0,j=l.replace(/\{__DIGITS__\}/g,u?"0-9":"");if(h.separator===void 0)return new RegExp(`^${j}$`);const b=`[${(0,i.escapeRegExp)(h.separator.char)}]`,O=h.separator.allowLeading===!0?`${b}?`:"";return new RegExp(`^${O}${j}(?:${b}${j})*$`)}},31181:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(9251);e.default=(0,i.createRulesetFunction)({input:null,options:n.optionSchemas.defined},(function(c){if(c===void 0)return[{message:'#{{print("property")}}must be defined'}]}))},18315:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(95955),c=r(9251);e.default=(0,i.createRulesetFunction)({input:{type:["string","number","null","boolean"]},options:c.optionSchemas.enumeration},(function(f,{values:t}){if(!t.includes(f))return[{message:`#{{print("value")}} must be equal to one of the allowed values: ${t.map(n.printValue).join(", ")}`}]}))},53547:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(9251);e.default=(0,i.createRulesetFunction)({input:null,options:n.optionSchemas.falsy},(function(c){if(c)return[{message:'#{{print("property")}}must be falsy'}]}))},69248:(E,e,r)=>{e.fK=e.vN=e.wQ=e.T1=void 0;const i=r(69371),n=((0,i.__importDefault)(r(40456)),(0,i.__importDefault)(r(97685)),(0,i.__importDefault)(r(31181)),(0,i.__importDefault)(r(18315)),(0,i.__importDefault)(r(53547)),(0,i.__importDefault)(r(54782)),(0,i.__importDefault)(r(41146)));Object.defineProperty(e,"T1",{enumerable:!0,get:function(){return n.default}});const c=(0,i.__importDefault)(r(95818));Object.defineProperty(e,"wQ",{enumerable:!0,get:function(){return c.default}});const f=(0,i.__importDefault)(r(11214));Object.defineProperty(e,"vN",{enumerable:!0,get:function(){return f.default}}),(0,i.__importDefault)(r(60928));const t=(0,i.__importDefault)(r(67884));Object.defineProperty(e,"fK",{enumerable:!0,get:function(){return t.default}}),(0,i.__importDefault)(r(6073))},54782:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(95955),c=r(46734),f=r(9251);e.default=(0,i.createRulesetFunction)({input:{type:["array","object","string","number"]},options:f.optionSchemas.length},(function(t,d){let l,h;return l=(0,c.isPlainObject)(t)?Object.keys(t).length:Array.isArray(t)?t.length:typeof t=="number"?t:t.length,"min"in d&&l<d.min&&(h=[{message:`#{{print("property")}}must be longer than ${(0,n.printValue)(d.min)}`}]),"max"in d&&l>d.max&&(h??(h=[])).push({message:`#{{print("property")}}must be shorter than ${(0,n.printValue)(d.max)}`}),h}))},9251:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.optionSchemas=void 0;const i=r(92805);e.optionSchemas={alphabetical:{type:["object","null"],properties:{keyedBy:{type:"string",description:"The key to sort an object by."}},additionalProperties:!1,errorMessage:{type:'"alphabetical" function has invalid options specified. Example valid options: null (no options), { "keyedBy": "my-key" }'}},casing:{required:["type"],type:"object",properties:{type:{type:"string",enum:Object.values(i.CasingType),errorMessage:`"casing" function and its "type" option accept the following values: ${Object.values(i.CasingType).join(", ")}`,description:"The casing type to match against."},disallowDigits:{type:"boolean",default:!1,description:"If not true, digits are allowed."},separator:{type:"object",required:["char"],additionalProperties:!1,properties:{char:{type:"string",maxLength:1,errorMessage:'"casing" function and its "separator.char" option accepts only char, i.e. "I" or "/"',description:"The additional char to separate groups of words."},allowLeading:{type:"boolean",description:"Can the group separator char be used at the first char?"}}}},additionalProperties:!1,errorMessage:{type:'"casing" function has invalid options specified. Example valid options: { "type": "camel" }, { "type": "pascal", "disallowDigits": true }'}},defined:null,enumeration:{type:"object",additionalProperties:!1,properties:{values:{type:"array",items:{type:["string","number","null","boolean"]},errorMessage:'"enumeration" and its "values" option support only arrays of primitive values, i.e. ["Berlin", "London", "Paris"]',description:"An array of possible values."}},required:["values"],errorMessage:{type:'"enumeration" function has invalid options specified. Example valid options: { "values": ["Berlin", "London", "Paris"] }, { "values": [2, 3, 5, 8, 13, 21] }'}},falsy:null,length:{type:"object",properties:{min:{type:"number",description:"The minimum length to match."},max:{type:"number",description:"The maximum length to match."}},minProperties:1,additionalProperties:!1,errorMessage:{type:'"length" function has invalid options specified. Example valid options: { "min": 2 }, { "max": 5 }, { "min": 0, "max": 10 }'}},pattern:{type:"object",additionalProperties:!1,properties:{match:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "match" option must be string or RegExp instance',description:"If provided, value must match this regex."},notMatch:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "notMatch" option must be string or RegExp instance',description:"If provided, value must _not_ match this regex."}},minProperties:1,errorMessage:{type:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }',minProperties:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }'}},truthy:null,undefined:null,schema:{additionalProperties:!1,properties:{schema:{type:"object",description:"Any valid JSON Schema document."},dialect:{enum:["auto","draft4","draft6","draft7","draft2019-09","draft2020-12"],default:"auto",description:"The JSON Schema draft used by function."},allErrors:{type:"boolean",default:!1,description:"Returns all errors when true; otherwise only returns the first error."},prepareResults:{"x-internal":!0}},required:["schema"],type:"object",errorMessage:{type:'"schema" function has invalid options specified. Example valid options: { "schema": { /* any JSON Schema can be defined here */ } , { "schema": { "type": "object" }, "dialect": "auto" }'}},unreferencedReusableObject:{type:"object",properties:{reusableObjectsLocation:{type:"string",format:"json-pointer-uri-fragment",errorMessage:'"unreferencedReusableObject" and its "reusableObjectsLocation" option support only valid JSON Pointer fragments, i.e. "#", "#/foo", "#/paths/~1user"',description:"A local json pointer to the document member holding the reusable objects (eg. #/definitions for an OAS2 document, #/components/schemas for an OAS3 document)."}},additionalProperties:!1,required:["reusableObjectsLocation"],errorMessage:{type:'"unreferencedReusableObject" function has invalid options specified. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }',required:'"unreferencedReusableObject" function is missing "reusableObjectsLocation" option. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }'}},xor:{type:"object",properties:{properties:{type:"array",items:{type:"string"},minItems:2,errorMessage:'"xor" and its "properties" option require at least 2-item tuples, i.e. ["id", "name"]',description:"The properties to check."}},additionalProperties:!1,required:["properties"],errorMessage:{type:'"xor" function has invalid options specified. Example valid options: { "properties": ["id", "name"] }, { "properties": ["country", "street"] }'}}}},41146:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(95955),c=r(9251),f=/^\/(.+)\/([a-z]*)$/,t=new Map;function d(l){const h=t.get(l);if(h!==void 0)return h.lastIndex=0,h;const u=(function(j){const b=f.exec(j);return b!==null?new RegExp(b[1],b[2]):new RegExp(j)})(l);return t.set(l,u),u}e.default=(0,i.createRulesetFunction)({input:{type:"string"},options:c.optionSchemas.pattern},(function(l,h){let u;return"match"in h&&(d(h.match).test(l)||(u=[{message:`#{{print("value")}} must match the pattern ${(0,n.printValue)(h.match)}`}])),"notMatch"in h&&d(h.notMatch).test(l)&&(u??(u=[])).push({message:`#{{print("value")}} must not match the pattern ${(0,n.printValue)(h.notMatch)}`}),u}))},79097:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createAjvInstances=void 0;const i=r(69371),n=(0,i.__importDefault)(r(11601)),c=(0,i.__importDefault)(r(88856)),f=(0,i.__importDefault)(r(88728)),t=(0,i.__importDefault)(r(33467)),d=(0,i.__importDefault)(r(74421)),l=(0,i.__importDefault)(r(67156)),h=(0,i.__importStar)(r(26443)),u=(0,i.__importStar)(r(33978)),j={warn(...x){const _=x[0];if(typeof _=="string"){if(_.startsWith("unknown format"))return;console.warn(...x)}},log:console.log,error:console.error};function b(x,_){const g=new x({allErrors:_,meta:!0,messages:!0,strict:!1,allowUnionTypes:!0,logger:j,unicodeRegExp:!1});return(0,d.default)(g),_&&(0,l.default)(g),x===n.default&&(g.addSchema(u),g.addSchema(h)),g}function O(x){let _,g;return{get default(){return _!=null||(_=b(x,!1)),_},get allErrors(){return g!=null||(g=b(x,!0)),g}}}e.createAjvInstances=function(){const x={auto:O(n.default),draft4:O(t.default),"draft2019-09":O(c.default),"draft2020-12":O(f.default)},_=new WeakMap;return function(g,S,R){var q,D,N,w;const T=((q=x[S])!==null&&q!==void 0?q:x.auto)[R?"allErrors":"default"],z=g.$id;if(typeof z=="string")return(D=T.getSchema(z))!==null&&D!==void 0?D:T.compile(g);{const J=(N=_.get(T))!==null&&N!==void 0?N:_.set(T,new WeakMap).get(T);return(w=J.get(g))!==null&&w!==void 0?w:J.set(g,T.compile(g)).get(g)}}}},95818:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(69371),n=(0,i.__importDefault)(r(58883)),c=r(67423),f=r(79097),t=(0,i.__importDefault)(r(85748)),d=r(23859),l=r(45250),h=r(9251),u=new WeakMap;e.default=(0,d.createRulesetFunction)({input:null,options:h.optionSchemas.schema},(function(j,b,{path:O,rule:x,documentInventory:_}){var g,S,R;if(j===void 0)return[{path:O,message:'#{{print("property")}}must exist'}];const q=(g=u.get(_))!==null&&g!==void 0?g:u.set(_,(0,f.createAjvInstances)()).get(_),D=[],{allErrors:N=!1,schema:w}=b;try{const T=q(w,(S=b.dialect===void 0||b.dialect==="auto"?(0,c.detectDialect)(w):b==null?void 0:b.dialect)!==null&&S!==void 0?S:"draft7",N);(T==null?void 0:T(j))===!1&&Array.isArray(T.errors)&&((R=b.prepareResults)===null||R===void 0||R.call(b,T.errors),D.push(...(0,n.default)(w,T.errors,{propertyPath:O,targetValue:j}).map((({suggestion:z,error:J,path:F})=>({message:z!==void 0?`${J}. ${z}`:J,path:[...O,...F!==""?F.replace(/^\//,"").split("/"):[]]})))))}catch(T){if(!(0,l.isError)(T))throw new Error("Unexpected error");x!=null&&x.resolved&&T instanceof t.default||D.push({message:T.message,path:O})}return D}))},11214:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(9251);e.default=(0,i.createRulesetFunction)({input:null,options:n.optionSchemas.truthy},(function(c){if(!c)return[{message:'#{{print("property")}}must be truthy'}]}))},92805:(E,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.CasingType=void 0,(r=e.CasingType||(e.CasingType={})).flat="flat",r.camel="camel",r.pascal="pascal",r.kebab="kebab",r.cobol="cobol",r.snake="snake",r.macro="macro"},60928:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(9251);e.default=(0,i.createRulesetFunction)({input:null,options:n.optionSchemas.undefined},(function(c){if(c!==void 0)return[{message:'#{{print("property")}}must be undefined'}]}))},67884:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(95955),c=r(46734),f=r(9251);e.default=(0,i.createRulesetFunction)({input:{type:"object"},options:f.optionSchemas.unreferencedReusableObject},(function(t,d,{document:l,documentInventory:h}){var u;const j=h.graph;if(j===null)throw new Error("unreferencedReusableObject requires dependency graph");const b=(u=l.source)!==null&&u!==void 0?u:"",O=Object.keys(t).map((_=>`${b}${d.reusableObjectsLocation}/${_}`)),x=new Set(j.overallOrder().map((_=>(0,c.decodePointer)(_))));return O.filter((_=>!x.has(_))).map((_=>({message:"Potential orphaned reusable object has been detected",path:(0,n.safePointerToPath)(_)})))}))},6073:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(23859),n=r(95955),c=r(9251);e.default=(0,i.createRulesetFunction)({input:{type:"object"},options:c.optionSchemas.xor},(function(f,{properties:t}){const d=[];if(Object.keys(f).filter((l=>t.includes(l))).length!==1){const l=t.map((j=>(0,n.printValue)(j))),h=l.pop();let u=l.join(", ")+(h!=null?` and ${h}`:"");u+=" must not be both defined or both undefined",d.push({message:u})}return d}))},63083:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(39862);(0,i.__exportStar)(r(50973),e),(0,i.__exportStar)(r(72708),e),(0,i.__exportStar)(r(51562),e)},50973:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Json=e.parseJson=void 0;const i=r(46734);e.parseJson=n=>(0,i.parseWithPointers)(n,{ignoreDuplicateKeys:!1,preserveKeyOrder:!0}),e.Json={parse:e.parseJson,getLocationForJsonPath:i.getLocationForJsonPath,trapAccess:i.trapAccess}},51562:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},72708:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Yaml=e.parseYaml=void 0;const i=r(3740);e.parseYaml=n=>(0,i.parseWithPointers)(n,{ignoreDuplicateKeys:!1,mergeKeys:!0,preserveKeyOrder:!0,attachComments:!1}),e.Yaml={parse:e.parseYaml,getLocationForJsonPath:function(n,c){return(0,i.getLocationForJsonPath)(n,c)},trapAccess:i.trapAccess}},88601:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createHttpAndFileResolver=e.ResolverDepGraph=e.Resolver=e.httpAndFileResolver=void 0;const i=r(2230),n=r(54668),c=r(16586);Object.defineProperty(e,"Resolver",{enumerable:!0,get:function(){return c.Resolver}});const f=r(95955),t=r(30524);function d(l){const h=(0,n.createResolveHttp)({...f.DEFAULT_REQUEST_OPTIONS,...l});return new c.Resolver({resolvers:{https:{resolve:h},http:{resolve:h},file:{resolve:n.resolveFile}}})}(0,i.__exportStar)(r(7944),e),e.httpAndFileResolver=d(),e.ResolverDepGraph=t.DepGraph,e.createHttpAndFileResolver=d},7944:(E,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},86663:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_REQUEST_OPTIONS=void 0;const i=(0,r(54078).__importDefault)(r(98203));e.DEFAULT_REQUEST_OPTIONS={},e.default=async(n,c={})=>(0,i.default)(n,{...c,...e.DEFAULT_REQUEST_OPTIONS})},95955:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_REQUEST_OPTIONS=e.fetch=void 0;const i=r(54078);(0,i.__exportStar)(r(14205),e);var n=r(86663);Object.defineProperty(e,"fetch",{enumerable:!0,get:function(){return(0,i.__importDefault)(n).default}}),Object.defineProperty(e,"DEFAULT_REQUEST_OPTIONS",{enumerable:!0,get:function(){return n.DEFAULT_REQUEST_OPTIONS}}),(0,i.__exportStar)(r(65744),e)},65744:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.readParsable=e.readFile=void 0;const i=r(54078),n=r(98136),c=(0,i.__importDefault)(r(67083)),f=(0,i.__importStar)(r(18248)),t=r(45250),d=(0,i.__importDefault)(r(86663)),l=r(92918);async function h(u,j){if((0,n.isURL)(u)){let b,O=null;try{const x={};if(x.agent=j.agent,j.timeout!==void 0){const _=new c.default;O=setTimeout((()=>{_.abort()}),j.timeout),x.signal=_.signal}if(b=await(0,d.default)(u,x),!b.ok)throw new Error(b.statusText);return await b.text()}catch(x){throw(0,t.isError)(x)&&x.name==="AbortError"?new Error("Timeout"):x}finally{O!==null&&clearTimeout(O)}}else try{return await new Promise(((b,O)=>{f.readFile(u,j.encoding,((x,_)=>{x!==null?O(x):b(_)}))}))}catch(b){throw new Error(`Could not read ${u}: ${(0,l.printError)(b)}`)}}e.readFile=h,e.readParsable=async function(u,j){try{return await h(u,j)}catch(b){throw new Error(`Could not parse ${u}: ${(0,l.printError)(b)}`)}}},39090:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSegmentFragment=void 0;const i=r(46734);e.decodeSegmentFragment=function(n){return typeof n!="string"?String(n):(0,i.decodePointerFragment)(n)}},14205:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=r(54078);(0,i.__exportStar)(r(39090),e),(0,i.__exportStar)(r(92918),e),(0,i.__exportStar)(r(73389),e),(0,i.__exportStar)(r(24569),e),(0,i.__exportStar)(r(6291),e)},92918:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.printError=void 0;const i=r(45250);e.printError=function(n){return(0,i.isError)(n)?n.message:"unknown error"}},73389:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.printPath=e.PrintStyle=void 0;const i=r(46734);var n;(function(f){f.Dot="dot",f.Pointer="pointer",f.EscapedPointer="escapedPointer"})(n=e.PrintStyle||(e.PrintStyle={}));const c=f=>typeof f=="number"?f:(0,i.decodePointerFragment)(f);e.printPath=(f,t)=>{switch(t){case n.Dot:return(0,i.decodePointerFragment)((d=>d.reduce(((l,h,u)=>{var j;return`${l}${(j=(b=>{return typeof b=="number"?`[${b}]`:b.length===0?"['']":/\s/.test(b)?`['${b}']`:typeof(O=b)!="number"&&Number.isNaN(Number(O))?null:`[${b}]`;var O})(h))!==null&&j!==void 0?j:`${u===0?"":"."}${h}`}`}),""))(f));case n.Pointer:return f.length===0?"#":`#/${(0,i.decodePointerFragment)(f.join("/"))}`;case n.EscapedPointer:return(0,i.pathToPointer)(f.map(c));default:return String(f)}}},24569:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.printValue=void 0;const i=r(45250),n=r(46734);e.printValue=function(c){return c===void 0?"undefined":(0,i.isObject)(c)?Array.isArray(c)?"Array[]":c instanceof RegExp?String(c.source):!(0,n.isPlainObject)(c)&&"constructor"in c&&typeof c.constructor.name=="string"?c.constructor.name:"Object{}":JSON.stringify(c)}},6291:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestJsonPath=e.safePointerToPath=e.getEndRef=e.traverseObjUntilRef=e.isAbsoluteRef=e.startsWithProtocol=void 0;const i=r(46734),n=r(98136),c=r(45250),f=/^[a-z]+:\/\//i;e.startsWithProtocol=t=>f.test(t),e.isAbsoluteRef=t=>(0,n.isAbsolute)(t)||(0,e.startsWithProtocol)(t),e.traverseObjUntilRef=(t,d)=>{let l=t;for(const h of d.slice()){if(!(0,c.isObject)(l))throw new TypeError("Segment is not a part of the object");if(!(h in l)){if((0,i.hasRef)(l))return l.$ref;throw new Error("Segment is not a part of the object")}l=l[h],d.shift()}return(0,i.isPlainObject)(l)&&(0,i.hasRef)(l)&&Object.keys(l).length===1?l.$ref:null},e.getEndRef=(t,d)=>{for(;d in t;)d=t[d];return d},e.safePointerToPath=t=>{const d=(0,i.extractPointerFromRef)(t);return d!==null?(0,i.pointerToPath)(d):[]},e.getClosestJsonPath=(t,d)=>{const l=[];if(!(0,c.isObject)(t))return l;let h=t;for(const u of d){if(!(0,c.isObject)(h)||!(u in h))break;l.push(u),h=h[u]}return l}},29228:(E,e)=>{function r(i){return i==null}Object.defineProperty(e,"__esModule",{value:!0}),e.isNothing=r,e.isObject=function(i){return typeof i=="object"&&i!==null},e.toArray=function(i){return Array.isArray(i)?i:r(i)?[]:[i]},e.extend=function(i,n){var c,f,t,d;if(n)for(c=0,f=(d=Object.keys(n)).length;c<f;c+=1)i[t=d[c]]=n[t];return i},e.repeat=function(i,n){var c,f="";for(c=0;c<n;c+=1)f+=i;return f},e.isNegativeZero=function(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}},17128:(E,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});var i=r(29228),n=r(94716),c=r(80406),f=r(23102),t=Object.prototype.toString,d=Object.prototype.hasOwnProperty,l=9,h=10,u=13,j=32,b=33,O=34,x=35,_=37,g=38,S=39,R=42,q=44,D=45,N=58,w=61,T=62,z=63,J=64,F=91,H=93,K=96,Y=123,ee=124,Z=125,A={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},V=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Q(he){var ke,Ae,Qe;if(ke=he.toString(16).toUpperCase(),he<=255)Ae="x",Qe=2;else if(he<=65535)Ae="u",Qe=4;else{if(!(he<=4294967295))throw new n("code point within a string may not be greater than 0xFFFFFFFF");Ae="U",Qe=8}return"\\"+Ae+i.repeat("0",Qe-ke.length)+ke}function te(he){this.schema=he.schema||c,this.indent=Math.max(1,he.indent||2),this.noArrayIndent=he.noArrayIndent||!1,this.skipInvalid=he.skipInvalid||!1,this.flowLevel=i.isNothing(he.flowLevel)?-1:he.flowLevel,this.styleMap=(function(ke,Ae){var Qe,ct,le,ve,Te,be,Ce;if(Ae===null)return{};for(Qe={},le=0,ve=(ct=Object.keys(Ae)).length;le<ve;le+=1)Te=ct[le],be=String(Ae[Te]),Te.slice(0,2)==="!!"&&(Te="tag:yaml.org,2002:"+Te.slice(2)),(Ce=ke.compiledTypeMap.fallback[Te])&&d.call(Ce.styleAliases,be)&&(be=Ce.styleAliases[be]),Qe[Te]=be;return Qe})(this.schema,he.styles||null),this.sortKeys=he.sortKeys||!1,this.lineWidth=he.lineWidth||80,this.noRefs=he.noRefs||!1,this.noCompatMode=he.noCompatMode||!1,this.condenseFlow=he.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.comments=he.comments||{},this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function W(he,ke){for(var Ae,Qe=i.repeat(" ",ke),ct=0,le=-1,ve="",Te=he.length;ct<Te;)(le=he.indexOf(`
|
|
@@ -60,7 +60,7 @@ ${e}</tr>
|
|
|
60
60
|
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+Pt(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},mn=new Pl;function Re(e,t){return mn.parse(e,t)}Re.options=Re.setOptions=function(e){return mn.setOptions(e),Re.defaults=mn.defaults,Ol(Re.defaults),Re};Re.getDefaults=Ms;Re.defaults=yn;Re.use=function(...e){return mn.use(...e),Re.defaults=mn.defaults,Ol(Re.defaults),Re};Re.walkTokens=function(e,t){return mn.walkTokens(e,t)};Re.parseInline=mn.parseInline;Re.Parser=Jt;Re.parser=Jt.parse;Re.Renderer=Yr;Re.TextRenderer=qs;Re.Lexer=Wt;Re.lexer=Wt.lex;Re.Tokenizer=Xr;Re.Hooks=Vr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Jt.parse;Wt.lex;function pf(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),typeof e.emptyLangClass!="string"&&(e.emptyLangClass=""),{async:!!e.async,walkTokens(t){if(t.type!=="code")return;const n=Po(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(Do(t));const i=e.highlight(t.text,n,t.lang||"");if(i instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Do(t)(i)},useNewRenderer:!0,renderer:{code(t,n,i){typeof t=="object"&&(i=t.escaped,n=t.lang,t=t.text);const r=Po(n),s=r?e.langPrefix+Bo(r):e.emptyLangClass,o=s?` class="${s}"`:"";return t=t.replace(/\n$/,""),`<pre><code${o}>${i?t:Bo(t,!0)}
|
|
61
61
|
</code></pre>`}}}}function Po(e){return(e||"").match(/\S*/)[0]}function Do(e){return t=>{typeof t=="string"&&t!==e.text&&(e.escaped=!0,e.text=t)}}const Dl=/[&<>"']/,hf=new RegExp(Dl.source,"g"),Fl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,mf=new RegExp(Fl.source,"g"),gf={"&":"&","<":"<",">":">",'"':""","'":"'"},Fo=e=>gf[e];function Bo(e,t){if(t){if(Dl.test(e))return e.replace(hf,Fo)}else if(Fl.test(e))return e.replace(mf,Fo);return e}var vi,zo;function yf(){if(zo)return vi;zo=1;function e(b){return b instanceof Map?b.clear=b.delete=b.set=function(){throw new Error("map is read-only")}:b instanceof Set&&(b.add=b.clear=b.delete=function(){throw new Error("set is read-only")}),Object.freeze(b),Object.getOwnPropertyNames(b).forEach(A=>{const D=b[A],le=typeof D;(le==="object"||le==="function")&&!Object.isFrozen(D)&&e(D)}),b}class t{constructor(A){A.data===void 0&&(A.data={}),this.data=A.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(b){return b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(b,...A){const D=Object.create(null);for(const le in b)D[le]=b[le];return A.forEach(function(le){for(const Ie in le)D[Ie]=le[Ie]}),D}const r="</span>",s=b=>!!b.scope,o=(b,{prefix:A})=>{if(b.startsWith("language:"))return b.replace("language:","language-");if(b.includes(".")){const D=b.split(".");return[`${A}${D.shift()}`,...D.map((le,Ie)=>`${le}${"_".repeat(Ie+1)}`)].join(" ")}return`${A}${b}`};class a{constructor(A,D){this.buffer="",this.classPrefix=D.classPrefix,A.walk(this)}addText(A){this.buffer+=n(A)}openNode(A){if(!s(A))return;const D=o(A.scope,{prefix:this.classPrefix});this.span(D)}closeNode(A){s(A)&&(this.buffer+=r)}value(){return this.buffer}span(A){this.buffer+=`<span class="${A}">`}}const l=(b={})=>{const A={children:[]};return Object.assign(A,b),A};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(A){this.top.children.push(A)}openNode(A){const D=l({scope:A});this.add(D),this.stack.push(D)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(A){return this.constructor._walk(A,this.rootNode)}static _walk(A,D){return typeof D=="string"?A.addText(D):D.children&&(A.openNode(D),D.children.forEach(le=>this._walk(A,le)),A.closeNode(D)),A}static _collapse(A){typeof A!="string"&&A.children&&(A.children.every(D=>typeof D=="string")?A.children=[A.children.join("")]:A.children.forEach(D=>{c._collapse(D)}))}}class d extends c{constructor(A){super(),this.options=A}addText(A){A!==""&&this.add(A)}startScope(A){this.openNode(A)}endScope(){this.closeNode()}__addSublanguage(A,D){const le=A.root;D&&(le.scope=`language:${D}`),this.add(le)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(b){return b?typeof b=="string"?b:b.source:null}function p(b){return v("(?=",b,")")}function h(b){return v("(?:",b,")*")}function g(b){return v("(?:",b,")?")}function v(...b){return b.map(D=>f(D)).join("")}function E(b){const A=b[b.length-1];return typeof A=="object"&&A.constructor===Object?(b.splice(b.length-1,1),A):{}}function _(...b){return"("+(E(b).capture?"":"?:")+b.map(le=>f(le)).join("|")+")"}function w(b){return new RegExp(b.toString()+"|").exec("").length-1}function y(b,A){const D=b&&b.exec(A);return D&&D.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(b,{joinWith:A}){let D=0;return b.map(le=>{D+=1;const Ie=D;let ke=f(le),re="";for(;ke.length>0;){const te=O.exec(ke);if(!te){re+=ke;break}re+=ke.substring(0,te.index),ke=ke.substring(te.index+te[0].length),te[0][0]==="\\"&&te[1]?re+="\\"+String(Number(te[1])+Ie):(re+=te[0],te[0]==="("&&D++)}return re}).map(le=>`(${le})`).join(A)}const j=/\b\B/,M="[a-zA-Z]\\w*",ee="[a-zA-Z_]\\w*",q="\\b\\d+(\\.\\d+)?",Y="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",pe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",R=(b={})=>{const A=/^#![ ]*\//;return b.binary&&(b.begin=v(A,/.*\b/,b.binary,/\b.*/)),i({scope:"meta",begin:A,end:/$/,relevance:0,"on:begin":(D,le)=>{D.index!==0&&le.ignoreMatch()}},b)},k={begin:"\\\\[\\s\\S]",relevance:0},m={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[k]},T={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[k]},S={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},W=function(b,A,D={}){const le=i({scope:"comment",begin:b,end:A,contains:[]},D);le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ie=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return le.contains.push({begin:v(/[ ]+/,"(",Ie,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),le},B=W("//","$"),K=W("/\\*","\\*/"),ne=W("#","$"),be={scope:"number",begin:q,relevance:0},Q={scope:"number",begin:Y,relevance:0},we={scope:"number",begin:U,relevance:0},de={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]},G={scope:"title",begin:M,relevance:0},Ee={scope:"title",begin:ee,relevance:0},at={begin:"\\.\\s*"+ee,relevance:0};var Be=Object.freeze({__proto__:null,APOS_STRING_MODE:m,BACKSLASH_ESCAPE:k,BINARY_NUMBER_MODE:we,BINARY_NUMBER_RE:U,COMMENT:W,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:B,C_NUMBER_MODE:Q,C_NUMBER_RE:Y,END_SAME_AS_BEGIN:function(b){return Object.assign(b,{"on:begin":(A,D)=>{D.data._beginMatch=A[1]},"on:end":(A,D)=>{D.data._beginMatch!==A[1]&&D.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:M,MATCH_NOTHING_RE:j,METHOD_GUARD:at,NUMBER_MODE:be,NUMBER_RE:q,PHRASAL_WORDS_MODE:S,QUOTE_STRING_MODE:T,REGEXP_MODE:de,RE_STARTERS_RE:pe,SHEBANG:R,TITLE_MODE:G,UNDERSCORE_IDENT_RE:ee,UNDERSCORE_TITLE_MODE:Ee});function Xe(b,A){b.input[b.index-1]==="."&&A.ignoreMatch()}function jt(b,A){b.className!==void 0&&(b.scope=b.className,delete b.className)}function nn(b,A){A&&b.beginKeywords&&(b.begin="\\b("+b.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",b.__beforeBegin=Xe,b.keywords=b.keywords||b.beginKeywords,delete b.beginKeywords,b.relevance===void 0&&(b.relevance=0))}function Un(b,A){Array.isArray(b.illegal)&&(b.illegal=_(...b.illegal))}function wn(b,A){if(b.match){if(b.begin||b.end)throw new Error("begin & end are not supported with match");b.begin=b.match,delete b.match}}function Xt(b,A){b.relevance===void 0&&(b.relevance=1)}const $e=(b,A)=>{if(!b.beforeMatch)return;if(b.starts)throw new Error("beforeMatch cannot be used with starts");const D=Object.assign({},b);Object.keys(b).forEach(le=>{delete b[le]}),b.keywords=D.keywords,b.begin=v(D.beforeMatch,p(D.begin)),b.starts={relevance:0,contains:[Object.assign(D,{endsParent:!0})]},b.relevance=0,delete D.beforeMatch},rn=["of","and","for","in","not","or","if","then","parent","list","value"],We="keyword";function _n(b,A,D=We){const le=Object.create(null);return typeof b=="string"?Ie(D,b.split(" ")):Array.isArray(b)?Ie(D,b):Object.keys(b).forEach(function(ke){Object.assign(le,_n(b[ke],A,ke))}),le;function Ie(ke,re){A&&(re=re.map(te=>te.toLowerCase())),re.forEach(function(te){const he=te.split("|");le[he[0]]=[ke,Hn(he[0],he[1])]})}}function Hn(b,A){return A?Number(A):Vn(b)?0:1}function Vn(b){return rn.includes(b.toLowerCase())}const sn={},wt=b=>{console.error(b)},Ke=(b,...A)=>{console.log(`WARN: ${b}`,...A)},_t=(b,A)=>{sn[`${b}/${A}`]||(console.log(`Deprecated as of ${b}. ${A}`),sn[`${b}/${A}`]=!0)},St=new Error;function En(b,A,{key:D}){let le=0;const Ie=b[D],ke={},re={};for(let te=1;te<=A.length;te++)re[te+le]=Ie[te],ke[te+le]=!0,le+=w(A[te-1]);b[D]=re,b[D]._emit=ke,b[D]._multi=!0}function Yt(b){if(Array.isArray(b.begin)){if(b.skip||b.excludeBegin||b.returnBegin)throw wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),St;if(typeof b.beginScope!="object"||b.beginScope===null)throw wt("beginScope must be object"),St;En(b,b.begin,{key:"beginScope"}),b.begin=I(b.begin,{joinWith:""})}}function kn(b){if(Array.isArray(b.end)){if(b.skip||b.excludeEnd||b.returnEnd)throw wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),St;if(typeof b.endScope!="object"||b.endScope===null)throw wt("endScope must be object"),St;En(b,b.end,{key:"endScope"}),b.end=I(b.end,{joinWith:""})}}function Wn(b){b.scope&&typeof b.scope=="object"&&b.scope!==null&&(b.beginScope=b.scope,delete b.scope)}function Jn(b){Wn(b),typeof b.beginScope=="string"&&(b.beginScope={_wrap:b.beginScope}),typeof b.endScope=="string"&&(b.endScope={_wrap:b.endScope}),Yt(b),kn(b)}function Ue(b){function A(re,te){return new RegExp(f(re),"m"+(b.case_insensitive?"i":"")+(b.unicodeRegex?"u":"")+(te?"g":""))}class D{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(te,he){he.position=this.position++,this.matchIndexes[this.matchAt]=he,this.regexes.push([he,te]),this.matchAt+=w(te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const te=this.regexes.map(he=>he[1]);this.matcherRe=A(I(te,{joinWith:"|"}),!0),this.lastIndex=0}exec(te){this.matcherRe.lastIndex=this.lastIndex;const he=this.matcherRe.exec(te);if(!he)return null;const Me=he.findIndex(($t,Zn)=>Zn>0&&$t!==void 0),ze=this.matchIndexes[Me];return he.splice(0,Me),Object.assign(he,ze)}}class le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(te){if(this.multiRegexes[te])return this.multiRegexes[te];const he=new D;return this.rules.slice(te).forEach(([Me,ze])=>he.addRule(Me,ze)),he.compile(),this.multiRegexes[te]=he,he}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(te,he){this.rules.push([te,he]),he.type==="begin"&&this.count++}exec(te){const he=this.getMatcher(this.regexIndex);he.lastIndex=this.lastIndex;let Me=he.exec(te);if(this.resumingScanAtSamePosition()&&!(Me&&Me.index===this.lastIndex)){const ze=this.getMatcher(0);ze.lastIndex=this.lastIndex+1,Me=ze.exec(te)}return Me&&(this.regexIndex+=Me.position+1,this.regexIndex===this.count&&this.considerAll()),Me}}function Ie(re){const te=new le;return re.contains.forEach(he=>te.addRule(he.begin,{rule:he,type:"begin"})),re.terminatorEnd&&te.addRule(re.terminatorEnd,{type:"end"}),re.illegal&&te.addRule(re.illegal,{type:"illegal"}),te}function ke(re,te){const he=re;if(re.isCompiled)return he;[jt,wn,Jn,$e].forEach(ze=>ze(re,te)),b.compilerExtensions.forEach(ze=>ze(re,te)),re.__beforeBegin=null,[nn,Un,Xt].forEach(ze=>ze(re,te)),re.isCompiled=!0;let Me=null;return typeof re.keywords=="object"&&re.keywords.$pattern&&(re.keywords=Object.assign({},re.keywords),Me=re.keywords.$pattern,delete re.keywords.$pattern),Me=Me||/\w+/,re.keywords&&(re.keywords=_n(re.keywords,b.case_insensitive)),he.keywordPatternRe=A(Me,!0),te&&(re.begin||(re.begin=/\B|\b/),he.beginRe=A(he.begin),!re.end&&!re.endsWithParent&&(re.end=/\B|\b/),re.end&&(he.endRe=A(he.end)),he.terminatorEnd=f(he.end)||"",re.endsWithParent&&te.terminatorEnd&&(he.terminatorEnd+=(re.end?"|":"")+te.terminatorEnd)),re.illegal&&(he.illegalRe=A(re.illegal)),re.contains||(re.contains=[]),re.contains=[].concat(...re.contains.map(function(ze){return L(ze==="self"?re:ze)})),re.contains.forEach(function(ze){ke(ze,he)}),re.starts&&ke(re.starts,te),he.matcher=Ie(he),he}if(b.compilerExtensions||(b.compilerExtensions=[]),b.contains&&b.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return b.classNameAliases=i(b.classNameAliases||{}),ke(b)}function C(b){return b?b.endsWithParent||C(b.starts):!1}function L(b){return b.variants&&!b.cachedVariants&&(b.cachedVariants=b.variants.map(function(A){return i(b,{variants:null},A)})),b.cachedVariants?b.cachedVariants:C(b)?i(b,{starts:b.starts?i(b.starts):null}):Object.isFrozen(b)?i(b):b}var F="11.11.1";class H extends Error{constructor(A,D){super(A),this.name="HTMLInjectionError",this.html=D}}const oe=n,ae=i,ye=Symbol("nomatch"),P=7,z=function(b){const A=Object.create(null),D=Object.create(null),le=[];let Ie=!0;const ke="Could not find the language '{}', did you forget to load/include a language module?",re={disableAutodetect:!0,name:"Plain text",contains:[]};let te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function he(V){return te.noHighlightRe.test(V)}function Me(V){let fe=V.className+" ";fe+=V.parentNode?V.parentNode.className:"";const ue=te.languageDetectRe.exec(fe);if(ue){const Se=Et(ue[1]);return Se||(Ke(ke.replace("{}",ue[1])),Ke("Falling back to no-highlight mode for this block.",V)),Se?ue[1]:"no-highlight"}return fe.split(/\s+/).find(Se=>he(Se)||Et(Se))}function ze(V,fe,ue){let Se="",He="";typeof fe=="object"?(Se=V,ue=fe.ignoreIllegals,He=fe.language):(_t("10.7.0","highlight(lang, code, ...args) has been deprecated."),_t("10.7.0",`Please use highlight(code, options) instead.
|
|
62
62
|
https://github.com/highlightjs/highlight.js/issues/2277`),He=V,Se=fe),ue===void 0&&(ue=!0);const ut={code:Se,language:He};ln("before:highlight",ut);const It=ut.result?ut.result:$t(ut.language,ut.code,ue);return It.code=ut.code,ln("after:highlight",It),It}function $t(V,fe,ue,Se){const He=Object.create(null);function ut($,ie){return $.keywords[ie]}function It(){if(!me.keywords){Ce.addText(Ae);return}let $=0;me.keywordPatternRe.lastIndex=0;let ie=me.keywordPatternRe.exec(Ae),xe="";for(;ie;){xe+=Ae.substring($,ie.index);const Oe=Je.case_insensitive?ie[0].toLowerCase():ie[0],Ze=ut(me,Oe);if(Ze){const[xt,Sr]=Ze;if(Ce.addText(xe),xe="",He[Oe]=(He[Oe]||0)+1,He[Oe]<=P&&(yt+=Sr),xt.startsWith("_"))xe+=ie[0];else{const er=Je.classNameAliases[xt]||xt;ft(ie[0],er)}}else xe+=ie[0];$=me.keywordPatternRe.lastIndex,ie=me.keywordPatternRe.exec(Ae)}xe+=Ae.substring($),Ce.addText(xe)}function An(){if(Ae==="")return;let $=null;if(typeof me.subLanguage=="string"){if(!A[me.subLanguage]){Ce.addText(Ae);return}$=$t(me.subLanguage,Ae,!0,Gn[me.subLanguage]),Gn[me.subLanguage]=$._top}else $=zt(Ae,me.subLanguage.length?me.subLanguage:null);me.relevance>0&&(yt+=$.relevance),Ce.__addSublanguage($._emitter,$.language)}function rt(){me.subLanguage!=null?An():It(),Ae=""}function ft($,ie){$!==""&&(Ce.startScope(ie),Ce.addText($),Ce.endScope())}function Tr($,ie){let xe=1;const Oe=ie.length-1;for(;xe<=Oe;){if(!$._emit[xe]){xe++;continue}const Ze=Je.classNameAliases[$[xe]]||$[xe],xt=ie[xe];Ze?ft(xt,Ze):(Ae=xt,It(),Ae=""),xe++}}function Kn($,ie){return $.scope&&typeof $.scope=="string"&&Ce.openNode(Je.classNameAliases[$.scope]||$.scope),$.beginScope&&($.beginScope._wrap?(ft(Ae,Je.classNameAliases[$.beginScope._wrap]||$.beginScope._wrap),Ae=""):$.beginScope._multi&&(Tr($.beginScope,ie),Ae="")),me=Object.create($,{parent:{value:me}}),me}function Le($,ie,xe){let Oe=y($.endRe,xe);if(Oe){if($["on:end"]){const Ze=new t($);$["on:end"](ie,Ze),Ze.isMatchIgnored&&(Oe=!1)}if(Oe){for(;$.endsParent&&$.parent;)$=$.parent;return $}}if($.endsWithParent)return Le($.parent,ie,xe)}function Ar($){return me.matcher.regexIndex===0?(Ae+=$[0],1):(fn=!0,0)}function Pe($){const ie=$[0],xe=$.rule,Oe=new t(xe),Ze=[xe.__beforeBegin,xe["on:begin"]];for(const xt of Ze)if(xt&&(xt($,Oe),Oe.isMatchIgnored))return Ar(ie);return xe.skip?Ae+=ie:(xe.excludeBegin&&(Ae+=ie),rt(),!xe.returnBegin&&!xe.excludeBegin&&(Ae=ie)),Kn(xe,$),xe.returnBegin?0:ie.length}function Nr($){const ie=$[0],xe=fe.substring($.index),Oe=Le(me,$,xe);if(!Oe)return ye;const Ze=me;me.endScope&&me.endScope._wrap?(rt(),ft(ie,me.endScope._wrap)):me.endScope&&me.endScope._multi?(rt(),Tr(me.endScope,$)):Ze.skip?Ae+=ie:(Ze.returnEnd||Ze.excludeEnd||(Ae+=ie),rt(),Ze.excludeEnd&&(Ae=ie));do me.scope&&Ce.closeNode(),!me.skip&&!me.subLanguage&&(yt+=me.relevance),me=me.parent;while(me!==Oe.parent);return Oe.starts&&Kn(Oe.starts,$),Ze.returnEnd?0:ie.length}function De(){const $=[];for(let ie=me;ie!==Je;ie=ie.parent)ie.scope&&$.unshift(ie.scope);$.forEach(ie=>Ce.openNode(ie))}let Mt={};function Qn($,ie){const xe=ie&&ie[0];if(Ae+=$,xe==null)return rt(),0;if(Mt.type==="begin"&&ie.type==="end"&&Mt.index===ie.index&&xe===""){if(Ae+=fe.slice(ie.index,ie.index+1),!Ie){const Oe=new Error(`0 width match regex (${V})`);throw Oe.languageName=V,Oe.badRule=Mt.rule,Oe}return 1}if(Mt=ie,ie.type==="begin")return Pe(ie);if(ie.type==="illegal"&&!ue){const Oe=new Error('Illegal lexeme "'+xe+'" for mode "'+(me.scope||"<unnamed>")+'"');throw Oe.mode=me,Oe}else if(ie.type==="end"){const Oe=Nr(ie);if(Oe!==ye)return Oe}if(ie.type==="illegal"&&xe==="")return Ae+=`
|
|
63
|
-
`,1;if(un>1e5&&un>ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=xe,xe.length}const Je=Et(V);if(!Je)throw wt(ke.replace("{}",V)),new Error('Unknown language: "'+V+'"');const jr=Ue(Je);let cn="",me=Se||jr;const Gn={},Ce=new te.__emitter(te);De();let Ae="",yt=0,kt=0,un=0,fn=!1;try{if(Je.__emitTokens)Je.__emitTokens(fe,Ce);else{for(me.matcher.considerAll();;){un++,fn?fn=!1:me.matcher.considerAll(),me.matcher.lastIndex=kt;const $=me.matcher.exec(fe);if(!$)break;const ie=fe.substring(kt,$.index),xe=Qn(ie,$);kt=$.index+xe}Qn(fe.substring(kt))}return Ce.finalize(),cn=Ce.toHTML(),{language:V,value:cn,relevance:yt,illegal:!1,_emitter:Ce,_top:me}}catch($){if($.message&&$.message.includes("Illegal"))return{language:V,value:oe(fe),illegal:!0,relevance:0,_illegalBy:{message:$.message,index:kt,context:fe.slice(kt-100,kt+100),mode:$.mode,resultSoFar:cn},_emitter:Ce};if(Ie)return{language:V,value:oe(fe),illegal:!1,relevance:0,errorRaised:$,_emitter:Ce,_top:me};throw $}}function Zn(V){const fe={value:oe(V),illegal:!1,relevance:0,_top:re,_emitter:new te.__emitter(te)};return fe._emitter.addText(V),fe}function zt(V,fe){fe=fe||te.languages||Object.keys(A);const ue=Zn(V),Se=fe.filter(Et).filter(Or).map(rt=>$t(rt,V,!1));Se.unshift(ue);const He=Se.sort((rt,ft)=>{if(rt.relevance!==ft.relevance)return ft.relevance-rt.relevance;if(rt.language&&ft.language){if(Et(rt.language).supersetOf===ft.language)return 1;if(Et(ft.language).supersetOf===rt.language)return-1}return 0}),[ut,It]=He,An=ut;return An.secondBest=It,An}function on(V,fe,ue){const Se=fe&&D[fe]||ue;V.classList.add("hljs"),V.classList.add(`language-${Se}`)}function On(V){let fe=null;const ue=Me(V);if(he(ue))return;if(ln("before:highlightElement",{el:V,language:ue}),V.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",V);return}if(V.children.length>0&&(te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(V)),te.throwUnescapedHTML))throw new H("One of your code blocks includes unescaped HTML.",V.innerHTML);fe=V;const Se=fe.textContent,He=ue?ze(Se,{language:ue,ignoreIllegals:!0}):zt(Se);V.innerHTML=He.value,V.dataset.highlighted="yes",on(V,ue,He.language),V.result={language:He.language,re:He.relevance,relevance:He.relevance},He.secondBest&&(V.secondBest={language:He.secondBest.language,relevance:He.secondBest.relevance}),ln("after:highlightElement",{el:V,result:He,text:Se})}function Xn(V){te=ae(te,V)}const nt=()=>{gt(),_t("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Rt(){gt(),_t("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Qe=!1;function gt(){function V(){gt()}if(document.readyState==="loading"){Qe||window.addEventListener("DOMContentLoaded",V,!1),Qe=!0;return}document.querySelectorAll(te.cssSelector).forEach(On)}function Yn(V,fe){let ue=null;try{ue=fe(b)}catch(Se){if(wt("Language definition for '{}' could not be registered.".replace("{}",V)),Ie)wt(Se);else throw Se;ue=re}ue.name||(ue.name=V),A[V]=ue,ue.rawDefinition=fe.bind(null,b),ue.aliases&&qt(ue.aliases,{languageName:V})}function kr(V){delete A[V];for(const fe of Object.keys(D))D[fe]===V&&delete D[fe]}function an(){return Object.keys(A)}function Et(V){return V=(V||"").toLowerCase(),A[V]||A[D[V]]}function qt(V,{languageName:fe}){typeof V=="string"&&(V=[V]),V.forEach(ue=>{D[ue.toLowerCase()]=fe})}function Or(V){const fe=Et(V);return fe&&!fe.disableAutodetect}function ii(V){V["before:highlightBlock"]&&!V["before:highlightElement"]&&(V["before:highlightElement"]=fe=>{V["before:highlightBlock"](Object.assign({block:fe.el},fe))}),V["after:highlightBlock"]&&!V["after:highlightElement"]&&(V["after:highlightElement"]=fe=>{V["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function Tn(V){ii(V),le.push(V)}function $n(V){const fe=le.indexOf(V);fe!==-1&&le.splice(fe,1)}function ln(V,fe){const ue=V;le.forEach(function(Se){Se[ue]&&Se[ue](fe)})}function si(V){return _t("10.7.0","highlightBlock will be removed entirely in v12.0"),_t("10.7.0","Please use highlightElement now."),On(V)}Object.assign(b,{highlight:ze,highlightAuto:zt,highlightAll:gt,highlightElement:On,highlightBlock:si,configure:Xn,initHighlighting:nt,initHighlightingOnLoad:Rt,registerLanguage:Yn,unregisterLanguage:kr,listLanguages:an,getLanguage:Et,registerAliases:qt,autoDetection:Or,inherit:ae,addPlugin:Tn,removePlugin:$n}),b.debugMode=function(){Ie=!1},b.safeMode=function(){Ie=!0},b.versionString=F,b.regex={concat:v,lookahead:p,either:_,optional:g,anyNumberOfTimes:h};for(const V in Be)typeof Be[V]=="object"&&e(Be[V]);return Object.assign(b,Be),b},Z=z({});return Z.newInstance=()=>z({}),vi=Z,Z.HighlightJS=Z,Z.default=Z,vi}var xf=yf();const Dn=Is(xf);function bf(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vf(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},E=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,v,s,o],_=[...E];return _.pop(),_.push(a),h.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}function wf(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],_={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],I=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:E,built_in:[...w,...y,"set","shopt",...O,...I]},contains:[h,e.SHEBANG(),g,f,s,o,_,a,l,c,d,n]}}Dn.registerLanguage("json",bf);Dn.registerLanguage("yaml",vf);Dn.registerLanguage("bash",wf);const Bl=new Pl(pf({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight(e,t){if(!Dn.getLanguage(t))return e;try{return Dn.highlight(e,{language:t}).value}catch{return e}}}));Bl.use({extensions:[{name:"link",renderer(e){return`<a class="hover:underline hover:text-secondary-600" href="${e.href}" rel="noopener noreferrer" target="_blank">${e.text}</a>`}}]});function _f(e){return Bl.parse(e)}const xn=({children:e})=>e?typeof e!="string"?u.jsx(u.Fragment,{children:e}):u.jsx("div",{className:"prose max-w-none text-foreground-muted prose-headings:text-foreground prose-strong:text-foreground prose-a:text-primary-600 prose-code:text-foreground-secondary prose-blockquote:text-foreground-muted prose-blockquote:border-border",dangerouslySetInnerHTML:{__html:kl.sanitize(_f(e))}}):null;function Ef({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})}function zl({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}function kf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Of({className:e,...t}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...t,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})})}function Tf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}function sr({IconClass:e,term:t,visibleTerm:n=!0,text:i,href:r,vertical:s=!1,className:o=""}){const a=r?l=>u.jsx("a",{href:r,target:"_blank",...l}):l=>u.jsx("div",{...l});return u.jsxs("div",{className:`${!s&&"flex"} ${o}`,children:[u.jsx("dt",{children:u.jsxs(a,{className:"flex",children:[e&&u.jsx(e,{className:"w-5 h-5",title:`${i}`,alt:`${i}`}),n?u.jsx("span",{className:"pl-2 text-sm",children:t}):u.jsx("span",{className:"sr-only",children:t})]})}),u.jsxs("dd",{className:`${s&&"pt-2"} pl-2 text-sm`,children:[!n&&u.jsx(a,{children:i}),s&&u.jsx(a,{children:i})]})]})}function Us({name:e,href:t,title:n}){return u.jsx("a",{className:`text-xs whitespace-nowrap break-all mt-2 rounded-md bg-neutral-300 py-[2px] px-[4px] mr-1 -mt-1 ${t&&"hover:bg-cyan-500 hover:text-white"}`,href:t,target:"_blank",title:n,children:e})}function Af({license:e,externalDocs:t,contact:n,tags:i}){const r=t,s={licenseName:e&&e.name?e.name:null,licenseUrl:e&&e.url?e.url:null,externalDocsTitle:r&&r.description?r.description:"External documentation",externalDocsUrl:r&&r.url?r.url:null,externalDocsDescription:r&&r.description?r.description:null,contactName:n&&n.name?n.name:null,contactUrl:n&&n.url?n.url:null,contactEmail:n&&n.email?n.email:null,tags:i};return u.jsxs(u.Fragment,{children:[u.jsxs("dl",{className:"flex flex-wrap @lg:flex-unwrap gap-2 ",children:[s.licenseName&&u.jsx(sr,{IconClass:Of,text:`${s.licenseName} ${Oo}`,term:Oo,visibleTerm:!s.licenseName,href:s.licenseUrl,className:"mb-4 text-foreground-secondary hover:text-pink-500"}),s.externalDocsUrl&&u.jsx(sr,{IconClass:zl,text:To,href:s.externalDocsUrl,term:To,visibleTerm:!s.externalDocsTitle,className:"mb-4 text-foreground-secondary hover:text-secondary-500"}),s.contactEmail&&u.jsx(sr,{IconClass:Ef,text:`${s.contactEmail}`,term:au,visibleTerm:!s.contactEmail,href:`mailto:${s.contactEmail}`,className:"mb-4 text-foreground-secondary hover:text-green-500"}),s.contactUrl&&u.jsx(sr,{IconClass:kf,text:`${s.contactName}`,term:ou,visibleTerm:!s.contactName,href:s.contactUrl,className:"mb-4 text-foreground-secondary hover:text-green-500"})]}),u.jsx("dl",{children:s.tags&&u.jsx(sr,{IconClass:Tf,term:lu,className:"mb-2 text-foreground-secondary inline-block",vertical:!0,text:s.tags&&u.jsx("div",{className:"flex flex-wrap gap-1 -ml-2",children:s.tags.map((o,a)=>{const l=o,c=l.externalDocs;return u.jsx(Us,{href:c&&c.url,title:l.description||(c&&c.description?c.description:void 0),name:l.name},a)})})})})]})}const Nf=({title:e,description:t,license:n,externalDocs:i,contact:r,tags:s})=>{const o=u.jsx("div",{className:"mt-4 w-full",children:u.jsx(xn,{children:t})}),a=u.jsx(Af,{license:n,externalDocs:i,contact:r,tags:s});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:e,content:o,sideContent:a,stickySideContent:!0,reverseLayoutOnMobile:!0,info:!0})})};function ti({className:e}){return u.jsx("svg",{className:e,id:"Layer_1",version:"1.1",viewBox:"0 0 50 50",width:"50px",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("polygon",{points:"47.25,15 45.164,12.914 25,33.078 4.836,12.914 2.75,15 25,37.25 "})})}function jf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M15.6 2l-1.2 3H5.6L4.4 2C3.629 2 3 2.629 3 3.4v15.2c0 .77.629 1.4 1.399 1.4h11.2c.77 0 1.4-.631 1.4-1.4V3.4C17 2.629 16.369 2 15.6 2zm-2 2l.9-2h-2.181L11.6 0H8.4l-.72 2H5.5l.899 2H13.6z"})})}function Sf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"})})}const Rf=1500;function If(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(t)}}async function Mf(e){try{return await navigator.clipboard.writeText(e),!0}catch{return If(e)}}function ql({code:e,className:t}){const[n,i]=se.useState("idle"),r=se.useRef(void 0);se.useEffect(()=>()=>clearTimeout(r.current),[]);const s=()=>{Mf(e).then(l=>{i(l?"copied":"error"),clearTimeout(r.current),r.current=setTimeout(()=>i("idle"),Rf)})},o=Dn.highlight(e,{language:"json"}).value,a=n==="copied"?"Copied":n==="error"?"Copy failed":"Copy to clipboard";return u.jsxs("div",{className:`relative ${t??""}`,children:[u.jsx("button",{type:"button",onClick:s,"aria-label":a,title:a,className:"absolute top-2 right-2 p-1 rounded text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-100 transition-colors",children:n==="copied"?u.jsx(Sf,{className:"w-4 h-4 text-green-600"}):u.jsx(jf,{className:`w-4 h-4 ${n==="error"?"text-red-500":""}`})}),u.jsx("pre",{className:"text-xs rounded overflow-x-auto",children:u.jsx("code",{className:"hljs language-json",dangerouslySetInnerHTML:{__html:kl.sanitize(o)}})})]})}const Cf=/^x-parser-/i;function ws(e){if(Array.isArray(e))return e.map(ws);if(e!==null&&typeof e=="object"){const t={};for(const[n,i]of Object.entries(e))Cf.test(n)||(t[n]=ws(i));return t}return e}const Ul=({schema:e})=>{const t=JSON.stringify(ws(e),null,2);return u.jsx(ql,{code:t})},ge=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ht=e=>ge(e)?e:null,qo="^[\0-ÿ]*$",Lf=Math.pow(-2,31),Pf=Math.pow(2,31)-1,Df=Math.pow(-2,63),Ff=Math.pow(2,63)-1,Bf={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},Hs=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};function pr(e){const t=Hs(e);if(typeof t.name=="string")return typeof t.namespace=="string"?`${t.namespace}.${t.name}`:t.name}function _s(e,t,n){e.doc&&(t.description=e.doc),e.default!==void 0&&(t.default=e.default);const i=pr(e);i!==void 0&&n[i]&&(t["x-parser-schema-id"]=i)}function Uo(e,t,n){!(Array.isArray(e.type)&&e.type.includes("null"))&&!n&&(t.required=t.required||[],t.required.push(e.name))}function zf(e,t){let n=e,i=t;if(Array.isArray(e)&&e.length>0){const r=e.length>1&&e[0]==="null";n=e[+r],i.oneOf!==void 0&&(i=i.oneOf[0])}return{type:n,jsonSchema:i}}function qf(e,t,n){if(!(t===void 0||n.examples||Array.isArray(e)))switch(e){case"boolean":n.examples=[typeof t=="boolean"?t:t==="true"];break;case"int":n.examples=[parseInt(t,10)];break;default:n.examples=[t]}}function Es(e){return Object.keys(e).some(t=>t!=="type"&&t!=="name"&&t!=="namespace")}function ks(e,t,n){const{type:i,jsonSchema:r}=zf(e,n);qf(i,t.example,r);function s(...o){o.forEach(a=>{let l=!0;a==="minLength"||a==="maxLength"?l=t[a]>-1:a==="multipleOf"&&(l=t[a]>0),t[a]!==void 0&&l&&(r[a]=t[a])})}switch(i){case"int":case"long":case"float":case"double":s("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":t.logicalType&&(r.format=t.logicalType),s("pattern","minLength","maxLength");break;case"array":s("minItems","maxItems","uniqueItems");break}}function Vs(e,t,n){t!==void 0&&(e[t]=n)}function hr(e,t){let n={};if(Array.isArray(e))return Hf(n,e,t);const i=Hs(e),r=typeof e=="string"?e:i.type;switch(n.type=Bf[r],r){case"int":{n.minimum=Lf,n.maximum=Pf;break}case"long":{n.minimum=Df,n.maximum=Ff;break}case"bytes":{n.pattern=qo;break}case"fixed":{n.pattern=qo,n.minLength=i.size,n.maxLength=i.size;break}case"map":{n.additionalProperties=hr(i.values,t);break}case"array":{n.items=hr(i.items,t);break}case"enum":{n.enum=i.symbols;break}case"float":case"double":{n.format=r;break}case"record":{const s=Uf(i,t,n);Vs(t,pr(e),n),n.properties=Object.fromEntries(s.entries());break}default:{const s=t[pr(e)]??(typeof r=="string"?t[r]:void 0);s&&(n=Es(i)?{...s}:s);break}}return _s(i,n,t),ks(r,i,n),n}function Uf(e,t,n){const i=new Map;for(const r of e.fields??[]){const s=typeof r.type=="string"?t[r.type]:void 0;if(s){const o=Es(r)?{...s}:s;Uo(r,n,r.default!==void 0),Es(r)&&(_s(r,o,t),ks(r.type,r,o)),i.set(r.name,o)}else{const o=hr(r.type,t);Uo(r,n,r.default!==void 0),_s(r,o,t),ks(r.type,r,o),i.set(r.name,o),Vs(t,pr(r.type),o)}}return i}function Hf(e,t,n){const i=[];let r=null;for(const s of t){const o=hr(s,n);(typeof s=="string"?s:Hs(s).type)==="null"?r=o:(i.push(o),Vs(n,pr(s),o))}return r&&i.push(r),e.oneOf=i,e}function Os(e){return hr(e,{})}const Ho=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),Vf=new Set(["record","enum","array","map","fixed"]),Vo=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function Ws(e){const t=[];return Cn(e,"schema",t,new Set),t}function Cn(e,t,n,i){if(typeof e=="string"){!Ho.has(e)&&!Vo.test(e)&&n.push(`${t}: "${e}" is not a valid Avro type name`);return}if(Array.isArray(e)){e.length===0&&n.push(`${t}: union must have at least one alternative`),e.forEach((s,o)=>Cn(s,`${t}[${o}]`,n,i));return}if(!ge(e)){n.push(`${t}: expected an Avro type string, object, or union`);return}if(i.has(e))return;i.add(e);const r=e.type;if(typeof r!="string"){Array.isArray(r)||ge(r)?Cn(r,`${t}.type`,n,i):n.push(`${t}: missing "type"`);return}if(!Ho.has(r)&&!Vf.has(r)&&!Vo.test(r)){n.push(`${t}: unknown Avro type "${r}"`);return}switch(r){case"record":{if(!Array.isArray(e.fields)){n.push(`${t}: record must have a "fields" array`);return}e.fields.forEach((s,o)=>{const a=`${t}.fields[${o}]`;if(!ge(s)||typeof s.name!="string"){n.push(`${a}: field must have a string "name"`);return}Cn(s.type,`${a}.type`,n,i)});break}case"enum":{const s=e.symbols;(!Array.isArray(s)||s.some(o=>typeof o!="string"))&&n.push(`${t}: enum must have a "symbols" array of strings`);break}case"array":{e.items===void 0?n.push(`${t}: array must have "items"`):Cn(e.items,`${t}.items`,n,i);break}case"map":{e.values===void 0?n.push(`${t}: map must have "values"`):Cn(e.values,`${t}.values`,n,i);break}case"fixed":{typeof e.size!="number"&&n.push(`${t}: fixed must have a numeric "size"`);break}}}var wi={exports:{}},_i={exports:{}},Ei={},Dr={},ki,Wo;function Hl(){if(Wo)return ki;Wo=1,ki=e;function e(t,n){for(var i=new Array(arguments.length-1),r=0,s=2,o=!0;s<arguments.length;)i[r++]=arguments[s++];return new Promise(function(l,c){i[r]=function(f){if(o)if(o=!1,f)c(f);else{for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h++]=arguments[h];l.apply(null,p)}};try{t.apply(n||null,i)}catch(d){o&&(o=!1,c(d))}})}return ki}var Oi={},Jo;function Wf(){return Jo||(Jo=1,(function(e){var t=e;t.length=function(a){var l=a.length;if(!l)return 0;for(var c=0;--l%4>1&&a.charAt(l)==="=";)++c;return Math.ceil(a.length*3)/4-c};for(var n=new Array(64),i=new Array(123),r=0;r<64;)i[n[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;t.encode=function(a,l,c){for(var d=null,f=[],p=0,h=0,g;l<c;){var v=a[l++];switch(h){case 0:f[p++]=n[v>>2],g=(v&3)<<4,h=1;break;case 1:f[p++]=n[g|v>>4],g=(v&15)<<2,h=2;break;case 2:f[p++]=n[g|v>>6],f[p++]=n[v&63],h=0;break}p>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,f)),p=0)}return h&&(f[p++]=n[g],f[p++]=61,h===1&&(f[p++]=61)),d?(p&&d.push(String.fromCharCode.apply(String,f.slice(0,p))),d.join("")):String.fromCharCode.apply(String,f.slice(0,p))};var s="invalid encoding";t.decode=function(a,l,c){for(var d=c,f=0,p,h=0;h<a.length;){var g=a.charCodeAt(h++);if(g===61&&f>1)break;if((g=i[g])===void 0)throw Error(s);switch(f){case 0:p=g,f=1;break;case 1:l[c++]=p<<2|(g&48)>>4,p=g,f=2;break;case 2:l[c++]=(p&15)<<4|(g&60)>>2,p=g,f=3;break;case 3:l[c++]=(p&3)<<6|g,f=0;break}}if(f===1)throw Error(s);return c-d},t.test=function(a){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a)}})(Oi)),Oi}var Ti,Zo;function Jf(){if(Zo)return Ti;Zo=1,Ti=e;function e(){this._listeners=Object.create(null)}return e.prototype.on=function(n,i,r){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:i,ctx:r||this}),this},e.prototype.off=function(n,i){if(n===void 0)this._listeners=Object.create(null);else if(i===void 0)this._listeners[n]=[];else{var r=this._listeners[n];if(!r)return this;for(var s=0;s<r.length;)r[s].fn===i?r.splice(s,1):++s}return this},e.prototype.emit=function(n){var i=this._listeners[n];if(i){for(var r=[],s=1;s<arguments.length;)r.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,r)}return this},Ti}var Ai,Xo;function Zf(){if(Xo)return Ai;Xo=1,Ai=e(e);function e(s){return typeof Float32Array<"u"?(function(){var o=new Float32Array([-0]),a=new Uint8Array(o.buffer),l=a[3]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3]}function d(h,g,v){o[0]=h,g[v]=a[3],g[v+1]=a[2],g[v+2]=a[1],g[v+3]=a[0]}s.writeFloatLE=l?c:d,s.writeFloatBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],o[0]}function p(h,g){return a[3]=h[g],a[2]=h[g+1],a[1]=h[g+2],a[0]=h[g+3],o[0]}s.readFloatLE=l?f:p,s.readFloatBE=l?p:f})():(function(){function o(l,c,d,f){var p=c<0?1:0;if(p&&(c=-c),c===0)l(1/c>0?0:2147483648,d,f);else if(isNaN(c))l(2143289344,d,f);else if(c>34028234663852886e22)l((p<<31|2139095040)>>>0,d,f);else if(c<11754943508222875e-54)l((p<<31|Math.round(c/1401298464324817e-60))>>>0,d,f);else{var h=Math.floor(Math.log(c)/Math.LN2),g=Math.round(c*Math.pow(2,-h)*8388608)&8388607;l((p<<31|h+127<<23|g)>>>0,d,f)}}s.writeFloatLE=o.bind(null,t),s.writeFloatBE=o.bind(null,n);function a(l,c,d){var f=l(c,d),p=(f>>31)*2+1,h=f>>>23&255,g=f&8388607;return h===255?g?NaN:p*(1/0):h===0?p*1401298464324817e-60*g:p*Math.pow(2,h-150)*(g+8388608)}s.readFloatLE=a.bind(null,i),s.readFloatBE=a.bind(null,r)})(),typeof Float64Array<"u"?(function(){var o=new Float64Array([-0]),a=new Uint8Array(o.buffer),l=a[7]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3],g[v+4]=a[4],g[v+5]=a[5],g[v+6]=a[6],g[v+7]=a[7]}function d(h,g,v){o[0]=h,g[v]=a[7],g[v+1]=a[6],g[v+2]=a[5],g[v+3]=a[4],g[v+4]=a[3],g[v+5]=a[2],g[v+6]=a[1],g[v+7]=a[0]}s.writeDoubleLE=l?c:d,s.writeDoubleBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],a[4]=h[g+4],a[5]=h[g+5],a[6]=h[g+6],a[7]=h[g+7],o[0]}function p(h,g){return a[7]=h[g],a[6]=h[g+1],a[5]=h[g+2],a[4]=h[g+3],a[3]=h[g+4],a[2]=h[g+5],a[1]=h[g+6],a[0]=h[g+7],o[0]}s.readDoubleLE=l?f:p,s.readDoubleBE=l?p:f})():(function(){function o(l,c,d,f,p,h){var g=f<0?1:0;if(g&&(f=-f),f===0)l(0,p,h+c),l(1/f>0?0:2147483648,p,h+d);else if(isNaN(f))l(0,p,h+c),l(2146959360,p,h+d);else if(f>17976931348623157e292)l(0,p,h+c),l((g<<31|2146435072)>>>0,p,h+d);else{var v;if(f<22250738585072014e-324)v=f/5e-324,l(v>>>0,p,h+c),l((g<<31|v/4294967296)>>>0,p,h+d);else{var E=Math.floor(Math.log(f)/Math.LN2);E===1024&&(E=1023),v=f*Math.pow(2,-E),l(v*4503599627370496>>>0,p,h+c),l((g<<31|E+1023<<20|v*1048576&1048575)>>>0,p,h+d)}}}s.writeDoubleLE=o.bind(null,t,0,4),s.writeDoubleBE=o.bind(null,n,4,0);function a(l,c,d,f,p){var h=l(f,p+c),g=l(f,p+d),v=(g>>31)*2+1,E=g>>>20&2047,_=4294967296*(g&1048575)+h;return E===2047?_?NaN:v*(1/0):E===0?v*5e-324*_:v*Math.pow(2,E-1075)*(_+4503599627370496)}s.readDoubleLE=a.bind(null,i,0,4),s.readDoubleBE=a.bind(null,r,4,0)})(),s}function t(s,o,a){o[a]=s&255,o[a+1]=s>>>8&255,o[a+2]=s>>>16&255,o[a+3]=s>>>24}function n(s,o,a){o[a]=s>>>24,o[a+1]=s>>>16&255,o[a+2]=s>>>8&255,o[a+3]=s&255}function i(s,o){return(s[o]|s[o+1]<<8|s[o+2]<<16|s[o+3]<<24)>>>0}function r(s,o){return(s[o]<<24|s[o+1]<<16|s[o+2]<<8|s[o+3])>>>0}return Ai}var Ni={},Yo;function Xf(){return Yo||(Yo=1,(function(e){var t=e,n=65533;t.length=function(r){for(var s=0,o=0,a=0;a<r.length;++a)o=r.charCodeAt(a),o<128?s+=1:o<2048?s+=2:(o&64512)===55296&&(r.charCodeAt(a+1)&64512)===56320?(++a,s+=4):s+=3;return s},t.read=function(r,s,o){if(o-s<1)return"";for(var a=null,l=[],c=0,d,f,p,h;s<o;)d=r[s++],d<=127?l[c++]=d:d>=192&&d<224?(p=(d&31)<<6|r[s++]&63,l[c++]=p>=128?p:n):d>=224&&d<240?(h=(d&15)<<12|(r[s++]&63)<<6|r[s++]&63,l[c++]=h>=2048?h:n):d>=240&&(f=(d&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63,f<65536||f>1114111?l[c++]=n:(f-=65536,l[c++]=55296+(f>>10),l[c++]=56320+(f&1023))),c>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,l.slice(0,c))),c=0);return a?(c&&a.push(String.fromCharCode.apply(String,l.slice(0,c))),a.join("")):String.fromCharCode.apply(String,l.slice(0,c))},t.write=function(r,s,o){for(var a=o,l,c,d=0;d<r.length;++d)l=r.charCodeAt(d),l<128?s[o++]=l:l<2048?(s[o++]=l>>6|192,s[o++]=l&63|128):(l&64512)===55296&&((c=r.charCodeAt(d+1))&64512)===56320?(l=65536+((l&1023)<<10)+(c&1023),++d,s[o++]=l>>18|240,s[o++]=l>>12&63|128,s[o++]=l>>6&63|128,s[o++]=l&63|128):(s[o++]=l>>12|224,s[o++]=l>>6&63|128,s[o++]=l&63|128);return o-a}})(Ni)),Ni}var ji,$o;function Yf(){if($o)return ji;$o=1,ji=e;function e(t,n,i){var r=i||8192,s=r>>>1,o=null,a=r;return function(c){if(c<1||c>s)return t(c);a+c>r&&(o=t(r),a=0);var d=n.call(o,a,a+=c);return a&7&&(a=(a|7)+1),d}}return ji}var Si,Ko;function $f(){if(Ko)return Si;Ko=1,Si=t;var e=Ft();function t(s,o){this.lo=s>>>0,this.hi=o>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(o===0)return n;var a=o<0;a&&(o=-o);var l=o>>>0,c=(o-l)/4294967296>>>0;return a&&(c=~c>>>0,l=~l>>>0,++l>4294967295&&(l=0,++c>4294967295&&(c=0))),new t(l,c)},t.from=function(o){if(typeof o=="number")return t.fromNumber(o);if(e.isString(o))if(e.Long)o=e.Long.fromString(o);else return t.fromNumber(parseInt(o,10));return o.low||o.high?new t(o.low>>>0,o.high>>>0):n},t.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var a=~this.lo+1>>>0,l=~this.hi>>>0;return a||(l=l+1>>>0),-(a+l*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(o){return e.Long?new e.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var r=String.prototype.charCodeAt;return t.fromHash=function(o){return o===i?n:new t((r.call(o,0)|r.call(o,1)<<8|r.call(o,2)<<16|r.call(o,3)<<24)>>>0,(r.call(o,4)|r.call(o,5)<<8|r.call(o,6)<<16|r.call(o,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},t.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},t.prototype.length=function(){var o=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?a===0?o<16384?o<128?1:2:o<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:l<128?9:10},Si}var ar={exports:{}},Kf=ar.exports,Qo;function Qf(){return Qo||(Qo=1,(function(e,t){(function(n,i){function r(s){return s.default||s}i(t),e.exports=r(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Kf,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;/**
|
|
63
|
+
`,1;if(un>1e5&&un>ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=xe,xe.length}const Je=Et(V);if(!Je)throw wt(ke.replace("{}",V)),new Error('Unknown language: "'+V+'"');const jr=Ue(Je);let cn="",me=Se||jr;const Gn={},Ce=new te.__emitter(te);De();let Ae="",yt=0,kt=0,un=0,fn=!1;try{if(Je.__emitTokens)Je.__emitTokens(fe,Ce);else{for(me.matcher.considerAll();;){un++,fn?fn=!1:me.matcher.considerAll(),me.matcher.lastIndex=kt;const $=me.matcher.exec(fe);if(!$)break;const ie=fe.substring(kt,$.index),xe=Qn(ie,$);kt=$.index+xe}Qn(fe.substring(kt))}return Ce.finalize(),cn=Ce.toHTML(),{language:V,value:cn,relevance:yt,illegal:!1,_emitter:Ce,_top:me}}catch($){if($.message&&$.message.includes("Illegal"))return{language:V,value:oe(fe),illegal:!0,relevance:0,_illegalBy:{message:$.message,index:kt,context:fe.slice(kt-100,kt+100),mode:$.mode,resultSoFar:cn},_emitter:Ce};if(Ie)return{language:V,value:oe(fe),illegal:!1,relevance:0,errorRaised:$,_emitter:Ce,_top:me};throw $}}function Zn(V){const fe={value:oe(V),illegal:!1,relevance:0,_top:re,_emitter:new te.__emitter(te)};return fe._emitter.addText(V),fe}function zt(V,fe){fe=fe||te.languages||Object.keys(A);const ue=Zn(V),Se=fe.filter(Et).filter(Or).map(rt=>$t(rt,V,!1));Se.unshift(ue);const He=Se.sort((rt,ft)=>{if(rt.relevance!==ft.relevance)return ft.relevance-rt.relevance;if(rt.language&&ft.language){if(Et(rt.language).supersetOf===ft.language)return 1;if(Et(ft.language).supersetOf===rt.language)return-1}return 0}),[ut,It]=He,An=ut;return An.secondBest=It,An}function on(V,fe,ue){const Se=fe&&D[fe]||ue;V.classList.add("hljs"),V.classList.add(`language-${Se}`)}function On(V){let fe=null;const ue=Me(V);if(he(ue))return;if(ln("before:highlightElement",{el:V,language:ue}),V.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",V);return}if(V.children.length>0&&(te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(V)),te.throwUnescapedHTML))throw new H("One of your code blocks includes unescaped HTML.",V.innerHTML);fe=V;const Se=fe.textContent,He=ue?ze(Se,{language:ue,ignoreIllegals:!0}):zt(Se);V.innerHTML=He.value,V.dataset.highlighted="yes",on(V,ue,He.language),V.result={language:He.language,re:He.relevance,relevance:He.relevance},He.secondBest&&(V.secondBest={language:He.secondBest.language,relevance:He.secondBest.relevance}),ln("after:highlightElement",{el:V,result:He,text:Se})}function Xn(V){te=ae(te,V)}const nt=()=>{gt(),_t("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Rt(){gt(),_t("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Qe=!1;function gt(){function V(){gt()}if(document.readyState==="loading"){Qe||window.addEventListener("DOMContentLoaded",V,!1),Qe=!0;return}document.querySelectorAll(te.cssSelector).forEach(On)}function Yn(V,fe){let ue=null;try{ue=fe(b)}catch(Se){if(wt("Language definition for '{}' could not be registered.".replace("{}",V)),Ie)wt(Se);else throw Se;ue=re}ue.name||(ue.name=V),A[V]=ue,ue.rawDefinition=fe.bind(null,b),ue.aliases&&qt(ue.aliases,{languageName:V})}function kr(V){delete A[V];for(const fe of Object.keys(D))D[fe]===V&&delete D[fe]}function an(){return Object.keys(A)}function Et(V){return V=(V||"").toLowerCase(),A[V]||A[D[V]]}function qt(V,{languageName:fe}){typeof V=="string"&&(V=[V]),V.forEach(ue=>{D[ue.toLowerCase()]=fe})}function Or(V){const fe=Et(V);return fe&&!fe.disableAutodetect}function ii(V){V["before:highlightBlock"]&&!V["before:highlightElement"]&&(V["before:highlightElement"]=fe=>{V["before:highlightBlock"](Object.assign({block:fe.el},fe))}),V["after:highlightBlock"]&&!V["after:highlightElement"]&&(V["after:highlightElement"]=fe=>{V["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function Tn(V){ii(V),le.push(V)}function $n(V){const fe=le.indexOf(V);fe!==-1&&le.splice(fe,1)}function ln(V,fe){const ue=V;le.forEach(function(Se){Se[ue]&&Se[ue](fe)})}function si(V){return _t("10.7.0","highlightBlock will be removed entirely in v12.0"),_t("10.7.0","Please use highlightElement now."),On(V)}Object.assign(b,{highlight:ze,highlightAuto:zt,highlightAll:gt,highlightElement:On,highlightBlock:si,configure:Xn,initHighlighting:nt,initHighlightingOnLoad:Rt,registerLanguage:Yn,unregisterLanguage:kr,listLanguages:an,getLanguage:Et,registerAliases:qt,autoDetection:Or,inherit:ae,addPlugin:Tn,removePlugin:$n}),b.debugMode=function(){Ie=!1},b.safeMode=function(){Ie=!0},b.versionString=F,b.regex={concat:v,lookahead:p,either:_,optional:g,anyNumberOfTimes:h};for(const V in Be)typeof Be[V]=="object"&&e(Be[V]);return Object.assign(b,Be),b},Z=z({});return Z.newInstance=()=>z({}),vi=Z,Z.HighlightJS=Z,Z.default=Z,vi}var xf=yf();const Dn=Is(xf);function bf(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vf(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},E=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,v,s,o],_=[...E];return _.pop(),_.push(a),h.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}function wf(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],_={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],I=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:E,built_in:[...w,...y,"set","shopt",...O,...I]},contains:[h,e.SHEBANG(),g,f,s,o,_,a,l,c,d,n]}}Dn.registerLanguage("json",bf);Dn.registerLanguage("yaml",vf);Dn.registerLanguage("bash",wf);const Bl=new Pl(pf({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight(e,t){if(!Dn.getLanguage(t))return e;try{return Dn.highlight(e,{language:t}).value}catch{return e}}}));Bl.use({extensions:[{name:"link",renderer(e){return`<a class="hover:underline hover:text-secondary-600" href="${e.href}" rel="noopener noreferrer" target="_blank">${e.text}</a>`}}]});function _f(e){return Bl.parse(e)}const xn=({children:e})=>e?typeof e!="string"?u.jsx(u.Fragment,{children:e}):u.jsx("div",{className:"prose max-w-none text-foreground-muted prose-headings:text-foreground prose-strong:text-foreground prose-a:text-primary-600 prose-code:text-foreground-secondary prose-blockquote:text-foreground-muted prose-blockquote:border-border",dangerouslySetInnerHTML:{__html:kl.sanitize(_f(e))}}):null;function Ef({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})}function zl({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}function kf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Of({className:e,...t}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...t,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})})}function Tf({className:e}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}function sr({IconClass:e,term:t,visibleTerm:n=!0,text:i,href:r,vertical:s=!1,className:o=""}){const a=r?l=>u.jsx("a",{href:r,target:"_blank",...l}):l=>u.jsx("div",{...l});return u.jsxs("div",{className:`${!s&&"flex"} ${o}`,children:[u.jsx("dt",{children:u.jsxs(a,{className:"flex",children:[e&&u.jsx(e,{className:"w-5 h-5",title:`${i}`,alt:`${i}`}),n?u.jsx("span",{className:"pl-2 text-sm",children:t}):u.jsx("span",{className:"sr-only",children:t})]})}),u.jsxs("dd",{className:`${s&&"pt-2"} pl-2 text-sm`,children:[!n&&u.jsx(a,{children:i}),s&&u.jsx(a,{children:i})]})]})}function Us({name:e,href:t,title:n}){return u.jsx("a",{className:`text-xs whitespace-nowrap break-all mt-2 rounded-md bg-neutral-300 py-[2px] px-[4px] mr-1 -mt-1 ${t&&"hover:bg-cyan-500 hover:text-white"}`,href:t,target:"_blank",title:n,children:e})}function Af({license:e,externalDocs:t,contact:n,tags:i}){const r=t,s={licenseName:e&&e.name?e.name:null,licenseUrl:e&&e.url?e.url:null,externalDocsTitle:r&&r.description?r.description:"External documentation",externalDocsUrl:r&&r.url?r.url:null,externalDocsDescription:r&&r.description?r.description:null,contactName:n&&n.name?n.name:null,contactUrl:n&&n.url?n.url:null,contactEmail:n&&n.email?n.email:null,tags:i};return u.jsxs(u.Fragment,{children:[u.jsxs("dl",{className:"flex flex-wrap @lg:flex-unwrap gap-2 ",children:[s.licenseName&&u.jsx(sr,{IconClass:Of,text:`${s.licenseName} ${Oo}`,term:Oo,visibleTerm:!s.licenseName,href:s.licenseUrl,className:"mb-4 text-foreground-secondary hover:text-pink-500"}),s.externalDocsUrl&&u.jsx(sr,{IconClass:zl,text:To,href:s.externalDocsUrl,term:To,visibleTerm:!s.externalDocsTitle,className:"mb-4 text-foreground-secondary hover:text-secondary-500"}),s.contactEmail&&u.jsx(sr,{IconClass:Ef,text:`${s.contactEmail}`,term:au,visibleTerm:!s.contactEmail,href:`mailto:${s.contactEmail}`,className:"mb-4 text-foreground-secondary hover:text-green-500"}),s.contactUrl&&u.jsx(sr,{IconClass:kf,text:`${s.contactName}`,term:ou,visibleTerm:!s.contactName,href:s.contactUrl,className:"mb-4 text-foreground-secondary hover:text-green-500"})]}),u.jsx("dl",{children:s.tags&&u.jsx(sr,{IconClass:Tf,term:lu,className:"mb-2 text-foreground-secondary inline-block",vertical:!0,text:s.tags&&u.jsx("div",{className:"flex flex-wrap gap-1 -ml-2",children:s.tags.map((o,a)=>{const l=o,c=l.externalDocs;return u.jsx(Us,{href:c&&c.url,title:l.description||(c&&c.description?c.description:void 0),name:l.name},a)})})})})]})}const Nf=({title:e,description:t,license:n,externalDocs:i,contact:r,tags:s})=>{const o=u.jsx("div",{className:"mt-4 w-full",children:u.jsx(xn,{children:t})}),a=u.jsx(Af,{license:n,externalDocs:i,contact:r,tags:s});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:e,content:o,sideContent:a,stickySideContent:!0,reverseLayoutOnMobile:!0,info:!0})})};function ti({className:e}){return u.jsx("svg",{className:e,id:"Layer_1",version:"1.1",viewBox:"0 0 50 50",width:"50px",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("polygon",{points:"47.25,15 45.164,12.914 25,33.078 4.836,12.914 2.75,15 25,37.25 "})})}function jf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M15.6 2l-1.2 3H5.6L4.4 2C3.629 2 3 2.629 3 3.4v15.2c0 .77.629 1.4 1.399 1.4h11.2c.77 0 1.4-.631 1.4-1.4V3.4C17 2.629 16.369 2 15.6 2zm-2 2l.9-2h-2.181L11.6 0H8.4l-.72 2H5.5l.899 2H13.6z"})})}function Sf({className:e}){return u.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"})})}const Rf=1500;function If(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(t)}}async function Mf(e){try{return await navigator.clipboard.writeText(e),!0}catch{return If(e)}}function ql({code:e,className:t}){const[n,i]=se.useState("idle"),r=se.useRef(void 0);se.useEffect(()=>()=>clearTimeout(r.current),[]);const s=()=>{Mf(e).then(l=>{i(l?"copied":"error"),clearTimeout(r.current),r.current=setTimeout(()=>i("idle"),Rf)})},o=Dn.highlight(e,{language:"json"}).value,a=n==="copied"?"Copied":n==="error"?"Copy failed":"Copy to clipboard";return u.jsxs("div",{className:`relative ${t??""}`,children:[u.jsx("button",{type:"button",onClick:s,"aria-label":a,title:a,className:"absolute top-2 right-2 p-1 rounded text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-100 transition-colors",children:n==="copied"?u.jsx(Sf,{className:"w-4 h-4 text-green-600"}):u.jsx(jf,{className:`w-4 h-4 ${n==="error"?"text-red-500":""}`})}),u.jsx("pre",{className:"text-xs rounded overflow-x-auto",children:u.jsx("code",{className:"hljs language-json",dangerouslySetInnerHTML:{__html:kl.sanitize(o)}})})]})}const Cf=/^x-parser-/i;function ws(e){if(Array.isArray(e))return e.map(ws);if(e!==null&&typeof e=="object"){const t={};for(const[n,i]of Object.entries(e))Cf.test(n)||(t[n]=ws(i));return t}return e}const Ul=({schema:e})=>{const t=typeof e=="string"?e:JSON.stringify(ws(e),null,2);return u.jsx(ql,{code:t})},ge=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ht=e=>ge(e)?e:null,qo="^[\0-ÿ]*$",Lf=Math.pow(-2,31),Pf=Math.pow(2,31)-1,Df=Math.pow(-2,63),Ff=Math.pow(2,63)-1,Bf={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},Hs=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};function pr(e){const t=Hs(e);if(typeof t.name=="string")return typeof t.namespace=="string"?`${t.namespace}.${t.name}`:t.name}function _s(e,t,n){e.doc&&(t.description=e.doc),e.default!==void 0&&(t.default=e.default);const i=pr(e);i!==void 0&&n[i]&&(t["x-parser-schema-id"]=i)}function Uo(e,t,n){!(Array.isArray(e.type)&&e.type.includes("null"))&&!n&&(t.required=t.required||[],t.required.push(e.name))}function zf(e,t){let n=e,i=t;if(Array.isArray(e)&&e.length>0){const r=e.length>1&&e[0]==="null";n=e[+r],i.oneOf!==void 0&&(i=i.oneOf[0])}return{type:n,jsonSchema:i}}function qf(e,t,n){if(!(t===void 0||n.examples||Array.isArray(e)))switch(e){case"boolean":n.examples=[typeof t=="boolean"?t:t==="true"];break;case"int":n.examples=[parseInt(t,10)];break;default:n.examples=[t]}}function Es(e){return Object.keys(e).some(t=>t!=="type"&&t!=="name"&&t!=="namespace")}function ks(e,t,n){const{type:i,jsonSchema:r}=zf(e,n);qf(i,t.example,r);function s(...o){o.forEach(a=>{let l=!0;a==="minLength"||a==="maxLength"?l=t[a]>-1:a==="multipleOf"&&(l=t[a]>0),t[a]!==void 0&&l&&(r[a]=t[a])})}switch(i){case"int":case"long":case"float":case"double":s("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":t.logicalType&&(r.format=t.logicalType),s("pattern","minLength","maxLength");break;case"array":s("minItems","maxItems","uniqueItems");break}}function Vs(e,t,n){t!==void 0&&(e[t]=n)}function hr(e,t){let n={};if(Array.isArray(e))return Hf(n,e,t);const i=Hs(e),r=typeof e=="string"?e:i.type;switch(n.type=Bf[r],r){case"int":{n.minimum=Lf,n.maximum=Pf;break}case"long":{n.minimum=Df,n.maximum=Ff;break}case"bytes":{n.pattern=qo;break}case"fixed":{n.pattern=qo,n.minLength=i.size,n.maxLength=i.size;break}case"map":{n.additionalProperties=hr(i.values,t);break}case"array":{n.items=hr(i.items,t);break}case"enum":{n.enum=i.symbols;break}case"float":case"double":{n.format=r;break}case"record":{const s=Uf(i,t,n);Vs(t,pr(e),n),n.properties=Object.fromEntries(s.entries());break}default:{const s=t[pr(e)]??(typeof r=="string"?t[r]:void 0);s&&(n=Es(i)?{...s}:s);break}}return _s(i,n,t),ks(r,i,n),n}function Uf(e,t,n){const i=new Map;for(const r of e.fields??[]){const s=typeof r.type=="string"?t[r.type]:void 0;if(s){const o=Es(r)?{...s}:s;Uo(r,n,r.default!==void 0),Es(r)&&(_s(r,o,t),ks(r.type,r,o)),i.set(r.name,o)}else{const o=hr(r.type,t);Uo(r,n,r.default!==void 0),_s(r,o,t),ks(r.type,r,o),i.set(r.name,o),Vs(t,pr(r.type),o)}}return i}function Hf(e,t,n){const i=[];let r=null;for(const s of t){const o=hr(s,n);(typeof s=="string"?s:Hs(s).type)==="null"?r=o:(i.push(o),Vs(n,pr(s),o))}return r&&i.push(r),e.oneOf=i,e}function Os(e){return hr(e,{})}const Ho=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),Vf=new Set(["record","enum","array","map","fixed"]),Vo=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function Ws(e){const t=[];return Cn(e,"schema",t,new Set),t}function Cn(e,t,n,i){if(typeof e=="string"){!Ho.has(e)&&!Vo.test(e)&&n.push(`${t}: "${e}" is not a valid Avro type name`);return}if(Array.isArray(e)){e.length===0&&n.push(`${t}: union must have at least one alternative`),e.forEach((s,o)=>Cn(s,`${t}[${o}]`,n,i));return}if(!ge(e)){n.push(`${t}: expected an Avro type string, object, or union`);return}if(i.has(e))return;i.add(e);const r=e.type;if(typeof r!="string"){Array.isArray(r)||ge(r)?Cn(r,`${t}.type`,n,i):n.push(`${t}: missing "type"`);return}if(!Ho.has(r)&&!Vf.has(r)&&!Vo.test(r)){n.push(`${t}: unknown Avro type "${r}"`);return}switch(r){case"record":{if(!Array.isArray(e.fields)){n.push(`${t}: record must have a "fields" array`);return}e.fields.forEach((s,o)=>{const a=`${t}.fields[${o}]`;if(!ge(s)||typeof s.name!="string"){n.push(`${a}: field must have a string "name"`);return}Cn(s.type,`${a}.type`,n,i)});break}case"enum":{const s=e.symbols;(!Array.isArray(s)||s.some(o=>typeof o!="string"))&&n.push(`${t}: enum must have a "symbols" array of strings`);break}case"array":{e.items===void 0?n.push(`${t}: array must have "items"`):Cn(e.items,`${t}.items`,n,i);break}case"map":{e.values===void 0?n.push(`${t}: map must have "values"`):Cn(e.values,`${t}.values`,n,i);break}case"fixed":{typeof e.size!="number"&&n.push(`${t}: fixed must have a numeric "size"`);break}}}var wi={exports:{}},_i={exports:{}},Ei={},Dr={},ki,Wo;function Hl(){if(Wo)return ki;Wo=1,ki=e;function e(t,n){for(var i=new Array(arguments.length-1),r=0,s=2,o=!0;s<arguments.length;)i[r++]=arguments[s++];return new Promise(function(l,c){i[r]=function(f){if(o)if(o=!1,f)c(f);else{for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h++]=arguments[h];l.apply(null,p)}};try{t.apply(n||null,i)}catch(d){o&&(o=!1,c(d))}})}return ki}var Oi={},Jo;function Wf(){return Jo||(Jo=1,(function(e){var t=e;t.length=function(a){var l=a.length;if(!l)return 0;for(var c=0;--l%4>1&&a.charAt(l)==="=";)++c;return Math.ceil(a.length*3)/4-c};for(var n=new Array(64),i=new Array(123),r=0;r<64;)i[n[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;t.encode=function(a,l,c){for(var d=null,f=[],p=0,h=0,g;l<c;){var v=a[l++];switch(h){case 0:f[p++]=n[v>>2],g=(v&3)<<4,h=1;break;case 1:f[p++]=n[g|v>>4],g=(v&15)<<2,h=2;break;case 2:f[p++]=n[g|v>>6],f[p++]=n[v&63],h=0;break}p>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,f)),p=0)}return h&&(f[p++]=n[g],f[p++]=61,h===1&&(f[p++]=61)),d?(p&&d.push(String.fromCharCode.apply(String,f.slice(0,p))),d.join("")):String.fromCharCode.apply(String,f.slice(0,p))};var s="invalid encoding";t.decode=function(a,l,c){for(var d=c,f=0,p,h=0;h<a.length;){var g=a.charCodeAt(h++);if(g===61&&f>1)break;if((g=i[g])===void 0)throw Error(s);switch(f){case 0:p=g,f=1;break;case 1:l[c++]=p<<2|(g&48)>>4,p=g,f=2;break;case 2:l[c++]=(p&15)<<4|(g&60)>>2,p=g,f=3;break;case 3:l[c++]=(p&3)<<6|g,f=0;break}}if(f===1)throw Error(s);return c-d},t.test=function(a){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a)}})(Oi)),Oi}var Ti,Zo;function Jf(){if(Zo)return Ti;Zo=1,Ti=e;function e(){this._listeners=Object.create(null)}return e.prototype.on=function(n,i,r){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:i,ctx:r||this}),this},e.prototype.off=function(n,i){if(n===void 0)this._listeners=Object.create(null);else if(i===void 0)this._listeners[n]=[];else{var r=this._listeners[n];if(!r)return this;for(var s=0;s<r.length;)r[s].fn===i?r.splice(s,1):++s}return this},e.prototype.emit=function(n){var i=this._listeners[n];if(i){for(var r=[],s=1;s<arguments.length;)r.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,r)}return this},Ti}var Ai,Xo;function Zf(){if(Xo)return Ai;Xo=1,Ai=e(e);function e(s){return typeof Float32Array<"u"?(function(){var o=new Float32Array([-0]),a=new Uint8Array(o.buffer),l=a[3]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3]}function d(h,g,v){o[0]=h,g[v]=a[3],g[v+1]=a[2],g[v+2]=a[1],g[v+3]=a[0]}s.writeFloatLE=l?c:d,s.writeFloatBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],o[0]}function p(h,g){return a[3]=h[g],a[2]=h[g+1],a[1]=h[g+2],a[0]=h[g+3],o[0]}s.readFloatLE=l?f:p,s.readFloatBE=l?p:f})():(function(){function o(l,c,d,f){var p=c<0?1:0;if(p&&(c=-c),c===0)l(1/c>0?0:2147483648,d,f);else if(isNaN(c))l(2143289344,d,f);else if(c>34028234663852886e22)l((p<<31|2139095040)>>>0,d,f);else if(c<11754943508222875e-54)l((p<<31|Math.round(c/1401298464324817e-60))>>>0,d,f);else{var h=Math.floor(Math.log(c)/Math.LN2),g=Math.round(c*Math.pow(2,-h)*8388608)&8388607;l((p<<31|h+127<<23|g)>>>0,d,f)}}s.writeFloatLE=o.bind(null,t),s.writeFloatBE=o.bind(null,n);function a(l,c,d){var f=l(c,d),p=(f>>31)*2+1,h=f>>>23&255,g=f&8388607;return h===255?g?NaN:p*(1/0):h===0?p*1401298464324817e-60*g:p*Math.pow(2,h-150)*(g+8388608)}s.readFloatLE=a.bind(null,i),s.readFloatBE=a.bind(null,r)})(),typeof Float64Array<"u"?(function(){var o=new Float64Array([-0]),a=new Uint8Array(o.buffer),l=a[7]===128;function c(h,g,v){o[0]=h,g[v]=a[0],g[v+1]=a[1],g[v+2]=a[2],g[v+3]=a[3],g[v+4]=a[4],g[v+5]=a[5],g[v+6]=a[6],g[v+7]=a[7]}function d(h,g,v){o[0]=h,g[v]=a[7],g[v+1]=a[6],g[v+2]=a[5],g[v+3]=a[4],g[v+4]=a[3],g[v+5]=a[2],g[v+6]=a[1],g[v+7]=a[0]}s.writeDoubleLE=l?c:d,s.writeDoubleBE=l?d:c;function f(h,g){return a[0]=h[g],a[1]=h[g+1],a[2]=h[g+2],a[3]=h[g+3],a[4]=h[g+4],a[5]=h[g+5],a[6]=h[g+6],a[7]=h[g+7],o[0]}function p(h,g){return a[7]=h[g],a[6]=h[g+1],a[5]=h[g+2],a[4]=h[g+3],a[3]=h[g+4],a[2]=h[g+5],a[1]=h[g+6],a[0]=h[g+7],o[0]}s.readDoubleLE=l?f:p,s.readDoubleBE=l?p:f})():(function(){function o(l,c,d,f,p,h){var g=f<0?1:0;if(g&&(f=-f),f===0)l(0,p,h+c),l(1/f>0?0:2147483648,p,h+d);else if(isNaN(f))l(0,p,h+c),l(2146959360,p,h+d);else if(f>17976931348623157e292)l(0,p,h+c),l((g<<31|2146435072)>>>0,p,h+d);else{var v;if(f<22250738585072014e-324)v=f/5e-324,l(v>>>0,p,h+c),l((g<<31|v/4294967296)>>>0,p,h+d);else{var E=Math.floor(Math.log(f)/Math.LN2);E===1024&&(E=1023),v=f*Math.pow(2,-E),l(v*4503599627370496>>>0,p,h+c),l((g<<31|E+1023<<20|v*1048576&1048575)>>>0,p,h+d)}}}s.writeDoubleLE=o.bind(null,t,0,4),s.writeDoubleBE=o.bind(null,n,4,0);function a(l,c,d,f,p){var h=l(f,p+c),g=l(f,p+d),v=(g>>31)*2+1,E=g>>>20&2047,_=4294967296*(g&1048575)+h;return E===2047?_?NaN:v*(1/0):E===0?v*5e-324*_:v*Math.pow(2,E-1075)*(_+4503599627370496)}s.readDoubleLE=a.bind(null,i,0,4),s.readDoubleBE=a.bind(null,r,4,0)})(),s}function t(s,o,a){o[a]=s&255,o[a+1]=s>>>8&255,o[a+2]=s>>>16&255,o[a+3]=s>>>24}function n(s,o,a){o[a]=s>>>24,o[a+1]=s>>>16&255,o[a+2]=s>>>8&255,o[a+3]=s&255}function i(s,o){return(s[o]|s[o+1]<<8|s[o+2]<<16|s[o+3]<<24)>>>0}function r(s,o){return(s[o]<<24|s[o+1]<<16|s[o+2]<<8|s[o+3])>>>0}return Ai}var Ni={},Yo;function Xf(){return Yo||(Yo=1,(function(e){var t=e,n=65533;t.length=function(r){for(var s=0,o=0,a=0;a<r.length;++a)o=r.charCodeAt(a),o<128?s+=1:o<2048?s+=2:(o&64512)===55296&&(r.charCodeAt(a+1)&64512)===56320?(++a,s+=4):s+=3;return s},t.read=function(r,s,o){if(o-s<1)return"";for(var a=null,l=[],c=0,d,f,p,h;s<o;)d=r[s++],d<=127?l[c++]=d:d>=192&&d<224?(p=(d&31)<<6|r[s++]&63,l[c++]=p>=128?p:n):d>=224&&d<240?(h=(d&15)<<12|(r[s++]&63)<<6|r[s++]&63,l[c++]=h>=2048?h:n):d>=240&&(f=(d&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63,f<65536||f>1114111?l[c++]=n:(f-=65536,l[c++]=55296+(f>>10),l[c++]=56320+(f&1023))),c>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,l.slice(0,c))),c=0);return a?(c&&a.push(String.fromCharCode.apply(String,l.slice(0,c))),a.join("")):String.fromCharCode.apply(String,l.slice(0,c))},t.write=function(r,s,o){for(var a=o,l,c,d=0;d<r.length;++d)l=r.charCodeAt(d),l<128?s[o++]=l:l<2048?(s[o++]=l>>6|192,s[o++]=l&63|128):(l&64512)===55296&&((c=r.charCodeAt(d+1))&64512)===56320?(l=65536+((l&1023)<<10)+(c&1023),++d,s[o++]=l>>18|240,s[o++]=l>>12&63|128,s[o++]=l>>6&63|128,s[o++]=l&63|128):(s[o++]=l>>12|224,s[o++]=l>>6&63|128,s[o++]=l&63|128);return o-a}})(Ni)),Ni}var ji,$o;function Yf(){if($o)return ji;$o=1,ji=e;function e(t,n,i){var r=i||8192,s=r>>>1,o=null,a=r;return function(c){if(c<1||c>s)return t(c);a+c>r&&(o=t(r),a=0);var d=n.call(o,a,a+=c);return a&7&&(a=(a|7)+1),d}}return ji}var Si,Ko;function $f(){if(Ko)return Si;Ko=1,Si=t;var e=Ft();function t(s,o){this.lo=s>>>0,this.hi=o>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(o===0)return n;var a=o<0;a&&(o=-o);var l=o>>>0,c=(o-l)/4294967296>>>0;return a&&(c=~c>>>0,l=~l>>>0,++l>4294967295&&(l=0,++c>4294967295&&(c=0))),new t(l,c)},t.from=function(o){if(typeof o=="number")return t.fromNumber(o);if(e.isString(o))if(e.Long)o=e.Long.fromString(o);else return t.fromNumber(parseInt(o,10));return o.low||o.high?new t(o.low>>>0,o.high>>>0):n},t.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var a=~this.lo+1>>>0,l=~this.hi>>>0;return a||(l=l+1>>>0),-(a+l*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(o){return e.Long?new e.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var r=String.prototype.charCodeAt;return t.fromHash=function(o){return o===i?n:new t((r.call(o,0)|r.call(o,1)<<8|r.call(o,2)<<16|r.call(o,3)<<24)>>>0,(r.call(o,4)|r.call(o,5)<<8|r.call(o,6)<<16|r.call(o,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},t.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},t.prototype.length=function(){var o=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?a===0?o<16384?o<128?1:2:o<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:l<128?9:10},Si}var ar={exports:{}},Kf=ar.exports,Qo;function Qf(){return Qo||(Qo=1,(function(e,t){(function(n,i){function r(s){return s.default||s}i(t),e.exports=r(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Kf,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;/**
|
|
64
64
|
* @license
|
|
65
65
|
* Copyright 2009 The Closure Library Authors
|
|
66
66
|
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
@@ -152,4 +152,4 @@ ${t}`:t},Md=new Set(["allOf","oneOf","anyOf","not","if","then","else","_allOfCon
|
|
|
152
152
|
`],negated:!1},pos:t};case"S":return{node:{type:"charClass",chars:[...`
|
|
153
153
|
`],negated:!0},pos:t};case"b":case"B":return{node:{type:"anchor"},pos:t};default:return{node:{type:"literal",value:n},pos:t}}}function op(e,t){t++;let n=!1;e[t]==="^"&&(n=!0,t++);let i=[];for(;t<e.length&&e[t]!=="]";){if(e[t]==="\\"&&t+1<e.length){t++;let r=e[t];switch(r){case"d":i.push(..."0123456789");break;case"w":i.push(..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_");break;case"s":i.push(...`
|
|
154
154
|
`);break;default:i.push(r)}t++;continue}if(t+2<e.length&&e[t+1]==="-"&&e[t+2]!=="]"){let r=e.charCodeAt(t),s=e.charCodeAt(t+2);for(let o=r;o<=s;o++)i.push(String.fromCharCode(o));t+=3;continue}i.push(e[t]),t++}return t++,{node:{type:"charClass",chars:i,negated:n},pos:t}}function or(e,t,n){if(t>=e.length)return{node:n,pos:t};let i=e[t],r,s;switch(i){case"*":r=0,s=5,t++;break;case"+":r=1,s=5,t++;break;case"?":r=0,s=1,t++;break;case"{":{let o=ap(e,t);if(o)r=o.min,s=o.max,t=o.pos;else return{node:n,pos:t};break}default:return{node:n,pos:t}}return t<e.length&&(e[t]==="?"||e[t]==="+")&&t++,{node:{type:"quantifier",node:n,min:r,max:s},pos:t}}function ap(e,t){let n=e.slice(t).match(/^\{(\d+)(?:,(\d*))?\}/);if(!n)return null;let i=parseInt(n[1],10),r;return n[2]===void 0?r=i:n[2]===""?r=i+5:r=parseInt(n[2],10),{min:i,max:r,pos:t+n[0].length}}function Nt(e){return e<10?`0${e}`:`${e}`}function lp(e,t){return new Date(e,t,0).getDate()}var bc="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function cp(e){return!(e==="^"||e==="$"||e==="^$")}function up(e,t){if(e.format){if(e.format==="date-time"&&(t.minDateTime!==void 0||t.maxDateTime!==void 0))return fp(t);let o=t.formatRegistry.get(e.format);if(o){let a=o(t.random),l=t.minLength??e.minLength,c=t.maxLength??e.maxLength;return l!==void 0&&a.length<l?gs(a,l,t):c!==void 0&&a.length>c?a.slice(0,c):a}}if(e.pattern){let o=t.minLength??e.minLength,a=t.maxLength??e.maxLength;for(let d=0;d<50;d++){let f=nl(e.pattern,t.random);if(!(o!==void 0&&f.length<o)&&!(a!==void 0&&f.length>a))return f}let l=nl(e.pattern,t.random),c=cp(e.pattern);return o!==void 0&&l.length<o&&c?gs(l,o,t):a!==void 0&&l.length>a?l.slice(0,a):l}let n=e.minLength??0,i=e.maxLength??Math.max(n+10,10),r=t.random.int(n,i),s="";for(let o=0;o<r;o++)s+=t.random.pick([...bc]);return t.maxLength!==void 0&&s.length>t.maxLength&&(s=s.slice(0,t.maxLength)),t.minLength!==void 0&&s.length<t.minLength&&(s=gs(s,t.minLength,t)),s}function gs(e,t,n){for(;e.length<t;)e+=n.random.pick([...bc]);return e}function fp(e){let t=e.minDateTime?new Date(e.minDateTime):new Date("1970-01-01"),n=e.maxDateTime?new Date(e.maxDateTime):new Date,i=t.getTime(),r=n.getTime(),s=i+e.random.next()*(r-i),o=new Date(s),a=o.getFullYear(),l=Nt(o.getMonth()+1),c=Nt(o.getDate());return`${a}-${l}-${c}T01:01:01.0Z`}function il(e,t){if(e.const!==void 0)return structuredClone(e.const);if(e.enum!==void 0&&e.enum.length>0){let n=e.enum;if(e.minimum!==void 0||e.maximum!==void 0||e.exclusiveMinimum!==void 0||e.exclusiveMaximum!==void 0||e.multipleOf!==void 0){let r=e.exclusiveMinimum??e.minimum??-1/0,s=e.exclusiveMaximum??e.maximum??1/0,o=e.exclusiveMinimum!==void 0,a=e.exclusiveMaximum!==void 0;n=n.filter(l=>{if(typeof l!="number")return!0;let c=o?l>r:l>=r,d=a?l<s:l<=s;if(!c||!d)return!1;if(e.multipleOf!==void 0){let f=e.multipleOf,p=f.toString().includes(".")?f.toString().split(".")[1].length:0,h=Math.pow(10,p),g=Math.round(l*h),v=Math.round(f*h);if(g%v!==0)return!1}return!0})}if(e.minLength!==void 0||e.maxLength!==void 0){let r=e.minLength??0,s=e.maxLength??1/0;n=n.filter(o=>typeof o!="string"?!0:o.length>=r&&o.length<=s)}if(e.minItems!==void 0||e.maxItems!==void 0){let r=e.minItems??0,s=e.maxItems??1/0;n=n.filter(o=>Array.isArray(o)?o.length>=r&&o.length<=s:!0)}if(e.minProperties!==void 0||e.maxProperties!==void 0){let r=e.minProperties??0,s=e.maxProperties??1/0;n=n.filter(o=>typeof o!="object"||o===null||Array.isArray(o)?!0:Object.keys(o).length>=r&&Object.keys(o).length<=s)}if(n.length===0){let r=[];throw e.minLength!==void 0&&r.push(`minLength: ${e.minLength}`),e.maxLength!==void 0&&r.push(`maxLength: ${e.maxLength}`),e.minItems!==void 0&&r.push(`minItems: ${e.minItems}`),e.maxItems!==void 0&&r.push(`maxItems: ${e.maxItems}`),e.minProperties!==void 0&&r.push(`minProperties: ${e.minProperties}`),e.maxProperties!==void 0&&r.push(`maxProperties: ${e.maxProperties}`),e.minimum!==void 0&&r.push(`minimum: ${e.minimum}`),e.maximum!==void 0&&r.push(`maximum: ${e.maximum}`),e.exclusiveMinimum!==void 0&&r.push(`exclusiveMinimum: ${e.exclusiveMinimum}`),e.exclusiveMaximum!==void 0&&r.push(`exclusiveMaximum: ${e.exclusiveMaximum}`),e.multipleOf!==void 0&&r.push(`multipleOf: ${e.multipleOf}`),Error(`enum values conflict with constraints [${r.join(", ")}] at ${t.path}`)}let i=t.random.pick(n);return typeof i=="object"&&i!==null?structuredClone(i):i}throw Error(`generateEnumConst called without enum or const at ${t.path}`)}function Dt(e){let t={};for(let n of e){if(typeof n=="boolean"){if(!n)return{not:{}};continue}wc(t,n)}return t}function vc(e,t){if(typeof e=="boolean"||typeof t=="boolean")return{};if(typeof e!="object"||e===null)return typeof t=="object"&&t!==null?t:{};if(typeof t!="object"||t===null)return e;let n={...e};return wc(n,t),n}function wc(e,t){if(t.type!==void 0&&(e.type===void 0?e.type=t.type:e.type=dp(e.type,t.type)),t.minimum!==void 0&&(e.minimum=e.minimum!==void 0?Math.max(e.minimum,t.minimum):t.minimum),t.maximum!==void 0&&(e.maximum=e.maximum!==void 0?Math.min(e.maximum,t.maximum):t.maximum),t.exclusiveMinimum!==void 0&&(e.exclusiveMinimum=e.exclusiveMinimum!==void 0?Math.max(e.exclusiveMinimum,t.exclusiveMinimum):t.exclusiveMinimum),t.exclusiveMaximum!==void 0&&(e.exclusiveMaximum=e.exclusiveMaximum!==void 0?Math.min(e.exclusiveMaximum,t.exclusiveMaximum):t.exclusiveMaximum),t.multipleOf!==void 0&&(e.multipleOf=t.multipleOf),t.minLength!==void 0&&(e.minLength=e.minLength!==void 0?Math.max(e.minLength,t.minLength):t.minLength),t.maxLength!==void 0&&(e.maxLength=e.maxLength!==void 0?Math.min(e.maxLength,t.maxLength):t.maxLength),t.pattern!==void 0&&(e.pattern=t.pattern),t.format!==void 0&&(e.format=t.format),t.minItems!==void 0&&(e.minItems=e.minItems!==void 0?Math.max(e.minItems,t.minItems):t.minItems),t.maxItems!==void 0&&(e.maxItems=e.maxItems!==void 0?Math.min(e.maxItems,t.maxItems):t.maxItems),t.uniqueItems&&(e.uniqueItems=!0),t.items!==void 0&&(e.items=t.items),t.prefixItems!==void 0)if(e.prefixItems===void 0)e.prefixItems=t.prefixItems;else{let n=[],i=Math.max(e.prefixItems.length,t.prefixItems.length);for(let r=0;r<i;r++){let s=e.prefixItems[r],o=t.prefixItems[r];s!==void 0&&o!==void 0?n.push(vc(s,o)):s!==void 0?n.push(s):o!==void 0&&n.push(o)}e.prefixItems=n}if(t.contains!==void 0&&(e.containsAll!==void 0?e.containsAll=[...e.containsAll,t.contains]:e.contains!==void 0?(e.containsAll=[e.contains,t.contains],delete e.contains):e.contains=t.contains),t.properties&&(e.properties=pp(e.properties??{},t.properties)),t.required&&(e.required=[...new Set([...e.required??[],...t.required])]),t.additionalProperties!==void 0&&(e.additionalProperties=t.additionalProperties),t.patternProperties&&(e.patternProperties={...e.patternProperties??{},...t.patternProperties}),t.minProperties!==void 0&&(e.minProperties=e.minProperties!==void 0?Math.max(e.minProperties,t.minProperties):t.minProperties),t.maxProperties!==void 0&&(e.maxProperties=e.maxProperties!==void 0?Math.min(e.maxProperties,t.maxProperties):t.maxProperties),t.const!==void 0&&(e.const=t.const),t.enum!==void 0)if(e.enum!==void 0){let n=new Set(t.enum.map(i=>JSON.stringify(i)));e.enum=e.enum.filter(i=>n.has(JSON.stringify(i)))}else e.enum=t.enum;t.$ref&&(e.$ref=t.$ref),t.$defs&&(e.$defs={...e.$defs??{},...t.$defs}),t.allOf&&(e.allOf=[...e.allOf??[],...t.allOf]),t.anyOf&&(e.anyOf=t.anyOf),t.oneOf&&(e.oneOf=t.oneOf)}function dp(e,t){let n=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t],r=n.filter(s=>i.includes(s));return r.length===0?n[0]:r.length===1?r[0]:r}function pp(e,t){let n={...e};for(let[i,r]of Object.entries(t)){let s=e[i];s===void 0?n[i]=r:typeof s=="object"&&typeof r=="object"?n[i]=vc(s,r):n[i]=r}return n}var ri=new Set(["$schema","$id","$ref","$defs","$anchor","$dynamicRef","$dynamicAnchor","$vocabulary","$comment","type","enum","const","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","format","contentEncoding","contentMediaType","contentSchema","items","prefixItems","contains","minItems","maxItems","uniqueItems","minContains","maxContains","properties","required","additionalProperties","patternProperties","minProperties","maxProperties","propertyNames","dependentRequired","dependentSchemas","allOf","anyOf","oneOf","not","if","then","else","faker","chance","jsonPath","template","default","examples","description","title","readOnly","writeOnly","deprecated"]);function _c(e){return typeof e!="object"||e===null?!1:Object.keys(e).some(t=>ri.has(t))}function sl(e,t){if(typeof t!="object"||t===null)return!1;let n=t;return n.const!==void 0?e===n.const:n.enum!==void 0?n.enum.some(i=>i===e):!1}function hp(e){return typeof e=="boolean"?!e:typeof e!="object"||e===null?!1:e.not===!0||typeof e.not=="object"&&e.not!==null&&Object.keys(e.not).length===0}function mp(e){if(e.properties)return e.properties;if(e.type==="object"||e.type===void 0){let t={},n=!1;for(let[i,r]of Object.entries(e))ri.has(i)||(_c(r)?(t[i]=r,n=!0):(t[i]={const:r},n=!0));if(n)return t}return{}}function gp(e,t){return e.required?e.required:e.properties===void 0&&Object.keys(t).length>0?Object.keys(t):[]}async function yp(e,t){var w;let n=mp(e),i=gp(e,n);if(t.depth>=t.maxDepth){if(i.length===0)return{};let y={};for(let O of i){let I=n[O];if(I&&typeof I=="object"&&I!==null){let j=I;j.const!==void 0?y[O]=j.const:j.default!==void 0?y[O]=j.default:j.enum!==void 0&&j.enum.length>0?y[O]=j.enum[0]:y[O]=wp(j.type)}else y[O]=null}return y}if(e.additionalProperties===!1){let y=Object.keys(n).length>0,O=e.patternProperties&&Object.keys(e.patternProperties).length>0,I=new Set(Object.keys(n)),j=[...new Set(i)].filter(M=>!I.has(M));if((e.minProperties??0)>0&&!y&&!O)throw Error(`missing properties for ${e.minProperties} in ${t.path}: additionalProperties is false but no properties or patternProperties defined`);if(j.length>0&&!O&&!y)throw Error(`missing properties for ${j.join(", ")} in ${t.path}: additionalProperties is false but required properties not defined in properties`)}let r=t.path==="/"?"/properties":`${t.path}/properties`,s={...t,depth:t.depth+1,path:r},o={},a=new Set,l=new Set(i),c=t.alwaysFakeOptionals??!1,d=t.fillProperties??!0,f=t.fixedProbabilities??!1,p=t.optionalsProbability??.5,h=Object.keys(n).filter(y=>!l.has(y)),g;if(f&&!c&&h.length>0){let y=Math.round(h.length*p);g=new Set(h.slice(0,y))}let v=y=>c?!0:g?g.has(y):t.random.bool(p);if(Object.keys(n).length>0)for(let[y,O]of Object.entries(n)){if(hp(O))continue;a.add(y);let I=Qt(s,y),j=l.has(y),M=typeof O=="object"&&O!==null&&O.type==="object",ee=O;if(e.patternProperties&&typeof O=="object"&&O!==null){let q=[];for(let[Y,U]of Object.entries(e.patternProperties))try{new RegExp(Y).test(y)&&q.push(U)}catch{}q.length>0&&(ee=Dt([O,...q]))}if(j){let q=await Ne(ee,I);q!==void 0&&(o[y]=q)}else if(v(y)){let q=await Ne(ee,I);q!==void 0&&(o[y]=q)}else if(M&&!d){let q=O.required??[];if(q.length>0){let Y={};for(let U of q){let pe=(O.properties??{})[U]??{},R=Qt(I,U),k=await Ne(pe,R);k!==void 0&&(Y[U]=k)}o[y]=Y}}}for(let y of l)if(!(o[y]!==void 0||a.has(y))){if(e.patternProperties){let O=[];for(let[I,j]of Object.entries(e.patternProperties))new RegExp(I).test(y)&&O.push(j);if(O.length>0){let I=O.length===1?O[0]:Dt(O),j=Qt(s,y),M=await Ne(I,j);M!==void 0&&(o[y]=M),a.add(y)}}if(!a.has(y)){let O=e.additionalProperties??!0;if(O!==!1){let I=Qt(s,y),j=await Ne(O===!0?{}:O,I);j!==void 0&&(o[y]=j),a.add(y)}}}if(e.dependencies){for(let[y,O]of Object.entries(e.dependencies))if(!(typeof O!="object"||O===null||Array.isArray(O))&&o[y]!==void 0&&!a.has(y+"_dep")){a.add(y+"_dep");let I=O.oneOf??O.anyOf??O.allOf??[O],j=null;for(let M of I){if(typeof M!="object"||M===null)continue;let{properties:ee,not:q}=M;if(ee&&ee[y]){let Y=ee[y],U=o[y];if(sl(U,Y)){j=M;break}}if(q!=null&&q.properties){let Y=q.properties[y];if(Y){let U=o[y];if(!sl(U,Y)){j=M;break}}}}if(!j&&I.length>0&&typeof I[0]=="object"&&(j=I[0]),j!=null&&j.not){let M=j.not;if(M.required&&Array.isArray(M.required))for(let ee of M.required)delete o[ee]}if(j!=null&&j.required)for(let M of j.required){if(M===y||o[M]!==void 0)continue;let ee=((w=j.properties)==null?void 0:w[M])??{type:"object"},q=Qt(s,M),Y=await Ne(ee,q);Y!==void 0&&(o[M]=Y)}if(j&&j.properties)for(let[M,ee]of Object.entries(j.properties)){if(M===y)continue;let q=Qt(s,M),Y=await Ne(ee,q);Y!==void 0&&(o[M]=Y)}}}let E=e.minProperties??0,_=e.maxProperties;if(Object.keys(o).length<E){if(e.patternProperties&&Object.keys(e.patternProperties).length>0){let y=Object.entries(e.patternProperties),O=0,I=1e3;for(;Object.keys(o).length<E&&O<I;){O++;let[j,M]=t.random.pick(y),ee=vp(j,t);if(ee&&!o[ee]){let q=Qt(s,ee),Y=await Ne(M,q);Y!==void 0&&(o[ee]=Y),a.add(ee)}}}if(Object.keys(o).length<E){let y=e.additionalProperties,O=y===void 0||y===!0?{type:"string"}:y;if(O!==!1){let I=0,j=1e3;for(;Object.keys(o).length<E&&I<j;){I++;let M=`prop${t.random.int(0,99999)}`;if(!o[M]){let ee=Qt(s,M),q=await Ne(O,ee);q!==void 0&&(o[M]=q),a.add(M)}}}}if(Object.keys(o).length<E){let y=Object.keys(n).join(", ");throw Error(`properties '${y}' were not found while additionalProperties is false in ${t.path}`)}}if(_!==void 0&&Object.keys(o).length>_){let y=Object.keys(o).filter(O=>!l.has(O));for(t.random.shuffle(y);Object.keys(o).length>_&&y.length>0;){let O=y.pop();delete o[O]}}return t.pruneProperties&&t.pruneProperties.length>0&&Ts(o,t.pruneProperties),bp(o,n),o}function Qt(e,t){let n=xp(t),i=e.outputPath==="/"?`/${n}`:`${e.outputPath}/${n}`;return{...e,path:`${e.path}/${t}`,outputPath:i}}function xp(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function bp(e,t){for(let[n,i]of Object.entries(t)){if(typeof i!="object"||i===null)continue;let r=i;if(r.template===void 0)continue;let s=r.template;if(typeof s!="string")continue;let o=s.replace(/#\{(\w+)\}/g,(a,l)=>{let c=e[l];return c!==void 0?String(c):""});e[n]=o}}function vp(e,t){let n=e.match(/^\^([a-zA-Z]+)(\.\*|\(\?\:.*\))?/);if(n){let l=n[1],c=n[2];if(c===".*"||c!=null&&c.includes("?:")){let d=t.random.int(0,10),f="";for(let p=0;p<d;p++)f+=t.random.pick("abcdefghijklmnopqrstuvwxyz".split(""));return l+f}return l}let i=e.match(/(.*\*)?([a-zA-Z]+)\$$/);if(i){let l=i[2],c=t.random.int(1,10),d="";for(let f=0;f<c;f++)d+=t.random.pick("abcdefghijklmnopqrstuvwxyz".split(""));return d+l}let r=e.match(/^\^([a-zA-Z]+)\$$/);if(r)return r[1];let s=t.random.int(3,10),o="abcdefghijklmnopqrstuvwxyz",a="";for(let l=0;l<s;l++)a+=t.random.pick(o.split(""));try{if(new RegExp(e).test(a))return a}catch{}return null}function Ts(e,t){if(typeof e!="object"||e===null)return;if(Array.isArray(e)){for(let i of e)Ts(i,t);return}let n=e;for(let i of Object.keys(n))t.includes(i)?delete n[i]:Ts(n[i],t)}function wp(e){switch(Array.isArray(e)?e[0]:e){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"null":return null;case"array":return[];case"object":return{};default:return null}}async function _p(e,t){var _;if(t.depth>=t.maxDepth){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}if(t.refDepthReached){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}if(e.items===!1&&(e.minItems??0)>0){let w=((_=e.prefixItems)==null?void 0:_.length)??0;if((e.minItems??0)>w)throw Error(`missing items for ${e.minItems} in ${t.path}: items is false but minItems (${e.minItems}) exceeds prefixItems count (${w})`)}let n=t.path==="/"?"/items":`${t.path}/items`,i={...t,depth:t.depth+1,path:n},r=[],s=t.refDepthMax,o=t.minItems??e.minItems??0,a=t.maxItems??e.maxItems??Math.max(o,t.maxDefaultItems);e.maxItems!==void 0&&a>e.maxItems&&(a=e.maxItems),e.minItems!==void 0&&o<e.minItems&&(o=e.minItems),a<o&&(e.maxItems!==void 0?o=a:a=o),t.alwaysFakeOptionals&&(a=Math.max(o,a));let l=e.uniqueItems?new Set:null,c=async(w,y)=>{let O=await Ne(w,y);if(O===void 0)return"omitted";if(l){let I=JSON.stringify(O);if(l.has(I)){for(let j=0;j<50;j++){if(O=await Ne(w,Gt(i,r.length)),O===void 0)continue;let M=JSON.stringify(O);if(!l.has(M))return l.add(M),r.push(O),"added"}return"failed"}l.add(I)}return r.push(O),"added"};if(e.prefixItems)for(let w=0;w<e.prefixItems.length&&r.length<a;w++){let y=Gt(i,w);if(await c(e.prefixItems[w],y)==="failed")break}let d;if(s!==void 0&&t.refDepth>=s-1){let w=e.minItems??0;return w>0?Array.from({length:w},()=>null):[]}let f=t.alwaysFakeOptionals??!1,p=t.fixedProbabilities??!1,h=t.optionalsProbability??.5;if(f)d=a;else if(p){let w=a-Math.max(o,r.length),y=Math.round(w*h);d=Math.max(o,r.length)+y}else d=t.random.int(Math.max(o,r.length),a);e.items;let g=e.prefixItems!==void 0,v=e.additionalItems!==void 0,E;if(g?v?E=e.additionalItems:e.items!==void 0&&(E=e.items):E=e.items,E!==!1&&E!==void 0){let w=E??{},y=0,O=Math.max(d*20,50);for(;r.length<d;){let I=await c(w,Gt(i,r.length));if(I==="added"){y=0;continue}if(y++,I==="failed"||y>=O)break}}if(e.contains){let w=e.minContains??1,y=e.maxContains??Math.max(w,1),O=t.random.int(w,y);for(let I=0;I<O;I++){let j=await Ne(e.contains,Gt(i,r.length));if(j!==void 0){if(l){let M=JSON.stringify(j);if(l.has(M)){let ee=!1;for(let q=0;q<50;q++){if(j=await Ne(e.contains,Gt(i,r.length)),j===void 0)continue;let Y=JSON.stringify(j);if(!l.has(Y)){l.add(Y),ee=!0;break}}if(!ee)continue}else l.add(M)}if(r.length<a){let M=t.random.int(0,r.length);r.splice(M,0,j)}else if(r.length>0){let M=t.random.int(0,r.length-1);r[M]=j}}}for(;r.length>a;)r.pop()}if(e.containsAll){let w=new Set;for(let y of e.containsAll){let O=await Ne(y,Gt(i,r.length));if(O!==void 0){if(l){let I=JSON.stringify(O);if(l.has(I)){let j=!1;for(let M=0;M<50;M++){if(O=await Ne(y,Gt(i,r.length)),O===void 0)continue;let ee=JSON.stringify(O);if(!l.has(ee)){l.add(ee),j=!0;break}}if(!j)continue}else l.add(I)}if(r.length<a){let I=t.random.int(0,r.length);r.splice(I,0,O);let j=new Set;for(let M of w)j.add(M>=I?M+1:M);w.clear();for(let M of j)w.add(M);w.add(I)}else if(r.length>0){let I=Array.from({length:r.length},(j,M)=>M).filter(j=>!w.has(j));if(I.length>0){let j=I[t.random.int(0,I.length-1)];r[j]=O,w.add(j)}else r.push(O),w.add(r.length-1)}}}for(;r.length>a;)r.pop()}return e.uniqueItems&&r.length>0?Ep(r,e,i,o,a,l):r}async function Ep(e,t,n,i,r,s){let o=t.items??{},a=0,l=100;for(;e.length<i&&a<l;){a++;let c=await Ne(o,Gt(n,e.length));if(c===void 0)continue;let d=JSON.stringify(c);s.has(d)||(s.add(d),e.push(c))}for(;e.length>r;)e.pop();return e}function Gt(e,t){let n=e.outputPath==="/"?`/${t}`:`${e.outputPath}/${t}`;return{...e,path:`${e.path}/${t}`,outputPath:n}}function ol(e,t){if(!t||t==="")return e;if(typeof e!="object"||e===null)throw Error(`Cannot resolve fragment "${t}" in non-object schema`);if(t.startsWith("/"))return kp(e,t);throw Error(`Unsupported fragment type: ${t}. Only JSON pointers (starting with /) are supported.`)}function kp(e,t){if(t===""||t==="/")return e;let n=t.slice(1).split("/"),i=e;for(let r of n){let s=r.replace(/~1/g,"/").replace(/~0/g,"~");if(typeof i!="object"||i===null)throw Error(`Cannot resolve JSON pointer "${t}": not an object at "${s}"`);if(Array.isArray(i)){let o=parseInt(s,10);if(isNaN(o)||o<0||o>=i.length)throw Error(`Cannot resolve JSON pointer "${t}": invalid array index "${s}"`);i=i[o]}else{if(!(s in i))throw Error(`Cannot resolve JSON pointer "${t}": property "${s}" not found`);i=i[s]}}return i}function Op(e){let t=new Map;if(typeof e=="boolean")return t;if(e.$id&&typeof e=="object"){let n=e,i=n.$id,{$id:r,...s}=n;t.set(i,s)}if(e.$defs)for(let[n,i]of Object.entries(e.$defs))t.set(`#/$defs/${n}`,i);return t}async function Qr(e,t){let n=e.$ref;if(!n)return{schema:e,ctx:t};let i=t.refDepth+1;if(t.refDepthMax!==void 0&&i>=t.refDepthMax)return{schema:{},ctx:{...t,refDepthReached:!0}};if(t.refStack.has(n)){if(t.refDepthMax!==void 0){if(t.refDepth>=t.refDepthMax)return{schema:{},ctx:{...t,refDepthReached:!0}}}else if(t.depth>=t.maxDepth)return{schema:{type:"null"},ctx:t}}let r,s;if(n.startsWith("#/")){if(r=t.refRegistry.get(n),r===void 0&&n.length>2){let f=t.refRegistry.get("#");if(f!==void 0&&typeof f=="object")try{r=ol(f,n.slice(1))}catch{}}r===void 0&&t.refResolver&&(r=await t.refResolver(n),r!==void 0&&t.refRegistry.set(n,r))}else if(n==="#")r=t.refRegistry.get("#")??{};else if(r=t.refRegistry.get(n),r===void 0&&t.refResolver){s=await t.refResolver(n);let f=n.indexOf("#");if(f!==-1){let p=n.slice(f+1);p?r=ol(s,p):r=s}else r=s;if(s&&typeof s=="object"&&s!==null){let p=s;if(p.$defs)for(let[h,g]of Object.entries(p.$defs))t.refRegistry.set(`#/$defs/${h}`,g)}}if(r===void 0)throw Error(`Unresolved $ref: ${n}`);let o=new Set(["description","title","$comment","readOnly","writeOnly","deprecated"]),{$ref:a,...l}=e,c=Object.fromEntries(Object.entries(l).filter(([f])=>!o.has(f)));Object.keys(c).length>0&&typeof r=="object"&&r!==null&&(r={...r,...c});let d={...t,refStack:new Set([...t.refStack,n]),refDepth:t.refDepth+1};return{schema:r,ctx:d}}function Tp(e,t){typeof e!="boolean"&&(t.set("#",e),As(e,"#",t))}function As(e,t,n){if(e.$id){let{$id:i,...r}=e;n.set(i,r)}if(e.$defs)for(let[i,r]of Object.entries(e.$defs)){let s=`${t}/$defs/${i}`;n.set(s,r),typeof r=="object"&&r!==null&&As(r,s,n)}if(e.properties)for(let[i,r]of Object.entries(e.properties))typeof r=="object"&&r!==null&&As(r,`${t}/properties/${i}`,n)}async function Ap(e,t){return e.$ref?(await Qr(e,t)).schema:e}async function Np(e,t){let n=[];for(let i of e)if(typeof i=="object"&&i!==null&&"$ref"in i){let r=await Ap(i,t);n.push(r)}else typeof i=="object"&&i!==null&&n.push(i);return n}async function jp(e,t){let{allOf:n,anyOf:i,oneOf:r,not:s,if:o,then:a,else:l,...c}=e;if(n){let d=await Np(n,t),f=Dt([c,...d]);return Ne(f,t)}if(r){let d=t.random.shuffle([...r]),f=c.required??[];for(let y of d){let O=typeof y=="object"&&y!==null?y:{};O.$ref&&(O=(await Qr(O,t)).schema);let I=O.required??[],j=[...new Set([...f,...I])],M={...c,required:j},ee=Dt([M,O]),q={...t,optionalsProbability:0,alwaysFakeOptionals:!1};try{return await Ne(ee,q)}catch{}}let p=r[0],h=typeof p=="object"&&p!==null?p:{};h.$ref&&(h=(await Qr(h,t)).schema);let g=h.required??[],v=[...new Set([...f,...g])],E={...c,required:v},_=Dt([E,h]),w={...t,optionalsProbability:0,alwaysFakeOptionals:!1};return Ne(_,w)}if(i){let d=t.random.shuffle([...i]);for(let h of d){let g=Dt([c,h]);try{return await Ne(g,t)}catch{}}let f=i[0],p=Dt([c,f]);return Ne(p,t)}return o!==void 0?Sp(c,o,a,l,t):s?Rp(c,s,t):Ne(c,t)}async function Sp(e,t,n,i,r){if(n!==void 0){let s=Dt([e,t,n]);try{return await Ne(s,r)}catch{}}if(i!==void 0){let s=Dt([e,i]);try{return await Ne(s,r)}catch{}}return Ne(e,r)}async function Rp(e,t,n){if(typeof t=="boolean"){if(t===!0)throw Error(`Cannot generate value for 'not: true' at ${n.path}`);return Ne(e,n)}if(t.type&&!t.enum&&!t.const){let i=Array.isArray(t.type)?t.type:[t.type],r=["string","number","integer","boolean","null","object","array"].filter(s=>!i.includes(s));if(r.length>0){let s=n.random.pick(r),o=Dt([e,{type:s}]);return Ne(o,n)}}if(t.const!==void 0||t.enum!==void 0){let i=t.enum??[t.const],r=new Set(i.map(s=>JSON.stringify(s)));for(let s=0;s<20;s++){let o=await Ne(e,n);if(!r.has(JSON.stringify(o)))return o}}return Ne(e,n)}class Ip{constructor(){_e(this,"extensions",new Map)}define(t,n){this.extensions.set(t,{callback:n,context:{}})}has(t){return this.extensions.has(t)}reset(t){if(t){let n=this.extensions.get(t);n&&(n.context={},this.extensions.delete(t))}else this.extensions.clear()}keys(){return this.extensions.keys()}generate(t,n){let i=Object.keys(t);for(let r=i.length-1;r>=0;r--){let s=i[r],o=s.startsWith("x-")?s.slice(2):s,a=this.extensions.get(o);if(a){let l=t[s],c=a.callback.call(a.context,l,t,n);if(c!==void 0)return c}}}getContext(t){var n;return(n=this.extensions.get(t))==null?void 0:n.context}}var Mp=new Ip;function Cp(e,t){return Mp.generate(e,t)}var Lp=["string","number","integer","boolean","null","object","array"];function al(e,t,n){if(e.faker!==void 0&&e.chance!==void 0)throw Error(`ambiguous generator: both faker and chance are defined in ${t.path}`);if(e.faker!==void 0)try{let i=Pp(e.faker,t),r=cl(i,n??e.type,t.path);return typeof r=="string"&&e.format?ll(r,e.format,t):r}catch{}if(e.chance!==void 0)try{let i=Dp(e.chance,t),r=cl(i,n??e.type,t.path);return typeof r=="string"&&e.format?ll(r,e.format,t):r}catch{}}function ll(e,t,n){if(t==="date"){let i=typeof e=="string"?new Date(e):e;if(i instanceof Date&&!isNaN(i.getTime())){let r=i.getFullYear(),s=Nt(i.getMonth()+1),o=Nt(i.getDate());return`${r}-${s}-${o}`}if(typeof e=="string"){let r=Date.parse(e);if(!isNaN(r)){let s=new Date(r),o=s.getFullYear(),a=Nt(s.getMonth()+1),l=Nt(s.getDate());return`${o}-${a}-${l}`}}}if(t==="date-time"){let i=typeof e=="string"?new Date(e):e;if(i instanceof Date&&!isNaN(i.getTime()))return i.toISOString();if(typeof e=="string"&&Date.parse(e))return new Date(e).toISOString()}return e}function cl(e,t,n){if(t===void 0)return e;let i=Array.isArray(t)?t[0]:t;switch(i){case"string":return e===null?"null":e===void 0?"undefined":String(e);case"number":case"integer":let r=Number(e);return i==="integer"?Math.floor(r):r;case"boolean":return!!e;case"null":return null;default:return e}}function Pp(e,t){var o;if(!((o=t.extensions)!=null&&o.faker)){let a=typeof e=="string"?e:JSON.stringify(e);throw Error(`cannot resolve faker-generator for ${a} in ${t.path}`)}let n,i;if(typeof e=="object"&&e!==null){let a=e,l=Object.keys(a);if(l.length>0)n=l[0],i=a[n];else throw Error(`cannot resolve faker-generator for ${JSON.stringify(e)} in ${t.path}`)}else n=e;let r=n.split("."),s=t.extensions.faker;for(let a of r)try{s=s[a]}catch{throw Error(`failed to resolve .${a} (${n})`)}if(typeof s=="function")return i?s(...i):s();throw Error(`cannot resolve faker-generator for ${n} in ${t.path}`)}function Dp(e,t){var n;if(!((n=t.extensions)!=null&&n.chance)){let i=typeof e=="string"?e:Object.keys(e)[0];throw Error(`cannot resolve chance-generator for ${i} in ${t.path}`)}if(typeof e=="string"){let i=t.extensions.chance[e];if(typeof i=="function")return i.call(t.extensions.chance);throw Error(`cannot resolve chance-generator for ${e} in ${t.path}`)}if(typeof e=="object"&&e!==null){let i=e,r=Object.keys(i)[0],s=i[r],o=t.extensions.chance[r];if(typeof o=="function")return s?o.call(t.extensions.chance,s):o.call(t.extensions.chance)}throw Error(`cannot resolve chance-generator in ${t.path}`)}function Fp(e,t){let n=e.path==="/"?`/${t}`:`${e.path}/${t}`;return{...e,depth:e.depth+1,path:n,refDepthReached:e.refDepthReached}}async function et(e,t,n){return n.outputTransform?n.outputTransform(e,t,n.outputPath):e}async function Ne(e,t){if(e===!0)return Ne({},t);if(e===!1)throw Error(`Cannot generate value for 'false' schema at ${t.path}`);if(t.propAliases&&typeof e=="object"&&e!==null){let s=e,o=null;for(let[a,l]of Object.entries(t.propAliases))a in s&&!(l in s)&&(o||(o={...s}),o[l]=o[a],delete o[a]);o&&(e=o)}let n;if(Array.isArray(e.type)){let s=e.type;n=t.random.pick(s);let o={...t,resolvedType:n},a=al(e,o,n);if(a!==void 0)return typeof a=="string"&&o.maxLength!==void 0&&a.length>o.maxLength?et(a.slice(0,o.maxLength),e,o):et(a,e,o)}else{let s=al(e,t,n);if(s!==void 0)return typeof s=="string"&&t.maxLength!==void 0&&s.length>t.maxLength?et(s.slice(0,t.maxLength),e,t):et(s,e,t)}let i=Cp(e,t);if(i!==void 0)return et(i,e,t);if(e.$ref){let s=await Qr(e,t);return Ne(s.schema,Fp(s.ctx,"$ref"))}if(e.allOf||e.anyOf||e.oneOf||e.not||e.if)return jp(e,t);if(e.const!==void 0)return et(il(e,t),e,t);if(t.useDefaultValue&&e.default!==void 0)return et(e.default,e,t);if(e.enum!==void 0)return et(il(e,t),e,t);if(t.useExamplesValue){if(Array.isArray(e.examples)&&e.examples.length>0)return et(t.random.pick(e.examples),e,t);if(e.example!==void 0)return et(e.example,e,t)}let r=Bp(e,t);if(r===null){if(t.failOnInvalidTypes===!1){if(t.defaultInvalidTypeProduct!==void 0){let s=t.defaultInvalidTypeProduct;return typeof s=="string"?qp(s):s}return null}throw Error(`unknown primitive ${e.type} in ${t.path}/type`)}switch(r){case"null":return et(Gd(),e,t);case"boolean":return et(ep(t),e,t);case"number":return et(yc(e,t),e,t);case"integer":return et(np(e,t),e,t);case"string":return et(up(e,t),e,t);case"object":return et(await yp(e,t),e,t);case"array":return et(await _p(e,t),e,t);default:throw Error(`Unknown type: ${r} at ${t.path}`)}}function Bp(e,t){return t.resolvedType!==void 0?t.resolvedType:typeof e.type=="string"?["string","number","integer","boolean","null","object","array"].includes(e.type)?e.type:null:Array.isArray(e.type)?t.random.pick(e.type):e.properties||e.required||e.additionalProperties!==void 0||e.patternProperties||e.minProperties!==void 0||e.maxProperties!==void 0||zp(e)?"object":e.items||e.prefixItems||e.contains||e.minItems!==void 0||e.maxItems!==void 0||e.uniqueItems?"array":e.minimum!==void 0||e.maximum!==void 0||e.exclusiveMinimum!==void 0||e.exclusiveMaximum!==void 0||e.multipleOf!==void 0?"number":e.minLength!==void 0||e.maxLength!==void 0||e.pattern||e.format||e.faker!==void 0||e.chance!==void 0?"string":t.random.pick(Lp)}function zp(e){if(e.properties||e.type==="object"||e.type==="array")return!1;for(let t of Object.keys(e)){if(ri.has(t))continue;let n=e[t];if(typeof n=="object"&&n!==null&&!Array.isArray(n))return!0}return!1}function qp(e,t){switch(e){case"string":return"";case"number":case"integer":return 0;case"boolean":return!1;case"null":return null;case"object":return{};case"array":return[];default:return null}}function Up(e){let t=Ec(e),n=kc(e);return`${t}T${n}`}function Ec(e){let t=e.int(2e3,2030),n=e.int(1,12),i=lp(t,n),r=e.int(1,i);return`${t}-${Nt(n)}-${Nt(r)}`}function kc(e){let t=e.int(0,23),n=e.int(0,59),i=e.int(0,59);return`${Nt(t)}:${Nt(n)}:${Nt(i)}Z`}var Hp=["alice","bob","charlie","dave","eve","frank","grace","heidi"],Vp=["example.com","test.org","demo.net","sample.io"];function ul(e){let t=e.pick(Hp),n=e.int(1,999),i=e.pick(Vp);return`${t}${n}@${i}`}var Wp=["https"],Jp=["example.com","test.org","demo.net"],Zp=["api","v1","users","items","data","resource"];function Ur(e){let t=e.pick(Wp),n=e.pick(Jp),i=e.int(1,3),r=[];for(let s=0;s<i;s++)r.push(e.pick(Zp));return`${t}://${n}/${r.join("/")}`}var Xp=["alpha","beta","gamma","delta","echo","fox","golf","hotel"],Yp=["com","org","net","io","dev"];function fl(e){let t=e.int(1,3),n=[];for(let i=0;i<t;i++)n.push(e.pick(Xp));return n.push(e.pick(Yp)),n.join(".")}function $p(e){return`${e.int(1,254)}.${e.int(0,255)}.${e.int(0,255)}.${e.int(1,254)}`}function Kp(e){let t=[];for(let n=0;n<8;n++)t.push(e.int(0,65535).toString(16));return t.join(":")}function Qp(e){let t=n=>{let i="";for(let r=0;r<n;r++)i+=e.int(0,15).toString(16);return i};return`${t(8)}-${t(4)}-4${t(3)}-${["8","9","a","b"][e.int(0,3)]}${t(3)}-${t(12)}`}var Gp=["foo","bar","baz","items","0","1","2","name","value"];function dl(e){let t=e.int(1,4),n=[];for(let i=0;i<t;i++)n.push(e.pick(Gp));return"/"+n.join("/")}function eh(e){let t=["P"],n=e.bool(),i=e.bool();return n&&(e.bool()&&t.push(`${e.int(0,100)}Y`),e.bool()&&t.push(`${e.int(0,12)}M`),e.bool()&&t.push(`${e.int(0,30)}D`)),i&&(t.push("T"),e.bool()&&t.push(`${e.int(0,23)}H`),e.bool()&&t.push(`${e.int(0,59)}M`),e.bool()&&t.push(`${e.int(0,59)}S`)),(t.length===1||t.length===2&&t[1]==="T")&&t.push("0D"),t.join("")}var th=new Map([["date-time",Up],["date",Ec],["time",kc],["duration",eh],["email",ul],["idn-email",ul],["uri",Ur],["uri-reference",Ur],["iri",Ur],["iri-reference",Ur],["hostname",fl],["idn-hostname",fl],["ipv4",$p],["ipv6",Kp],["uuid",Qp],["json-pointer",dl],["relative-json-pointer",e=>`${e.int(0,5)}${dl(e)}`]]);function Oc(e){let t=new Map(th);if(e)for(let[n,i]of Object.entries(e))t.set(n,i);return t}function nh(e,t){if(!e.startsWith("$"))throw Error(`Invalid JSONPath: ${e} (must start with $)`);let n=e.slice(1).split(/\.|\[(\d+|\*)\]/).filter(Boolean),i=[t];for(let r of n){if(r==="")continue;let s=[];for(let o of i)if(o!=null)if(r==="*")Array.isArray(o)&&s.push(...o);else if(/^\d+$/.test(r)){let a=parseInt(r,10);Array.isArray(o)&&a<o.length&&s.push(o[a])}else r===""?Ns(o,s):typeof o=="object"&&o!==null&&r in o&&s.push(o[r]);i=s}return i}function Ns(e,t){if(e!=null){if(Array.isArray(e))for(let n of e)t.push(n),Ns(n,t);else if(typeof e=="object")for(let n of Object.values(e))t.push(n),Ns(n,t)}}function rh(e){if(e.properties)return e.properties;if(e.type==="object"||e.type===void 0){let t={},n=!1;for(let[i,r]of Object.entries(e))ri.has(i)||(_c(r)?(t[i]=r,n=!0):(t[i]={const:r},n=!0));if(n)return t}return{}}async function js(e,t,n,i){if(!n.resolveJsonPath)return e;let r=i??e;if(t===!0||t===!1||t.$ref)return e;let s=t;if(s.allOf||s.anyOf||s.oneOf)return e;if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let o={...e},a=rh(s);for(let[l,c]of Object.entries(a))if(l in o){let d=o[l];if(typeof c=="object"&&c!==null&&"jsonPath"in c&&typeof c.jsonPath=="string"){let f=nh(c.jsonPath,r);f.length>0&&(o[l]=n.random.pick(f))}else{let f=await js(d,c,n,r);o[l]=f}}return o}if(Array.isArray(e)&&s.items){let o=[];for(let a of e){let l=await js(a,s.items,n,r);o.push(l)}return o}return e}var ih=Oc(),pl=new Set(["https://json-schema.org/draft/2020-12/schema","https://json-schema.org/draft/2019-09/schema"]);async function sh(e,t){if((t==null?void 0:t.validateSchemaVersion)===!0&&!(t!=null&&t.propAliases)&&typeof e=="object"&&e!==null&&"$schema"in e){let f=e.$schema;if(typeof f=="string"&&!pl.has(f))throw Error(`Unsupported JSON Schema version: ${f}. Supported versions: ${[...pl].join(", ")}`)}let n=ah(t),i=gc((t==null?void 0:t.seed)??1),r=n.propAliases?oh(e,n.propAliases):e,s=Op(r);Tp(r,s);let o=n.formats?Oc(n.formats):new Map(ih),a=n.refDepthMin??n.refDepth,l=n.refDepthMax??n.refDepth;if(a!==void 0&&l!==void 0&&a>l)throw Error(`refDepthMin (${a}) cannot be greater than refDepthMax (${l})`);let c={random:i,maxDepth:n.maxDepth??(l?l+20:5),maxDefaultItems:n.maxDefaultItems??3,optionalsProbability:n.optionalsProbability??.5,depth:0,refRegistry:s,refStack:new Set,formatRegistry:o,refResolver:n.refResolver,minItems:n.minItems,maxItems:n.maxItems,minLength:n.minLength,maxLength:n.maxLength,useDefaultValue:n.useDefaultValue,path:"/",outputPath:"/",alwaysFakeOptionals:n.alwaysFakeOptionals,fixedProbabilities:n.fixedProbabilities,fillProperties:n.fillProperties,extensions:n.extensions,resolveJsonPath:n.resolveJsonPath,autoIncrementCounters:new Map,refDepth:0,refDepthMin:a,refDepthMax:l,useExamplesValue:n.useExamplesValue,pruneProperties:n.pruneProperties,failOnInvalidTypes:n.failOnInvalidTypes,defaultInvalidTypeProduct:n.defaultInvalidTypeProduct,minDateTime:n.minDateTime,maxDateTime:n.maxDateTime,propAliases:n.propAliases,outputTransform:n.outputTransform},d=await Ne(r,c);return n.resolveJsonPath?js(d,e,c,d):d}function oh(e,t){if(typeof e!="object"||e===null)return e;let n=e,i=null;for(let[r,s]of Object.entries(t))r in n&&!(s in n)&&(i||(i={...n}),i[s]=i[r],delete i[r]);return i??e}function ah(e){if(!e)return{};let t=e,n={...e};return t.requiredOnly===!0&&n.optionalsProbability===void 0&&(n={...n,optionalsProbability:0,alwaysFakeOptionals:!1}),t.ignoreProperties&&t.ignoreProperties.length>0&&(n={...n,outputTransform:lh(n.outputTransform,ch(t.ignoreProperties))}),n}function lh(e,t){return e?t?async(n,i,r)=>{let s=await e(n,i,r);return t(s,i,r)}:e:t}function ch(e){return(t,n,i)=>{if(i==="/")return t;let r=uh(i.slice(i.lastIndexOf("/")+1));return e.some(s=>typeof s=="string"?s===r:s instanceof RegExp?s.test(r):s(n))?void 0:t}}function uh(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Tc(e){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const t={};for(const[n,i]of Object.entries(e.properties)){const r=/id$/i.test(n)&&i.type==="string"&&!i.format&&!i.examples,s=i.type==="string"&&!i.format&&!i.examples&&!i.enum;t[n]=r?{...i,format:"uuid"}:s?{...i,examples:["string"]}:Tc(i)}return{...e,properties:t}}return e}function fh({schema:e}){const[t,n]=se.useState(null);if(se.useEffect(()=>{let r=!1;return sh(Tc(e),{seed:42,useExamplesValue:!0,optionalsProbability:1}).then(s=>{r||n(s)}),()=>{r=!0}},[e]),t===null)return null;const i=JSON.stringify(t,null,2);return u.jsxs("div",{children:[u.jsx(ql,{code:i}),u.jsx("span",{className:"text-xs text-foreground-muted italic mt-2 font-bold inline-block",children:"This example is auto generated"})]})}function Ss({schema:e,label:t,description:n,schemaFormat:i,originalSchema:r,conversionError:s}){const o=tc(i),a=Td(i,s),[l,c]=se.useState(a?"example":"schema");return se.useEffect(()=>{!a&&l==="example"&&c("schema")},[a,l]),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("p",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:t}),o&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",title:i,children:o})]}),n&&u.jsx("p",{className:"text-sm text-gray-600 leading-relaxed mt-2 mb-2",children:n})]}),u.jsx(mc,{tabs:[...a?[{id:"example",label:"Example"}]:[],{id:"schema",label:"Schema"},{id:"json",label:"JSON"}],selected:l,onChange:d=>c(d),ariaLabel:"Schema view toggle"})]}),s&&u.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5 mb-2",children:["Could not convert ",nc(i)??"the"," schema — showing raw definition. ",s]}),l==="schema"&&u.jsx(oo,{schema:e,rootName:t}),l==="json"&&u.jsx(Ul,{schema:r??e}),l==="example"&&a&&u.jsx(fh,{schema:e})]})}function Ac({message:e,expanded:t,onToggleExpanded:n,paddingX:i="px-4"}){const[r,s]=se.useState("payload"),{deref:o}=Zt(),a=se.useMemo(()=>e.payload?$r(e.payload,o):null,[e.payload,o]),l=se.useMemo(()=>e.headers?$r(e.headers,o):null,[e.headers,o]),c=e.description||e.payload||e.headers||e.deprecated||e.tags&&e.tags.length>0;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsxs("div",{className:`${i} pb-4 space-y-4 border-t border-border pt-3`,children:[e.description&&u.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed",children:e.description}),(e.payload||e.headers)&&u.jsxs("div",{children:[e.payload&&e.headers&&u.jsx(Rs,{tabs:[{id:"payload",name:"Payload"},{id:"headers",name:"Headers"}],current:r,onChange:d=>s(d)}),u.jsxs("div",{className:"mt-4",children:[(r==="payload"||!e.headers)&&a&&u.jsx(Ss,{schema:a.schema,label:"Payload",description:a.description,schemaFormat:a.schemaFormat,originalSchema:a.originalSchema,conversionError:a.conversionError}),(r==="headers"||!e.payload)&&l&&u.jsx(Ss,{schema:l.schema,label:"Headers",description:l.description,schemaFormat:l.schemaFormat,originalSchema:l.originalSchema,conversionError:l.conversionError})]})]}),e.tags&&e.tags.length>0&&u.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map((d,f)=>u.jsx(Us,{name:`#${d.name}`},f))})]})})}),c&&u.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-1.5 py-2 border-t border-border bg-neutral-50 hover:bg-neutral-100 transition-colors text-xs text-foreground-muted hover:text-foreground-secondary",children:[u.jsx("span",{children:t?"Show less":"Show more"}),u.jsx(ti,{className:`w-3 h-3 transition-transform duration-200 ${t?"rotate-180":""}`})]})]})}function dh({messageKey:e,message:t,first:n,isSelected:i}){const[r,s]=se.useState(!1);return se.useEffect(()=>{i&&s(!0)},[i]),u.jsxs("tbody",{className:`${n?"":"border-t border-border"} ${i?"bg-primary-50/60 outline outline-1 outline-primary-300":""}`,children:[u.jsxs("tr",{id:`message-${e}`,className:"",children:[u.jsx("td",{className:"px-6 py-4",children:u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx("span",{className:"text-sm font-medium text-foreground",children:t.title??t.name??e}),u.jsx("span",{className:"w-fit text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 px-1.5 py-0.5 rounded",children:e})]})}),u.jsx("td",{className:"px-6 py-4 text-sm text-foreground-muted",children:t.summary??"—"}),u.jsx("td",{className:"px-6 py-4",children:u.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx("div",{}),u.jsx("div",{children:t.contentType&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:t.contentType??"—"})})]}),t.deprecated&&u.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"}),u.jsxs("div",{className:"flex justify-between w-full",children:[u.jsx("div",{}),u.jsx("div",{children:t.correlationId&&u.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:t.correlationId.description??t.correlationId.location,children:t.correlationId.location})})]})]})})]}),u.jsx("tr",{children:u.jsx("td",{colSpan:3,className:"p-0",children:u.jsx(Ac,{message:t,expanded:r,onToggleExpanded:()=>s(o=>!o),paddingX:"px-6"})})})]})}function ph({messages:e,selectedKey:t}){const n=Object.entries(e),i=n.length?u.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{className:"bg-neutral-100",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Message"}),u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Summary"}),u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Details"})]})}),n.map(([r,s],o)=>u.jsx(dh,{messageKey:r,message:s,first:o===0,isSelected:t===r},r))]})}):u.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No messages defined in this AsyncAPI document."});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{content:i,stickySideContent:!1})})}function hh({serverNames:e=[],current:t,setCurrent:n}){return u.jsx("nav",{className:"space-y-1 w-max mt-10 @lg:mt-0","aria-label":"Sidebar",children:e.map(i=>u.jsx("a",{onClick:()=>n(i),className:Mn(t===i?"border-l-4 border-neutral-300 text-foreground":"text-foreground-secondary hover:text-foreground","flex items-center px-3 py-2 text-sm font-medium capitalize cursor-pointer"),children:u.jsx("span",{className:"truncate",children:i})},i))})}function Nc({className:e,children:t,...n}){return u.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:t})}function mh(e){return u.jsx(Nc,{...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}function gh(e){return u.jsx(Nc,{...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}function ao({className:e}){return u.jsx("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",className:e,children:u.jsx("path",{d:"M202.1,450a15,15,0,0,1-10.6-25.61L365.79,250.1,191.5,75.81A15,15,0,0,1,212.71,54.6l184.9,184.9a15,15,0,0,1,0,21.21l-184.9,184.9A15,15,0,0,1,202.1,450Z"})})}const yh=[{id:"userPassword",name:"User/Password"},{id:"oauth2",name:"OAuth2"},{id:"apiKey",name:"API key"},{id:"openIdConnect",name:"OpenID"},{id:"X509",name:"X.509 certificate"},{id:"scramSha256",name:"SASL"},{id:"scramSha512",name:"SASL"},{id:"plain",name:"SASL"},{id:"gssapi",name:"SASL"}];function jc({securities:e}){var a;const{deref:t}=Zt();Jr(e,t);const n=se.useMemo(()=>yh.filter(l=>{const c=l.id;return e==null?void 0:e.some(d=>d.type.toLowerCase()===c.toLowerCase())}),[e]),[i,r]=se.useState(n.length>0?n[0].id:null);se.useEffect(()=>{n.length>0&&r(n[0].id)},[n]);function s(l){return e.find(c=>c.type===l)}const o=i?(a=s(i))==null?void 0:a.description:void 0;return u.jsxs("div",{children:[u.jsx(Rs,{tabs:n,current:i,onChange:r}),u.jsxs("div",{className:"py-4 prose text-foreground-muted",children:[i==="userPassword"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide user and password"})," ","to connect to this server."]}),i&&["scramSha256","scramSha512","plain"].includes(i)&&u.jsxs(Hr,{description:o,children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide username and password"})," ","to connect to this server."]}),i==="gssapi"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"authenticate using Kerberos (GSSAPI)"})," ","to connect to this server."]}),i==="X509"&&u.jsxs(Hr,{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"download the certificate file"})," ","from the service provider to connect to this server."]}),i==="apiKey"&&u.jsx(xh,{security:s("apiKey")}),i==="openIdConnect"&&u.jsx(bh,{security:s("openIdConnect")}),i==="oauth2"&&u.jsx(vh,{security:s("oauth2")})]})]})}const Hr=({description:e,children:t})=>e?u.jsx(u.Fragment,{children:u.jsx(xn,{children:e})}):u.jsx("span",{children:t}),xh=({security:e})=>e!=null&&e.description?u.jsx(xn,{children:e.description}):(e==null?void 0:e.in)==="password"?u.jsxs("span",{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the password and leave the user name empty"})," ","to connect to this server."]}):u.jsxs("span",{children:["You have to"," ",u.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the user name and leave the password empty"})," ","to connect to this server."]}),bh=({security:e})=>u.jsxs(u.Fragment,{children:[e!=null&&e.description?u.jsx(xn,{children:e.description}):u.jsx("p",{children:"You can use OpenID to connect to this server."}),u.jsxs("p",{children:["The OpenID Connect URL is"," ",u.jsx("a",{href:e.openIdConnectUrl,target:"_blank",rel:"noreferrer",children:e.openIdConnectUrl}),"."]}),(e==null?void 0:e.scopes)&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 items-center @sm:gap-4",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Scopes"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("code",{children:_u(e.scopes)})})]})]}),vh=({security:e})=>{const t=e==null?void 0:e.flows;return u.jsxs(u.Fragment,{children:[(e==null?void 0:e.description)&&u.jsx(xn,{children:e.description}),t&&Object.entries(t).map(([n,i])=>{let r="",s="";switch(n){case"clientCredentials":r=fu,s=du;break;case"implicit":r=cu,s=uu;break;case"password":r=pu,s=hu;break;case"authorizationCode":r=mu,s=gu;break}return u.jsxs("div",{children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg leading-6 font-bold text-foreground",children:r}),u.jsx("p",{className:"mt-1 max-w-2xl text-sm text-foreground-muted",children:s})]}),u.jsx("div",{className:"mt-5 border-t border-border",children:u.jsxs("dl",{className:"@sm:divide-y @sm:divide-border",children:[i.authorizationUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Authorization URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.authorizationUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.authorizationUrl})})]}),i.tokenUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Token URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.tokenUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.tokenUrl})})]}),i.refreshUrl&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Refresh URL"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("a",{href:i.refreshUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:i.refreshUrl})})]}),i.availableScopes&&u.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[u.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Scopes"}),u.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:u.jsx("div",{className:"flex flex-wrap gap-1.5",children:(Array.isArray(i.availableScopes)?i.availableScopes:Object.keys(i.availableScopes)).map(o=>u.jsx("code",{className:"text-xs bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:o},o))})})]})]})})]},n)})]})};function wh({className:e}){return u.jsxs("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m7-7H5m10-3l-3 3 3 3m-6-6l3 3-3 3"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 6.873a9 9 0 011 4.127 9 9 0 01-1 4.127M5 6.873a9 9 0 00-1 4.127 9 9 0 001 4.127"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 8.873a6 6 0 011 3.127 6 6 0 01-1 3.127M8 8.873a6 6 0 00-1 3.127 6 6 0 001 3.127"})]})}function _h(e){return e.startsWith("http://")||e.startsWith("https://")}function Sc(e){return e.replace(/([A-Z])/g," $1").replace(/^(.)/,t=>t.toUpperCase()).trim()}function Rc({value:e}){if(e==null)return null;if(typeof e=="string"&&_h(e))return u.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 underline underline-offset-2 break-all hover:text-blue-800",children:e});if(typeof e=="boolean")return u.jsx("span",{className:`text-xs font-medium ${e?"text-green-600":"text-red-500"}`,children:e?"true":"false"});if(typeof e=="number")return u.jsx("span",{className:"text-xs font-mono text-blue-600",children:e});if(typeof e=="object"){const t=e;return"type"in t&&Array.isArray(t.enum)?u.jsx("div",{className:"flex flex-wrap gap-1",children:t.enum.map((n,i)=>u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:String(n)},i))}):u.jsx("div",{className:"mt-1 border-l-2 border-border pl-3 space-y-2",children:Object.entries(t).map(([n,i])=>u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx("span",{className:"text-xs text-foreground-muted shrink-0 w-36",children:Sc(n)}),u.jsx(Rc,{value:i})]},n))})}return u.jsx("span",{className:"text-xs text-foreground-secondary",children:String(e)})}function Ic({bindings:e,expand:t=!1,protocol:n}){const[i,r]=se.useState(t),s=vu[n.toLowerCase()]??{label:n,color:"bg-neutral-100 text-foreground-secondary border-border"},o=Object.entries(e??{}).filter(([a,l])=>a!=="bindingVersion"&&l!==void 0&&l!==null);return o.length===0?null:u.jsxs("div",{className:"mt-2 rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>r(a=>!a),children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${s.color}`,children:s.label})}),i?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted"})]}),i&&u.jsx("div",{className:"divide-y divide-neutral-100",children:o.length===0?u.jsx("p",{className:"px-4 py-3 text-xs text-foreground-muted italic",children:"No binding properties defined."}):o.map(([a,l])=>u.jsxs("div",{className:"flex items-center items-start gap-4 px-4 py-3",children:[u.jsx("span",{className:"text-xs font-medium text-foreground-muted w-40 shrink-0 pt-0.5",children:Sc(a)}),u.jsx("div",{className:"flex-1 min-w-0",children:u.jsx(Rc,{value:l})})]},a))})]})}function Eh({host:e,protocol:t,description:n,tags:i,variables:r,security:s,bindings:o}){const a=r,[l,c]=se.useState(!1);return u.jsxs("div",{children:[u.jsxs("div",{className:"font-bold text-foreground-secondary mt-8 mb-4 bg-neutral-200 border border-neutral-500 p-4 rounded-lg",children:[u.jsxs("div",{className:"border border-dotted border-black p-2 rounded-lg bg-surface",children:[u.jsx(mh,{className:"inline-block mr-1 -mt-1 h-6 text-foreground-muted"}),e&&u.jsx(dr,{address:e,parameters:a,className:"font-bold leading-tight tracking-tight px-0"})]}),u.jsx("div",{className:"mt-2",children:i&&i.map((d,f)=>{const p=d,h=p.externalDocs;return u.jsx(Us,{href:h&&h.url,title:p.description||(h&&h.description?h.description:void 0),name:p.name},f)})})]}),u.jsx(xn,{children:n}),s&&s.length>0&&u.jsxs("div",{children:[u.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[u.jsx(gh,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Authorization"]}),u.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following authorization mechanisms:"}),u.jsxs("div",{className:"mt-4 rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>c(d=>!d),children:[u.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:s.length}),l?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted shrink-0"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),l&&u.jsx("div",{className:"px-4 py-2 border-t border-border",children:u.jsx(jc,{securities:s})})]})]}),(()=>{const d=o==null?void 0:o[t];return d&&Object.keys(d).some(p=>p!=="bindingVersion")?u.jsxs("div",{children:[u.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[u.jsx(wh,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Connection Settings"]}),u.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following connection configuration:"}),u.jsx(Ic,{bindings:d,protocol:t})]}):null})()]})}function kh({servers:e}){const t=[...Object.keys(e)],[n,i]=se.useState(void 0),r=n&&t.includes(n)?n:t[0],s=u.jsx(Eh,{...e[r]});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:yu,content:s,sideContent:u.jsx(hh,{serverNames:t,current:r,setCurrent:i}),stickySideContent:!0,reverseLayoutOnMobile:!0})})}function Mc({message:e,messageId:t,i:n}){const[i,r]=se.useState(!1);return u.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsx("p",{className:"text-sm font-medium text-foreground",children:e.title??e.name??`Message ${n+1}`}),(t??e.name)&&u.jsx("span",{className:"text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 p-0.5 rounded shrink-0",children:t??e.name})]}),e.summary&&u.jsx("p",{className:"text-xs text-foreground-muted mt-1.5 leading-relaxed",children:e.summary}),u.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 mt-4",children:[e.contentType&&u.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:e.contentType}),e.correlationId&&u.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:e.correlationId.description??e.correlationId.location,children:e.correlationId.location}),e.deprecated&&u.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"})]})]}),u.jsx(Ac,{message:e,expanded:i,onToggleExpanded:()=>r(s=>!s)})]})}function Oh({requestMessages:e,reply:t,isSend:n,operationId:i}){const[r,s]=se.useState("request"),o=t.messages??[],a=t.channel,l=t.address,c=r==="request"?e:o,d=r==="request"?n?"accepts":"expects":u.jsxs(u.Fragment,{children:["replies to"," ",l?u.jsxs(u.Fragment,{children:["a channel in"," ",u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:l.location})]}):(a==null?void 0:a.address)&&u.jsx(dr,{address:a.address,parameters:a.parameters,className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary"})]});return u.jsxs("div",{children:[u.jsx("div",{className:"flex items-end gap-0.5 -ml-2",children:["request","reply"].map(f=>u.jsx("button",{onClick:()=>s(f),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize
|
|
155
|
-
${r===f?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:f},f))}),u.jsx("div",{className:"-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32",children:c.length>0?u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"text-sm text-foreground-secondary mb-3",children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:i})," ",d,c.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 font-bold text-foreground-secondary",children:"one of"}),"the following messages:"]}):u.jsxs("span",{children:[" "," with the following message:"]})]}),u.jsx("div",{className:"space-y-2",children:c.map((f,p)=>u.jsx(Mc,{message:f,messageId:f.name,i:p},p))})]}):u.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No messages defined."})})]})}function Th({op:e,id:t}){var g;const[n,i]=se.useState(!1),r=e.messages??[],s=e.tags??[],o=e.bindings,a=e.traits,l=e.reply,c=e.externalDocs,d=e.security,f=o??(Array.isArray(a)?(g=a.find(v=>v.bindings))==null?void 0:g.bindings:void 0),p=e.action===tn.SEND,h=u.jsx("div",{className:"space-y-2",children:r.map((v,E)=>u.jsx(Mc,{message:v,messageId:v.name,i:E},E))});return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200",children:["ID: ",t]}),(c==null?void 0:c.url)&&u.jsxs("a",{href:c.url,target:"_blank",rel:"noreferrer",title:c.description||c.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",u.jsx(zl,{className:"w-3.5 h-3.5"})]})]}),e.description&&u.jsx("div",{children:u.jsx(xn,{children:e.description})}),e.summary&&u.jsx("div",{children:u.jsx("p",{className:"text-sm text-foreground-secondary",children:e.summary})}),d&&d.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Operation Authorization"}),u.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>i(v=>!v),children:[u.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:d.length}),n?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted shrink-0"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),n&&u.jsx("div",{className:"px-4 py-2 border-t border-border",children:u.jsx(jc,{securities:d})})]})]}),f&&Object.entries(f).map(([v,E])=>E?u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-1",children:"Operation configuration"}),u.jsx(Ic,{protocol:v,bindings:E},v)]}):null),l?u.jsx(Oh,{requestMessages:r,reply:l,isSend:p,operationId:t}):r.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:[u.jsx("span",{className:"font-bold",children:t})," ",p?"accepts":"expects",r.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold text-foreground-mute",children:"one of"}),"the following messages:"]}):" the following message:"]}),h]}),s.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Tags"}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map((v,E)=>u.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-neutral-100 text-foreground-secondary",children:v.name},E))})]})]})}function Ah({operations:e,selectedKey:t=null,onSelectKey:n}){const i=p=>n==null?void 0:n(p),{deref:r}=Zt();if(!Object.keys(e).length)return null;const s=t?e[t]:null,o=Object.keys(e).map(p=>{var I;const h=e[p];Jr(h,r);const g=h.channel,v=g==null?void 0:g.address,E=g==null?void 0:g.parameters,_=h.action===tn.SEND,w=((I=h.action)==null?void 0:I.toUpperCase())??"",y=_?"bg-green-100 text-green-800":h.action===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",O=t===p;return u.jsxs("tr",{id:`operation-${p}`,onClick:()=>i(p),className:`group cursor-pointer ${O?"bg-neutral-50":""}`,children:[u.jsx("td",{className:"px-6 py-4 max-w-0 w-full group-hover:bg-neutral-50",children:v&&u.jsx(dr,{address:v,parameters:E,truncate:!0})}),u.jsx("td",{className:"px-6 py-4 w-32 group-hover:bg-neutral-50",children:u.jsx("div",{className:`inline-flex w-24 items-center justify-center px-2 py-1 text-center rounded-md text-xs font-medium uppercase ${y}`,children:w})}),u.jsx("td",{className:"group-hover:bg-neutral-50"})]},p)}),a=s?s.channel:null,c=(s==null?void 0:s.action)===tn.SEND?"bg-green-100 text-green-800":(s==null?void 0:s.action)===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",d=s&&(a!=null&&a.address)?u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium uppercase ${c}`,children:s.action}),u.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:u.jsx(dr,{address:a.address,parameters:a.parameters})})]}):t??"Operation",f=u.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{className:"bg-neutral-100 w-full",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Operation"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider"})]})}),u.jsx("tbody",{className:"bg-surface divide-y divide-border",children:o})]})});return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:xu,content:f,stickySideContent:!1})}),u.jsx(xl,{isOpen:!!s,side:"right",onClose:()=>i(null),title:d,children:s&&u.jsx(Th,{op:s,id:t})})]})}function Nh({schemas:e,selectedKey:t}){const{deref:n}=Zt(),i=se.useMemo(()=>Object.entries(e).map(([s,o])=>[s,$r(o,n)]),[e,n]),r=i.length?u.jsx("div",{className:"grid gap-6 w-full",children:i.map(([s,o])=>{const a=o.schema,l=tc(o.schemaFormat),c=a.properties?Object.keys(a.properties).length:0;return u.jsxs("article",{id:`schema-${s}`,className:`rounded-xl border bg-surface p-5 shadow-sm transition-colors ${t===s?"border-primary-300 ring-1 ring-primary-200":"border-border"}`,children:[u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),o.description&&u.jsx("p",{className:"mt-1 text-sm text-foreground-secondary",children:o.description})]}),u.jsx("span",{className:"inline-flex rounded-full bg-neutral-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-foreground-secondary",children:a.type??"unknown"})]}),(a.format||l||c>0)&&u.jsxs("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-foreground-secondary",children:[a.format&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:["Format: ",a.format]}),l&&u.jsx("span",{className:"rounded-full bg-neutral-100 px-3 py-1",title:o.schemaFormat,children:l}),c>0&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:[c," properties"]})]}),o.conversionError&&u.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5",children:["Could not convert"," ",nc(o.schemaFormat)??"the"," schema — showing raw definition. ",o.conversionError]}),o.conversionError&&typeof o.originalSchema=="string"?u.jsx("div",{className:"mt-4",children:u.jsx(Ul,{schema:o.originalSchema})}):u.jsx(oo,{schema:a,rootName:s,className:"mt-4"})]},s)})}):u.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No schemas defined in this AsyncAPI document."});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{content:r,stickySideContent:!1})})}const jh=e=>typeof e=="object"&&e!==null,Sh=e=>e==="operations"||e==="messages"||e==="schemas";function Rh({asyncapi:e,config:t}){var U,pe,R,k,m,T;const n=t.show??{},i=[...n.operations!==!1?[{id:"operations",name:"Operations",icon:bl}]:[],...n.messages!==!1?[{id:"messages",name:"Messages",icon:vl}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:wl}]:[]],r=((U=i[0])==null?void 0:U.id)??"operations",[s,o]=se.useState(r),[a,l]=se.useState(null),[c,d]=se.useState(null),[f,p]=se.useState(null),h=i.some(S=>S.id===s)?s:r,g=n.operations!==!1?a:null,v=n.messages!==!1?c:null,E=n.schemas!==!1?f:null,_=se.useMemo(()=>new Map,[]),[w,y]=se.useState(null),[O,I]=se.useState(null);se.useEffect(()=>{_.clear()},[e,_]);const j=se.useCallback(S=>{if(_.has(S))return _.get(S);const W=S.replace(/^#\//,"").split("/");let B=e;for(const K of W){if(!jh(B)){B=void 0;break}const ne=K.replace(/~1/g,"/").replace(/~0/g,"~");if(B=B[ne],B==null)break}return B!==void 0&&_.set(S,B),B},[e,_]),M=((pe=t.expand)==null?void 0:pe.schemas)===!0,ee=se.useMemo(()=>({document:e,deref:j,portalHost:w,rootElement:O,defaultSchemaExpanded:M}),[e,j,w,O,M]),q=h==="operations"?u.jsx(Ah,{operations:e.operations??{},selectedKey:g,onSelectKey:l}):h==="messages"?u.jsx(ph,{messages:((R=e.components)==null?void 0:R.messages)??{},selectedKey:v}):u.jsx(Nh,{schemas:((k=e.components)==null?void 0:k.schemas)??{},selectedKey:E}),Y=t.theme?Au(t.theme):{};return u.jsx(gl.Provider,{value:ee,children:u.jsxs("div",{ref:I,style:Y,className:`relative @container bg-background text-foreground p-2 ${n.sidebar!==!1?"pt-14":""}`,children:[u.jsx("div",{ref:y,className:"asyncapi-portal-root"}),n.info!==!1&&u.jsx(Nf,{...e.info}),n.servers!==!1&&e.servers&&Object.keys(e.servers).length>0&&u.jsx(kh,{servers:e.servers}),n.sidebar!==!1&&u.jsx(ku,{info:e.info,operations:n.operations!==!1?e.operations:void 0,messages:n.messages!==!1?(m=e.components)==null?void 0:m.messages:void 0,schemas:n.schemas!==!1?(T=e.components)==null?void 0:T.schemas:void 0,sidebarConfig:t.sidebar,activeTab:h,onTabChange:o,onItemSelect:(S,W)=>{o(S),l(S==="operations"?W:null),d(S==="messages"?W:null),p(S==="schemas"?W:null)},selectedItem:g?{tab:"operations",key:g}:v?{tab:"messages",key:v}:E?{tab:"schemas",key:E}:null}),u.jsx(eu,{tabs:i,current:h,onChange:S=>{Sh(S)&&o(S)}}),u.jsx("div",{id:`panel-${h}`,role:"tabpanel","aria-labelledby":`tab-${h}`,children:q})]})})}const lo=e=>{const t="doc"in e?e.doc:e.asyncapi,n=e.config??ml;return u.jsx(Rh,{asyncapi:t,config:n})};function Cc(e,t,n){e.registerSchemaParser(t);const i=e.parserRegistry,r=i.get.bind(i);i.get=s=>{const o=r(s);return o!==void 0?o:n(s)?t:void 0}}const Ih=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/vnd.apache.avro;version=1.8.2","application/vnd.apache.avro+json;version=1.8.2","application/vnd.apache.avro+yaml;version=1.8.2"];function Mh(){return{validate:Lh,parse:Ph,getMimeTypes:()=>Ih}}function Ch(e){Cc(e,Mh(),xr)}function Lh(e){return Ws(e.data).map(t=>({message:t,path:e.path}))}function Ph(e){var n,i;const t=Ws(e.data);if(t.length>0)return{[mr]:t[0]};try{const r=Os(e.data),s=e.meta.message,o=(i=(n=s==null?void 0:s.bindings)==null?void 0:n.kafka)==null?void 0:i.key;return o&&s&&(s["x-parser-original-bindings-kafka-key"]=o,s.bindings.kafka.key=Os(o)),r}catch(r){return{[mr]:r instanceof Error?r.message:"Failed to convert Avro schema"}}}const Dh=["application/vnd.google.protobuf","application/vnd.google.protobuf;version=2","application/vnd.google.protobuf;version=3"];function Fh(){return{validate:zh,parse:qh,getMimeTypes:()=>Dh}}function Bh(e){Cc(e,Fh(),br)}function zh(e){return _d(e.data).map(t=>({message:t,path:e.path}))}function qh(e){if(typeof e.data!="string")return{[mr]:"Protobuf schema must be a string of .proto source"};try{return no(e.data)}catch(t){return{[mr]:t instanceof Error?t.message:"Failed to convert Protobuf schema"}}}async function Uh(){try{const e=await Promise.resolve().then(()=>require("./index-BNxgjuJI.cjs")).then(n=>n.index),t=e.default??e;if(typeof t!="function")throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");return t}catch(e){throw console.error("[apiuikit] Failed to load '@asyncapi/parser/browser':",e),new Error("[apiuikit] The parsed entry requires '@asyncapi/parser'. Install it (`npm i @asyncapi/parser`), or use the `AsyncAPI` component with a pre-resolved document instead.")}}async function Lc(e){const t=await Uh(),n=new t;Ch(n),Bh(n);try{const{document:i,diagnostics:r}=await n.parse(e);return{diagnostics:r,document:i?Vh(i):null}}catch(i){return{diagnostics:[{message:i instanceof Error?i.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function Hh(e,t){const{diagnostics:n,document:i}=await Lc(e);return{diagnostics:n,view:i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}}function Vh(e){return e.json()}function Wh({raw:e,config:t,onDiagnostics:n}){const[i,r]=se.useState(null),s=se.useRef(n);return s.current=n,se.useEffect(()=>{let o=!0;return Lc(e).then(({document:a,diagnostics:l})=>{var c;o&&(r(a),(c=s.current)==null||c.call(s,l))}),()=>{o=!1}},[e]),i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}exports.AsyncAPI=lo;exports.AsyncAPIRenderer=Wh;exports.SchemaTabs=Ss;exports.SchemaTree=oo;exports.defaultConfig=ml;exports.getDefaultExportFromCjs=Is;exports.parseAndRender=Hh;exports.useAsyncAPIDocument=Zt;
|
|
155
|
+
${r===f?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:f},f))}),u.jsx("div",{className:"-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32",children:c.length>0?u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"text-sm text-foreground-secondary mb-3",children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:i})," ",d,c.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 font-bold text-foreground-secondary",children:"one of"}),"the following messages:"]}):u.jsxs("span",{children:[" "," with the following message:"]})]}),u.jsx("div",{className:"space-y-2",children:c.map((f,p)=>u.jsx(Mc,{message:f,messageId:f.name,i:p},p))})]}):u.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No messages defined."})})]})}function Th({op:e,id:t}){var g;const[n,i]=se.useState(!1),r=e.messages??[],s=e.tags??[],o=e.bindings,a=e.traits,l=e.reply,c=e.externalDocs,d=e.security,f=o??(Array.isArray(a)?(g=a.find(v=>v.bindings))==null?void 0:g.bindings:void 0),p=e.action===tn.SEND,h=u.jsx("div",{className:"space-y-2",children:r.map((v,E)=>u.jsx(Mc,{message:v,messageId:v.name,i:E},E))});return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200",children:["ID: ",t]}),(c==null?void 0:c.url)&&u.jsxs("a",{href:c.url,target:"_blank",rel:"noreferrer",title:c.description||c.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",u.jsx(zl,{className:"w-3.5 h-3.5"})]})]}),e.description&&u.jsx("div",{children:u.jsx(xn,{children:e.description})}),e.summary&&u.jsx("div",{children:u.jsx("p",{className:"text-sm text-foreground-secondary",children:e.summary})}),d&&d.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Operation Authorization"}),u.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-neutral-50 cursor-pointer hover:bg-neutral-100 transition-colors",onClick:()=>i(v=>!v),children:[u.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:d.length}),n?u.jsx(ti,{className:"w-4 h-4 text-foreground-muted shrink-0"}):u.jsx(ao,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),n&&u.jsx("div",{className:"px-4 py-2 border-t border-border",children:u.jsx(jc,{securities:d})})]})]}),f&&Object.entries(f).map(([v,E])=>E?u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-1",children:"Operation configuration"}),u.jsx(Ic,{protocol:v,bindings:E},v)]}):null),l?u.jsx(Oh,{requestMessages:r,reply:l,isSend:p,operationId:t}):r.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:[u.jsx("span",{className:"font-bold",children:t})," ",p?"accepts":"expects",r.length>1?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold text-foreground-mute",children:"one of"}),"the following messages:"]}):" the following message:"]}),h]}),s.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Tags"}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map((v,E)=>u.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-neutral-100 text-foreground-secondary",children:v.name},E))})]})]})}function Ah({operations:e,selectedKey:t=null,onSelectKey:n}){const i=p=>n==null?void 0:n(p),{deref:r}=Zt();if(!Object.keys(e).length)return null;const s=t?e[t]:null,o=Object.keys(e).map(p=>{var I;const h=e[p];Jr(h,r);const g=h.channel,v=g==null?void 0:g.address,E=g==null?void 0:g.parameters,_=h.action===tn.SEND,w=((I=h.action)==null?void 0:I.toUpperCase())??"",y=_?"bg-green-100 text-green-800":h.action===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",O=t===p;return u.jsxs("tr",{id:`operation-${p}`,onClick:()=>i(p),className:`group cursor-pointer ${O?"bg-neutral-50":""}`,children:[u.jsx("td",{className:"px-6 py-4 max-w-0 w-full group-hover:bg-neutral-50",children:v&&u.jsx(dr,{address:v,parameters:E,truncate:!0})}),u.jsx("td",{className:"px-6 py-4 w-32 group-hover:bg-neutral-50",children:u.jsx("div",{className:`inline-flex w-24 items-center justify-center px-2 py-1 text-center rounded-md text-xs font-medium uppercase ${y}`,children:w})}),u.jsx("td",{className:"group-hover:bg-neutral-50"})]},p)}),a=s?s.channel:null,c=(s==null?void 0:s.action)===tn.SEND?"bg-green-100 text-green-800":(s==null?void 0:s.action)===tn.RECEIVE?"bg-blue-100 text-blue-800":"bg-neutral-100 text-foreground-secondary",d=s&&(a!=null&&a.address)?u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium uppercase ${c}`,children:s.action}),u.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:u.jsx(dr,{address:a.address,parameters:a.parameters})})]}):t??"Operation",f=u.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{className:"bg-neutral-100 w-full",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Operation"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider"})]})}),u.jsx("tbody",{className:"bg-surface divide-y divide-border",children:o})]})});return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{title:xu,content:f,stickySideContent:!1})}),u.jsx(xl,{isOpen:!!s,side:"right",onClose:()=>i(null),title:d,children:s&&u.jsx(Th,{op:s,id:t})})]})}function Nh({schemas:e,selectedKey:t}){const{deref:n}=Zt(),i=se.useMemo(()=>Object.entries(e).map(([s,o])=>[s,$r(o,n)]),[e,n]),r=i.length?u.jsx("div",{className:"grid gap-6 w-full",children:i.map(([s,o])=>{const a=o.schema,l=tc(o.schemaFormat),c=a.properties?Object.keys(a.properties).length:0;return u.jsxs("article",{id:`schema-${s}`,className:`rounded-xl border bg-surface p-5 shadow-sm transition-colors ${t===s?"border-primary-300 ring-1 ring-primary-200":"border-border"}`,children:[u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),o.description&&u.jsx("p",{className:"mt-1 text-sm text-foreground-secondary",children:o.description})]}),u.jsx("span",{className:"inline-flex rounded-full bg-neutral-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-foreground-secondary",children:a.type??"unknown"})]}),(a.format||l||c>0)&&u.jsxs("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-foreground-secondary",children:[a.format&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:["Format: ",a.format]}),l&&u.jsx("span",{className:"rounded-full bg-neutral-100 px-3 py-1",title:o.schemaFormat,children:l}),c>0&&u.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:[c," properties"]})]}),o.conversionError&&u.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5",children:["Could not convert"," ",nc(o.schemaFormat)??"the"," schema — showing raw definition. ",o.conversionError]}),o.conversionError&&typeof o.originalSchema=="string"?u.jsx("div",{className:"mt-4",children:u.jsx(Ul,{schema:o.originalSchema})}):u.jsx(oo,{schema:a,rootName:s,className:"mt-4"})]},s)})}):u.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No schemas defined in this AsyncAPI document."});return u.jsx("div",{className:"flex justify-center w-full",children:u.jsx(Fn,{content:r,stickySideContent:!1})})}const jh=e=>typeof e=="object"&&e!==null,Sh=e=>e==="operations"||e==="messages"||e==="schemas";function Rh({asyncapi:e,config:t}){var U,pe,R,k,m,T;const n=t.show??{},i=[...n.operations!==!1?[{id:"operations",name:"Operations",icon:bl}]:[],...n.messages!==!1?[{id:"messages",name:"Messages",icon:vl}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:wl}]:[]],r=((U=i[0])==null?void 0:U.id)??"operations",[s,o]=se.useState(r),[a,l]=se.useState(null),[c,d]=se.useState(null),[f,p]=se.useState(null),h=i.some(S=>S.id===s)?s:r,g=n.operations!==!1?a:null,v=n.messages!==!1?c:null,E=n.schemas!==!1?f:null,_=se.useMemo(()=>new Map,[]),[w,y]=se.useState(null),[O,I]=se.useState(null);se.useEffect(()=>{_.clear()},[e,_]);const j=se.useCallback(S=>{if(_.has(S))return _.get(S);const W=S.replace(/^#\//,"").split("/");let B=e;for(const K of W){if(!jh(B)){B=void 0;break}const ne=K.replace(/~1/g,"/").replace(/~0/g,"~");if(B=B[ne],B==null)break}return B!==void 0&&_.set(S,B),B},[e,_]),M=((pe=t.expand)==null?void 0:pe.schemas)===!0,ee=se.useMemo(()=>({document:e,deref:j,portalHost:w,rootElement:O,defaultSchemaExpanded:M}),[e,j,w,O,M]),q=h==="operations"?u.jsx(Ah,{operations:e.operations??{},selectedKey:g,onSelectKey:l}):h==="messages"?u.jsx(ph,{messages:((R=e.components)==null?void 0:R.messages)??{},selectedKey:v}):u.jsx(Nh,{schemas:((k=e.components)==null?void 0:k.schemas)??{},selectedKey:E}),Y=t.theme?Au(t.theme):{};return u.jsx(gl.Provider,{value:ee,children:u.jsxs("div",{ref:I,style:Y,className:`relative @container bg-background text-foreground p-2 ${n.sidebar!==!1?"pt-14":""}`,children:[u.jsx("div",{ref:y,className:"asyncapi-portal-root"}),n.info!==!1&&u.jsx(Nf,{...e.info}),n.servers!==!1&&e.servers&&Object.keys(e.servers).length>0&&u.jsx(kh,{servers:e.servers}),n.sidebar!==!1&&u.jsx(ku,{info:e.info,operations:n.operations!==!1?e.operations:void 0,messages:n.messages!==!1?(m=e.components)==null?void 0:m.messages:void 0,schemas:n.schemas!==!1?(T=e.components)==null?void 0:T.schemas:void 0,sidebarConfig:t.sidebar,activeTab:h,onTabChange:o,onItemSelect:(S,W)=>{o(S),l(S==="operations"?W:null),d(S==="messages"?W:null),p(S==="schemas"?W:null)},selectedItem:g?{tab:"operations",key:g}:v?{tab:"messages",key:v}:E?{tab:"schemas",key:E}:null}),u.jsx(eu,{tabs:i,current:h,onChange:S=>{Sh(S)&&o(S)}}),u.jsx("div",{id:`panel-${h}`,role:"tabpanel","aria-labelledby":`tab-${h}`,children:q})]})})}const lo=e=>{const t="doc"in e?e.doc:e.asyncapi,n=e.config??ml;return u.jsx(Rh,{asyncapi:t,config:n})};function Cc(e,t,n){e.registerSchemaParser(t);const i=e.parserRegistry,r=i.get.bind(i);i.get=s=>{const o=r(s);return o!==void 0?o:n(s)?t:void 0}}const Ih=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/vnd.apache.avro;version=1.8.2","application/vnd.apache.avro+json;version=1.8.2","application/vnd.apache.avro+yaml;version=1.8.2"];function Mh(){return{validate:Lh,parse:Ph,getMimeTypes:()=>Ih}}function Ch(e){Cc(e,Mh(),xr)}function Lh(e){return Ws(e.data).map(t=>({message:t,path:e.path}))}function Ph(e){var n,i;const t=Ws(e.data);if(t.length>0)return{[mr]:t[0]};try{const r=Os(e.data),s=e.meta.message,o=(i=(n=s==null?void 0:s.bindings)==null?void 0:n.kafka)==null?void 0:i.key;return o&&s&&(s["x-parser-original-bindings-kafka-key"]=o,s.bindings.kafka.key=Os(o)),r}catch(r){return{[mr]:r instanceof Error?r.message:"Failed to convert Avro schema"}}}const Dh=["application/vnd.google.protobuf","application/vnd.google.protobuf;version=2","application/vnd.google.protobuf;version=3"];function Fh(){return{validate:zh,parse:qh,getMimeTypes:()=>Dh}}function Bh(e){Cc(e,Fh(),br)}function zh(e){return _d(e.data).map(t=>({message:t,path:e.path}))}function qh(e){if(typeof e.data!="string")return{[mr]:"Protobuf schema must be a string of .proto source"};try{return no(e.data)}catch(t){return{[mr]:t instanceof Error?t.message:"Failed to convert Protobuf schema"}}}async function Uh(){try{const e=await Promise.resolve().then(()=>require("./index-DquNnDqb.cjs")).then(n=>n.index),t=e.default??e;if(typeof t!="function")throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");return t}catch(e){throw console.error("[apiuikit] Failed to load '@asyncapi/parser/browser':",e),new Error("[apiuikit] The parsed entry requires '@asyncapi/parser'. Install it (`npm i @asyncapi/parser`), or use the `AsyncAPI` component with a pre-resolved document instead.")}}async function Lc(e){const t=await Uh(),n=new t;Ch(n),Bh(n);try{const{document:i,diagnostics:r}=await n.parse(e);return{diagnostics:r,document:i?Vh(i):null}}catch(i){return{diagnostics:[{message:i instanceof Error?i.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function Hh(e,t){const{diagnostics:n,document:i}=await Lc(e);return{diagnostics:n,view:i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}}function Vh(e){return e.json()}function Wh({raw:e,config:t,onDiagnostics:n}){const[i,r]=se.useState(null),s=se.useRef(n);return s.current=n,se.useEffect(()=>{let o=!0;return Lc(e).then(({document:a,diagnostics:l})=>{var c;o&&(r(a),(c=s.current)==null||c.call(s,l))}),()=>{o=!1}},[e]),i?u.jsx(lo,{kind:"resolved",doc:i,config:t}):null}exports.AsyncAPI=lo;exports.AsyncAPIRenderer=Wh;exports.SchemaTabs=Ss;exports.SchemaTree=oo;exports.defaultConfig=ml;exports.getDefaultExportFromCjs=Is;exports.parseAndRender=Hh;exports.useAsyncAPIDocument=Zt;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apiuikit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A React UI library for rendering your API specifications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/AceTheCreator/
|
|
8
|
+
"url": "https://github.com/AceTheCreator/apiuikit"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./dist/apiuikit.cjs.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dev": "vite",
|
|
28
28
|
"build": "vite build",
|
|
29
29
|
"watch": "vite build --watch",
|
|
30
|
-
"prepublishOnly": "vite build",
|
|
30
|
+
"prepublishOnly": "cp ../../README.md ./README.md && vite build",
|
|
31
31
|
"typecheck": "node scripts/typecheck.mjs",
|
|
32
32
|
"typecheck:strict": "tsc -b",
|
|
33
33
|
"test": "vitest run",
|