asyncapi-viewer 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -0
- package/dist/asyncapi-viewer.iife.js +2477 -0
- package/dist/asyncapi-viewer.iife.js.map +1 -0
- package/dist/asyncapi-viewer.js +12484 -0
- package/dist/asyncapi-viewer.js.map +1 -0
- package/package.json +72 -0
- package/theme/asyncapi-theme.css +53 -0
|
@@ -0,0 +1,2477 @@
|
|
|
1
|
+
var AsyncAPIViewer=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=globalThis,i=r.ShadowRoot&&(r.ShadyCSS===void 0||r.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,a=Symbol(),o=new WeakMap,s=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(i&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=o.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&o.set(t,e))}return e}toString(){return this.cssText}},c=e=>new s(typeof e==`string`?e:e+``,void 0,a),l=(e,...t)=>new s(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,a),u=(e,t)=>{if(i)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),i=r.litNonce;i!==void 0&&t.setAttribute(`nonce`,i),t.textContent=n.cssText,e.appendChild(t)}},d=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return c(t)})(e):e,{is:f,defineProperty:p,getOwnPropertyDescriptor:m,getOwnPropertyNames:h,getOwnPropertySymbols:g,getPrototypeOf:_}=Object,v=globalThis,y=v.trustedTypes,b=y?y.emptyScript:``,x=v.reactiveElementPolyfillSupport,S=(e,t)=>e,ee={toAttribute(e,t){switch(t){case Boolean:e=e?b:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},te=(e,t)=>!f(e,t),ne={attribute:!0,type:String,converter:ee,reflect:!1,useDefault:!1,hasChanged:te};Symbol.metadata??=Symbol(`metadata`),v.litPropertyMetadata??=new WeakMap;var re=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ne){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ne}static _$Ei(){if(this.hasOwnProperty(S(`elementProperties`)))return;let e=_(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(S(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S(`properties`))){let e=this.properties,t=[...h(e),...g(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(d(e))}else e!==void 0&&t.push(d(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return u(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?ee:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?ee:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??te)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};re.elementStyles=[],re.shadowRootOptions={mode:`open`},re[S(`elementProperties`)]=new Map,re[S(`finalized`)]=new Map,x?.({ReactiveElement:re}),(v.reactiveElementVersions??=[]).push(`2.1.2`);var ie=globalThis,ae=e=>e,oe=ie.trustedTypes,se=oe?oe.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ce=`$lit$`,le=`lit$${Math.random().toFixed(9).slice(2)}$`,ue=`?`+le,de=`<${ue}>`,fe=document,pe=()=>fe.createComment(``),me=e=>e===null||typeof e!=`object`&&typeof e!=`function`,he=Array.isArray,ge=e=>he(e)||typeof e?.[Symbol.iterator]==`function`,_e=`[
|
|
2
|
+
\f\r]`,ve=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ye=/-->/g,be=/>/g,xe=RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),Se=/'/g,Ce=/"/g,we=/^(?:script|style|textarea|title)$/i,C=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),Te=Symbol.for(`lit-noChange`),w=Symbol.for(`lit-nothing`),Ee=new WeakMap,De=fe.createTreeWalker(fe,129);function Oe(e,t){if(!he(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return se===void 0?t:se.createHTML(t)}var ke=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=ve;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===ve?c[1]===`!--`?o=ye:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=xe):(we.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=xe):o=be:o===xe?c[0]===`>`?(o=i??ve,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?xe:c[3]===`"`?Ce:Se):o===Ce||o===Se?o=xe:o===ye||o===be?o=ve:(o=xe,i=void 0);let d=o===xe&&e[t+1].startsWith(`/>`)?` `:``;a+=o===ve?n+de:l>=0?(r.push(s),n.slice(0,l)+ce+n.slice(l)+le+d):n+le+(l===-2?t:d)}return[Oe(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Ae=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=ke(t,n);if(this.el=e.createElement(l,r),De.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=De.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ce)){let t=u[o++],n=i.getAttribute(e).split(le),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Fe:r[1]===`?`?Ie:r[1]===`@`?Le:Pe}),i.removeAttribute(e)}else e.startsWith(le)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(we.test(i.tagName)){let e=i.textContent.split(le),t=e.length-1;if(t>0){i.textContent=oe?oe.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],pe()),De.nextNode(),c.push({type:2,index:++a});i.append(e[t],pe())}}}else if(i.nodeType===8){if(i.data===ue)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(le,e+1))!==-1;)c.push({type:7,index:a}),e+=le.length-1}}a++}}static createElement(e,t){let n=fe.createElement(`template`);return n.innerHTML=e,n}};function je(e,t,n=e,r){if(t===Te)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=me(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=je(e,i._$AS(e,t.values),i,r)),t}var Me=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??fe).importNode(t,!0);De.currentNode=r;let i=De.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new Ne(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Re(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=De.nextNode(),a++)}return De.currentNode=fe,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},Ne=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=je(this,e,t),me(e)?e===w||e==null||e===``?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==Te&&this._(e):e._$litType$===void 0?e.nodeType===void 0?ge(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&me(this._$AH)?this._$AA.nextSibling.data=e:this.T(fe.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Ae.createElement(Oe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Me(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Ee.get(e.strings);return t===void 0&&Ee.set(e.strings,t=new Ae(e)),t}k(t){he(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(pe()),this.O(pe()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ae(e).nextSibling;ae(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=w}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=je(this,e,t,0),a=!me(e)||e!==this._$AH&&e!==Te,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=je(this,r[n+o],t,o),s===Te&&(s=this._$AH[o]),a||=!me(s)||s!==this._$AH[o],s===w?e=w:e!==w&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Fe=class extends Pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},Ie=class extends Pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},Le=class extends Pe{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=je(this,e,t,0)??w)===Te)return;let n=this._$AH,r=e===w&&n!==w||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==w&&(n===w||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Re=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){je(this,e)}},ze=ie.litHtmlPolyfillSupport;ze?.(Ae,Ne),(ie.litHtmlVersions??=[]).push(`3.3.3`);var Be=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new Ne(t.insertBefore(pe(),e),e,void 0,n??{})}return i._$AI(e),i},Ve=globalThis,He=class extends re{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Be(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Te}};He._$litElement$=!0,He.finalized=!0,Ve.litElementHydrateSupport?.({LitElement:He});var Ue=Ve.litElementPolyfillSupport;Ue?.({LitElement:He}),(Ve.litElementVersions??=[]).push(`4.2.2`);var We=Symbol.for(`yaml.alias`),Ge=Symbol.for(`yaml.document`),Ke=Symbol.for(`yaml.map`),qe=Symbol.for(`yaml.pair`),T=Symbol.for(`yaml.scalar`),Je=Symbol.for(`yaml.seq`),E=Symbol.for(`yaml.node.type`),Ye=e=>!!e&&typeof e==`object`&&e[E]===We,Xe=e=>!!e&&typeof e==`object`&&e[E]===Ge,Ze=e=>!!e&&typeof e==`object`&&e[E]===Ke,D=e=>!!e&&typeof e==`object`&&e[E]===qe,O=e=>!!e&&typeof e==`object`&&e[E]===T,Qe=e=>!!e&&typeof e==`object`&&e[E]===Je;function k(e){if(e&&typeof e==`object`)switch(e[E]){case Ke:case Je:return!0}return!1}function A(e){if(e&&typeof e==`object`)switch(e[E]){case We:case Ke:case T:case Je:return!0}return!1}var $e=e=>(O(e)||k(e))&&!!e.anchor,et=Symbol(`break visit`),tt=Symbol(`skip children`),nt=Symbol(`remove node`);function rt(e,t){let n=at(t);Xe(e)?it(null,e.contents,n,Object.freeze([e]))===nt&&(e.contents=null):it(null,e,n,Object.freeze([]))}rt.BREAK=et,rt.SKIP=tt,rt.REMOVE=nt;function it(e,t,n,r){let i=ot(e,t,n,r);if(A(i)||D(i))return st(e,r,i),it(e,i,n,r);if(typeof i!=`symbol`){if(k(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=it(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===et)return et;else i===nt&&(t.items.splice(e,1),--e)}}else if(D(t)){r=Object.freeze(r.concat(t));let e=it(`key`,t.key,n,r);if(e===et)return et;e===nt&&(t.key=null);let i=it(`value`,t.value,n,r);if(i===et)return et;i===nt&&(t.value=null)}}return i}function at(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ot(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Ze(t))return n.Map?.(e,t,r);if(Qe(t))return n.Seq?.(e,t,r);if(D(t))return n.Pair?.(e,t,r);if(O(t))return n.Scalar?.(e,t,r);if(Ye(t))return n.Alias?.(e,t,r)}function st(e,t,n){let r=t[t.length-1];if(k(r))r.items[e]=n;else if(D(r))e===`key`?r.key=n:r.value=n;else if(Xe(r))r.contents=n;else{let e=Ye(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ct={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},lt=e=>e.replace(/[!,[\]{}]/g,e=>ct[e]),ut=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+lt(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&A(e.contents)){let t={};rt(e.contents,(e,n)=>{A(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
3
|
+
`)}};ut.defaultYaml={explicit:!1,version:`1.2`},ut.defaultTags={"!!":`tag:yaml.org,2002:`};function dt(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function ft(e){let t=new Set;return rt(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function pt(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function mt(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=ft(e);let a=pt(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(O(t.node)||k(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function ht(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=ht(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=ht(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=ht(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=ht(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function j(e,t,n){if(Array.isArray(e))return e.map((e,t)=>j(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!$e(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var gt=class{constructor(e){Object.defineProperty(this,E,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Xe(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=j(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?ht(i,{"":o},``,o):o}},_t=class extends gt{constructor(e){super(We),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],rt(e,{Node:(e,t)=>{(Ye(t)||$e(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(j(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=vt(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(dt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function vt(e,t,n){if(Ye(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(k(t)){let r=0;for(let i of t.items){let t=vt(e,i,n);t>r&&(r=t)}return r}if(D(t)){let r=vt(e,t.key,n),i=vt(e,t.value,n);return Math.max(r,i)}return 1}var yt=e=>!e||typeof e!=`function`&&typeof e!=`object`,M=class extends gt{constructor(e){super(T),this.value=e}toJSON(e,t){return t?.keep?this.value:j(this.value,e,t)}toString(){return String(this.value)}};M.BLOCK_FOLDED=`BLOCK_FOLDED`,M.BLOCK_LITERAL=`BLOCK_LITERAL`,M.PLAIN=`PLAIN`,M.QUOTE_DOUBLE=`QUOTE_DOUBLE`,M.QUOTE_SINGLE=`QUOTE_SINGLE`;var bt=`tag:yaml.org,2002:`;function xt(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function St(e,t,n){if(Xe(e)&&(e=e.contents),A(e))return e;if(D(e)){let t=n.schema[Ke].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new _t(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=bt+t.slice(2));let l=xt(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new M(e);return c&&(c.node=t),t}l=e instanceof Map?o[Ke]:Symbol.iterator in Object(e)?o[Je]:o[Ke]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new M(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ct(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return St(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var wt=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Tt=class extends gt{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>A(t)||D(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(wt(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(k(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ct(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(k(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&O(i)?i.value:i:k(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!D(t))return!1;let n=t.value;return n==null||e&&O(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return k(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(k(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ct(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Et=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Dt(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ot=(e,t,n)=>e.endsWith(`
|
|
4
|
+
`)?Dt(n,t):n.includes(`
|
|
5
|
+
`)?`
|
|
6
|
+
`+Dt(n,t):(e.endsWith(` `)?``:` `)+n,kt=`flow`,At=`block`,jt=`quoted`;function Mt(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=Nt(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
7
|
+
`)n===`block`&&(h=Nt(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
8
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
9
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function Nt(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
10
|
+
`);r=t,i=t+1,a=e[i]}return r}var Pt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ft=e=>/^(%|---|\.\.\.)/m.test(e);function It(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
11
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Lt(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Ft(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
12
|
+
|
|
13
|
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
14
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:Mt(o,a,jt,Pt(t,!1))}function Rt(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
15
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Lt(e,t);let n=t.indent||(Ft(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Mt(r,n,kt,Pt(t,!1))}function zt(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Lt;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Rt:i&&!t?Lt:n?Rt:Lt}return r(e,t)}var Bt;try{Bt=RegExp(`(^|(?<!
|
|
16
|
+
))
|
|
17
|
+
+(?!
|
|
18
|
+
|$)`,`g`)}catch{Bt=/\n+(?!\n|$)/g}function Vt({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return zt(n,r);let l=r.indent||(r.forceBlockIndent||Ft(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===M.BLOCK_FOLDED?!1:t===M.BLOCK_LITERAL||!It(n,c,l.length);if(!n)return u?`|
|
|
19
|
+
`:`>
|
|
20
|
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
21
|
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
22
|
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
23
|
+
`&&(p=p.slice(0,-1)),p.replace(Bt,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
24
|
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
25
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Pt(r,!0);o!==`folded`&&t!==M.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Mt(`${v}${e}${p}`,l,At,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function Ht(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
26
|
+
`)||u&&/[[\]{},]/.test(a))return zt(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
27
|
+
`)?zt(a,t):Vt(e,t,n,r);if(!s&&!u&&i!==M.PLAIN&&a.includes(`
|
|
28
|
+
`))return Vt(e,t,n,r);if(Ft(a)){if(c===``)return t.forceBlockIndent=!0,Vt(e,t,n,r);if(s&&c===l)return zt(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return zt(a,t)}return s?d:Mt(d,c,kt,Pt(t,!1))}function Ut(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==M.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=M.QUOTE_DOUBLE);let c=e=>{switch(e){case M.BLOCK_FOLDED:case M.BLOCK_LITERAL:return i||a?zt(o.value,t):Vt(o,t,n,r);case M.QUOTE_DOUBLE:return Lt(o.value,t);case M.QUOTE_SINGLE:return Rt(o.value,t);case M.PLAIN:return Ht(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Wt(e,t){let n=Object.assign({blockQuote:!0,commentString:Et,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Gt(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(O(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Kt(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(O(e)||k(e))&&e.anchor;a&&dt(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function qt(e,t,n,r){if(D(e))return e.toString(t,n,r);if(Ye(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=A(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Gt(t.doc.schema.tags,a);let o=Kt(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):O(a)?Ut(a,t,n,r):a.toString(t,n,r);return o?O(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Jt({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=A(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(k(e)||!A(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||k(e)||(O(e)?e.type===M.BLOCK_FOLDED||e.type===M.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=qt(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Ot(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Ot(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Ot(g,n.indent,l(f))));let _,v,y;A(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&O(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Qe(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=qt(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
29
|
+
`:``,v){let e=l(v);S+=`\n${Dt(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
30
|
+
`&&y&&(S=`
|
|
31
|
+
|
|
32
|
+
`):S+=`\n${n.indent}`}else if(!p&&k(t)){let e=x[0],r=x.indexOf(`
|
|
33
|
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
34
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Ot(g,n.indent,l(y)):h&&i&&i(),g}function Yt(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var Xt=`<<`,Zt={identify:e=>e===Xt||typeof e==`symbol`&&e.description===Xt,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new M(Symbol(Xt)),{addToJSMap:$t}),stringify:()=>Xt},Qt=(e,t)=>(Zt.identify(t)||O(t)&&(!t.type||t.type===M.PLAIN)&&Zt.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Zt.tag&&e.default);function $t(e,t,n){let r=tn(e,n);if(Qe(r))for(let n of r.items)en(e,t,n);else if(Array.isArray(r))for(let n of r)en(e,t,n);else en(e,t,r)}function en(e,t,n){let r=tn(e,n);if(!Ze(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function tn(e,t){return e&&Ye(t)?t.resolve(e.doc,e):t}function nn(e,t,{key:n,value:r}){if(A(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Qt(e,n))$t(e,t,r);else{let i=j(n,``,e);if(t instanceof Map)t.set(i,j(r,i,e));else if(t instanceof Set)t.add(i);else{let a=rn(n,i,e),o=j(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function rn(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(A(e)&&n?.doc){let t=Wt(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Yt(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function an(e,t,n){return new N(St(e,void 0,n),St(t,void 0,n))}var N=class e{constructor(e,t=null){Object.defineProperty(this,E,{value:qe}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return A(n)&&(n=n.clone(t)),A(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return nn(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Jt(this,e,t,n):JSON.stringify(this)}};function on(e,t,n){return(t.inFlow??e.flow?cn:sn)(e,t,n)}function sn({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(A(i))!d&&i.spaceBefore&&f.push(``),ln(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(D(i)){let e=A(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),ln(n,f,e.commentBefore,d))}d=!1;let s=qt(i,u,()=>o=null,()=>d=!0);o&&(s+=Ot(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
35
|
+
`}}return e?(p+=`
|
|
36
|
+
`+Dt(l(e),c),s&&s()):d&&o&&o(),p}function cn({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(A(i))i.spaceBefore&&d.push(``),ln(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(D(i)){let e=A(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),ln(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=A(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=qt(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
37
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Ot(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
38
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function ln({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Dt(t(r),e);n.push(i.trimStart())}}function un(e,t){let n=O(t)?t.value:t;for(let r of e)if(D(r)&&(r.key===t||r.key===n||O(r.key)&&r.key.value===n))return r}var P=class extends Tt{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Ke,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(an(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=D(e)?e:!e||typeof e!=`object`||!(`key`in e)?new N(e,e?.value):new N(e.key,e.value);let r=un(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);O(r.value)&&yt(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=un(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=un(this.items,e)?.value;return(!t&&O(n)?n.value:n)??void 0}has(e){return!!un(this.items,e)}set(e,t){this.add(new N(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)nn(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!D(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),on(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},dn={collection:`map`,default:!0,nodeClass:P,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Ze(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>P.from(e,t,n)},fn=class extends Tt{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Je,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=pn(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=pn(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&O(r)?r.value:r}has(e){let t=pn(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=pn(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];O(r)&&yt(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(j(e,String(r++),t));return n}toString(e,t,n){return e?on(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(St(a,void 0,n))}}return i}};function pn(e){let t=O(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var mn={collection:`seq`,default:!0,nodeClass:fn,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Qe(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>fn.from(e,t,n)},hn={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Ut(e,t,n,r)}},gn={identify:e=>e==null,createNode:()=>new M(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new M(null),stringify:({source:e},t)=>typeof e==`string`&&gn.test.test(e)?e:t.options.nullStr},_n={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new M(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&_n.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function F({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var vn={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:F},yn={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():F(e)}},bn={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new M(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:F},xn=e=>typeof e==`bigint`||Number.isInteger(e),Sn=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Cn(e,t,n){let{value:r}=e;return xn(r)&&r>=0?n+r.toString(t):F(e)}var wn={identify:e=>xn(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Sn(e,2,8,n),stringify:e=>Cn(e,8,`0o`)},Tn={identify:xn,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Sn(e,0,10,n),stringify:F},En={identify:e=>xn(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Sn(e,2,16,n),stringify:e=>Cn(e,16,`0x`)},Dn=[dn,mn,hn,gn,_n,wn,Tn,En,vn,yn,bn];function On(e){return typeof e==`bigint`||Number.isInteger(e)}var kn=({value:e})=>JSON.stringify(e),An=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:kn},{identify:e=>e==null,createNode:()=>new M(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:kn},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:kn},{identify:On,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>On(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:kn}],jn=[dn,mn].concat(An,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Mn={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=M.BLOCK_LITERAL,t!==M.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===M.BLOCK_LITERAL?`
|
|
39
|
+
`:` `)}return Ut({comment:e,type:t,value:s},r,i,a)}};function Nn(e,t){if(Qe(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!D(r)){if(Ze(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new N(new M(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=D(r)?r:new N(r)}}else t(`Expected a sequence for this tag`);return e}function Pn(e,t,n){let{replacer:r}=n,i=new fn(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(an(o,s,n))}return i}var Fn={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Nn,createNode:Pn},In=class e extends fn{constructor(){super(),this.add=P.prototype.add.bind(this),this.delete=P.prototype.delete.bind(this),this.get=P.prototype.get.bind(this),this.has=P.prototype.has.bind(this),this.set=P.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(D(e)?(r=j(e.key,``,t),i=j(e.value,r,t)):r=j(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Pn(e,t,n),i=new this;return i.items=r.items,i}};In.tag=`tag:yaml.org,2002:omap`;var Ln={collection:`seq`,identify:e=>e instanceof Map,nodeClass:In,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Nn(e,t),r=[];for(let{key:e}of n.items)O(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new In,n)},createNode:(e,t,n)=>In.from(e,t,n)};function Rn({value:e,source:t},n){return t&&(e?zn:Bn).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var zn={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new M(!0),stringify:Rn},Bn={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new M(!1),stringify:Rn},Vn={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:F},Hn={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():F(e)}},Un={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new M(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:F},Wn=e=>typeof e==`bigint`||Number.isInteger(e);function Gn(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function Kn(e,t,n){let{value:r}=e;if(Wn(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return F(e)}var qn={identify:Wn,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Gn(e,2,2,n),stringify:e=>Kn(e,2,`0b`)},Jn={identify:Wn,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Gn(e,1,8,n),stringify:e=>Kn(e,8,`0`)},Yn={identify:Wn,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Gn(e,0,10,n),stringify:F},Xn={identify:Wn,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Gn(e,2,16,n),stringify:e=>Kn(e,16,`0x`)},Zn=class e extends P{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=D(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new N(e.key,null):new N(e,null),un(this.items,t.key)||this.items.push(t)}get(e,t){let n=un(this.items,e);return!t&&D(n)?O(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=un(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new N(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(an(e,null,n));return i}};Zn.tag=`tag:yaml.org,2002:set`;var Qn={collection:`map`,identify:e=>e instanceof Set,nodeClass:Zn,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Zn.from(e,t,n),resolve(e,t){if(Ze(e)){if(e.hasAllNullValues(!0))return Object.assign(new Zn,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function $n(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function er(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return F(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var tr={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>$n(e,n),stringify:er},nr={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>$n(e,!1),stringify:er},rr={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(rr.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=$n(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},ir=[dn,mn,hn,gn,zn,Bn,qn,Jn,Yn,Xn,Vn,Hn,Un,Mn,Zt,Ln,Fn,Qn,tr,nr,rr],ar=new Map([[`core`,Dn],[`failsafe`,[dn,mn,hn]],[`json`,jn],[`yaml11`,ir],[`yaml-1.1`,ir]]),or={binary:Mn,bool:_n,float:bn,floatExp:yn,floatNaN:vn,floatTime:nr,int:Tn,intHex:En,intOct:wn,intTime:tr,map:dn,merge:Zt,null:gn,omap:Ln,pairs:Fn,seq:mn,set:Qn,timestamp:rr},sr={"tag:yaml.org,2002:binary":Mn,"tag:yaml.org,2002:merge":Zt,"tag:yaml.org,2002:omap":Ln,"tag:yaml.org,2002:pairs":Fn,"tag:yaml.org,2002:set":Qn,"tag:yaml.org,2002:timestamp":rr};function cr(e,t,n){let r=ar.get(t);if(r&&!e)return n&&!r.includes(Zt)?r.concat(Zt):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(ar.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(Zt)),i.reduce((e,t)=>{let n=typeof t==`string`?or[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(or).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var lr=(e,t)=>e.key<t.key?-1:+(e.key>t.key),ur=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?cr(e,`compat`):e?cr(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?sr:{},this.tags=cr(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Ke,{value:dn}),Object.defineProperty(this,T,{value:hn}),Object.defineProperty(this,Je,{value:mn}),this.sortMapEntries=typeof a==`function`?a:a===!0?lr:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function dr(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=Wt(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Dt(t,``))}let o=!1,s=null;if(e.contents){if(A(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Dt(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=qt(e.contents,i,()=>s=null,t);s&&(c+=Ot(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(qt(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
|
|
40
|
+
`)?(n.push(`...`),n.push(Dt(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(Dt(a(t),``)))}return n.join(`
|
|
41
|
+
`)+`
|
|
42
|
+
`}var fr=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,E,{value:Ge});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new ut({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[E]:{value:Ge}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=A(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){pr(this.contents)&&this.contents.add(e)}addIn(e,t){pr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=ft(this);e.anchor=!t||n.has(t)?pt(t||`a`,n):t}return new _t(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=mt(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=St(e,l,p);return o&&k(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new N(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return pr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return wt(e)?this.contents!=null&&(this.contents=null,!0):pr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return k(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return wt(e)?!t&&O(this.contents)?this.contents.value:this.contents:k(this.contents)?this.contents.getIn(e,t):void 0}has(e){return k(this.contents)?this.contents.has(e):!1}hasIn(e){return wt(e)?this.contents!==void 0:k(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ct(this.schema,[e],t):pr(this.contents)&&this.contents.set(e,t)}setIn(e,t){wt(e)?this.contents=t:this.contents==null?this.contents=Ct(this.schema,Array.from(e),t):pr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new ut({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new ut({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new ur(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=j(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?ht(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return dr(this,e)}};function pr(e){if(k(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var mr=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},hr=class extends mr{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},gr=class extends mr{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},_r=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
43
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function vr(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],ee=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:ee,start:x??ee}}function yr(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
44
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(yr(t.key)||yr(t.value))return!0}return!1;default:return!0}}function br(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&yr(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function xr(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||O(e)&&O(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var Sr=`All mapping items must start at the same column`;function Cr({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??P)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=vr(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,Sr)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
|
45
|
+
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||yr(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,Sr);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&br(r.indent,u,i),n.atKey=!1,xr(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=vr(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&br(r.indent,f,i),s=c.range[2];let l=new N(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
|
46
|
+
`+_.comment:g.comment=_.comment);let e=new N(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function wr({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??fn)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=vr(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&br(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Tr(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var Er=`Block collections are not allowed within flow collections`,Dr=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Or({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?P:fn))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=vr(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
|
47
|
+
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&yr(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];D(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
48
|
+
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],Dr(m)&&i(r.range,`BLOCK_IN_FLOW`,Er)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);Dr(f)&&i(g.range,`BLOCK_IN_FLOW`,Er),n.atKey=!1;let _=vr(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?Dr(m)&&i(v.range,`BLOCK_IN_FLOW`,Er):_.comment&&(g.comment?g.comment+=`
|
|
49
|
+
`+_.comment:g.comment=_.comment);let y=new N(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;xr(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new P(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=Tr(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
50
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function kr(e,t,n,r,i,a){let o=n.type===`block-map`?Cr(e,t,n,r,a):n.type===`block-seq`?wr(e,t,n,r,a):Or(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Ar(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===P.tagName&&s===`map`||o===fn.tagName&&s===`seq`)return kr(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),kr(e,t,n,i,o)}let l=kr(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=A(u)?u:new M(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function jr(e,t,n){let r=t.offset,i=Mr(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?M.BLOCK_FOLDED:M.BLOCK_LITERAL,o=t.source?Nr(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
51
|
+
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
52
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===M.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
53
|
+
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
54
|
+
`:!p&&f===`
|
|
55
|
+
`&&(f=`
|
|
56
|
+
|
|
57
|
+
`),d+=f+t.slice(c)+r,f=`
|
|
58
|
+
`,p=!0):r===``?f===`
|
|
59
|
+
`?d+=`
|
|
60
|
+
`:f=`
|
|
61
|
+
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
|
62
|
+
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
63
|
+
`&&(d+=`
|
|
64
|
+
`);break;default:d+=`
|
|
65
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Mr({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function Nr(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function Pr(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=M.PLAIN,c=Fr(a,l);break;case`single-quoted-scalar`:s=M.QUOTE_SINGLE,c=Ir(a,l);break;case`double-quoted-scalar`:s=M.QUOTE_DOUBLE,c=Rr(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=Tr(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Fr(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),Lr(e)}function Ir(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Lr(e.slice(1,-1)).replace(/''/g,`'`)}function Lr(e){let t=/(.*?)\r?\n/sy,n=t.exec(e);if(!n)return e;let r,i;try{r=RegExp(`(?<![ ])[ ]+$`),i=RegExp(`^[ ]+|(?<![ ])[ ]+$`,`g`)}catch{r=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let a=n[1].replace(r,``),o=` `,s=t.lastIndex;for(;n=t.exec(e);){let e=n[1].replace(i,``);e===``?o===`
|
|
66
|
+
`?a+=o:o=`
|
|
67
|
+
`:(a+=o+e,o=` `),s=t.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]??``)}function Rr(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
68
|
+
`){if(i===`
|
|
69
|
+
`){let{fold:t,offset:i}=zr(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Br[i];if(a)n+=a;else if(i===`
|
|
70
|
+
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
71
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=Vr(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
72
|
+
`&&(a!==`\r`||e[r+2]!==`
|
|
73
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function zr(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
74
|
+
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
75
|
+
`);)r===`
|
|
76
|
+
`&&(n+=`
|
|
77
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var Br={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
78
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Vr(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function Hr(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?jr(e,t,r):Pr(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[T]:c?Ur(e.schema,i,c,n,r):t.type===`scalar`?Wr(e,i,t,r):e.schema[T];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=O(a)?a:new M(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new M(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function Ur(e,t,n,r,i){if(n===`!`)return e[T];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[T])}function Wr({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[T];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[T];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function Gr(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var Kr={composeNode:qr,composeEmptyNode:Jr};function qr(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=Yr(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=Hr(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=Ar(Kr,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=Jr(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!O(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Jr(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=Hr(e,{type:`scalar`,offset:Gr(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function Yr({options:e},{offset:t,source:n,end:r},i){let a=new _t(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=Tr(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function Xr(e,t,{offset:n,start:r,value:i,end:a},o){let s=new fr(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=vr(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?qr(c,i,l,o):Jr(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Tr(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Zr(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function Qr(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
|
79
|
+
|
|
80
|
+
`:`
|
|
81
|
+
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var $r=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Zr(e);r?this.warnings.push(new gr(i,t,n)):this.errors.push(new hr(i,t,n))},this.directives=new ut({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Qr(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(k(i)&&!i.flow&&i.items.length>0){let e=i.items[0];D(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Qr(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=Zr(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=Xr(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new hr(Zr(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new hr(Zr(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Tr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new hr(Zr(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new fr(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},ei=Symbol(`break visit`),ti=Symbol(`skip children`),ni=Symbol(`remove item`);function ri(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),ii(Object.freeze([]),e,t)}ri.BREAK=ei,ri.SKIP=ti,ri.REMOVE=ni,ri.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},ri.parentCollection=(e,t)=>{let n=ri.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function ii(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=ii(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===ei)return ei;else r===ni&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function ai(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
82
|
+
`:case`\r
|
|
83
|
+
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function I(e){switch(e){case void 0:case` `:case`
|
|
84
|
+
`:case`\r`:case` `:return!0;default:return!1}}var oi=new Set(`0123456789ABCDEFabcdef`),si=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),ci=new Set(`,[]{}`),li=new Set(` ,[]{}
|
|
85
|
+
\r `),ui=e=>!e||li.has(e),di=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
86
|
+
`||t===`\r`&&this.buffer[e+1]===`
|
|
87
|
+
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
88
|
+
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
89
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&I(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
90
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&I(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!I(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&I(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(ui),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&I(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(ui),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||I(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
91
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
92
|
+
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>I(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
93
|
+
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
94
|
+
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
95
|
+
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
96
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
97
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(I(r)||e&&ci.has(r))break;t=n}else if(I(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
98
|
+
`?(n+=1,r=`
|
|
99
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&ci.has(i))break;if(r===`
|
|
100
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&ci.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(ui),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(I(n)||t&&ci.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!I(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(si.has(t))t=this.buffer[++e];else if(t===`%`&&oi.has(this.buffer[e+1])&&oi.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
101
|
+
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
102
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},fi=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function pi(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function mi(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function hi(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function gi(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function _i(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function vi(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function yi(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!pi(t.start,`explicit-key-ind`)&&!pi(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,hi(t.value)?t.value.end?vi(t.value.end,t.sep):t.value.end=t.sep:vi(t.start,t.sep),delete t.sep)}var bi=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new di,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ai(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&yi(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&mi(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:mi(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=_i(gi(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
|
103
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
104
|
+
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){vi(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(!t.sep){if(pi(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=_i(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(pi(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(hi(t.key)&&!pi(t.sep,`newline`)){let e=_i(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):pi(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!pi(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){vi(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||pi(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=_i(gi(t));yi(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
105
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
106
|
+
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=_i(gi(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=_i(gi(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function xi(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new fi||null,prettyErrors:t}}function Si(e,t={}){let{lineCounter:n,prettyErrors:r}=xi(t),i=new bi(n?.addNewLine),a=new $r(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new hr(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(_r(e,n)),o.warnings.forEach(_r(e,n))),o}function Ci(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=Si(e,n);if(!i)return null;if(i.warnings.forEach(e=>Yt(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function wi(e,t){try{return new URL(e,t).href}catch{return e}}async function Ti(e,t=e=>fetch(e)){let n,r;try{let i=await t(e);if(n=i.status,!i.ok)return Oi(e,{kind:`http`,status:n,message:`The server answered with HTTP ${n}.`});r=await i.text()}catch(t){return Oi(e,{kind:`network`,message:`The request failed (${ki(t)}).`})}let i=Ei(r);if(`error`in i)return Oi(e,i.error);let a=Di(i.data);return`error`in a?Oi(e,a.error):{ok:!0,url:e,text:r,format:i.format,data:i.data,...a}}function Ei(e){if(e.trim()===``)return{error:{kind:`empty`,message:`The document is empty.`}};let t,n;try{t=JSON.parse(e),n=`json`}catch{try{t=Ci(e,{prettyErrors:!0}),n=`yaml`}catch(e){return{error:{kind:`parse`,message:`The document is neither valid JSON nor valid YAML: ${e instanceof hr?e.message.split(`
|
|
107
|
+
`)[0]:ki(e)}`}}}}return typeof t!=`object`||!t||Array.isArray(t)?{error:{kind:`not-object`,message:`The document root must be an object with an "asyncapi" field.`}}:{format:n,data:t}}function Di(e){let t=e.asyncapi;if(t===void 0)return{error:{kind:`unsupported`,message:`The document has no "asyncapi" field, so it is not an AsyncAPI document.`}};let n=String(t),r=Number(n.split(`.`)[0]);return r===2||r===3?{specVersion:n,specMajor:r}:{error:{kind:`unsupported`,message:`AsyncAPI ${n} is not supported; this viewer renders AsyncAPI 2 and 3.`}}}function Oi(e,t){return{ok:!1,url:e,error:t}}function ki(e){return e instanceof Error?e.message:String(e)}function Ai(e){return typeof e==`object`&&!!e&&typeof e.$ref==`string`}function ji(e){let t=/#\/components\/schemas\/([^/]+)$/.exec(e);return t?Ii(t[1]):void 0}var Mi=class{#e=new Map;#t=new Map;#n;constructor(e,t,n=e=>fetch(e)){this.rootUrl=zi(e),this.#e.set(this.rootUrl,t),this.#n=n}async preload(){let e=[],t=[this.rootUrl],n=new Set;for(;t.length>0;){let r=t.shift(),i=this.#e.get(r);if(i)for(let[a,o]of Pi(i)){let i=zi(Ri(a,r)),s=`${r} ${a}`;if(n.has(s)||(n.add(s),i===r||this.#e.has(i)||this.#t.has(i)))continue;let c=await this.#r(i);typeof c==`string`?(this.#t.set(i,c),e.push({severity:`error`,message:`Could not load "${i}" for $ref "${a}": ${c}`,where:o})):(this.#e.set(i,c),t.push(i))}}return e}resolve(e,t){let n=Ri(e,t),r=n.indexOf(`#`),i=r===-1?n:n.slice(0,r),a=r===-1?``:Bi(n.slice(r+1)),o=this.#e.get(i);if(!o)return{error:`Could not resolve $ref "${e}": ${this.#t.get(i)??`the document was not loaded`}.`};if(a!==``&&!a.startsWith(`/`))return{error:`Could not resolve $ref "${e}": the fragment is not a JSON pointer.`};let s=Fi(o,a);return s===Ni?{error:`Could not resolve $ref "${e}": nothing at "${a}".`}:{value:s,id:`${i}#${a}`,baseUrl:i,pointer:a}}deref(e,t){let n=e,r=t,i,a=``,o=new Set;for(;Ai(n);){let e=this.resolve(n.$ref,r);if(`error`in e)return e;if(o.has(e.id))return{error:`Circular $ref chain at "${e.id}".`};o.add(e.id),{value:n,baseUrl:r,id:i,pointer:a}=e}return{value:n,id:i,baseUrl:r,pointer:a}}get documents(){return this.#e}async#r(e){let t;try{let n=await this.#n(e);if(!n.ok)return`HTTP ${n.status}`;t=await n.text()}catch(e){return e instanceof Error?e.message:String(e)}let n=Ei(t);return`error`in n?n.error.message:n.data}},Ni=Symbol(`missing`);function Pi(e){let t=[],n=(e,r)=>{if(typeof e==`object`&&e){if(Array.isArray(e)){e.forEach((e,t)=>n(e,`${r}/${t}`));return}for(let[i,a]of Object.entries(e))i===`$ref`&&typeof a==`string`?t.push([a,r]):n(a,`${r}/${Li(i)}`)}};return n(e,``),t}function Fi(e,t){if(t===``)return e;let n=e;for(let e of t.slice(1).split(`/`)){let t=Ii(e);if(Array.isArray(n)){let e=/^\d+$/.test(t)?Number(t):-1;if(e<0||e>=n.length)return Ni;n=n[e]}else if(typeof n==`object`&&n&&Object.prototype.hasOwnProperty.call(n,t))n=n[t];else return Ni}return n}function Ii(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Li(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ri(e,t){if(e.startsWith(`#`))return`${zi(t)}${e}`;try{return new URL(e,t).href}catch{return e}}function zi(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}function Bi(e){try{return decodeURIComponent(e)}catch{return e}}var Vi={labels:{publish:`PUB`,subscribe:`SUB`,send:`SEND`,receive:`RECEIVE`,request:`REQUEST`,reply:`REPLY`},useChannelAddressAsIdentifier:!1,applyTraits:!0};function L(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function R(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):void 0}var z=class{#e;constructor(e,t){this.resolver=e,this.options=t,this.problems=[],this.#e=new Map}problem(e,t,n){this.problems.push({severity:e,message:t,where:n})}object(e,t,n){if(e===void 0)return;let r=this.resolver.deref(e,t);if(`error`in r){this.problem(`error`,r.error,n);return}if(!L(r.value)){this.problem(`warning`,`Expected an object at "${n}" but found ${Hi(r.value)}; it was skipped.`,n);return}return{value:r.value,baseUrl:r.baseUrl,id:r.id}}*entries(e,t,n){if(e!==void 0){if(!L(e)){this.problem(`warning`,`Expected a map at "${n}"; it was skipped.`,n);return}for(let[r,i]of Object.entries(e)){let e=`${n}/${r.replace(/~/g,`~0`).replace(/\//g,`~1`)}`,a=this.object(i,t,e);a&&(yield[r,a,e])}}}*items(e,t,n){if(e!==void 0){if(!Array.isArray(e)){this.problem(`warning`,`Expected a list at "${n}"; it was skipped.`,n);return}for(let r=0;r<e.length;r++){let i=`${n}/${r}`,a=this.object(e[r],t,i);a&&(yield[a,i])}}}anchor(e,t){let n=this.#e.get(e)??new Set;this.#e.set(e,n);let r=Gi(t),i=r;for(let e=2;n.has(i);e++)i=`${r}-${e}`;return n.add(i),i}tags(e,t,n){let r=[];for(let[{value:i,baseUrl:a},o]of this.items(e,t,n)){let e=R(i.name);if(e===void 0){this.problem(`warning`,`A tag without a name at "${o}" was skipped.`,o);continue}let t={name:e},n=R(i.description);n!==void 0&&(t.description=n);let s=this.externalDocs(i.externalDocs,a,`${o}/externalDocs`);s&&(t.externalDocs=s),r.push(t)}return r}externalDocs(e,t,n){let r=this.object(e,t,n);if(!r)return;let i=R(r.value.url);if(i===void 0){this.problem(`warning`,`externalDocs without a url at "${n}" was skipped.`,n);return}let a={url:i},o=R(r.value.description);return o!==void 0&&(a.description=o),a}bindings(e,t,n,r){let i=[],a=this.object(t,n,r);if(!a)return i;for(let[t,n,o]of this.entries(a.value,a.baseUrl,r))for(let[r,a]of Object.entries(n.value))i.push({scope:e,protocol:t,key:r,value:a});return i}withTraits(e,t,n,r){let i=e.traits;if(!this.options.applyTraits||i===void 0)return e;let a={...e};delete a.traits;for(let[e,o]of this.items(i,t,`${n}/traits`)){let t={...e.value};for(let e of r)e in t&&(this.problem(`warning`,`A trait must not define "${e}"; that field of the trait at "${o}" was ignored.`,o),delete t[e]);a=Wi(t,a)}return a}static keyOf(e){if(e===void 0)return;let t=e.slice(e.indexOf(`#`)+1).split(`/`).pop();return t===void 0||t===``?void 0:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}static schemaName(e){return e===void 0?void 0:ji(e)}};function Hi(e){return e===null?`null`:Array.isArray(e)?`a list`:typeof e==`object`?`an object`:`a ${typeof e}`}function Ui(e){let t={},n=[],r=(t,r)=>{let i=R(e[r]);i!==void 0&&n.push({label:t,value:i})};switch(R(e.type)){case`apiKey`:r(`in`,`in`);break;case`httpApiKey`:r(`name`,`name`),r(`in`,`in`);break;case`http`:r(`scheme`,`scheme`),r(`bearer format`,`bearerFormat`);break;case`openIdConnect`:{let n=R(e.openIdConnectUrl);n!==void 0&&(t.openIdConnectUrl=n);break}case`oauth2`:{let n=e.flows;if(L(n)){let e=[];for(let[t,r]of Object.entries(n)){if(!L(r))continue;let n={kind:t,scopes:[]},i=R(r.authorizationUrl),a=R(r.tokenUrl),o=R(r.refreshUrl);i!==void 0&&(n.authorizationUrl=i),a!==void 0&&(n.tokenUrl=a),o!==void 0&&(n.refreshUrl=o);let s=r.availableScopes??r.scopes;if(L(s))for(let[e,t]of Object.entries(s))n.scopes.push({name:e,description:typeof t==`string`?t:``});e.push(n)}e.length>0&&(t.flows=e)}break}}n.length>0&&(t.facts=n);let i=Object.entries(e).filter(([e])=>e.startsWith(`x-`)).map(([e,t])=>({key:e,value:t}));return i.length>0&&(t.extensions=i),t}function Wi(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];n[e]=L(t)&&L(r)&&!(`$ref`in r)&&!(`$ref`in t)?Wi(t,r):r}return n}function Gi(e){return e.replace(/[^A-Za-z0-9_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}var Ki={null:`null`,boolean:`boolean`,int:`integer`,long:`integer`,float:`number`,double:`number`,bytes:`string`,string:`string`},qi={"timestamp-millis":`date-time`,"timestamp-micros":`date-time`,"local-timestamp-millis":`date-time`,"local-timestamp-micros":`date-time`,date:`date`,"time-millis":`time`,"time-micros":`time`,uuid:`uuid`,decimal:`decimal`,duration:`duration`};function Ji(e){return e.toLowerCase().includes(`avro`)}function Yi(e,t,n){if(Xi(e))return B(e,{name:t,path:[],required:!1,isRoot:n,ancestors:new Set,registry:new Map})}function Xi(e){return typeof e==`string`||Array.isArray(e)||typeof e==`object`&&!!e&&`type`in e}function Zi(e,t){if(!e.name)return;if(e.name.includes(`.`))return e.name;let n=e.namespace??t;return n?`${n}.${e.name}`:e.name}function B(e,t,n){let r={kind:`node`,name:t.name,path:t.path,types:[],required:t.required,constraints:[],children:[]},i=t.isRoot?[]:t.name===`[]`?[...t.path.slice(0,-1),`${t.path[t.path.length-1]??``}[]`]:[...t.path,t.name];if(Array.isArray(e)){let i=e.filter(e=>e!==`null`),a=i.length!==e.length;if(i.length===1){let e=B(i[0],t,n);return a&&!e.types.includes(`null`)&&(e.types=[...e.types,`null`]),e}return r.types=a?[`null`]:[],r.composition={kind:`oneOf`,variants:i.map((e,r)=>({title:Qi(e,r),node:B(e,t,n)}))},r}if(typeof e==`string`){let i=Ki[e];if(i!==void 0)return r.types=[i],e===`bytes`&&(r.format=`bytes`),r;let a=t.registry.get(e)??t.registry.get(n?`${n}.${e}`:e);if(a){let i=Zi(a,n)??e;if(t.ancestors.has(i))return r.types=[a.type===`record`?`object`:`string`],r.circularRef=a.name??e,r.refName=a.name??e,r;let o=B(a,t,n);return o.refName=a.name??e,o}return r.types=[],r.description=`Unknown Avro type "${e}"`,r}let a=e;if(typeof a.type!=`string`)return B(a.type,t,a.namespace??n);let o=Zi(a,n);o&&t.registry.set(o,a),a.name&&!t.registry.has(a.name)&&t.registry.set(a.name,a);let s=o?new Set(t.ancestors).add(o):t.ancestors,c=a.namespace??n;a.doc&&(r.description=a.doc);let l=a.logicalType?qi[a.logicalType]:void 0;switch(l!==void 0&&(r.format=l),a.type){case`record`:case`error`:r.types=[`object`],a.name&&(r.title=a.name);for(let e of a.fields??[]){let n=Array.isArray(e.type)&&e.type.includes(`null`),a=B(e.type,{name:e.name,path:i,required:!n,isRoot:!1,ancestors:s,registry:t.registry},c);e.doc&&(a.description=e.doc),e.default!==void 0&&e.default!==null&&(a.default=e.default),r.children.push(a)}return r;case`enum`:return r.types=[`string`],r.enum=a.symbols??[],a.name&&(r.title=a.name),r;case`array`:return r.types=[`array`],a.items!==void 0&&r.children.push(B(a.items,{name:`[]`,path:i,required:!1,isRoot:!1,ancestors:s,registry:t.registry},c)),r;case`map`:return r.types=[`object`],a.values!==void 0&&r.children.push(B(a.values,{name:`*`,path:i,required:!1,isRoot:!1,ancestors:s,registry:t.registry},c)),r;case`fixed`:return r.types=[`string`],r.format=r.format??`bytes`,a.size!==void 0&&r.constraints.push({key:`maxLength`,value:a.size}),r;default:{let e=B(a.type,t,c);return r.format&&(e.format=r.format),r.description&&(e.description=r.description),e}}}function Qi(e,t){return typeof e==`string`?e:Array.isArray(e)?`Variant ${t+1}`:e.name?e.name:typeof e.type==`string`?e.type:`Variant ${t+1}`}var $i=[`minimum`,`exclusiveMinimum`,`maximum`,`exclusiveMaximum`,`multipleOf`,`minLength`,`maxLength`,`pattern`,`minItems`,`maxItems`,`uniqueItems`,`minProperties`,`maxProperties`];function ea(e){let t=e.toLowerCase();return t.includes(`vnd.aai.asyncapi`)||t.includes(`json-schema`)||t.includes(`schema+json`)||t.includes(`schema+yaml`)}function ta(e,t){if(t.raw===void 0)return;let n=e.resolver.deref(t.raw,t.baseUrl);if(`error`in n){e.problem(`error`,n.error,t.where);return}let r=n.value,i=n.baseUrl,a=n.id,o=t.defaultFormat;if(L(r)&&typeof r.schemaFormat==`string`&&`schema`in r){o=r.schemaFormat;let n=e.resolver.deref(r.schema,i);if(`error`in n){e.problem(`error`,n.error,`${t.where}/schema`);return}r=n.value,i=n.baseUrl,a=n.id??a}return Ji(o)?Yi(r,t.name,!0)||(e.problem(`warning`,`The Avro schema at "${t.where}" could not be read as a tree; it is shown as a code block.`,t.where),na(o,r)):ea(o)?ra(e,r,{baseUrl:i,id:a??`${i}#${t.where}`,viaRef:a!==void 0,name:t.name,path:[],required:!1,isRoot:!0,ancestors:new Set,where:t.where}):na(o,r)}function na(e,t){return{kind:`raw`,schemaFormat:e,source:typeof t==`string`?t:JSON.stringify(t,null,2)}}function ra(e,t,n){let r={kind:`node`,name:n.name,path:n.path,types:[],required:n.required,constraints:[],children:[]},i=n.viaRef?z.schemaName(n.id):void 0;if(i!==void 0&&(r.refName=i),t===!0||t===void 0)return r;if(t===!1)return r.types=[`never`],r;if(!L(t))return e.problem(`warning`,`Expected a schema at "${n.where}" but found ${typeof t}; it was shown as untyped.`,n.where),r;if(n.id!==void 0&&n.ancestors.has(n.id))return r.circularRef=z.schemaName(n.id)??z.keyOf(n.id)??n.id,r.types=oa(t),r;let a=n.id===void 0?n.ancestors:new Set(n.ancestors).add(n.id),o=[];ia(e,{value:t,baseUrl:n.baseUrl,where:n.where},o,a,new Set),r.types=ca(o.map(e=>oa(e.value)))??[],la(o,`format`,e=>r.format=e),la(o,`title`,e=>r.title=e),la(o,`description`,e=>r.description=e);for(let e of o)r.enum===void 0&&Array.isArray(e.value.enum)&&(r.enum=e.value.enum),r.const===void 0&&`const`in e.value&&(r.const=e.value.const),r.default===void 0&&`default`in e.value&&(r.default=e.value.default),r.examples===void 0&&Array.isArray(e.value.examples)&&(r.examples=e.value.examples),e.value.deprecated===!0&&(r.deprecated=!0),e.value.readOnly===!0&&(r.readOnly=!0),e.value.writeOnly===!0&&(r.writeOnly=!0);r.constraints=sa(o.map(e=>e.value));let s=n.isRoot?[]:n.name===`[]`?[...n.path.slice(0,-1),`${n.path[n.path.length-1]??``}[]`]:[...n.path,n.name],c=new Set;for(let e of o)if(Array.isArray(e.value.required))for(let t of e.value.required)typeof t==`string`&&c.add(t);let l=new Map;for(let t of o){let n=t.value.properties;if(L(n))for(let[i,o]of Object.entries(n)){let n=aa(e,o,i,c.has(i),t.baseUrl,a,s,`${t.where}/properties/${i}`),u=l.get(i);u===void 0?(l.set(i,r.children.length),r.children.push(n)):r.children[u]=n}}r.types.length===0&&r.children.length>0&&(r.types=[`object`]);let u=o.find(e=>e.value.items!==void 0);if(u&&(r.types.includes(`array`)||r.types.length===0)){r.types.length===0&&(r.types=[`array`]);let t=u.value.items;Array.isArray(t)?t.forEach((t,n)=>{r.children.push(aa(e,t,`[${n}]`,!1,u.baseUrl,a,s,`${u.where}/items/${n}`))}):r.children.push(aa(e,t,`[]`,!1,u.baseUrl,a,s,`${u.where}/items`))}for(let t of o){let n=t.value.additionalProperties;L(n)&&!l.has(`*`)&&(l.set(`*`,r.children.length),r.children.push(aa(e,n,`*`,!1,t.baseUrl,a,s,`${t.where}/additionalProperties`)));let i=t.value.patternProperties;if(L(i))for(let[n,o]of Object.entries(i)){let i=`/${n}/`;l.has(i)||(l.set(i,r.children.length),r.children.push(aa(e,o,i,!1,t.baseUrl,a,s,`${t.where}/patternProperties/${n}`)))}}for(let t of o){let i=Array.isArray(t.value.oneOf)?`oneOf`:Array.isArray(t.value.anyOf)?`anyOf`:void 0;if(!i)continue;let o=t.value[i],s={kind:i,variants:[]};o.forEach((r,o)=>{let c=e.resolver.deref(r,t.baseUrl),l=`${t.where}/${i}/${o}`;if(`error`in c){e.problem(`error`,c.error,l);return}let u=ra(e,c.value,{baseUrl:c.baseUrl,id:c.id,viaRef:c.id!==void 0,name:n.name,path:n.path,required:n.required,isRoot:n.isRoot,ancestors:a,where:l}),d=(L(c.value)?R(c.value.title):void 0)??u.refName??`Variant ${o+1}`;s.variants.push({title:d,node:u})}),s.variants.length>0&&(r.composition=s);break}return r}function ia(e,t,n,r,i){n.push(t);let a=t.value.allOf;Array.isArray(a)&&a.forEach((a,o)=>{let s=`${t.where}/allOf/${o}`,c=e.resolver.deref(a,t.baseUrl);if(`error`in c){e.problem(`error`,c.error,s);return}if(!L(c.value)){c.value!==!0&&e.problem(`warning`,`Expected a schema at "${s}"; it was skipped.`,s);return}if(c.id!==void 0){if(r.has(c.id)||i.has(c.id)){e.problem(`warning`,`allOf at "${s}" refers back to a schema already being merged; it was skipped.`,s);return}i.add(c.id)}ia(e,{value:c.value,baseUrl:c.baseUrl,where:s},n,r,i)})}function aa(e,t,n,r,i,a,o,s){let c=e.resolver.deref(t,i);return`error`in c?(e.problem(`error`,c.error,s),{kind:`node`,name:n,path:o,types:[],required:r,constraints:[],children:[]}):ra(e,c.value,{baseUrl:c.baseUrl,id:c.id,viaRef:c.id!==void 0,name:n,path:o,required:r,isRoot:!1,ancestors:a,where:s})}function oa(e){let t=e.type;return typeof t==`string`?[t]:Array.isArray(t)?t.filter(e=>typeof e==`string`):L(e.properties)?[`object`]:e.items===void 0?[]:[`array`]}function sa(e){let t=[];for(let n of $i)for(let r of e){let e=r[n];if(typeof e==`number`||typeof e==`string`||typeof e==`boolean`){t.push({key:n,value:e});break}}return t}function ca(e){return e.find(e=>e.length>0)}function la(e,t,n){for(let r of e){let e=R(r.value[t]);if(e!==void 0){n(e);return}}}function ua(e,t,n){let r=e.resolver.rootUrl,i=`application/vnd.aai.asyncapi;version=${n}`,a=e.object(t.info,r,`/info`)??{value:{},baseUrl:r,id:void 0};L(t.info)||e.problem(`error`,`The document has no "info" object.`,`/info`);let o={specVersion:n,specMajor:2,title:R(a.value.title)??`Untitled API`,version:R(a.value.version)??``,tags:e.tags(t.tags,r,`/tags`),servers:[],operations:[],messages:[],schemas:[],problems:e.problems};V(o,`description`,R(a.value.description)),V(o,`termsOfService`,R(a.value.termsOfService)),V(o,`defaultContentType`,R(t.defaultContentType));let s=e.object(a.value.contact,a.baseUrl,`/info/contact`);if(s){let e={};V(e,`name`,R(s.value.name)),V(e,`url`,R(s.value.url)),V(e,`email`,R(s.value.email)),o.contact=e}let c=e.object(a.value.license,a.baseUrl,`/info/license`),l=c?R(c.value.name):void 0;c&&l!==void 0&&(o.license={name:l},V(o.license,`url`,R(c.value.url)));let u=e.externalDocs(t.externalDocs,r,`/externalDocs`);u&&(o.externalDocs=u);let d=new da(e,r,o,i,L(t.components)?t.components:{});return d.servers(t.servers),d.componentMessages(),d.channels(t.channels),d.componentSchemas(),o}var da=class{constructor(e,t,n,r,i){this.ctx=e,this.base=t,this.doc=n,this.schemaFormatDefault=r,this.components=i,this.serverIds=new Set,this.messagesById=new Map}servers(e){for(let[t,n,r]of this.ctx.entries(e,this.base,`/servers`)){let{value:e,baseUrl:i}=n,a={id:t,anchor:this.ctx.anchor(`servers`,t),protocol:R(e.protocol)??``,hostDisplay:R(e.url)??``,variables:[],security:this.security(e.security,i,`${r}/security`),tags:this.ctx.tags(e.tags,i,`${r}/tags`),bindings:this.ctx.bindings(`server`,e.bindings,i,`${r}/bindings`)};V(a,`description`,R(e.description)),V(a,`protocolVersion`,R(e.protocolVersion));for(let[t,n]of this.ctx.entries(e.variables,i,`${r}/variables`)){let e={name:t};V(e,`description`,R(n.value.description)),V(e,`default`,R(n.value.default)),Array.isArray(n.value.enum)&&(e.enum=n.value.enum.map(String)),Array.isArray(n.value.examples)&&(e.examples=n.value.examples.map(String)),a.variables.push(e)}this.doc.servers.push(a),this.serverIds.add(t)}}security(e,t,n){let r=[];return e===void 0?r:Array.isArray(e)?(e.forEach((e,t)=>{if(L(e))for(let[i,a]of Object.entries(e)){let e=this.components.securitySchemes,o=L(e)?this.ctx.object(e[i],this.base,`/components/securitySchemes/${i}`):void 0;o||this.ctx.problem(`warning`,`Security scheme "${i}" is not defined in components.securitySchemes.`,`${n}/${t}`);let s={id:i,type:o?R(o.value.type)??``:``,scopes:Array.isArray(a)?a.map(String):[]};o&&(V(s,`description`,R(o.value.description)),Object.assign(s,Ui(o.value))),r.push(s)}}),r):(this.ctx.problem(`warning`,`Expected a list at "${n}"; it was skipped.`,n),r)}componentMessages(){for(let[e,t,n]of this.ctx.entries(this.components.messages,this.base,`/components/messages`)){let r=t.id??`${this.base}#${n}`,i=this.message(e,e,t,n);this.messagesById.set(r,i),this.doc.messages.push(i)}}componentSchemas(){let e=this.components.schemas;if(e!==void 0){if(!L(e)){this.ctx.problem(`warning`,`Expected a map at "/components/schemas"; it was skipped.`,`/components/schemas`);return}for(let[t,n]of Object.entries(e)){let e=`/components/schemas/${t}`,r=ta(this.ctx,{raw:n,baseUrl:this.base,where:e,name:t,defaultFormat:this.schemaFormatDefault});r&&this.doc.schemas.push({id:t,anchor:this.ctx.anchor(`schemas`,t),schema:r})}}}channels(e){for(let[t,n,r]of this.ctx.entries(e,this.base,`/channels`)){let e=this.channel(t,n,r);n.value.publish===void 0&&n.value.subscribe===void 0&&this.ctx.problem(`warning`,`Channel "${t}" has neither publish nor subscribe, so nothing is shown for it.`,r);for(let i of[`publish`,`subscribe`]){let a=n.value[i];if(a===void 0)continue;let o=this.ctx.object(a,n.baseUrl,`${r}/${i}`);o&&this.doc.operations.push(this.operation(t,i,e,o,`${r}/${i}`))}}}channel(e,{value:t,baseUrl:n},r){let i={id:e,address:e,parameters:[],servers:[],tags:[],bindings:this.ctx.bindings(`channel`,t.bindings,n,`${r}/bindings`)};V(i,`description`,R(t.description));for(let[e,a,o]of this.ctx.entries(t.parameters,n,`${r}/parameters`))i.parameters.push(this.parameter(e,a,o));let a=t.servers;return Array.isArray(a)&&a.forEach((t,n)=>{typeof t==`string`&&this.serverIds.has(t)?i.servers.push(t):this.ctx.problem(`warning`,`Channel "${e}" lists server "${String(t)}" which is not in "servers"; it was ignored.`,`${r}/servers/${n}`)}),i}parameter(e,{value:t,baseUrl:n},r){let i={name:e};V(i,`description`,R(t.description)),V(i,`location`,R(t.location));let a=this.ctx.object(t.schema,n,`${r}/schema`);if(a){let e=a.value.type;V(i,`schemaType`,typeof e==`string`?e:Array.isArray(e)?e.map(String).join(` | `):void 0),Array.isArray(a.value.enum)&&(i.enum=a.value.enum.map(String)),V(i,`default`,R(a.value.default)),Array.isArray(a.value.examples)&&(i.examples=a.value.examples.map(String))}return i}operation(e,t,n,r,i){let a=r.baseUrl,o=this.ctx.withTraits(r.value,a,i,[`message`,`traits`]),s=t===`publish`?`receive`:`send`,c=R(o.operationId)??`${t}-${e}`,l={id:c,anchor:this.ctx.anchor(`operations`,c),heading:R(o.operationId)??`${t} ${e}`,action:s,kind:s,badgeLabel:this.ctx.options.labels[t],locationHint:`channels › ${e} › ${t}`,channel:n,tags:this.ctx.tags(o.tags,a,`${i}/tags`),messages:this.operationMessages(e,t,o.message,a,`${i}/message`),security:this.security(o.security,a,`${i}/security`),bindings:this.ctx.bindings(`operation`,o.bindings,a,`${i}/bindings`)};V(l,`summary`,R(o.summary)),V(l,`description`,R(o.description));let u=this.ctx.externalDocs(o.externalDocs,a,`${i}/externalDocs`);return u&&(l.externalDocs=u),l}operationMessages(e,t,n,r,i){let a=this.ctx.object(n,r,i);if(!a)return[];let o=a.value.oneOf;if(Array.isArray(o)){let n=[],r=0;for(let[s,c]of this.ctx.items(o,a.baseUrl,`${i}/oneOf`))n.push(this.messageFor(s,`${e}-${t}-${r}`,c)),r++;return n}return[this.messageFor(a,`${e}-${t}`,i)]}messageFor(e,t,n){let r=e.id??`${this.base}#${n}`,i=this.messagesById.get(r);if(i)return i;let a=this.message(z.keyOf(e.id)??R(e.value.name)??t,t,e,n);return this.messagesById.set(r,a),a}message(e,t,n,r){let i=n.baseUrl,a=this.ctx.withTraits(n.value,i,r,[`payload`,`traits`]),o={id:e,anchor:this.ctx.anchor(`messages`,t),contentType:R(a.contentType)??this.doc.defaultContentType??`application/json`,schemaFormat:R(a.schemaFormat)??this.schemaFormatDefault,examples:[],tags:this.ctx.tags(a.tags,i,`${r}/tags`),bindings:this.ctx.bindings(`message`,a.bindings,i,`${r}/bindings`)};V(o,`name`,R(a.name)),V(o,`title`,R(a.title)),V(o,`summary`,R(a.summary)),V(o,`description`,R(a.description));let s=this.ctx.externalDocs(a.externalDocs,i,`${r}/externalDocs`);s&&(o.externalDocs=s);let c=ta(this.ctx,{raw:a.payload,baseUrl:i,where:`${r}/payload`,name:``,defaultFormat:o.schemaFormat});c&&(o.payload=c);let l=ta(this.ctx,{raw:a.headers,baseUrl:i,where:`${r}/headers`,name:``,defaultFormat:this.schemaFormatDefault});l&&(o.headers=l);let u=this.ctx.object(a.correlationId,i,`${r}/correlationId`),d=u?R(u.value.location):void 0;if(u&&d!==void 0){let e={location:d};V(e,`description`,R(u.value.description)),o.correlationId=e}for(let[e]of this.ctx.items(a.examples,i,`${r}/examples`)){let t={};V(t,`name`,R(e.value.name)),V(t,`summary`,R(e.value.summary)),`payload`in e.value&&(t.payload=e.value.payload),`headers`in e.value&&(t.headers=e.value.headers),o.examples.push(t)}return o}};function V(e,t,n){n!==void 0&&(e[t]=n)}function fa(e,t,n){let r=e.resolver.rootUrl,i=`application/vnd.aai.asyncapi+json;version=${n}`,a=e.object(t.info,r,`/info`)??{value:{},baseUrl:r,id:void 0};L(t.info)||e.problem(`error`,`The document has no "info" object.`,`/info`);let o={specVersion:n,specMajor:3,title:R(a.value.title)??`Untitled API`,version:R(a.value.version)??``,tags:e.tags(a.value.tags,a.baseUrl,`/info/tags`),servers:[],operations:[],messages:[],schemas:[],problems:e.problems};H(o,`description`,R(a.value.description)),H(o,`termsOfService`,R(a.value.termsOfService)),H(o,`defaultContentType`,R(t.defaultContentType));let s=e.object(a.value.contact,a.baseUrl,`/info/contact`);s&&(o.contact=ha(s.value,[`name`,`url`,`email`]));let c=e.object(a.value.license,a.baseUrl,`/info/license`);if(c){let e=R(c.value.name);e!==void 0&&(o.license={name:e},H(o.license,`url`,R(c.value.url)))}let l=e.externalDocs(a.value.externalDocs,a.baseUrl,`/info/externalDocs`);l&&(o.externalDocs=l);let u=new pa(e,r,o,i);return u.servers(t.servers),u.componentMessages(t.components),u.channels(t.channels),u.operations(t.operations),u.componentSchemas(t.components),o}var pa=class{constructor(e,t,n,r){this.ctx=e,this.base=t,this.doc=n,this.schemaFormatDefault=r,this.serverIds=new Set,this.channelsByKey=new Map,this.messagesById=new Map,this.channelMessageOrder=new Map}servers(e){for(let[t,n,r]of this.ctx.entries(e,this.base,`/servers`))this.doc.servers.push(this.server(t,n,r)),this.serverIds.add(t)}server(e,{value:t,baseUrl:n},r){let i=R(t.host)??``,a=R(t.pathname)??``,o={id:e,anchor:this.ctx.anchor(`servers`,e),protocol:R(t.protocol)??``,hostDisplay:`${i}${a}`,variables:[],security:this.security(t.security,n,`${r}/security`),tags:this.ctx.tags(t.tags,n,`${r}/tags`),bindings:this.ctx.bindings(`server`,t.bindings,n,`${r}/bindings`)};H(o,`title`,R(t.title)),H(o,`summary`,R(t.summary)),H(o,`description`,R(t.description)),H(o,`protocolVersion`,R(t.protocolVersion));let s=this.ctx.externalDocs(t.externalDocs,n,`${r}/externalDocs`);s&&(o.externalDocs=s);for(let[e,i,a]of this.ctx.entries(t.variables,n,`${r}/variables`)){let t={name:e};H(t,`description`,R(i.value.description)),H(t,`default`,R(i.value.default)),Array.isArray(i.value.enum)&&(t.enum=i.value.enum.map(String)),Array.isArray(i.value.examples)&&(t.examples=i.value.examples.map(String)),o.variables.push(t)}return o}security(e,t,n){let r=[];for(let[i,a]of this.ctx.items(e,t,n)){let e={id:z.keyOf(i.id)??R(i.value.type)??`security`,type:R(i.value.type)??``,scopes:Array.isArray(i.value.scopes)?i.value.scopes.map(String):[]};H(e,`description`,R(i.value.description)),Object.assign(e,Ui(i.value)),r.push(e)}return r}componentMessages(e){if(L(e))for(let[t,n,r]of this.ctx.entries(e.messages,this.base,`/components/messages`)){let e=n.id??`${this.base}#${r}`,i=this.message(t,t,n,r);this.messagesById.set(e,i),this.doc.messages.push(i)}}componentSchemas(e){if(!L(e))return;let t=e.schemas;if(t!==void 0){if(!L(t)){this.ctx.problem(`warning`,`Expected a map at "/components/schemas"; it was skipped.`,`/components/schemas`);return}for(let[e,n]of Object.entries(t)){let t=`/components/schemas/${e}`,r=ta(this.ctx,{raw:n,baseUrl:this.base,where:t,name:e,defaultFormat:this.schemaFormatDefault});r&&this.doc.schemas.push({id:e,anchor:this.ctx.anchor(`schemas`,e),schema:r})}}}channels(e){for(let[t,n,r]of this.ctx.entries(e,this.base,`/channels`))this.channelsByKey.set(t,this.channel(t,n,r))}channel(e,{value:t,baseUrl:n},r){let i=R(t.address),a={id:e,address:i===void 0?null:i,parameters:[],servers:[],tags:this.ctx.tags(t.tags,n,`${r}/tags`),bindings:this.ctx.bindings(`channel`,t.bindings,n,`${r}/bindings`)};H(a,`title`,R(t.title)),H(a,`summary`,R(t.summary)),H(a,`description`,R(t.description));let o=this.ctx.externalDocs(t.externalDocs,n,`${r}/externalDocs`);o&&(a.externalDocs=o);for(let[e,i]of this.ctx.entries(t.parameters,n,`${r}/parameters`)){let t={name:e};H(t,`description`,R(i.value.description)),H(t,`default`,R(i.value.default)),H(t,`location`,R(i.value.location)),Array.isArray(i.value.enum)&&(t.enum=i.value.enum.map(String)),Array.isArray(i.value.examples)&&(t.examples=i.value.examples.map(String)),a.parameters.push(t)}for(let[i,o]of this.ctx.items(t.servers,n,`${r}/servers`)){let t=z.keyOf(i.id);if(t===void 0||!this.serverIds.has(t)){this.ctx.problem(`warning`,`Channel "${e}" lists a server that is not in "servers"; it was ignored.`,o);continue}a.servers.push(t)}let s=[];for(let[i,a,o]of this.ctx.entries(t.messages,n,`${r}/messages`))s.push(this.channelMessage(e,i,a,o));return this.channelMessageOrder.set(e,s),a}channelMessage(e,t,n,r){let i=n.id??`${this.base}#${r}`,a=this.messagesById.get(i);if(a)return a;let o=this.message(z.keyOf(n.id)??t,`${e}-${t}`,n,r);return this.messagesById.set(i,o),o}message(e,t,n,r){let i=n.baseUrl,a=this.ctx.withTraits(n.value,i,r,[`payload`,`traits`]),o={id:e,anchor:this.ctx.anchor(`messages`,t),contentType:R(a.contentType)??this.doc.defaultContentType??`application/json`,schemaFormat:this.schemaFormatDefault,examples:[],tags:this.ctx.tags(a.tags,i,`${r}/tags`),bindings:this.ctx.bindings(`message`,a.bindings,i,`${r}/bindings`)};H(o,`name`,R(a.name)),H(o,`title`,R(a.title)),H(o,`summary`,R(a.summary)),H(o,`description`,R(a.description));let s=this.ctx.externalDocs(a.externalDocs,i,`${r}/externalDocs`);s&&(o.externalDocs=s);let c=a.payload;L(c)&&typeof c.schemaFormat==`string`&&(o.schemaFormat=c.schemaFormat);let l=ta(this.ctx,{raw:c,baseUrl:i,where:`${r}/payload`,name:``,defaultFormat:this.schemaFormatDefault});l&&(o.payload=l);let u=ta(this.ctx,{raw:a.headers,baseUrl:i,where:`${r}/headers`,name:``,defaultFormat:this.schemaFormatDefault});u&&(o.headers=u);let d=this.ctx.object(a.correlationId,i,`${r}/correlationId`);if(d){let e=R(d.value.location);if(e!==void 0){let t={location:e};H(t,`description`,R(d.value.description)),o.correlationId=t}}for(let[e]of this.ctx.items(a.examples,i,`${r}/examples`)){let t={};H(t,`name`,R(e.value.name)),H(t,`summary`,R(e.value.summary)),`payload`in e.value&&(t.payload=e.value.payload),`headers`in e.value&&(t.headers=e.value.headers),o.examples.push(t)}return o}operations(e){for(let[t,n,r]of this.ctx.entries(e,this.base,`/operations`)){let e=this.operation(t,n,r);e&&this.doc.operations.push(e)}}operation(e,t,n){let r=t.baseUrl,i=this.ctx.withTraits(t.value,r,n,[`action`,`channel`,`messages`,`reply`,`traits`]),a=R(i.action);if(a!==`send`&&a!==`receive`){this.ctx.problem(`error`,`Operation "${e}" has action "${a??``}"; expected send or receive. It was skipped.`,`${n}/action`);return}let o=this.ctx.object(i.channel,r,`${n}/channel`),s=z.keyOf(o?.id),c=s===void 0?void 0:this.channelsByKey.get(s);if(!c){this.ctx.problem(`error`,`Operation "${e}" does not reference a channel in "channels". It was skipped.`,`${n}/channel`);return}this.channelMessagesOf(c.id).length===0&&this.ctx.problem(`warning`,`Operation "${e}" uses channel "${c.id}", which defines no messages.`,`${n}/channel`);let l=this.reply(i.reply,r,`${n}/reply`),u=l?a===`send`?`request`:`reply`:a,d=this.ctx.options.labels,f={id:e,anchor:this.ctx.anchor(`operations`,e),heading:this.ctx.options.useChannelAddressAsIdentifier?c.address??e:R(i.title)??e,action:a,kind:u,badgeLabel:d[u],locationHint:e,channel:c,tags:this.ctx.tags(i.tags,r,`${n}/tags`),messages:this.operationMessages(e,i.messages,c.id,r,`${n}/messages`),security:this.security(i.security,r,`${n}/security`),bindings:this.ctx.bindings(`operation`,i.bindings,r,`${n}/bindings`)};H(f,`summary`,R(i.summary)),H(f,`description`,R(i.description));let p=this.ctx.externalDocs(i.externalDocs,r,`${n}/externalDocs`);return p&&(f.externalDocs=p),l&&(f.reply=l),f}operationMessages(e,t,n,r,i){let a=this.channelMessagesOf(n);if(t===void 0)return a;let o=[];for(let[n,s]of this.ctx.items(t,r,i)){let t=n.id===void 0?void 0:this.messagesById.get(n.id);if(!t||!a.includes(t)){this.ctx.problem(`warning`,`Operation "${e}" lists a message that is not one of its channel's messages; it was ignored.`,s);continue}o.push(t)}return o}channelMessagesOf(e){return this.channelMessageOrder.get(e)??[]}reply(e,t,n){let r=this.ctx.object(e,t,n);if(!r)return;let i={messages:[]},a=this.ctx.object(r.value.address,r.baseUrl,`${n}/address`);a&&(H(i,`addressLocation`,R(a.value.location)),H(i,`addressDescription`,R(a.value.description)));let o=this.ctx.object(r.value.channel,r.baseUrl,`${n}/channel`),s=z.keyOf(o?.id),c=s===void 0?void 0:this.channelsByKey.get(s);o&&!c&&this.ctx.problem(`warning`,`A reply references a channel that is not in "channels"; it was ignored.`,`${n}/channel`),c&&(i.channel=c);let l=r.value.messages;if(l===void 0&&s!==void 0)i.messages=this.channelMessagesOf(s).map(ma);else for(let[e,t]of this.ctx.items(l,r.baseUrl,`${n}/messages`)){let n=e.id===void 0?void 0:this.messagesById.get(e.id);if(!n){this.ctx.problem(`warning`,`A reply lists a message that is not one of the reply channel's messages; it was ignored.`,t);continue}i.messages.push(ma(n))}return i}};function ma(e){let t={id:e.id,anchor:e.anchor};return H(t,`name`,e.name),H(t,`title`,e.title),t}function H(e,t,n){n!==void 0&&(e[t]=n)}function ha(e,t){let n={};for(let r of t){let t=R(e[r]);t!==void 0&&(n[r]=t)}return n}function ga(e){let t={...Vi,...e.options,labels:{...Vi.labels,...e.options?.labels}},n=new z(e.resolver,t);for(let t of e.problems??[])n.problems.push(t);let r=e.specMajor===3?fa(n,e.data,e.specVersion):ua(n,e.data,e.specVersion);return _a(r),r}function _a(e){let t=new Map(e.tags.filter(e=>e.description).map(e=>[e.name,e.description]));if(t.size===0)return;let n=e=>{for(let n of e){let e=t.get(n.name);n.description===void 0&&e!==void 0&&(n.description=e)}};for(let t of e.servers)n(t.tags);for(let t of e.operations){n(t.tags),n(t.channel.tags);for(let e of t.messages)n(e.tags)}for(let t of e.messages)n(t.tags)}var va={$comment:`Single source of truth for every <asyncapi-viewer> option. Names are camelCase; the element accepts each as kebab-case (send-label) and as the lowercased form browsers produce from hand-written camelCase (sendlabel). The Python extension validates against a copy of this file. Booleans accept true/false, 1/0, yes/no, on/off and a bare attribute (true); in the DOM a bare attribute reads as an empty string, so an empty boolean value also means true. Enum values match case-insensitively.`,version:1,options:[{name:`src`,type:`string`,required:!0,status:`active`,specVersions:[2,3],description:`The AsyncAPI document (JSON or YAML), as a path or URL relative to the page.`},{name:`id`,type:`string`,default:null,status:`active`,specVersions:[2,3],description:`Element id; also prefixes every anchor inside the viewer. Generated as asyncapi-viewer-N when absent.`},{name:`sidebar`,type:`boolean`,default:!1,status:`active`,specVersions:[2,3],description:`Show the navigation column; a drawer behind a menu button on narrow containers.`},{name:`info`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the Info section.`},{name:`servers`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the Servers section and the server selector.`},{name:`operations`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the operations.`},{name:`messages`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the Messages section (component messages).`},{name:`schemas`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the Schemas section (component schemas).`},{name:`errors`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Show the load and validation problems panel.`},{name:`showMessageExamples`,type:`boolean`,default:!1,status:`active`,specVersions:[2,3],description:`Show examples in the Messages section.`},{name:`messageExamples`,type:`boolean`,default:!0,status:`active`,specVersions:[2,3],description:`Example panels start expanded; false starts them collapsed.`},{name:`showServers`,type:`enum`,values:[`byDefault`,`bySpecTags`,`byServersTags`],default:`byDefault`,status:`active`,specVersions:[2,3],description:`Sidebar grouping for servers.`},{name:`showOperations`,type:`enum`,values:[`byDefault`,`bySpecTags`,`byOperationsTags`],default:`byDefault`,status:`active`,specVersions:[2,3],description:`Sidebar grouping for operations.`},{name:`useChannelAddressAsIdentifier`,type:`boolean`,default:!1,status:`active`,specVersions:[3],description:`AsyncAPI 3: label operations by channel address instead of title.`},{name:`publishLabel`,type:`string`,default:`PUB`,status:`active`,specVersions:[2],description:`Badge text for AsyncAPI 2 publish operations.`},{name:`subscribeLabel`,type:`string`,default:`SUB`,status:`active`,specVersions:[2],description:`Badge text for AsyncAPI 2 subscribe operations.`},{name:`sendLabel`,type:`string`,default:`SEND`,status:`active`,specVersions:[3],description:`Badge text for AsyncAPI 3 send operations.`},{name:`receiveLabel`,type:`string`,default:`RECEIVE`,status:`active`,specVersions:[3],description:`Badge text for AsyncAPI 3 receive operations.`},{name:`requestLabel`,type:`string`,default:`REQUEST`,status:`active`,specVersions:[3],description:`Badge text for AsyncAPI 3 send operations that carry a reply.`},{name:`replyLabel`,type:`string`,default:`REPLY`,status:`active`,specVersions:[3],description:`Badge text for AsyncAPI 3 receive operations that carry a reply.`},{name:`parserOptions`,type:`json`,default:{applyTraits:!0},status:`active`,specVersions:[2,3],keys:{applyTraits:`boolean`},description:`JSON object. Only applyTraits (default true) is honoured; other keys warn and are ignored.`},{name:`schemaID`,type:`string`,default:null,status:`deprecated-noop`,specVersions:[2,3],description:`Deprecated: accepted, warns once, does nothing.`},{name:`theme`,type:`enum`,values:[`auto`,`light`,`dark`],default:`auto`,status:`active`,specVersions:[2,3],description:`auto follows the host page (Material scheme, html[data-theme], prefers-color-scheme).`},{name:`themeToggle`,type:`boolean`,default:!1,status:`active`,specVersions:[2,3],description:`Show a light/dark toggle in the viewer header.`},{name:`searchKeepSections`,type:`boolean`,default:!1,status:`active`,specVersions:[2,3],description:`Keep the Info, Servers, Messages and Schemas links visible while a sidebar search query is active.`}]}.options,ya=Object.freeze(Object.fromEntries(va.filter(e=>e.status===`active`&&e.default!==null&&e.default!==void 0).map(e=>[e.name,structuredClone(e.default)]))),ba=new Set([`true`,`1`,`yes`,`on`]),xa=new Set([`false`,`0`,`no`,`off`]),Sa=new Set([`class`,`style`,`slot`,`hidden`,`title`,`lang`,`dir`,`role`,`tabindex`,`part`,`exportparts`,`translate`,`nonce`]),Ca=new Map(va.map(e=>[e.name.toLowerCase(),e]));function wa(e){return Ca.get(e.replace(/-/g,``).toLowerCase())}function Ta(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var Ea=`<asyncapi-viewer>:`;function Da(e,t=e=>console.warn(e)){let n=structuredClone(ya),r=n;for(let[n,i]of e){let e=n.toLowerCase();if(Sa.has(e)||e.startsWith(`data-`)||e.startsWith(`aria-`)||e.startsWith(`on`))continue;let a=wa(e);if(!a){t(`${Ea} unknown attribute '${n}' was ignored.`);continue}if(a.status===`deprecated-noop`){t(`${Ea} attribute '${n}' is deprecated and does nothing.`);continue}if(a.name===`src`||a.name===`id`){i!==null&&i!==``&&(r[a.name]=i);continue}let o=ka(a,n,i,t);o!==Oa&&(r[a.name]=o)}return n}var Oa=Symbol(`invalid`);function ka(e,t,n,r){switch(e.type){case`boolean`:{let e=n===null||n.trim()===``?`true`:n.trim().toLowerCase();return ba.has(e)?!0:!xa.has(e)&&(r(`${Ea} attribute '${t}' expects true or false, got '${n}'.`),Oa)}case`enum`:{let i=(n??``).trim().toLowerCase(),a=e.values?.find(e=>e.toLowerCase()===i);return a===void 0?(r(`${Ea} attribute '${t}' expects one of ${e.values?.join(`, `)}; got '${n}'.`),Oa):a}case`json`:{let i;try{i=JSON.parse(n??``)}catch(e){return r(`${Ea} attribute '${t}' is not valid JSON (${e.message}).`),Oa}if(typeof i!=`object`||!i||Array.isArray(i))return r(`${Ea} attribute '${t}' expects a JSON object, got ${JSON.stringify(i)}.`),Oa;let a=structuredClone(e.default);for(let[t,n]of Object.entries(i)){let i=e.keys?.[t];i?typeof n===i?a[t]=n:r(`${Ea} ${e.name}.${t} expects a ${i}, got ${JSON.stringify(n)}.`):r(`${Ea} ${e.name}.${t} is not supported and was ignored.`)}return a}case`string`:return n??``}}var Aa=l`
|
|
108
|
+
.header {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 12px 14px;
|
|
113
|
+
min-height: 68px;
|
|
114
|
+
padding: 12px 24px;
|
|
115
|
+
background: var(--_surface);
|
|
116
|
+
border-bottom: 1px solid var(--_line);
|
|
117
|
+
}
|
|
118
|
+
.header__logo {
|
|
119
|
+
flex: none;
|
|
120
|
+
width: 40px;
|
|
121
|
+
height: 40px;
|
|
122
|
+
background: var(--_logo) center / contain no-repeat;
|
|
123
|
+
}
|
|
124
|
+
.header__title {
|
|
125
|
+
margin: 0;
|
|
126
|
+
font: 600 18px/1.3 var(--_font-heading);
|
|
127
|
+
color: var(--_ink);
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
min-width: 12ch;
|
|
130
|
+
overflow-wrap: anywhere;
|
|
131
|
+
}
|
|
132
|
+
.header__pills {
|
|
133
|
+
display: flex;
|
|
134
|
+
gap: 6px;
|
|
135
|
+
flex: none;
|
|
136
|
+
}
|
|
137
|
+
.header__spacer {
|
|
138
|
+
flex: 0 0 0;
|
|
139
|
+
}
|
|
140
|
+
.header__actions {
|
|
141
|
+
display: flex;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
flex: none;
|
|
144
|
+
}
|
|
145
|
+
.btn__text {
|
|
146
|
+
display: inline;
|
|
147
|
+
}
|
|
148
|
+
@container viewer (max-width: 1099px) {
|
|
149
|
+
.btn__text {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
|
+
.btn:not(.btn--icon) {
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
@container viewer (max-width: 699px) {
|
|
157
|
+
.header {
|
|
158
|
+
padding: 10px 16px;
|
|
159
|
+
gap: 10px;
|
|
160
|
+
}
|
|
161
|
+
.header__logo {
|
|
162
|
+
width: 34px;
|
|
163
|
+
height: 34px;
|
|
164
|
+
}
|
|
165
|
+
.header__title {
|
|
166
|
+
font-size: 16px;
|
|
167
|
+
}
|
|
168
|
+
.header__pills {
|
|
169
|
+
display: none;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`,ja=C`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4v11m0 0-4-4m4 4 4-4M5 19h14" /></svg>`,Ma=C`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z" /></svg>`,Na=C`<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4" /><path d="M12 2.5v2.5M12 19v2.5M2.5 12H5M19 12h2.5M5.3 5.3l1.8 1.8M16.9 16.9l1.8 1.8M5.3 18.7l1.8-1.8M16.9 7.1l1.8-1.8" /></svg>`;function Pa(e){let{doc:t}=e,n=e.src&&e.src.split(`/`).pop()?.split(`?`)[0]||`asyncapi`;return C`
|
|
173
|
+
<header class="header">
|
|
174
|
+
${e.menu??w}
|
|
175
|
+
${e.hasLogo?C`<span class="header__logo" aria-hidden="true"></span>`:w}
|
|
176
|
+
<h2 class="header__title">${t.title}</h2>
|
|
177
|
+
<div class="header__pills">
|
|
178
|
+
${t.version?C`<span class="pill pill--tint">v${t.version}</span>`:w}
|
|
179
|
+
<span class="pill pill--outline">AsyncAPI ${t.specVersion}</span>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="header__spacer"></div>
|
|
182
|
+
${e.extra??w}
|
|
183
|
+
<div class="header__actions">
|
|
184
|
+
${e.downloadHref?C`<a class="btn" href=${e.downloadHref} download=${n} title="Download spec">${ja}<span class="btn__text">Download spec</span></a>`:w}
|
|
185
|
+
${e.themeToggle?C`<button
|
|
186
|
+
class="btn btn--icon"
|
|
187
|
+
type="button"
|
|
188
|
+
aria-label="Toggle dark theme"
|
|
189
|
+
aria-pressed=${e.resolvedTheme===`dark`?`true`:`false`}
|
|
190
|
+
@click=${e.onToggleTheme}
|
|
191
|
+
>
|
|
192
|
+
${e.resolvedTheme===`dark`?Na:Ma}
|
|
193
|
+
</button>`:w}
|
|
194
|
+
</div>
|
|
195
|
+
</header>
|
|
196
|
+
`}function Fa(e){return e.description?C`<li class="chip chip--tip" data-tip=${e.description} tabindex="0">
|
|
197
|
+
${e.name}<span class="visually-hidden">: ${e.description}</span>
|
|
198
|
+
</li>`:C`<li class="chip">${e.name}</li>`}var Ia={};function La(e){let t=Ia[e];if(t)return t;t=Ia[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function Ra(e,t){typeof t!=`string`&&(t=Ra.defaultChars);let n=La(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;t+=e<128?`��`:String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;t+=e<2048||e>=55296&&e<=57343?`���`:String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}Ra.defaultChars=`;/?:@&=+$,#`,Ra.componentChars=``;var za={};function Ba(e){let t=za[e];if(t)return t;t=za[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function U(e,t,n){typeof t!=`string`&&(n=t,t=U.defaultChars),n===void 0&&(n=!0);let r=Ba(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}U.defaultChars=`;/?:@&=+$,-_.!~*'()#`,U.componentChars=`-_.!~*'()`;function Va(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function Ha(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Ua=/^([a-z0-9.+-]+:)/i,Wa=/:[0-9]*$/,Ga=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ka=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
|
|
199
|
+
`,` `],qa=[`/`,`?`,`#`],Ja=255,Ya=/^[+a-z0-9A-Z_-]{0,63}$/,Xa=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Za={javascript:!0,"javascript:":!0},Qa={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function $a(e,t){if(e&&e instanceof Ha)return e;let n=new Ha;return n.parse(e,t),n}Ha.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=Ga.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=Ua.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&Za[o])&&(a=a.substr(2),this.slashes=!0)),!Za[o]&&(i||o&&!Qa[o])){let e=-1;for(let t=0;t<qa.length;t++)r=a.indexOf(qa[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<Ka.length;t++)r=a.indexOf(Ka[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(Ya)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(Ya)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(Xa);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Ja&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),Qa[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},Ha.prototype.parseHost=function(e){let t=Wa.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var eo=n({decode:()=>Ra,encode:()=>U,format:()=>Va,parse:()=>$a}),to=n({Any:()=>no,Cc:()=>ro,Cf:()=>io,P:()=>ao,S:()=>oo,Z:()=>so}),no=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ro=/[\0-\x1F\x7F-\x9F]/,io=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ao=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,oo=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,so=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,co=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function lo(e){return e===0||e>=55296&&e<=57343||e>1114111}function uo(e){return lo(e)?65533:e>=128&&e<=159&&co[e-128]||e}function fo(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(uo(e))}var W=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function po(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=W[e.charCodeAt(c++)];return t<a?t:t*91-s+W[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=W[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=W[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=W[e.charCodeAt(c++)];r+=89+(t<90?t*91+W[e.charCodeAt(c++)]:W[e.charCodeAt(c++)]*8281+W[e.charCodeAt(c++)]*91+W[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),ee=0;for(;c<o;){let t=W[e.charCodeAt(c++)];t>=a&&(t=t*91-s+W[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[ee++]=b[e++]}else S[ee++]=n}return S}var mo=po("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),G;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(G||={});var K;(function(e){e[e.AMP=38]=`AMP`,e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_X=120]=`LOWER_X`})(K||={});var ho=32,go=21,_o=2097151,vo=2047,yo=0;function bo(e){let t=e>>>go;return t===vo?yo:t}function xo(e){return e-K.ZERO>>>0<=9}function So(e){return(e|ho)-K.LOWER_A>>>0<=5}function Co(e){return(e|ho)-K.LOWER_A>>>0<=25}function wo(e){return e===K.EQUALS||Co(e)||xo(e)}var To;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(To||={});var Eo;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Eo||={});function Do(e,t,n,r){let i=(t&G.BRANCH_LENGTH)>>7,a=t&G.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}function Oo(e,t,n){return n===1?String.fromCharCode(e[t]&G.VALUE_MASK):n===2?String.fromCharCode(e[t+1]):String.fromCharCode(e[t+1],e[t+2])}function ko(e,t,n){let r=t+1,i=0,a=r;if(r<n&&(e.charCodeAt(r)|ho)===K.LOWER_X)for(r+=1,a=r;r<n;){let t=e.charCodeAt(r);if(xo(t))i=i*16+(t-K.ZERO);else if(So(t))i=i*16+((t|ho)-K.LOWER_A+10);else break;r+=1}else for(;r<n;){let t=e.charCodeAt(r)-K.ZERO;if(t>>>0>9)break;i=i*10+t,r+=1}if(r===a)return 0;r<n&&e.charCodeAt(r)===K.SEMI&&(r+=1),i>1114111&&(i=1114112);let o=r-t;return o>=vo&&(yo=o,o=vo),o<<go|i}function Ao(e,t,n){let r=mo,i=e.indexOf(`&`);if(i<0)return e;let a=e.length,o=0,s=``,c=r[0],l=c&G.JUMP_TABLE,u=(c&G.BRANCH_LENGTH)>>7;do{let c=i+1,d=e.charCodeAt(c),f,p;if(d===K.NUM){let n=ko(e,c,a);f=bo(n),t&&f>0&&e.charCodeAt(c+f-1)!==K.SEMI&&(f=0),p=f===0?``:fo(n&_o)}else if(Co(d)){f=0,p=``;let n=d-l,i;if(n>>>0<u){let e=r[1+n];i=e===0?-1:u+e&65535}else i=-1;let o=0,s=0,m=i<0?0:r[i],h=c+1;trie:for(;h<a;){for(;(m&(G.VALUE_LENGTH|G.FLAG13))===0&&(m&G.JUMP_TABLE)!==0;){let t=m&G.JUMP_TABLE,n=(m&G.BRANCH_LENGTH)>>7;if(n===0){if(e.charCodeAt(h)!==t)break trie;i+=1}else{let a=e.charCodeAt(h)-t;if(a>>>0>=n)break trie;let o=r[i+1+a];if(o===0)break trie;i=i+n+o&65535}if(m=r[i],h+=1,h>=a)break trie}if((m&(G.VALUE_LENGTH|G.FLAG13))===G.FLAG13){let t=(m&G.BRANCH_LENGTH)>>7;if(e.charCodeAt(h)!==(m&G.JUMP_TABLE))break;h+=1;let n=t-1,a=i+1,o=0;for(;o+1<n;o+=2){let t=r[a];if(e.charCodeAt(h)!==(t&255)||(h+=1,e.charCodeAt(h)!==(t>>8&255)))break trie;h+=1,a+=1}if(o<n){if(e.charCodeAt(h)!==(r[a]&255))break;h+=1}i+=1+(t>>1),m=r[i];continue}let n=m>>>14,l=e.charCodeAt(h);if(n!==0){if(l===K.SEMI){f=h-c+1,p=n===1?String.fromCharCode(m&G.VALUE_MASK):Oo(r,i,n);break}if(!t&&(m&G.FLAG13)===0&&(f=h-c,o=i,s=n),n===1)break}let u=Do(r,m,i+(n||1),l);if(u<0)break;i=u,m=r[i],h+=1}if(p===``){let e=m>>>14;e!==0&&!t&&(m&G.FLAG13)===0&&(f=h-c,o=i,s=e),f>0&&(p=Oo(r,o,s))}}else f=0,p=``;f===0||n&&d!==K.NUM&&e.charCodeAt(c+f-1)!==K.SEMI&&c+f<a&&wo(e.charCodeAt(c+f))?i=c:(o<i&&(s+=e.slice(o,i)),s+=p,i=o=c+f),e.charCodeAt(i)!==K.AMP&&(i=e.indexOf(`&`,i))}while(i>=0);return s+e.slice(o)}function jo(e){return Ao(e,!0,!1)}var Mo=class{src_Any=no.source;src_Cc=ro.source;src_Z=so.source;src_P=ao.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join(`|`);src_ZCc=[this.src_Z,this.src_Cc].join(`|`);cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),i=this.escapeRE(t),a=`(?:(?!${this.src_ZCc}|${r}|${i}).)`,o=`${r}${a}{0,1000}${i}`;for(let e=2;e<=n;e++)o=`${r}(?:${a}|${o}){0,1000}${i}`;return o}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=RegExp(`(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])`)}get_ipv6_addr(){let e=`[0-9A-Fa-f]{1,4}`,t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=RegExp(`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`)}get_host_terminator(){return this.cache.src_host_terminator??=RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=RegExp(`(?:[/?#](?:${this.nestedPairRE(`[`,`]`)}|${this.nestedPairRE(`(`,`)`)}|${this.nestedPairRE(`{`,`}`)}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts[`---`]?`\\-(?!--(?:[^-]|$))(?:-{0,19})|`:`\\-{1,20}|`)+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=RegExp(`xn--[a-z0-9\\-]{1,59}`)}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join(`|`);return this.cache.tld=RegExp(`${e||`$#none#$`}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=RegExp(`(?:`+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=RegExp(`(?:`+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=RegExp(`(?:`+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=RegExp(`(?:`+(this.opts.fuzzyIP?this.get_ipv4_addr().source+`|`:``)+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=RegExp(`(?:`+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=RegExp(`(?:`+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=RegExp(``)}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=RegExp(`@${this.get_fuzzy_mail_host().source}`,`ig`)}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${this.src_ZPCc}))(?:(?![$+<=>^\`|\uff5c])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,`ig`)}get_http_validator(){return this.cache.http_validator??=RegExp(`\\/\\/`+(this.opts.urlAuth?this.get_auth().source:``)+this.get_url_host_port().source+this.get_path().source,`iy`)}get_relative_proto_validator(){return this.cache.relative_proto_validator??=RegExp((this.opts.urlAuth?this.get_auth().source:``)+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,`iy`)}get_mail_name_validator(){return this.cache.mail_name_validator??=RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,`iy`)}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join(`|`))}get_schema_search(){return this.cache.schema_search??=RegExp(`(^|(?!_)(?:[><\uff5c]|${this.src_ZPCc}))(${this.get_schema_names().source})`,`ig`)}get_schema_at_start(){return this.cache.schema_at_start??=RegExp(`^${this.get_schema_search().source}`,`i`)}},No={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let i=r.exec(e);return i?i[0].length:0},normalize:(e,t)=>t.normalize(e)},Po={"http:":No,"https:":No,"ftp:":No,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let i=r.exec(e);return i?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:i[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let i=r.exec(e);return i?i[0].length:0},normalize:(e,t)=>t.normalize(e)}},Fo=`a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw`,Io=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`;function Lo(){let e=Io.split(`|`);return Fo.split(`|`).forEach(t=>{let n=t.indexOf(`:`),r=t.slice(0,n);for(let i of t.slice(n+1))e.push(r+i)}),e}var Ro={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:Lo(),urlAuth:!1,maxLength:1e4},zo=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}},Bo=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...Ro,...n},this.__schemas__={...Po},this.re=t||new Mo,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(e,t)=>t.normalize(e),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__[`http:`]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__[`mailto:`]&&e.indexOf(`@`)>=0){let n=this.re.get_fuzzy_mail_host_search(),r=this.re.get_mail_name_validator();for(n.lastIndex=0;(t=n.exec(e))!==null;){let n=e.slice(Math.max(0,t.index-65),t.index);if(r.test(n))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){let t=[],n=this.re.get_schema_search(),r,i,a,o,s,c,l=!1,u=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__[`http:`]&&(r=this.re.get_fuzzy_link_search(),r.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__[`mailto:`]&&(i=this.re.get_fuzzy_mail_host_search(),i.lastIndex=0,a=this.re.get_mail_name_validator());;){let p=Math.max(f-1,0);if(i&&a&&!d&&(!s||s.index<f))for(i.lastIndex<p&&(i.lastIndex=p);;){let t=i.exec(e);if(!t){d=!0,s=void 0;break}let n=a.exec(e.slice(Math.max(0,t.index-65),t.index));if(n){if(s={schema:`mailto:`,index:t.index-n[1].length,lastIndex:t.index+t[0].length},s.index>=f)break;i.lastIndex<p&&(i.lastIndex=p)}}if(r&&!u&&(!o||o.index<f))for(r.lastIndex<p&&(r.lastIndex=p);;){let t=r.exec(e);if(!t){u=!0,o=void 0;break}if(o={schema:``,index:t.index+t[1].length,lastIndex:t.index+t[0].length},o.index>=f)break;r.lastIndex<p&&(r.lastIndex=p)}let m=s;(!m||o&&(o.index<m.index||o.index===m.index&&o.lastIndex>m.lastIndex))&&(m=o);let h;if(!l)for(;;){if(!c){n.lastIndex<p&&(n.lastIndex=p);let t=n.exec(e);if(!t){l=!0;break}c={schema:t[2],index:t.index+t[1].length,lastIndex:t.index+t[0].length}}if(c.index<f){c=void 0;continue}if(m&&c.index>m.index)break;let t=c;c=void 0;let r=this.testSchemaAt(e,t.schema,t.lastIndex);if(r){h={schema:t.schema,index:t.index,lastIndex:t.lastIndex+r};break}}let g=h;if((!g||s&&(s.index<g.index||s.index===g.index&&s.lastIndex>g.lastIndex))&&(g=s),(!g||o&&(o.index<g.index||o.index===g.index&&o.lastIndex>g.lastIndex))&&(g=o),!g)break;g===s?s=void 0:g===o&&(o=void 0);let _=new zo(e,g.schema,g.index,g.lastIndex);_.schema?this.__schemas__[_.schema].normalize(_,this):this.normalize(_),t.push(_),f=g.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new zo(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},Vo=2147483647,Ho=36,Uo=1,Wo=26,Go=38,Ko=700,qo=72,Jo=128,Yo=`-`,Xo=/^xn--/,Zo=/[^\0-\x7F]/,Qo=/[\x2E\u3002\uFF0E\uFF61]/g,$o={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},es=35,q=Math.floor,ts=String.fromCharCode;function ns(e){throw RangeError($o[e])}function rs(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function is(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(Qo,`.`);let i=rs(e.split(`.`),t).join(`.`);return r+i}function as(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var os=e=>String.fromCodePoint(...e),ss=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ho},cs=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ls=function(e,t,n){let r=0;for(e=n?q(e/Ko):e>>1,e+=q(e/t);e>455;r+=Ho)e=q(e/es);return q(r+36*e/(e+Go))},us=function(e){let t=[],n=e.length,r=0,i=Jo,a=qo,o=e.lastIndexOf(Yo);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&ns(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=Ho;;i+=Ho){s>=n&&ns(`invalid-input`);let o=ss(e.charCodeAt(s++));o>=Ho&&ns(`invalid-input`),o>q((Vo-r)/t)&&ns(`overflow`),r+=o*t;let c=i<=a?Uo:i>=a+Wo?Wo:i-a;if(o<c)break;let l=Ho-c;t>q(Vo/l)&&ns(`overflow`),t*=l}let c=t.length+1;a=ls(r-o,c,o==0),q(r/c)>Vo-i&&ns(`overflow`),i+=q(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},ds=function(e){let t=[];e=as(e);let n=e.length,r=Jo,i=0,a=qo;for(let n of e)n<128&&t.push(ts(n));let o=t.length,s=o;for(o&&t.push(Yo);s<n;){let n=Vo;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>q((Vo-i)/c)&&ns(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>Vo&&ns(`overflow`),n===r){let e=i;for(let n=Ho;;n+=Ho){let r=n<=a?Uo:n>=a+Wo?Wo:n-a;if(e<r)break;let i=e-r,o=Ho-r;t.push(ts(cs(r+i%o,0))),e=q(i/o)}t.push(ts(cs(e,0))),a=ls(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},fs={version:`2.3.1`,ucs2:{decode:as,encode:os},decode:us,encode:ds,toASCII:function(e){return is(e,function(e){return Zo.test(e)?`xn--`+ds(e):e})},toUnicode:function(e){return is(e,function(e){return Xo.test(e)?us(e.slice(4).toLowerCase()):e})}},ps=Object.defineProperty,ms=(e,t)=>{let n={};for(var r in e)ps(n,r,{get:e[r],enumerable:!0});return t||ps(n,Symbol.toStringTag,{value:`Module`}),n},hs=ms({arrayReplaceAt:()=>_s,asciiTrim:()=>zs,callable:()=>gs,escapeHtml:()=>As,escapeRE:()=>Ms,fromCodePoint:()=>ys,isMdAsciiPunct:()=>Is,isPunctChar:()=>Ps,isPunctCharCode:()=>Fs,isSpace:()=>J,isValidEntityCode:()=>vs,isWhiteSpace:()=>Ns,lib:()=>Bs,normalizeReference:()=>Ls,unescapeAll:()=>Ts,unescapeMd:()=>ws});function gs(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function _s(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function vs(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ys(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var bs=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,xs=RegExp(`${bs.source}|&([a-z#][a-z0-9]{1,31});`,`gi`),Ss=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Cs(e,t){if(t.charCodeAt(0)===35&&Ss.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return vs(n)?ys(n):e}let n=jo(e);return n===e?e:n}function ws(e){return e.indexOf(`\\`)<0?e:e.replace(bs,`$1`)}function Ts(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(xs,function(e,t,n){return t||Cs(e,n)})}var Es=/[&<>"]/,Ds=/[&<>"]/g,Os={"&":`&`,"<":`<`,">":`>`,'"':`"`};function ks(e){return Os[e]}function As(e){return Es.test(e)?e.replace(Ds,ks):e}var js=/[.?*+^$[\]\\(){}|-]/g;function Ms(e){return e.replace(js,`\\$&`)}function J(e){switch(e){case 9:case 32:return!0}return!1}function Ns(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ps(e){return ao.test(e)||oo.test(e)}function Fs(e){return Ps(ys(e))}function Is(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ls(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function Rs(e){return e===32||e===9||e===10||e===13}function zs(e){let t=0;for(;t<e.length&&Rs(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Rs(e.charCodeAt(n));n--);return e.slice(t,n+1)}var Bs={mdurl:eo,ucmicro:to};function Vs(e,t,n){let r,i,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function Hs(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=Ts(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32){i++;continue}i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=Ts(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function Us(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=Ts(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=Ts(e.slice(t,a)),o}var Ws=ms({parseLinkDestination:()=>Hs,parseLinkLabel:()=>Vs,parseLinkTitle:()=>Us});function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Gs(e)}function Ks(e,t){if(Gs(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Gs(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function qs(e){var t=Ks(e,`string`);return Gs(t)==`symbol`?t:t+``}function Y(e,t,n){return(t=qs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Js=class{constructor(e,t,n){Y(this,`map`,null),Y(this,`level`,0),Y(this,`children`,null),Y(this,`content`,``),Y(this,`markup`,``),Y(this,`info`,``),Y(this,`block`,!1),Y(this,`hidden`,!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},Ys=class{constructor(){Y(this,`__rules__`,[]),Y(this,`__cache__`,null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(t=>{t&&e.add(t)})}),this.__cache__=Object.create(null),this.__cache__[``]=[],this.__rules__.forEach(e=>{e.enabled&&this.__cache__[``].push(e.fn)}),e.forEach(e=>{this.__cache__[e]=[],this.__rules__.forEach(t=>{t.enabled&&t.alt.indexOf(e)>=0&&this.__cache__[e].push(t.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let i=this.__find__(e);if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let i=this.__find__(e);if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(e=>{let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[r].enabled=!0,n.push(e)}),this.__cache__=null,n}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(e=>{e.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(e=>{let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[r].enabled=!1,n.push(e)}),this.__cache__=null,n}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},X={};X.code_inline=function(e,t,n,r,i){let a=e[t];return`<code${i.renderAttrs(a)}>${As(a.content)}</code>`},X.code_block=function(e,t,n,r,i){let a=e[t];return`<pre${i.renderAttrs(a)}><code>${As(e[t].content)}</code></pre>\n`},X.fence=function(e,t,n,r,i){let a=e[t],o=a.info?Ts(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}let l;if(l=n.highlight&&n.highlight(a.content,s,c)||As(a.content),l.indexOf(`<pre`)===0)return l+`
|
|
200
|
+
`;if(o){let e=a.attrIndex(`class`),t=a.attrs?a.attrs.slice():[];e<0?t.push([`class`,`${n.langPrefix}${s}`]):(t[e]=[t[e][0],t[e][1]],t[e][1]+=` ${n.langPrefix}${s}`);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${l}</code></pre>\n`},X.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},X.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
201
|
+
`:`<br>
|
|
202
|
+
`},X.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
203
|
+
`:`<br>
|
|
204
|
+
`:`
|
|
205
|
+
`},X.text=function(e,t){return As(e[t].content)},X.html_block=function(e,t){return e[t].content},X.html_inline=function(e,t){return e[t].content};var Xs=class{constructor(){Y(this,`rules`,Object.assign({},X))}renderAttrs(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` ${As(e.attrs[t][0])}="${As(String(e.attrs[t][1]))}"`;return r}renderToken(e,t,n){let r=e[t],i=``;if(r.hidden)return``;let a=t-1;for(;a>=0&&e[a].hidden&&e[a].nesting===0;)a--;r.block&&r.nesting!==-1&&a>=0&&e[a].hidden&&e[a].nesting===-1&&(i+=`
|
|
206
|
+
`),i+=(r.nesting===-1?`</`:`<`)+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=` /`);let o=!1;if(r.block&&(o=!0,r.nesting===1)){let n=t+1;for(;n<e.length&&e[n].hidden&&e[n].nesting===0;)n++;if(n<e.length){let t=e[n];(t.type===`inline`||t.hidden||t.nesting===-1&&t.tag===r.tag)&&(o=!1)}}return i+=o?`>
|
|
207
|
+
`:`>`,i}renderInline(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r}renderInlineAsText(e,t,n){let r=``;for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case`text`:case`code_inline`:r+=e[i].content;break;case`image`:r+=this.renderInlineAsText(e[i].children,t,n);break;case`html_inline`:case`html_block`:r+=e[i].content;break;case`softbreak`:case`hardbreak`:r+=`
|
|
208
|
+
`}return r}render(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;o===`inline`?r+=this.renderInline(e[a].children,t,n):i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r}},Zs=class{constructor(e,t,n){Y(this,`tokens`,[]),Y(this,`inlineMode`,!1),Y(this,`Token`,Js),this.src=e,this.env=n,this.md=t}},Qs=/\r\n?/g,$s=/\0/g;function ec(e){let t;t=e.src.replace(Qs,`
|
|
209
|
+
`),t=t.replace($s,`�`),e.src=t}function tc(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function nc(e){let t=e.tokens,n=0;for(let e=0;e<t.length;e++)t[e].type!==`reference_definition`&&(e!==n&&(t[n]=t[e]),n++);t.length!==n&&(t.length=n)}function rc(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function ic(e){return/^<a[>\s]/i.test(e)}function ac(e){return/^<\/a\s*>/i.test(e)}function oc(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.test(t[n].content))continue;let r=t[n].children,i=[],a=0;for(let t=r.length-1;t>=0;t--){let n=r[t];if(n.type===`link_close`){for(t--;r[t].level!==n.level&&r[t].type!==`link_open`;)t--;continue}if(n.type===`html_inline`&&(ic(n.content)&&a>0&&a--,ac(n.content)&&a++),!(a>0)&&n.type===`text`&&e.md.linkify.test(n.content)){let a=n.content,o=e.md.linkify.match(a),s=[],c=n.level,l=0;o.length>0&&o[0].index===0&&t>0&&r[t-1].type===`text_special`&&(o=o.slice(1));for(let t=0;t<o.length;t++){let n=o[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let i=o[t].text;i=o[t].schema?o[t].schema===`mailto:`&&!/^mailto:/i.test(i)?e.md.normalizeLinkText(`mailto:${i}`).replace(/^mailto:/,``):e.md.normalizeLinkText(i):e.md.normalizeLinkText(`http://${i}`).replace(/^http:\/\//,``);let u=o[t].index;if(u>l){let t=new e.Token(`text`,``,0);t.content=a.slice(l,u),t.level=c,s.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=c++,d.markup=`linkify`,d.info=`auto`,s.push(d);let f=new e.Token(`text`,``,0);f.content=i,f.level=c,s.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--c,p.markup=`linkify`,p.info=`auto`,s.push(p),l=o[t].lastIndex}if(l<a.length){let t=new e.Token(`text`,``,0);t.content=a.slice(l),t.level=c,s.push(t)}i.push({index:t,nodes:s})}}if(i.length>0){let e=r.length;for(let t of i)e+=t.nodes.length-1;let a=Array(e),o=0,s=0;i.reverse();for(let e=0;e<r.length;e++){let t=i[o];if(t?.index===e){for(let e of t.nodes)a[s++]=e;o++}else a[s++]=r[e]}t[n].children=a}}}var sc=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,cc=/\((c|tm|r)\)/i,lc=/\((c|tm|r)\)/gi,uc={c:`©`,r:`®`,tm:`™`};function dc(e,t){return uc[t.toLowerCase()]}function fc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(lc,dc)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function pc(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&sc.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function mc(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(cc.test(e.tokens[t].content)&&fc(e.tokens[t].children),sc.test(e.tokens[t].content)&&pc(e.tokens[t].children))}var hc=/['"]/,gc=/['"]/g,_c=`’`,vc=1e3;function yc(e,t,n){for(;e.length>n;){let n=e.pop();n.isSingleQuote?t.single=n.prevSameQuoteIdx:t.double=n.prevSameQuoteIdx}}function bc(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function xc(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function Sc(e,t){let n,r=[],i={single:-1,double:-1},a={};for(let o=0;o<e.length;o++){let s=e[o],c=e[o].level;for(n=r.length-1;n>=0&&!(r[n].level<=c);n--);if(yc(r,i,n+1),s.type!==`text`)continue;let l=s.content,u=0,d=l.length;OUTER:for(;u<d;){gc.lastIndex=u;let s=gc.exec(l);if(!s)break;let f=!0,p=!0;u=s.index+1;let m=s[0]===`'`,h=32;if(s.index-1>=0)h=l.charCodeAt(s.index-1);else for(n=o-1;n>=0&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let g=32;if(u<d)g=l.charCodeAt(u);else for(n=o+1;n<e.length&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n++)if(e[n].content){g=e[n].content.charCodeAt(0);break}let _=Is(h)||Fs(h),v=Is(g)||Fs(g),y=Ns(h),b=Ns(g);if(b?f=!1:v&&(y||_||(f=!1)),y?p=!1:_&&(b||v||(p=!1)),g===34&&s[0]===`"`&&h>=48&&h<=57&&(p=f=!1),f&&p&&(f=_,p=v),!f&&!p){m&&bc(a,o,s.index,_c);continue}if(p&&(n=m?i.single:i.double,n>=0&&r[n].level===c)){let e=r[n],c,l;m?(c=t.md.options.quotes[2],l=t.md.options.quotes[3]):(c=t.md.options.quotes[0],l=t.md.options.quotes[1]),bc(a,o,s.index,l),bc(a,e.tokenIdx,e.contentPos,c),yc(r,i,n);continue OUTER}if(f){if(r.length>=vc)return;r.push({tokenIdx:o,contentPos:s.index,isSingleQuote:m,level:c,prevSameQuoteIdx:m?i.single:i.double}),m?i.single=r.length-1:i.double=r.length-1}else p&&m&&bc(a,o,s.index,_c)}}Object.keys(a).forEach(function(t){let n=Number(t);e[n].content=xc(e[n].content,a[t])})}function Cc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&hc.test(e.tokens[t].content)&&Sc(e.tokens[t].children,e)}function wc(e){let t,n,r=e.length;for(t=0;t<r;t++)e[t].type===`text_special`&&(e[t].type=`text`);for(t=n=0;t<r;t++)e[t].type===`text`&&t+1<r&&e[t+1].type===`text`?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}function Tc(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`),i[t].children&&wc(i[t].children);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var Ec=[[`normalize`,ec],[`block`,tc],[`strip_references`,nc],[`inline`,rc],[`linkify`,oc],[`replacements`,mc],[`smartquotes`,Cc],[`text_join`,Tc]],Dc=class{constructor(){Y(this,`ruler`,new Ys),Y(this,`State`,Zs);for(let e=0;e<Ec.length;e++)this.ruler.push(Ec[e][0],Ec[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}},Oc=class{constructor(e,t,n,r){Y(this,`bMarks`,[]),Y(this,`eMarks`,[]),Y(this,`tShift`,[]),Y(this,`sCount`,[]),Y(this,`bsCount`,[]),Y(this,`blkIndent`,0),Y(this,`line`,0),Y(this,`lineMax`,0),Y(this,`tight`,!1),Y(this,`listIndent`,-1),Y(this,`parentType`,`root`),Y(this,`level`,0),Y(this,`Token`,Js),this.src=e,this.md=t,this.env=n,this.tokens=r;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o){if(J(s)){n++,s===9?r+=4-r%4:r++;continue}o=!0}(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new Js(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&J(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!J(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(J(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)}},kc=65536;function Ac(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function jc(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function Mc(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!J(s)||o===45&&J(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!J(t))return!1;a++}let c=Ac(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=Ac(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=jc(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=Ac(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=jc(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>kc))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function Nc(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
210
|
+
`,a.map=[t,e.line],!0}function Pc(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function Fc(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(J(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function Ic(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!J(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function Lc(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!J(e.src.charCodeAt(r))?-1:r}function Rc(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!J(a))?-1:i}function zc(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Bc(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=Rc(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=Lc(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let ee=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){ee=!0;break}if(ee)break;if(d){if(p=Rc(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=Lc(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&zc(e,h),!0}function Vc(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!J(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!J(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&J(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&J(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=Ls(c.slice(1,l));if(!_)return!1;if(r)return!0;e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d});let v=e.push(`reference_definition`,``,0);v.map=[t,o],v.hidden=!0;let y=Object.create(null);return y.label=_,v.meta=y,e.line=o,!0}var Hc=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Uc=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Wc=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,Gc=RegExp(`^(?:${Uc}|${Wc}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Kc=RegExp(`^(?:${Uc}|${Wc})`),qc=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${Hc.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${Kc.source}\\s*$`),/^$/,!1]];function Jc(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<qc.length&&!qc[s][0].test(o);s++);if(s===qc.length)return!1;if(r)return qc[s][2];let c=t+1,l=qc[s][1].test(``);if(!qc[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),qc[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function Yc(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!J(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&J(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h${s}`,1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=zs(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h${s}`,-1);return d.markup=`########`.slice(0,s),!0}function Xc(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=zs(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h${a}`,1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h${a}`,-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function Zc(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=zs(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var Qc=[[`table`,Mc,[`paragraph`,`reference`]],[`code`,Nc],[`fence`,Pc,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,Fc,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,Ic,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,Bc,[`paragraph`,`reference`,`blockquote`]],[`reference`,Vc],[`html_block`,Jc,[`paragraph`,`reference`,`blockquote`]],[`heading`,Yc,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Xc],[`paragraph`,Zc]],$c=class{constructor(){Y(this,`ruler`,new Ys),Y(this,`State`,Oc);for(let e=0;e<Qc.length;e++)this.ruler.push(Qc[e][0],Qc[e][1],{alt:(Qc[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}}parse(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)}},el=class{constructor(e,t,n,r){Y(this,`pos`,0),Y(this,`level`,0),Y(this,`pending`,``),Y(this,`pendingLevel`,0),Y(this,`cache`,{}),Y(this,`backticks`,{}),Y(this,`backticksScanned`,!1),Y(this,`linkLevel`,0),Y(this,`delimiters`,[]),Y(this,`_prev_delimiters`,[]),Y(this,`Token`,Js),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new Js(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e}push(e,t,n){this.pending&&this.pushPending();let r=new Js(e,t,n),i;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=Is(i)||Fs(i),l=Is(s)||Fs(s),u=Ns(i),d=Ns(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}}};function tl(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function nl(e,t){let n=e.pos;for(;n<e.posMax&&!tl(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}function rl(e){return e>=65&&e<=90||e>=97&&e<=122}function il(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function al(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=n-Math.min(10,e.pending.length,n),a=n;for(;a>i&&il(e.src.charCodeAt(a-1));)a--;if(a===n||!rl(e.src.charCodeAt(a)))return!1;let o=n-a,s=e.md.linkify.matchAtStart(e.src.slice(a));if(!s)return!1;let c=s.url;if(c.length<=o)return!1;let l=c.length;for(;l>0&&c.charCodeAt(l-1)===42;)l--;l!==c.length&&(c=c.slice(0,l));let u=e.md.normalizeLink(c);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,u]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(c);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=c.length-o,!0}function ol(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t){if(r>=0&&e.pending.charCodeAt(r)===32){if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0)}else e.push(`softbreak`,`br`,0)}for(n++;n<i&&J(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var sl=[];for(let e=0;e<256;e++)sl.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){sl[e.charCodeAt(0)]=1});function cl(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),J(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);t.content=i<256&&sl[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function ll(e){let t={},n=0;for(;(n=e.indexOf("`",n))!==-1;){let r=n;for(;e.charCodeAt(++n)===96;);t[n-r]=r}return t}function ul(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=e.posMax,i=n+1;for(;i<r&&e.src.charCodeAt(i)===96;)i++;let a=e.src.slice(n,i),o=a.length;if(e.backticksScanned||=(e.backticks=ll(e.src),!0),(e.backticks[o]??-1)>=i){let n=i,s;for(;(s=e.src.indexOf("`",n))!==-1&&s<r;){for(n=s+1;e.src.charCodeAt(n)===96;)n++;if(n>r)break;if(n-s===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a;let n=e.src.slice(i,s).replace(/\n/g,` `);n.startsWith(` `)&&n.endsWith(` `)&&/[^ ]/.test(n)&&(n=n.slice(1,-1)),t.content=n}return e.pos=n,!0}}}return t||(e.pending+=a),e.pos=i,!0}function dl(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function fl(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function pl(e){let t=e.tokens_meta,n=e.tokens_meta.length;fl(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&fl(e,n)}}var ml={tokenize:dl,postProcess:pl};function hl(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function gl(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function _l(e){let t=e.tokens_meta,n=e.tokens_meta.length;gl(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&gl(e,n)}}var vl={tokenize:hl,postProcess:_l};function yl(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),J(n)||n===10);m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),J(n)||n===10);m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),J(n)||n===10);m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),r=Ls(r),a=e.env.references[r],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];if(t.attrs=n,s&&n.push([`title`,s]),r){let e=Object.create(null);e.label=r,t.meta=e}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function bl(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),J(n)||n===10);a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),J(n)||n===10);a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),J(n)||n===10);a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),i=Ls(i),o=e.env.references[i],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),a=[[`src`,u],[`alt`,``]];if(n.attrs=a,n.children=t,n.content=r,c&&a.push([`title`,c]),i){let e=Object.create(null);e.label=i,n.meta=e}}return e.pos=a,e.posMax=f,!0}var xl=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Sl=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Cl(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Sl.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(xl.test(a)){let n=e.md.normalizeLink(`mailto:${a}`);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function wl(e){return/^<a[>\s]/i.test(e)}function Tl(e){return/^<\/a\s*>/i.test(e)}function El(e){let t=e|32;return t>=97&&t<=122}function Dl(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!El(i))return!1;let a=e.src.slice(r).match(Gc);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],wl(t.content)&&e.linkLevel++,Tl(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Ol=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,kl=/^&([a-z][a-z0-9]{1,31});/i;function Al(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Ol);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=vs(t)?ys(t):ys(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(kl);if(r){let n=jo(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function jl(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function Ml(e){let t=e.tokens_meta,n=e.tokens_meta.length;jl(e.delimiters);for(let e=0;e<n;e++){let n=t[e]?.delimiters;n&&jl(n)}}function Nl(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var Pl=[[`text`,nl],[`linkify`,al],[`newline`,ol],[`escape`,cl],[`backticks`,ul],[`strikethrough`,ml.tokenize],[`emphasis`,vl.tokenize],[`link`,yl],[`image`,bl],[`autolink`,Cl],[`html_inline`,Dl],[`entity`,Al]],Fl=[[`balance_pairs`,Ml],[`strikethrough`,ml.postProcess],[`emphasis`,vl.postProcess],[`fragments_join`,Nl]],Il=class{constructor(){Y(this,`ruler`,new Ys),Y(this,`ruler2`,new Ys),Y(this,`State`,el);for(let e=0;e<Pl.length;e++)this.ruler.push(Pl[e][0],Pl[e][1]);for(let e=0;e<Fl.length;e++)this.ruler2.push(Fl[e][0],Fl[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos}tokenize(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)}},Ll={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`strip_references`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},Rl=/^(vbscript|javascript|file|data):/,zl=/^data:image\/(gif|png|jpeg|webp);/,Bl=[`http:`,`https:`,`mailto:`],Z=class{validateLink(e){let t=e.trim().toLowerCase();return!Rl.test(t)||zl.test(t)}normalizeLink(e){let t=$a(e,!0);if(t.hostname&&(!t.protocol||Bl.indexOf(t.protocol)>=0))try{t.hostname=fs.toASCII(t.hostname)}catch{}return t.auth&&=U(t.auth),t.hostname&&=U(t.hostname),t.pathname&&=U(t.pathname),t.search&&=U(t.search),t.hash&&=U(t.hash),Va(t)}normalizeLinkText(e){let t=$a(e,!0);if(t.hostname&&(!t.protocol||Bl.indexOf(t.protocol)>=0))try{t.hostname=fs.toUnicode(t.hostname)}catch{}return Ra(Va(t),Ra.defaultChars+`%`)}constructor(...e){Y(this,`inline`,new Il),Y(this,`block`,new $c),Y(this,`core`,new Dc),Y(this,`renderer`,new Xs),Y(this,`linkify`,new Bo),Y(this,`utils`,hs),Y(this,`helpers`,Object.assign({},Ws));let[t,n]=e;typeof t==`string`?(this.configure(t),n&&this.set(n)):(this.configure(`default`),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==`string`){let n=e;if(t=Ll[n],!t)throw Error(`Wrong 'markdown-it' preset "${n}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});let n=t.components;if(n){[`core`,`block`,`inline`].forEach(e=>{let t=n[e]?.rules;t&&this[e].ruler.enableOnly(t)});let e=n.inline?.rules2;e&&this.inline.ruler2.enableOnly(e)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(t=>{n=n.concat(this[t].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(e=>n.indexOf(e)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};Y(Z,`Token`,Js),Y(Z,`Ruler`,Ys),Y(Z,`Renderer`,Xs),Y(Z,`ParserCore`,Dc),Y(Z,`StateCore`,Zs),Y(Z,`ParserBlock`,$c),Y(Z,`StateBlock`,Oc),Y(Z,`ParserInline`,Il),Y(Z,`StateInline`,el);var Vl=gs(Z),Hl={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ul=e=>(...t)=>({_$litDirective$:e,values:t}),Wl=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Gl=class extends Wl{constructor(e){if(super(e),this.it=w,e.type!==Hl.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===Te)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Gl.directiveName=`unsafeHTML`,Gl.resultType=1;var Kl=Ul(Gl),ql=new Vl({html:!1,linkify:!1,typographer:!1,breaks:!1}),Jl=ql.renderer.rules.link_open??((e,t,n,r,i)=>i.renderToken(e,t,n));ql.renderer.rules.link_open=(e,t,n,r,i)=>{let a=String(e[t]?.attrGet(`href`)??``);return/^[a-z][a-z0-9+.-]*:/i.test(a)&&!a.startsWith(`#`)&&(e[t].attrSet(`target`,`_blank`),e[t].attrSet(`rel`,`noopener`)),Jl(e,t,n,r,i)};function Yl(e,t=`md`){return e===void 0||e.trim()===``?w:C`<div class=${t}>${Kl(ql.render(e))}</div>`}function Q(e){return e===void 0||e.trim()===``?w:C`${Kl(ql.renderInline(e))}`}var Xl=l`
|
|
211
|
+
.info__desc {
|
|
212
|
+
margin-bottom: 20px;
|
|
213
|
+
padding: 14px 18px;
|
|
214
|
+
border: 1px solid var(--_line);
|
|
215
|
+
border-radius: var(--_radius);
|
|
216
|
+
}
|
|
217
|
+
.info__desc .md p {
|
|
218
|
+
font-size: 15px;
|
|
219
|
+
line-height: 1.65;
|
|
220
|
+
color: var(--_ink-2);
|
|
221
|
+
}
|
|
222
|
+
`;function Zl(e,t){let n=[];if(e.tags.length>0&&n.push([`Tags`,C`<ul class="chips">
|
|
223
|
+
${e.tags.map(e=>Fa(e))}
|
|
224
|
+
</ul>`]),e.contact){let t=e.contact;n.push([`Contact`,C`${t.name??w}${t.name&&(t.email||t.url)?` · `:w}${t.email?C`<a href="mailto:${t.email}">${t.email}</a>`:w}${t.email&&t.url?` · `:w}${t.url?C`<a href=${t.url} target="_blank" rel="noopener">${t.url}</a>`:w}`])}return e.license&&n.push([`License`,e.license.url?C`<a href=${e.license.url} target="_blank" rel="noopener">${e.license.name}</a>`:C`${e.license.name}`]),e.termsOfService&&n.push([`Terms of service`,C`<a href=${e.termsOfService} target="_blank" rel="noopener">${e.termsOfService}</a>`]),e.externalDocs&&n.push([`Documentation`,C`<a href=${e.externalDocs.url} target="_blank" rel="noopener">${e.externalDocs.description??e.externalDocs.url}</a>`]),e.defaultContentType&&n.push([`Default content type`,C`<code>${e.defaultContentType}</code>`]),C`
|
|
225
|
+
<section class="info" aria-labelledby=${t}>
|
|
226
|
+
<h2 class="section-title visually-hidden" id=${t} tabindex="-1">${e.title}</h2>
|
|
227
|
+
${e.description?C`<div class="info__desc">${Yl(e.description)}</div>`:w}
|
|
228
|
+
${n.length>0?C`<dl class="facts">${n.map(([e,t])=>C`<dt>${e}</dt><dd>${t}</dd>`)}</dl>`:w}
|
|
229
|
+
</section>
|
|
230
|
+
`}var Ql=l`
|
|
231
|
+
.block {
|
|
232
|
+
margin-top: 28px;
|
|
233
|
+
}
|
|
234
|
+
.block__title {
|
|
235
|
+
margin: 0 0 10px;
|
|
236
|
+
font: 500 11px/1 var(--_font-body);
|
|
237
|
+
text-transform: uppercase;
|
|
238
|
+
letter-spacing: 0.08em;
|
|
239
|
+
color: var(--_muted);
|
|
240
|
+
}
|
|
241
|
+
.block__title:focus-visible {
|
|
242
|
+
outline: 2px solid var(--_primary);
|
|
243
|
+
outline-offset: 4px;
|
|
244
|
+
}
|
|
245
|
+
.params {
|
|
246
|
+
display: grid;
|
|
247
|
+
grid-template-columns: 160px minmax(0, 1fr);
|
|
248
|
+
gap: 12px 20px;
|
|
249
|
+
margin: 0;
|
|
250
|
+
padding: 14px 16px;
|
|
251
|
+
border: 1px solid var(--_line);
|
|
252
|
+
border-radius: var(--_radius);
|
|
253
|
+
background: var(--_surface);
|
|
254
|
+
}
|
|
255
|
+
.params dt {
|
|
256
|
+
display: grid;
|
|
257
|
+
gap: 2px;
|
|
258
|
+
align-content: start;
|
|
259
|
+
}
|
|
260
|
+
.params__name {
|
|
261
|
+
font: 500 13px/1.5 var(--_font-mono);
|
|
262
|
+
color: var(--_primary-text);
|
|
263
|
+
overflow-wrap: anywhere;
|
|
264
|
+
}
|
|
265
|
+
.params__schema {
|
|
266
|
+
font: 400 11.5px/1.5 var(--_font-mono);
|
|
267
|
+
color: var(--_muted);
|
|
268
|
+
}
|
|
269
|
+
.params dd {
|
|
270
|
+
margin: 0;
|
|
271
|
+
color: var(--_ink-2);
|
|
272
|
+
font-size: 13px;
|
|
273
|
+
}
|
|
274
|
+
.params__facts {
|
|
275
|
+
font: 400 11.5px/1.6 var(--_font-mono);
|
|
276
|
+
color: var(--_muted);
|
|
277
|
+
overflow-wrap: anywhere;
|
|
278
|
+
}
|
|
279
|
+
@container viewer (max-width: 699px) {
|
|
280
|
+
.params {
|
|
281
|
+
grid-template-columns: 1fr;
|
|
282
|
+
gap: 4px;
|
|
283
|
+
}
|
|
284
|
+
.params dd + dt {
|
|
285
|
+
margin-top: 12px;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
.chip__scope {
|
|
289
|
+
color: var(--_muted);
|
|
290
|
+
}
|
|
291
|
+
.chip__value {
|
|
292
|
+
color: var(--_ink);
|
|
293
|
+
}
|
|
294
|
+
/* Pill style: key and value in one pill; a described one becomes a full-width row. */
|
|
295
|
+
.chip__head {
|
|
296
|
+
display: inline-flex;
|
|
297
|
+
flex-wrap: wrap;
|
|
298
|
+
align-items: center;
|
|
299
|
+
gap: 6px;
|
|
300
|
+
min-width: 0;
|
|
301
|
+
}
|
|
302
|
+
.chip--row {
|
|
303
|
+
display: grid;
|
|
304
|
+
gap: 4px;
|
|
305
|
+
width: 100%;
|
|
306
|
+
padding: 10px 14px;
|
|
307
|
+
border-radius: var(--_radius-sm);
|
|
308
|
+
}
|
|
309
|
+
/* Split style (servers): the key in the pill, the value beside it. */
|
|
310
|
+
.binding {
|
|
311
|
+
display: flex;
|
|
312
|
+
flex-wrap: wrap;
|
|
313
|
+
align-items: center;
|
|
314
|
+
gap: 6px 10px;
|
|
315
|
+
min-width: 0;
|
|
316
|
+
max-width: 100%;
|
|
317
|
+
}
|
|
318
|
+
.binding__head {
|
|
319
|
+
display: inline-flex;
|
|
320
|
+
flex-wrap: wrap;
|
|
321
|
+
align-items: center;
|
|
322
|
+
gap: 6px 10px;
|
|
323
|
+
min-width: 0;
|
|
324
|
+
}
|
|
325
|
+
.binding .chip__value {
|
|
326
|
+
font-size: 13px;
|
|
327
|
+
color: var(--_ink);
|
|
328
|
+
overflow-wrap: anywhere;
|
|
329
|
+
}
|
|
330
|
+
.binding--described {
|
|
331
|
+
flex-direction: column;
|
|
332
|
+
align-items: flex-start;
|
|
333
|
+
width: 100%;
|
|
334
|
+
gap: 4px;
|
|
335
|
+
}
|
|
336
|
+
.chip__desc {
|
|
337
|
+
min-width: 0;
|
|
338
|
+
padding-left: 2px;
|
|
339
|
+
font-size: 12.5px;
|
|
340
|
+
line-height: 1.5;
|
|
341
|
+
color: var(--_ink-2);
|
|
342
|
+
overflow-wrap: anywhere;
|
|
343
|
+
}
|
|
344
|
+
.chip pre {
|
|
345
|
+
margin: 0;
|
|
346
|
+
font: 11.5px/1.4 var(--_font-mono);
|
|
347
|
+
white-space: pre-wrap;
|
|
348
|
+
overflow-wrap: anywhere;
|
|
349
|
+
max-width: 48ch;
|
|
350
|
+
}
|
|
351
|
+
.sec__id {
|
|
352
|
+
font: 500 12.5px/1.5 var(--_font-mono);
|
|
353
|
+
color: var(--_primary-text);
|
|
354
|
+
text-decoration: none;
|
|
355
|
+
}
|
|
356
|
+
.sec__id:hover,
|
|
357
|
+
.sec__id:focus-visible {
|
|
358
|
+
text-decoration: underline;
|
|
359
|
+
}
|
|
360
|
+
.sec--row {
|
|
361
|
+
justify-items: start;
|
|
362
|
+
gap: 8px;
|
|
363
|
+
}
|
|
364
|
+
.sec__pill {
|
|
365
|
+
background: var(--_bg);
|
|
366
|
+
}
|
|
367
|
+
/* Hierarchy: details indent under the pill, items indent under their group label. */
|
|
368
|
+
.sec__details {
|
|
369
|
+
display: grid;
|
|
370
|
+
gap: 6px;
|
|
371
|
+
width: 100%;
|
|
372
|
+
min-width: 0;
|
|
373
|
+
padding-left: 14px;
|
|
374
|
+
font-size: 12px;
|
|
375
|
+
}
|
|
376
|
+
.sec__details .chip__desc {
|
|
377
|
+
padding-left: 0;
|
|
378
|
+
}
|
|
379
|
+
.sec__list {
|
|
380
|
+
display: grid;
|
|
381
|
+
gap: 4px;
|
|
382
|
+
margin: 0;
|
|
383
|
+
padding: 0;
|
|
384
|
+
list-style: none;
|
|
385
|
+
color: var(--_ink);
|
|
386
|
+
}
|
|
387
|
+
.sec__list li {
|
|
388
|
+
min-width: 0;
|
|
389
|
+
overflow-wrap: anywhere;
|
|
390
|
+
}
|
|
391
|
+
.sec__list .sec__list {
|
|
392
|
+
margin-top: 4px;
|
|
393
|
+
padding-left: 14px;
|
|
394
|
+
}
|
|
395
|
+
.sec__list a {
|
|
396
|
+
color: var(--_primary-text);
|
|
397
|
+
}
|
|
398
|
+
.sec__pre {
|
|
399
|
+
margin: 2px 0 0;
|
|
400
|
+
padding: 8px 10px;
|
|
401
|
+
border: 1px solid var(--_line);
|
|
402
|
+
border-radius: var(--_radius-sm);
|
|
403
|
+
background: var(--_surface);
|
|
404
|
+
font: 11.5px/1.5 var(--_font-mono);
|
|
405
|
+
white-space: pre-wrap;
|
|
406
|
+
overflow-wrap: anywhere;
|
|
407
|
+
}
|
|
408
|
+
.sec__group {
|
|
409
|
+
display: grid;
|
|
410
|
+
gap: 4px;
|
|
411
|
+
}
|
|
412
|
+
.sec__label {
|
|
413
|
+
font: 400 12px/1.5 var(--_font-mono);
|
|
414
|
+
color: var(--_muted);
|
|
415
|
+
}
|
|
416
|
+
.sec__group .sec__list,
|
|
417
|
+
.sec__scopes {
|
|
418
|
+
padding-left: 14px;
|
|
419
|
+
}
|
|
420
|
+
.sec__scopes {
|
|
421
|
+
display: grid;
|
|
422
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
423
|
+
gap: 4px 14px;
|
|
424
|
+
margin: 0;
|
|
425
|
+
}
|
|
426
|
+
.sec__scopes dt {
|
|
427
|
+
color: var(--_ink);
|
|
428
|
+
}
|
|
429
|
+
.sec__scopes dd {
|
|
430
|
+
margin: 0;
|
|
431
|
+
min-width: 0;
|
|
432
|
+
color: var(--_ink-2);
|
|
433
|
+
overflow-wrap: anywhere;
|
|
434
|
+
}
|
|
435
|
+
@container viewer (max-width: 699px) {
|
|
436
|
+
.sec__scopes {
|
|
437
|
+
grid-template-columns: 1fr;
|
|
438
|
+
gap: 2px;
|
|
439
|
+
}
|
|
440
|
+
.sec__scopes dd {
|
|
441
|
+
margin-bottom: 6px;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
.reply {
|
|
445
|
+
padding: 14px 16px;
|
|
446
|
+
border: 1px solid var(--_line);
|
|
447
|
+
border-top: 3px solid var(--_secondary);
|
|
448
|
+
border-radius: var(--_radius);
|
|
449
|
+
background: var(--_surface);
|
|
450
|
+
display: grid;
|
|
451
|
+
gap: 8px;
|
|
452
|
+
}
|
|
453
|
+
.reply__row {
|
|
454
|
+
display: flex;
|
|
455
|
+
flex-wrap: wrap;
|
|
456
|
+
align-items: baseline;
|
|
457
|
+
gap: 4px 12px;
|
|
458
|
+
min-width: 0;
|
|
459
|
+
}
|
|
460
|
+
.reply__address {
|
|
461
|
+
font: 400 14px/1.5 var(--_font-mono);
|
|
462
|
+
color: var(--_ink);
|
|
463
|
+
word-break: break-all;
|
|
464
|
+
}
|
|
465
|
+
.reply__messages {
|
|
466
|
+
display: flex;
|
|
467
|
+
flex-wrap: wrap;
|
|
468
|
+
gap: 6px;
|
|
469
|
+
margin: 0;
|
|
470
|
+
padding: 0;
|
|
471
|
+
list-style: none;
|
|
472
|
+
}
|
|
473
|
+
.reply__desc {
|
|
474
|
+
color: var(--_ink-2);
|
|
475
|
+
font-size: 13px;
|
|
476
|
+
}
|
|
477
|
+
.reply__row--bindings {
|
|
478
|
+
align-items: flex-start;
|
|
479
|
+
}
|
|
480
|
+
.reply__row--bindings .label {
|
|
481
|
+
padding-top: 6px;
|
|
482
|
+
}
|
|
483
|
+
`;function $l(e,t){return e.length===0?w:C`<div class="block" id="${t}--parameters">
|
|
484
|
+
<h4 class="sub-title" tabindex="-1">Parameters</h4>
|
|
485
|
+
<dl class="params">
|
|
486
|
+
${e.map(e=>{let t=[];return e.enum&&e.enum.length>0&&t.push(`enum: ${e.enum.join(` · `)}`),e.default!==void 0&&t.push(`default: ${e.default}`),e.examples&&e.examples.length>0&&t.push(`examples: ${e.examples.join(` · `)}`),e.location&&t.push(`location: ${e.location}`),C`<dt>
|
|
487
|
+
<span class="params__name">${e.name}</span>
|
|
488
|
+
${e.schemaType?C`<span class="params__schema">schema: ${e.schemaType}</span>`:w}
|
|
489
|
+
</dt>
|
|
490
|
+
<dd>
|
|
491
|
+
${e.description?C`<div>${Q(e.description)}</div>`:w}
|
|
492
|
+
${t.length>0?C`<div class="params__facts">${t.join(` · `)}</div>`:w}
|
|
493
|
+
</dd>`})}
|
|
494
|
+
</dl>
|
|
495
|
+
</div>`}function eu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&typeof e.type==`string`}function tu(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return C`<span class="chip__value mono">${String(e)}</span>`;if(eu(e))return C`<span class="chip__value mono">${[e.type,Array.isArray(e.enum)?`enum: ${e.enum.map(String).join(` · `)}`:void 0].filter(Boolean).join(` · `)}</span>`;let t=JSON.stringify(e);return t.length<=40?C`<span class="chip__value mono">${t}</span>`:C`<pre class="chip__value">${JSON.stringify(e,null,2)}</pre>`}function nu(e,t,n,r,i){let a=eu(n.value)&&typeof n.value.description==`string`?n.value.description:void 0,o=C`<span class="mono"><span class="chip__scope">${e}</span>${n.key}</span>`;return i===`split`?C`<li class="binding ${a?`binding--described`:``}" title=${r}>
|
|
496
|
+
<span class="binding__head"><span class="chip">${o}</span>${tu(n.value)}</span>
|
|
497
|
+
${a?C`<span class="chip__desc">${Q(a)}</span>`:w}
|
|
498
|
+
</li>`:C`<li class="chip ${a?`chip--row`:``}" title=${r}>
|
|
499
|
+
<span class="chip__head">${o}${tu(n.value)}</span>
|
|
500
|
+
${a?C`<span class="chip__desc">${Q(a)}</span>`:w}
|
|
501
|
+
</li>`}function ru(e){let t=[],n=(e,r)=>{if(Array.isArray(r)){r.every(e=>typeof e!=`object`||!e)?t.push({key:e,value:r.map(String).join(` · `)}):t.push({key:e,value:r});return}if(typeof r==`object`&&r){if(typeof r.type==`string`){t.push({key:e,value:r});return}for(let[t,i]of Object.entries(r))n(`${e}.${t}`,i);return}t.push({key:e,value:r})};return n(e.key,e.value),t}function iu(e,t=`Bindings`,n=`pill`){return e.length===0?w:C`<div class="block">
|
|
502
|
+
<h4 class="sub-title">${t}</h4>
|
|
503
|
+
<ul class="chips">
|
|
504
|
+
${e.flatMap(e=>ru(e).map(t=>nu(`${e.scope}.`,e.protocol,t,`${e.protocol} binding`,n)))}
|
|
505
|
+
</ul>
|
|
506
|
+
</div>`}function au(e){let t=e.flows??[],n=new Map;for(let e of t)for(let t of e.scopes)n.has(t.name)||n.set(t.name,t.description);if(n.size>0)for(let t of e.scopes)n.has(t)||n.set(t,``);let r=e.facts??[],i=e.extensions??[];if(!e.description&&r.length===0&&i.length===0&&!e.openIdConnectUrl&&t.length===0)return w;let a=(e,t)=>t?C`<li class="mono"><span class="chip__scope">${e} </span><a href=${t}>${t}</a></li>`:w;return C`<div class="sec__details">
|
|
507
|
+
${e.description?C`<span class="chip__desc">${Q(e.description)}</span>`:w}
|
|
508
|
+
${r.length>0||i.length>0||e.openIdConnectUrl?C`<ul class="sec__list">
|
|
509
|
+
${r.map(e=>C`<li class="mono"><span class="chip__scope">${e.label} </span>${e.value}</li>`)}
|
|
510
|
+
${a(`discovery`,e.openIdConnectUrl)}
|
|
511
|
+
${i.map(e=>C`<li class="mono"><span class="chip__scope">${e.key.slice(2)} </span>${ou(e.value)}</li>`)}
|
|
512
|
+
</ul>`:w}
|
|
513
|
+
${t.length>0?C`<div class="sec__group">
|
|
514
|
+
<span class="sec__label">flows</span>
|
|
515
|
+
<ul class="sec__list">
|
|
516
|
+
${t.map(e=>C`<li>
|
|
517
|
+
<span class="mono">${e.kind}</span>
|
|
518
|
+
<ul class="sec__list">${a(`authorization`,e.authorizationUrl)}${a(`token`,e.tokenUrl)}${a(`refresh`,e.refreshUrl)}</ul>
|
|
519
|
+
</li>`)}
|
|
520
|
+
</ul>
|
|
521
|
+
</div>`:w}
|
|
522
|
+
${n.size>0?C`<div class="sec__group">
|
|
523
|
+
<span class="sec__label">scopes</span>
|
|
524
|
+
<dl class="sec__scopes">${[...n].map(([e,t])=>C`<dt class="mono">${e}</dt><dd>${t?Q(t):w}</dd>`)}</dl>
|
|
525
|
+
</div>`:w}
|
|
526
|
+
</div>`}function ou(e){if(typeof e==`string`)return e.length<=60&&!e.includes(`
|
|
527
|
+
`)?C`${e}`:C`<pre class="sec__pre">${e}</pre>`;if(typeof e==`number`||typeof e==`boolean`||e===null)return C`${String(e)}`;let t=JSON.stringify(e);return t.length<=60?C`${t}`:C`<pre class="sec__pre">${JSON.stringify(e,null,2)}</pre>`}function su(e){return(e.flows??[]).some(e=>e.scopes.length>0)}function cu(e,t,n){let r=n?C`<a class="sec__id" href=${n}>${e.id}</a>`:C`<span class="mono">${e.id}</span>`,i=e.type&&e.type!==e.id?C`<span class="chip__value mono">${e.type}</span>`:w,a=e.scopes.length>0&&!su(e)?C`<span class="chip__value mono"><span class="chip__scope">scopes </span>${e.scopes.join(` · `)}</span>`:w,o=au(e),s=C`<span class="binding__head"><span class="chip ${t===`pill`?`sec__pill`:``}">${r}</span>${i}${a}</span>`;return t===`split`?C`<li class="binding ${o===w?``:`binding--described`}">${s}${o}</li>`:o===w?C`<li class="binding">${s}</li>`:C`<li class="chip chip--row sec--row">${s}${o}</li>`}function lu(e,t=`pill`,n){return e.length===0?w:C`<div class="block">
|
|
528
|
+
<h4 class="sub-title">Security</h4>
|
|
529
|
+
<ul class="chips">
|
|
530
|
+
${e.map(e=>cu(e,t,n))}
|
|
531
|
+
</ul>
|
|
532
|
+
</div>`}function uu(e,t){let n=e.channel?e.channel.address:void 0;return C`<div class="block">
|
|
533
|
+
<h4 class="sub-title">Reply</h4>
|
|
534
|
+
<div class="reply">
|
|
535
|
+
${e.addressLocation?C`<div class="reply__row"><span class="label">Address from</span><span class="reply__address">${e.addressLocation}</span></div>`:w}
|
|
536
|
+
${e.addressDescription?C`<div class="reply__desc">${Q(e.addressDescription)}</div>`:w}
|
|
537
|
+
${e.channel?C`<div class="reply__row">
|
|
538
|
+
<span class="label">Channel</span>
|
|
539
|
+
<span class="reply__address">${n===null?`Address not specified`:n}</span>
|
|
540
|
+
${e.channel.id===n?w:C`<span class="params__schema">${e.channel.id}</span>`}
|
|
541
|
+
</div>`:w}
|
|
542
|
+
${e.messages.length>0?C`<div class="reply__row">
|
|
543
|
+
<span class="label">Messages</span>
|
|
544
|
+
<ul class="reply__messages">
|
|
545
|
+
${e.messages.map(e=>C`<li><a class="chip" href="#${t}--messages--${e.anchor}">${e.title??e.name??e.id}</a></li>`)}
|
|
546
|
+
</ul>
|
|
547
|
+
</div>`:w}
|
|
548
|
+
${e.channel&&e.channel.bindings.length>0?C`<div class="reply__row reply__row--bindings">
|
|
549
|
+
<span class="label">Bindings</span>
|
|
550
|
+
<ul class="chips">
|
|
551
|
+
${e.channel.bindings.flatMap(e=>ru(e).map(t=>nu(`reply.channel.`,e.protocol,t,`${e.protocol} binding of the reply channel`,`pill`)))}
|
|
552
|
+
</ul>
|
|
553
|
+
</div>`:w}
|
|
554
|
+
</div>
|
|
555
|
+
</div>`}function du(e){if(e&&e.kind===`node`)return pu(e,0)}var fu=8;function pu(e,t){if(e.examples&&e.examples.length>0)return e.examples[0];if(e.default!==void 0)return e.default;if(e.const!==void 0)return e.const;if(e.enum&&e.enum.length>0)return e.enum[0];if(e.circularRef!==void 0||t>fu)return null;let n=e.children.length===1&&e.children[0].name===`[]`?e.children[0]:void 0,r=hu(e);if(e.composition&&e.composition.variants.length>0&&e.children.length===0&&!n)return pu(e.composition.variants[0].node,t);if(r===`array`||n)return n?[pu(n,t+1)]:e.children.filter(e=>/^\[\d+\]$/.test(e.name)).map(e=>pu(e,t+1));if(r===`object`||e.children.length>0){let n={};for(let r of e.children)r.name===`*`?n.key=pu(r,t+1):r.name.startsWith(`/`)?n[`x-example`]=pu(r,t+1):n[r.name]=pu(r,t+1);return e.composition&&e.composition.variants.length>0&&Object.assign(n,mu(pu(e.composition.variants[0].node,t))),n}switch(r){case`string`:return vu(e);case`integer`:return gu(e);case`number`:return _u(e);case`boolean`:return!0;case`null`:return null;default:return vu(e)}}function mu(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function hu(e){return e.types.find(e=>e!==`null`)??e.types[0]}function $(e,t){let n=e.constraints.find(e=>e.key===t);return typeof n?.value==`number`?n.value:void 0}function gu(e){let t=$(e,`minimum`)??($(e,`exclusiveMinimum`)===void 0?void 0:$(e,`exclusiveMinimum`)+1),n=$(e,`maximum`)??($(e,`exclusiveMaximum`)===void 0?void 0:$(e,`exclusiveMaximum`)-1),r=e.name.toLowerCase(),i=/quantity|count|qty|items|size/.test(r)?2:/age/.test(r)?34:/year/.test(r)?2026:/port/.test(r)?8080:42;return t!==void 0&&i<t&&(i=t),n!==void 0&&i>n&&(i=n),i}function _u(e){let t=$(e,`minimum`)??$(e,`exclusiveMinimum`),n=$(e,`maximum`)??$(e,`exclusiveMaximum`),r=e.name.toLowerCase(),i=/price|amount|total|cost|fee/.test(r)?12.5:/lat/.test(r)?52.37:/lon|lng/.test(r)?4.89:/percent|ratio|rate/.test(r)?.25:3.14;return t!==void 0&&i<=t&&(i=t+1),n!==void 0&&i>=n&&(i=n-1),i}function vu(e){let t=e.format?.toLowerCase(),n=e.name,r=n.toLowerCase(),i;switch(t){case`uuid`:i=`3fa85f64-5717-4562-b3fc-2c963f66afa6`;break;case`email`:case`idn-email`:i=`ada@example.com`;break;case`date-time`:i=`2026-09-26T10:15:00Z`;break;case`date`:i=`2026-09-26`;break;case`time`:i=`10:15:00Z`;break;case`duration`:i=`PT15M`;break;case`uri`:case`url`:case`iri`:case`uri-reference`:i=`https://example.com/resource/42`;break;case`hostname`:i=`broker.example.com`;break;case`ipv4`:i=`192.0.2.10`;break;case`ipv6`:i=`2001:db8::10`;break;case`byte`:i=`aGVsbG8=`;break;case`binary`:i=`<binary>`;break;case`password`:i=`••••••••`}i===void 0&&(i=/^id$|Id$|_id$|Ref$|Key$/.test(n)?`${(n.replace(/Id$|_id$|Ref$|Key$/,``).replace(/^id$/,`item`)||`item`).slice(0,3).toLowerCase()}_01HZ3`:/email/.test(r)?`ada@example.com`:/^(url|uri|link|href)$|url$|uri$/i.test(n)?`https://example.com/resource/42`:/phone|tel/.test(r)?`+31 20 555 0100`:/currency/.test(r)?`EUR`:/country/.test(r)?`NL`:/lang|locale/.test(r)?`en-GB`:/^(name|displayname|fullname)$/.test(r)?`Ada Lovelace`:/firstname|givenname/.test(r)?`Ada`:/lastname|surname|familyname/.test(r)?`Lovelace`:/username|login|handle/.test(r)?`ada`:/status|state/.test(r)?`active`:/type|kind|category/.test(r)?`standard`:/sku|code/.test(r)?`MUG-TEAL-01`:/description|text|message|comment|body|note|reason/.test(r)?`Example text`:/title|subject/.test(r)?`Example title`:/at$|time|date/.test(r)?`2026-09-26T10:15:00Z`:/token|secret|key/.test(r)?`tok_9f8e7d6c`:/version/.test(r)?`1.0.0`:/city/.test(r)?`Amsterdam`:/street|address/.test(r)?`Herengracht 1`:/zip|postal/.test(r)?`1015 BA`:/color|colour/.test(r)?`teal`:n&&!/^[[*/]/.test(n)?`${n}-example`:`example`);let a=$(e,`minLength`),o=$(e,`maxLength`);return a!==void 0&&i.length<a&&(i=i.padEnd(a,`x`)),o!==void 0&&i.length>o&&(i=i.slice(0,o)),i}var yu=l`
|
|
556
|
+
.ex {
|
|
557
|
+
min-width: 0;
|
|
558
|
+
background: var(--_ex-bg);
|
|
559
|
+
color: var(--_ex-ink);
|
|
560
|
+
border-radius: var(--_radius);
|
|
561
|
+
overflow: hidden;
|
|
562
|
+
font-size: 13px;
|
|
563
|
+
--_ex-key: color-mix(in srgb, var(--_primary) 50%, white);
|
|
564
|
+
--_ex-string: color-mix(in srgb, var(--_secondary) 45%, white);
|
|
565
|
+
}
|
|
566
|
+
.ex__head {
|
|
567
|
+
display: flex;
|
|
568
|
+
flex-wrap: wrap;
|
|
569
|
+
align-items: baseline;
|
|
570
|
+
gap: 4px 10px;
|
|
571
|
+
padding: 18px 18px 0;
|
|
572
|
+
}
|
|
573
|
+
.ex__label {
|
|
574
|
+
font: 500 11px/1 var(--_font-body);
|
|
575
|
+
text-transform: uppercase;
|
|
576
|
+
letter-spacing: 0.08em;
|
|
577
|
+
color: var(--_ex-muted);
|
|
578
|
+
}
|
|
579
|
+
.ex__name {
|
|
580
|
+
font: 600 15px/1.4 var(--_font-heading);
|
|
581
|
+
color: var(--_ex-heading);
|
|
582
|
+
}
|
|
583
|
+
.ex__generated {
|
|
584
|
+
height: 20px;
|
|
585
|
+
padding: 0 7px;
|
|
586
|
+
border: 1px solid var(--_ex-lines);
|
|
587
|
+
color: var(--_ex-muted);
|
|
588
|
+
font-size: 11px;
|
|
589
|
+
}
|
|
590
|
+
.ex__bar {
|
|
591
|
+
display: flex;
|
|
592
|
+
flex-wrap: wrap;
|
|
593
|
+
align-items: center;
|
|
594
|
+
gap: 6px 10px;
|
|
595
|
+
padding: 14px 18px 0;
|
|
596
|
+
}
|
|
597
|
+
.ex__tabs {
|
|
598
|
+
display: inline-flex;
|
|
599
|
+
gap: 4px;
|
|
600
|
+
}
|
|
601
|
+
.ex__tab {
|
|
602
|
+
min-height: 34px;
|
|
603
|
+
padding: 0 10px;
|
|
604
|
+
border: 0;
|
|
605
|
+
border-bottom: 2px solid transparent;
|
|
606
|
+
background: none;
|
|
607
|
+
color: var(--_ex-muted);
|
|
608
|
+
font: 500 13px/1 var(--_font-body);
|
|
609
|
+
cursor: pointer;
|
|
610
|
+
}
|
|
611
|
+
.ex__tab[aria-selected='true'] {
|
|
612
|
+
color: var(--_ex-heading);
|
|
613
|
+
border-bottom-color: var(--_ex-heading);
|
|
614
|
+
}
|
|
615
|
+
.ex__tab:focus-visible,
|
|
616
|
+
.ex__copy:focus-visible,
|
|
617
|
+
.ex__select:focus-visible {
|
|
618
|
+
outline: 2px solid var(--_ex-key);
|
|
619
|
+
outline-offset: 1px;
|
|
620
|
+
}
|
|
621
|
+
.ex__spacer {
|
|
622
|
+
flex: 1;
|
|
623
|
+
}
|
|
624
|
+
.ex__select-wrap {
|
|
625
|
+
display: inline-flex;
|
|
626
|
+
align-items: center;
|
|
627
|
+
gap: 6px;
|
|
628
|
+
color: var(--_ex-muted);
|
|
629
|
+
font-size: 12px;
|
|
630
|
+
}
|
|
631
|
+
.ex__select {
|
|
632
|
+
min-height: 30px;
|
|
633
|
+
padding: 0 8px;
|
|
634
|
+
border: 1px solid var(--_ex-lines);
|
|
635
|
+
border-radius: var(--_radius-sm);
|
|
636
|
+
background: rgb(255 255 255 / 0.06);
|
|
637
|
+
color: var(--_ex-ink);
|
|
638
|
+
font: 12.5px/1 var(--_font-body);
|
|
639
|
+
}
|
|
640
|
+
.ex__copy {
|
|
641
|
+
display: inline-flex;
|
|
642
|
+
align-items: center;
|
|
643
|
+
gap: 6px;
|
|
644
|
+
min-height: 30px;
|
|
645
|
+
padding: 0 10px;
|
|
646
|
+
border: 1px solid var(--_ex-lines);
|
|
647
|
+
border-radius: var(--_radius-sm);
|
|
648
|
+
background: none;
|
|
649
|
+
color: var(--_ex-ink);
|
|
650
|
+
font: 500 12.5px/1 var(--_font-body);
|
|
651
|
+
cursor: pointer;
|
|
652
|
+
}
|
|
653
|
+
.ex__copy:hover {
|
|
654
|
+
background: rgb(255 255 255 / 0.06);
|
|
655
|
+
}
|
|
656
|
+
.ex__copy svg {
|
|
657
|
+
width: 14px;
|
|
658
|
+
height: 14px;
|
|
659
|
+
fill: none;
|
|
660
|
+
stroke: currentColor;
|
|
661
|
+
stroke-width: 1.8;
|
|
662
|
+
stroke-linecap: round;
|
|
663
|
+
stroke-linejoin: round;
|
|
664
|
+
}
|
|
665
|
+
.ex__code:focus-visible {
|
|
666
|
+
outline: 2px solid var(--_ex-key);
|
|
667
|
+
outline-offset: -2px;
|
|
668
|
+
}
|
|
669
|
+
.ex__code {
|
|
670
|
+
margin: 8px 0 0;
|
|
671
|
+
padding: 14px 18px 18px 0;
|
|
672
|
+
overflow: auto;
|
|
673
|
+
font: 12.5px/1.7 var(--_font-mono);
|
|
674
|
+
border-top: 1px solid var(--_ex-divider);
|
|
675
|
+
counter-reset: line;
|
|
676
|
+
}
|
|
677
|
+
.ex__line {
|
|
678
|
+
display: grid;
|
|
679
|
+
grid-template-columns: 44px minmax(0, 1fr);
|
|
680
|
+
}
|
|
681
|
+
.ex__text {
|
|
682
|
+
white-space: pre;
|
|
683
|
+
}
|
|
684
|
+
.ex__line::before {
|
|
685
|
+
counter-increment: line;
|
|
686
|
+
content: counter(line);
|
|
687
|
+
text-align: right;
|
|
688
|
+
padding-right: 14px;
|
|
689
|
+
color: var(--_ex-lines);
|
|
690
|
+
user-select: none;
|
|
691
|
+
}
|
|
692
|
+
.tk-key {
|
|
693
|
+
color: var(--_ex-key);
|
|
694
|
+
}
|
|
695
|
+
.tk-str {
|
|
696
|
+
color: var(--_ex-string);
|
|
697
|
+
}
|
|
698
|
+
.tk-num,
|
|
699
|
+
.tk-bool,
|
|
700
|
+
.tk-null {
|
|
701
|
+
color: var(--_ex-number);
|
|
702
|
+
}
|
|
703
|
+
.tk-punct {
|
|
704
|
+
color: var(--_ex-muted);
|
|
705
|
+
}
|
|
706
|
+
.ex__foot {
|
|
707
|
+
display: grid;
|
|
708
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
709
|
+
justify-content: space-between;
|
|
710
|
+
gap: 6px 16px;
|
|
711
|
+
padding: 12px 18px 14px;
|
|
712
|
+
border-top: 1px solid var(--_ex-divider);
|
|
713
|
+
font: 12px/1.5 var(--_font-body);
|
|
714
|
+
color: var(--_ex-muted);
|
|
715
|
+
}
|
|
716
|
+
.ex__foot code {
|
|
717
|
+
text-align: right;
|
|
718
|
+
overflow-wrap: anywhere;
|
|
719
|
+
}
|
|
720
|
+
.ex__foot code {
|
|
721
|
+
font: 12px/1.5 var(--_font-mono);
|
|
722
|
+
}
|
|
723
|
+
.ex__foot code {
|
|
724
|
+
color: var(--_ex-ink);
|
|
725
|
+
}
|
|
726
|
+
.ex__live {
|
|
727
|
+
position: absolute;
|
|
728
|
+
width: 1px;
|
|
729
|
+
height: 1px;
|
|
730
|
+
overflow: hidden;
|
|
731
|
+
clip: rect(0 0 0 0);
|
|
732
|
+
}
|
|
733
|
+
.ex__show {
|
|
734
|
+
display: inline-flex;
|
|
735
|
+
align-items: center;
|
|
736
|
+
gap: 8px;
|
|
737
|
+
min-height: 36px;
|
|
738
|
+
padding: 0 12px;
|
|
739
|
+
border: 1px dashed var(--_line-2);
|
|
740
|
+
border-radius: var(--_radius-sm);
|
|
741
|
+
background: var(--_surface);
|
|
742
|
+
color: var(--_ink-2);
|
|
743
|
+
font: 500 12.5px/1 var(--_font-body);
|
|
744
|
+
cursor: pointer;
|
|
745
|
+
}
|
|
746
|
+
.ex__show:focus-visible {
|
|
747
|
+
outline: 2px solid var(--_primary);
|
|
748
|
+
outline-offset: 2px;
|
|
749
|
+
}
|
|
750
|
+
`;function bu(e){if(e.examples.length>0)return e.examples.map((e,t)=>({label:e.name??`Example ${t+1}`,payload:e.payload,headers:e.headers,generated:!1}));let t=du(e.payload),n=du(e.headers);return t===void 0&&n===void 0?[]:[{label:`Generated`,payload:t,headers:n,generated:!0}]}function xu(e){return e.state.open??e.defaultOpen}var Su=C`<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V6a2 2 0 0 1 2-2h9" /></svg>`;function Cu(e){return C`<button
|
|
751
|
+
class="ex__show"
|
|
752
|
+
type="button"
|
|
753
|
+
aria-expanded="false"
|
|
754
|
+
@click=${()=>{e.state.open=!0,e.onChange()}}
|
|
755
|
+
>
|
|
756
|
+
${Su} Show example
|
|
757
|
+
</button>`}function wu(e,t,n,r){if(t.length===0)return w;let i=n.state,a=Math.min(i.index,t.length-1),o=t[a],s=o.headers!==void 0,c=s&&i.tab===`headers`?`headers`:`payload`,l=c===`headers`?o.headers:o.payload,u=l===void 0?``:JSON.stringify(l,null,2);return C`<aside class="ex" aria-label="Example for ${e.title??e.name??e.id}">
|
|
758
|
+
<div class="ex__head">
|
|
759
|
+
<span class="ex__label">Example</span>
|
|
760
|
+
<span class="ex__name">${e.title??e.name??e.id}</span>
|
|
761
|
+
${o.generated?C`<span class="pill ex__generated" title="No example in the document; this one was generated from the schema">Generated from schema</span>`:w}
|
|
762
|
+
</div>
|
|
763
|
+
<div class="ex__bar">
|
|
764
|
+
${s?C`<div class="ex__tabs" role="tablist" aria-label="Example parts">
|
|
765
|
+
${[`payload`,`headers`].map(e=>C`<button
|
|
766
|
+
class="ex__tab"
|
|
767
|
+
type="button"
|
|
768
|
+
role="tab"
|
|
769
|
+
id="${r}--tab-${e}"
|
|
770
|
+
aria-selected=${c===e?`true`:`false`}
|
|
771
|
+
aria-controls="${r}--code"
|
|
772
|
+
tabindex=${c===e?`0`:`-1`}
|
|
773
|
+
@click=${()=>{i.tab=e,n.onChange()}}
|
|
774
|
+
@keydown=${e=>{(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&(i.tab=i.tab===`payload`?`headers`:`payload`,n.onChange(),e.preventDefault())}}
|
|
775
|
+
>
|
|
776
|
+
${e===`payload`?`Payload`:`Headers`}
|
|
777
|
+
</button>`)}
|
|
778
|
+
</div>`:w}
|
|
779
|
+
${t.length>1?C`<label class="ex__select-wrap"
|
|
780
|
+
><span>Example</span>
|
|
781
|
+
<select
|
|
782
|
+
class="ex__select"
|
|
783
|
+
@change=${e=>{i.index=Number(e.target.value),n.onChange()}}
|
|
784
|
+
>
|
|
785
|
+
${t.map((e,t)=>C`<option value=${t} ?selected=${t===a}>${e.label}</option>`)}
|
|
786
|
+
</select></label
|
|
787
|
+
>`:w}
|
|
788
|
+
<span class="ex__spacer"></span>
|
|
789
|
+
<button class="ex__copy" type="button" @click=${async()=>{try{await navigator.clipboard.writeText(u),i.copied=`copied`}catch{i.copied=`failed`}n.onChange(),setTimeout(()=>{i.copied=void 0,n.onChange()},2e3)}}>${Su} ${i.copied===`copied`?`Copied`:i.copied===`failed`?`Copy failed`:`Copy`}</button>
|
|
790
|
+
<span class="ex__live" aria-live="polite">${i.copied===`copied`?`Copied to clipboard`:i.copied===`failed`?`Copying failed; select the text to copy it`:``}</span>
|
|
791
|
+
</div>
|
|
792
|
+
<pre class="ex__code" id="${r}--code" tabindex="0" role=${s?`tabpanel`:w} aria-labelledby=${s?`${r}--tab-${c}`:w} aria-label=${s?w:`Example, scrollable`}><code>${Tu(u)}</code></pre>
|
|
793
|
+
<div class="ex__foot">
|
|
794
|
+
${e.correlationId?C`<span>Correlation ID</span><code>${e.correlationId.location}</code>`:w}
|
|
795
|
+
<span>Message ID</span><code>${e.id}</code>
|
|
796
|
+
</div>
|
|
797
|
+
</aside>`}function Tu(e){return e.split(`
|
|
798
|
+
`).map(e=>C`<span class="ex__line"><span class="ex__text">${Du(e)}</span></span>`)}var Eu=/("(?:[^"\\]|\\.)*")(\s*:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(true|false)|(null)|([{}[\],:])|(\s+)/g;function Du(e){let t=[],n=0;for(let r of e.matchAll(Eu))r.index>n&&t.push(e.slice(n,r.index)),n=r.index+r[0].length,r[1]===void 0?r[3]===void 0?r[4]===void 0?r[5]===void 0?r[6]===void 0?t.push(r[0]):t.push(C`<span class="tk-punct">${r[6]}</span>`):t.push(C`<span class="tk-null">${r[5]}</span>`):t.push(C`<span class="tk-bool">${r[4]}</span>`):t.push(C`<span class="tk-num">${r[3]}</span>`):r[2]===void 0?t.push(C`<span class="tk-str">${r[1]}</span>`):t.push(C`<span class="tk-key">${r[1]}</span><span class="tk-punct">${r[2]}</span>`);return n<e.length&&t.push(e.slice(n)),t}function Ou(e){let t=e.toLowerCase();return t.includes(`avro`)?`Avro`:t.includes(`protobuf`)?`Protobuf`:t.includes(`raml`)?`RAML`:t.includes(`openapi`)?`OpenAPI Schema`:t.includes(`vnd.aai.asyncapi`)||t.includes(`json-schema`)||t.includes(`schema+json`)||t.includes(`schema+yaml`)?`JSON Schema`:e}var ku=l`
|
|
799
|
+
.tree {
|
|
800
|
+
border: 1px solid var(--_line);
|
|
801
|
+
border-radius: var(--_radius);
|
|
802
|
+
background: var(--_surface);
|
|
803
|
+
overflow: hidden;
|
|
804
|
+
}
|
|
805
|
+
.tree__bar {
|
|
806
|
+
display: flex;
|
|
807
|
+
flex-wrap: wrap;
|
|
808
|
+
align-items: center;
|
|
809
|
+
gap: 8px 14px;
|
|
810
|
+
padding: 8px 12px 8px 16px;
|
|
811
|
+
background: var(--_head);
|
|
812
|
+
border-bottom: 1px solid var(--_line);
|
|
813
|
+
font-size: 12.5px;
|
|
814
|
+
color: var(--_muted);
|
|
815
|
+
}
|
|
816
|
+
.tree__bar .spacer {
|
|
817
|
+
flex: 1;
|
|
818
|
+
}
|
|
819
|
+
.tree__bar button {
|
|
820
|
+
min-height: 32px;
|
|
821
|
+
padding: 0 10px;
|
|
822
|
+
border: 0;
|
|
823
|
+
background: none;
|
|
824
|
+
color: var(--_primary-text);
|
|
825
|
+
font: 500 12.5px/1 var(--_font-body);
|
|
826
|
+
cursor: pointer;
|
|
827
|
+
border-radius: var(--_radius-sm);
|
|
828
|
+
}
|
|
829
|
+
.tree__bar button:hover {
|
|
830
|
+
background: var(--_tint);
|
|
831
|
+
}
|
|
832
|
+
.tree__bar button:focus-visible {
|
|
833
|
+
outline: 2px solid var(--_primary);
|
|
834
|
+
outline-offset: -2px;
|
|
835
|
+
}
|
|
836
|
+
.tree__body {
|
|
837
|
+
padding: 0;
|
|
838
|
+
}
|
|
839
|
+
.tree__empty {
|
|
840
|
+
margin: 0;
|
|
841
|
+
padding: 6px 4px;
|
|
842
|
+
color: var(--_muted);
|
|
843
|
+
font-size: 13px;
|
|
844
|
+
}
|
|
845
|
+
.tree__leaf {
|
|
846
|
+
display: grid;
|
|
847
|
+
gap: 4px;
|
|
848
|
+
padding: 10px 12px;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
ul.branch {
|
|
852
|
+
list-style: none;
|
|
853
|
+
margin: 0;
|
|
854
|
+
padding: 0;
|
|
855
|
+
}
|
|
856
|
+
ul.branch ul.branch {
|
|
857
|
+
margin-left: 28px;
|
|
858
|
+
padding-left: 22px;
|
|
859
|
+
border-left: 1px solid var(--_line-2);
|
|
860
|
+
}
|
|
861
|
+
li.row + li.row,
|
|
862
|
+
li.row > div > ul.branch > li.row:first-child {
|
|
863
|
+
border-top: 1px solid var(--_line);
|
|
864
|
+
}
|
|
865
|
+
ul.branch[data-depth='4'] ul.branch,
|
|
866
|
+
ul.branch[data-depth='5'] ul.branch,
|
|
867
|
+
ul.branch[data-depth='6'] ul.branch,
|
|
868
|
+
ul.branch[data-depth='7'] ul.branch,
|
|
869
|
+
ul.branch[data-depth='8'] ul.branch,
|
|
870
|
+
ul.branch[data-depth='9'] ul.branch {
|
|
871
|
+
padding-left: 12px;
|
|
872
|
+
}
|
|
873
|
+
.row {
|
|
874
|
+
display: grid;
|
|
875
|
+
grid-template-columns: 26px minmax(0, 1fr);
|
|
876
|
+
column-gap: 10px;
|
|
877
|
+
padding: 11px 16px 11px 12px;
|
|
878
|
+
}
|
|
879
|
+
.row > div {
|
|
880
|
+
min-width: 0;
|
|
881
|
+
}
|
|
882
|
+
.row__toggle {
|
|
883
|
+
width: 26px;
|
|
884
|
+
height: 26px;
|
|
885
|
+
padding: 0;
|
|
886
|
+
border: 1px solid var(--_line);
|
|
887
|
+
border-radius: 6px;
|
|
888
|
+
background: var(--_surface);
|
|
889
|
+
color: var(--_ink-2);
|
|
890
|
+
cursor: pointer;
|
|
891
|
+
display: inline-flex;
|
|
892
|
+
align-items: center;
|
|
893
|
+
justify-content: center;
|
|
894
|
+
}
|
|
895
|
+
.row__toggle:hover {
|
|
896
|
+
border-color: var(--_line-2);
|
|
897
|
+
}
|
|
898
|
+
.row__toggle:focus-visible {
|
|
899
|
+
outline: 2px solid var(--_primary);
|
|
900
|
+
outline-offset: 1px;
|
|
901
|
+
}
|
|
902
|
+
.row__toggle svg {
|
|
903
|
+
width: 12px;
|
|
904
|
+
height: 12px;
|
|
905
|
+
fill: none;
|
|
906
|
+
stroke: currentColor;
|
|
907
|
+
stroke-width: 2;
|
|
908
|
+
stroke-linecap: round;
|
|
909
|
+
stroke-linejoin: round;
|
|
910
|
+
transition: transform 120ms;
|
|
911
|
+
}
|
|
912
|
+
.row__toggle[aria-expanded='true'] svg {
|
|
913
|
+
transform: rotate(90deg);
|
|
914
|
+
}
|
|
915
|
+
.row__spacer {
|
|
916
|
+
width: 26px;
|
|
917
|
+
}
|
|
918
|
+
.row__line1 {
|
|
919
|
+
display: flex;
|
|
920
|
+
flex-wrap: wrap;
|
|
921
|
+
align-items: baseline;
|
|
922
|
+
gap: 4px 10px;
|
|
923
|
+
min-height: 26px;
|
|
924
|
+
}
|
|
925
|
+
.row__name {
|
|
926
|
+
font: 600 13px/1.5 var(--_font-mono);
|
|
927
|
+
color: var(--_ink);
|
|
928
|
+
overflow-wrap: anywhere;
|
|
929
|
+
}
|
|
930
|
+
.row__type {
|
|
931
|
+
font: 400 12px/1.5 var(--_font-mono);
|
|
932
|
+
color: var(--_muted);
|
|
933
|
+
}
|
|
934
|
+
.row__hidden {
|
|
935
|
+
height: 20px;
|
|
936
|
+
padding: 0 7px;
|
|
937
|
+
font-size: 11px;
|
|
938
|
+
}
|
|
939
|
+
.row__req {
|
|
940
|
+
margin-left: auto;
|
|
941
|
+
font: 600 11.5px/1.5 var(--_font-body);
|
|
942
|
+
color: var(--_secondary-text);
|
|
943
|
+
}
|
|
944
|
+
.row__req--optional {
|
|
945
|
+
font-weight: 400;
|
|
946
|
+
color: var(--_muted);
|
|
947
|
+
}
|
|
948
|
+
.row__path {
|
|
949
|
+
font: 400 11.5px/1.5 var(--_font-mono);
|
|
950
|
+
color: var(--_muted);
|
|
951
|
+
white-space: nowrap;
|
|
952
|
+
overflow: hidden;
|
|
953
|
+
text-overflow: ellipsis;
|
|
954
|
+
}
|
|
955
|
+
.row__desc {
|
|
956
|
+
font-size: 13px;
|
|
957
|
+
line-height: 1.5;
|
|
958
|
+
color: var(--_ink-2);
|
|
959
|
+
}
|
|
960
|
+
.row__facts {
|
|
961
|
+
font: 400 11.5px/1.6 var(--_font-mono);
|
|
962
|
+
color: var(--_muted);
|
|
963
|
+
overflow-wrap: anywhere;
|
|
964
|
+
}
|
|
965
|
+
.row__circular {
|
|
966
|
+
font-size: 13px;
|
|
967
|
+
color: var(--_ink-2);
|
|
968
|
+
}
|
|
969
|
+
.variants {
|
|
970
|
+
display: inline-flex;
|
|
971
|
+
flex-wrap: wrap;
|
|
972
|
+
gap: 2px;
|
|
973
|
+
margin: 4px 0 6px;
|
|
974
|
+
padding: 3px;
|
|
975
|
+
border: 1px solid var(--_line);
|
|
976
|
+
border-radius: var(--_radius-sm);
|
|
977
|
+
background: var(--_head);
|
|
978
|
+
}
|
|
979
|
+
.variants button {
|
|
980
|
+
min-height: 28px;
|
|
981
|
+
padding: 0 10px;
|
|
982
|
+
border: 0;
|
|
983
|
+
border-radius: calc(var(--_radius-sm) - 2px);
|
|
984
|
+
background: none;
|
|
985
|
+
color: var(--_ink-2);
|
|
986
|
+
font: 500 12.5px/1 var(--_font-body);
|
|
987
|
+
cursor: pointer;
|
|
988
|
+
}
|
|
989
|
+
.variants button[aria-pressed='true'] {
|
|
990
|
+
background: var(--_surface);
|
|
991
|
+
color: var(--_ink);
|
|
992
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
|
|
993
|
+
}
|
|
994
|
+
.variants button:focus-visible {
|
|
995
|
+
outline: 2px solid var(--_primary);
|
|
996
|
+
outline-offset: -2px;
|
|
997
|
+
}
|
|
998
|
+
/* At the top of a tree the switcher hangs off the toolbar as a full-width strip. */
|
|
999
|
+
.tree__body > .variants {
|
|
1000
|
+
display: flex;
|
|
1001
|
+
margin: 0;
|
|
1002
|
+
padding: 6px 12px;
|
|
1003
|
+
border: 0;
|
|
1004
|
+
border-bottom: 1px solid var(--_line);
|
|
1005
|
+
border-radius: 0;
|
|
1006
|
+
background: var(--_head);
|
|
1007
|
+
}
|
|
1008
|
+
.tree__body > .row__desc {
|
|
1009
|
+
padding: 10px 16px 4px;
|
|
1010
|
+
}
|
|
1011
|
+
.variants__label {
|
|
1012
|
+
align-self: center;
|
|
1013
|
+
padding: 0 6px 0 8px;
|
|
1014
|
+
font: 500 11px/1 var(--_font-body);
|
|
1015
|
+
text-transform: uppercase;
|
|
1016
|
+
letter-spacing: 0.08em;
|
|
1017
|
+
color: var(--_muted);
|
|
1018
|
+
}
|
|
1019
|
+
.raw {
|
|
1020
|
+
border: 1px solid var(--_line);
|
|
1021
|
+
border-radius: var(--_radius);
|
|
1022
|
+
background: var(--_surface);
|
|
1023
|
+
overflow: hidden;
|
|
1024
|
+
}
|
|
1025
|
+
.raw__bar {
|
|
1026
|
+
padding: 8px 16px;
|
|
1027
|
+
background: var(--_head);
|
|
1028
|
+
border-bottom: 1px solid var(--_line);
|
|
1029
|
+
font: 400 12.5px/1.4 var(--_font-mono);
|
|
1030
|
+
color: var(--_muted);
|
|
1031
|
+
}
|
|
1032
|
+
.raw pre {
|
|
1033
|
+
margin: 0;
|
|
1034
|
+
padding: 12px 16px;
|
|
1035
|
+
overflow: auto;
|
|
1036
|
+
font: 12.5px/1.5 var(--_font-mono);
|
|
1037
|
+
color: var(--_ink);
|
|
1038
|
+
}
|
|
1039
|
+
@container viewer (max-width: 699px) {
|
|
1040
|
+
ul.branch ul.branch {
|
|
1041
|
+
margin-left: 14px;
|
|
1042
|
+
padding-left: 12px;
|
|
1043
|
+
}
|
|
1044
|
+
.row {
|
|
1045
|
+
padding: 10px 10px 10px 6px;
|
|
1046
|
+
}
|
|
1047
|
+
ul.branch[data-depth='4'] ul.branch,
|
|
1048
|
+
ul.branch[data-depth='5'] ul.branch,
|
|
1049
|
+
ul.branch[data-depth='6'] ul.branch,
|
|
1050
|
+
ul.branch[data-depth='7'] ul.branch,
|
|
1051
|
+
ul.branch[data-depth='8'] ul.branch,
|
|
1052
|
+
ul.branch[data-depth='9'] ul.branch {
|
|
1053
|
+
padding-left: 8px;
|
|
1054
|
+
}
|
|
1055
|
+
.tree__body {
|
|
1056
|
+
padding: 6px 8px 8px;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
`,Au=class{#e=new Set;#t=new Set;#n=new Map;#r;constructor(e){this.onChange=e}isExpanded(e,t){return this.#t.has(e)?!1:this.#e.has(e)?!0:this.#r===void 0?t<=2:this.#r}get allExpanded(){return this.#r===!0&&this.#t.size===0}toggle(e,t){let n=!this.isExpanded(e,t);this.#e.delete(e),this.#t.delete(e),(n?this.#e:this.#t).add(e),this.onChange()}setAll(e){this.#r=e,this.#e.clear(),this.#t.clear(),this.onChange()}variant(e){return this.#n.get(e)??0}selectVariant(e,t){this.#n.set(e,t),this.onChange()}};function ju(e){let t=Mu(e);return t?ju(t):e.children}function Mu(e){let t=e.children.length===1?e.children[0]:void 0;return t&&t.name===`[]`?t:void 0}function Nu(e){let t=Mu(e);return t?Nu(t):e.composition}function Pu(e){let t=Mu(e);if(t&&e.types.length<=1){let e=Pu(t);return e?`array<${e}>`:`array`}let n=e.types.join(` | `);return e.format&&(n=`${n||`string`} · ${e.format}`),e.enum&&e.enum.length>0&&(n=`${n||`string`} · enum`),!n&&e.composition&&(n=e.composition.kind),!n&&e.circularRef&&(n=`object`),n}function Fu(e){let t=0,n=0,r=(e,i)=>{for(let a of ju(e))t++,n=Math.max(n,i),r(a,i+1);let a=Nu(e);if(a)for(let e of a.variants)r(e.node,i)};return r(e,1),{fields:t,levels:n}}function Iu(e){let t=0;for(let n of ju(e))t+=1+Iu(n);return t}function Lu(e){let t=[];e.enum&&t.push(`enum: ${e.enum.map(Ru).join(` · `)}`),e.const!==void 0&&t.push(`const: ${Ru(e.const)}`),e.default!==void 0&&t.push(`default: ${Ru(e.default)}`),e.examples&&e.examples.length>0&&t.push(`examples: ${e.examples.map(Ru).join(` · `)}`);for(let n of e.constraints)t.push(`${n.key}: ${Ru(n.value)}`);return e.deprecated&&t.push(`deprecated`),e.readOnly&&t.push(`read-only`),e.writeOnly&&t.push(`write-only`),t.length>0?t.join(` · `):void 0}function Ru(e){if(typeof e==`string`)return e;let t=JSON.stringify(e);return t.length>60?`${t.slice(0,57)}…`:t}var zu=C`<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M4 2.5 7.5 6 4 9.5" /></svg>`;function Bu(e,t){if(!e)return w;if(e.kind===`raw`)return C`<div class="raw">
|
|
1060
|
+
<div class="raw__bar">${e.schemaFormat}</div>
|
|
1061
|
+
<pre tabindex="0" aria-label="Schema source, scrollable"><code>${e.source}</code></pre>
|
|
1062
|
+
</div>`;let{fields:n}=Fu(e),r=ju(e),i=Nu(e),a=t.state.allExpanded,o=r.length===0&&!i,s=t.label??(o?Pu(e)||`no fields`:`${n} field${n===1?``:`s`}`);return C`<div class="tree">
|
|
1063
|
+
<div class="tree__bar">
|
|
1064
|
+
<span class=${t.label||o?`mono`:``}>${s}</span>
|
|
1065
|
+
<span class="spacer"></span>
|
|
1066
|
+
${o?w:C`<button type="button" @click=${()=>t.state.setAll(!a)}>${a?`Collapse all`:`Expand all`}</button>`}
|
|
1067
|
+
</div>
|
|
1068
|
+
<div class="tree__body">
|
|
1069
|
+
${i?Wu(e,i,t,t.key,1):w}
|
|
1070
|
+
${r.length>0?Hu(r,t,t.key,1):i?w:Vu(e)}
|
|
1071
|
+
</div>
|
|
1072
|
+
</div>`}function Vu(e){let t=Lu(e);return!e.description&&!t?C`<p class="tree__empty">${Pu(e)?`A single value of type ${Pu(e)}.`:`No fields are described.`}</p>`:C`<div class="tree__leaf">
|
|
1073
|
+
${e.description?C`<div class="row__desc">${Q(e.description)}</div>`:w}
|
|
1074
|
+
${t?C`<div class="row__facts">${t}</div>`:w}
|
|
1075
|
+
</div>`}function Hu(e,t,n,r){return C`<ul class="branch" data-depth=${Math.min(r,9)}>
|
|
1076
|
+
${e.map(e=>Uu(e,t,`${n}/${e.name}`,r))}
|
|
1077
|
+
</ul>`}function Uu(e,t,n,r){let i=ju(e),a=Nu(e),o=i.length>0||a!==void 0,s=o&&t.state.isExpanded(n,r),c=o&&!s?Iu(e):0,l=Lu(e),u=e.circularRef?`#${t.prefix}--schemas--${Gi(e.circularRef)}`:void 0;return C`<li class="row ${r===1?`row--top`:``}">
|
|
1078
|
+
${o?C`<button
|
|
1079
|
+
class="row__toggle"
|
|
1080
|
+
type="button"
|
|
1081
|
+
aria-expanded=${s?`true`:`false`}
|
|
1082
|
+
aria-label="${s?`Collapse`:`Expand`} ${e.name}"
|
|
1083
|
+
@click=${()=>t.state.toggle(n,r)}
|
|
1084
|
+
>
|
|
1085
|
+
${zu}
|
|
1086
|
+
</button>`:C`<span class="row__spacer"></span>`}
|
|
1087
|
+
<div>
|
|
1088
|
+
<div class="row__line1">
|
|
1089
|
+
<span class="row__name">${e.name}</span>
|
|
1090
|
+
<span class="row__type">${Pu(e)}</span>
|
|
1091
|
+
${c>0?C`<span class="pill pill--outline row__hidden">${c} hidden</span>`:w}
|
|
1092
|
+
${e.required?C`<span class="row__req">required</span>`:C`<span class="row__req row__req--optional">optional</span>`}
|
|
1093
|
+
</div>
|
|
1094
|
+
${r>=4&&e.path.length>0?C`<div class="row__path">${e.path.join(` › `)}</div>`:w}
|
|
1095
|
+
${e.circularRef?C`<div class="row__circular">Circular reference to <a href=${u}>${e.circularRef}</a></div>`:w}
|
|
1096
|
+
${e.description?C`<div class="row__desc">${Q(e.description)}</div>`:w}
|
|
1097
|
+
${l?C`<div class="row__facts">${l}</div>`:w}
|
|
1098
|
+
${s&&a?Wu(e,a,t,n,r+1):w}
|
|
1099
|
+
${s&&i.length>0?Hu(i,t,n,r+1):w}
|
|
1100
|
+
</div>
|
|
1101
|
+
</li>`}function Wu(e,t,n,r,i){let a=Math.min(n.state.variant(r),t.variants.length-1),o=t.variants[a],s=ju(o.node);return C`
|
|
1102
|
+
<div class="variants" role="group" aria-label="${t.kind} variants of ${e.name||`the payload`}">
|
|
1103
|
+
<span class="variants__label">${t.kind}</span>
|
|
1104
|
+
${t.variants.map((e,t)=>C`<button type="button" aria-pressed=${t===a?`true`:`false`} @click=${()=>n.state.selectVariant(r,t)}>${e.title}</button>`)}
|
|
1105
|
+
</div>
|
|
1106
|
+
${s.length>0?C`${o.node.description?C`<div class="row__desc">${Q(o.node.description)}</div>`:w}
|
|
1107
|
+
${Hu(s,n,`${r}/${t.kind}${a}`,i)}`:Vu(o.node)}
|
|
1108
|
+
`}var Gu=l`
|
|
1109
|
+
.ops__list {
|
|
1110
|
+
display: grid;
|
|
1111
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1112
|
+
gap: 40px;
|
|
1113
|
+
}
|
|
1114
|
+
.op {
|
|
1115
|
+
min-width: 0;
|
|
1116
|
+
scroll-margin-top: 16px;
|
|
1117
|
+
}
|
|
1118
|
+
.op + .op {
|
|
1119
|
+
padding-top: 40px;
|
|
1120
|
+
border-top: 1px solid var(--_line);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.op__content {
|
|
1124
|
+
min-width: 0;
|
|
1125
|
+
}
|
|
1126
|
+
.op__content > .block:first-child {
|
|
1127
|
+
margin-top: 0;
|
|
1128
|
+
}
|
|
1129
|
+
.op__example {
|
|
1130
|
+
margin-top: 24px;
|
|
1131
|
+
}
|
|
1132
|
+
.sub-title .ex__show {
|
|
1133
|
+
flex-basis: 100%;
|
|
1134
|
+
justify-content: center;
|
|
1135
|
+
}
|
|
1136
|
+
.op__desc .md p {
|
|
1137
|
+
font-size: 15px;
|
|
1138
|
+
line-height: 1.6;
|
|
1139
|
+
}
|
|
1140
|
+
/* Wide main column: the example panel is a full-height dark column at the right edge of the
|
|
1141
|
+
block, level with the breadcrumb (design reference). The split depends on the main
|
|
1142
|
+
column's width, so beside a sidebar the panel stacks until both have room. */
|
|
1143
|
+
@container main (min-width: 1100px) {
|
|
1144
|
+
.op--split {
|
|
1145
|
+
display: grid;
|
|
1146
|
+
grid-template-columns: minmax(0, 1fr) var(--_example-width);
|
|
1147
|
+
column-gap: 36px;
|
|
1148
|
+
margin-right: calc(-1 * var(--_pad-x));
|
|
1149
|
+
}
|
|
1150
|
+
.op--split .op__intro,
|
|
1151
|
+
.op--split .op__content {
|
|
1152
|
+
grid-column: 1;
|
|
1153
|
+
}
|
|
1154
|
+
.op--split .op__example {
|
|
1155
|
+
grid-column: 2;
|
|
1156
|
+
grid-row: 1 / span 2;
|
|
1157
|
+
margin-top: 0;
|
|
1158
|
+
background: var(--_ex-bg);
|
|
1159
|
+
border-radius: var(--_radius) 0 0 var(--_radius);
|
|
1160
|
+
}
|
|
1161
|
+
.op--split .op__example .ex {
|
|
1162
|
+
position: sticky;
|
|
1163
|
+
top: 0;
|
|
1164
|
+
border-radius: 0;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
/* Badge/id, CHANNEL/address and Available on/servers share two columns so the values line up. */
|
|
1168
|
+
.op__facts {
|
|
1169
|
+
display: grid;
|
|
1170
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
1171
|
+
align-items: center;
|
|
1172
|
+
gap: 8px 12px;
|
|
1173
|
+
margin-bottom: 16px;
|
|
1174
|
+
}
|
|
1175
|
+
.op__facts .label {
|
|
1176
|
+
font-size: 13px;
|
|
1177
|
+
letter-spacing: 0.06em;
|
|
1178
|
+
}
|
|
1179
|
+
.op__facts .badge {
|
|
1180
|
+
justify-self: start;
|
|
1181
|
+
}
|
|
1182
|
+
.badge {
|
|
1183
|
+
display: inline-flex;
|
|
1184
|
+
align-items: center;
|
|
1185
|
+
height: 26px;
|
|
1186
|
+
padding: 0 10px;
|
|
1187
|
+
border-radius: var(--_radius-sm);
|
|
1188
|
+
font: 500 12px/1 var(--_font-mono);
|
|
1189
|
+
letter-spacing: 0.05em;
|
|
1190
|
+
text-transform: uppercase;
|
|
1191
|
+
white-space: nowrap;
|
|
1192
|
+
}
|
|
1193
|
+
.badge--send {
|
|
1194
|
+
background: var(--_send);
|
|
1195
|
+
color: var(--_badge-ink-send);
|
|
1196
|
+
}
|
|
1197
|
+
.badge--receive {
|
|
1198
|
+
background: var(--_receive);
|
|
1199
|
+
color: var(--_badge-ink-receive);
|
|
1200
|
+
}
|
|
1201
|
+
.op__tags {
|
|
1202
|
+
margin-bottom: 14px;
|
|
1203
|
+
}
|
|
1204
|
+
.op__tags .chip {
|
|
1205
|
+
min-height: 24px;
|
|
1206
|
+
padding: 2px 9px;
|
|
1207
|
+
font-size: 12px;
|
|
1208
|
+
}
|
|
1209
|
+
.op__hint {
|
|
1210
|
+
font: 400 12.5px/1.4 var(--_font-mono);
|
|
1211
|
+
color: var(--_muted);
|
|
1212
|
+
overflow-wrap: anywhere;
|
|
1213
|
+
}
|
|
1214
|
+
.op__heading {
|
|
1215
|
+
margin: 0 0 12px;
|
|
1216
|
+
font: 600 28px/1.2 var(--_font-heading);
|
|
1217
|
+
letter-spacing: -0.01em;
|
|
1218
|
+
color: var(--_ink);
|
|
1219
|
+
overflow-wrap: anywhere;
|
|
1220
|
+
}
|
|
1221
|
+
.op__id {
|
|
1222
|
+
display: flex;
|
|
1223
|
+
flex-wrap: wrap;
|
|
1224
|
+
gap: 4px 10px;
|
|
1225
|
+
font: 400 13px/1.5 var(--_font-mono);
|
|
1226
|
+
color: var(--_ink);
|
|
1227
|
+
overflow-wrap: anywhere;
|
|
1228
|
+
}
|
|
1229
|
+
@container viewer (max-width: 699px) {
|
|
1230
|
+
.op__heading {
|
|
1231
|
+
font-size: 22px;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
.op__heading:focus-visible {
|
|
1235
|
+
outline: 2px solid var(--_primary);
|
|
1236
|
+
outline-offset: 4px;
|
|
1237
|
+
border-radius: 2px;
|
|
1238
|
+
}
|
|
1239
|
+
.op__servers {
|
|
1240
|
+
display: flex;
|
|
1241
|
+
flex-wrap: wrap;
|
|
1242
|
+
gap: 4px 10px;
|
|
1243
|
+
}
|
|
1244
|
+
.op__server {
|
|
1245
|
+
font: 400 13px/1.5 var(--_font-mono);
|
|
1246
|
+
color: var(--_primary-text);
|
|
1247
|
+
}
|
|
1248
|
+
.op__address {
|
|
1249
|
+
font: 400 13px/1.5 var(--_font-mono);
|
|
1250
|
+
color: var(--_ink);
|
|
1251
|
+
word-break: break-all;
|
|
1252
|
+
}
|
|
1253
|
+
.op__address--none {
|
|
1254
|
+
color: var(--_muted);
|
|
1255
|
+
font-style: italic;
|
|
1256
|
+
}
|
|
1257
|
+
.param {
|
|
1258
|
+
color: var(--_primary-text);
|
|
1259
|
+
}
|
|
1260
|
+
.op__summary {
|
|
1261
|
+
margin: 0 0 12px;
|
|
1262
|
+
}
|
|
1263
|
+
.op__desc {
|
|
1264
|
+
max-width: 72ch;
|
|
1265
|
+
}
|
|
1266
|
+
.msg {
|
|
1267
|
+
margin-top: 32px;
|
|
1268
|
+
}
|
|
1269
|
+
.msg__head {
|
|
1270
|
+
display: flex;
|
|
1271
|
+
flex-wrap: wrap;
|
|
1272
|
+
align-items: baseline;
|
|
1273
|
+
gap: 6px 12px;
|
|
1274
|
+
margin-bottom: 10px;
|
|
1275
|
+
}
|
|
1276
|
+
.msg__name {
|
|
1277
|
+
font: 600 15px/1.4 var(--_font-heading);
|
|
1278
|
+
color: var(--_ink);
|
|
1279
|
+
}
|
|
1280
|
+
.msg__format {
|
|
1281
|
+
margin-left: auto;
|
|
1282
|
+
font: 400 12px/1.5 var(--_font-mono);
|
|
1283
|
+
color: var(--_muted);
|
|
1284
|
+
overflow-wrap: anywhere;
|
|
1285
|
+
}
|
|
1286
|
+
.msg__tabs {
|
|
1287
|
+
display: flex;
|
|
1288
|
+
flex-wrap: wrap;
|
|
1289
|
+
gap: 4px;
|
|
1290
|
+
margin-bottom: 14px;
|
|
1291
|
+
padding-bottom: 0;
|
|
1292
|
+
border-bottom: 1px solid var(--_line);
|
|
1293
|
+
}
|
|
1294
|
+
.msg__tab {
|
|
1295
|
+
min-height: 40px;
|
|
1296
|
+
padding: 0 12px;
|
|
1297
|
+
border: 0;
|
|
1298
|
+
border-bottom: 2px solid transparent;
|
|
1299
|
+
margin-bottom: -1px;
|
|
1300
|
+
background: none;
|
|
1301
|
+
color: var(--_ink-2);
|
|
1302
|
+
font: 500 13px/1 var(--_font-body);
|
|
1303
|
+
cursor: pointer;
|
|
1304
|
+
}
|
|
1305
|
+
.msg__tab[aria-selected='true'] {
|
|
1306
|
+
color: var(--_primary-text);
|
|
1307
|
+
border-bottom-color: var(--_primary);
|
|
1308
|
+
}
|
|
1309
|
+
.msg__tab:focus-visible {
|
|
1310
|
+
outline: 2px solid var(--_primary);
|
|
1311
|
+
outline-offset: -2px;
|
|
1312
|
+
border-radius: var(--_radius-sm);
|
|
1313
|
+
}
|
|
1314
|
+
.msg__part {
|
|
1315
|
+
margin-top: 16px;
|
|
1316
|
+
}
|
|
1317
|
+
.msg__desc {
|
|
1318
|
+
margin-bottom: 12px;
|
|
1319
|
+
font-size: 13px;
|
|
1320
|
+
color: var(--_ink-2);
|
|
1321
|
+
}
|
|
1322
|
+
@container viewer (max-width: 699px) {
|
|
1323
|
+
.op + .op {
|
|
1324
|
+
padding-top: 28px;
|
|
1325
|
+
}
|
|
1326
|
+
.ops__list {
|
|
1327
|
+
gap: 28px;
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
`;function Ku(e,t){return`${e}--operations--${t.anchor}`}function qu(e){let t=e.channel.address;return t===null?C`<span class="op__address op__address--none">Address not specified</span>`:C`<span class="op__address">${t.split(/(\{[^}]+\})/g).filter(e=>e!==``).map(e=>/^\{[^}]+\}$/.test(e)?C`<span class="param">${e}</span>`:e)}</span>`}function Ju(e,t,n,r,i,a){let o=`${n}--m${r}`;return C`<div class="msg">
|
|
1331
|
+
${e.messages.length>1?C`<div class="msg__tabs" role="tablist" aria-label="Messages of ${e.heading}">
|
|
1332
|
+
${e.messages.map((t,a)=>C`<button
|
|
1333
|
+
class="msg__tab"
|
|
1334
|
+
type="button"
|
|
1335
|
+
role="tab"
|
|
1336
|
+
id="${n}--tab-${a}"
|
|
1337
|
+
aria-selected=${a===r?`true`:`false`}
|
|
1338
|
+
aria-controls="${n}--message"
|
|
1339
|
+
tabindex=${a===r?`0`:`-1`}
|
|
1340
|
+
@click=${()=>i.selectMessage(n,a)}
|
|
1341
|
+
@keydown=${t=>{let a=t.key===`ArrowRight`?1:t.key===`ArrowLeft`?-1:0;if(a===0)return;let o=(r+a+e.messages.length)%e.messages.length;i.selectMessage(n,o),t.preventDefault(),t.currentTarget.parentElement?.querySelectorAll(`.msg__tab`)[o]?.focus()}}
|
|
1342
|
+
>
|
|
1343
|
+
${t.id}
|
|
1344
|
+
</button>`)}
|
|
1345
|
+
</div>`:w}
|
|
1346
|
+
<div id="${n}--message" role=${e.messages.length>1?`tabpanel`:w} aria-labelledby=${e.messages.length>1?`${n}--tab-${r}`:w}>
|
|
1347
|
+
<h4 class="sub-title">
|
|
1348
|
+
Message <span class="mono">${t.title??t.name??t.id}</span>
|
|
1349
|
+
<span class="sub-title__meta">${t.contentType} · ${Ou(t.schemaFormat)}</span>
|
|
1350
|
+
${a}
|
|
1351
|
+
</h4>
|
|
1352
|
+
${t.summary?C`<div class="msg__desc">${Q(t.summary)}</div>`:w}
|
|
1353
|
+
${t.description?C`<div class="msg__desc">${Yl(t.description)}</div>`:w}
|
|
1354
|
+
${t.payload?Bu(t.payload,{label:t.id,prefix:i.prefix,key:`${o}--payload`,state:i.tree(`${o}--payload`)}):C`<p class="tree__empty">This message has no payload schema.</p>`}
|
|
1355
|
+
${t.headers?C`<div class="msg__part">
|
|
1356
|
+
<h4 class="sub-title">Headers</h4>
|
|
1357
|
+
${Bu(t.headers,{prefix:i.prefix,key:`${o}--headers`,state:i.tree(`${o}--headers`)})}
|
|
1358
|
+
</div>`:w}
|
|
1359
|
+
</div>
|
|
1360
|
+
</div>`}function Yu(e,t){let n=t.prefix,r=Ku(n,e),i=e.action===`send`?`send`:`receive`,a=Math.min(t.messageIndex(r),Math.max(e.messages.length-1,0)),o=e.messages[a],s=o?bu(o):[],c=t.example(`${r}--example--m${a}`),l=s.length>0&&xu(c),u=[...e.channel.bindings,...e.bindings,...o?.bindings??[]];return C`
|
|
1361
|
+
<article class="op ${l?`op--split`:``}" id=${r} aria-labelledby="${r}--heading">
|
|
1362
|
+
<div class="op__intro">
|
|
1363
|
+
${e.tags.length>0?C`<ul class="chips op__tags" aria-label="Tags">
|
|
1364
|
+
${e.tags.map(e=>Fa(e))}
|
|
1365
|
+
</ul>`:w}
|
|
1366
|
+
<h3 class="op__heading" id="${r}--heading" tabindex="-1">${e.heading}</h3>
|
|
1367
|
+
<div class="op__facts">
|
|
1368
|
+
<span class="badge badge--${i}">${e.badgeLabel}</span>
|
|
1369
|
+
<span class="op__id">
|
|
1370
|
+
${e.id}
|
|
1371
|
+
${e.locationHint!==e.id&&e.locationHint!==e.heading?C`<span class="op__hint">${e.locationHint}</span>`:w}
|
|
1372
|
+
</span>
|
|
1373
|
+
<span class="label">Channel</span>
|
|
1374
|
+
${qu(e)}
|
|
1375
|
+
${e.channel.servers.length>0?C`<span class="label">Available on</span>
|
|
1376
|
+
<span class="op__servers">
|
|
1377
|
+
${e.channel.servers.map(e=>C`<a class="op__server" href="#${n}--servers--${Gi(e)}">${e}</a>`)}
|
|
1378
|
+
</span>`:w}
|
|
1379
|
+
</div>
|
|
1380
|
+
${e.summary?C`<p class="summary op__summary">${Q(e.summary)}</p>`:w}
|
|
1381
|
+
${e.description?C`<div class="op__desc">${Yl(e.description)}</div>`:w}
|
|
1382
|
+
${$l(e.channel.parameters,r)}
|
|
1383
|
+
</div>
|
|
1384
|
+
<div class="op__content">
|
|
1385
|
+
${o?Ju(e,o,r,a,t,s.length>0&&!l?Cu(c):w):C`<p class="tree__empty block">This operation has no messages.</p>`}
|
|
1386
|
+
${iu(u)}
|
|
1387
|
+
${lu(e.security,`pill`,`#${n}--servers`)}
|
|
1388
|
+
${e.reply?uu(e.reply,n):w}
|
|
1389
|
+
</div>
|
|
1390
|
+
${l&&o?C`<div class="op__example">${wu(o,s,c,`${r}--example`)}</div>`:w}
|
|
1391
|
+
</article>
|
|
1392
|
+
`}function Xu(e,t){if(e.operations.length===0)return w;let n=`${t.prefix}--operations`;return C`
|
|
1393
|
+
<section class="ops" aria-labelledby=${n}>
|
|
1394
|
+
<h2 class="section-title" id=${n} tabindex="-1">Operations</h2>
|
|
1395
|
+
<div class="ops__list">${e.operations.map(e=>Yu(e,t))}</div>
|
|
1396
|
+
</section>
|
|
1397
|
+
`}function Zu(e,t,n,r){let i=[];if(r.info&&i.push({kind:`section`,label:e.title,anchor:`${n}--info`,search:[]}),r.servers&&e.servers.length>0&&(i.push({kind:`section`,label:`Servers`,anchor:`${n}--servers`,count:e.servers.length,search:[]}),r.showServers!==`byDefault`))for(let t of e.servers){let a=Qu(t.tags.map(e=>e.name),e,r.showServers===`bySpecTags`);i.push({kind:`server`,label:t.id,anchor:`${n}--servers--${t.anchor}`,group:a,sub:t.hostDisplay,search:[]})}for(let a of t){let t=r.showOperations===`byDefault`?`Operations`:Qu(a.tags.map(e=>e.name),e,r.showOperations===`bySpecTags`),o=a.tags.map(e=>e.name);i.push({kind:`operation`,label:a.heading,anchor:`${n}--operations--${a.anchor}`,group:t,badge:{label:a.badgeLabel,action:a.action},tags:o,search:[a.heading,a.id,a.channel.address??``,...a.messages.flatMap(e=>[e.name??``,e.title??``]),...o].filter(e=>e!==``).map(e=>e.toLowerCase())})}return r.messages&&e.messages.length>0&&i.push({kind:`section`,label:`Messages`,anchor:`${n}--messages`,group:`Components`,count:e.messages.length,search:[]}),r.schemas&&e.schemas.length>0&&i.push({kind:`section`,label:`Schemas`,anchor:`${n}--schemas`,group:`Components`,count:e.schemas.length,search:[]}),i}function Qu(e,t,n){return n?t.tags.map(e=>e.name).find(t=>e.includes(t))??`Other`:e[0]??`Other`}function $u(e,t){let n=new Map;for(let e of t)for(let t of e.tags)n.set(t.name,(n.get(t.name)??0)+1);let r=[],i=new Set,a=(e,t)=>{let a=n.get(e);if(a===void 0||i.has(e))return;i.add(e);let o={name:e,count:a};t&&(o.description=t),r.push(o)};for(let t of e.tags)a(t.name,t.description);for(let e of t)for(let t of e.tags)a(t.name,t.description);return r}function ed(e,t){let n=t.toLowerCase().split(/\s+/).filter(e=>e!==``);return n.length===0||n.every(t=>e.search.some(e=>e.includes(t)))}function td(e,t,n,r=new Set){let i=t.trim()!==``,a=i||r.size>0,o=e.filter(e=>e.kind===`operation`).length;if(!a)return{items:e,shown:o,total:o,active:a};let s=e=>r.size===0||(e.tags??[]).some(e=>r.has(e)),c=e.filter(e=>e.kind===`operation`?ed(e,t)&&s(e):n||!i);return{items:c,shown:c.filter(e=>e.kind===`operation`).length,total:o,active:a}}function nd(e){let t=[];for(let n of e){let e=t[t.length-1];e&&e.group===n.group?e.items.push(n):t.push({group:n.group,items:[n]})}return t}var rd=l`
|
|
1398
|
+
.cards {
|
|
1399
|
+
display: grid;
|
|
1400
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1401
|
+
gap: 16px;
|
|
1402
|
+
}
|
|
1403
|
+
.card {
|
|
1404
|
+
min-width: 0;
|
|
1405
|
+
padding: 16px 18px;
|
|
1406
|
+
border: 1px solid var(--_line);
|
|
1407
|
+
border-radius: var(--_radius);
|
|
1408
|
+
background: var(--_surface);
|
|
1409
|
+
scroll-margin-top: 16px;
|
|
1410
|
+
}
|
|
1411
|
+
.card__head {
|
|
1412
|
+
display: flex;
|
|
1413
|
+
flex-wrap: wrap;
|
|
1414
|
+
align-items: baseline;
|
|
1415
|
+
gap: 6px 12px;
|
|
1416
|
+
margin-bottom: 8px;
|
|
1417
|
+
}
|
|
1418
|
+
.card__id {
|
|
1419
|
+
margin: 0;
|
|
1420
|
+
font: 600 15px/1.4 var(--_font-heading);
|
|
1421
|
+
color: var(--_ink);
|
|
1422
|
+
}
|
|
1423
|
+
.card__id:focus-visible {
|
|
1424
|
+
outline: 2px solid var(--_primary);
|
|
1425
|
+
outline-offset: 4px;
|
|
1426
|
+
}
|
|
1427
|
+
.card__meta {
|
|
1428
|
+
font: 400 12.5px/1.5 var(--_font-mono);
|
|
1429
|
+
color: var(--_muted);
|
|
1430
|
+
overflow-wrap: anywhere;
|
|
1431
|
+
min-width: 0;
|
|
1432
|
+
}
|
|
1433
|
+
.card__host {
|
|
1434
|
+
font: 400 14px/1.5 var(--_font-mono);
|
|
1435
|
+
color: var(--_ink);
|
|
1436
|
+
word-break: break-all;
|
|
1437
|
+
margin-bottom: 6px;
|
|
1438
|
+
}
|
|
1439
|
+
.card__desc {
|
|
1440
|
+
font-size: 13px;
|
|
1441
|
+
color: var(--_ink-2);
|
|
1442
|
+
}
|
|
1443
|
+
.vars {
|
|
1444
|
+
width: 100%;
|
|
1445
|
+
margin-top: 12px;
|
|
1446
|
+
border-collapse: collapse;
|
|
1447
|
+
font-size: 13px;
|
|
1448
|
+
}
|
|
1449
|
+
.vars th {
|
|
1450
|
+
text-align: left;
|
|
1451
|
+
font: 500 11px/1.6 var(--_font-body);
|
|
1452
|
+
text-transform: uppercase;
|
|
1453
|
+
letter-spacing: 0.08em;
|
|
1454
|
+
color: var(--_muted);
|
|
1455
|
+
padding: 6px 10px 6px 0;
|
|
1456
|
+
border-bottom: 1px solid var(--_line);
|
|
1457
|
+
}
|
|
1458
|
+
.vars td {
|
|
1459
|
+
padding: 7px 10px 7px 0;
|
|
1460
|
+
vertical-align: top;
|
|
1461
|
+
border-bottom: 1px solid var(--_line);
|
|
1462
|
+
color: var(--_ink-2);
|
|
1463
|
+
}
|
|
1464
|
+
.vars tr:last-child td {
|
|
1465
|
+
border-bottom: 0;
|
|
1466
|
+
}
|
|
1467
|
+
.vars .mono {
|
|
1468
|
+
font-size: 12.5px;
|
|
1469
|
+
}
|
|
1470
|
+
.vars__name {
|
|
1471
|
+
color: var(--_primary-text);
|
|
1472
|
+
}
|
|
1473
|
+
.msg-example {
|
|
1474
|
+
margin-top: 16px;
|
|
1475
|
+
}
|
|
1476
|
+
details.entry {
|
|
1477
|
+
border: 1px solid var(--_line);
|
|
1478
|
+
border-radius: var(--_radius);
|
|
1479
|
+
background: var(--_surface);
|
|
1480
|
+
scroll-margin-top: 16px;
|
|
1481
|
+
}
|
|
1482
|
+
details.entry + details.entry {
|
|
1483
|
+
margin-top: 10px;
|
|
1484
|
+
}
|
|
1485
|
+
details.entry > summary {
|
|
1486
|
+
display: flex;
|
|
1487
|
+
flex-wrap: wrap;
|
|
1488
|
+
align-items: baseline;
|
|
1489
|
+
gap: 6px 12px;
|
|
1490
|
+
min-height: 44px;
|
|
1491
|
+
padding: 10px 16px;
|
|
1492
|
+
cursor: pointer;
|
|
1493
|
+
list-style: none;
|
|
1494
|
+
font: 600 14px/1.5 var(--_font-mono);
|
|
1495
|
+
color: var(--_ink);
|
|
1496
|
+
}
|
|
1497
|
+
details.entry > summary::-webkit-details-marker {
|
|
1498
|
+
display: none;
|
|
1499
|
+
}
|
|
1500
|
+
details.entry > summary::before {
|
|
1501
|
+
content: '';
|
|
1502
|
+
width: 7px;
|
|
1503
|
+
height: 7px;
|
|
1504
|
+
margin-right: 2px;
|
|
1505
|
+
border-right: 1.5px solid var(--_muted);
|
|
1506
|
+
border-bottom: 1.5px solid var(--_muted);
|
|
1507
|
+
transform: rotate(-45deg);
|
|
1508
|
+
transition: transform 120ms;
|
|
1509
|
+
align-self: center;
|
|
1510
|
+
}
|
|
1511
|
+
details.entry[open] > summary::before {
|
|
1512
|
+
transform: rotate(45deg);
|
|
1513
|
+
}
|
|
1514
|
+
details.entry > summary:focus-visible {
|
|
1515
|
+
outline: 2px solid var(--_primary);
|
|
1516
|
+
outline-offset: -2px;
|
|
1517
|
+
border-radius: var(--_radius);
|
|
1518
|
+
}
|
|
1519
|
+
.entry__body {
|
|
1520
|
+
padding: 0 16px 16px;
|
|
1521
|
+
}
|
|
1522
|
+
.entry__body .tree,
|
|
1523
|
+
.entry__body .raw {
|
|
1524
|
+
border-color: var(--_line);
|
|
1525
|
+
}
|
|
1526
|
+
.entry__body > .block:first-child {
|
|
1527
|
+
margin-top: 4px;
|
|
1528
|
+
}
|
|
1529
|
+
.entry__title {
|
|
1530
|
+
font: 600 14px/1.5 var(--_font-heading);
|
|
1531
|
+
color: var(--_ink);
|
|
1532
|
+
}
|
|
1533
|
+
.entry__host {
|
|
1534
|
+
margin-left: auto;
|
|
1535
|
+
word-break: break-all;
|
|
1536
|
+
}
|
|
1537
|
+
.entry__body .card__desc + .card__desc {
|
|
1538
|
+
margin-top: 6px;
|
|
1539
|
+
}
|
|
1540
|
+
.entry__body .vars {
|
|
1541
|
+
margin-top: 12px;
|
|
1542
|
+
}
|
|
1543
|
+
.entry__desc {
|
|
1544
|
+
padding: 0 16px 12px;
|
|
1545
|
+
font-size: 13px;
|
|
1546
|
+
color: var(--_ink-2);
|
|
1547
|
+
}
|
|
1548
|
+
.entry__tags {
|
|
1549
|
+
margin-bottom: 12px;
|
|
1550
|
+
}
|
|
1551
|
+
.entry__tags .chip {
|
|
1552
|
+
min-height: 24px;
|
|
1553
|
+
padding: 2px 9px;
|
|
1554
|
+
font-size: 12px;
|
|
1555
|
+
}
|
|
1556
|
+
.problems {
|
|
1557
|
+
margin: 0;
|
|
1558
|
+
padding: 0;
|
|
1559
|
+
list-style: none;
|
|
1560
|
+
display: grid;
|
|
1561
|
+
gap: 8px;
|
|
1562
|
+
}
|
|
1563
|
+
.problems li {
|
|
1564
|
+
padding: 10px 14px;
|
|
1565
|
+
border: 1px solid var(--_line);
|
|
1566
|
+
border-left: 3px solid var(--_secondary);
|
|
1567
|
+
border-radius: var(--_radius-sm);
|
|
1568
|
+
background: var(--_surface);
|
|
1569
|
+
font-size: 13px;
|
|
1570
|
+
color: var(--_ink);
|
|
1571
|
+
}
|
|
1572
|
+
.problems li[data-severity='warning'] {
|
|
1573
|
+
border-left-color: var(--_line-2);
|
|
1574
|
+
}
|
|
1575
|
+
.problems__where {
|
|
1576
|
+
display: block;
|
|
1577
|
+
margin-top: 2px;
|
|
1578
|
+
font: 400 12px/1.5 var(--_font-mono);
|
|
1579
|
+
color: var(--_muted);
|
|
1580
|
+
overflow-wrap: anywhere;
|
|
1581
|
+
}
|
|
1582
|
+
`;function id(e){return e.length===0?w:C`<ul class="chips entry__tags" aria-label="Tags">
|
|
1583
|
+
${e.map(e=>Fa(e))}
|
|
1584
|
+
</ul>`}function ad(e,t){return C`<details class="entry" id=${`${t}--servers--${e.anchor}`}>
|
|
1585
|
+
<summary>
|
|
1586
|
+
<span class="entry__title">${e.id}</span>
|
|
1587
|
+
<span class="card__meta">${e.protocol}${e.protocolVersion?` ${e.protocolVersion}`:``}</span>
|
|
1588
|
+
<span class="card__meta entry__host">${e.hostDisplay||`Host not specified`}</span>
|
|
1589
|
+
</summary>
|
|
1590
|
+
<div class="entry__body">
|
|
1591
|
+
${e.title?C`<div class="card__desc"><strong>${e.title}</strong></div>`:w}
|
|
1592
|
+
${e.summary?C`<div class="card__desc">${Q(e.summary)}</div>`:w}
|
|
1593
|
+
${e.description?C`<div class="card__desc">${Yl(e.description)}</div>`:w}
|
|
1594
|
+
${id(e.tags)}
|
|
1595
|
+
${e.variables.length>0?C`<table class="vars">
|
|
1596
|
+
<thead><tr><th>Variable</th><th>Enum</th><th>Default</th><th>Description</th></tr></thead>
|
|
1597
|
+
<tbody>
|
|
1598
|
+
${e.variables.map(e=>C`<tr>
|
|
1599
|
+
<td class="mono vars__name">${e.name}</td>
|
|
1600
|
+
<td class="mono">${e.enum?.join(` · `)??``}</td>
|
|
1601
|
+
<td class="mono">${e.default??``}</td>
|
|
1602
|
+
<td>${Q(e.description)}${e.examples?C` <span class="card__meta">examples: ${e.examples.join(` · `)}</span>`:w}</td>
|
|
1603
|
+
</tr>`)}
|
|
1604
|
+
</tbody>
|
|
1605
|
+
</table>`:w}
|
|
1606
|
+
${lu(e.security,`split`)}
|
|
1607
|
+
${iu(e.bindings,`Bindings`,`split`)}
|
|
1608
|
+
</div>
|
|
1609
|
+
</details>`}function od(e,t){if(e.servers.length===0)return w;let n=`${t}--servers`;return C`<section aria-labelledby=${n}>
|
|
1610
|
+
<h2 class="section-title" id=${n} tabindex="-1">Servers</h2>
|
|
1611
|
+
${e.servers.map(e=>ad(e,t))}
|
|
1612
|
+
</section>`}function sd(e,t,n){let r=`${t.prefix}--messages--${e.anchor}`,i=n?bu(e):[],a=e.title??e.name??e.id;return C`<details class="entry" id=${r}>
|
|
1613
|
+
<summary>
|
|
1614
|
+
<span class="entry__title">${a}</span>
|
|
1615
|
+
${e.name&&e.name!==a?C`<span class="card__meta">${e.name}</span>`:w}
|
|
1616
|
+
<span class="card__meta">${e.contentType} · ${e.schemaFormat}</span>
|
|
1617
|
+
</summary>
|
|
1618
|
+
${e.summary?C`<div class="entry__desc">${Q(e.summary)}</div>`:w}
|
|
1619
|
+
${e.description?C`<div class="entry__desc">${Yl(e.description)}</div>`:w}
|
|
1620
|
+
<div class="entry__body">
|
|
1621
|
+
${id(e.tags)}
|
|
1622
|
+
${e.payload?C`<div class="block"><h4 class="sub-title">Payload</h4>${Bu(e.payload,{label:e.id,prefix:t.prefix,key:`${r}--payload`,state:t.tree(`${r}--payload`)})}</div>`:w}
|
|
1623
|
+
${e.headers?C`<div class="block"><h4 class="sub-title">Headers</h4>${Bu(e.headers,{prefix:t.prefix,key:`${r}--headers`,state:t.tree(`${r}--headers`)})}</div>`:w}
|
|
1624
|
+
${i.length>0?C`<div class="msg-example">${wu(e,i,t.example(`${r}--example`),`${r}--example`)}</div>`:w}
|
|
1625
|
+
${iu(e.bindings)}
|
|
1626
|
+
</div>
|
|
1627
|
+
</details>`}function cd(e,t,n){if(e.messages.length===0)return w;let r=`${t.prefix}--messages`;return C`<section aria-labelledby=${r}>
|
|
1628
|
+
<h2 class="section-title" id=${r} tabindex="-1">Messages</h2>
|
|
1629
|
+
${e.messages.map(e=>sd(e,t,n))}
|
|
1630
|
+
</section>`}function ld(e,t){if(e.schemas.length===0)return w;let n=`${t.prefix}--schemas`;return C`<section aria-labelledby=${n}>
|
|
1631
|
+
<h2 class="section-title" id=${n} tabindex="-1">Schemas</h2>
|
|
1632
|
+
${e.schemas.map(e=>{let n=`${t.prefix}--schemas--${e.anchor}`,r=e.schema.kind===`node`?Pu(e.schema):e.schema.schemaFormat;return C`<details class="entry" id=${n}>
|
|
1633
|
+
<summary><span class="entry__title mono">${e.id}</span> ${r?C`<span class="card__meta">${r}</span>`:w}</summary>
|
|
1634
|
+
<div class="entry__body">${Bu(e.schema,{prefix:t.prefix,key:n,state:t.tree(n)})}</div>
|
|
1635
|
+
</details>`})}
|
|
1636
|
+
</section>`}function ud(e,t){if(e.length===0)return w;let n=`${t}--problems`;return C`<section aria-labelledby=${n}>
|
|
1637
|
+
<h2 class="section-title" id=${n} tabindex="-1">Problems</h2>
|
|
1638
|
+
<ul class="problems">
|
|
1639
|
+
${e.map(e=>C`<li data-severity=${e.severity}>
|
|
1640
|
+
${e.message}
|
|
1641
|
+
<span class="problems__where">${e.severity} · at ${e.where}</span>
|
|
1642
|
+
</li>`)}
|
|
1643
|
+
</ul>
|
|
1644
|
+
</section>`}var dd=l`
|
|
1645
|
+
.layout {
|
|
1646
|
+
display: grid;
|
|
1647
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1648
|
+
}
|
|
1649
|
+
.main {
|
|
1650
|
+
min-width: 0;
|
|
1651
|
+
container-type: inline-size;
|
|
1652
|
+
container-name: main;
|
|
1653
|
+
}
|
|
1654
|
+
/* Base rule first, so the wide-container rule below wins on equal specificity. */
|
|
1655
|
+
.side__resize {
|
|
1656
|
+
display: none;
|
|
1657
|
+
}
|
|
1658
|
+
@container viewer (min-width: 1100px) {
|
|
1659
|
+
.layout--sidebar {
|
|
1660
|
+
position: relative;
|
|
1661
|
+
grid-template-columns: var(--_side-width, 292px) minmax(0, 1fr);
|
|
1662
|
+
}
|
|
1663
|
+
.layout--resizing {
|
|
1664
|
+
cursor: col-resize;
|
|
1665
|
+
user-select: none;
|
|
1666
|
+
}
|
|
1667
|
+
/* Resize handle (amendment 19): straddles the boundary, shows on hover, focus and drag. */
|
|
1668
|
+
.side__resize {
|
|
1669
|
+
display: block;
|
|
1670
|
+
position: absolute;
|
|
1671
|
+
top: 0;
|
|
1672
|
+
bottom: 0;
|
|
1673
|
+
left: calc(var(--_side-width, 292px) - 4px);
|
|
1674
|
+
width: 9px;
|
|
1675
|
+
z-index: 5;
|
|
1676
|
+
cursor: col-resize;
|
|
1677
|
+
touch-action: none;
|
|
1678
|
+
outline: none;
|
|
1679
|
+
}
|
|
1680
|
+
.side__resize::after {
|
|
1681
|
+
content: '';
|
|
1682
|
+
position: absolute;
|
|
1683
|
+
inset: 0 3px;
|
|
1684
|
+
background: transparent;
|
|
1685
|
+
transition: background 120ms;
|
|
1686
|
+
}
|
|
1687
|
+
.side__resize:hover::after,
|
|
1688
|
+
.side__resize:focus-visible::after,
|
|
1689
|
+
.side__resize--active::after {
|
|
1690
|
+
background: var(--_primary);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
.side {
|
|
1694
|
+
background: var(--_sidebar);
|
|
1695
|
+
border-right: 1px solid var(--_line);
|
|
1696
|
+
}
|
|
1697
|
+
@container viewer (min-width: 1100px) {
|
|
1698
|
+
.side {
|
|
1699
|
+
position: sticky;
|
|
1700
|
+
top: 0;
|
|
1701
|
+
max-height: 100vh;
|
|
1702
|
+
overflow: auto;
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
.side__panel {
|
|
1706
|
+
display: flex;
|
|
1707
|
+
flex-direction: column;
|
|
1708
|
+
}
|
|
1709
|
+
@container viewer (min-width: 1100px) {
|
|
1710
|
+
.side__panel {
|
|
1711
|
+
min-height: 100%;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
.side__inner {
|
|
1715
|
+
display: flex;
|
|
1716
|
+
flex-direction: column;
|
|
1717
|
+
flex: 1 0 auto;
|
|
1718
|
+
min-height: 0;
|
|
1719
|
+
padding: 16px 12px 24px;
|
|
1720
|
+
}
|
|
1721
|
+
/* Items under a group heading sit a step in from it (specific enough to beat the list reset). */
|
|
1722
|
+
.side .side__block--grouped > ul {
|
|
1723
|
+
padding-left: 12px;
|
|
1724
|
+
}
|
|
1725
|
+
.side__block--components {
|
|
1726
|
+
margin-top: auto;
|
|
1727
|
+
padding-top: 12px;
|
|
1728
|
+
border-top: 1px solid var(--_line);
|
|
1729
|
+
}
|
|
1730
|
+
.side__search {
|
|
1731
|
+
display: block;
|
|
1732
|
+
width: 100%;
|
|
1733
|
+
min-height: 40px;
|
|
1734
|
+
margin-bottom: 12px;
|
|
1735
|
+
padding: 0 12px;
|
|
1736
|
+
border: 1px solid var(--_line);
|
|
1737
|
+
border-radius: var(--_radius-sm);
|
|
1738
|
+
background: var(--_surface);
|
|
1739
|
+
color: var(--_ink);
|
|
1740
|
+
font: 13px/1 var(--_font-body);
|
|
1741
|
+
}
|
|
1742
|
+
.side__search:focus-visible {
|
|
1743
|
+
outline: 2px solid var(--_primary);
|
|
1744
|
+
outline-offset: 1px;
|
|
1745
|
+
}
|
|
1746
|
+
.side__group {
|
|
1747
|
+
display: flex;
|
|
1748
|
+
justify-content: space-between;
|
|
1749
|
+
margin: 18px 10px 6px;
|
|
1750
|
+
font: 500 11px/1 var(--_font-body);
|
|
1751
|
+
text-transform: uppercase;
|
|
1752
|
+
letter-spacing: 0.08em;
|
|
1753
|
+
color: var(--_muted);
|
|
1754
|
+
}
|
|
1755
|
+
.side__group .mono {
|
|
1756
|
+
letter-spacing: 0;
|
|
1757
|
+
}
|
|
1758
|
+
.side ul {
|
|
1759
|
+
list-style: none;
|
|
1760
|
+
margin: 0;
|
|
1761
|
+
padding: 0;
|
|
1762
|
+
}
|
|
1763
|
+
.side__item {
|
|
1764
|
+
display: grid;
|
|
1765
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
1766
|
+
align-items: center;
|
|
1767
|
+
column-gap: 8px;
|
|
1768
|
+
min-height: 44px;
|
|
1769
|
+
padding: 6px 10px;
|
|
1770
|
+
border-radius: var(--_radius-sm);
|
|
1771
|
+
color: var(--_ink);
|
|
1772
|
+
text-decoration: none;
|
|
1773
|
+
font-size: 13px;
|
|
1774
|
+
line-height: 1.35;
|
|
1775
|
+
}
|
|
1776
|
+
.side__item:hover {
|
|
1777
|
+
background: color-mix(in srgb, var(--_primary) 6%, transparent);
|
|
1778
|
+
}
|
|
1779
|
+
.side__item:focus-visible {
|
|
1780
|
+
outline: 2px solid var(--_primary);
|
|
1781
|
+
outline-offset: -2px;
|
|
1782
|
+
}
|
|
1783
|
+
.side__item[aria-current='true'] {
|
|
1784
|
+
background: var(--_tint);
|
|
1785
|
+
font-weight: 600;
|
|
1786
|
+
}
|
|
1787
|
+
.side__item--section {
|
|
1788
|
+
font-weight: 500;
|
|
1789
|
+
}
|
|
1790
|
+
/* No badge: no badge column, so the label starts where the group headings start. */
|
|
1791
|
+
.side__item--plain {
|
|
1792
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1793
|
+
}
|
|
1794
|
+
.side__item--plain .side__label,
|
|
1795
|
+
.side__item--plain .side__sub {
|
|
1796
|
+
grid-column: 1;
|
|
1797
|
+
}
|
|
1798
|
+
.side__item--plain .side__count {
|
|
1799
|
+
grid-column: 2;
|
|
1800
|
+
}
|
|
1801
|
+
.side__badge {
|
|
1802
|
+
align-self: center;
|
|
1803
|
+
height: 18px;
|
|
1804
|
+
padding: 0 6px;
|
|
1805
|
+
border-radius: 5px;
|
|
1806
|
+
font: 500 10px/18px var(--_font-mono);
|
|
1807
|
+
letter-spacing: 0.04em;
|
|
1808
|
+
text-transform: uppercase;
|
|
1809
|
+
}
|
|
1810
|
+
.side__badge--send {
|
|
1811
|
+
background: var(--_send);
|
|
1812
|
+
color: var(--_badge-ink-send);
|
|
1813
|
+
}
|
|
1814
|
+
.side__badge--receive {
|
|
1815
|
+
background: var(--_receive);
|
|
1816
|
+
color: var(--_badge-ink-receive);
|
|
1817
|
+
}
|
|
1818
|
+
.side__label {
|
|
1819
|
+
grid-column: 2;
|
|
1820
|
+
align-self: center;
|
|
1821
|
+
overflow-wrap: anywhere;
|
|
1822
|
+
}
|
|
1823
|
+
.side__sub {
|
|
1824
|
+
grid-column: 2;
|
|
1825
|
+
font: 400 11.5px/1.4 var(--_font-mono);
|
|
1826
|
+
color: var(--_muted);
|
|
1827
|
+
overflow-wrap: anywhere;
|
|
1828
|
+
}
|
|
1829
|
+
.side__count {
|
|
1830
|
+
grid-column: 3;
|
|
1831
|
+
grid-row: 1;
|
|
1832
|
+
font: 400 12px/1 var(--_font-mono);
|
|
1833
|
+
color: var(--_muted);
|
|
1834
|
+
}
|
|
1835
|
+
/* Tags block: a header row that looks like a group heading, with a disclosure button. */
|
|
1836
|
+
.side__tags {
|
|
1837
|
+
margin-top: 6px;
|
|
1838
|
+
}
|
|
1839
|
+
.side__tags-head {
|
|
1840
|
+
justify-content: flex-start;
|
|
1841
|
+
align-items: center;
|
|
1842
|
+
gap: 8px;
|
|
1843
|
+
margin-bottom: 0;
|
|
1844
|
+
padding: 6px 0;
|
|
1845
|
+
}
|
|
1846
|
+
.side__tags-toggle {
|
|
1847
|
+
display: inline-flex;
|
|
1848
|
+
align-items: center;
|
|
1849
|
+
gap: 6px;
|
|
1850
|
+
padding: 0;
|
|
1851
|
+
border: 0;
|
|
1852
|
+
background: none;
|
|
1853
|
+
color: inherit;
|
|
1854
|
+
font: inherit;
|
|
1855
|
+
text-transform: inherit;
|
|
1856
|
+
letter-spacing: inherit;
|
|
1857
|
+
cursor: pointer;
|
|
1858
|
+
}
|
|
1859
|
+
.side__tags-toggle:focus-visible {
|
|
1860
|
+
outline: 2px solid var(--_primary);
|
|
1861
|
+
outline-offset: 3px;
|
|
1862
|
+
border-radius: 3px;
|
|
1863
|
+
}
|
|
1864
|
+
/* The same chevron as the collapsible entries: right when closed, down when open. */
|
|
1865
|
+
.side__tags-toggle::before {
|
|
1866
|
+
content: '';
|
|
1867
|
+
width: 6px;
|
|
1868
|
+
height: 6px;
|
|
1869
|
+
margin: 0 2px 1px 1px;
|
|
1870
|
+
border-right: 1.5px solid var(--_muted);
|
|
1871
|
+
border-bottom: 1.5px solid var(--_muted);
|
|
1872
|
+
transform: rotate(-45deg);
|
|
1873
|
+
transition: transform 120ms;
|
|
1874
|
+
}
|
|
1875
|
+
.side__tags-toggle[aria-expanded='true']::before {
|
|
1876
|
+
transform: rotate(45deg);
|
|
1877
|
+
margin-bottom: 3px;
|
|
1878
|
+
}
|
|
1879
|
+
.side__tags-count {
|
|
1880
|
+
margin-left: auto;
|
|
1881
|
+
}
|
|
1882
|
+
.side__tag-list[hidden] {
|
|
1883
|
+
display: none;
|
|
1884
|
+
}
|
|
1885
|
+
.side__tags-state {
|
|
1886
|
+
display: inline-flex;
|
|
1887
|
+
align-items: center;
|
|
1888
|
+
gap: 6px;
|
|
1889
|
+
text-transform: none;
|
|
1890
|
+
letter-spacing: 0;
|
|
1891
|
+
font-weight: 400;
|
|
1892
|
+
}
|
|
1893
|
+
.side__tags-selected {
|
|
1894
|
+
color: var(--_ink-2);
|
|
1895
|
+
}
|
|
1896
|
+
.side__tags-clear {
|
|
1897
|
+
padding: 0;
|
|
1898
|
+
border: 0;
|
|
1899
|
+
background: none;
|
|
1900
|
+
color: var(--_primary-text);
|
|
1901
|
+
font: 500 11px/1 var(--_font-body);
|
|
1902
|
+
cursor: pointer;
|
|
1903
|
+
}
|
|
1904
|
+
.side__tags-clear:hover {
|
|
1905
|
+
color: var(--_primary);
|
|
1906
|
+
}
|
|
1907
|
+
.side__tags-clear:focus-visible {
|
|
1908
|
+
outline: 2px solid var(--_primary);
|
|
1909
|
+
outline-offset: 2px;
|
|
1910
|
+
border-radius: 3px;
|
|
1911
|
+
}
|
|
1912
|
+
.side .side__tag-list {
|
|
1913
|
+
padding-left: 12px;
|
|
1914
|
+
}
|
|
1915
|
+
/* A tag is a toggle button that looks like a nav row; pressed = the current-item highlight. */
|
|
1916
|
+
.side__tag {
|
|
1917
|
+
width: 100%;
|
|
1918
|
+
min-height: 40px;
|
|
1919
|
+
border: 0;
|
|
1920
|
+
background: none;
|
|
1921
|
+
font-family: inherit;
|
|
1922
|
+
text-align: left;
|
|
1923
|
+
cursor: pointer;
|
|
1924
|
+
}
|
|
1925
|
+
.side__tag[aria-pressed='true'] {
|
|
1926
|
+
background: var(--_tint);
|
|
1927
|
+
font-weight: 600;
|
|
1928
|
+
}
|
|
1929
|
+
.side__empty {
|
|
1930
|
+
margin: 8px 10px;
|
|
1931
|
+
color: var(--_muted);
|
|
1932
|
+
font-size: 13px;
|
|
1933
|
+
}
|
|
1934
|
+
.side__live {
|
|
1935
|
+
position: absolute;
|
|
1936
|
+
width: 1px;
|
|
1937
|
+
height: 1px;
|
|
1938
|
+
overflow: hidden;
|
|
1939
|
+
clip: rect(0 0 0 0);
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
/* Drawer (below 1100px). */
|
|
1943
|
+
.menu {
|
|
1944
|
+
width: 44px;
|
|
1945
|
+
height: 44px;
|
|
1946
|
+
padding: 0;
|
|
1947
|
+
border: 1px solid var(--_line);
|
|
1948
|
+
border-radius: var(--_radius-sm);
|
|
1949
|
+
background: var(--_surface);
|
|
1950
|
+
color: var(--_ink);
|
|
1951
|
+
cursor: pointer;
|
|
1952
|
+
display: inline-flex;
|
|
1953
|
+
align-items: center;
|
|
1954
|
+
justify-content: center;
|
|
1955
|
+
flex: none;
|
|
1956
|
+
}
|
|
1957
|
+
.menu:focus-visible {
|
|
1958
|
+
outline: 2px solid var(--_primary);
|
|
1959
|
+
outline-offset: 2px;
|
|
1960
|
+
}
|
|
1961
|
+
.menu svg {
|
|
1962
|
+
width: 20px;
|
|
1963
|
+
height: 20px;
|
|
1964
|
+
fill: none;
|
|
1965
|
+
stroke: currentColor;
|
|
1966
|
+
stroke-width: 1.8;
|
|
1967
|
+
stroke-linecap: round;
|
|
1968
|
+
}
|
|
1969
|
+
/* After the base rules so the wide-container reset wins on equal specificity. */
|
|
1970
|
+
@container viewer (min-width: 1100px) {
|
|
1971
|
+
.side__close,
|
|
1972
|
+
.menu {
|
|
1973
|
+
display: none;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
@container viewer (max-width: 1099px) {
|
|
1977
|
+
.side {
|
|
1978
|
+
display: none;
|
|
1979
|
+
}
|
|
1980
|
+
.layout--open .side {
|
|
1981
|
+
display: block;
|
|
1982
|
+
position: absolute;
|
|
1983
|
+
inset: 0;
|
|
1984
|
+
z-index: 30;
|
|
1985
|
+
background: rgb(0 0 0 / 0.35);
|
|
1986
|
+
border: 0;
|
|
1987
|
+
}
|
|
1988
|
+
.side__panel {
|
|
1989
|
+
position: sticky;
|
|
1990
|
+
top: 0;
|
|
1991
|
+
width: 320px;
|
|
1992
|
+
max-width: calc(100% - 56px);
|
|
1993
|
+
height: 100vh;
|
|
1994
|
+
height: 100dvh;
|
|
1995
|
+
overflow: auto;
|
|
1996
|
+
background: var(--_sidebar);
|
|
1997
|
+
border-right: 1px solid var(--_line);
|
|
1998
|
+
box-shadow: 8px 0 24px rgb(0 0 0 / 0.12);
|
|
1999
|
+
}
|
|
2000
|
+
.side__close {
|
|
2001
|
+
display: inline-flex;
|
|
2002
|
+
margin: 12px 12px 0;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
`,fd=C`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18" /></svg>`;function pd(e){let t=td(e.items,e.query,e.keepSections,e.selectedTags),n=nd(t.items),r=n.findIndex(e=>e.items.some(e=>e.kind===`operation`)),i=e.tags.length>0?md(e):w;return C`<div
|
|
2006
|
+
class="side"
|
|
2007
|
+
id="${e.id}--sidebar"
|
|
2008
|
+
@click=${t=>{t.target===t.currentTarget&&e.onClose()}}
|
|
2009
|
+
>
|
|
2010
|
+
<div class="side__panel" role=${e.open?`dialog`:w} aria-modal=${e.open?`true`:w} aria-label="Navigation">
|
|
2011
|
+
<button class="btn btn--icon side__close" type="button" aria-label="Close navigation" @click=${e.onClose}>${fd}</button>
|
|
2012
|
+
<nav class="side__inner" aria-label="API navigation">
|
|
2013
|
+
<label class="visually-hidden" for="${e.id}--search">Search operations, channels</label>
|
|
2014
|
+
<input
|
|
2015
|
+
class="side__search"
|
|
2016
|
+
id="${e.id}--search"
|
|
2017
|
+
type="search"
|
|
2018
|
+
placeholder="Search operations, channels"
|
|
2019
|
+
autocomplete="off"
|
|
2020
|
+
.value=${e.query}
|
|
2021
|
+
@input=${t=>e.onQuery(t.target.value)}
|
|
2022
|
+
@keydown=${t=>{t.key===`Escape`&&(t.preventDefault(),e.query===``?e.onEscape():e.onQuery(``))}}
|
|
2023
|
+
/>
|
|
2024
|
+
<span class="side__live" aria-live="polite">${e.liveText}</span>
|
|
2025
|
+
${n.map((t,n)=>C`${n===r?i:w}<div class="side__block ${t.group===void 0?``:`side__block--grouped`} ${t.group===`Components`?`side__block--components`:``}">
|
|
2026
|
+
${t.group===void 0?w:C`<div class="side__group">
|
|
2027
|
+
<span>${t.group}</span>
|
|
2028
|
+
${t.group===`Components`?w:C`<span class="mono">${t.items.length}</span>`}
|
|
2029
|
+
</div>`}
|
|
2030
|
+
<ul>
|
|
2031
|
+
${t.items.map(t=>hd(t,e))}
|
|
2032
|
+
</ul>
|
|
2033
|
+
</div>`)}
|
|
2034
|
+
${r===-1&&t.total>0?i:w}
|
|
2035
|
+
${t.active&&t.shown===0?C`<p class="side__empty">No operations match</p>`:w}
|
|
2036
|
+
</nav>
|
|
2037
|
+
</div>
|
|
2038
|
+
</div>`}function md(e){let t=e.selectedTags.size,n=`${e.id}--tags`;return C`<div class="side__tags">
|
|
2039
|
+
<div class="side__group side__tags-head">
|
|
2040
|
+
<button class="side__tags-toggle" type="button" aria-expanded=${e.tagsOpen?`true`:`false`} aria-controls=${n} @click=${()=>e.onTagsToggle(!e.tagsOpen)}>
|
|
2041
|
+
Tags
|
|
2042
|
+
</button>
|
|
2043
|
+
${t>0?C`<span class="side__tags-state">
|
|
2044
|
+
<span class="side__tags-selected">${t} selected</span>
|
|
2045
|
+
<span aria-hidden="true">·</span>
|
|
2046
|
+
<button class="side__tags-clear" type="button" @click=${e.onClearTags}>Clear selection</button>
|
|
2047
|
+
</span>`:w}
|
|
2048
|
+
<span class="mono side__tags-count">${e.tags.length}</span>
|
|
2049
|
+
</div>
|
|
2050
|
+
<ul class="side__tag-list" id=${n} ?hidden=${!e.tagsOpen}>
|
|
2051
|
+
${e.tags.map(t=>C`<li>
|
|
2052
|
+
<button class="side__item side__item--plain side__tag" type="button" aria-pressed=${e.selectedTags.has(t.name)?`true`:`false`} title=${t.description??``} @click=${()=>e.onToggleTag(t.name)}>
|
|
2053
|
+
<span class="side__label">${t.name}</span>
|
|
2054
|
+
<span class="side__count">${t.count}</span>
|
|
2055
|
+
</button>
|
|
2056
|
+
</li>`)}
|
|
2057
|
+
</ul>
|
|
2058
|
+
</div>`}function hd(e,t){let n=t.current===e.anchor;return C`<li>
|
|
2059
|
+
<a
|
|
2060
|
+
class="side__item ${e.kind===`section`?`side__item--section`:``} ${e.badge?``:`side__item--plain`}"
|
|
2061
|
+
href="#${e.anchor}"
|
|
2062
|
+
aria-current=${n?`true`:w}
|
|
2063
|
+
@click=${t.onChoose}
|
|
2064
|
+
>
|
|
2065
|
+
${e.badge?C`<span class="side__badge side__badge--${e.badge.action}">${e.badge.label}</span>`:w}
|
|
2066
|
+
<span class="side__label">${e.label}</span>
|
|
2067
|
+
${e.count===void 0?w:C`<span class="side__count">${e.count}</span>`}
|
|
2068
|
+
${e.sub?C`<span class="side__sub">${e.sub}</span>`:w}
|
|
2069
|
+
</a>
|
|
2070
|
+
</li>`}var gd=C`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h10" /></svg>`,_d=l`
|
|
2071
|
+
:host {
|
|
2072
|
+
display: block;
|
|
2073
|
+
container-type: inline-size;
|
|
2074
|
+
container-name: viewer;
|
|
2075
|
+
position: relative;
|
|
2076
|
+
z-index: 0;
|
|
2077
|
+
color: var(--_ink);
|
|
2078
|
+
background: var(--_bg);
|
|
2079
|
+
font: 14px/1.55 var(--_font-body);
|
|
2080
|
+
border-radius: var(--_radius);
|
|
2081
|
+
overflow: clip;
|
|
2082
|
+
}
|
|
2083
|
+
*,
|
|
2084
|
+
*::before,
|
|
2085
|
+
*::after {
|
|
2086
|
+
box-sizing: border-box;
|
|
2087
|
+
}
|
|
2088
|
+
a {
|
|
2089
|
+
color: var(--_primary-text);
|
|
2090
|
+
}
|
|
2091
|
+
code,
|
|
2092
|
+
.mono {
|
|
2093
|
+
font-family: var(--_font-mono);
|
|
2094
|
+
overflow-wrap: anywhere;
|
|
2095
|
+
}
|
|
2096
|
+
.visually-hidden {
|
|
2097
|
+
position: absolute;
|
|
2098
|
+
width: 1px;
|
|
2099
|
+
height: 1px;
|
|
2100
|
+
overflow: hidden;
|
|
2101
|
+
clip: rect(0 0 0 0);
|
|
2102
|
+
white-space: nowrap;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/* Content column padding: 36/44/48 desktop, 28/32/40 tablet, 20/16/32 phone (spec 4.5). */
|
|
2106
|
+
.content {
|
|
2107
|
+
--_pad-x: 44px;
|
|
2108
|
+
padding: 36px var(--_pad-x) 48px;
|
|
2109
|
+
}
|
|
2110
|
+
@container viewer (max-width: 1099px) {
|
|
2111
|
+
.content {
|
|
2112
|
+
--_pad-x: 32px;
|
|
2113
|
+
padding: 28px var(--_pad-x) 40px;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
@container viewer (max-width: 699px) {
|
|
2117
|
+
.content {
|
|
2118
|
+
--_pad-x: 16px;
|
|
2119
|
+
padding: 20px var(--_pad-x) 32px;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
h4.sub-title {
|
|
2123
|
+
display: flex;
|
|
2124
|
+
flex-wrap: wrap;
|
|
2125
|
+
align-items: baseline;
|
|
2126
|
+
gap: 6px 12px;
|
|
2127
|
+
margin: 0 0 12px;
|
|
2128
|
+
font: 600 18px/1.3 var(--_font-heading);
|
|
2129
|
+
color: var(--_ink);
|
|
2130
|
+
}
|
|
2131
|
+
h4.sub-title .mono {
|
|
2132
|
+
font-size: 14px;
|
|
2133
|
+
font-weight: 500;
|
|
2134
|
+
color: var(--_ink-2);
|
|
2135
|
+
}
|
|
2136
|
+
h4.sub-title .sub-title__meta {
|
|
2137
|
+
margin-left: auto;
|
|
2138
|
+
font: 400 12px/1.5 var(--_font-mono);
|
|
2139
|
+
color: var(--_muted);
|
|
2140
|
+
white-space: nowrap;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
section + section {
|
|
2144
|
+
margin-top: 40px;
|
|
2145
|
+
padding-top: 32px;
|
|
2146
|
+
border-top: 1px solid var(--_line);
|
|
2147
|
+
}
|
|
2148
|
+
h2.section-title {
|
|
2149
|
+
font: 600 20px/1.3 var(--_font-heading);
|
|
2150
|
+
margin: 0 0 16px;
|
|
2151
|
+
color: var(--_ink);
|
|
2152
|
+
}
|
|
2153
|
+
h2.section-title:focus-visible,
|
|
2154
|
+
h3:focus-visible {
|
|
2155
|
+
outline: 2px solid var(--_primary);
|
|
2156
|
+
outline-offset: 4px;
|
|
2157
|
+
}
|
|
2158
|
+
.label {
|
|
2159
|
+
font: 500 11px/1 var(--_font-body);
|
|
2160
|
+
text-transform: uppercase;
|
|
2161
|
+
letter-spacing: 0.08em;
|
|
2162
|
+
color: var(--_muted);
|
|
2163
|
+
}
|
|
2164
|
+
.summary {
|
|
2165
|
+
font-size: 16px;
|
|
2166
|
+
line-height: 1.6;
|
|
2167
|
+
color: var(--_ink-2);
|
|
2168
|
+
margin: 0;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
/* Markdown from the document. */
|
|
2172
|
+
.md > :first-child {
|
|
2173
|
+
margin-top: 0;
|
|
2174
|
+
}
|
|
2175
|
+
.md > :last-child {
|
|
2176
|
+
margin-bottom: 0;
|
|
2177
|
+
}
|
|
2178
|
+
.md p,
|
|
2179
|
+
.md ul,
|
|
2180
|
+
.md ol {
|
|
2181
|
+
margin: 0 0 0.8em;
|
|
2182
|
+
color: var(--_ink-2);
|
|
2183
|
+
}
|
|
2184
|
+
.md code {
|
|
2185
|
+
overflow-wrap: anywhere;
|
|
2186
|
+
font-size: 0.92em;
|
|
2187
|
+
padding: 0.1em 0.35em;
|
|
2188
|
+
background: var(--_head);
|
|
2189
|
+
border: 1px solid var(--_line);
|
|
2190
|
+
border-radius: var(--_radius-sm);
|
|
2191
|
+
}
|
|
2192
|
+
.md pre {
|
|
2193
|
+
max-width: 100%;
|
|
2194
|
+
padding: 12px 14px;
|
|
2195
|
+
overflow: auto;
|
|
2196
|
+
background: var(--_head);
|
|
2197
|
+
border: 1px solid var(--_line);
|
|
2198
|
+
border-radius: var(--_radius-sm);
|
|
2199
|
+
}
|
|
2200
|
+
.md pre code {
|
|
2201
|
+
padding: 0;
|
|
2202
|
+
border: 0;
|
|
2203
|
+
background: none;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
/* Pills and chips. */
|
|
2207
|
+
.pill {
|
|
2208
|
+
display: inline-flex;
|
|
2209
|
+
align-items: center;
|
|
2210
|
+
height: 24px;
|
|
2211
|
+
padding: 0 9px;
|
|
2212
|
+
border-radius: 999px;
|
|
2213
|
+
font: 500 12px/1 var(--_font-mono);
|
|
2214
|
+
letter-spacing: 0.02em;
|
|
2215
|
+
white-space: nowrap;
|
|
2216
|
+
}
|
|
2217
|
+
.pill--tint {
|
|
2218
|
+
background: var(--_tint);
|
|
2219
|
+
color: var(--_tint-ink);
|
|
2220
|
+
}
|
|
2221
|
+
.pill--outline {
|
|
2222
|
+
border: 1px solid var(--_line-2);
|
|
2223
|
+
color: var(--_muted);
|
|
2224
|
+
}
|
|
2225
|
+
.chips {
|
|
2226
|
+
display: flex;
|
|
2227
|
+
flex-wrap: wrap;
|
|
2228
|
+
gap: 8px 14px;
|
|
2229
|
+
padding: 0;
|
|
2230
|
+
margin: 0;
|
|
2231
|
+
min-width: 0;
|
|
2232
|
+
list-style: none;
|
|
2233
|
+
}
|
|
2234
|
+
.chip {
|
|
2235
|
+
display: inline-flex;
|
|
2236
|
+
flex-wrap: wrap;
|
|
2237
|
+
align-items: center;
|
|
2238
|
+
gap: 6px;
|
|
2239
|
+
max-width: 100%;
|
|
2240
|
+
min-width: 0;
|
|
2241
|
+
min-height: 26px;
|
|
2242
|
+
padding: 3px 10px;
|
|
2243
|
+
border: 1px solid var(--_line);
|
|
2244
|
+
border-radius: 999px;
|
|
2245
|
+
background: var(--_surface);
|
|
2246
|
+
font-size: 12.5px;
|
|
2247
|
+
color: var(--_ink-2);
|
|
2248
|
+
}
|
|
2249
|
+
/* Tag chips carry their description as a tooltip on hover and keyboard focus. */
|
|
2250
|
+
.chip--tip {
|
|
2251
|
+
position: relative;
|
|
2252
|
+
cursor: default;
|
|
2253
|
+
}
|
|
2254
|
+
.chip--tip:focus-visible {
|
|
2255
|
+
outline: 2px solid var(--_primary);
|
|
2256
|
+
outline-offset: 2px;
|
|
2257
|
+
}
|
|
2258
|
+
.chip--tip::after {
|
|
2259
|
+
content: attr(data-tip);
|
|
2260
|
+
position: absolute;
|
|
2261
|
+
top: calc(100% + 6px);
|
|
2262
|
+
left: 0;
|
|
2263
|
+
z-index: 25;
|
|
2264
|
+
width: max-content;
|
|
2265
|
+
max-width: min(320px, 70vw);
|
|
2266
|
+
padding: 6px 10px;
|
|
2267
|
+
border-radius: var(--_radius-sm);
|
|
2268
|
+
background: var(--_ink);
|
|
2269
|
+
color: var(--_bg);
|
|
2270
|
+
font: 400 12px/1.45 var(--_font-body);
|
|
2271
|
+
white-space: normal;
|
|
2272
|
+
text-align: left;
|
|
2273
|
+
box-shadow: 0 4px 14px rgb(0 0 0 / 0.18);
|
|
2274
|
+
opacity: 0;
|
|
2275
|
+
visibility: hidden;
|
|
2276
|
+
transition: opacity 100ms;
|
|
2277
|
+
pointer-events: none;
|
|
2278
|
+
}
|
|
2279
|
+
.chip--tip:hover::after,
|
|
2280
|
+
.chip--tip:focus-visible::after {
|
|
2281
|
+
opacity: 1;
|
|
2282
|
+
visibility: visible;
|
|
2283
|
+
}
|
|
2284
|
+
.chip .mono {
|
|
2285
|
+
font-size: 12px;
|
|
2286
|
+
overflow-wrap: anywhere;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/* Icon and text buttons: 44px targets (spec 4.11). */
|
|
2290
|
+
.btn {
|
|
2291
|
+
display: inline-flex;
|
|
2292
|
+
align-items: center;
|
|
2293
|
+
justify-content: center;
|
|
2294
|
+
gap: 8px;
|
|
2295
|
+
min-width: 44px;
|
|
2296
|
+
min-height: 44px;
|
|
2297
|
+
padding: 0 12px;
|
|
2298
|
+
border: 1px solid var(--_line);
|
|
2299
|
+
border-radius: var(--_radius-sm);
|
|
2300
|
+
background: var(--_surface);
|
|
2301
|
+
color: var(--_ink);
|
|
2302
|
+
font: 500 13px/1 var(--_font-body);
|
|
2303
|
+
cursor: pointer;
|
|
2304
|
+
text-decoration: none;
|
|
2305
|
+
}
|
|
2306
|
+
.btn:hover {
|
|
2307
|
+
border-color: var(--_line-2);
|
|
2308
|
+
}
|
|
2309
|
+
.btn:focus-visible {
|
|
2310
|
+
outline: 2px solid var(--_primary);
|
|
2311
|
+
outline-offset: 2px;
|
|
2312
|
+
}
|
|
2313
|
+
.btn svg {
|
|
2314
|
+
width: 18px;
|
|
2315
|
+
height: 18px;
|
|
2316
|
+
fill: none;
|
|
2317
|
+
stroke: currentColor;
|
|
2318
|
+
stroke-width: 1.8;
|
|
2319
|
+
stroke-linecap: round;
|
|
2320
|
+
stroke-linejoin: round;
|
|
2321
|
+
}
|
|
2322
|
+
.btn--icon {
|
|
2323
|
+
padding: 0;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
/* Definition rows used by Info and Servers. */
|
|
2327
|
+
.facts {
|
|
2328
|
+
display: grid;
|
|
2329
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
2330
|
+
align-items: baseline;
|
|
2331
|
+
gap: 8px 14px;
|
|
2332
|
+
margin: 0;
|
|
2333
|
+
}
|
|
2334
|
+
.facts dt {
|
|
2335
|
+
font: 500 11px/1.6 var(--_font-body);
|
|
2336
|
+
text-transform: uppercase;
|
|
2337
|
+
letter-spacing: 0.08em;
|
|
2338
|
+
color: var(--_muted);
|
|
2339
|
+
padding-top: 2px;
|
|
2340
|
+
}
|
|
2341
|
+
.facts dd {
|
|
2342
|
+
margin: 0;
|
|
2343
|
+
color: var(--_ink-2);
|
|
2344
|
+
overflow-wrap: anywhere;
|
|
2345
|
+
}
|
|
2346
|
+
@container viewer (max-width: 699px) {
|
|
2347
|
+
.facts {
|
|
2348
|
+
grid-template-columns: 1fr;
|
|
2349
|
+
gap: 4px;
|
|
2350
|
+
}
|
|
2351
|
+
.facts dd + dt {
|
|
2352
|
+
margin-top: 10px;
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
.alert {
|
|
2357
|
+
margin: 0;
|
|
2358
|
+
padding: 14px 16px;
|
|
2359
|
+
border: 1px solid var(--_secondary);
|
|
2360
|
+
border-radius: var(--_radius-sm);
|
|
2361
|
+
background: color-mix(in srgb, var(--_secondary) 8%, var(--_surface));
|
|
2362
|
+
color: var(--_ink);
|
|
2363
|
+
}
|
|
2364
|
+
.alert code {
|
|
2365
|
+
overflow-wrap: anywhere;
|
|
2366
|
+
}
|
|
2367
|
+
`,vd=l`
|
|
2368
|
+
:host {
|
|
2369
|
+
--_primary: var(--asyncapi-primary, #2944c9);
|
|
2370
|
+
--_secondary: var(--asyncapi-secondary, #b84e1a);
|
|
2371
|
+
/* Badge colours default to the accents but can be set on their own. */
|
|
2372
|
+
--_send: var(--asyncapi-send, var(--_primary));
|
|
2373
|
+
--_receive: var(--asyncapi-receive, var(--_secondary));
|
|
2374
|
+
|
|
2375
|
+
--_bg: var(--asyncapi-bg, #f6f5f1);
|
|
2376
|
+
--_surface: var(--asyncapi-surface, #ffffff);
|
|
2377
|
+
--_sidebar: var(--asyncapi-sidebar, #efede7);
|
|
2378
|
+
--_head: var(--asyncapi-head, #f8f7f3);
|
|
2379
|
+
--_ink: var(--asyncapi-ink, #17191f);
|
|
2380
|
+
--_ink-2: var(--asyncapi-ink-2, #3a3e48);
|
|
2381
|
+
--_muted: var(--asyncapi-muted, #5e626d);
|
|
2382
|
+
--_line: var(--asyncapi-line, #e3e0d8);
|
|
2383
|
+
--_line-2: var(--asyncapi-line-2, #c9c5ba);
|
|
2384
|
+
--_tint-strength: 10%;
|
|
2385
|
+
|
|
2386
|
+
/* Example panel: the same in both themes unless overridden. */
|
|
2387
|
+
--_ex-bg: var(--asyncapi-example-bg, #12141a);
|
|
2388
|
+
--_ex-ink: #dcdfe6;
|
|
2389
|
+
--_ex-muted: #8c92a0;
|
|
2390
|
+
--_ex-lines: #4a505c;
|
|
2391
|
+
--_ex-divider: #262a33;
|
|
2392
|
+
--_ex-heading: #f4f5f7;
|
|
2393
|
+
--_ex-number: #b7c4e8;
|
|
2394
|
+
|
|
2395
|
+
/* Swagger UI's typefaces (amendment 18), falling back to system stacks: the viewer never
|
|
2396
|
+
loads web fonts itself, the page does (see theme/asyncapi-theme.css). */
|
|
2397
|
+
--_font-heading: var(--asyncapi-font-heading, 'Titillium Web', ui-sans-serif, system-ui, sans-serif);
|
|
2398
|
+
--_font-body: var(--asyncapi-font-body, 'Open Sans', ui-sans-serif, system-ui, sans-serif);
|
|
2399
|
+
--_font-mono: var(--asyncapi-font-mono, 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
2400
|
+
--_radius: var(--asyncapi-radius, 10px);
|
|
2401
|
+
--_radius-sm: calc(var(--_radius) - 3px);
|
|
2402
|
+
--_example-width: clamp(360px, var(--asyncapi-example-width, 452px), 560px);
|
|
2403
|
+
|
|
2404
|
+
/* Derived at runtime from the resolved colours (util/color.ts); these are the fallbacks. */
|
|
2405
|
+
--_badge-ink-send: #ffffff;
|
|
2406
|
+
--_badge-ink-receive: #ffffff;
|
|
2407
|
+
--_primary-text: var(--_primary);
|
|
2408
|
+
--_secondary-text: var(--_secondary);
|
|
2409
|
+
--_tint: color-mix(in srgb, var(--_primary) var(--_tint-strength), transparent);
|
|
2410
|
+
--_tint-ink: var(--_primary-text);
|
|
2411
|
+
--_logo: var(--asyncapi-logo, none);
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
:host([resolved-theme='dark']) {
|
|
2415
|
+
--_bg: var(--asyncapi-bg, #0f1115);
|
|
2416
|
+
--_surface: var(--asyncapi-surface, #161920);
|
|
2417
|
+
--_sidebar: var(--asyncapi-sidebar, #12151a);
|
|
2418
|
+
--_head: var(--asyncapi-head, #1b1f27);
|
|
2419
|
+
--_ink: var(--asyncapi-ink, #ecedef);
|
|
2420
|
+
--_ink-2: var(--asyncapi-ink-2, #c4c8d0);
|
|
2421
|
+
--_muted: var(--asyncapi-muted, #959ba7);
|
|
2422
|
+
--_line: var(--asyncapi-line, #262a33);
|
|
2423
|
+
--_line-2: var(--asyncapi-line-2, #3a404c);
|
|
2424
|
+
--_tint-strength: 20%;
|
|
2425
|
+
--_logo: var(--asyncapi-logo-dark, var(--asyncapi-logo, none));
|
|
2426
|
+
/* Accent text on the tint does not reach 4.5:1 in dark mode; use ink there. */
|
|
2427
|
+
--_tint-ink: var(--_ink);
|
|
2428
|
+
}
|
|
2429
|
+
`,yd=class{#e=`auto`;#t;#n=`light`;#r;#i;#a=()=>this.#o();constructor(e,t){this.host=e,this.onChange=t}get resolved(){return this.#n}set mode(e){e!==this.#e&&(this.#e=e,this.#t=void 0,this.#o())}toggle(){this.#t=this.#n===`dark`?`light`:`dark`,this.#o()}connect(){let e=this.host.ownerDocument,t=e.defaultView;t?.matchMedia&&(this.#i=t.matchMedia(`(prefers-color-scheme: dark)`),this.#i.addEventListener(`change`,this.#a)),this.#r=new MutationObserver(()=>this.#o()),this.#r.observe(e.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`class`]}),e.body&&this.#r.observe(e.body,{attributes:!0,attributeFilter:[`data-md-color-scheme`,`class`]}),this.#o()}disconnect(){this.#r?.disconnect(),this.#r=void 0,this.#i?.removeEventListener(`change`,this.#a),this.#i=void 0}hostPreference(){let e=this.host.ownerDocument,t=e.body?.getAttribute(`data-md-color-scheme`);if(t)return t===`slate`?`dark`:`light`;let n=e.documentElement.getAttribute(`data-theme`);return n===`dark`||n===`light`?n:this.#i?.matches?`dark`:`light`}#o(){let e=this.#t??(this.#e===`auto`?this.hostPreference():this.#e);(e!==this.#n||this.host.getAttribute(`resolved-theme`)!==e)&&(this.#n=e,this.host.setAttribute(`resolved-theme`,e),this.onChange(e))}};function bd(e){let t=e.trim(),n=/^rgba?\(\s*([\d.]+)\s*[, ]\s*([\d.]+)\s*[, ]\s*([\d.]+)/i.exec(t);if(n)return[Number(n[1]),Number(n[2]),Number(n[3])];let r=/^#([0-9a-f]{3,8})$/i.exec(t)?.[1];if(r){if(r.length===3||r.length===4)return[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)];if(r.length===6||r.length===8)return[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16)]}}function xd([e,t,n]){return`#${[e,t,n].map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)).join(``)}`}function Sd([e,t,n]){let r=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}function Cd(e,t){let n=Sd(e),r=Sd(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wd(e){return Sd(e)>.6?`#14161B`:`#FFFFFF`}function Td(e,t,n,r=4.5){if(Cd(e,t)>=r)return e;let i=n?[255,255,255]:[0,0,0];for(let n=.05;n<=1;n+=.05){let a=Ed(e,i,n);if(Cd(a,t)>=r)return a}return i}function Ed(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n]}var Dd=0,Od=class extends He{static{this.styles=[vd,_d,Aa,Xl,Gu,ku,yu,Ql,rd,dd]}#e=Da([]);#t;#n;#r;#i;#a=[];#o=`light`;#s={};#c=!1;#l;#u=new Map;#d=e=>{let t=this.#u.get(e);return t||(t=new Au(()=>this.requestUpdate()),this.#u.set(e,t)),t};#f=new Map;#p;#m=``;#h=new Set;#g=!1;#_;#v;#y=!1;#b;#x=``;#S;#C;#w=new Set;#T=new Map;#E=e=>{let t=this.#T.get(e);return t||(t={tab:`payload`,index:0,open:void 0,copied:void 0},this.#T.set(e,t)),{state:t,defaultOpen:this.#e.messageExamples,onChange:()=>this.requestUpdate()}};#D=()=>{this.#l=void 0,this.#R()};#O=new yd(this,e=>this.#B(e));get options(){return this.#e}get loadResult(){return this.#r}get problems(){return this.#a}get model(){return this.#i}get anchorPrefix(){return this.id}connectedCallback(){super.connectedCallback(),this.id||=`asyncapi-viewer-${++Dd}`,this.#z(),this.#t=new MutationObserver(()=>this.#z()),this.#t.observe(this,{attributes:!0}),this.#O.connect(),this.ownerDocument.defaultView?.addEventListener(`hashchange`,this.#D)}disconnectedCallback(){this.#t?.disconnect(),this.#t=void 0,this.#O.disconnect(),this.#C?.disconnect(),this.#C=void 0,this.ownerDocument.defaultView?.removeEventListener(`hashchange`,this.#D),super.disconnectedCallback()}firstUpdated(){this.#V();for(let e of this.querySelectorAll(`:scope > [data-asyncapi-fallback]`))e.remove()}updated(){this.#R(),this.#M();let e=this.renderRoot.querySelector(`.layout`);e&&(this.#_===void 0?e.style.removeProperty(`--_side-width`):e.style.setProperty(`--_side-width`,`${this.#_}px`))}#k(){return{min:220,max:Math.max(220,Math.min(560,Math.floor(this.getBoundingClientRect().width)-600))}}#A(e){let{min:t,max:n}=this.#k(),r=Math.round(Math.min(n,Math.max(t,e)));r!==this.#_&&(this.#_=r,this.requestUpdate())}#j(){let{min:e,max:t}=this.#k(),n=this.#_??292;return C`<div
|
|
2430
|
+
class="side__resize ${this.#v?`side__resize--active`:``}"
|
|
2431
|
+
role="separator"
|
|
2432
|
+
aria-orientation="vertical"
|
|
2433
|
+
aria-label="Resize sidebar"
|
|
2434
|
+
aria-valuemin=${e}
|
|
2435
|
+
aria-valuemax=${t}
|
|
2436
|
+
aria-valuenow=${n}
|
|
2437
|
+
tabindex="0"
|
|
2438
|
+
title="Drag to resize the sidebar; double-click to reset"
|
|
2439
|
+
@pointerdown=${e=>{e.button===0&&(e.currentTarget.setPointerCapture(e.pointerId),this.#v={x:e.clientX,width:n},e.preventDefault(),this.requestUpdate())}}
|
|
2440
|
+
@pointermove=${e=>{this.#v&&this.#A(this.#v.width+e.clientX-this.#v.x)}}
|
|
2441
|
+
@pointerup=${()=>{this.#v=void 0,this.requestUpdate()}}
|
|
2442
|
+
@pointercancel=${()=>{this.#v=void 0,this.requestUpdate()}}
|
|
2443
|
+
@dblclick=${()=>{this.#_=void 0,this.requestUpdate()}}
|
|
2444
|
+
@keydown=${r=>{if(r.key===`ArrowLeft`)this.#A(n-16);else if(r.key===`ArrowRight`)this.#A(n+16);else if(r.key===`Home`)this.#A(e);else if(r.key===`End`)this.#A(t);else return;r.preventDefault()}}
|
|
2445
|
+
></div>`}#M(){if(!this.#e.sidebar||!this.#i){this.#C?.disconnect(),this.#C=void 0;return}let e=[...this.renderRoot.querySelectorAll(`section[aria-labelledby]:not(.ops), article.op`)];this.#C?.disconnect(),this.#w.clear(),this.#C=new IntersectionObserver(t=>{for(let e of t){let t=e.target.id||e.target.getAttribute(`aria-labelledby`)||``;e.isIntersecting?this.#w.add(t):this.#w.delete(t)}let n=e.map(e=>e.id||e.getAttribute(`aria-labelledby`)||``).find(e=>this.#w.has(e));n!==this.#b&&(this.#b=n,this.requestUpdate())},{rootMargin:`0px 0px -60% 0px`,threshold:0});for(let t of e)this.#C.observe(t)}#N(e,t,n){this.#m=e,this.#P(t,n)}#P(e,t){clearTimeout(this.#S),this.#S=setTimeout(()=>{this.#x=this.#m.trim()===``&&this.#h.size===0?``:`${e} of ${t} operations shown`,this.requestUpdate()},300),this.requestUpdate()}#F(){this.#y=!0;let e=this.getBoundingClientRect().top;e>0&&this.ownerDocument.defaultView?.scrollBy({top:e,behavior:`smooth`}),this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(`.side__search`)?.focus()).catch(()=>void 0)}#I(e=!1){this.#y&&(this.#y=!1,this.requestUpdate(),e||this.updateComplete.then(()=>this.renderRoot.querySelector(`.menu`)?.focus()).catch(()=>void 0))}#L(e){if(e.key!==`Tab`||!this.#y)return;let t=this.renderRoot.querySelector(`.side__panel`);if(!t)return;let n=[...t.querySelectorAll(`a[href], button, input, select, [tabindex="0"]`)].filter(e=>!e.hasAttribute(`disabled`));if(n.length===0)return;let r=n[0],i=n[n.length-1],a=this.renderRoot.activeElement;e.shiftKey&&a===r?(i.focus(),e.preventDefault()):!e.shiftKey&&a===i&&(r.focus(),e.preventDefault())}#R(){let e=this.ownerDocument.defaultView?.location.hash??``;if(!this.#i||e.length<2||e===this.#l)return;let t=decodeURIComponent(e.slice(1));if(!t.startsWith(`${this.id}--`))return;let n=this.renderRoot.getElementById(t)??this.renderRoot.getElementById(`${t}--heading`);n&&(this.#l=e,n instanceof HTMLDetailsElement&&(n.open=!0),n.scrollIntoView({block:`start`}),(n.querySelector(`[tabindex="-1"], summary`)??n).focus({preventScroll:!0}))}#z(){this.#e=Da(this.getAttributeNames().map(e=>[e,this.getAttribute(e)])),this.#O.mode=this.#e.theme,this.requestUpdate(),this.#H()}#B(e){this.#o=e,this.updateComplete.then(()=>this.#V()).catch(()=>void 0),this.requestUpdate()}#V(){let e=this.renderRoot,t=e?.querySelector(`.probe`);if(!t)return;let n=e=>(t.style.color=`var(${e})`,bd(getComputedStyle(t).color)),r=n(`--_primary`),i=n(`--_secondary`),a=n(`--_send`),o=n(`--_receive`),s=n(`--_head`),c=this.#o===`dark`,l={};r&&s&&(l[`--_primary-text`]=xd(Td(r,s,c))),i&&s&&(l[`--_secondary-text`]=xd(Td(i,s,c))),a&&(l[`--_badge-ink-send`]=wd(a)),o&&(l[`--_badge-ink-receive`]=wd(o));let u=getComputedStyle(this).getPropertyValue(`--_logo`).trim(),d=u!==``&&u!==`none`,f=e?.querySelector(`.root`);if(f)for(let[e,t]of Object.entries(l))f.style.setProperty(e,t);(d!==this.#c||JSON.stringify(l)!==JSON.stringify(this.#s))&&(this.#c=d,this.#s=l,this.requestUpdate())}async#H(){let e=this.#e.src;if(e===this.#n||(this.#n=e,this.#r=void 0,this.#i=void 0,this.#a=[],this.#u.clear(),this.#T.clear(),this.#f.clear(),this.#m=``,this.#h=new Set,this.#g=!1,this.#y=!1,this.#b=void 0,this.#p&&URL.revokeObjectURL(this.#p),this.#p=void 0,e===void 0))return;let t=await Ti(wi(e,this.ownerDocument.baseURI));if(this.#n===e){if(this.#r=t,t.ok){this.#p=URL.createObjectURL(new Blob([t.text],{type:t.format===`json`?`application/json`:`application/yaml`}));let n=new Mi(t.url,t.data),r=await n.preload();if(this.#n!==e)return;let i=this.#e;this.#i=ga({resolver:n,data:t.data,specVersion:t.specVersion,specMajor:t.specMajor,problems:r,options:{labels:{publish:i.publishLabel,subscribe:i.subscribeLabel,send:i.sendLabel,receive:i.receiveLabel,request:i.requestLabel,reply:i.replyLabel},useChannelAddressAsIdentifier:i.useChannelAddressAsIdentifier,applyTraits:i.parserOptions.applyTraits}}),this.#a=this.#i.problems}this.requestUpdate()}}render(){return C`<div class="root">
|
|
2446
|
+
<span class="probe visually-hidden" aria-hidden="true"></span>
|
|
2447
|
+
${this.#U()}
|
|
2448
|
+
</div>`}#U(){let e=this.#e.src;if(e===void 0)return C`<div class="content"><p class="alert" role="alert">This viewer has no <code>src</code> attribute, so there is nothing to show.</p></div>`;let t=this.#r;if(!t)return C`<div class="content"><p class="summary">Loading ${e}…</p></div>`;if(!t.ok)return C`<div class="content">
|
|
2449
|
+
<p class="alert" role="alert">Could not load <code>${t.url}</code>: ${t.error.message}</p>
|
|
2450
|
+
</div>`;let n=this.#i;if(!n)return C`<div class="content"><p class="summary">Preparing ${e}…</p></div>`;let r=this.#e,i=n.operations,a={prefix:this.id,tree:this.#d,example:this.#E},o=r.sidebar?Zu(n,i,this.id,{info:r.info,servers:r.servers,messages:r.messages,schemas:r.schemas,showServers:r.showServers,showOperations:r.showOperations}):[],s=td(o,this.#m,r.searchKeepSections,this.#h),c=(e,t)=>td(o,e,r.searchKeepSections,t).shown,l=r.sidebar?C`<button
|
|
2451
|
+
class="menu"
|
|
2452
|
+
type="button"
|
|
2453
|
+
aria-label="Open navigation"
|
|
2454
|
+
aria-expanded=${this.#y?`true`:`false`}
|
|
2455
|
+
aria-controls="${this.id}--sidebar"
|
|
2456
|
+
@click=${()=>this.#y?this.#I():this.#F()}
|
|
2457
|
+
>
|
|
2458
|
+
${gd}
|
|
2459
|
+
</button>`:w,u=C`
|
|
2460
|
+
${Pa({doc:n,src:t.url,downloadHref:this.#p,hasLogo:this.#c,themeToggle:r.themeToggle,resolvedTheme:this.#o,onToggleTheme:()=>this.#O.toggle(),menu:l})}
|
|
2461
|
+
<div class="content">
|
|
2462
|
+
${r.info?Zl(n,`${this.id}--info`):w}
|
|
2463
|
+
${r.servers?od(n,this.id):w}
|
|
2464
|
+
${r.operations?Xu(n,{...a,messageIndex:e=>this.#f.get(e)??0,selectMessage:(e,t)=>{this.#f.set(e,t),this.requestUpdate()}}):w}
|
|
2465
|
+
${r.messages?cd(n,a,r.showMessageExamples):w}
|
|
2466
|
+
${r.schemas?ld(n,a):w}
|
|
2467
|
+
${r.errors?ud(this.#a,this.id):w}
|
|
2468
|
+
</div>
|
|
2469
|
+
`;return r.sidebar?C`<div
|
|
2470
|
+
class="layout layout--sidebar ${this.#y?`layout--open`:``} ${this.#v?`layout--resizing`:``}"
|
|
2471
|
+
@keydown=${e=>{e.key===`Escape`&&this.#y&&!e.target.classList?.contains(`side__search`)&&(this.#I(),e.preventDefault()),this.#L(e)}}
|
|
2472
|
+
>
|
|
2473
|
+
${pd({items:o,tags:$u(n,i),selectedTags:this.#h,tagsOpen:this.#g,onTagsToggle:e=>{this.#g=e,this.requestUpdate()},onToggleTag:e=>{let t=new Set(this.#h);t.has(e)?t.delete(e):t.add(e),this.#h=t,this.#P(c(this.#m,t),s.total)},onClearTags:()=>{this.#h=new Set,this.#P(c(this.#m,this.#h),s.total)},query:this.#m,keepSections:r.searchKeepSections,current:this.#b,open:this.#y,liveText:this.#x,onQuery:e=>this.#N(e,c(e,this.#h),s.total),onEscape:()=>this.#I(),onChoose:()=>this.#I(!0),onClose:()=>this.#I(),id:this.id})}
|
|
2474
|
+
${this.#j()}
|
|
2475
|
+
<div class="main" ?inert=${this.#y}>${u}</div>
|
|
2476
|
+
</div>`:C`<div class="layout"><div class="main">${u}</div></div>`}};customElements.get(`asyncapi-viewer`)||customElements.define(`asyncapi-viewer`,Od);var kd=/^[A-Za-z0-9][A-Za-z0-9_.-]*$/,Ad=new Set([`minimum`,`exclusiveMinimum`,`maximum`,`exclusiveMaximum`,`multipleOf`,`minLength`,`maxLength`,`pattern`,`minItems`,`maxItems`,`uniqueItems`,`minProperties`,`maxProperties`]);function jd(e){let t=[],n=e=>t.push(e);Number(e.specVersion.split(`.`)[0])!==e.specMajor&&n(`specMajor ${e.specMajor} does not match specVersion ${e.specVersion}`),e.title||n(`title is empty`),Md(`servers`,e.servers.map(e=>e.anchor),n),Md(`operations`,e.operations.map(e=>e.anchor),n),Md(`messages`,e.messages.map(e=>e.anchor),n),Md(`schemas`,e.schemas.map(e=>e.anchor),n);let r=new Set(e.servers.map(e=>e.id)),i=new Set(e.schemas.map(e=>e.id));for(let t of e.operations){let e=`operation ${t.id}`;t.action===`send`&&t.kind!==`send`&&t.kind!==`request`&&n(`${e}: action send with kind ${t.kind}`),t.action===`receive`&&t.kind!==`receive`&&t.kind!==`reply`&&n(`${e}: action receive with kind ${t.kind}`),(t.kind===`request`||t.kind===`reply`)!=(t.reply!==void 0)&&n(`${e}: kind ${t.kind} but reply is ${t.reply?`present`:`absent`}`),t.badgeLabel||n(`${e}: empty badgeLabel`),t.heading||n(`${e}: empty heading`);for(let i of t.channel.servers)r.has(i)||n(`${e}: channel server "${i}" is not a known server`);for(let r of t.messages)Nd(r,`${e} message ${r.id}`,i,n)}for(let t of e.messages)Nd(t,`message ${t.id}`,i,n);for(let t of e.schemas)t.schema.kind===`node`&&(t.schema.name!==t.id&&n(`schema ${t.id}: root name "${t.schema.name}" should equal its id`),Pd(t.schema,`schema ${t.id}`,[],!0,i,n));return t}function Md(e,t,n){let r=new Set;for(let i of t)kd.test(i)||n(`${e}: anchor "${i}" is not a safe slug`),r.has(i)&&n(`${e}: duplicate anchor "${i}"`),r.add(i)}function Nd(e,t,n,r){e.contentType||r(`${t}: empty contentType`),e.schemaFormat||r(`${t}: empty schemaFormat`);for(let[i,a]of[[`payload`,e.payload],[`headers`,e.headers]])a&&a.kind===`node`&&(a.name!==``&&r(`${t} ${i}: root name should be "" but is "${a.name}"`),Pd(a,`${t} ${i}`,[],!0,n,r))}function Pd(e,t,n,r,i,a){let o=`${t} › ${e.name||`(root)`}`;r&&e.required&&a(`${o}: root nodes are never required`),Fd(e.path,n)||a(`${o}: path [${e.path}] should be [${n}]`);for(let t of e.constraints)Ad.has(t.key)||a(`${o}: unknown constraint ${t.key}`);e.circularRef!==void 0&&e.children.length>0&&a(`${o}: circular reference with children`),e.refName!==void 0&&i.size>0&&!i.has(e.refName)&&a(`${o}: refName "${e.refName}" is not a component schema`);let s=e.types.includes(`array`),c=e.children.filter(e=>e.name===`[]`);c.length>1&&a(`${o}: more than one "[]" item node`),c.length===1&&!s&&a(`${o}: "[]" item node on a non-array`),c.length===1&&e.children.length!==1&&a(`${o}: array with properties besides "[]"`);let l=r?[]:e.name===`[]`?[...n.slice(0,-1),`${n[n.length-1]??``}[]`]:[...n,e.name];for(let n of e.children)Pd(n,t,l,!1,i,a);e.composition&&e.composition.variants.forEach((e,t)=>{e.title||a(`${o}: variant ${t+1} has no title`),Pd(e.node,`${o} variant ${t+1}`,n,r,i,a)})}function Fd(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}return e.AsyncAPIViewerElement=Od,e.DEFAULTS=ya,e.OPTION_SPECS=va,e.RefResolver=Mi,e.checkDocument=jd,e.isRef=Ai,e.loadDocument=Ti,e.normalize=ga,e.parseOptions=Da,e.parseText=Ei,e.resolveUrl=wi,e.schemaNameOf=ji,e.toAttributeName=Ta,e})({});
|
|
2477
|
+
//# sourceMappingURL=asyncapi-viewer.iife.js.map
|