/*!
* @license
* rapidoc v12.0.0
* (c) 2026 Mrinmoy Majumdar <mrin9@yahoo.com>
* SPDX-License-Identifier: MIT
*/
var vr=globalThis,Ca=vr.ShadowRoot&&(vr.ShadyCSS===void 0||vr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ta=Symbol(),di=new WeakMap,pi=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Ta)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(Ca&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=di.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&di.set(t,e))}return e}toString(){return this.cssText}},ui=e=>new pi(typeof e=="string"?e:e+"",void 0,Ta),W=(e,...t)=>new pi(e.length===1?e[0]:t.reduce((r,a,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[s+1],e[0]),e,Ta),ac=(e,t)=>{if(Ca)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let a=document.createElement("style"),s=vr.litNonce;s!==void 0&&a.setAttribute("nonce",s),a.textContent=r.cssText,e.appendChild(a)}},hi=Ca?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let a of t.cssRules)r+=a.cssText;return ui(r)})(e):e,{is:sc,defineProperty:ic,getOwnPropertyDescriptor:nc,getOwnPropertyNames:oc,getOwnPropertySymbols:lc,getPrototypeOf:cc}=Object,xr=globalThis,mi=xr.trustedTypes,dc=mi?mi.emptyScript:"",pc=xr.reactiveElementPolyfillSupport,Lt=(e,t)=>e,wr={toAttribute(e,t){switch(t){case Boolean:e=e?dc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Oa=(e,t)=>!sc(e,t),fi={attribute:!0,type:String,converter:wr,reflect:!1,useDefault:!1,hasChanged:Oa};Symbol.metadata??=Symbol("metadata"),xr.litPropertyMetadata??=new WeakMap;var pt=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=fi){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 r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&ic(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:s}=nc(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:a,set(i){let n=a?.call(this);s?.call(this,i),this.requestUpdate(e,n,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??fi}static _$Ei(){if(this.hasOwnProperty(Lt("elementProperties")))return;let e=cc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Lt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Lt("properties"))){let t=this.properties,r=[...oc(t),...lc(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(hi(a))}else e!==void 0&&t.push(hi(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r: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 r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ac(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,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,r);if(a!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute===void 0?wr:r.converter).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,a=r._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let s=r.getPropertyOptions(a),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute===void 0?wr:s.converter;this._$Em=a;let n=i.fromAttribute(t,s.type);this[a]=n??this._$Ej?.get(a)??n,this._$Em=null}}requestUpdate(e,t,r,a=!1,s){if(e!==void 0){let i=this.constructor;if(a===!1&&(s=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??Oa)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:a,wrapped:s},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),s!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}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[a,s]of this._$Ep)this[a]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[a,s]of r){let{wrapped:i}=s,n=this[a];i!==!0||this._$AL.has(a)||n===void 0||this.C(a,void 0,s,n)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.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(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};pt.elementStyles=[],pt.shadowRootOptions={mode:"open"},pt[Lt("elementProperties")]=new Map,pt[Lt("finalized")]=new Map,pc?.({ReactiveElement:pt}),(xr.reactiveElementVersions??=[]).push("2.1.2");var _a=globalThis,gi=e=>e,$r=_a.trustedTypes,yi=$r?$r.createPolicy("lit-html",{createHTML:e=>e}):void 0,Fa="$lit$",De=`lit$${Math.random().toFixed(9).slice(2)}$`,qa="?"+De,uc=`<${qa}>`,Me=document,Pt=()=>Me.createComment(""),zt=e=>e===null||typeof e!="object"&&typeof e!="function",Ra=Array.isArray,bi=e=>Ra(e)||typeof e?.[Symbol.iterator]=="function",ja=`[
\f\r]`,Mt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vi=/-->/g,xi=/>/g,Ue=RegExp(`>|${ja}(?:([^\\s"'>=/]+)(${ja}*=${ja}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),wi=/'/g,$i=/"/g,ki=/^(?:script|style|textarea|title)$/i,m=(e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),se=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),Si=new WeakMap,He=Me.createTreeWalker(Me,129);function Ai(e,t){if(!Ra(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return yi===void 0?t:yi.createHTML(t)}var Ei=(e,t)=>{let r=e.length-1,a=[],s,i=t===2?"<svg>":t===3?"<math>":"",n=Mt;for(let o=0;o<r;o++){let l=e[o],p,d,c=-1,f=0;for(;f<l.length&&(n.lastIndex=f,d=n.exec(l),d!==null);)f=n.lastIndex,n===Mt?d[1]==="!--"?n=vi:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(n=Ue):(ki.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=Ue):n=xi:n===Ue?d[0]===">"?(n=s??Mt,c=-1):d[1]===void 0?c=-2:(c=n.lastIndex-d[2].length,p=d[1],n=d[3]===void 0?Ue:d[3]==='"'?$i:wi):n===$i||n===wi?n=Ue:n===vi||n===xi?n=Mt:(n=Ue,s=void 0);let h=n===Ue&&e[o+1].startsWith("/>")?" ":"";i+=n===Mt?l+uc:c>=0?(a.push(p),l.slice(0,c)+Fa+l.slice(c)+De+h):l+De+(c===-2?o:h)}return[Ai(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Ia=class Zl{constructor({strings:t,_$litType$:r},a){let s;this.parts=[];let i=0,n=0,o=t.length-1,l=this.parts,[p,d]=Ei(t,r);if(this.el=Zl.createElement(p,a),He.currentNode=this.el.content,r===2||r===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=He.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(Fa)){let f=d[n++],h=s.getAttribute(c).split(De),y=/([.?@])?(.*)/.exec(f);l.push({type:1,index:i,name:y[2],strings:h,ctor:y[1]==="."?Ci:y[1]==="?"?Ti:y[1]==="@"?Oi:Ut}),s.removeAttribute(c)}else c.startsWith(De)&&(l.push({type:6,index:i}),s.removeAttribute(c));if(ki.test(s.tagName)){let c=s.textContent.split(De),f=c.length-1;if(f>0){s.textContent=$r?$r.emptyScript:"";for(let h=0;h<f;h++)s.append(c[h],Pt()),He.nextNode(),l.push({type:2,index:++i});s.append(c[f],Pt())}}}else if(s.nodeType===8)if(s.data===qa)l.push({type:2,index:i});else{let c=-1;for(;(c=s.data.indexOf(De,c+1))!==-1;)l.push({type:7,index:i}),c+=De.length-1}i++}}static createElement(t,r){let a=Me.createElement("template");return a.innerHTML=t,a}};function Ke(e,t,r=e,a){if(t===se)return t;let s=a===void 0?r._$Cl:r._$Co?.[a],i=zt(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,a)),a===void 0?r._$Cl=s:(r._$Co??=[])[a]=s),s!==void 0&&(t=Ke(e,s._$AS(e,t.values),s,a)),t}var Di=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:r}=this._$AD,a=(e?.creationScope??Me).importNode(t,!0);He.currentNode=a;let s=He.nextNode(),i=0,n=0,o=r[0];for(;o!==void 0;){if(i===o.index){let l;o.type===2?l=new kr(s,s.nextSibling,this,e):o.type===1?l=new o.ctor(s,o.name,o.strings,this,e):o.type===6&&(l=new _i(s,this,e)),this._$AV.push(l),o=r[++n]}i!==o?.index&&(s=He.nextNode(),i++)}return He.currentNode=Me,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings===void 0?r._$AI(e[t]):(r._$AI(e,r,t),t+=r.strings.length-2)),t++}},kr=class Yl{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,a,s){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=a,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Ke(this,t,r),zt(t)?t===F||t==null||t===""?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==se&&this._(t):t._$litType$===void 0?t.nodeType===void 0?bi(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==F&&zt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Me.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:a}=t,s=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Ia.createElement(Ai(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new Di(s,this),n=i.u(this.options);i.p(r),this.T(n),this._$AH=i}}_$AC(t){let r=Si.get(t.strings);return r===void 0&&Si.set(t.strings,r=new Ia(t)),r}k(t){Ra(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,a,s=0;for(let i of t)s===r.length?r.push(a=new Yl(this.O(Pt()),this.O(Pt()),this,this.options)):a=r[s],a._$AI(i),s++;s<r.length&&(this._$AR(a&&a._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let a=gi(t).nextSibling;gi(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ut=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,s){this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=F}_$AI(e,t=this,r,a){let s=this.strings,i=!1;if(s===void 0)e=Ke(this,e,t,0),i=!zt(e)||e!==this._$AH&&e!==se,i&&(this._$AH=e);else{let n=e,o,l;for(e=s[0],o=0;o<s.length-1;o++)l=Ke(this,n[r+o],t,o),l===se&&(l=this._$AH[o]),i||=!zt(l)||l!==this._$AH[o],l===F?e=F:e!==F&&(e+=(l??"")+s[o+1]),this._$AH[o]=l}i&&!a&&this.j(e)}j(e){e===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ci=class extends Ut{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===F?void 0:e}},Ti=class extends Ut{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==F)}},Oi=class extends Ut{constructor(e,t,r,a,s){super(e,t,r,a,s),this.type=5}_$AI(e,t=this){if((e=Ke(this,e,t,0)??F)===se)return;let r=this._$AH,a=e===F&&r!==F||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==F&&(r===F||a);a&&this.element.removeEventListener(this.name,this,r),s&&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)}},_i=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ke(this,e)}},hc={M:Fa,P:De,A:qa,C:1,L:Ei,R:Di,D:bi,V:Ke,I:kr,H:Ut,N:Ti,U:Oi,B:Ci,F:_i},mc=_a.litHtmlPolyfillSupport;mc?.(Ia,kr),(_a.litHtmlVersions??=[]).push("3.3.3");var fc=(e,t,r)=>{let a=r?.renderBefore??t,s=a._$litPart$;if(s===void 0){let i=r?.renderBefore??null;a._$litPart$=s=new kr(t.insertBefore(Pt(),i),i,void 0,r??{})}return s._$AI(e),s},Na=globalThis,ve=class extends pt{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=fc(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return se}};ve._$litElement$=!0,ve.finalized=!0,Na.litElementHydrateSupport?.({LitElement:ve});var gc=Na.litElementPolyfillSupport;gc?.({LitElement:ve}),(Na.litElementVersions??=[]).push("4.2.2");var Ce=e=>(t,r)=>{r===void 0?customElements.define(e,t):r.addInitializer(()=>{customElements.define(e,t)})},yc={attribute:!0,type:String,converter:wr,reflect:!1,hasChanged:Oa},bc=(e=yc,t,r)=>{let{kind:a,metadata:s}=r,i=globalThis.litPropertyMetadata.get(s);if(i===void 0&&globalThis.litPropertyMetadata.set(s,i=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(r.name,e),a==="accessor"){let{name:n}=r;return{set(o){let l=t.get.call(this);t.set.call(this,o),this.requestUpdate(n,l,e,!0,o)},init(o){return o!==void 0&&this.C(n,void 0,e,o),o}}}if(a==="setter"){let{name:n}=r;return function(o){let l=this[n];t.call(this,o),this.requestUpdate(n,l,e,!0,o)}}throw Error("Unsupported decorator location: "+a)};function k(e){return(t,r)=>typeof r=="object"?bc(e,t,r):((a,s,i)=>{let n=s.hasOwnProperty(i);return s.constructor.createProperty(i,a),n?Object.getOwnPropertyDescriptor(s,i):void 0})(e,t,r)}function ie(e){return k({...e,state:!0,attribute:!1})}function Ba(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var We=Ba();function Fi(e){We=e}var Ve={exec:()=>null};function Je(e){let t=[];return r=>{let a=Math.max(0,Math.min(3,r-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function R(e,t=""){let r=typeof e=="string"?e:e.source,a={replace:(s,i)=>{let n=typeof i=="string"?i:i.source;return n=n.replace(te.caret,"$1"),r=r.replace(s,n),a},getRegex:()=>new RegExp(r,t)};return a}var vc=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),te={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Je(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Je(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Je(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Je(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Je(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Je(e=>RegExp(`^ {0,${e}}(?:</?(?:${Kt})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Je(e=>RegExp(`^ {0,${e}}>`))},xc=/^(?:[ \t]*(?:\n|$))+/,wc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$c=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ht=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,La=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,qi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ri=R(qi).replace(/bull/g,La).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Sc=R(qi).replace(/bull/g,La).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ac=/^[^\n]+/,za=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ec=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",za).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Dc=R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,La).getRegex(),Kt="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ma=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Cc=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ma).replace("tag",Kt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ji=e=>R(Pa).replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex(),Tc=ji(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Oc=ji(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ua={blockquote:R(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Oc).getRegex(),code:wc,def:Ec,fences:$c,heading:kc,hr:Ht,html:Cc,lheading:Ri,list:Dc,newline:xc,paragraph:Tc,table:Ve,text:Ac},Ii=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex(),_c={...Ua,lheading:Sc,table:Ii,paragraph:R(Pa).replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ii).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex()},Fc={...Ua,html:R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ma).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ve,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(Pa).replace("hr",Ht).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ri).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ni=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,jc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ae=/[\p{P}\p{S}]/u,ut=/[\s\p{P}\p{S}]/u,Wt=/[^\s\p{P}\p{S}]/u,Ic=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ut).getRegex(),Nc=/[\p{Pi}\p{Ps}"']/u,Bi=/(?!~)[\p{P}\p{S}]/u,Bc=/(?!~)[\s\p{P}\p{S}]/u,Lc=/(?:[^\s\p{P}\p{S}]|~)/u,Pc=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Li=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,zc=R(Li,"u").replace(/punct/g,Ae).getRegex(),Mc=R(Li,"u").replace(/punct/g,Bi).getRegex(),Uc=R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,Nc).replace(/punct/g,Ae).getRegex(),Pi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hc=R(Pi,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,ut).replace(/punct/g,Ae).getRegex(),Kc=R(Pi,"gu").replace(/notPunctSpace/g,Lc).replace(/punctSpace/g,Bc).replace(/punct/g,Bi).getRegex(),Wc=R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,ut).replace(/punct/g,Ae).getRegex(),Vc=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,ut).replace(/punct/g,Ae).getRegex(),Jc=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,ut).replace(/punct/g,Ae).getRegex(),Gc=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ae).getRegex(),Zc=R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,ut).replace(/punct/g,Ae).getRegex(),Yc=R(/\\(punct)/,"gu").replace(/punct/g,Ae).getRegex(),Xc=R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,Ae).getRegex(),Qc=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),ed=R(Ma).replace("(?:-->|$)","-->").getRegex(),td=R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ed).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zi=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Sr=R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",zi).getRegex(),rd=R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Sr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ad=R(/^!?\[(label)\]\[(ref)\]/).replace("label",Sr).replace("ref",za).getRegex(),sd=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",za).getRegex(),Mi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,id=R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",zi).getRegex(),nd=R("reflink|nolink(?!\\()","g").replace("reflink",R(/^!?\[(label)\]\[(ref)\]/).replace("label",id).replace("ref",Mi).getRegex()).replace("nolink",R(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mi).getRegex()).getRegex(),Ui=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,od=R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Ha={_backpedal:Ve,anyPunctuation:Yc,anyPunctuationOutsideCode:Xc,autolink:Qc,blockSkip:Pc,br:Ni,code:Rc,del:Ve,delLDelim:Ve,delRDelim:Ve,emStrongLDelim:zc,emStrongRDelimAst:Hc,emStrongRDelimUnd:Vc,escape:qc,link:rd,nolink:sd,punctuation:Ic,reflink:ad,reflinkSearch:nd,tag:td,text:jc,url:Ve},ld={...Ha,emStrongLDelim:Uc,emStrongRDelimAst:Wc,emStrongRDelimUnd:Jc,link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",Sr).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sr).getRegex()},Ka={...Ha,emStrongRDelimAst:Kc,emStrongLDelim:Mc,delLDelim:Gc,delRDelim:Zc,url:R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",od).replace("protocol",Ui).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Ui).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},cd={...Ka,br:R(Ni).replace("{2,}","*").getRegex(),text:R(Ka.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ar={normal:Ua,gfm:_c,pedantic:Fc},Vt={normal:Ha,gfm:Ka,breaks:cd,pedantic:ld},dd={"&":"&","<":"<",">":">",'"':""","'":"'"},Hi=e=>dd[e];function de(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Hi)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Hi);return e}function pd(e){return te.numericCharacterReference.test(e)?e.replace(te.numericCharacterReferenceOrAmpersand,(t,r,a)=>{if(r===void 0&&a===void 0)return"&";let s=r===void 0?Number.parseInt(a,16):Number.parseInt(r,10);return s===0||s>1114111||s>=55296&&s<=57343?"\uFFFD":s===38?"&":String.fromCodePoint(s)}):e}function Ki(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Wi(e,t){let r=e.replace(te.findPipe,(s,i,n)=>{let o=!1,l=i;for(;--l>=0&&n[l]==="\\";)o=!o;return o?"|":" |"}).split(te.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(te.slashPipe,"|");return r}function Ie(e,t,r){let a=e.length;if(a===0)return"";let s=0;for(;s<a;){let i=e.charAt(a-s-1);if(i===t&&!r)s++;else if(i!==t&&r)s++;else break}return e.slice(0,a-s)}function Vi(e){let t=e.split(`
`),r=t.length-1;for(;r>=0&&te.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
`)}function Er(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function Ji(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let r=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return r>0?-2:-1}function Dr(e,t=0){let r=t,a="";for(let s of e)if(s===" "){let i=4-r%4;a+=" ".repeat(i),r+=i}else a+=s,r++;return a}function Gi(e,t,r,a,s){let i=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!",p=a.state.inLink,d=a.state.linkEmitted,c=a.state.inRawBlock;a.state.inLink=!0,a.state.linkEmitted=!1;let f=a.inlineTokens(o),h=a.state.linkEmitted;if(a.state.linkEmitted=d,a.state.inLink=p,!l){if(h){a.state.inRawBlock=c;return}a.state.linkEmitted=!0}return{type:l?"image":"link",raw:r,href:i,title:n,text:o,tokens:f}}function ud(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
`).map(i=>{let n=i.match(r.other.beginningSpace);if(n===null)return i;let[o]=n;return i.slice(Math.min(o.length,s.length))}).join(`
`)}function Zi(e,t,r,a){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++;continue}if(t[s]==="`"){let o=a.inline.code.exec(t.slice(s));if(o){s+=o[0].length-1;continue}}if(t[s]!=="<")continue;let i=e.slice(r+s),n=a.inline.tag.exec(i)||a.inline.autolink.exec(i);if(n){if(n[0].length>t.length-s)return!0;s+=n[0].length-1}}return!1}var ht=class{options;rules;lexer;constructor(e){this.options=e||We}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:Vi(t[0]);return{type:"code",raw:r,codeBlockStyle:"indented",text:r.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],a=ud(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let a=Ie(r,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceTabChar.test(a))&&(r=a.trim())}return{type:"heading",raw:Ie(t[0],`
`),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ie(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Ie(t[0],`
`).split(`
`),a="",s="",i=[];for(;r.length>0;){let n=!1,o=[],l=0;for(;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),n=!0;else if(!n)o.push(r[l]);else break;r=r.slice(l);let p=o.join(`
`),d=p.replace(this.rules.other.blockquoteMarkerWhitespace,(h,y,u)=>y+Dr(u,y.length)).replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${p}`:p,s=s?`${s}
${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=c,r.length===0)break;let f=i.at(-1);if(f?.type==="code"||f?.type==="heading"||f?.type==="hr"||f?.type==="html")break;if(f?.type==="blockquote"){let h=f,y=r.join(`
`),u=h.raw+`
`+y.replace(this.rules.other.blockquoteSetextReplace2,""),g=this.blockquote(u);i[i.length-1]=g;let v=u.substring(g.raw.length).replace(/^\n/,""),S=v?v.split(`
`).length:0,A=S?r.slice(0,-S):r;A.length>0&&(a=`${a}
${A.join(`
`)}`),s=s.substring(0,s.length-h.text.length)+g.text;break}if(f?.type==="list"){let h=f,y=h.raw+`
`+r.join(`
`),u=this.list(y);i[i.length-1]=u;let g=u.raw.length>h.raw.length?y.slice(h.raw.length+1,u.raw.length).split(`
`).length:0;if(g>0){let v=r.slice(0,g).join(`
`);a=`${a}
${v}`,s=`${s}
${v}`}r=r.slice(g)}}return{type:"blockquote",raw:a,tokens:i,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=e,a=()=>r.length-e.length,s=t[1].trim(),i=s.length>1,n={type:"list",raw:"",ordered:i,start:i?+s.slice(0,-1):"",loose:!1,items:[]};s=i?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=i?s:"[*+-]");let o=this.rules.other.listItemRegex(s),l=!1;for(;e;){let d=!1,c="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;let f=a();e=e.substring(t[0].length);let h=t[2].split(`
`,1)[0],y=t[1].length,u=this.options.pedantic?Dr(h,y):h.replace(this.rules.other.leadingSpaceTab,b=>Dr(b,y)),g=e.split(`
`,1)[0],v=!u.trim(),S=0;if(this.options.pedantic?(S=2,c=u.trimStart()):v?S=y+1:(S=u.search(this.rules.other.nonSpaceChar),S=S>4?1:S,c=u.slice(S),S+=y),v&&this.rules.other.blankLine.test(g)&&(e=e.substring(g.length+1),d=!0),!d){let b=this.rules.other.nextBulletRegex(S),w=this.rules.other.hrRegex(S),$=this.rules.other.fencesBeginRegex(S),E=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(S):this.rules.other.headingBeginRegex(S),T=this.rules.other.htmlBeginRegex(S),D=this.rules.other.blockquoteBeginRegex(S);for(;e;){let L=e.split(`
`,1)[0],_;if(g=L,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),_=g):_=g.replace(this.rules.other.leadingSpaceTab,B=>Dr(B)),$.test(g)||E.test(g)||T.test(g)||D.test(g)||b.test(g)||w.test(g))break;if(_.search(this.rules.other.nonSpaceChar)>=S||!g.trim())c+=`
`+_.slice(S);else{if(v||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(u)||E.test(u)||w.test(u))break;let B=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${u}
${g}`)?` ${_.replace(/^ {0,3}/,"")}`:g;c+=`
`+B}v=!g.trim(),e=e.substring(L.length+1),u=_.slice(S)}}let A=r.slice(f,a());n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(A)&&(l=!0)),n.items.push({type:"list_item",raw:A,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]})}let p=n.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;n.raw=r.slice(0,a()).trimEnd();for(let d of n.items)if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),!n.loose){let c=d.tokens.filter(f=>f.type==="space");n.loose=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw))}for(let d of n.items){let c=d.tokens[0];if(d.task&&(c?.type==="text"||c?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=h.checked,n.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=h.raw+d.tokens[0].raw,d.tokens[0].text=h.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(h)):d.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):d.tokens.unshift(h)}}else d.task&&=!1}if(n.loose)for(let d of n.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.type="paragraph")}return n}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=Vi(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&Ji(t[2],"()")!==-1)return;let r=Er(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:Ie(t[0],`
`),href:a,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Wi(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],i={type:"table",raw:Ie(t[0],`
`),header:[],align:[],rows:[]};if(r.length===a.length){for(let n of a)this.rules.other.tableAlignRight.test(n)?i.align.push("right"):this.rules.other.tableAlignCenter.test(n)?i.align.push("center"):this.rules.other.tableAlignLeft.test(n)?i.align.push("left"):i.align.push(null);for(let n=0;n<r.length;n++)i.header.push({text:r[n],tokens:this.lexer.inline(r[n]),header:!0,align:i.align[n]});for(let n of s)i.rows.push(Wi(n,i.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[l]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:Ie(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zi(e,t[1],r,this.rules))return;let a=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let n=Ie(a.slice(0,-1),"\\");if((a.length-n.length)%2==0)return}else{let n=Ji(t[2],"()");if(n===-2)return;if(n>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s.slice(1):s.slice(1,-1)),Gi(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let a=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zi(e,r[1],a,this.rules))return;let s=t[Er((r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Gi(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!a||!a[1]&&!a[2]&&!a[3]&&!a[4])return;let s=a[0][0],i=r===s,n=t.length-e.length,o=n;for(;!this.options.pedantic&&o>0&&t[o-1]===s;)o--;let l=[...t.slice(Math.max(0,o-2),o)].at(-1)??"",p=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o<n&&(r=l);let d=o<n?p:!!this.rules.inline.punctuation.exec(r);if(a[4]&&r.match(this.rules.other.unicodeAlphaNumeric))return;let c=a[1]||a[3]||"";if(!c||!r||d){let f=[...a[0]].length-1,h,y,u=f,g=0,v=n-o+f,S=!this.options.pedantic&&!!l.trim()&&(!!c||s==="*"&&!p),A=s==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(A.lastIndex=0,t=t.slice(-1*e.length+f);(a=A.exec(t))!==null;){if(h=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!h)continue;if(y=[...h].length,a[3]||a[4]){u+=y;continue}if(a[5]||a[6]||S){if(i&&(a[5]||a[6]))break;if(v%3&&!((v+y)%3)){g+=y;continue}}if(u-=y,u>0)continue;y=Math.min(y,y+u+g);let b=[...a[0]][0].length,w=e.slice(0,f+a.index+b+y);if(Math.min(f,y)%2){let E=w.slice(1,-1);return{type:"em",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}let $=w.slice(2,-2);return{type:"strong",raw:w,text:$,tokens:this.lexer.inlineTokens($)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return a&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...a[0]].length-1,i,n,o=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+s);(a=l.exec(t))!==null;){if(i=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!i||(n=[...i].length,n!==s))continue;if(a[3]||a[4]){o+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o);let p=[...a[0]][0].length,d=e.slice(0,s+a.index+p+n),c=d.slice(s,-s);return{type:"del",raw:d,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,a;return t[2]==="@"?(r=t[1],a="mailto:"+r):(r=t[1],a=r),{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,a;if(t[2]==="@")r=t[0],a="mailto:"+r;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);r=t[0],a=t[1]==="www."?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:pd(t[0]),escaped:r}}}},xe=class li{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||We,this.options.tokenizer=this.options.tokenizer||new ht,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:te,block:Ar.normal,inline:Vt.normal};this.options.pedantic?(r.block=Ar.pedantic,r.inline=Vt.pedantic):this.options.gfm&&(r.block=Ar.gfm,r.inline=this.options.breaks?Vt.breaks:Vt.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ar,inline:Vt}}static lex(t,r){return new li(r).lex(t)}static lexInline(t,r){return new li(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.state.inRawBlock=!1,this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],a=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+i.raw,o.text+=`
`+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if((i=this.tokenizer.fences(t))||(i=this.tokenizer.heading(t))||(i=this.tokenizer.hr(t))||(i=this.tokenizer.blockquote(t))||(i=this.tokenizer.list(t))||(i=this.tokenizer.html(t))){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+i.raw,o.text+=`
`+i.raw,this.inlineQueue.at(-1).src=o.text):(this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}),r.push(i));continue}if((i=this.tokenizer.table(t))||(i=this.tokenizer.lheading(t))){t=t.substring(i.raw.length),r.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),p;this.options.extensions.startBlock.forEach(d=>{p=d.call({lexer:this},l),typeof p=="number"&&p>=0&&(o=Math.min(o,p))}),o<1/0&&o>=0&&(n=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let o=r.at(-1);a&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+i.raw,o.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),a=n.length!==t.length,t=t.substring(i.raw.length)}else if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+i.raw,o.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let a of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(a[0])&&t.charAt(a.index-1)!=="!")return!0;for(let a of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=a[0],i=s.lastIndexOf("[");if(s.charAt(0)!=="!"&&Object.hasOwn(this.tokens.links,Er(s.slice(i+1,-1)))&&!(i>1&&this.linkInText(s.slice(1,i-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let a=this.state.linkParenPossible;this.state.linkParenPossible=a&&t.includes(")");try{return this.#e(t,r)}finally{this.state.linkParenPossible=a}}#e(t,r){let a=t.includes("*")||t.includes("_")||t.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==ht.prototype.emStrong||this.tokenizer.del!==ht.prototype.del?this.#t(t):t,s=!1,i="",n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(i=""),s=!1;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if((o=this.tokenizer.escape(t))||(o=this.tokenizer.tag(t))||(o=this.tokenizer.link(t))){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let p=r.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):r.push(o);continue}if((o=this.tokenizer.emStrong(t,a,i))||(o=this.tokenizer.codespan(t))||(o=this.tokenizer.br(t))||(o=this.tokenizer.del(t,a,i))||(o=this.tokenizer.autolink(t))||!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if(this.options.extensions?.startInline){let p=1/0,d=t.slice(1),c;this.options.extensions.startInline.forEach(f=>{c=f.call({lexer:this},d),typeof c=="number"&&c>=0&&(p=Math.min(p,c))}),p<1/0&&p>=0&&(l=t.substring(0,p+1))}if(o=this.tokenizer.inlineText(l)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),s=!0;let p=r.at(-1);p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):r.push(o)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}#t(t){let r=t;if(this.tokens.links&&t.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,s=i=>{let n=i.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Er(i.slice(n+1,-1))))return i;if(n>1&&i.charAt(0)!=="!"){let o=i.slice(1,n-1);if(this.linkInText(o))return"["+o.replace(a,s)+"]["+"a".repeat(i.length-n-2)+"]"}return"["+"a".repeat(i.length-2)+"]"};r=r.replace(a,s)}return r=r.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,s,i)=>i?"+".repeat(a.length):s?s+a.slice(s.length,-s.length).replace(/`/g,"+")+s:a),r=r.replace(this.tokenizer.rules.inline.blockSkip,(a,s,i)=>{let n=i?i.length:0;return a.slice(0,n)+"["+"a".repeat(a.length-n-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r,r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(!this.options.silent)throw Error(r)}},Cr=class{options;parser;constructor(e){this.options=e||We}space(e){return""}code({text:e,lang:t,escaped:r}){let a=(t||"").match(te.notSpaceStart)?.[0],s=e?e.replace(te.endingNewline,"")+`
`:"";return a?'<pre><code class="language-'+de(a)+'">'+(r?s:de(s,!0))+`</code></pre>
`:"<pre><code>"+(r?s:de(s,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){let t=e.ordered,r=e.start,a="";for(let n=0;n<e.items.length;n++){let o=e.items[n];a+=this.listitem(o)}let s=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+s+i+`>
`+a+"</"+s+`>
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",r="";for(let s=0;s<e.header.length;s++)r+=this.tablecell(e.header[s]);t+=this.tablerow({text:r});let a="";for(let s=0;s<e.rows.length;s++){let i=e.rows[s];r="";for(let n=0;n<i.length;n++)r+=this.tablecell(i[n]);a+=this.tablerow({text:r})}return a&&=`<tbody>${a}</tbody>`,`<table>
<thead>
`+t+`</thead>
`+a+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${de(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:a,autolink:s}){let i=s?de(r,!0):this.parser.parseInline(a),n=Ki(e);if(n===null)return i;e=de(n,s);let o='<a href="'+e+'"';return t&&(o+=' title="'+de(t)+'"'),o+=">"+i+"</a>",o}image({href:e,title:t,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let s=Ki(e);if(s===null)return de(r);e=s;let i=`<img src="${de(e)}" alt="${de(r)}"`;return t&&(i+=` title="${de(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:de(e.text)}},Wa=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return""}checkbox({raw:e}){return e}},we=class ci{options;renderer;textRenderer;constructor(t){this.options=t||We,this.options.renderer=this.options.renderer||new Cr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wa,this.textRenderer.parser=this}static parse(t,r){return new ci(r).parse(t)}static parseInline(t,r){return new ci(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let n=s,o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(n.type)){r+=o||"";continue}}let i=s;switch(i.type){case"space":r+=this.renderer.space(i);break;case"hr":r+=this.renderer.hr(i);break;case"heading":r+=this.renderer.heading(i);break;case"code":r+=this.renderer.code(i);break;case"table":r+=this.renderer.table(i);break;case"blockquote":r+=this.renderer.blockquote(i);break;case"list":r+=this.renderer.list(i);break;case"checkbox":r+=this.renderer.checkbox(i);break;case"html":r+=this.renderer.html(i);break;case"def":r+=this.renderer.def(i);break;case"paragraph":r+=this.renderer.paragraph(i);break;case"text":r+=this.renderer.text(i);break;default:{let n='Token with "'+i.type+'" type was not found.';if(this.options.silent)return"";throw Error(n)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let a="";for(let s=0;s<t.length;s++){let i=t[s];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){a+=o||"";continue}}let n=i;switch(n.type){case"escape":a+=r.text(n);break;case"html":a+=r.html(n);break;case"link":a+=r.link(n);break;case"image":a+=r.image(n);break;case"checkbox":a+=r.checkbox(n);break;case"strong":a+=r.strong(n);break;case"em":a+=r.em(n);break;case"codespan":a+=r.codespan(n);break;case"br":a+=r.br(n);break;case"del":a+=r.del(n);break;case"text":a+=r.text(n);break;default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return"";throw Error(o)}}}return a}},Jt=class{options;block;constructor(e){this.options=e||We}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?xe.lex:xe.lexInline}provideParser(e=this.block){return e?we.parse:we.parseInline}};function Ge(e,t){if(Array.isArray(t))for(let r=0;r<t.length;r++)e.push(t[r]);else e.push(t)}var Ze=new class{defaults=Ba();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=we;Renderer=Cr;TextRenderer=Wa;Lexer=xe;Tokenizer=ht;Hooks=Jt;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let a of e)switch(Ge(r,t.call(this,a)),a.type){case"table":{let s=a;for(let i of s.header)Ge(r,this.walkTokens(i.tokens,t));for(let i of s.rows)for(let n of i)Ge(r,this.walkTokens(n.tokens,t));break}case"list":{let s=a;Ge(r,this.walkTokens(s.items,t));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(i=>{let n=s[i].flat(1/0);Ge(r,this.walkTokens(n,t))}):s.tokens&&Ge(r,this.walkTokens(s.tokens,t))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw Error("extension name required");if("renderer"in s){let i=t.renderers[s.name];i?t.renderers[s.name]=function(...n){let o=s.renderer.apply(this,n);return o===!1&&(o=i.apply(this,n)),o}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let i=t[s.level];i?i.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),a.extensions=t),r.renderer){let s=this.defaults.renderer||new Cr(this.defaults);for(let i in r.renderer){if(!(i in s))throw Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let n=i,o=r.renderer[n],l=s[n];s[n]=(...p)=>{let d=o.apply(s,p);return d===!1&&(d=l.apply(s,p)),d||""}}a.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new ht(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let n=i,o=r.tokenizer[n],l=s[n];s[n]=(...p)=>{let d=o.apply(s,p);return d===!1&&(d=l.apply(s,p)),d}}a.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Jt;for(let i in r.hooks){if(!(i in s))throw Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let n=i,o=r.hooks[n],l=s[n];s[n]=Jt.passThroughHooks.has(i)?p=>{if(s.options.async&&Jt.passThroughHooksRespectAsync.has(i))return(async()=>{let c=await o.call(s,p);return l.call(s,c)})();let d=o.call(s,p);return l.call(s,d)}:(...p)=>{if(s.options.async)return(async()=>{let c=await o.apply(s,p);return c===!1&&(c=await l.apply(s,p)),c})();let d=o.apply(s,p);return d===!1&&(d=l.apply(s,p)),d}}a.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;a.walkTokens=function(n){let o=[];return o.push(i.call(this,n)),s&&Ge(o,s.call(this,n)),o}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return xe.lex(e,t??this.defaults)}parser(e,t){return we.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let a={...r},s={...this.defaults,...a},i=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return i(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(t):t,o=await(s.hooks?await s.hooks.provideLexer(e):e?xe.lex:xe.lexInline)(n,s),l=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let p=await(s.hooks?await s.hooks.provideParser(e):e?we.parse:we.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(p):p})().catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let n=(s.hooks?s.hooks.provideLexer(e):e?xe.lex:xe.lexInline)(t,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let o=(s.hooks?s.hooks.provideParser(e):e?we.parse:we.parseInline)(n,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(n){return i(n)}}}onError(e,t){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+de(r.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(r);throw r}}};function O(e,t){return Ze.parse(e,t)}O.options=O.setOptions=function(e){return Ze.setOptions(e),O.defaults=Ze.defaults,Fi(O.defaults),O},O.getDefaults=Ba,O.defaults=We;function hd(...e){return Ze.use(...e),O.defaults=Ze.defaults,Fi(O.defaults),O}O.use=hd,O.walkTokens=function(e,t){return Ze.walkTokens(e,t)},O.parseInline=Ze.parseInline,O.Parser=we,O.parser=we.parse,O.Renderer=Cr,O.TextRenderer=Wa,O.Lexer=xe,O.lexer=xe.lex,O.Tokenizer=ht,O.Hooks=Jt,O.parse=O,O.options,O.setOptions,O.walkTokens,O.parseInline,we.parse,xe.lex;var Yi=!1;function Va(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Xi(e,{href:t,title:r,tokens:a}){if(!t?.startsWith("#")||typeof location>"u")return!1;let s=`${location.href.replace(/#.*/,"")}${t}`,i=r?` title="${Va(r)}"`:"";return`<a class="anchor-link" href="${Va(s)}"${i}>${e.parser.parseInline(a)}</a>`}function Tr(e){let t=e.link;e.link=function(r){let a=Xi(this,r);return a===!1?t.call(this,r):a}}function Qi(e){let t=e.type==="list"?e.items[0]?.tokens?.find(r=>r.type==="text"||r.type==="paragraph")?.text:e.text;return O.parseInline((t||"").replace(/\s*\n\s*/g," ").trim())}function en(e){switch(e?.type){case"table":{let t=e.rows.length;return`<span class="descr-placeholder">Table \xB7 ${t} ${t===1?"row":"rows"}</span>`}case"code":return`<span class="descr-placeholder">Code block${e.lang?` \xB7 ${Va(e.lang)}`:""}</span>`;case"html":return e.text.replace(/<(script|style)\b[\s\S]*?<\/\1>/gi,"").replace(/<[^>]*>/g," ").replace(/[<>]/g,"").replace(/\s+/g," ").trim()||'<span class="descr-placeholder">HTML content</span>';case"blockquote":{let t=e.tokens.find(r=>r.type!=="space");return t?["paragraph","heading","list","text"].includes(t.type)?Qi(t):en(t):""}default:return""}}function md(){Yi||(Yi=!0,O.use({renderer:{link(e){return Xi(this,e)}}}))}md();var fd=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,gd=Object.hasOwnProperty,Ye=class{constructor(){this.occurrences,this.reset()}slug(e,t){let r=this,a=yd(e,t===!0),s=a;for(;gd.call(r.occurrences,a);)r.occurrences[s]++,a=s+"-"+r.occurrences[s];return r.occurrences[a]=0,a}reset(){this.occurrences=Object.create(null)}};function yd(e,t){return typeof e=="string"?(t||(e=e.toLowerCase()),e.replace(fd,"").replace(/ /g,"-")):""}var tn={astro:{scopeName:"source.astro",dependencies:["html","css","scss","javascript","typescript","tsx"],patterns:[{include:"#frontmatter"},{include:"#script"},{include:"#style"},{include:"#interpolation"},{include:"text.html.basic"}],repository:{frontmatter:{begin:"^---\\s*$",end:"^---\\s*$",beginCaptures:{0:{name:"punctuation.definition.frontmatter.begin.astro"}},endCaptures:{0:{name:"punctuation.definition.frontmatter.end.astro"}},contentName:"meta.embedded.block.astro",patterns:[{include:"source.ts"}]},script:{patterns:[{begin:"<(script)\\s*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.astro",patterns:[{include:"source.ts"}]},{include:"text.html.basic#embedded-javascript"}]},style:{patterns:[{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.scss.embedded.astro",patterns:[{include:"source.scss"}]},{include:"source.css"}]},interpolation:{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin.astro"}},endCaptures:{0:{name:"punctuation.section.embedded.end.astro"}},contentName:"meta.embedded.expression.astro",patterns:[{include:"text.html.basic#comments"},{include:"source.tsx"}]}}},bash:{scopeName:"source.shell",patterns:[{match:"^#!.*$",name:"comment.line.shebang"},{match:"(?!^#!)#.*$",name:"comment.line.number-sign"},{match:"'(?:[^']*)'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"\\$[a-zA-Z_][\\w]*|\\$\\d+|\\$[?@*#$!_-]|\\$\\{[^}]+\\}",name:"entity.name.variable"},{match:"\\b([a-zA-Z_][\\w]*)(?==)",captures:{1:{name:"entity.name.variable.assignment"}}},{match:"\\b(?:if|then|else|elif|fi|for|while|until|in|do|done|case|esac|function|select|time|coproc)\\b",name:"keyword.control"},{match:"(?:&&|\\|\\||[|&;])",name:"keyword.operator"},{match:"(?<![\\w-])--?[a-zA-Z][\\w-]*(?:=[^\\s]+)?",name:"constant.language.option"},{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?\\b",name:"constant.numeric"}]},c:{scopeName:"source.c",patterns:[{include:"#comments"},{include:"#preprocessor"},{include:"#strings"},{include:"#storage-types"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},preprocessor:{patterns:[{begin:"^\\s*#\\s*include\\b",end:"$",name:"keyword.control.directive.include",patterns:[{match:"<[^>]*>",name:"string.quoted.other.lt-gt"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},{match:"^\\s*#\\s*(?:define|undef|ifdef|ifndef|if|elif|else|endif|pragma|error|warning|line)\\b.*$",name:"keyword.control.directive"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},"storage-types":{match:"\\b(?:auto|const|enum|extern|inline|register|restrict|signed|static|struct|typedef|union|unsigned|volatile)\\b",name:"storage.modifier"},keywords:{match:"\\b(?:break|case|continue|default|do|else|for|goto|if|return|sizeof|switch|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:char|double|float|int|long|short|void|_Bool|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|size_t|ssize_t|ptrdiff_t|FILE)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:NULL|true|false)\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|0[bB][01]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\+\\+|--|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},cpp:{scopeName:"source.cpp",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"source.c#strings"},{include:"#class-declaration"},{include:"#keywords"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"source.c#builtin-types"},{include:"#stl-types"},{include:"#constants"},{include:"source.c#constants"},{include:"#numbers"},{include:"#operators"},{include:"source.c#function-declaration"}],repository:{"class-declaration":{match:"\\b(class|struct|enum|namespace)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:catch|class|const_cast|constexpr|decltype|delete|dynamic_cast|explicit|export|final|friend|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|reinterpret_cast|static_assert|static_cast|template|this|throw|try|typeid|typename|using|virtual)\\b",name:"keyword.control"},"stl-types":{match:"\\bstd::(?:array|deque|forward_list|list|map|multimap|multiset|pair|priority_queue|queue|set|shared_ptr|stack|string|tuple|unique_ptr|unordered_map|unordered_set|vector|weak_ptr)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F']+|0[bB][01']+|(?:\\d[\\d']*\\.[\\d']*|\\.\\d[\\d']*|\\d[\\d']*)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->\\*?|::|\\.\\.\\.|<=>|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"}}},csharp:{scopeName:"source.cs",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"///.*$",name:"comment.line.documentation"},{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:'@"(?:""|[^"])*"',name:"string.quoted.double.verbatim"},{match:'\\$@"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'@\\$"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'\\$"(?:\\\\.|\\{\\{|\\}\\}|[^"\\\\\\r\\n])*"',name:"string.quoted.double.interpolated"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},attributes:{match:"\\[[A-Za-z_][\\w.]*\\]",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|struct|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|as|async|await|base|break|case|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|if|implicit|in|internal|is|lock|namespace|new|null|operator|out|override|params|partial|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var|void)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[uUlLfFdDmM]*\\b",name:"constant.numeric"},operators:{match:"(?:=>|\\?\\?=?|\\?\\.|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*(?:<[^>]*>)?\\s*\\()",name:"entity.name.function"}}},css:{scopeName:"source.css",patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"}],repository:{comments:{begin:"/\\*",end:"\\*/",name:"comment.block"},strings:{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1`,name:"string.quoted"},keyframes:{begin:"(@(?:-\\w+-)?keyframes)\\s+([a-zA-Z_-][\\w-]*)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"},2:{name:"entity.name.animation"}},patterns:[{include:"$self"}]},"at-rule-block":{begin:"(@(?:container|counter-style|document|font-face|font-feature-values|font-palette-values|layer|media|page|position-try|scope|starting-style|supports|view-transition)\\b)[^{;]*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"$self"}]},"at-rule-statement":{begin:"(@(?:charset|custom-media|import|namespace|property)\\b)",end:";",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#values"}]},"rule-set":{begin:"([^\\s@{};<][^@{};<]*?)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"entity.name.selector"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"},{include:"#declarations"},{include:"#values"}]},declarations:{match:"(--[a-zA-Z0-9_-]+|[a-zA-Z-][\\w-]*)(\\s*:)",captures:{1:{name:"support.type.property-name"}}},values:{patterns:[{match:"!important\\b",name:"keyword.other.important"},{match:"\\b(var)\\(\\s*(--[a-zA-Z0-9_-]+)",captures:{1:{name:"entity.name.function"},2:{name:"variable.other.custom-property"}}},{match:"\\b([a-zA-Z_-][\\w-]*)(?=\\()",captures:{1:{name:"entity.name.function"}}},{match:"#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\\b",name:"constant.other.color"},{match:"(?<![\\w.-])-?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?(?:%|[a-zA-Z]+)?\\b",name:"constant.numeric"},{match:"\\b(?:auto|currentColor|inherit|initial|none|normal|revert|revert-layer|transparent|unset)\\b",name:"constant.language"},{match:"(?:[+*/]|(?<=\\s)-(?!-))",name:"keyword.operator"}]}}},go:{scopeName:"source.go",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#builtin-functions"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:"`",end:"`",name:"string.quoted.raw"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.rune"}]},"function-declaration":{match:"\\b(func)\\s+(?:\\([^)]*\\)\\s*)?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|iota)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:any|bool|byte|complex64|complex128|error|float32|float64|int|int8|int16|int32|int64|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\\b",name:"support.class.builtin"},"builtin-functions":{match:"\\b(?:append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\\b(?=\\s*\\()",name:"entity.name.function"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?i?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\.\\.\\.|<-|\\|\\||&&|==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},html:{scopeName:"text.html.basic",dependencies:["css","json","javascript"],patterns:[{include:"#comments"},{include:"#doctype"},{include:"#embedded-css"},{include:"#embedded-json"},{include:"#embedded-javascript"},{include:"#raw-text"},{include:"#tags"},{include:"#entities"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},doctype:{match:"<![Dd][Oo][Cc][Tt][Yy][Pp][Ee]\\b[^>]*>",name:"keyword.control.doctype"},"embedded-css":{begin:`<([Ss][Tt][Yy][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Tt][Yy][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.html",patterns:[{include:"source.css"}]},"embedded-json":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:application/(?:ld\\+)?json|importmap|speculationrules)\\2)(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.json.embedded.html",patterns:[{include:"source.json"}]},"embedded-javascript":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?:(?![^>]*\\b[Tt][Yy][Pp][Ee]\\s*=)|(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:module|(?:text|application)/(?:java|ecma)script)\\2))(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.html",patterns:[{include:"source.js"}]},"raw-text":{begin:`<([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"string.unquoted.raw-text"},tags:{begin:"<(/?)([a-zA-Z][\\w.-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#inline-css"},{include:"#inline-javascript"},{include:"#attributes"},{include:"#unquoted-attributes"},{include:"#boolean-attributes"}]},"inline-css":{begin:`[ \\t]+(style)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.css.embedded.inline",patterns:[{include:"source.css#comments"},{include:"source.css#strings"},{include:"source.css#declarations"},{include:"source.css#values"}]},"inline-javascript":{begin:`[ \\t]+(on[a-zA-Z][\\w-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.inline",patterns:[{include:"source.js"}]},attributes:{begin:`[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"string.quoted.attribute-value",patterns:[{include:"#entities"}]},"unquoted-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*([^\\s\"'`=<>]+)",captures:{1:{name:"entity.other.attribute-name"},2:{name:"string.unquoted.attribute-value"}}},"boolean-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)(?=[ \\t]*/?>|[ \\t]+[a-zA-Z_:])",captures:{1:{name:"entity.other.attribute-name"}}},entities:{match:"&(?:#\\d+|#x[0-9a-fA-F]+|[a-zA-Z][\\w]+);",name:"constant.character.entity"}}},http:{scopeName:"source.http",patterns:[{match:"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE|CONNECT)\\s+([^\\s]+)\\s+(HTTP\\/[0-9.]+)",captures:{1:{name:"keyword.control.http"},2:{name:"string.unquoted.http"},3:{name:"keyword.other.http"}}},{match:"^(HTTP\\/[0-9.]+)\\s+([0-9]{3})(?:\\s+(.*))?",captures:{1:{name:"keyword.other.http"},2:{name:"constant.numeric.http"},3:{name:"string.unquoted.http"}}},{match:"^([a-zA-Z0-9_-]+):\\s*(.*)",captures:{1:{name:"support.type.property-name.http"},2:{name:"string.unquoted.http"}}}]},java:{scopeName:"source.java",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|assert|break|case|catch|continue|default|do|else|extends|final|finally|for|goto|if|implements|import|instanceof|native|new|non-sealed|package|permits|private|protected|public|return|sealed|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:boolean|byte|char|double|float|int|long|short|void|Boolean|Byte|Character|Double|Float|Integer|Long|Short|String|Object|List|Map|Set|ArrayList|HashMap|HashSet|Optional)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[lLfFdD]?\\b",name:"constant.numeric"},operators:{match:"(?:->|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>>?=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},javascript:{scopeName:"source.js",patterns:[{include:"#comments"},{include:"#strings"},{include:"#template"},{include:"#regexp"},{include:"#jsx-closing-tag"},{include:"#jsx-tag"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#variable-declaration"},{include:"#keywords"},{include:"#numbers"},{include:"#constants"},{include:"#decorators"},{include:"#private-fields"},{include:"#properties"},{include:"#functions"},{include:"#built-ins"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},template:{begin:"`",end:"(?<!\\\\)(?:\\\\\\\\)*`",name:"string.quoted.template",patterns:[{include:"#template-interpolation"}]},"template-interpolation":{begin:"\\$\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"balanced-braces":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},regexp:{match:"(?<![\\w)$\\]])/(?![/*])(?:\\\\.|\\[(?:\\\\.|[^\\]\\\\])*\\]|[^/\\\\\\r\\n])+/[dgimsuvy]*",name:"string.regexp"},"jsx-closing-tag":{match:"</([A-Za-z][\\w.-]*)\\s*>",captures:{1:{name:"entity.name.tag"}}},"jsx-tag":{begin:"<([A-Za-z][\\w.-]*)",end:"/?>",beginCaptures:{1:{name:"entity.name.tag"}},patterns:[{include:"#jsx-expression"},{include:"#strings"},{include:"#jsx-boolean-attributes"},{include:"#jsx-attributes"}]},"jsx-expression":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"jsx-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s*(?:=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"jsx-boolean-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s+(?:[a-zA-Z_:][\\w:.-]*\\s*=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(?:(async)\\s+)?(function)\\s*(\\*)?\\s*([A-Za-z_$][\\w$]*)?",captures:{1:{name:"storage.modifier.async"},2:{name:"storage.type.function"},4:{name:"entity.name.function"}}},"variable-declaration":{match:"\\b(const|let|var)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.variable"},2:{name:"variable.other.readwrite"}}},keywords:{match:"\\b(?:as|assert|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b",name:"keyword.control"},numbers:{match:"(?<![\\w$])(?:0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*n?|0[bB][01](?:_?[01])*n?|0[oO][0-7](?:_?[0-7])*n?|\\d(?:_?\\d)*n|(?:\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?)(?![\\w$])",name:"constant.numeric"},constants:{patterns:[{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\b(?:Infinity|NaN|null|undefined)\\b",name:"constant.language"}]},decorators:{match:"@[A-Za-z_$][\\w$]*",name:"entity.name.decorator"},"private-fields":{match:"#[A-Za-z_$][\\w$]*",name:"variable.other.private"},properties:{match:"(?<=\\.)[A-Za-z_$][\\w$]*|[A-Za-z_$][\\w$]*(?=\\s*:)",name:"entity.name.property"},functions:{match:"\\b[A-Za-z_$][\\w$]*(?=\\s*\\()",name:"entity.name.function"},"built-ins":{match:"\\b(?:Array|BigInt|Boolean|console|customElements|Date|document|Error|JSON|Map|Math|Number|Object|Promise|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet|window)\\b",name:"support.class"},operators:{match:"(?:=>|===|!==|==|!=|<=|>=|\\?\\?|\\?\\.|\\+\\+|--|&&|\\|\\||\\*\\*|[+*%&|^!~?:-])",name:"keyword.operator"}}},json:{scopeName:"source.json",patterns:[{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*:)',name:"entity.name.key"},{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*[,}\\]])',name:"string.quoted.double"},{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"},{match:"(?<![\\w.])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric"}]},kotlin:{scopeName:"source.kotlin",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(?:(data|sealed|abstract|open|inner|enum|annotation)\\s+)?(class|interface|object)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.modifier"},2:{name:"storage.type.class"},3:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(fun)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|actual|annotation|as|break|by|catch|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|final|finally|for|get|if|import|in|infix|init|inline|inner|internal|is|lateinit|noinline|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|try|typealias|val|var|vararg|when|where|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:Any|Array|Boolean|Byte|Char|Double|Float|Int|List|Long|Map|MutableList|MutableMap|MutableSet|Nothing|Set|Short|String|Unit)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[fFLuU]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\?:|\\?\\.|!!|\\.\\.|::|&&|\\|\\||==|!=|<=|>=|[+\\-*/%!<>=]=?)",name:"keyword.operator"}}},markdown:{scopeName:"text.html.markdown",dependencies:["yaml"],patterns:[{include:"#front-matter"},{include:"#comments"},{include:"#fenced-code"},{include:"#headings"},{include:"#quotes"},{include:"#lists"},{include:"#links"},{include:"#inline-code"}],repository:{"front-matter":{begin:"^[ \\t]*---[ \\t]*$",end:"^[ \\t]*(?:---|\\.\\.\\.)[ \\t]*$",patterns:[{include:"source.yaml"}]},comments:{begin:"<!--",end:"-->",name:"comment.block.html"},"fenced-code":{begin:"^[ \\t]*(```+|~~~+).*$",end:"^[ \\t]*\\1[ \\t]*$",name:"string.unquoted.fenced-code"},headings:{match:"^[ \\t]{0,3}#{1,6}[ \\t]+(.+)$",captures:{1:{name:"entity.name.section"}}},quotes:{match:"^[ \\t]*>.*$",name:"comment.blockquote"},lists:{match:"^[ \\t]*(?:[-+*]|\\d+[.)])(?=[ \\t]+)",name:"keyword.control.list"},links:{match:`!?\\[([^\\]]+)\\](\\([^\\s)]+(?:\\s+['"][^'"]*['"])?\\))`,captures:{1:{name:"entity.name.link"},2:{name:"string.other.link"}}},"inline-code":{match:"(`+)(.+?)\\1",captures:{2:{name:"string.other.raw"}}}}},"objective-c":{scopeName:"source.objc",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"#interface-declaration"},{include:"#directives"},{include:"#nsstring"},{include:"source.c#strings"},{include:"#method-declaration"},{include:"#language-variables"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"#property-attributes"},{include:"#builtin-types"},{include:"source.c#builtin-types"},{include:"#constants"},{include:"source.c#constants"},{include:"source.c#numbers"},{include:"source.c#operators"},{include:"source.c#function-declaration"}],repository:{"interface-declaration":{match:"\\b(@interface|@implementation|@protocol)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},directives:{match:"@(?:end|property|synthesize|dynamic|optional|required|class|import|selector|encode|synchronized|autoreleasepool|try|catch|finally|throw)\\b",name:"keyword.control.directive.objc"},nsstring:{match:'@"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},"method-declaration":{match:"^\\s*[-+]\\s*\\([^)]*\\)\\s*([A-Za-z_]\\w*)",captures:{1:{name:"entity.name.function"}}},"language-variables":{match:"\\b(?:self|super)\\b",name:"variable.language.objc"},"property-attributes":{match:"\\b(?:nonatomic|atomic|strong|weak|copy|assign|retain|readonly|readwrite|unsafe_unretained|nullable|nonnull|null_resettable)\\b",name:"storage.modifier"},"builtin-types":{match:"\\b(?:id|instancetype|BOOL|SEL|Class|IMP|NSInteger|NSUInteger|CGFloat|NSString|NSMutableString|NSArray|NSMutableArray|NSDictionary|NSMutableDictionary|NSNumber|NSObject|NSError|NSData|NSURL|NSNotification)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:YES|NO)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|Nil)\\b",name:"constant.language"}]}}},perl:{scopeName:"source.perl",patterns:[{include:"#comments"},{include:"#pod"},{include:"#strings"},{include:"#variables"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},pod:{begin:"^=\\w+",end:"^=cut\\b",name:"comment.block.documentation"},strings:{patterns:[{match:"qw\\s*\\(([^)]*)\\)",name:"string.quoted.other.qw"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"`(?:\\\\.|[^`\\\\])*`",name:"string.interpolated.backtick"}]},variables:{match:"[$@%&][A-Za-z_]\\w*(?:::\\w+)*|\\$\\{[^}]+\\}|\\$[0-9]+|\\$[!@_/\\\\,.;]",name:"entity.name.variable"},"function-declaration":{match:"\\b(sub)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:my|our|local|sub|if|elsif|else|unless|while|until|for|foreach|do|return|last|next|redo|use|no|package|require|and|or|not|xor|eq|ne|lt|gt|le|ge|cmp|given|when|default)\\b",name:"keyword.control"},builtins:{match:"\\b(?:print|printf|sprintf|push|pop|shift|unshift|splice|join|split|map|grep|sort|keys|values|each|defined|exists|delete|ref|bless|die|warn|chomp|chop|length|substr|index|lc|uc|lcfirst|ucfirst|wantarray|scalar)\\b",name:"support.class.builtin"},constants:{match:"\\bundef\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:=>|->|::|\\.\\.\\.?|<=>|==|!=|<=|>=|&&|\\|\\||//|=~|!~|\\*\\*|[+\\-*/%.!<>=]=?)",name:"keyword.operator"}}},php:{scopeName:"source.php",patterns:[{match:"<\\?php\\b|<\\?=|\\?>",name:"punctuation.section.embedded"},{include:"#comments"},{include:"#attributes"},{include:"#strings"},{include:"#variables"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-call"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{match:"#(?!\\[).*$",name:"comment.line.number-sign"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},attributes:{match:"#\\[[^\\]]*\\]",name:"entity.name.decorator"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},variables:{match:"\\$[A-Za-z_]\\w*",name:"entity.name.variable"},"class-declaration":{match:"\\b(class|interface|trait|enum)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(function)\\s+&?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|fn|for|foreach|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|print|private|protected|public|readonly|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false|TRUE|FALSE)\\b",name:"constant.language.boolean"},{match:"\\b(?:null|NULL)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\?\\?=?|<=>|===|!==|==|!=|<=|>=|\\.=|&&|\\|\\||[+\\-*/%.!<>=]=?)",name:"keyword.operator"},"function-call":{match:"\\b[A-Za-z_]\\w*(?=\\s*\\()",name:"entity.name.function"}}},powershell:{scopeName:"source.powershell",patterns:[{include:"#comments"},{include:"#strings"},{include:"#constants"},{include:"#variables"},{include:"#function-declaration"},{include:"#operators"},{include:"#keywords"},{include:"#parameters"},{include:"#cmdlets"},{include:"#numbers"}],repository:{comments:{patterns:[{begin:"<#",end:"#>",name:"comment.block"},{match:"#.*$",name:"comment.line.number-sign"}]},strings:{patterns:[{match:"'(?:''|[^'])*'",name:"string.quoted.single"},{match:'"(?:`.|[^"])*"',name:"string.quoted.double"}]},variables:{match:"\\$(?:\\{[^}]+\\}|[A-Za-z_][\\w:]*)",name:"entity.name.variable"},"function-declaration":{match:"\\b(function|filter)\\s+([A-Za-z_][\\w-]*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},operators:{match:"-(?:eq|ne|gt|lt|ge|le|like|notlike|match|notmatch|contains|notcontains|in|notin|and|or|not|xor|replace|split|join|is|isnot|as)\\b",name:"keyword.operator"},keywords:{match:"\\b(?:begin|break|catch|class|continue|do|dynamicparam|else|elseif|end|exit|finally|for|foreach|if|in|param|process|return|switch|throw|trap|try|until|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\$(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\$(?:null)\\b",name:"constant.language"}]},parameters:{match:"(?<![\\w-])-[A-Za-z][\\w]*",name:"constant.language.option"},cmdlets:{match:"\\b[A-Z][a-zA-Z]*-[A-Za-z]+\\b",name:"entity.name.function"},numbers:{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?(?:[kKmMgGtTpP][bB])?\\b",name:"constant.numeric"}}},python:{scopeName:"source.python",patterns:[{include:"#comments"},{include:"#strings"},{include:"#decorators"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtins"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{begin:'[rRbBfFuU]{0,2}"""',end:'"""',name:"string.quoted.triple.double"},{begin:"[rRbBfFuU]{0,2}'''",end:"'''",name:"string.quoted.triple.single"},{match:'[rRbBfFuU]{0,2}"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"[rRbBfFuU]{0,2}'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"}]},decorators:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(def)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:True|False)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Ellipsis|NotImplemented|__debug__)\\b",name:"constant.language"},{match:"\\b(?:self|cls)\\b",name:"variable.language.python"}]},builtins:{match:"\\b(?:abs|all|any|bool|bytearray|bytes|callable|chr|classmethod|dict|dir|divmod|enumerate|filter|float|format|frozenset|getattr|hasattr|hash|hex|id|input|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip)\\b(?=\\s*\\()",name:"support.class.builtin"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|(?:\\d(?:_?\\d)*)?\\.?\\d(?:_?\\d)*(?:[eE][+-]?\\d+)?[jJ]?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\*\\*|//|<=|>=|==|!=|->|[+\\-*/%@&|^~<>=])",name:"keyword.operator"}}},r:{scopeName:"source.r",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},"function-declaration":{match:"\\b([A-Za-z_.][\\w.]*)\\s*(?=<-\\s*function\\b|=\\s*function\\b)",name:"entity.name.function"},keywords:{match:"\\b(?:if|else|repeat|while|function|for|next|break|in)\\b",name:"keyword.control"},builtins:{match:"\\b(?:c|list|vector|matrix|data\\.frame|print|cat|paste|paste0|sprintf|nrow|ncol|length|names|colnames|rownames|sapply|lapply|vapply|mapply|apply|Map|Filter|Reduce|library|require|source|setwd|getwd|summary|str|head|tail|is\\.na|is\\.null|as\\.character|as\\.numeric|as\\.integer|as\\.factor|as\\.data\\.frame)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:TRUE|FALSE|T|F)\\b",name:"constant.language.boolean"},{match:"\\b(?:NULL|NA|NA_integer_|NA_real_|NA_character_|NA_complex_|Inf|NaN)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?[Li]?)\\b",name:"constant.numeric"},operators:{match:"(?:%[^%\\s]*%|<<-|<-|->>|->|==|!=|<=|>=|&&|\\|\\||[-+*/^!<>=&|~?:])",name:"keyword.operator"}}},ruby:{scopeName:"source.ruby",patterns:[{match:"#(?!\\{).*$",name:"comment.line.number-sign"},{begin:`<<[-~]?(['"]?)([A-Z][A-Z0-9_]*)\\1`,end:"^\\2$",name:"string.unquoted.heredoc"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"(?:@@|@|\\$)[a-zA-Z_][\\w]*",name:"entity.name.variable"},{match:":[a-zA-Z_][\\w]*[!?=]?",name:"constant.other.symbol"},{match:"\\b(def)\\s+([a-zA-Z_][\\w]*[!?=]?)",captures:{1:{name:"storage.type.method"},2:{name:"entity.name.function"}}},{match:"\\b(class|module)\\s+([A-Z][\\w]*(?:::[A-Z][\\w]*)*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\bnil\\b",name:"constant.language"},{match:"\\b(?:BEGIN|END|alias|and|begin|break|case|catch|defined|do|else|elsif|ensure|for|if|in|next|not|or|redo|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b",name:"keyword.control"},{match:"\\b[A-Z][\\w]*(?:::[A-Z][\\w]*)*\\b",name:"entity.name.type.constant"},{match:"(?<![\\w.])-?(?:0[xX][0-9a-fA-F]+|0[bB][01]+|\\d+(?:_\\d+)*(?:\\.\\d+)?)\\b",name:"constant.numeric"}]},rust:{scopeName:"source.rust",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#macros"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#lifetimes"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'b?r#"',end:'"#',name:"string.quoted.raw"},{match:'b?r"[^"]*"',name:"string.quoted.raw"},{match:'b?"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\])'",name:"string.quoted.char"}]},attributes:{match:"#!?\\[[^\\]]*\\]",name:"entity.name.decorator"},"function-declaration":{match:"\\b(fn)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(struct|enum|trait|union|type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},macros:{match:"\\b[A-Za-z_]\\w*!(?=\\s*[\\(\\[{])",name:"entity.name.function.macro"},keywords:{match:"\\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|union|unsafe|use|where|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Some|Ok|Err)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:bool|char|str|String|i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usize|f32|f64|Vec|Option|Result|Box|Rc|Arc|RefCell|HashMap|HashSet)\\b",name:"support.class.builtin"},lifetimes:{match:"'[a-z_]\\w*\\b",name:"variable.language.lifetime"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)(?:[iuf](?:8|16|32|64|128|size))?\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\.\\.=?|&&|\\|\\||==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},svelte:{scopeName:"source.svelte",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#blocks"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.svelte",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.svelte",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.svelte",patterns:[{include:"source.css"}]},blocks:{match:"\\{([#/:@])\\s*(if|else|each|key|await|then|catch|snippet|render|html|debug|const)\\b",captures:{1:{name:"punctuation.definition.keyword"},2:{name:"keyword.control"}}},interpolation:{begin:"\\{(?![#/:@])",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive"},{include:"#shorthand"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},directive:{match:"[ \\t]+((?:bind|on|class|use|transition|in|out|animate|let):[\\w-]+(?:\\|[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}},shorthand:{begin:"[ \\t]+\\{",end:"\\}",contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]}}},toml:{scopeName:"source.toml",patterns:[{include:"#comments"},{include:"#table-headers"},{include:"#datetime"},{include:"#strings"},{include:"#keys"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},"table-headers":{match:"^\\s*(\\[\\[?)([^\\[\\]]+)(\\]\\]?)\\s*$",captures:{1:{name:"punctuation.definition.table"},2:{name:"entity.name.type.class"},3:{name:"punctuation.definition.table"}}},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple.double"},{begin:"'''",end:"'''",name:"string.quoted.triple.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'[^'\\r\\n]*'",name:"string.quoted.single"}]},keys:{match:`^\\s*((?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*')(?:\\s*\\.\\s*(?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*'))*)\\s*(?==)`,captures:{1:{name:"entity.name.key"}}},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:inf|nan)\\b",name:"constant.language"}]},datetime:{match:"\\b\\d{4}-\\d{2}-\\d{2}(?:[Tt ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[Zz]|[+-]\\d{2}:\\d{2})?)?\\b",name:"constant.other.date-time"},numbers:{match:"(?<![\\w.])[+-]?(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"=",name:"keyword.operator"}}},tsx:{scopeName:"source.tsx",dependencies:["javascript","typescript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"source.js#jsx-closing-tag"},{include:"source.js#jsx-tag"},{include:"source.ts#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"source.ts#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"source.ts#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}]},typescript:{scopeName:"source.ts",dependencies:["javascript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}],repository:{"type-declaration":{match:"\\b(interface|enum|namespace|module|type)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},"type-keywords":{match:"\\b(?:abstract|accessor|asserts|declare|infer|keyof|override|readonly|satisfies|unique)\\b",name:"keyword.control.ts"},"builtin-types":{match:"\\b(?:any|bigint|boolean|never|number|object|string|symbol|undefined|unknown|void)\\b",name:"support.class.builtin"}}},vue:{scopeName:"text.html.vue",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.vue",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.vue",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.vue",patterns:[{include:"source.css"}]},interpolation:{begin:"\\{\\{",end:"\\}\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive-value"},{include:"#directive"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},"directive-value":{begin:`[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},directive:{match:"[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}}}},yaml:{scopeName:"source.yaml",patterns:[{match:"#.*$",name:"comment.line.number-sign"},{match:"^(?:---|\\.\\.\\.)\\s*$|^%YAML\\b.*$",name:"keyword.control.document"},{match:"^\\s*(?:-\\s+)?([^#\\s][^\\r\\n:#]*?)(?=\\s*:)",captures:{1:{name:"entity.name.key"}}},{match:"[&*][a-zA-Z_][\\w-]*|![^\\s]+",name:"entity.name.anchor"},{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n]|\\r?\\n[ \\t]+)*\\1`,name:"string.quoted"},{match:"(?<=:\\s)[|>][-+]?\\s*$",name:"keyword.control.block-scalar"},{match:"\\b(?:true|false|yes|no|on|off)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b|~",name:"constant.language"},{match:"(?<![\\w.-])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b",name:"constant.numeric"}]}},rn=new Map;Object.values(tn).forEach(e=>{e?.scopeName&&rn.set(e.scopeName,e)});var bd={"c++":"cpp",cs:"csharp",curl:"bash",js:"javascript",jsx:"javascript",markup:"html",md:"markdown",objc:"objective-c",ps1:"powershell",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"html",ts:"typescript",xml:"html",yml:"yaml",zsh:"bash"},vd={indices:[[1/0,1/0]]},Gt=new Map,xd=e=>{let t=e.split("."),[r,a,s]=t,i=t.at(-1);if(r==="markup"&&["quote","inserted","deleted","raw"].includes(a))return a;if(r==="entity"&&a==="name")return s;if(e.startsWith("constant.character.entity"))return"character-entity";if(t.includes("numeric"))return"numeric";if(e.startsWith("support.type.property-name"))return"property";if(t.includes("attribute-value"))return"attribute-value";if(e.startsWith("string.other.link"))return"link";if(["doctype","at-rule","important","regexp","boolean","symbol","operator","attribute-name"].includes(i))return i;if(["comment","string","constant","storage","keyword","variable","punctuation","entity","support"].includes(r))return r},Or=(e,t,r,a)=>{let s=xd(a);if(!s||t===r)return;let i=new Range;i.setStart(e,t),i.setEnd(e,r),Gt.has(s)||Gt.set(s,new Highlight),Gt.get(s).add(i)},Ja=(e,t,r={})=>{Object.entries(r).forEach(([a,s])=>{let i=t.indices[+a];i&&Or(e,...i,s.name)})},wd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$d=(e,t)=>e.replace(/\\(\d+)/g,(r,a)=>t[a]===void 0?r:wd(t[a])),an=e=>e?Array.isArray(e)?e:e.match||e.begin||e.include?[e]:e.patterns||[]:[],kd=(e,t,r)=>{if(e==="$self")return{grammar:t,rules:t.patterns};if(e==="$base")return{grammar:r,rules:r.patterns};if(e[0]==="#")return{grammar:t,rules:an(t.repository?.[e.slice(1)])};let[a,s]=e.split("#"),i=rn.get(a);return i?{grammar:i,rules:s?an(i.repository?.[s]):i.patterns}:null},sn=(e,t,r,a=new Set)=>{let s=[];return e.forEach(i=>{if(i.include){let n=`${t.scopeName}:${i.include}`;if(a.has(n))return;let o=kd(i.include,t,r);if(!o)return;let l=new Set(a);l.add(n),s.push(...sn(o.rules,o.grammar,r,l))}else(i.match||i.begin&&i.end)&&s.push({grammar:t,rule:i})}),s},Ga=new Map,Za=new Map,nn=(e,t,r,a)=>{let s=Za.get(e);if(!s||s.indices[0][0]<r){Ga.has(e)||Ga.set(e,new RegExp(e,"dgm"));let i=Ga.get(e);i.lastIndex=r,s=i.exec(t.data)||vd,Za.set(e,s)}return s.indices[0][0]<a&&s.indices[0][1]<=a?s:null},Sd=(e,t,r,a)=>{let s=null;return t.forEach(i=>{let n=nn(i.rule.match||i.rule.begin,e,r,a);n&&(!s||n.indices[0][0]<s.match.indices[0][0])&&(s={...i,match:n})}),s},on=(e,t,r,a,s,i=s,n=null)=>{let o=sn(t,s,i),l=r;for(;l<a;){let p=Sd(e,o,l,a),d=n?nn(n.pattern,e,l,a):null,c=p?.match.indices[0][0]??1/0,f=d?.indices[0][0]??1/0;if(d&&(f<c||f===c&&!n?.applyEndPatternLast))return{contentEnd:f,end:d.indices[0][1],match:d};if(!p)return{contentEnd:a,end:a,match:null};let{rule:h,match:y,grammar:u}=p;if(h.match){h.name&&Or(e,...y.indices[0],h.name),Ja(e,y,h.captures),l=y.indices[0][1]>l?y.indices[0][1]:l+1;continue}let g=on(e,h.patterns||[],y.indices[0][1],a,u,i,{pattern:$d(h.end,y),applyEndPatternLast:h.applyEndPatternLast});h.name&&Or(e,y.indices[0][0],g.end,h.name),h.contentName&&Or(e,y.indices[0][1],g.contentEnd,h.contentName),Ja(e,y,h.beginCaptures||h.captures),g.match&&Ja(e,g.match,h.endCaptures||h.captures),l=g.end>l?g.end:l+1}return{contentEnd:a,end:a,match:null}},ln=e=>{let t=e.parentElement,r=a=>!a||!a.classList?null:[...a.classList].find(s=>s.startsWith("language-"))?.slice(9);return(r(e)||e.dataset?.language||r(t)||t?.dataset?.language||t?.getAttribute?.("lang")||"").toLowerCase()},Ad=e=>bd[e]||e,Ed=(e=document)=>{let t=[],r=new Set,a=s=>{if(s&&!r.has(s)&&(r.add(s),s.querySelectorAll)){let i=s.querySelectorAll("pre > code");t.push(...i);let n=s.querySelectorAll("*");for(let o=0;o<n.length;o++){let l=n[o];l.shadowRoot&&a(l.shadowRoot)}}};return a(e),t},Ya=!1,Dd=(e=document)=>{if(typeof window>"u"||typeof CSS>"u"||!CSS.highlights)return;let t=Ed(e).filter(ln);t.length!==0&&(Gt.forEach((r,a)=>{CSS.highlights.get(a)===r&&CSS.highlights.delete(a),r.clear()}),t.forEach(r=>{let a=tn[Ad(ln(r))];if(!a)return;let s=Array.from(r.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE&&i.data?.length>0);s.length!==0&&(Za=new Map,s.forEach(i=>{on(i,a.patterns,0,i.data.length,a)}))}),Gt.forEach((r,a)=>{r.size&&CSS.highlights.set(a,r)}))},_r=(e=document)=>{Ya||(Ya=!0,requestAnimationFrame(()=>{Ya=!1,Dd(e)}))},Xe=W`.hover-bg:hover{background:var(--muted)}::selection{background:var(--selection-bg);color:var(--selection-fg)}.regular-font{font-family:var(--font-sans)}.mono-font{font-family:var(--font-mono)}.title{font-size:calc(var(--font-size-small) + 1.125rem);text-wrap:balance;font-weight:400}.sub-title{font-size:var(--h3-font-size);text-wrap:balance}.req-res-title{font-family:var(--font-sans);font-size:calc(var(--font-size-small) + .25rem);text-align:start;text-wrap:balance;margin-bottom:.5rem;font-weight:700}.tiny-title{font-size:calc(var(--font-size-small) + 1px);font-weight:700}.regular-font-size{font-size:var(--font-size-regular)}.small-font-size{font-size:var(--font-size-small)}.upper{text-transform:uppercase}.primary-text{color:var(--primary)}.bold-text{font-weight:700}.gray-text{color:var(--muted-foreground)}.red-text{color:var(--destructive)}.blue-text{color:var(--blue)}.multiline{max-height:var(--resp-area-height);color:var(--muted-foreground);overflow:scroll}.method-fg{color:var(--method-default)}.method-fg.put{color:var(--method-put)}.method-fg.post{color:var(--method-post)}.method-fg.get{color:var(--method-get)}.method-fg.delete{color:var(--method-delete)}.method-fg.head{color:var(--method-head)}.method-fg.patch{color:var(--method-patch)}.method-fg.options{color:var(--method-options)}.method-fg.trace{color:var(--method-trace)}.method-fg.query{color:var(--method-query)}.method-fg.copy,.method-fg.purge{color:var(--method-default)}h1,h2,h3,h4,h5,h6,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6){font-family:var(--heading-font);font-weight:var(--heading-weight);line-height:var(--heading-line-height);letter-spacing:var(--heading-letter-spacing);color:var(--heading-color);margin-block:var(--heading-margin-top) var(--heading-margin-bottom);text-wrap:balance;padding:0}h1,h1.rapidoc-heading{font-size:var(--h1-font-size)}h2,h2.rapidoc-heading{font-size:var(--h2-font-size)}h3,h3.rapidoc-heading{font-size:var(--h3-font-size)}h4,h4.rapidoc-heading{font-size:var(--h4-font-size)}h5,h5.rapidoc-heading{font-size:var(--h5-font-size)}h6,h6.rapidoc-heading{font-size:var(--h6-font-size)}:is(h1,h2,h3,h4,h5,h6):first-child,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6):first-child{margin-block-start:0}.rapidoc-heading.label-heading{font-size:var(--label-heading-font-size);font-weight:var(--heading-weight);letter-spacing:.04em;text-transform:uppercase;margin-block:16px 6px;line-height:1.4}.rapidoc-heading.label-heading.req-res-title{font-size:calc(var(--font-size-small) + .25rem);margin-block:0 .5rem}.rapidoc-heading.label-heading.tiny-title{font-size:calc(var(--font-size-small) + 1px);margin-block:0 8px}.table-title{font-size:var(--font-size-small);vertical-align:middle;margin:12px 0 4px;font-weight:600}.table-title>.rapidoc-heading.label-heading{margin:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}p{margin-block-start:.5em}a{color:var(--blue);cursor:pointer;text-decoration:none}a:hover{text-decoration:underline}code,pre{font-family:var(--font-mono);font-size:calc(var(--font-size-mono) - 1px);margin:0}.m-markdown,.m-markdown-small{color:var(--foreground);overflow-wrap:anywhere;display:block}.m-markdown p,.m-markdown span{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit}.m-markdown li{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit;margin-block:.25em}.m-markdown-small p,.m-markdown-small span{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 6px);color:inherit}.m-markdown-small li{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 8px);color:inherit;margin-block:3px}.m-markdown strong,.m-markdown b,.m-markdown-small strong,.m-markdown-small b{color:var(--foreground);font-weight:600}.m-markdown h1,.m-markdown h2,.m-markdown h3,.m-markdown h4,.m-markdown h5,.m-markdown h6,.m-markdown-small h1,.m-markdown-small h2,.m-markdown-small h3,.m-markdown-small h4,.m-markdown-small h5,.m-markdown-small h6{color:var(--foreground)}.m-markdown p:not(:first-child){margin-block-start:var(--paragraph-spacing)}.m-markdown-small p:not(:first-child){margin-block-start:12px}.m-markdown-small p:first-child{margin-block-start:0}.m-markdown p,.m-markdown-small p{margin-block-end:0}.m-markdown code span{font-size:var(--font-size-mono)}.m-markdown-small code,.m-markdown code{border-radius:min(var(--radius), .5rem);color:var(--foreground);background-color:var(--muted);font-size:calc(var(--font-size-mono));padding:1px 6px;line-height:1.2}.m-markdown-small code{font-size:calc(var(--font-size-mono) - 1px);padding:1px 5px}.m-markdown-small pre,.m-markdown pre{white-space:pre-wrap;overflow-wrap:normal;border-radius:min(var(--radius), .5rem);border:1px solid var(--input);line-height:normal;overflow-x:auto}.m-markdown pre{background:var(--code-bg);color:var(--foreground);padding:12px;& code{color:var(--foreground);background:0 0;border:none;padding:0}}.m-markdown-small pre{background:var(--code-bg);color:var(--card-foreground);margin-top:4px;padding:2px 4px;& code{color:var(--card-foreground);background:0 0;border:none;padding:0}}.m-markdown ul,.m-markdown ol{padding-inline-start:30px}.m-markdown-small ul,.m-markdown-small ol{padding-inline-start:20px}.m-markdown-small a,.m-markdown a{color:var(--blue)}.m-markdown-small img,.m-markdown img{max-width:100%}.m-markdown-small table,.m-markdown table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:min(var(--radius), .5rem);font-size:calc(var(--font-size-small) + 1px);line-height:calc(var(--font-size-small) + 4px);width:max-content;max-width:100%;margin:10px 0;display:block;overflow-x:auto}.m-markdown-small table{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 2px);margin:8px 0}.m-markdown-small td,.m-markdown-small th,.m-markdown td,.m-markdown th{vertical-align:top;border-top:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px)}.m-markdown-small tr:first-child th,.m-markdown tr:first-child th{border-top:0}.m-markdown th,.m-markdown td{padding:10px 12px}.m-markdown-small th,.m-markdown-small td{padding:8px}.m-markdown th,.m-markdown-small th{background:var(--card);vertical-align:middle;font-weight:600}.m-markdown-small table code,.m-markdown table code{font-size:calc(var(--font-size-mono) - 1px)}.m-markdown blockquote,.m-markdown-small blockquote{border-inline-start:3px solid var(--border);margin-inline:0;padding:6px 0 6px 6px}.m-markdown hr{border:1px solid var(--border)}`,Zt=W`.btn{border-radius:var(--radius);font-weight:600;font-size:var(--font-size-small);vertical-align:middle;text-align:center;white-space:nowrap;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);user-select:none;cursor:pointer;outline:0;justify-content:center;align-items:center;padding:.45em 1em;line-height:1.25;transition:background .2s,color .2s,border-color .2s,transform .1s;display:inline-flex;&:hover{background:color-mix(in srgb, var(--primary) 28%, transparent);color:var(--foreground)}&:disabled{background:var(--muted);color:var(--muted-foreground);border-color:var(--border);cursor:not-allowed;opacity:.4;box-shadow:none}&:active{filter:brightness(85%);transition:scale;transform:scale(.97)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.btn-primary,.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);&:hover{background:var(--primary);filter:brightness(110%);color:var(--primary-foreground)}}.btn-secondary,.btn.secondary{background:var(--muted);border-color:var(--border);color:var(--foreground);box-shadow:none;&:hover{background:color-mix(in srgb, var(--muted) 80%, var(--foreground));color:var(--foreground)}}.btn-outline,.btn.thin-border{border-width:1px;border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--foreground);box-shadow:none;&:hover{background:var(--muted);border-color:var(--muted-foreground);color:var(--foreground)}}.btn-ghost,.btn.ghost{color:var(--muted-foreground);box-shadow:none;background:0 0;border-color:#0000;&:hover{background:var(--muted);color:var(--foreground)}}.btn-destructive,.btn.destructive{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);&:hover{background:var(--method-delete);color:#fff}}.btn-link,.btn.link{color:var(--blue);box-shadow:none;background:0 0;border-color:#0000;padding:0;text-decoration:underline}.btn-lg,.btn.large{font-size:var(--font-size-regular);padding:.55em 1.1em}.btn-sm,.btn.small{font-size:var(--font-size-small);padding:.3em .75em}.btn-xs,.btn.tiny{font-size:var(--font-size-xs);padding:.2em .5em}.btn-icon,.btn.circle{border-radius:50%;width:calc(2.15em + 2px);min-width:calc(2.15em + 2px);height:calc(2.15em + 2px);padding:.35em}.btn.nav{border:1px solid var(--primary);&:hover{background:var(--primary)}}.badge{border-radius:var(--radius);font-size:var(--font-size-xs);white-space:nowrap;background:var(--primary);color:var(--primary-foreground);user-select:none;border:1px solid #0000;justify-content:center;align-items:center;padding:2px 6px;font-weight:600;line-height:1;display:inline-flex}.badge-secondary{background:var(--muted);color:var(--foreground);border-color:var(--border)}.badge-outline{color:var(--foreground);border-color:var(--border);background:0 0}.badge-destructive{background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);border-color:var(--method-delete)}.badge-sm{font-size:var(--font-size-xs);padding:1px 4px}.input,input,textarea,select,pre{color:var(--foreground);background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);outline:none}textarea,pre{border-radius:min(var(--radius), .5rem)}pre{background:var(--code-bg)}button{font-family:var(--font-sans);color:var(--foreground)}.input,pre,select,textarea,input[type=file],input[type=text],input[type=password]{font-family:var(--font-mono);font-weight:400;font-size:var(--font-size-small);padding:6px 8px;transition:border-color .2s,box-shadow .2s}.input,select,input[type=text],input[type=password]{vertical-align:middle;padding:.45em .75em;line-height:1.25}.input:focus,.input:focus-visible,input[type=text]:focus,input[type=text]:focus-visible,input[type=password]:focus,input[type=password]:focus-visible,textarea:focus,textarea:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow)}.input-sm{font-size:var(--font-size-small);padding:.3em .5em}select{font-family:var(--font-sans);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E);background-position:calc(100% - 5px);background-repeat:no-repeat;background-size:10px;padding-right:2.25em}select:hover{border-color:var(--primary)}@supports (appearance:base-select){select,select::picker(select){appearance:base-select}select{background-image:none;justify-content:space-between;align-items:center;padding-right:.75em;display:inline-flex}select:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow);outline:none}select::picker(select){background:var(--input-background);color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-small);scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background);padding:4px;box-shadow:0 4px 16px #00000040}select option{border-radius:var(--radius);color:var(--foreground);cursor:pointer;font-family:var(--font-sans);font-size:var(--font-size-small);background:0 0;align-items:center;padding:4px 6px;transition:background .15s,color .15s;display:flex}select option:hover,select option:focus-visible{background:var(--primary);color:var(--primary-foreground)}select option:checked{background:color-mix(in srgb, var(--primary) 8%, transparent);color:var(--foreground);font-weight:500}select option:checked:hover,select option:checked:focus-visible{background:var(--primary);color:var(--primary-foreground)}select::picker-icon{content:"";background-color:var(--muted-foreground);transform-origin:50%;justify-content:center;align-items:center;width:12px;height:12px;margin-left:8px;transition:transform .2s,background-color .15s;display:inline-flex;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat}select:hover::picker-icon{background-color:var(--primary)}select:open::picker-icon{transform:rotate(180deg)}select option::checkmark{content:"➜";width:14px;height:14px;line-height:1;font-size:var(--font-size-xs);color:var(--primary);flex-shrink:0;justify-content:center;align-items:center;margin-right:8px;display:inline-flex}select option:not(:checked)::checkmark{visibility:hidden}select option:hover::checkmark,select option:focus-visible::checkmark,select option:checked:hover::checkmark,select option:checked:focus-visible::checkmark{color:var(--primary-foreground)}}textarea::placeholder,input[type=text]::placeholder,input[type=password]::placeholder{color:var(--muted-foreground);opacity:1}input[type=file]{font-family:var(--font-sans);cursor:pointer;background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);padding:calc(.45em - 1px)}input[type=file]::file-selector-button,input[type=file]::-webkit-file-upload-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}input[type=file]::file-selector-button,input[type=file]::file-selector-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}pre,textarea{scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background)}pre::-webkit-scrollbar,textarea::-webkit-scrollbar{width:8px;height:8px}pre::-webkit-scrollbar-track,textarea::-webkit-scrollbar-track{background:var(--input-background)}pre::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{background:var(--input);border-radius:2px}.link{font-size:var(--font-size-small);color:var(--blue);font-family:var(--font-mono);margin-bottom:2px;text-decoration:underline}input[type=checkbox]{appearance:none;box-sizing:border-box;width:3em;height:1.5em;font-size:var(--font-size-small);vertical-align:middle;background:var(--muted);border:1px solid var(--input);cursor:pointer;border-radius:999px;flex:none;margin:0;transition:background-color .2s,border-color .2s;position:relative;&:after{content:"";background:var(--background);border-radius:50%;width:calc(1.5em - 4px);height:calc(1.5em - 4px);transition:transform .2s;position:absolute;top:1px;left:1px;box-shadow:0 1px 2px #0000004d}&:checked{background:var(--green);border-color:var(--green)}&:checked:after{transform:translate(1.5em)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:disabled{opacity:.5;cursor:not-allowed}@media (prefers-reduced-motion:reduce){&,&:after{transition:none}}}`,Fr=W`.row,.col{display:flex}.row{flex-direction:row;align-items:center}.col{flex-direction:column;align-items:stretch}`,cn=W`.auth-status{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.5rem;display:flex}.auth-list{border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);direction:ltr;margin:0;padding:0;line-height:1.5;list-style:none;container-type:inline-size}.auth-scheme{padding:calc(var(--auth-scheme-padding) * 1.5);overflow-wrap:break-word;margin:0;&+.auth-scheme{border-top:1px solid var(--border)}}.auth-scheme-body,.oauth-flow{flex-direction:column;align-items:flex-start;gap:.75em;display:flex;&>*{max-width:100%;margin:0}}.auth-scheme-header{flex-wrap:wrap;align-items:center;gap:.5em;display:flex}.auth-scheme-title{font-size:var(--font-size-regular);font-weight:600}.auth-scheme-body>.m-markdown,.auth-hint,.auth-host-note{max-width:70ch}.auth-host-toggle{font-size:var(--font-size-small)}.auth-controls{grid-template-columns:repeat(auto-fill,minmax(12em,16em));align-items:center;gap:.5em;width:100%;display:grid;&>:is(input,select){box-sizing:border-box;width:100%;min-width:0}&>.btn{justify-self:start}}.oauth-flow{padding-block:1.25em;&+.oauth-flow{border-top:1px dashed var(--border)}&:last-child{padding-bottom:0}&>.tiny-title{margin:0}}.oauth-urls{grid-template-columns:max-content minmax(0,1fr);gap:.25em 1.5em;display:grid;&>dt{color:var(--muted-foreground)}&>dd{overflow-wrap:anywhere;margin:0}}.oauth-scopes-label{color:var(--muted-foreground);margin-bottom:-.25em}.oauth-scopes{flex-direction:column;gap:.5em;display:flex}.oauth-scope-name{color:var(--foreground)}.oauth-scope-descr{color:var(--muted-foreground);&:before{content:"– "}}.auth-toggle{cursor:pointer;align-items:flex-start;gap:.625em;display:inline-flex}.oauth-resp-display:empty{display:none}@container (width<=30rem){.auth-controls{grid-template-columns:minmax(0,1fr)}.oauth-urls{grid-template-columns:minmax(0,1fr);&>dd+dt{margin-top:.375em}}}.operation-security{min-width:0;max-width:100%;font-size:var(--font-size-small);align-items:flex-start;gap:.375em;margin:0 0 12px;line-height:1.25;display:flex}.security-chips{align-items:center;row-gap:6px;&>li{align-items:center;display:inline-flex}}.value-list-items.security-chips>li:not(:last-child):after{content:"OR";font-size:var(--font-size-xs);letter-spacing:.04em;margin-inline:.625em}.security-chip{min-width:0;max-width:100%;color:var(--foreground);background:color-mix(in srgb, var(--card) 80%, transparent);border:1px solid var(--input);border-radius:var(--radius);align-items:center;gap:.375em;padding:.25em .625em;transition:color .15s,border-color .15s;display:inline-flex;&.has-details{cursor:pointer}&.has-details:is(:hover,:focus-within){color:var(--primary);border-color:var(--primary)}}.security-lock-btn{width:calc(1.75em + 2px);height:calc(1.75em + 2px);color:var(--muted-foreground);border-radius:var(--radius);flex:none;justify-content:center;align-items:center;display:inline-flex}a.security-lock-btn{transition:color .15s,background-color .15s;&:hover{color:var(--foreground);background:var(--muted)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.security-lock{stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;width:1.25em;height:1.25em}.security-chip-label{white-space:nowrap;text-overflow:ellipsis;max-width:240px;color:inherit;font:inherit;cursor:inherit;background:0 0;border:none;border-radius:0;padding:0;text-decoration:none;display:block;overflow:hidden;&:focus-visible{outline:2px solid var(--ring);outline-offset:2px}}.security-popover{position-area:bottom span-right;position-try-fallbacks:flip-block;width:max-content;max-width:min(400px,100vw - 16px);color:var(--foreground);background:var(--background);border:1px solid var(--border);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-description);text-align:start;overflow-wrap:anywhere;cursor:auto;margin:6px 0;padding:.75em 1em;line-height:1.5;inset:auto;box-shadow:0 1px 2px #0000000f,0 4px 12px #00000014}`,qr=W`.param-list-container{container-type:inline-size}.param-list{grid-template-columns:var(--param-label-width) minmax(10rem, 1fr) minmax(0, 1.5fr);border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 4px);word-break:break-word;direction:ltr;margin:0;padding:0;list-style:none;display:grid}.param{grid-column:1/-1;grid-template-columns:subgrid;column-gap:var(--param-gap);row-gap:var(--param-row-gap);padding:var(--param-padding);margin:0;display:grid;&+.param{border-top:1px solid var(--border)}}.param-label{grid-area:1/1/span 2;min-width:0}.param-input{grid-column:2;min-width:0}.param-input :is(input[type=text],input[type=password],select){padding:.75em;line-height:1.25}@supports not (appearance:base-select){.param-input select{padding-right:2.25em}}.param-constraint{align-content:start;column-gap:var(--value-list-label-gap);row-gap:var(--param-row-gap);grid-column:3;grid-template-columns:max-content minmax(0,1fr);min-width:0;margin:0;display:grid;&>dd{min-width:0;margin:0}}.param-details{grid-column:2/-1;min-width:0;&:not(:has(*)){display:none}}.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-column:2/-1}.param-name,.param-type{text-align:right;margin:1px 0;line-height:1.35}.param-name{color:var(--foreground);font-family:var(--font-mono);&.deprecated{color:var(--destructive)}}.param-required{color:var(--destructive)}.param-deprecated-icon{stroke:var(--destructive);margin-right:-6px}.param-type{color:var(--muted-foreground);font-family:var(--font-sans)}.param-constraint-label{color:var(--muted-foreground);font-weight:600}.value-list{column-gap:var(--value-list-label-gap);grid-template-columns:max-content minmax(0,1fr);align-items:baseline;display:grid}.value-list-items{row-gap:var(--value-list-row-gap);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex;&>li{margin:0}&>li:not(:last-child):after{content:"┃";margin-inline:var(--value-list-gap);color:var(--muted-foreground)}}.value-chip{max-width:100%;font:inherit;font-family:var(--font-mono);line-height:inherit;text-align:start;overflow-wrap:anywhere;color:var(--foreground);background:color-mix(in srgb, var(--foreground) 6%, transparent);border-radius:var(--radius);cursor:pointer;border:none;margin:0;padding:0 .4em;transition:background-color .15s,color .15s;display:inline-block;&:hover{color:var(--primary);background:color-mix(in srgb, var(--primary) 14%, transparent)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:disabled{color:var(--foreground);background:color-mix(in srgb, var(--foreground) 6%, transparent);cursor:text;user-select:text}}.value-list-items:has(>li>.value-chip){column-gap:.375em;&>li:after{content:none}}.param-example-list{margin:var(--param-row-gap) 0 0;padding:0;list-style:none;&>li{margin:0 0 var(--param-row-gap);border-inline-start:2px solid var(--border);padding-inline-start:var(--param-padding)}&>li:is(:hover,:focus-within){border-inline-start-color:var(--primary)}}@container (width<=36rem){.param-list{grid-template-columns:minmax(0,1fr)}.param-label,.param-input,.param-constraint,.param-details,.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-area:auto/1}.param-label{align-items:baseline;gap:var(--param-gap);flex-wrap:wrap;display:flex}.param-name,.param-type{text-align:start}}`,dn=W`.only-large-screen{display:none}.endpoint-head{& .path{font-family:var(--font-mono);font-size:var(--font-size-small);overflow-wrap:break-word;word-break:break-all;align-items:center;display:flex}& .descr{font-size:var(--font-size-small);color:var(--muted-foreground);overflow-wrap:break-word;word-break:break-all;align-items:center;margin-inline-start:auto;padding-inline-start:16px;font-weight:400;display:none}}.external-docs-box{background:var(--muted);border-radius:min(var(--radius), .5rem);margin:8px 0;padding:2px 8px 8px}.external-docs-link{font-family:var(--font-mono);font-size:var(--font-size-small)}.external-docs-arrow{margin-left:5px;display:inline-block;transform:rotate(270deg)scale(1.5)}.section-expand-collapse-container{justify-content:flex-end;gap:4px;display:flex}.callback-operation-list{width:100%;margin-left:16px}.callback-operation-item{margin-top:12px}.callback-operation-header{align-items:baseline;gap:8px;display:flex}.callback-method{vertical-align:baseline;text-align:left;border:none;width:70px;margin:0;padding:0;line-height:20px}.read-mode-group,.read-mode-tag{border-top:1px solid var(--border)}.section-gap--read-mode:is(.read-mode-group,.read-mode-tag){padding-top:24px}.section-gap--read-mode.read-mode-group{margin-top:24px;padding-bottom:0}.section-gap--read-mode.read-mode-group+.read-mode-tag{border-top:none;padding-top:.5em}.rapidoc-heading.title.tag-group{font-size:var(--font-size-regular);letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);margin:0;font-weight:600}.expanded-endpoint-body[data-first-operation-in-tag=true]{margin-top:32px}.tag-group-description{color:var(--muted-foreground);margin-top:.5em}.m-endpoint{border-radius:min(var(--radius), 1rem);--method-color:var(--method-default)}.m-endpoint.expanded{margin-bottom:16px}.m-endpoint>.endpoint-head{border:1px solid #0000;border-left-width:5px;border-top-color:var(--border);border-radius:min(var(--radius), 1rem);cursor:pointer;align-items:center;padding:6px 16px;display:flex}.m-endpoint>.endpoint-head.expanded{border-bottom-right-radius:0;border-bottom-left-radius:0}.m-endpoint>.endpoint-head:hover,.m-endpoint>.endpoint-head.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.put:hover,.m-endpoint>.endpoint-head.put.expanded{border-color:var(--method-put);background:color-mix(in srgb, var(--method-put) 10%, transparent)}.m-endpoint>.endpoint-head.post:hover,.m-endpoint>.endpoint-head.post.expanded{border-color:var(--method-post);background:color-mix(in srgb, var(--method-post) 10%, transparent)}.m-endpoint>.endpoint-head.get:hover,.m-endpoint>.endpoint-head.get.expanded{border-color:var(--method-get);background:color-mix(in srgb, var(--method-get) 10%, transparent)}.m-endpoint>.endpoint-head.delete:hover,.m-endpoint>.endpoint-head.delete.expanded{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 10%, transparent)}.m-endpoint>.endpoint-head.head:hover,.m-endpoint>.endpoint-head.head.expanded,.m-endpoint>.endpoint-head.patch:hover,.m-endpoint>.endpoint-head.patch.expanded,.m-endpoint>.endpoint-head.options:hover,.m-endpoint>.endpoint-head.options.expanded{border-color:var(--yellow);background:color-mix(in srgb, var(--yellow) 10%, transparent)}.m-endpoint>.endpoint-head.trace:hover,.m-endpoint>.endpoint-head.trace.expanded{border-color:var(--pink);background:color-mix(in srgb, var(--pink) 10%, transparent)}.m-endpoint>.endpoint-head.query:hover,.m-endpoint>.endpoint-head.query.expanded{border-color:var(--purple);background:color-mix(in srgb, var(--purple) 10%, transparent)}.m-endpoint>.endpoint-head.copy:hover,.m-endpoint>.endpoint-head.copy.expanded,.m-endpoint>.endpoint-head.purge:hover,.m-endpoint>.endpoint-head.purge.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.deprecated:hover,.m-endpoint>.endpoint-head.deprecated.expanded{border-color:var(--border);filter:opacity(.6)}.m-endpoint .endpoint-body{border-style:solid;border-width:0 1px 1px 5px;border-color:var(--method-color,var(--method-default));border-bottom-left-radius:min(var(--radius), 1rem);border-bottom-right-radius:min(var(--radius), 1rem);flex-wrap:wrap;padding:16px 0 0;box-shadow:0 4px 3px -3px #00000026}.m-endpoint .endpoint-body.get{border-color:var(--method-get)}.m-endpoint .endpoint-body.post{border-color:var(--method-post)}.m-endpoint .endpoint-body.put{border-color:var(--method-put)}.m-endpoint .endpoint-body.delete{border-color:var(--method-delete)}.m-endpoint .endpoint-body.patch{border-color:var(--method-patch)}.m-endpoint .endpoint-body.head{border-color:var(--method-head)}.m-endpoint .endpoint-body.options{border-color:var(--method-options)}.m-endpoint .endpoint-body.trace{border-color:var(--method-trace)}.m-endpoint .endpoint-body.query{border-color:var(--method-query)}.m-endpoint .endpoint-body.deprecated{border-color:var(--border);filter:opacity(.6)}.endpoint-head .deprecated{color:var(--muted-foreground);filter:opacity(.6)}.summary{padding:8px}.summary .title{overflow-wrap:anywhere}.endpoint-head .method{vertical-align:middle;font-size:var(--font-size-small);height:calc(var(--font-size-small) + 16px);line-height:calc(var(--font-size-small) + 8px);border-radius:var(--radius);text-align:center;text-transform:uppercase;border:2px solid var(--method-color,var(--method-default));width:60px;margin-inline-end:5px;padding:2px 5px;font-weight:700;display:inline-block}.endpoint-head .method.delete{border:2px solid var(--method-delete)}.endpoint-head .method.put{border:2px solid var(--method-put)}.endpoint-head .method.post{border:2px solid var(--method-post)}.endpoint-head .method.get{border:2px solid var(--method-get)}.endpoint-head .method.get.deprecated{border:2px solid var(--border)}.endpoint-head .method.head{border:2px solid var(--method-head)}.endpoint-head .method.patch{border:2px solid var(--method-patch)}.endpoint-head .method.options{border:2px solid var(--method-options)}.endpoint-head .method.trace{border:2px solid var(--method-trace)}.endpoint-head .method.query{border:2px solid var(--method-query)}.endpoint-head .method.copy,.endpoint-head .method.purge{border:2px solid var(--method-default)}.head{--method-color:var(--method-head)}.patch{--method-color:var(--method-patch)}.options{--method-color:var(--method-options)}.trace{--method-color:var(--method-trace)}.query{--method-color:var(--method-query)}.put{--method-color:var(--method-put)}.post{--method-color:var(--method-post)}.get{--method-color:var(--method-get)}.delete{--method-color:var(--method-delete)}.copy,.purge{--method-color:var(--method-default)}.req-resp-container{border-top:1px solid var(--border);flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.expanded-req-resp-container{border-top:none;flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.request-panel,.view-mode-request,api-response{box-sizing:border-box;flex:auto;min-width:0;min-height:100px;padding:16px 8px;overflow:hidden}.m-endpoint .request-panel,.m-endpoint .view-mode-request{border-style:dashed;border-width:0 0 1px;border-color:var(--method-color,var(--primary));flex-direction:column;display:flex}.expanded-endpoint-body .request-panel,.expanded-req-resp-container .request-panel{border:0;flex-direction:column;display:flex}.head .view-mode-request,.patch .view-mode-request,.options .view-mode-request{border-color:var(--yellow)}.put .view-mode-request{border-color:var(--orange)}.post .view-mode-request{border-color:var(--green)}.get .view-mode-request{border-color:var(--blue)}.delete .view-mode-request{border-color:var(--destructive)}.trace .view-mode-request{border-color:var(--pink)}.query .view-mode-request{border-color:var(--purple)}.copy .view-mode-request,.purge .view-mode-request{border-color:var(--method-color,var(--method-default))}@container (width>=860px){.only-large-screen{display:block}.endpoint-head .path{font-size:var(--font-size-regular)}.endpoint-head .descr{display:flex}.endpoint-head .m-markdown-small,.descr .m-markdown-small{display:block}.req-resp-container,.expanded-req-resp-container{flex-direction:row}:host([layout=column]) .req-resp-container,:host([layout=column]) .expanded-req-resp-container,.req-resp-container.column-layout,.expanded-req-resp-container.column-layout{flex-direction:column!important}:host([layout=column]) .m-endpoint .request-panel,:host([layout=column]) .view-mode-request,.m-endpoint .request-panel.column-layout,.view-mode-request.column-layout{border-width:0 0 1px;padding:16px 8px}:host([layout=column]) .expanded-endpoint-body .request-panel,:host([layout=column]) .expanded-req-resp-container .request-panel,.expanded-endpoint-body .request-panel.column-layout,.expanded-req-resp-container .request-panel.column-layout{padding:16px 8px;border:0!important}:host([layout=row]) .req-resp-container,:host([layout=row]) .expanded-req-resp-container,.req-resp-container.row-layout,.expanded-req-resp-container.row-layout{flex-direction:row}:host([layout=row]) .request-panel,:host([layout=row]) .view-mode-request,:host([layout=row]) api-response,.req-resp-container.row-layout .request-panel,.req-resp-container.row-layout .view-mode-request,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout .request-panel,.expanded-req-resp-container.row-layout .view-mode-request,.expanded-req-resp-container.row-layout api-response{flex:1;min-width:0}:host([layout=row]) .m-endpoint .request-panel.row-layout,:host([layout=row]) .view-mode-request.row-layout,.m-endpoint .request-panel.row-layout,.view-mode-request.row-layout{border-style:dashed;border-width:0 1px 0 0;border-color:var(--method-color,var(--primary));padding:16px 20px 16px 8px}:host([layout=row]) .expanded-endpoint-body .request-panel.row-layout,:host([layout=row]) .expanded-req-resp-container.row-layout .request-panel,.expanded-endpoint-body .request-panel.row-layout,.expanded-req-resp-container.row-layout .request-panel{border-style:dashed;border-width:0 1px 0 0;border-color:color-mix(in srgb, var(--method-color,var(--primary)) 50%, transparent);padding:16px 20px 16px 8px}.head .expanded-endpoint-body .request-panel,.head .expanded-req-resp-container .request-panel,.patch .expanded-endpoint-body .request-panel,.patch .expanded-req-resp-container .request-panel,.options .expanded-endpoint-body .request-panel,.options .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--yellow) 50%, transparent)}.put .expanded-endpoint-body .request-panel,.put .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--orange) 50%, transparent)}.post .expanded-endpoint-body .request-panel,.post .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--green) 50%, transparent)}.get .expanded-endpoint-body .request-panel,.get .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--blue) 50%, transparent)}.delete .expanded-endpoint-body .request-panel,.delete .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--destructive) 50%, transparent)}.trace .expanded-endpoint-body .request-panel,.trace .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--pink) 50%, transparent)}.query .expanded-endpoint-body .request-panel,.query .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--purple) 50%, transparent)}.copy .expanded-endpoint-body .request-panel,.copy .expanded-req-resp-container .request-panel,.purge .expanded-endpoint-body .request-panel,.purge .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--method-color,var(--method-default)) 50%, transparent)}:host([layout=row]) api-response,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout api-response{padding:16px 8px 16px 20px}.summary{padding:8px 16px}}`,Xa=W`code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5}pre[class*=language-]{border-radius:min(var(--radius), .5rem);background:var(--code-bg);border:1px solid var(--input);margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{white-space:normal;border-radius:min(var(--radius), .5rem)}::highlight(comment),::highlight(quote){color:var(--syntax-comment)}::highlight(keyword),::highlight(storage),::highlight(at-rule),::highlight(doctype),::highlight(important),::highlight(section){color:var(--syntax-keyword)}::highlight(operator),::highlight(punctuation){color:var(--syntax-operator)}::highlight(string),::highlight(regexp),::highlight(attribute-value),::highlight(link),::highlight(raw){color:var(--syntax-string)}::highlight(numeric),::highlight(boolean),::highlight(constant),::highlight(symbol),::highlight(character-entity),::highlight(anchor),::highlight(entity){color:var(--syntax-constant)}::highlight(function),::highlight(decorator),::highlight(animation){color:var(--syntax-function)}::highlight(type),::highlight(support){color:var(--syntax-type)}::highlight(variable),::highlight(interpolation){color:var(--syntax-variable)}::highlight(property),::highlight(key),::highlight(attribute-name){color:var(--syntax-property)}::highlight(tag){color:var(--syntax-tag)}::highlight(selector){color:var(--syntax-selector)}::highlight(inserted){color:var(--syntax-inserted)}::highlight(deleted){color:var(--syntax-deleted)}`,Rr=W`.tab-panel{min-width:0}.tabs,.tab-buttons{min-height:2.5em;box-shadow:inset 0 -1px 0 var(--border);font-size:var(--font-size-small);scrollbar-width:none;align-items:center;gap:1.25em;display:flex;overflow-x:auto;&::-webkit-scrollbar{display:none}}.tab,.tab-btn{font-family:var(--font-sans);font-size:inherit;letter-spacing:.04em;white-space:nowrap;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;flex:none;align-self:stretch;margin:0;padding:0 .125em;font-weight:600;transition:color .15s,border-color .15s;&:hover{color:var(--foreground)}&.tab-active,&.active{color:var(--primary);border-bottom-color:var(--primary)}&:focus-visible{outline:2px solid var(--ring);outline-offset:-2px}}.tab-bar-end{color:var(--muted-foreground);flex:none;margin-inline-start:auto}select.select-sm{max-width:100%;font-size:var(--font-size-small);background-color:#0000;padding:.3em .75em}@supports not (appearance:base-select){select.select-sm{padding-right:2em}}.example-select{width:fit-content;margin-bottom:.75em;display:flex}.tab-content{min-width:0;min-height:50px;padding-top:.75em;position:relative;& .toolbar-btn{position:absolute;top:12px;right:8px}}`,pn=W`#advanced-search-btn{width:75px;margin-left:5px;display:none}.btn-clear-filter{color:var(--foreground);width:75px;margin-left:5px}.nav-bar-header{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(12px);flex-direction:column;width:100%;transition:box-shadow .2s,background .2s;display:flex;position:sticky;top:0}@container scroll-state(scrollable:top){.nav-bar-header{box-shadow:0 4px 12px -2px #00000040,0 2px 4px -1px #00000026}}.nav-bar-search-container{box-sizing:border-box;flex-direction:row;justify-content:center;align-items:stretch;width:100%;padding:8px 16px 12px;display:flex}.nav-bar-search-container.has-bottom-border{border-bottom:1px solid var(--muted)}.nav-bar-search-input-wrapper{flex:1;line-height:22px;display:flex;position:relative}.nav-bar-search-input-wrapper .nav-bar-search-input{width:100%;color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);background:var(--input-background);line-height:1.25;font-size:calc(var(--font-size-small) + 1px);box-sizing:border-box;padding:.45em 28px .45em 10px;transition:border-color .2s,box-shadow .2s}.nav-bar-search-input:focus{border-color:var(--sidebar-ring);box-shadow:0 0 0 2px color-mix(in srgb, var(--sidebar-ring) 25%, transparent);outline:none}.nav-bar-search-icon{font-size:var(--font-size-regular);cursor:pointer;color:var(--foreground);opacity:.6;user-select:none;position:absolute;top:50%;right:8px;transform:translateY(-50%)}svg.nav-bar-search-icon{cursor:default;pointer-events:none}.nav-bar-search-icon:hover{opacity:1;color:var(--foreground)}#nav-bar-btn{background:var(--card);width:50px;height:50px;color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;z-index:10;font-size:36px;line-height:30px;position:absolute;top:16px;right:16px;box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030;&:hover{border-color:var(--primary);color:var(--primary)}}.nav-bar{width:0;height:100%;color:var(--sidebar-foreground);background:var(--sidebar);background-blend-mode:multiply;border-right:1px solid var(--sidebar-border);font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 6px);word-break:break-word;flex-flow:column;position:relative;overflow:hidden;&.floating-nav{z-index:5;width:330px;position:absolute;top:0;left:0;overflow:scroll}}.nav-bar-info:focus-visible,.nav-bar-tag:focus-visible,.nav-bar-path:focus-visible{box-shadow:none;outline-offset:-4px;outline:1px solid}.nav-bar-expand-all:focus-visible,.nav-bar-collapse-all:focus-visible,.nav-bar-tag-icon:focus-visible{box-shadow:none;outline-offset:2px;outline:1px solid}::slotted([slot=nav-logo]){max-height:var(--sidebar-logo-max-height);box-sizing:border-box;object-fit:contain;width:auto;padding:16px 16px 0;overflow:hidden}.nav-scroll{overflow:hidden auto;overflow-y:overlay;scrollbar-width:thin;scrollbar-color:var(--muted) transparent;scroll-padding-top:60px;container-type:scroll-state}.nav-bar-tag{flex-direction:row;justify-content:space-between;align-items:center;display:flex}.nav-bar-paths-under-tag{padding-left:10px;overflow:hidden}.collapsed .nav-bar-paths-under-tag,.nav-bar-tag-and-paths.collapsed .nav-bar-paths-under-tag{visibility:hidden;max-height:0;display:none}.nav-bar-expand-all{cursor:pointer;margin-inline-end:10px;transform:rotate(90deg)}.nav-bar-collapse-all{cursor:pointer;transform:rotate(270deg)}.nav-bar-expand-all:hover,.nav-bar-collapse-all:hover{color:var(--primary)}.nav-bar-tag-icon,.nav-bar-tag-group-icon{color:var(--foreground);cursor:pointer;user-select:none;justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;line-height:1;transition:color .15s;display:inline-flex}.nav-bar-tag-icon:hover,.nav-bar-tag-group-icon:hover{color:var(--foreground)}.nav-bar-tag-icon:after,.nav-bar-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon:after,.nav-bar-tag-group.collapsed .nav-bar-tag-group-icon:after{transform:rotate(-90deg)}.nav-bar-tag-and-paths.expanded .nav-bar-tag-icon:after,.nav-bar-tag-group.expanded .nav-bar-tag-group-icon:after{transform:rotate(0)}.nav-scroll::-webkit-scrollbar{width:8px}.nav-scroll::-webkit-scrollbar-track{background:0 0}.nav-scroll::-webkit-scrollbar-thumb{background:var(--muted)}.nav-bar-tag-group{margin-top:6px;margin-bottom:2px}.nav-bar-tag-group-header{text-transform:uppercase;letter-spacing:.05em;color:var(--foreground);cursor:pointer;user-select:none;border-inline-start:4px solid #0000;justify-content:space-between;align-items:center;padding:8px 15px 4px 6px;font-weight:700;transition:border-color .15s,color .15s;display:flex}.nav-bar-tag-group-header:hover{color:var(--foreground)}.nav-bar-tag-group-title{flex:1;min-width:0}.nav-bar-tag-group.collapsed .nav-bar-tags-under-group{display:none}.nav-bar-tags-under-group{border-inline-start:1px solid var(--border);margin-inline-start:10px}.nav-bar-tag{color:var(--primary);text-transform:capitalize;border-inline-start:4px solid #0000;min-width:0;padding:10px 15px 10px 10px;font-weight:600}.nav-bar-tag a,.nav-bar-tag-title,a.nav-bar-tag-title{color:inherit;flex:1;min-width:0;text-decoration:none}.nav-bar-tag a:hover,.nav-bar-tag-title:hover,a.nav-bar-tag-title:hover{color:inherit;text-decoration:none}.nav-bar-components,.nav-bar-h1,.nav-bar-h2,.nav-bar-info,.nav-bar-tag,.nav-bar-path{cursor:pointer;width:100%;color:var(--foreground);background:0 0;border:none;border-inline-start:4px solid #0000;transition:background .15s,color .15s;display:flex}.nav-bar-path,a.nav-bar-path{box-sizing:border-box;justify-content:space-between;align-items:center;gap:8px;min-width:0;text-decoration:none}.nav-bar-path:hover,a.nav-bar-path:hover{text-decoration:none}.nav-bar-path>*{pointer-events:none}.nav-bar-path.deprecated{filter:opacity(.5)}.portal-sidebar-footer-link{padding:16px 12px}.nav-bar-path-label{flex:1;align-items:baseline;min-width:0;display:flex}.nav-bar-webhook{font-weight:700;font-size:var(--font-size-xs);flex-shrink:0;margin-right:8px}.nav-bar-path-label .mono-font{font-family:var(--font-mono)}.nav-method{font-weight:700;font-size:var(--font-size-xs);white-space:nowrap;flex-shrink:0;margin-inline-start:auto;&.false{display:none}}.nav-method.as-colored-text{color:var(--method-default)}.nav-method.as-colored-text.get{color:var(--method-get)}.nav-method.as-colored-text.put{color:var(--method-put)}.nav-method.as-colored-text.post{color:var(--method-post)}.nav-method.as-colored-text.delete{color:var(--method-delete)}.nav-method.as-colored-text.head{color:var(--method-head)}.nav-method.as-colored-text.patch{color:var(--method-patch)}.nav-method.as-colored-text.options{color:var(--method-options)}.nav-method.as-colored-text.trace{color:var(--method-trace)}.nav-method.as-colored-text.query{color:var(--method-query)}.nav-method.as-colored-text.copy,.nav-method.as-colored-text.purge{color:var(--method-default)}.nav-method.as-colored-block{text-align:center;min-width:32px;color:var(--method-badge-fg);background:var(--method-default);border-radius:4px;padding:1px 4px;font-weight:600}:host([color-scheme=light]) .nav-method.as-colored-block{color:var(--method-badge-fg)}@media (prefers-color-scheme:light){:host([color-scheme=system]) .nav-method.as-colored-block{color:var(--method-badge-fg)}}.colored-block .nav-method.as-colored-block{outline:1px solid}.nav-method.as-colored-block.get{background:var(--method-get)}.nav-method.as-colored-block.put{background:var(--method-put)}.nav-method.as-colored-block.post{background:var(--method-post)}.nav-method.as-colored-block.delete{background:var(--method-delete)}.nav-method.as-colored-block.head{background:var(--method-head)}.nav-method.as-colored-block.patch{background:var(--method-patch)}.nav-method.as-colored-block.options{background:var(--method-options)}.nav-method.as-colored-block.trace{background:var(--method-trace)}.nav-method.as-colored-block.query{background:var(--method-query)}.nav-method.as-colored-block.copy,.nav-method.as-colored-block.purge{background:var(--method-default)}.nav-bar-h1,.nav-bar-h2,.nav-bar-path{padding:var(--sidebar-item-padding);font-weight:400}.nav-bar-info{padding:12px 10px;font-weight:600}.nav-bar-section{color:var(--foreground);padding:var(--sidebar-item-padding);flex-direction:row;justify-content:space-between;font-weight:700;display:flex}.nav-bar-section.operations{display:none!important}.nav-bar-section:first-child{display:none}.nav-bar-h2{padding-inline-start:28px}.nav-bar-h1.active,.nav-bar-h2.active,.nav-bar-info.active,.nav-bar-tag.active,.nav-bar-path.active,.nav-bar-section.operations.active,.nav-bar-h1.left-bar.active,.nav-bar-h2.left-bar.active,.nav-bar-info.left-bar.active,.nav-bar-tag.left-bar.active,.nav-bar-path.left-bar.active,.nav-bar-section.left-bar.operations.active{border-inline-start:4px solid var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-h1.active:hover,.nav-bar-h2.active:hover,.nav-bar-info.active:hover,.nav-bar-tag.active:hover,.nav-bar-path.active:hover,.nav-bar-section.operations.active:hover,.nav-bar-h1.left-bar.active:hover,.nav-bar-h2.left-bar.active:hover,.nav-bar-info.left-bar.active:hover,.nav-bar-tag.left-bar.active:hover,.nav-bar-path.left-bar.active:hover,.nav-bar-section.left-bar.operations.active:hover{color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header{border-inline-start-color:var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag:hover,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header:hover{color:var(--sidebar-primary)}.nav-bar-h1:hover,.nav-bar-h2:hover,.nav-bar-info:hover,.nav-bar-tag:hover,.nav-bar-path:hover{color:var(--sidebar-accent-foreground);background:var(--sidebar-accent)}:host([nav-item-overflow=ellipsis]) .nav-bar-tag-group-title,:host(:not([nav-item-overflow])) .nav-bar-tag-group-title,.overflow-ellipsis .nav-bar-tag-group-title,:host([nav-item-overflow=ellipsis]) .nav-bar-tag-title,:host(:not([nav-item-overflow])) .nav-bar-tag-title,.overflow-ellipsis .nav-bar-tag-title,:host([nav-item-overflow=ellipsis]) .nav-bar-path-label,:host(:not([nav-item-overflow])) .nav-bar-path-label,.overflow-ellipsis .nav-bar-path-label,:host([nav-item-overflow=ellipsis]) .nav-bar-info,:host(:not([nav-item-overflow])) .nav-bar-info,.overflow-ellipsis .nav-bar-info,:host([nav-item-overflow=ellipsis]) .nav-bar-section-title,:host(:not([nav-item-overflow])) .nav-bar-section-title,.overflow-ellipsis .nav-bar-section-title{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}:host([nav-item-overflow=wrap]) .nav-bar-tag-group-title,.overflow-wrap .nav-bar-tag-group-title,:host([nav-item-overflow=wrap]) .nav-bar-tag-title,.overflow-wrap .nav-bar-tag-title,:host([nav-item-overflow=wrap]) .nav-bar-path-label,.overflow-wrap .nav-bar-path-label,:host([nav-item-overflow=wrap]) .nav-bar-info,.overflow-wrap .nav-bar-info,:host([nav-item-overflow=wrap]) .nav-bar-section-title,.overflow-wrap .nav-bar-section-title{white-space:normal;text-overflow:clip;word-break:break-word;overflow:visible}`,un=W`#api-title .version{vertical-align:middle;border:1px solid var(--border);border-radius:var(--radius);background:var(--muted);color:var(--muted-foreground);font-family:var(--font-mono);font-size:var(--font-size-small);letter-spacing:normal;margin-inline-start:.5em;padding:.125em .5em;font-weight:500;line-height:1.5;display:inline-block}#api-info{font-size:calc(var(--font-size-regular) - 1px);margin-top:8px}#api-info span:before{content:"|";opacity:.5;text-align:center;width:15px;display:inline-block}#api-info span:first-child:before{content:"";width:0}`,mt=W``,Cd=W`*,:before,:after{box-sizing:border-box}.dialog-box{background:var(--card);color:var(--card-foreground);border-radius:min(var(--radius), .5rem);border:1px solid var(--border);width:70vw;max-width:70vw;height:70vh;max-height:70vh;padding:0;position:absolute;top:100px;overflow:hidden;box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.dialog-box-header{z-index:10;backdrop-filter:blur(12px);border-bottom:1px solid var(--border);border-top-left-radius:min(var(--radius), .5rem);border-top-right-radius:min(var(--radius), .5rem);align-self:stretch;align-items:center;min-height:60px;max-height:60px;padding:0 16px;display:flex;position:sticky;top:0;overflow:hidden;& button{color:var(--foreground);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:50%;outline:none;margin-inline-end:-8px;font-size:1.5rem;font-weight:700;line-height:1;&:hover{border-color:var(--primary)}}}.dialog-box-content{height:100%;padding:1rem;display:block;overflow:auto}.dialog-box-title{font-size:var(--h2-font-size);flex-grow:1}.search-options-row{flex-wrap:wrap;gap:16px;margin:8px 0 24px;display:flex}.search-option-label{cursor:pointer;user-select:none;align-items:center;gap:.5em;display:inline-flex}.search-option-label input{cursor:pointer}.search-match-row{cursor:pointer;border-bottom:1px solid var(--border);padding:5px}.search-match-row *{pointer-events:none}`,Td=W`rapi-doc:not(:defined){display:none}:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.body{background:var(--background);width:100%;height:100%;display:flex;position:relative;overflow:hidden}.main-content{scrollbar-width:thin;scrollbar-color:var(--border) transparent;flex:1;height:100%;margin:0;padding:0;display:block;overflow:hidden auto;container-type:inline-size}:host([auto-height]),:host([auto-height=true]),:host([auto-height]) .body,:host([auto-height=true]) .body,:host([auto-height]) .main-content,:host([auto-height=true]) .main-content{height:auto;overflow:visible}.main-content-inner--view-mode{padding:0 8px}.main-content-inner--read-mode{padding:0 8px min(70vh,600px)}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background:var(--border)}.section-gap.section-tag{border-bottom:1px solid var(--border)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{scroll-margin-top:var(--scroll-margin-top);padding:0 4px}:host([auto-height]) .main-content-inner--read-mode,:host([auto-height=true]) .main-content-inner--read-mode{padding-bottom:40px}.section-tag-header{cursor:n-resize;padding:12px 0;position:relative}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-header:hover:after{color:var(--primary);content:"⬆";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:after{color:var(--border);content:"⬇";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:hover:after{color:var(--primary)}.collapsed .section-tag-body{display:none}.section-gap.section-tag-group{border-bottom:2px solid var(--border);margin-top:24px;margin-bottom:8px}.section-tag-group-header{cursor:pointer;user-select:none;justify-content:space-between;align-items:center;padding:16px 0 8px;display:flex;position:relative}.section-tag-group-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-group.collapsed .section-tag-group-body{display:none}.section-tag-group-body{border-inline-start:2px solid var(--border);margin-inline-start:4px;padding-inline-start:12px}.section-tag-group-icon{color:var(--muted-foreground);justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;display:inline-flex}.section-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.section-tag-group.collapsed .section-tag-group-icon:after{transform:rotate(-90deg)}::slotted([slot=fixed-header]){background:var(--background);max-height:40px;color:var(--foreground);text-align:center;padding:4px 12px;overflow:hidden}::slotted([slot=logo]){object-fit:contain;width:auto;height:36px;margin-left:5px}.only-large-screen-flex,.only-large-screen{display:none}.main-header{background:var(--background);color:var(--foreground);min-height:48px;padding:8px 4px}.main-header-controls{flex:1;align-items:center;margin:0 8px;display:flex}.header-title{font-size:calc(var(--font-size-regular) + 8px);padding:0 8px}input.header-input{background:var(--input-background);color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius);flex:1;padding-right:24px}input.header-input::placeholder{opacity:.4}.loader{border:4px solid var(--muted);border-top:4px solid var(--primary);border-radius:50%;width:36px;height:36px;margin:16px auto;animation:2s linear infinite spin}.expanded-endpoint-body{padding:6px 0;position:relative}.expanded-endpoint-body .tag-description{background:var(--code-bg);border-radius:min(var(--radius), .5rem);transition:max-height .2s ease-out}.expanded-endpoint-body .tag-icon{transition:transform .2s ease-out}.expanded-endpoint-body .tag-icon.expanded{transform:rotate(180deg)}.divider{border-top:1px solid var(--border);width:100%;margin:24px 0}.downloads-bar{flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;margin:12px 0;display:flex}.download-btn{white-space:nowrap;vertical-align:middle;box-sizing:border-box;justify-content:center;align-items:center;min-width:170px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.download-btn.view-spec{min-width:190px}.download-select{white-space:nowrap;vertical-align:middle;box-sizing:border-box;cursor:pointer;justify-content:space-between;align-items:center;min-width:180px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.header-action-icon{font-size:var(--font-size-regular);cursor:pointer;user-select:none;margin:6px 5px 0 -24px}#spec-not-found{border:1px dashed var(--border);overflow-wrap:anywhere;font-size:var(--font-size-small);color:var(--destructive);font-family:var(--font-mono);justify-content:center;align-items:center;padding:12px;display:flex}.server-opt-row{align-items:baseline;gap:6px;margin:4px 0;display:flex}.server-opt-row input[type=radio],.server-opt-row label{cursor:pointer}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@container (width>=768px){.nav-bar{width:260px;display:flex}#nav-bar-btn{display:none}#advanced-search-btn,.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 0 0 24px}.section-gap--focused-mode,.section-gap--read-mode{padding:24px 8px}.endpoint-body{padding:36px 0 48px;position:relative}}@container (width>=1024px){.nav-bar{width:var(--sidebar-width);display:flex}#nav-bar-btn{display:none}#advanced-search-btn{display:block}.section-gap--focused-mode{padding:12px 80px}.section-gap--read-mode{padding:24px 80px 12px}}`,Qe="ember",hn={ember:{dark:`
--primary: #f76b39;
--primary-foreground: #000000;
`,light:`
--primary: #f76b39;
--primary-foreground: #000000;
`},carbon:{dark:`
--primary: #fafafa;
--primary-foreground: #18181b;
--ring: #a1a1aa;
--background: #121214;
--foreground: #e4e4e7;
`,light:`
--primary: #18181b;
--primary-foreground: #fafafa;
--ring: #52525b;
--background: #ffffff;
--foreground: #18181b;
`},cobalt:{dark:`
--primary: #7aa2d6;
--primary-foreground: #0f1a2a;
--background: #1e2530;
--foreground: #b4bcc8;
--card: #181e27;
--card-foreground: #ced5df;
`,light:`
--primary: #3a6cb0;
--primary-foreground: #ffffff;
--background: #ffffff;
--foreground: #243244;
--card: color-mix(in srgb, var(--background) 94%, var(--foreground));
--card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
`},jade:{dark:`
--primary: #00d390;
--primary-foreground: #0b1f17;
--background: #1d232a;
--foreground: #a6adbb;
--card: #181e25;
--card-foreground: #c8cfd9;
`,light:`
--primary: #047857;
--primary-foreground: #ffffff;
--background: #ffffff;
--foreground: #1a2e26;
--card: color-mix(in srgb, var(--background) 94%, var(--foreground));
--card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
`},indigo:{dark:`
--primary: #818cf8;
--primary-foreground: #1e1b4b;
--background: #0f0e1c;
--foreground: #e4e2f5;
`,light:`
--primary: #4f46e5;
--primary-foreground: #ffffff;
--background: #ffffff;
--foreground: #1e1b3a;
`}},mn=Object.keys(hn);function Od(e,{dark:t,light:r}){let a=s=>{let i=s?`[color-scheme='${s}']`:"",n=[`:host([theme='${e}']${i})`];return e==="ember"&&n.push(`:host(:not([theme])${i})`),n.join(`,
`)};return`
/* --------- ${e.toUpperCase()}${e==="ember"?" (default)":""} --------- */
${a()} {${t}}
${a("light")} {${r}}
@media (prefers-color-scheme: light) {
${a("system")} {${r}}
}
`}var _d=ui(Object.entries(hn).map(([e,t])=>Od(e,t)).join(""));function ft(e){return!e||typeof e!="string"?!1:/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.trim())}function gt(e){if(!e||typeof e!="string")return{theme:Qe};let t=e.trim(),r=t.toLowerCase();return mn.includes(r)?{theme:r}:ft(t)?{theme:t}:{theme:Qe}}function Fd(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length===6||t.length===8){let r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return(r*299+a*587+s*114)/1e3>=128}return!1}function yt(e,t){if(!e||!e.style)return;if(!t||mn.includes(t.trim().toLowerCase())||!ft(t)){e.style.removeProperty("--primary"),e.style.removeProperty("--primary-foreground");return}let r=t.trim();e.style.setProperty("--primary",r);let a=Fd(r)?"#000000":"#ffffff";e.style.setProperty("--primary-foreground",a)}var fn=W`:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Roboto Mono", monospace;--heading-font:var(--font-sans);--heading-weight:600;--heading-line-height:1.25;--heading-letter-spacing:normal;--heading-color:var(--foreground);--heading-margin-top:1.5em;--heading-margin-bottom:.5em;--h1-font-size:2rem;--h2-font-size:1.5rem;--h3-font-size:1.25rem;--h4-font-size:1rem;--h5-font-size:.875rem;--h6-font-size:.8125rem;--label-heading-font-size:var(--font-size-small);--line-height:1.6;--paragraph-spacing:1em;--radius:.25rem;--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--resp-area-height:400px;--table-schema-key-width:240px;--table-schema-key-text-overflow:ellipsis;--table-schema-key-whitespace:nowrap;--scroll-margin-top:120px;--param-label-width:12rem;--param-gap:.5rem;--param-row-gap:.25rem;--param-padding:.5rem;--auth-scheme-padding:.75rem;--value-list-gap:.375rem;--value-list-row-gap:.125rem;--value-list-label-gap:.25rem;--ring:var(--primary);--focus-shadow:0 0 0 1px transparent, 0 0 0 2px color-mix(in srgb, var(--ring) 40%, transparent);--selection-bg:color-mix(in srgb, var(--primary) 25%, transparent);--selection-fg:var(--foreground);--sidebar-width:18.75rem;--sidebar-item-padding:.4375rem 1rem .4375rem .625rem;--sidebar-logo-max-height:60px;--sidebar:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-accent-foreground:var(--foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}:host([radius=none]){--radius:0px}:host([radius=sm]),:host(:not([radius])){--radius:.25rem}:host([radius=md]){--radius:.375rem}:host([radius=lg]){--radius:.5rem}:host([radius=full]){--radius:9999px}:host([scale=sm]){--font-size-xs:11px;--font-size-small:11px;--font-size-description:12px;--font-size-mono:12px;--font-size-regular:13px;--sidebar-width:17rem}:host([scale=default]),:host(:not([scale])){--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--sidebar-width:18.75rem}:host([scale=lg]){--font-size-xs:12px;--font-size-small:14px;--font-size-description:15px;--font-size-mono:15px;--font-size-regular:16px;--sidebar-width:21rem}:host([nav-item-spacing=compact]){--sidebar-item-padding:.3125rem 1rem .3125rem .625rem}:host([nav-item-spacing=default]),:host(:not([nav-item-spacing])){--sidebar-item-padding:.4375rem 1rem .4375rem .625rem}:host([nav-item-spacing=relaxed]){--sidebar-item-padding:.625rem 1rem .625rem .625rem}:host,:host([color-scheme=dark]),:host([color-scheme=system]),:host(:not([color-scheme])){--background:#1f1f23;--foreground:#d4d4d8;--card:color-mix(in srgb, var(--background) 92%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #fff);--muted:color-mix(in srgb, var(--background) 86%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 65%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 88%, var(--foreground));--input:oklch(from var(--border) calc(l + .05) c h);--input-background:color-mix(in srgb, var(--background) 80%, #000);--method-get:#5c98f9;--method-post:#68cc97;--method-put:#f59e0b;--method-delete:#f75252;--method-patch:#a78bfa;--method-head:#eab308;--method-options:#06b6d4;--method-trace:#ec4899;--method-query:#818cf8;--method-default:#64748b;--method-badge-fg:#000;--destructive:#ef4444;--blue:#3b82f6;--green:#10b981;--orange:#f59e0b;--red:#ef4444;--purple:#8b5cf6;--yellow:#eab308;--pink:#ec4899;--brown:#d97706;--syntax-comment:#8b949e;--syntax-keyword:#ff7b72;--syntax-operator:#c9d1d9;--syntax-string:#a5d6ff;--syntax-constant:#79c0ff;--syntax-function:#d2a8ff;--syntax-type:#d2a8ff;--syntax-variable:#ffa657;--syntax-property:#79c0ff;--syntax-tag:#7ee787;--syntax-selector:#d2a8ff;--syntax-inserted:#7ee787;--syntax-deleted:#ff7b72;--code-bg:var(--input-background)}:host([color-scheme=light]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 96%, var(--foreground))}@media (prefers-color-scheme:light){:host([color-scheme=system]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 94%, var(--foreground))}}${_d}`,qd=/[\s#:?&={}]/g,Yt="_rapidoc_api_key";function jr(e){return new Promise(t=>setTimeout(t,e))}function Xt(e,t){let r=t.target,a=document.createElement("textarea");a.value=e,a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy"),r.innerText="Copied",setTimeout(()=>{r.innerText="Copy"},5e3)}catch{}document.body.removeChild(a)}function Rd(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}function Ir(e="",t,r=""){return!e||`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${r}`.toLowerCase().includes(e.toLowerCase())}function Qa(e){return!e||typeof e!="object"?!1:e.xInternal===!0||e.xInternal==="true"||e.xHidden===!0||e.xHidden==="true"||e["x-internal"]===!0||e["x-internal"]==="true"||e["x-hidden"]===!0||e["x-hidden"]==="true"||e.rawOperation?.["x-internal"]===!0||e.rawOperation?.["x-internal"]==="true"||e.rawOperation?.["x-hidden"]===!0||e.rawOperation?.["x-hidden"]==="true"}function es(e,t=new Set){return e&&Object.keys(e).forEach(r=>{t.add(r),e[r].properties?es(e[r].properties,t):e[r].items?.properties&&es(e[r].items?.properties,t)}),t}function jd(e,t,r=[]){if(!e.trim()||r.length===0)return;let a=[];return t.forEach(s=>{s.paths.forEach(i=>{let n="";if(r.includes("search-api-path")&&(n=i.path),r.includes("search-api-descr")&&(n=`${n} ${(i.summary||"")+(i.description||"")}`),r.includes("search-api-params")&&(n=`${n} ${i.parameters?.map(o=>o.name).join(" ")||""}`),r.includes("search-api-request-body")&&i.requestBody){let o=new Set;for(let l in i.requestBody?.content)i.requestBody.content[l].schema?.properties&&(o=es(i.requestBody.content[l].schema?.properties)),n=`${n} ${[...o].join(" ")}`}r.includes("search-api-resp-descr")&&(n=`${n} ${Object.values(i.responses).map(o=>o.description||"").join(" ")}`),n.toLowerCase().includes(e.trim().toLowerCase())&&a.push({elementId:i.elementId,method:i.method,path:i.path,summary:i.summary||i.description||"",deprecated:i.deprecated})})}),a}function gn(e,t){if(e){let r=document.createElement("a");document.body.appendChild(r),r.style="display: none",r.href=e,r.download=t,r.click(),r.remove()}}function yn(e){if(e){let t=document.createElement("a");document.body.appendChild(t),t.style="display: none",t.href=e,t.target="_blank",t.click(),t.remove()}}var G=e=>{if(typeof e!="object"||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},ne=e=>typeof e=="object"&&!!e;function et(e,t,r=[]){let a={};for(let[s,i]of Object.entries(e)){let n=[...r,s];a[s]=Array.isArray(i)?i.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?et(o,t,[...n,l.toString()]):o):ne(i)?et(i,t,n):i}return t(a,r)}var Ne="application/json";function bn(e){let t=e["x-example"],r=e["x-examples"];return delete e["x-example"],delete e["x-examples"],{xExample:t,xExamples:r}}function tt(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Object.keys(e).length>0}function Id(e){return tt(e)&&Object.values(e).every(t=>typeof t=="object"&&!!t&&!Array.isArray(t))}function Nd(e){if(!ne(e))return!0;let t=e;return!(t.allOf||t.oneOf||t.anyOf||t.items||t.$ref||"additionalProperties"in t||["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"].some(r=>r in t)||typeof t.properties=="object"&&t.properties!==null&&Object.keys(t.properties).length>0)}function vn(e){let t=Object.keys(e);if(t.some(r=>{let a=e[r];return ne(a)&&(a.example!==void 0||a.examples!==void 0)}))for(let r of t){let a=e[r];if(!ne(a))continue;let s=a.example!==void 0||a.examples!==void 0;a.schema!==void 0&&!s&&Object.keys(a).length===1&&Nd(a.schema)&&delete e[r]}}var Bd=new Set(["summary","description","value","externalValue"]);function xn(e){if(typeof e!="object"||!e)return!1;let t=e,r="value"in t||"externalValue"in t,a=Object.keys(t).every(s=>Bd.has(s));return r&&a}function bt(e){return xn(e)?e:{value:e}}var Ld=/^(\*|application|audio|example|font|haptics|image|message|model|multipart|text|video)\/[a-zA-Z0-9*+.-]+$/,ts=(e,t)=>t.includes(e)||Ld.test(e);function Pd(e){return Object.entries(e).reduce((t,[r,a])=>(t[r]={value:a},t),{})}var zd=e=>{switch(e){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return e}};function wn(e){let t=e;if(typeof t=="object"&&t&&typeof t.swagger=="string"&&t.swagger?.startsWith("2.0"))t.openapi="3.0.4",delete t.swagger;else return t;if(t.host){let r=Array.isArray(t.schemes)&&t.schemes?.length?t.schemes:["http"];t.servers=r.map(a=>({url:`${a}://${t.host}${t.basePath??""}`})),delete t.basePath,delete t.schemes,delete t.host}else t.basePath&&(t.servers=[{url:t.basePath}],delete t.basePath);if(t.definitions){for(let r of Object.values(t.definitions))Te(r);t.components=Object.assign({},t.components,{schemas:t.definitions}),delete t.definitions,t=et(t,r=>(typeof r.$ref=="string"&&r.$ref.startsWith("#/definitions/")&&(r.$ref=r.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),r))}if(t=et(t,r=>(r.type==="file"&&(r.type="string",r.format="binary"),r)),Object.hasOwn(t,"parameters")){t=et(t,i=>{if(typeof i.$ref=="string"&&i.$ref.startsWith("#/parameters/")){let n=i.$ref.split("/")[2];if(!n)return i;let o=ne(t.parameters)&&n in t.parameters?t.parameters[n]:void 0;i.$ref=o&&typeof o=="object"&&"in"in o&&(o.in==="body"||o.in==="formData")?i.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):i.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return i}),t.components??={};let r={},a={},s=ne(t.parameters)?t.parameters:{};for(let[i,n]of Object.entries(s))n&&typeof n=="object"&&("$ref"in n?r[i]=as(n):"in"in n&&(n.in==="body"?a[i]=An(n,t.consumes??[Ne]):n.in==="formData"?a[i]=En([n],t.consumes):r[i]=as(n)));Object.keys(r).length>0&&(t.components.parameters=r),Object.keys(a).length>0&&(t.components.requestBodies=a),delete t.parameters}if(Object.hasOwn(t,"responses")&&typeof t.responses=="object"&&t.responses!==null){t=et(t,s=>(typeof s.$ref=="string"&&s.$ref.startsWith("#/responses/")&&(s.$ref=s.$ref.replace(/^#\/responses\//,"#/components/responses/")),s)),t.components??={};let r={},a=t.responses;for(let[s,i]of Object.entries(a))if(ne(i))if("$ref"in i)r[s]=i;else{let n=i,o=t.produces??[Ne];if(n.schema){Te(n.schema),typeof n.content!="object"&&(n.content={});for(let l of o)n.content[l]={schema:n.schema};delete n.schema}if(n.examples&&typeof n.examples=="object"){typeof n.content!="object"&&(n.content={});let l=o[0]??Ne;for(let[p,d]of Object.entries(n.examples))if(ts(p,o))typeof n.content[p]!="object"&&(n.content[p]={}),n.content[p].example=d;else{typeof n.content[l]!="object"&&(n.content[l]={});let c=n.content[l];typeof c.examples!="object"&&(c.examples={}),c.examples[p]=bt(d)}delete n.examples}n.content&&typeof n.content=="object"&&vn(n.content),ne(n.headers)&&(n.headers=Object.entries(n.headers).reduce((l,[p,d])=>d&&typeof d=="object"?{[p]:$n(d),...l}:l,{})),r[s]=n}Object.keys(r).length>0&&(t.components.responses=r),delete t.responses}if(typeof t.paths=="object"){for(let r in t.paths)if(Object.hasOwn(t.paths,r)){let a=ne(t.paths)&&r in t.paths?t.paths[r]:void 0;if(!a||typeof a!="object")continue;let s;for(let i in a)if(i==="parameters"&&Object.hasOwn(a,i)){let n=Dn(a.parameters,t.consumes??[Ne]);a.parameters=n.parameters,s=n.requestBody}else if(Object.hasOwn(a,i)){let n=a[i];if(s&&(n.requestBody=s),n.parameters){let o=Dn(n.parameters,n.consumes??t.consumes??[Ne]);n.parameters=o.parameters,o.requestBody&&(n.requestBody=o.requestBody)}if(delete n.consumes,n.responses){for(let o in n.responses)if(Object.hasOwn(n.responses,o)){let l=n.responses[o];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((p,[d,c])=>c&&typeof c=="object"?{[d]:$n(c),...p}:p,{})),l.schema){Te(l.schema);let p=t.produces??n.produces??[Ne];typeof l.content!="object"&&(l.content={});for(let d of p)l.content[d]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});let p=t.produces??n.produces??[Ne],d=p[0]??Ne;for(let[c,f]of Object.entries(l.examples))if(ts(c,n.produces??p))typeof l.content[c]!="object"&&(l.content[c]={}),l.content[c].example=f;else{typeof l.content[d]!="object"&&(l.content[d]={});let h=l.content[d];typeof h.examples!="object"&&(h.examples={}),h.examples[c]=bt(f)}delete l.examples}l.content&&typeof l.content=="object"&&vn(l.content)}}delete n.produces,n.parameters?.length===0&&delete n.parameters}}}if(t.securityDefinitions){(typeof t.components!="object"||t.components===null)&&(t.components={}),t.components&&typeof t.components=="object"&&Object.assign(t.components,{securitySchemes:{}});for(let[r,a]of Object.entries(t.securityDefinitions))if(typeof a=="object"){let s=Object.fromEntries(Object.entries(a).filter(([i])=>i==="description"||i.startsWith("x-")));if("type"in a&&a.type==="oauth2"){let{flow:i,authorizationUrl:n,tokenUrl:o,scopes:l}=a;t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...s,type:"oauth2",flows:{[zd(i||"implicit")]:Object.assign({},n&&{authorizationUrl:n},o&&{tokenUrl:o},l&&{scopes:l})}}})}else"type"in a&&a.type==="basic"?t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...s,type:"http",scheme:"basic"}}):t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:a})}delete t.securityDefinitions}return delete t.consumes,delete t.produces,t}var Te=e=>{if(ne(e)){if(typeof e["x-nullable"]=="boolean"&&(e["x-nullable"]&&(e.nullable=!0),delete e["x-nullable"]),ne(e.properties))for(let t of Object.values(e.properties))Te(t);if(Te(e.items),Te(e.additionalProperties),Array.isArray(e.allOf))for(let t of e.allOf)Te(t)}};function rs(e){let t=["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf","x-nullable"].reduce((r,a)=>(Object.hasOwn(e,a)&&(r[a]=e[a],delete e[a]),r),{});return Te(t),t}function Md(e){if(e==="formData")throw Error("Encountered a formData parameter which should have been filtered out by the caller");if(e==="body")throw Error("Encountered a body parameter which should have been filtered out by the caller");return e}function as(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Ud(e),r=rs(e),{xExample:a,xExamples:s}=bn(e);if(tt(a)?e.examples=Pd(a):tt(s)&&(e.examples=Object.entries(s).reduce((i,[n,o])=>(i[n]=bt(o),i),{})),delete e.collectionFormat,delete e.default,!e.in)throw Error('Parameter object must have an "in" property');return{schema:r,...t,...e,in:Md(e.in)}}function $n(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=rs(e);return{...e,schema:t}}var kn={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Sn={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},ss={header:Sn,query:kn,path:Sn};function Ud(e){if(e.type!=="array"||e.in!=="query"&&e.in!=="path"&&e.in!=="header")return{};let t=e.collectionFormat??"csv";return e.in in ss&&t in ss[e.in]?ss[e.in][t]:{}}function Hd(e){if(e.type!=="array"||typeof e.collectionFormat!="string")return;let t=kn[e.collectionFormat];if(t&&Object.keys(t).length!==0)return t}function An(e,t){let{xExample:r,xExamples:a}=bn(e);delete e.name,delete e.in;let{schema:s,...i}=e;Te(s);let n={content:{},...i};if(n.content)for(let o of t){if(n.content[o]={schema:s},tt(a)&&o in a){let l=a[o];tt(l)&&Object.values(l).every(p=>xn(p))?n.content[o].examples=l:Id(l)?n.content[o].examples=Object.entries(l).reduce((p,[d,c])=>(p[d]=bt(c),p),{}):n.content[o].examples={default:bt(l)}}else if(tt(a)){let l=Object.entries(a).filter(([p])=>!ts(p,t));l.length&&(n.content[o].examples=l.reduce((p,[d,c])=>(p[d]=bt(c),p),{}))}!n.content[o].examples&&tt(r)&&o in r&&(n.content[o].example=r[o])}return n}function En(e,t=["multipart/form-data"]){let r={content:{}},a=t.filter(i=>i==="multipart/form-data"||i==="application/x-www-form-urlencoded"),s=a.length>0?a:["multipart/form-data"];if(r.content)for(let i of s){r.content[i]={schema:{type:"object",properties:{},required:[]}};let n=r.content?.[i];if(n?.schema&&typeof n.schema=="object"&&"properties"in n.schema){for(let o of e)if(o.name&&n.schema.properties){let l=structuredClone(o),p=rs(l);n.schema.properties[o.name]={...p,...Object.fromEntries(Object.entries(l).filter(([c])=>c.startsWith("x-"))),...o.description===void 0?{}:{description:o.description}};let d=Hd(o);d&&(n.encoding??={},n.encoding[o.name]=d),o.required&&Array.isArray(n.schema.required)&&n.schema.required.push(o.name)}}}return r}function Dn(e,t){let r={parameters:e.filter(i=>i.in!=="body"&&i.in!=="formData").map(i=>as(i))},a=structuredClone(e.find(i=>i.in==="body")??{});a&&Object.keys(a).length&&(r.requestBody=An(a,t));let s=e.filter(i=>i.in==="formData");if(s.length>0){let i=En(s,t);r.requestBody=typeof r.requestBody=="object"?{...r.requestBody,content:{...r.requestBody.content,...i.content}}:i,typeof r.requestBody!="object"&&(r.requestBody={content:{}})}return r}var Kd=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema","schemas"]),Wd=new Set(["paths","webhooks","responses","content","headers","examples","links","encoding","variables","parameters","requestBodies","securitySchemes","pathItems","scopes"]),is=e=>{if(!e)return!1;let t=e[0]==="x-ext"&&e[1]!==void 0?e.slice(2):e,r=0;for(let a of t)if(r>0)r--;else{if(Kd.has(a)||a.endsWith("Schema"))return!0;a==="callbacks"?r=2:Wd.has(a)&&(r=1)}return!1},Vd=new Set(["properties","patternProperties","$defs","definitions"]);function vt(e){let t=e?.[e.length-1];return t===void 0?!1:t==="schemas"&&e?.[e.length-2]==="components"||Vd.has(t)}function Jd(e,t){return e[t]==="default"&&e[t-1]==="responses"&&!vt(e.slice(0,t-1))}var Gd=new Set(["example","default","const","enum"]);function Zd(e){if(!e)return!1;for(let[t,r]of e.entries())if(Gd.has(r)&&!vt(e.slice(0,t))&&!Jd(e,t)||r==="value"&&e[t-2]==="examples"&&!vt(e.slice(0,t-2)))return!0;return!1}var Yd=new Set(["title","description","deprecated","default","example","examples","externalDocs","readOnly","writeOnly"]);function Xd(e){if(!e||e.length<2||!is(e.slice(0,-2))||e.some((a,s)=>{let i=e.slice(0,s);return a.startsWith("x-")&&is(i)&&!vt(i)}))return!1;let t=e[e.length-2],r=e[e.length-1];return(t==="oneOf"||t==="anyOf")&&r!==void 0&&/^\d+$/.test(r)}function Qd(e){return Object.keys(e).every(t=>t==="nullable"||Yd.has(t)||t.startsWith("x-"))}function Cn(e){let t=e;return t===null||typeof t.openapi!="string"||!t.openapi.startsWith("3.0")||(t.openapi="3.1.1",t=et(t,ep)),t}var ep=(e,t)=>{if(Zd(t))return e;if(e.type!==void 0&&e.nullable===!0)e.type=[e.type,"null"],delete e.nullable;else if(e.nullable===!0&&e.type===void 0){if(typeof e.$ref=="string"){let{nullable:i,$ref:n,...o}=e;return{...o,anyOf:[{$ref:n},{type:"null"}]}}if(Array.isArray(e.allOf)){let{nullable:i,allOf:n,...o}=e,l=n.length===1?n[0]:{allOf:n};return{...o,anyOf:[l,{type:"null"}]}}Xd(t)&&Qd(e)&&(delete e.nullable,e.type="null")}e.exclusiveMinimum===!0&&e.minimum!==void 0?(e.exclusiveMinimum=e.minimum,delete e.minimum):typeof e.exclusiveMinimum=="boolean"&&delete e.exclusiveMinimum,e.exclusiveMaximum===!0&&e.maximum!==void 0?(e.exclusiveMaximum=e.maximum,delete e.maximum):typeof e.exclusiveMaximum=="boolean"&&delete e.exclusiveMaximum;let r=t?.some((i,n)=>i==="examples"&&n>0&&!vt(t.slice(0,n)));e.example!==void 0&&!r&&!vt(t)&&(e.examples=is(t)?[e.example]:{default:{value:e.example}},delete e.example);let{format:a,...s}=e;if(e.type==="string"||Array.isArray(e.type)&&e.type.includes("string")){if(e.format==="binary"){let{type:i,...n}=s;return t?.at(-1)==="schema"&&t.at(-3)==="content"?n:{contentMediaType:"application/octet-stream",...n}}if(e.format==="base64"||e.format==="byte")return{...s,contentEncoding:"base64"}}return e["x-webhooks"]!==void 0&&(t===void 0||t.length===0)&&(e.webhooks=e["x-webhooks"],delete e["x-webhooks"]),e},tp=["2.0","3.0","3.1","3.2"],me={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function Tn(e){if(e===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(G(e))for(let t of new Set(tp)){let r=t==="2.0"?"swagger":"openapi",a=e[r];if(typeof a!="string")continue;let[s,i]=a.split(".");if(`${s}.${i}`===t)return{version:t,specificationType:r,specificationVersion:a}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function rt(e){return e?.find(t=>t.isEntrypoint)}function rp(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function On(e){return e.split("/").slice(1).map(rp)}var ap=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas"]),sp=new Set(["allOf","anyOf","oneOf","prefixItems"]),ip=new Set(["schema","items","additionalItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"]),np=new Set(["additionalOperations","webhooks","content","mediaTypes","headers","encoding","variables","parameters","requestBodies","securitySchemes","pathItems"]),op=new Set(["example","default","enum","const","dependentRequired"]),_n=(e,t,r)=>e==="literal"?"literal":e==="callbackMap"?"callback":e==="callback"?"object":e==="responseMap"||e==="paths"?t.startsWith("x-")?"literal":e==="paths"?"object":"response":e==="namedResponseMap"?"response":e==="schemaMap"?"schema":e==="objectMap"?"object":e==="linkMap"?"link":e==="exampleMap"?"example":t.startsWith("x-")||t==="scopes"||e==="discriminator"&&t==="mapping"||e==="link"&&(t==="requestBody"||t==="parameters")?"literal":t==="links"?"linkMap":t==="discriminator"?"discriminator":op.has(t)||e==="example"&&(t==="value"||t==="dataValue")?"literal":t==="examples"?e==="schema"||e==="response"||Array.isArray(r)?"literal":"exampleMap":ap.has(t)||sp.has(t)||t==="schemas"?"schemaMap":ip.has(t)?Array.isArray(r)?"schemaMap":"schema":t==="components"?"components":t==="paths"?"paths":t==="responses"?e==="components"||e==="document"?"namedResponseMap":"responseMap":t==="callbacks"?"callbackMap":np.has(t)?"objectMap":"object",Fn=e=>e==="document"||e==="link"||e==="object"||e==="schema"||e==="example"||e==="callback"||e==="response",qn=(e,t=[{fragment:"",context:"document"}])=>{let r=[],a=[],s=new WeakMap,i=({fragment:o,context:l})=>{try{let p=On(o).reduce((d,c)=>ne(d)&&Object.hasOwn(d,c)?d[c]:void 0,e);n(p,l)}catch{}},n=(o,l)=>{if(l==="literal"||!ne(o)||s.get(o)?.has(l))return;let p=s.get(o)??new Set;if(p.add(l),s.set(o,p),Fn(l)&&typeof o.$ref=="string"&&o.$ref){let[d,c=""]=o.$ref.split("#",2);d?r.push({filename:d,fragment:c,context:l}):a.push({fragment:c,context:l})}for(let[d,c]of Object.entries(o))n(c,_n(l,d,c))};for(let o of t)i(o);for(let o of a)i(o);return r},lp=e=>[...new Set(qn(e).map(({filename:t})=>t))];function ns(e){return e!==void 0&&Array.isArray(e)&&e.length>0&&e.some(t=>t.isEntrypoint===!0)}var os=Symbol.for("yaml.alias"),ls=Symbol.for("yaml.document"),Be=Symbol.for("yaml.map"),Rn=Symbol.for("yaml.pair"),Ee=Symbol.for("yaml.scalar"),xt=Symbol.for("yaml.seq"),fe=Symbol.for("yaml.node.type"),wt=e=>!!e&&typeof e=="object"&&e[fe]===os,Nr=e=>!!e&&typeof e=="object"&&e[fe]===ls,Qt=e=>!!e&&typeof e=="object"&&e[fe]===Be,Z=e=>!!e&&typeof e=="object"&&e[fe]===Rn,U=e=>!!e&&typeof e=="object"&&e[fe]===Ee,er=e=>!!e&&typeof e=="object"&&e[fe]===xt;function Y(e){if(e&&typeof e=="object")switch(e[fe]){case Be:case xt:return!0}return!1}function X(e){if(e&&typeof e=="object")switch(e[fe]){case os:case Be:case Ee:case xt:return!0}return!1}var jn=e=>(U(e)||Y(e))&&!!e.anchor,at=Symbol("break visit"),cp=Symbol("skip children"),tr=Symbol("remove node");function $t(e,t){let r=dp(t);Nr(e)?kt(null,e.contents,r,Object.freeze([e]))===tr&&(e.contents=null):kt(null,e,r,Object.freeze([]))}$t.BREAK=at,$t.SKIP=cp,$t.REMOVE=tr;function kt(e,t,r,a){let s=pp(e,t,r,a);if(X(s)||Z(s))return up(e,a,s),kt(e,s,r,a);if(typeof s!="symbol"){if(Y(t)){a=Object.freeze(a.concat(t));for(let i=0;i<t.items.length;++i){let n=kt(i,t.items[i],r,a);if(typeof n=="number")i=n-1;else{if(n===at)return at;n===tr&&(t.items.splice(i,1),--i)}}}else if(Z(t)){a=Object.freeze(a.concat(t));let i=kt("key",t.key,r,a);if(i===at)return at;i===tr&&(t.key=null);let n=kt("value",t.value,r,a);if(n===at)return at;n===tr&&(t.value=null)}}return s}function dp(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 pp(e,t,r,a){if(typeof r=="function")return r(e,t,a);if(Qt(t))return r.Map?.(e,t,a);if(er(t))return r.Seq?.(e,t,a);if(Z(t))return r.Pair?.(e,t,a);if(U(t))return r.Scalar?.(e,t,a);if(wt(t))return r.Alias?.(e,t,a)}function up(e,t,r){let a=t[t.length-1];if(Y(a))a.items[e]=r;else if(Z(a))e==="key"?a.key=r:a.value=r;else if(Nr(a))a.contents=r;else{let s=wt(a)?"alias":"scalar";throw Error(`Cannot replace node with ${s} parent`)}}var hp={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},mp=e=>e.replace(/[!,[\]{}]/g,t=>hp[t]),St=class je{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},je.defaultYaml,t),this.tags=Object.assign({},je.defaultTags,r)}clone(){let t=new je(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new je(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:je.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},je.defaultTags)}return t}add(t,r){this.atNextDocument&&=(this.yaml={explicit:je.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},je.defaultTags),!1);let a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;let[i,n]=a;return this.tags[i]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[i]=a;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let n=/^\d+\.\d+$/.test(i);return r(6,`Unsupported YAML version ${i}`,n),!1}}default:return r(0,`Unknown directive ${s}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let n=t.slice(2,-1);return n==="!"||n==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),n)}let[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||r(`The ${t} tag has no suffix`);let i=this.tags[a];if(i)try{return i+decodeURIComponent(s)}catch(n){return r(String(n)),null}return a==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,a]of Object.entries(this.tags))if(t.startsWith(a))return r+mp(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags),s;if(t&&a.length>0&&X(t.contents)){let i={};$t(t.contents,(n,o)=>{X(o)&&o.tag&&(i[o.tag]=!0)}),s=Object.keys(i)}else s=[];for(let[i,n]of a)i==="!!"&&n==="tag:yaml.org,2002:"||t&&!s.some(o=>o.startsWith(n))||r.push(`%TAG ${i} ${n}`);return r.join(`
`)}};St.defaultYaml={explicit:!1,version:"1.2"},St.defaultTags={"!!":"tag:yaml.org,2002:"};function In(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 Nn(e){let t=new Set;return $t(e,{Value(r,a){a.anchor&&t.add(a.anchor)}}),t}function Bn(e,t){for(let r=1;;++r){let a=`${e}${r}`;if(!t.has(a))return a}}function fp(e,t){let r=[],a=new Map,s=null;return{onAnchor:i=>{r.push(i),s??=Nn(e);let n=Bn(t,s);return s.add(n),n},setAnchors:()=>{for(let i of r){let n=a.get(i);if(typeof n=="object"&&n.anchor&&(U(n.node)||Y(n.node)))n.node.anchor=n.anchor;else{let o=Error("Failed to resolve repeated object (this should not happen)");throw o.source=i,o}}},sourceObjects:a}}function At(e,t,r,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,i=a.length;s<i;++s){let n=a[s],o=At(e,a,String(s),n);o===void 0?delete a[s]:o!==n&&(a[s]=o)}else if(a instanceof Map)for(let s of Array.from(a.keys())){let i=a.get(s),n=At(e,a,s,i);n===void 0?a.delete(s):n!==i&&a.set(s,n)}else if(a instanceof Set)for(let s of Array.from(a)){let i=At(e,a,s,s);i===void 0?a.delete(s):i!==s&&(a.delete(s),a.add(i))}else for(let[s,i]of Object.entries(a)){let n=At(e,a,s,i);n===void 0?delete a[s]:n!==i&&(a[s]=n)}return e.call(t,r,a)}function ge(e,t,r){if(Array.isArray(e))return e.map((a,s)=>ge(a,String(s),r));if(e&&typeof e.toJSON=="function"){if(!r||!jn(e))return e.toJSON(t,r);let a={aliasCount:0,count:1,res:void 0};r.anchors.set(e,a),r.onCreate=i=>{a.res=i,delete r.onCreate};let s=e.toJSON(t,r);return r.onCreate&&r.onCreate(s),s}return typeof e=="bigint"&&!r?.keep?Number(e):e}var cs=class{constructor(e){Object.defineProperty(this,fe,{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:r,onAnchor:a,reviver:s}={}){if(!Nr(e))throw TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},n=ge(this,"",i);if(typeof a=="function")for(let{count:o,res:l}of i.anchors.values())a(l,o);return typeof s=="function"?At(s,{"":n},"",n):n}},ds=class extends cs{constructor(e){super(os),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 r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],$t(e,{Node:(s,i)=>{(wt(i)||jn(i))&&r.push(i)}}),t&&(t.aliasResolveCache=r));let a;for(let s of r){if(s===this)break;s.anchor===this.source&&(a=s)}if(a&&t){let{anchors:s,doc:i,maxAliasCount:n}=t,o=s.get(a);if(o||=(ge(a,null,t),s.get(a)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(n>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Br(i,a,s)),o.count*o.aliasCount>n))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return a}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(a)}return t.anchors.get(r).res}toString(e,t,r){let a=`*${this.source}`;if(e){if(In(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(s)}if(e.implicitKey)return`${a} `}return a}};function Br(e,t,r){if(wt(t)){let a=t.resolve(e),s=r&&a&&r.get(a);return s?s.count*s.aliasCount:0}if(Y(t)){let a=0;for(let s of t.items){let i=Br(e,s,r);i>a&&(a=i)}return a}if(Z(t)){let a=Br(e,t.key,r),s=Br(e,t.value,r);return Math.max(a,s)}return 1}var Ln=e=>!e||typeof e!="function"&&typeof e!="object",j=class extends cs{constructor(e){super(Ee),this.value=e}toJSON(e,t){return t?.keep?this.value:ge(this.value,e,t)}toString(){return String(this.value)}};j.BLOCK_FOLDED="BLOCK_FOLDED",j.BLOCK_LITERAL="BLOCK_LITERAL",j.PLAIN="PLAIN",j.QUOTE_DOUBLE="QUOTE_DOUBLE",j.QUOTE_SINGLE="QUOTE_SINGLE";var gp="tag:yaml.org,2002:";function yp(e,t,r){if(t){let a=r.filter(i=>i.tag===t),s=a.find(i=>!i.format)??a[0];if(!s)throw Error(`Tag ${t} not found`);return s}return r.find(a=>a.identify?.(e)&&!a.format)}function rr(e,t,r){if(Nr(e)&&(e=e.contents),X(e))return e;if(Z(e)){let c=r.schema[Be].createNode?.(r.schema,null,r);return c.items.push(e),c}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:a,onAnchor:s,onTagObj:i,schema:n,sourceObjects:o}=r,l;if(a&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=s(e)),new ds(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=gp+t.slice(2));let p=yp(e,t,n.tags);if(!p){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let c=new j(e);return l&&(l.node=c),c}p=e instanceof Map?n[Be]:Symbol.iterator in Object(e)?n[xt]:n[Be]}i&&(i(p),delete r.onTagObj);let d=p?.createNode?p.createNode(r.schema,e,r):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(r.schema,e,r):new j(e);return t?d.tag=t:p.default||(d.tag=p.tag),l&&(l.node=d),d}function Lr(e,t,r){let a=r;for(let s=t.length-1;s>=0;--s){let i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let n=[];n[i]=a,a=n}else a=new Map([[i,a]])}return rr(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var ar=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Pn=class extends cs{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(r=>X(r)||Z(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ar(e))this.add(t);else{let[r,...a]=e,s=this.get(r,!0);if(Y(s))s.addIn(a,t);else if(s===void 0&&this.schema)this.set(r,Lr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let a=this.get(t,!0);if(Y(a))return a.deleteIn(r);throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...a]=e,s=this.get(r,!0);return a.length===0?!t&&U(s)?s.value:s:Y(s)?s.getIn(a,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Z(t))return!1;let r=t.value;return r==null||e&&U(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let a=this.get(t,!0);return Y(a)?a.hasIn(r):!1}setIn(e,t){let[r,...a]=e;if(a.length===0)this.set(r,t);else{let s=this.get(r,!0);if(Y(s))s.setIn(a,t);else if(s===void 0&&this.schema)this.set(r,Lr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}},bp=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Oe(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var st=(e,t,r)=>e.endsWith(`
`)?Oe(r,t):r.includes(`
`)?`
`+Oe(r,t):(e.endsWith(" ")?"":" ")+r,zn="flow",vp="block",xp="quoted";function Pr(e,t,r="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:i=20,onFold:n,onOverflow:o}={}){if(!s||s<0)return e;s<i&&(i=0);let l=Math.max(1+i,1+s-t.length);if(e.length<=l)return e;let p=[],d={},c=s-t.length;typeof a=="number"&&(a>s-Math.max(2,i)?p.push(0):c=s-a);let f,h,y=!1,u=-1,g=-1,v=-1;r==="block"&&(u=Mn(e,u,t.length),u!==-1&&(c=u+l));for(let A;A=e[u+=1];){if(r==="quoted"&&A==="\\"){switch(g=u,e[u+1]){case"x":u+=3;break;case"u":u+=5;break;case"U":u+=9;break;default:u+=1}v=u}if(A===`
`)r==="block"&&(u=Mn(e,u,t.length)),c=u+t.length+l,f=void 0;else{if(A===" "&&h&&h!==" "&&h!==`
`&&h!==" "){let b=e[u+1];b&&b!==" "&&b!==`
`&&b!==" "&&(f=u)}if(u>=c)if(f)p.push(f),c=f+l,f=void 0;else if(r==="quoted"){for(;h===" "||h===" ";)h=A,A=e[u+=1],y=!0;let b=u>v+1?u-2:g-1;if(d[b])return e;p.push(b),d[b]=!0,c=b+l,f=void 0}else y=!0}h=A}if(y&&o&&o(),p.length===0)return e;n&&n();let S=e.slice(0,p[0]);for(let A=0;A<p.length;++A){let b=p[A],w=p[A+1]||e.length;b===0?S=`
${t}${e.slice(0,w)}`:(r==="quoted"&&d[b]&&(S+=`${e[b]}\\`),S+=`
${t}${e.slice(b+1,w)}`)}return S}function Mn(e,t,r){let a=t,s=t+1,i=e[s];for(;i===" "||i===" ";)if(t<s+r)i=e[++t];else{do i=e[++t];while(i&&i!==`
`);a=t,s=t+1,i=e[s]}return a}var zr=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Mr=e=>/^(%|---|\.\.\.)/m.test(e);function wp(e,t,r){if(!t||t<0)return!1;let a=t-r,s=e.length;if(s<=a)return!1;for(let i=0,n=0;i<s;++i)if(e[i]===`
`){if(i-n>a)return!0;if(n=i+1,s-n<=a)return!1}return!0}function sr(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(Mr(e)?" ":""),n="",o=0;for(let l=0,p=r[l];p;p=r[++l])if(p===" "&&r[l+1]==="\\"&&r[l+2]==="n"&&(n+=r.slice(o,l)+"\\ ",l+=1,o=l,p="\\"),p==="\\")switch(r[l+1]){case"u":{n+=r.slice(o,l);let d=r.substr(l+2,4);switch(d){case"0000":n+="\\0";break;case"0007":n+="\\a";break;case"000b":n+="\\v";break;case"001b":n+="\\e";break;case"0085":n+="\\N";break;case"00a0":n+="\\_";break;case"2028":n+="\\L";break;case"2029":n+="\\P";break;default:d.substr(0,2)==="00"?n+="\\x"+d.substr(2):n+=r.substr(l,6)}l+=5,o=l+1}break;case"n":if(a||r[l+2]==='"'||r.length<s)l+=1;else{for(n+=r.slice(o,l)+`
`;r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"';)n+=`
`,l+=2;n+=i,r[l+2]===" "&&(n+="\\"),l+=1,o=l+1}break;default:l+=1}return n=o?n+r.slice(o):r,a?n:Pr(n,i,xp,zr(t,!1))}function ps(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return sr(e,t);let r=t.indent||(Mr(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${r}`)+"'";return t.implicitKey?a:Pr(a,r,zn,zr(t,!1))}function Et(e,t){let{singleQuote:r}=t.options,a;if(r===!1)a=sr;else{let s=e.includes('"'),i=e.includes("'");a=s&&!i?ps:i&&!s?sr:r?ps:sr}return a(e,t)}var us;try{us=RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{us=/\n+(?!\n|$)/g}function Ur({comment:e,type:t,value:r},a,s,i){let{blockQuote:n,commentString:o,lineWidth:l}=a.options;if(!n||/\n[\t ]+$/.test(r))return Et(r,a);let p=a.indent||(a.forceBlockIndent||Mr(r)?" ":""),d=n==="literal"?!0:n==="folded"||t===j.BLOCK_FOLDED?!1:t===j.BLOCK_LITERAL||!wp(r,l,p.length);if(!r)return d?`|
`:`>
`;let c,f;for(f=r.length;f>0;--f){let b=r[f-1];if(b!==`
`&&b!==" "&&b!==" ")break}let h=r.substring(f),y=h.indexOf(`
`);y===-1?c="-":r===h||y!==h.length-1?(c="+",i&&i()):c="",h&&=(r=r.slice(0,-h.length),h[h.length-1]===`
`&&(h=h.slice(0,-1)),h.replace(us,`$&${p}`));let u=!1,g,v=-1;for(g=0;g<r.length;++g){let b=r[g];if(b===" ")u=!0;else if(b===`
`)v=g;else break}let S=r.substring(0,v<g?v+1:g);S&&=(r=r.substring(S.length),S.replace(/\n+/g,`$&${p}`));let A=(u?p?"2":"1":"")+c;if(e&&(A+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!d){let b=r.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),w=!1,$=zr(a,!0);n!=="folded"&&t!==j.BLOCK_FOLDED&&($.onOverflow=()=>{w=!0});let E=Pr(`${S}${b}${h}`,p,vp,$);if(!w)return`>${A}
${p}${E}`}return r=r.replace(/\n+/g,`$&${p}`),`|${A}
${p}${S}${r}${h}`}function $p(e,t,r,a){let{type:s,value:i}=e,{actualString:n,implicitKey:o,indent:l,indentStep:p,inFlow:d}=t;if(o&&i.includes(`
`)||d&&/[[\]{},]/.test(i))return Et(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||d||!i.includes(`
`)?Et(i,t):Ur(e,t,r,a);if(!o&&!d&&s!==j.PLAIN&&i.includes(`
`))return Ur(e,t,r,a);if(Mr(i)){if(l==="")return t.forceBlockIndent=!0,Ur(e,t,r,a);if(o&&l===p)return Et(i,t)}let c=i.replace(/\n+/g,`$&
${l}`);if(n){let f=u=>u.default&&u.tag!=="tag:yaml.org,2002:str"&&u.test?.test(c),{compat:h,tags:y}=t.doc.schema;if(y.some(f)||h?.some(f))return Et(i,t)}return o?c:Pr(c,l,zn,zr(t,!1))}function hs(e,t,r,a){let{implicitKey:s,inFlow:i}=t,n=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==j.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(n.value)&&(o=j.QUOTE_DOUBLE);let l=d=>{switch(d){case j.BLOCK_FOLDED:case j.BLOCK_LITERAL:return s||i?Et(n.value,t):Ur(n,t,r,a);case j.QUOTE_DOUBLE:return sr(n.value,t);case j.QUOTE_SINGLE:return ps(n.value,t);case j.PLAIN:return $p(n,t,r,a);default:return null}},p=l(o);if(p===null){let{defaultKeyType:d,defaultStringType:c}=t.options,f=s&&d||c;if(p=l(f),p===null)throw Error(`Unsupported default string type ${f}`)}return p}function Un(e,t){let r=Object.assign({blockQuote:!0,commentString:bp,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),a;switch(r.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:a,options:r}}function kp(e,t){if(t.tag){let s=e.filter(i=>i.tag===t.tag);if(s.length>0)return s.find(i=>i.format===t.format)??s[0]}let r,a;if(U(t)){a=t.value;let s=e.filter(i=>i.identify?.(a));if(s.length>1){let i=s.filter(n=>n.test);i.length>0&&(s=i)}r=s.find(i=>i.format===t.format)??s.find(i=>!i.format)}else a=t,r=e.find(s=>s.nodeClass&&a instanceof s.nodeClass);if(!r){let s=a?.constructor?.name??(a===null?"null":typeof a);throw Error(`Tag not resolved for ${s} value`)}return r}function Sp(e,t,{anchors:r,doc:a}){if(!a.directives)return"";let s=[],i=(U(e)||Y(e))&&e.anchor;i&&In(i)&&(r.add(i),s.push(`&${i}`));let n=e.tag??(t.default?null:t.tag);return n&&s.push(a.directives.tagString(n)),s.join(" ")}function Dt(e,t,r,a){if(Z(e))return e.toString(t,r,a);if(wt(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 s,i=X(e)?e:t.doc.createNode(e,{onTagObj:l=>s=l});s??=kp(t.doc.schema.tags,i);let n=Sp(i,s,t);n.length>0&&(t.indentAtStart=(t.indentAtStart??0)+n.length+1);let o=typeof s.stringify=="function"?s.stringify(i,t,r,a):U(i)?hs(i,t,r,a):i.toString(t,r,a);return n?U(i)||o[0]==="{"||o[0]==="["?`${n} ${o}`:`${n}
${t.indent}${o}`:o}function Ap({key:e,value:t},r,a,s){let{allNullValues:i,doc:n,indent:o,indentStep:l,options:{commentString:p,indentSeq:d,simpleKeys:c}}=r,f=X(e)&&e.comment||null;if(c){if(f)throw Error("With simple keys, key nodes cannot have comments");if(Y(e)||!X(e)&&typeof e=="object")throw Error("With simple keys, collection cannot be used as a key value")}let h=!c&&(!e||f&&t==null&&!r.inFlow||Y(e)||(U(e)?e.type===j.BLOCK_FOLDED||e.type===j.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!h&&(c||!i),indent:o+l});let y=!1,u=!1,g=Dt(e,r,()=>y=!0,()=>u=!0);if(!h&&!r.inFlow&&g.length>1024){if(c)throw Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(r.inFlow){if(i||t==null)return y&&a&&a(),g===""?"?":h?`? ${g}`:g}else if(i&&!c||t==null&&h)return g=`? ${g}`,f&&!y?g+=st(g,r.indent,p(f)):u&&s&&s(),g;y&&(f=null),h?(f&&(g+=st(g,r.indent,p(f))),g=`? ${g}
${o}:`):(g=`${g}:`,f&&(g+=st(g,r.indent,p(f))));let v,S,A;X(t)?(v=!!t.spaceBefore,S=t.commentBefore,A=t.comment):(v=!1,S=null,A=null,t&&typeof t=="object"&&(t=n.createNode(t))),r.implicitKey=!1,!h&&!f&&U(t)&&(r.indentAtStart=g.length+1),u=!1,!d&&l.length>=2&&!r.inFlow&&!h&&er(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let b=!1,w=Dt(t,r,()=>b=!0,()=>u=!0),$=" ";if(f||v||S){if($=v?`
`:"",S){let E=p(S);$+=`
${Oe(E,r.indent)}`}w===""&&!r.inFlow?$===`
`&&A&&($=`
`):$+=`
${r.indent}`}else if(!h&&Y(t)){let E=w[0],T=w.indexOf(`
`),D=T!==-1,L=r.inFlow??t.flow??t.items.length===0;if(D||!L){let _=!1;if(D&&(E==="&"||E==="!")){let B=w.indexOf(" ");E==="&"&&B!==-1&&B<T&&w[B+1]==="!"&&(B=w.indexOf(" ",B+1)),(B===-1||T<B)&&(_=!0)}_||($=`
${r.indent}`)}}else(w===""||w[0]===`
`)&&($="");return g+=$+w,r.inFlow?b&&a&&a():A&&!b?g+=st(g,r.indent,p(A)):u&&s&&s(),g}function Em(e,t){}var Hr="<<",_e={identify:e=>e===Hr||typeof e=="symbol"&&e.description===Hr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new j(Symbol(Hr)),{addToJSMap:Hn}),stringify:()=>Hr},Ep=(e,t)=>(_e.identify(t)||U(t)&&(!t.type||t.type===j.PLAIN)&&_e.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===_e.tag&&r.default);function Hn(e,t,r){let a=Kn(e,r);if(er(a))for(let s of a.items)ms(e,t,s);else if(Array.isArray(a))for(let s of a)ms(e,t,s);else ms(e,t,a)}function ms(e,t,r){let a=Kn(e,r);if(!Qt(a))throw Error("Merge sources must be maps or map aliases");let s=a.toJSON(null,e,Map);for(let[i,n]of s)t instanceof Map?t.has(i)||t.set(i,n):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Kn(e,t){return e&&wt(t)?t.resolve(e.doc,e):t}function Wn(e,t,{key:r,value:a}){if(X(r)&&r.addToJSMap)r.addToJSMap(e,t,a);else if(Ep(e,r))Hn(e,t,a);else{let s=ge(r,"",e);if(t instanceof Map)t.set(s,ge(a,s,e));else if(t instanceof Set)t.add(s);else{let i=Dp(r,s,e),n=ge(a,i,e);i in t?Object.defineProperty(t,i,{value:n,writable:!0,enumerable:!0,configurable:!0}):t[i]=n}}return t}function Dp(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(X(e)&&r?.doc){let a=Un(r.doc,{});a.anchors=new Set;for(let i of r.anchors.keys())a.anchors.add(i.anchor);a.inFlow=!0,a.inStringifyKey=!0;let s=e.toString(a);if(!r.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),r.doc.options.logLevel,`${i}`,r.mapKeyWarned=!0}return s}return JSON.stringify(t)}function fs(e,t,r){return new pe(rr(e,void 0,r),rr(t,void 0,r))}var pe=class Xl{constructor(t,r=null){Object.defineProperty(this,fe,{value:Rn}),this.key=t,this.value=r}clone(t){let{key:r,value:a}=this;return X(r)&&(r=r.clone(t)),X(a)&&(a=a.clone(t)),new Xl(r,a)}toJSON(t,r){return Wn(r,r?.mapAsMap?new Map:{},this)}toString(t,r,a){return t?.doc?Ap(this,t,r,a):JSON.stringify(this)}};function Vn(e,t,r){return(t.inFlow??e.flow?Tp:Cp)(e,t,r)}function Cp({comment:e,items:t},r,{blockItemPrefix:a,flowChars:s,itemIndent:i,onChompKeep:n,onComment:o}){let{indent:l,options:{commentString:p}}=r,d=Object.assign({},r,{indent:i,type:null}),c=!1,f=[];for(let y=0;y<t.length;++y){let u=t[y],g=null;if(X(u))!c&&u.spaceBefore&&f.push(""),Kr(r,f,u.commentBefore,c),u.comment&&(g=u.comment);else if(Z(u)){let S=X(u.key)?u.key:null;S&&(!c&&S.spaceBefore&&f.push(""),Kr(r,f,S.commentBefore,c))}c=!1;let v=Dt(u,d,()=>g=null,()=>c=!0);g&&(v+=st(v,i,p(g))),c&&g&&(c=!1),f.push(a+v)}let h;if(f.length===0)h=s.start+s.end;else{h=f[0];for(let y=1;y<f.length;++y){let u=f[y];h+=u?`
${l}${u}`:`
`}}return e?(h+=`
`+Oe(p(e),l),o&&o()):c&&n&&n(),h}function Tp({items:e},t,{flowChars:r,itemIndent:a}){let{indent:s,indentStep:i,flowCollectionPadding:n,options:{commentString:o}}=t;a+=i;let l=Object.assign({},t,{indent:a,inFlow:!0,type:null}),p=!1,d=0,c=[];for(let y=0;y<e.length;++y){let u=e[y],g=null;if(X(u))u.spaceBefore&&c.push(""),Kr(t,c,u.commentBefore,!1),u.comment&&(g=u.comment);else if(Z(u)){let S=X(u.key)?u.key:null;S&&(S.spaceBefore&&c.push(""),Kr(t,c,S.commentBefore,!1),S.comment&&(p=!0));let A=X(u.value)?u.value:null;A?(A.comment&&(g=A.comment),A.commentBefore&&(p=!0)):u.value==null&&S?.comment&&(g=S.comment)}g&&(p=!0);let v=Dt(u,l,()=>g=null);p||=c.length>d||v.includes(`
`),y<e.length-1?v+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(p||=c.reduce((S,A)=>S+A.length+2,2)+(v.length+2)>t.options.lineWidth),p&&(v+=",")),g&&(v+=st(v,a,o(g))),c.push(v),d=c.length}let{start:f,end:h}=r;if(c.length===0)return f+h;if(!p){let y=c.reduce((u,g)=>u+g.length+2,2);p=t.options.lineWidth>0&&y>t.options.lineWidth}if(p){let y=f;for(let u of c)y+=u?`
${i}${s}${u}`:`
`;return`${y}
${s}${h}`}return`${f}${n}${c.join(" ")}${n}${h}`}function Kr({indent:e,options:{commentString:t}},r,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){let i=Oe(t(a),e);r.push(i.trimStart())}}function it(e,t){let r=U(t)?t.value:t;for(let a of e)if(Z(a)&&(a.key===t||a.key===r||U(a.key)&&a.key.value===r))return a}var ye=class extends Pn{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Be,e),this.items=[]}static from(e,t,r){let{keepUndefined:a,replacer:s}=r,i=new this(e),n=(o,l)=>{if(typeof s=="function")l=s.call(t,o,l);else if(Array.isArray(s)&&!s.includes(o))return;(l!==void 0||a)&&i.items.push(fs(o,l,r))};if(t instanceof Map)for(let[o,l]of t)n(o,l);else if(t&&typeof t=="object")for(let o of Object.keys(t))n(o,t[o]);return typeof e.sortMapEntries=="function"&&i.items.sort(e.sortMapEntries),i}add(e,t){let r;r=Z(e)?e:!e||typeof e!="object"||!("key"in e)?new pe(e,e?.value):new pe(e.key,e.value);let a=it(this.items,r.key),s=this.schema?.sortMapEntries;if(a){if(!t)throw Error(`Key ${r.key} already set`);U(a.value)&&Ln(r.value)?a.value.value=r.value:a.value=r.value}else if(s){let i=this.items.findIndex(n=>s(r,n)<0);i===-1?this.items.push(r):this.items.splice(i,0,r)}else this.items.push(r)}delete(e){let t=it(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=it(this.items,e)?.value;return(!t&&U(r)?r.value:r)??void 0}has(e){return!!it(this.items,e)}set(e,t){this.add(new pe(e,t),!0)}toJSON(e,t,r){let a=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(a);for(let s of this.items)Wn(t,a,s);return a}toString(e,t,r){if(!e)return JSON.stringify(this);for(let a of this.items)if(!Z(a))throw Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Vn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}},Ct={collection:"map",default:!0,nodeClass:ye,tag:"tag:yaml.org,2002:map",resolve(e,t){return Qt(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>ye.from(e,t,r)},nt=class extends Pn{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(xt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Wr(e);return typeof t=="number"&&this.items.splice(t,1).length>0}get(e,t){let r=Wr(e);if(typeof r!="number")return;let a=this.items[r];return!t&&U(a)?a.value:a}has(e){let t=Wr(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=Wr(e);if(typeof r!="number")throw Error(`Expected a valid index, not ${e}.`);let a=this.items[r];U(a)&&Ln(t)?a.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let a=0;for(let s of this.items)r.push(ge(s,String(a++),t));return r}toString(e,t,r){return e?Vn(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:a}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let i=0;for(let n of t){if(typeof a=="function"){let o=t instanceof Set?n:String(i++);n=a.call(t,o,n)}s.items.push(rr(n,void 0,r))}}return s}};function Wr(e){let t=U(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}var Tt={collection:"seq",default:!0,nodeClass:nt,tag:"tag:yaml.org,2002:seq",resolve(e,t){return er(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>nt.from(e,t,r)},Vr={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,a){return t=Object.assign({actualString:!0},t),hs(e,t,r,a)}},Jr={identify:e=>e==null,createNode:()=>new j(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new j(null),stringify:({source:e},t)=>typeof e=="string"&&Jr.test.test(e)?e:t.options.nullStr},gs={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new j(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){return e&&gs.test.test(e)&&t===(e[0]==="t"||e[0]==="T")?e:t?r.options.trueStr:r.options.falseStr}};function $e({format:e,minFractionDigits:t,tag:r,value:a}){if(typeof a=="bigint")return String(a);let s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let n=i.indexOf(".");n<0&&(n=i.length,i+=".");let o=t-(i.length-n-1);for(;o-- >0;)i+="0"}return i}var Jn={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:$e},Gn={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():$e(e)}},Zn={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 j(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:$e},Gr=e=>typeof e=="bigint"||Number.isInteger(e),ys=(e,t,r,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),r);function Yn(e,t,r){let{value:a}=e;return Gr(a)&&a>=0?r+a.toString(t):$e(e)}var Xn={identify:e=>Gr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>ys(e,2,8,r),stringify:e=>Yn(e,8,"0o")},Qn={identify:Gr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>ys(e,0,10,r),stringify:$e},eo={identify:e=>Gr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>ys(e,2,16,r),stringify:e=>Yn(e,16,"0x")},Op=[Ct,Tt,Vr,Jr,gs,Xn,Qn,eo,Jn,Gn,Zn];function to(e){return typeof e=="bigint"||Number.isInteger(e)}var Zr=({value:e})=>JSON.stringify(e),_p=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Zr},{identify:e=>e==null,createNode:()=>new j(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Zr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Zr},{identify:to,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>to(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:Zr}],Fp=[Ct,Tt].concat(_p,{default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),bs={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(r.length);for(let s=0;s<r.length;++s)a[s]=r.charCodeAt(s);return a}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},a,s,i){if(!r)return"";let n=r,o;if(typeof btoa=="function"){let l="";for(let p=0;p<n.length;++p)l+=String.fromCharCode(n[p]);o=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??=j.BLOCK_LITERAL,t!==j.QUOTE_DOUBLE){let l=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),p=Math.ceil(o.length/l),d=Array(p);for(let c=0,f=0;c<p;++c,f+=l)d[c]=o.substr(f,l);o=d.join(t===j.BLOCK_LITERAL?`
`:" ")}return hs({comment:e,type:t,value:o},a,s,i)}};function ro(e,t){if(er(e))for(let r=0;r<e.items.length;++r){let a=e.items[r];if(!Z(a)){if(Qt(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");let s=a.items[0]||new pe(new j(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
${s.key.commentBefore}`:a.commentBefore),a.comment){let i=s.value??s.key;i.comment=i.comment?`${a.comment}
${i.comment}`:a.comment}a=s}e.items[r]=Z(a)?a:new pe(a)}}else t("Expected a sequence for this tag");return e}function ao(e,t,r){let{replacer:a}=r,s=new nt(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let n of t){typeof a=="function"&&(n=a.call(t,String(i++),n));let o,l;if(Array.isArray(n))if(n.length===2)o=n[0],l=n[1];else throw TypeError(`Expected [key, value] tuple: ${n}`);else if(n&&n instanceof Object){let p=Object.keys(n);if(p.length===1)o=p[0],l=n[o];else throw TypeError(`Expected tuple with one key, not ${p.length} keys`)}else o=n;s.items.push(fs(o,l,r))}return s}var vs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ro,createNode:ao},Yr=class Ql extends nt{constructor(){super(),this.add=ye.prototype.add.bind(this),this.delete=ye.prototype.delete.bind(this),this.get=ye.prototype.get.bind(this),this.has=ye.prototype.has.bind(this),this.set=ye.prototype.set.bind(this),this.tag=Ql.tag}toJSON(t,r){if(!r)return super.toJSON(t);let a=new Map;r?.onCreate&&r.onCreate(a);for(let s of this.items){let i,n;if(Z(s)?(i=ge(s.key,"",r),n=ge(s.value,i,r)):i=ge(s,"",r),a.has(i))throw Error("Ordered maps must not include duplicate keys");a.set(i,n)}return a}static from(t,r,a){let s=ao(t,r,a),i=new this;return i.items=s.items,i}};Yr.tag="tag:yaml.org,2002:omap";var xs={collection:"seq",identify:e=>e instanceof Map,nodeClass:Yr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=ro(e,t),a=[];for(let{key:s}of r.items)U(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new Yr,r)},createNode:(e,t,r)=>Yr.from(e,t,r)};function so({value:e,source:t},r){return t&&(e?io:no).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var io={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 j(!0),stringify:so},no={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 j(!1),stringify:so},qp={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:$e},Rp={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():$e(e)}},jp={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 j(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let a=e.substring(r+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:$e},ir=e=>typeof e=="bigint"||Number.isInteger(e);function Xr(e,t,r,{intAsBigInt:a}){let s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let n=BigInt(e);return s==="-"?BigInt(-1)*n:n}let i=parseInt(e,r);return s==="-"?-1*i:i}function ws(e,t,r){let{value:a}=e;if(ir(a)){let s=a.toString(t);return a<0?"-"+r+s.substr(1):r+s}return $e(e)}var Ip={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Xr(e,2,2,r),stringify:e=>ws(e,2,"0b")},Np={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Xr(e,1,8,r),stringify:e=>ws(e,8,"0")},Bp={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Xr(e,0,10,r),stringify:$e},Lp={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Xr(e,2,16,r),stringify:e=>ws(e,16,"0x")},Qr=class ec extends ye{constructor(t){super(t),this.tag=ec.tag}add(t){let r;r=Z(t)?t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?new pe(t.key,null):new pe(t,null),it(this.items,r.key)||this.items.push(r)}get(t,r){let a=it(this.items,t);return!r&&Z(a)?U(a.key)?a.key.value:a.key:a}set(t,r){if(typeof r!="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let a=it(this.items,t);a&&!r?this.items.splice(this.items.indexOf(a),1):!a&&r&&this.items.push(new pe(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,a);throw Error("Set items must all have null values")}static from(t,r,a){let{replacer:s}=a,i=new this(t);if(r&&Symbol.iterator in Object(r))for(let n of r)typeof s=="function"&&(n=s.call(r,n,n)),i.items.push(fs(n,null,a));return i}};Qr.tag="tag:yaml.org,2002:set";var $s={collection:"map",identify:e=>e instanceof Set,nodeClass:Qr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Qr.from(e,t,r),resolve(e,t){if(Qt(e)){if(e.hasAllNullValues(!0))return Object.assign(new Qr,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ks(e,t){let r=e[0],a=r==="-"||r==="+"?e.substring(1):e,s=n=>t?BigInt(n):Number(n),i=a.replace(/_/g,"").split(":").reduce((n,o)=>n*s(60)+s(o),s(0));return r==="-"?s(-1)*i:i}function oo(e){let{value:t}=e,r=n=>n;if(typeof t=="bigint")r=n=>BigInt(n);else if(isNaN(t)||!isFinite(t))return $e(e);let a="";t<0&&(a="-",t*=r(-1));let s=r(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),a+i.map(n=>String(n).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var lo={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:r})=>ks(e,r),stringify:oo},co={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=>ks(e,!1),stringify:oo},ea={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(ea.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,a,s,i,n,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,p=Date.UTC(r,a-1,s,i||0,n||0,o||0,l),d=t[8];if(d&&d!=="Z"){let c=ks(d,!1);Math.abs(c)<30&&(c*=60),p-=6e4*c}return new Date(p)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},po=[Ct,Tt,Vr,Jr,io,no,Ip,Np,Bp,Lp,qp,Rp,jp,bs,_e,xs,vs,$s,lo,co,ea],uo=new Map([["core",Op],["failsafe",[Ct,Tt,Vr]],["json",Fp],["yaml11",po],["yaml-1.1",po]]),ho={binary:bs,bool:gs,float:Zn,floatExp:Gn,floatNaN:Jn,floatTime:co,int:Qn,intHex:eo,intOct:Xn,intTime:lo,map:Ct,merge:_e,null:Jr,omap:xs,pairs:vs,seq:Tt,set:$s,timestamp:ea},Pp={"tag:yaml.org,2002:binary":bs,"tag:yaml.org,2002:merge":_e,"tag:yaml.org,2002:omap":xs,"tag:yaml.org,2002:pairs":vs,"tag:yaml.org,2002:set":$s,"tag:yaml.org,2002:timestamp":ea};function Ss(e,t,r){let a=uo.get(t);if(a&&!e)return r&&!a.includes(_e)?a.concat(_e):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{let i=Array.from(uo.keys()).filter(n=>n!=="yaml11").map(n=>JSON.stringify(n)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(let i of e)s=s.concat(i);else typeof e=="function"&&(s=e(s.slice()));return r&&(s=s.concat(_e)),s.reduce((i,n)=>{let o=typeof n=="string"?ho[n]:n;if(!o){let l=JSON.stringify(n),p=Object.keys(ho).map(d=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${p}`)}return i.includes(o)||i.push(o),i},[])}var zp=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Mp=class tc{constructor({compat:t,customTags:r,merge:a,resolveKnownTags:s,schema:i,sortMapEntries:n,toStringDefaults:o}){this.compat=Array.isArray(t)?Ss(t,"compat"):t?Ss(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?Pp:{},this.tags=Ss(r,this.name,a),this.toStringOptions=o??null,Object.defineProperty(this,Be,{value:Ct}),Object.defineProperty(this,Ee,{value:Vr}),Object.defineProperty(this,xt,{value:Tt}),this.sortMapEntries=typeof n=="function"?n:n===!0?zp:null}clone(){let t=Object.create(tc.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Up(e,t){let r=[],a=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(r.push(l),a=!0):e.directives.docStart&&(a=!0)}a&&r.push("---");let s=Un(e,t),{commentString:i}=s.options;if(e.commentBefore){r.length!==1&&r.unshift("");let l=i(e.commentBefore);r.unshift(Oe(l,""))}let n=!1,o=null;if(e.contents){if(X(e.contents)){if(e.contents.spaceBefore&&a&&r.push(""),e.contents.commentBefore){let d=i(e.contents.commentBefore);r.push(Oe(d,""))}s.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>n=!0,p=Dt(e.contents,s,()=>o=null,l);o&&(p+=st(p,"",i(o))),(p[0]==="|"||p[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${p}`:r.push(p)}else r.push(Dt(e.contents,s));if(e.directives?.docEnd)if(e.comment){let l=i(e.comment);l.includes(`
`)?(r.push("..."),r.push(Oe(l,""))):r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;l&&n&&(l=l.replace(/^\n+/,"")),l&&((!n||o)&&r[r.length-1]!==""&&r.push(""),r.push(Oe(i(l),"")))}return r.join(`
`)+`
`}var mo=class rc{constructor(t,r,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fe,{value:ls});let s=null;typeof r=="function"||Array.isArray(r)?s=r:a===void 0&&r&&(a=r,r=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=i;let{version:n}=i;a?._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(n=this.directives.yaml.version)):this.directives=new St({version:n}),this.setSchema(n,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){let t=Object.create(rc.prototype,{[fe]:{value:ls}});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=X(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Ot(this.contents)&&this.contents.add(t)}addIn(t,r){Ot(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let a=Nn(this);t.anchor=!r||a.has(r)?Bn(r||"a",a):r}return new ds(t.anchor)}createNode(t,r,a){let s;if(typeof r=="function")t=r.call({"":t},"",t),s=r;else if(Array.isArray(r)){let g=r.filter(v=>typeof v=="number"||v instanceof String||v instanceof Number).map(String);g.length>0&&(r=r.concat(g)),s=r}else a===void 0&&r&&(a=r,r=void 0);let{aliasDuplicateObjects:i,anchorPrefix:n,flow:o,keepUndefined:l,onTagObj:p,tag:d}=a??{},{onAnchor:c,setAnchors:f,sourceObjects:h}=fp(this,n||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:c,onTagObj:p,replacer:s,schema:this.schema,sourceObjects:h},u=rr(t,d,y);return o&&Y(u)&&(u.flow=!0),f(),u}createPair(t,r,a={}){return new pe(this.createNode(t,null,a),this.createNode(r,null,a))}delete(t){return Ot(this.contents)?this.contents.delete(t):!1}deleteIn(t){return ar(t)?this.contents!=null&&(this.contents=null,!0):Ot(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Y(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return ar(t)?!r&&U(this.contents)?this.contents.value:this.contents:Y(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Y(this.contents)?this.contents.has(t):!1}hasIn(t){return ar(t)?this.contents!==void 0:Y(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=Lr(this.schema,[t],r):Ot(this.contents)&&this.contents.set(t,r)}setIn(t,r){ar(t)?this.contents=r:this.contents==null?this.contents=Lr(this.schema,Array.from(t),r):Ot(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new St({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new St({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{let s=JSON.stringify(t);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(a)this.schema=new Mp(Object.assign(a,r));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:a,maxAliasCount:s,onAnchor:i,reviver:n}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=ge(this.contents,r??"",o);if(typeof i=="function")for(let{count:p,res:d}of o.anchors.values())i(d,p);return typeof n=="function"?At(n,{"":l},"",l):l}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw Error(`"indent" option must be a positive integer, not ${r}`)}return Up(this,t)}};function Ot(e){if(Y(e))return!0;throw Error("Expected a YAML collection as document contents")}var fo=class extends Error{constructor(e,t,r,a){super(),this.name=e,this.code=r,this.message=a,this.pos=t}},nr=class extends fo{constructor(e,t,r){super("YAMLParseError",e,t,r)}},Hp=class extends fo{constructor(e,t,r){super("YAMLWarning",e,t,r)}},go=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:a,col:s}=r.linePos[0];r.message+=` at line ${a}, column ${s}`;let i=s-1,n=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(i>=60&&n.length>80){let o=Math.min(i-39,n.length-79);n="\u2026"+n.substring(o),i-=o-1}if(n.length>80&&(n=n.substring(0,79)+"\u2026"),a>1&&/^ *$/.test(n.substring(0,i))){let o=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
`),n=o+n}if(/[^ ]/.test(n)){let o=1,l=r.linePos[1];l?.line===a&&l.col>s&&(o=Math.max(1,Math.min(l.col-s,80-i)));let p=" ".repeat(i)+"^".repeat(o);r.message+=`:
${n}
${p}
`}};function _t(e,{flow:t,indicator:r,next:a,offset:s,onError:i,parentIndent:n,startOnNewline:o}){let l=!1,p=o,d=o,c="",f="",h=!1,y=!1,u=null,g=null,v=null,S=null,A=null,b=null,w=null;for(let T of e)switch(y&&=(T.type!=="space"&&T.type!=="newline"&&T.type!=="comma"&&i(T.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),!1),u&&=(p&&T.type!=="comment"&&T.type!=="newline"&&i(u,"TAB_AS_INDENT","Tabs are not allowed as indentation"),null),T.type){case"space":!t&&(r!=="doc-start"||a?.type!=="flow-collection")&&T.source.includes(" ")&&(u=T),d=!0;break;case"comment":{d||i(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=T.source.substring(1)||" ";c?c+=f+D:c=D,f="",p=!1;break}case"newline":p?c?c+=T.source:b&&r==="seq-item-ind"||(l=!0):f+=T.source,p=!0,h=!0,(g||v)&&(S=T),d=!0;break;case"anchor":g&&i(T,"MULTIPLE_ANCHORS","A node can have at most one anchor"),T.source.endsWith(":")&&i(T.offset+T.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=T,w??=T.offset,p=!1,d=!1,y=!0;break;case"tag":v&&i(T,"MULTIPLE_TAGS","A node can have at most one tag"),v=T,w??=T.offset,p=!1,d=!1,y=!0;break;case r:(g||v)&&i(T,"BAD_PROP_ORDER",`Anchors and tags must be after the ${T.source} indicator`),b&&i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.source} in ${t??"collection"}`),b=T,p=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){A&&i(T,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=T,p=!1,d=!1;break}default:i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.type} token`),p=!1,d=!1}let $=e[e.length-1],E=$?$.offset+$.source.length:s;return y&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&i(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),u&&(p&&u.indent<=n||a?.type==="block-map"||a?.type==="block-seq")&&i(u,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:b,spaceBefore:l,comment:c,hasNewline:h,anchor:g,tag:v,newlineAfterProp:S,end:E,start:w??E}}function or(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
`))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 r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(or(t.key)||or(t.value))return!0}return!1;default:return!0}}function As(e,t,r){if(t?.type==="flow-collection"){let a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&or(t)&&r(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function yo(e,t,r){let{uniqueKeys:a}=e.options;if(a===!1)return!1;let s=typeof a=="function"?a:(i,n)=>i===n||U(i)&&U(n)&&i.value===n.value;return t.some(i=>s(i.key,r))}var bo="All mapping items must start at the same column";function Kp({composeNode:e,composeEmptyNode:t},r,a,s,i){let n=new(i?.nodeClass??ye)(r.schema);r.atRoot&&=!1;let o=a.offset,l=null;for(let p of a.items){let{start:d,key:c,sep:f,value:h}=p,y=_t(d,{indicator:"explicit-key-ind",next:c??f?.[0],offset:o,onError:s,parentIndent:a.indent,startOnNewline:!0}),u=!y.found;if(u){if(c&&(c.type==="block-seq"?s(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in c&&c.indent!==a.indent&&s(o,"BAD_INDENT",bo)),!y.anchor&&!y.tag&&!f){l=y.end,y.comment&&(n.comment?n.comment+=`
`+y.comment:n.comment=y.comment);continue}(y.newlineAfterProp||or(c))&&s(c??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else y.found?.indent!==a.indent&&s(o,"BAD_INDENT",bo);r.atKey=!0;let g=y.end,v=c?e(r,c,y,s):t(r,g,d,null,y,s);r.schema.compat&&As(a.indent,c,s),r.atKey=!1,yo(r,n.items,v)&&s(g,"DUPLICATE_KEY","Map keys must be unique");let S=_t(f??[],{indicator:"map-value-ind",next:h,offset:v.range[2],onError:s,parentIndent:a.indent,startOnNewline:!c||c.type==="block-scalar"});if(o=S.end,S.found){u&&(h?.type==="block-map"&&!S.hasNewline&&s(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&y.start<S.found.offset-1024&&s(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let A=h?e(r,h,S,s):t(r,o,f,null,S,s);r.schema.compat&&As(a.indent,h,s),o=A.range[2];let b=new pe(v,A);r.options.keepSourceTokens&&(b.srcToken=p),n.items.push(b)}else{u&&s(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(v.comment?v.comment+=`
`+S.comment:v.comment=S.comment);let A=new pe(v);r.options.keepSourceTokens&&(A.srcToken=p),n.items.push(A)}}return l&&l<o&&s(l,"IMPOSSIBLE","Map comment with trailing content"),n.range=[a.offset,o,l??o],n}function Wp({composeNode:e,composeEmptyNode:t},r,a,s,i){let n=new(i?.nodeClass??nt)(r.schema);r.atRoot&&=!1,r.atKey&&=!1;let o=a.offset,l=null;for(let{start:p,value:d}of a.items){let c=_t(p,{indicator:"seq-item-ind",next:d,offset:o,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!c.found)if(c.anchor||c.tag||d)d?.type==="block-seq"?s(c.end,"BAD_INDENT","All sequence items must start at the same column"):s(o,"MISSING_CHAR","Sequence item without - indicator");else{l=c.end,c.comment&&(n.comment=c.comment);continue}let f=d?e(r,d,c,s):t(r,c.end,p,null,c,s);r.schema.compat&&As(a.indent,d,s),o=f.range[2],n.items.push(f)}return n.range=[a.offset,o,l??o],n}function lr(e,t,r,a){let s="";if(e){let i=!1,n="";for(let o of e){let{source:l,type:p}=o;switch(p){case"space":i=!0;break;case"comment":{r&&!i&&a(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";s?s+=n+d:s=d,n="";break}case"newline":s&&(n+=l),i=!0;break;default:a(o,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}t+=l.length}}return{comment:s,offset:t}}var Es="Block collections are not allowed within flow collections",Ds=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Vp({composeNode:e,composeEmptyNode:t},r,a,s,i){let n=a.start.source==="{",o=n?"flow map":"flow sequence",l=new(i?.nodeClass??(n?ye:nt))(r.schema);l.flow=!0;let p=r.atRoot;p&&(r.atRoot=!1),r.atKey&&=!1;let d=a.offset+a.start.source.length;for(let u=0;u<a.items.length;++u){let g=a.items[u],{start:v,key:S,sep:A,value:b}=g,w=_t(v,{flow:o,indicator:"explicit-key-ind",next:S??A?.[0],offset:d,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!A&&!b){u===0&&w.comma?s(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):u<a.items.length-1&&s(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),w.comment&&(l.comment?l.comment+=`
`+w.comment:l.comment=w.comment),d=w.end;continue}!n&&r.options.strict&&or(S)&&s(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(u===0)w.comma&&s(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(w.comma||s(w.start,"MISSING_CHAR",`Missing , between ${o} items`),w.comment){let $="";e:for(let E of v)switch(E.type){case"comma":case"space":break;case"comment":$=E.source.substring(1);break e;default:break e}if($){let E=l.items[l.items.length-1];Z(E)&&(E=E.value??E.key),E.comment?E.comment+=`
`+$:E.comment=$,w.comment=w.comment.substring($.length+1)}}if(!n&&!A&&!w.found){let $=b?e(r,b,w,s):t(r,w.end,A,null,w,s);l.items.push($),d=$.range[2],Ds(b)&&s($.range,"BLOCK_IN_FLOW",Es)}else{r.atKey=!0;let $=w.end,E=S?e(r,S,w,s):t(r,$,v,null,w,s);Ds(S)&&s(E.range,"BLOCK_IN_FLOW",Es),r.atKey=!1;let T=_t(A??[],{flow:o,indicator:"map-value-ind",next:b,offset:E.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(T.found){if(!n&&!w.found&&r.options.strict){if(A)for(let _ of A){if(_===T.found)break;if(_.type==="newline"){s(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<T.found.offset-1024&&s(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else b&&("source"in b&&b.source?.[0]===":"?s(b,"MISSING_CHAR",`Missing space after : in ${o}`):s(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let D=b?e(r,b,T,s):T.found?t(r,T.end,A,null,T,s):null;D?Ds(b)&&s(D.range,"BLOCK_IN_FLOW",Es):T.comment&&(E.comment?E.comment+=`
`+T.comment:E.comment=T.comment);let L=new pe(E,D);if(r.options.keepSourceTokens&&(L.srcToken=g),n){let _=l;yo(r,_.items,E)&&s($,"DUPLICATE_KEY","Map keys must be unique"),_.items.push(L)}else{let _=new ye(r.schema);_.flow=!0,_.items.push(L);let B=(D??E).range;_.range=[E.range[0],B[1],B[2]],l.items.push(_)}d=D?D.range[2]:T.end}}let c=n?"}":"]",[f,...h]=a.end,y=d;if(f?.source===c)y=f.offset+f.source.length;else{let u=o[0].toUpperCase()+o.substring(1),g=p?`${u} must end with a ${c}`:`${u} in block collection must be sufficiently indented and end with a ${c}`;s(d,p?"MISSING_CHAR":"BAD_INDENT",g),f&&f.source.length!==1&&h.unshift(f)}if(h.length>0){let u=lr(h,y,r.options.strict,s);u.comment&&(l.comment?l.comment+=`
`+u.comment:l.comment=u.comment),l.range=[a.offset,y,u.offset]}else l.range=[a.offset,y,y];return l}function Cs(e,t,r,a,s,i){let n=r.type==="block-map"?Kp(e,t,r,a,i):r.type==="block-seq"?Wp(e,t,r,a,i):Vp(e,t,r,a,i),o=n.constructor;return s==="!"||s===o.tagName?(n.tag=o.tagName,n):(s&&(n.tag=s),n)}function Jp(e,t,r,a,s){let i=a.tag,n=i?t.directives.tagName(i.source,f=>s(i,"TAG_RESOLVE_FAILED",f)):null;if(r.type==="block-seq"){let{anchor:f,newlineAfterProp:h}=a,y=f&&i?f.offset>i.offset?f:i:f??i;y&&(!h||h.offset<y.offset)&&s(y,"MISSING_CHAR","Missing newline after block sequence props")}let o=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!i||!n||n==="!"||n===ye.tagName&&o==="map"||n===nt.tagName&&o==="seq")return Cs(e,t,r,s,n);let l=t.schema.tags.find(f=>f.tag===n&&f.collection===o);if(!l){let f=t.schema.knownTags[n];if(f?.collection===o)t.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?s(i,"BAD_COLLECTION_TYPE",`${f.tag} used for ${o} collection, but expects ${f.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,!0),Cs(e,t,r,s,n)}let p=Cs(e,t,r,s,n,l),d=l.resolve?.(p,f=>s(i,"TAG_RESOLVE_FAILED",f),t.options)??p,c=X(d)?d:new j(d);return c.range=p.range,c.tag=n,l?.format&&(c.format=l.format),c}function Gp(e,t,r){let a=t.offset,s=Zp(t,e.options.strict,r);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};let i=s.mode===">"?j.BLOCK_FOLDED:j.BLOCK_LITERAL,n=t.source?Yp(t.source):[],o=n.length;for(let u=n.length-1;u>=0;--u){let g=n[u][1];if(g===""||g==="\r")o=u;else break}if(o===0){let u=s.chomp==="+"&&n.length>0?`
`.repeat(Math.max(1,n.length-1)):"",g=a+s.length;return t.source&&(g+=t.source.length),{value:u,type:i,comment:s.comment,range:[a,g,g]}}let l=t.indent+s.indent,p=t.offset+s.length,d=0;for(let u=0;u<o;++u){let[g,v]=n[u];if(v===""||v==="\r")s.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&r(p+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=g.length),d=u,l===0&&!e.atRoot&&r(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=g.length+v.length+1}for(let u=n.length-1;u>=o;--u)n[u][0].length>l&&(o=u+1);let c="",f="",h=!1;for(let u=0;u<d;++u)c+=n[u][0].slice(l)+`
`;for(let u=d;u<o;++u){let[g,v]=n[u];p+=g.length+v.length+1;let S=v[v.length-1]==="\r";if(S&&(v=v.slice(0,-1)),v&&g.length<l){let A=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;r(p-v.length-(S?2:1),"BAD_INDENT",A),g=""}i===j.BLOCK_LITERAL?(c+=f+g.slice(l)+v,f=`
`):g.length>l||v[0]===" "?(f===" "?f=`
`:!h&&f===`
`&&(f=`
`),c+=f+g.slice(l)+v,f=`
`,h=!0):v===""?f===`
`?c+=`
`:f=`
`:(c+=f+v,f=" ",h=!1)}switch(s.chomp){case"-":break;case"+":for(let u=o;u<n.length;++u)c+=`
`+n[u][0].slice(l);c[c.length-1]!==`
`&&(c+=`
`);break;default:c+=`
`}let y=a+s.length+t.source.length;return{value:c,type:i,comment:s.comment,range:[a,y,y]}}function Zp({offset:e,props:t},r,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],i=s[0],n=0,o="",l=-1;for(let f=1;f<s.length;++f){let h=s[f];if(!o&&(h==="-"||h==="+"))o=h;else{let y=Number(h);!n&&y?n=y:l===-1&&(l=e+f)}}l!==-1&&a(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let p=!1,d="",c=s.length;for(let f=1;f<t.length;++f){let h=t[f];switch(h.type){case"space":p=!0;case"newline":c+=h.source.length;break;case"comment":r&&!p&&a(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),c+=h.source.length,d=h.source.substring(1);break;case"error":a(h,"UNEXPECTED_TOKEN",h.message),c+=h.source.length;break;default:{a(h,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${h.type}`);let y=h.source;y&&typeof y=="string"&&(c+=y.length)}}}return{mode:i,indent:n,chomp:o,comment:d,length:c}}function Yp(e){let t=e.split(/\n( *)/),r=t[0],a=r.match(/^( *)/),s=[a?.[1]?[a[1],r.slice(a[1].length)]:["",r]];for(let i=1;i<t.length;i+=2)s.push([t[i],t[i+1]]);return s}function Xp(e,t,r){let{offset:a,type:s,source:i,end:n}=e,o,l,p=(f,h,y)=>r(a+f,h,y);switch(s){case"scalar":o=j.PLAIN,l=Qp(i,p);break;case"single-quoted-scalar":o=j.QUOTE_SINGLE,l=eu(i,p);break;case"double-quoted-scalar":o=j.QUOTE_DOUBLE,l=tu(i,p);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+i.length,a+i.length]}}let d=a+i.length,c=lr(n,d,t,r);return{value:l,type:o,comment:c.comment,range:[a,d,c.offset]}}function Qp(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),vo(e)}function eu(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),vo(e.slice(1,-1)).replace(/''/g,"'")}function vo(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let a,s;try{a=RegExp("(?<![ ])[ ]+$"),s=RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{a=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let i=r[1].replace(a,""),n=" ",o=t.lastIndex;for(;r=t.exec(e);){let p=r[1].replace(s,"");p===""?n===`
`?i+=n:n=`
`:(i+=n+p,n=" "),o=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=o,r=l.exec(e),i+n+(r?.[1]??"")}function tu(e,t){let r="";for(let a=1;a<e.length-1;++a){let s=e[a];if(s!=="\r"||e[a+1]!==`
`)if(s===`
`){let{fold:i,offset:n}=ru(e,a);r+=i,a=n}else if(s==="\\"){let i=e[++a],n=au[i];if(n)r+=n;else if(i===`
`)for(i=e[a+1];i===" "||i===" ";)i=e[++a+1];else if(i==="\r"&&e[a+1]===`
`)for(i=e[++a+1];i===" "||i===" ";)i=e[++a+1];else if(i==="x"||i==="u"||i==="U"){let o=i==="x"?2:i==="u"?4:8;r+=su(e,a+1,o,t),a+=o}else{let o=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(s===" "||s===" "){let i=a,n=e[a+1];for(;n===" "||n===" ";)n=e[++a+1];n!==`
`&&(n!=="\r"||e[a+2]!==`
`)&&(r+=a>i?e.slice(i,a+1):s)}else r+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function ru(e,t){let r="",a=e[t+1];for(;(a===" "||a===" "||a===`
`||a==="\r")&&(a!=="\r"||e[t+2]===`
`);)a===`
`&&(r+=`
`),t+=1,a=e[t+1];return r||=" ",{fold:r,offset:t}}var au={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function su(e,t,r,a){let s=e.substr(t,r),i=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(i)}catch{let n=e.substr(t-2,r+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${n}`),n}}function xo(e,t,r,a){let{value:s,type:i,comment:n,range:o}=t.type==="block-scalar"?Gp(e,t,a):Xp(t,e.options.strict,a),l=r?e.directives.tagName(r.source,c=>a(r,"TAG_RESOLVE_FAILED",c)):null,p;p=e.options.stringKeys&&e.atKey?e.schema[Ee]:l?iu(e.schema,s,l,r,a):t.type==="scalar"?nu(e,s,t,a):e.schema[Ee];let d;try{let c=p.resolve(s,f=>a(r??t,"TAG_RESOLVE_FAILED",f),e.options);d=U(c)?c:new j(c)}catch(c){let f=c instanceof Error?c.message:String(c);a(r??t,"TAG_RESOLVE_FAILED",f),d=new j(s)}return d.range=o,d.source=s,i&&(d.type=i),l&&(d.tag=l),p.format&&(d.format=p.format),n&&(d.comment=n),d}function iu(e,t,r,a,s){if(r==="!")return e[Ee];let i=[];for(let o of e.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)i.push(o);else return o;for(let o of i)if(o.test?.test(t))return o;let n=e.knownTags[r];return n&&!n.collection?(e.tags.push(Object.assign({},n,{default:!1,test:void 0})),n):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Ee])}function nu({atKey:e,directives:t,schema:r},a,s,i){let n=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(a))||r[Ee];if(r.compat){let o=r.compat.find(l=>l.default&&l.test?.test(a))??r[Ee];n.tag!==o.tag&&i(s,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(n.tag)} or ${t.tagString(o.tag)}`,!0)}return n}function ou(e,t,r){if(t){r??=t.length;for(let a=r-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];s?.type==="space";)e+=s.source.length,s=t[++a];break}}return e}var lu={composeNode:wo,composeEmptyNode:Ts};function wo(e,t,r,a){let s=e.atKey,{spaceBefore:i,comment:n,anchor:o,tag:l}=r,p,d=!0;switch(t.type){case"alias":p=cu(e,t,a),(o||l)&&a(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":p=xo(e,t,l,a),o&&(p.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=Jp(lu,e,t,r,a),o&&(p.anchor=o.source.substring(1))}catch(c){a(t,"RESOURCE_EXHAUSTION",c instanceof Error?c.message:String(c))}break;default:a(t,"UNEXPECTED_TOKEN",t.type==="error"?t.message:`Unsupported token (type: ${t.type})`),d=!1}return p??=Ts(e,t.offset,void 0,null,r,a),o&&p.anchor===""&&a(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!U(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&a(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(p.spaceBefore=!0),n&&(t.type==="scalar"&&t.source===""?p.comment=n:p.commentBefore=n),e.options.keepSourceTokens&&d&&(p.srcToken=t),p}function Ts(e,t,r,a,{spaceBefore:s,comment:i,anchor:n,tag:o,end:l},p){let d=xo(e,{type:"scalar",offset:ou(t,r,a),indent:-1,source:""},o,p);return n&&(d.anchor=n.source.substring(1),d.anchor===""&&p(n,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(d.spaceBefore=!0),i&&(d.comment=i,d.range[2]=l),d}function cu({options:e},{offset:t,source:r,end:a},s){let i=new ds(r.substring(1));i.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let n=t+r.length,o=lr(a,n,e.strict,s);return i.range=[t,n,o.offset],o.comment&&(i.comment=o.comment),i}function du(e,t,{offset:r,start:a,value:s,end:i},n){let o=new mo(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},p=_t(a,{indicator:"doc-start",next:s??i?.[0],offset:r,onError:n,parentIndent:0,startOnNewline:!0});p.found&&(o.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!p.hasNewline&&n(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=s?wo(l,s,p,n):Ts(l,p.end,a,null,p,n);let d=o.contents.range[2],c=lr(i,d,!1,n);return c.comment&&(o.comment=c.comment),o.range=[r,d,c.offset],o}function cr(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:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function $o(e){let t="",r=!1,a=!1;for(let s=0;s<e.length;++s){let i=e[s];switch(i[0]){case"#":t+=(t===""?"":a?`
`:`
`)+(i.substring(1)||" "),r=!0,a=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),r=!1;break;default:r||(a=!0),r=!1}}return{comment:t,afterEmptyLine:a}}var pu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,a,s)=>{let i=cr(t);s?this.warnings.push(new Hp(i,r,a)):this.errors.push(new nr(i,r,a))},this.directives=new St({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:a}=$o(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
${r}`:r;else if(a||e.directives.docStart||!s)e.commentBefore=r;else if(Y(s)&&!s.flow&&s.items.length>0){let i=s.items[0];Z(i)&&(i=i.key);let n=i.commentBefore;i.commentBefore=n?`${r}
${n}`:r}else{let i=s.commentBefore;s.commentBefore=i?`${r}
${i}`:r}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:$o(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let a of e)yield*this.next(a);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,a)=>{let s=cr(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=du(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,r=new nr(cr(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new nr(cr(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=lr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new nr(cr(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 r=new mo(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Os=Symbol("break visit"),uu=Symbol("skip children"),ko=Symbol("remove item");function Ft(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),So(Object.freeze([]),e,t)}Ft.BREAK=Os,Ft.SKIP=uu,Ft.REMOVE=ko,Ft.itemAtPath=(e,t)=>{let r=e;for(let[a,s]of t){let i=r?.[a];if(i&&"items"in i)r=i.items[s];else return}return r},Ft.parentCollection=(e,t)=>{let r=Ft.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=r?.[a];if(s&&"items"in s)return s;throw Error("Parent collection not found")};function So(e,t,r){let a=r(t,e);if(typeof a=="symbol")return a;for(let s of["key","value"]){let i=t[s];if(i&&"items"in i){for(let n=0;n<i.items.length;++n){let o=So(Object.freeze(e.concat([[s,n]])),i.items[n],r);if(typeof o=="number")n=o-1;else{if(o===Os)return Os;o===ko&&(i.items.splice(n,1),--n)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}function hu(e){switch(e){case"\uFEFF":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`: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 ke(e){switch(e){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var Ao=new Set("0123456789ABCDEFabcdef"),mu=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ta=new Set(",[]{}"),fu=new Set(` ,[]{}
\r `),_s=e=>!e||fu.has(e),gu=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 r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
`||t==="\r"&&this.buffer[e+1]===`
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let a=this.buffer[r+e+1];if(a===`
`||!a&&!this.atEnd)return e+r+1}return t===`
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ke(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(`
`,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]==="\uFEFF"&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")--t;else break}let a=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),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 t=this.peek(3);if((t==="---"||t==="...")&&ke(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ke(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===":")&&ke(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"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(_s),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&ke(a[3]))&&(r!==this.indentNext-1||this.flowLevel!==1||a[0]!=="]"&&a[0]!=="}"))return this.flowLevel=0,yield"",yield*this.parseLineStart();let s=0;for(;a[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),a[s]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(_s),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let i=this.charAt(1);if(this.flowKey||ke(i)||i===",")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 s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2==0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),a=r.indexOf(`
`,this.pos);if(a!==-1){for(;a!==-1;){let s=this.continueScalar(a+1);if(s===-1)break;a=r.indexOf(`
`,s)}a!==-1&&(t=a-(r[a-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(t=>ke(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
`:e=s,t=0;break;case"\r":{let i=this.buffer[s+1];if(!i&&!this.atEnd)return this.setNext("block-scalar");if(i===`
`)break}default:break e}if(!r&&!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 s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
`;)r=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let s=e-1,i=this.buffer[s];i==="\r"&&(i=this.buffer[--s]);let n=s;for(;i===" ";)i=this.buffer[--s];if(i===`
`&&s>=this.pos&&s+1+t>n)e=s;else break}while(!0);return yield"",yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){let s=this.buffer[r+1];if(ke(s)||e&&ta.has(s))break;t=r}else if(ke(a)){let s=this.buffer[r+1];if(a==="\r"&&(s===`
`?(r+=1,a=`
`,s=this.buffer[r+1]):t=r),s==="#"||e&&ta.has(s))break;if(a===`
`){let i=this.continueScalar(r+1);if(i===-1)break;r=Math.max(r,i-2)}}else{if(e&&ta.has(a))break;t=r}return!a&&!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 r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(_s),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(ke(r)||t&&ta.has(r)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!ke(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(mu.has(t))t=this.buffer[++e];else if(t==="%"&&Ao.has(this.buffer[e+1])&&Ao.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===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let a=t-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=t),a}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},yu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let a=this.lineStarts[t-1];return{line:t,col:e-a+1}}}};function Le(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Eo(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 Do(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 ra(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 qt(e){if(e.length===0)return[];let t=e.length;e: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 e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function aa(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Co(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!Le(t.start,"explicit-key-ind")&&!Le(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Do(t.value)?t.value.end?aa(t.value.end,t.sep):t.value.end=t.sep:aa(t.start,t.sep),delete t.sep)}var bu=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 gu,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);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=hu(e);if(t)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}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){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})}else{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 r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Co(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(a.sep)a.value=t;else{Object.assign(a,{key:t,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{let a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:t}):a.value=t;break}case"flow-collection":{let a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:t,sep:[]}):a.sep?a.value=t:Object.assign(a,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let a=t.items[t.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Eo(a.start)===-1&&(t.indent===0||a.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.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":Eo(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=qt(ra(this.peek(2))),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}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 t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+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 r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){aa(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,a=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(a&&t.sep&&!t.value){let i=[];for(let n=0;n<t.sep.length;++n){let o=t.sep[n];switch(o.type){case"newline":i.push(n);break;case"space":break;case"comment":o.indent>e.indent&&(i.length=0);break;default:i.length=0}}i.length>=2&&(s=t.sep.splice(i[1]))}switch(this.type){case"anchor":case"tag":a||t.value?(s.push(this.sourceToken),e.items.push({start:s}),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):a||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Le(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Do(t.key)&&!Le(t.sep,"newline")){let i=qt(t.start),n=t.key,o=t.sep;o.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:n,sep:o}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Le(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let i=qt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||a?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Le(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 i=this.flowScalar(this.type);a||t.value?(e.items.push({start:s,key:i,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(i):(Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!0);return}default:{let i=this.startBlockValue(e);if(i){if(i.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Le(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 r&&e.items.push({start:s});this.stack.push(i);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 r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){aa(r,t.start),r.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||Le(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.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 a=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:a,sep:[]}):t.sep?this.stack.push(a):Object.assign(t,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let a=qt(ra(r));Co(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:a,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+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=qt(ra(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=qt(ra(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(r=>r.type==="newline"||r.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 vu(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new yu||null,prettyErrors:t}}function xu(e,t={}){let{lineCounter:r,prettyErrors:a}=vu(t),s=new bu(r?.addNewLine),i=new pu(t),n=null;for(let o of i.compose(s.parse(e),!0,e.length))if(!n)n=o;else if(n.options.logLevel!=="silent"){n.errors.push(new nr(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&r&&(n.errors.forEach(go(e,r)),n.warnings.forEach(go(e,r))),n}function Fs(e,t,r){let a;typeof t=="function"?a=t:r===void 0&&t&&typeof t=="object"&&(r=t);let s=xu(e,r);if(!s)return null;if(s.warnings.forEach(i=>(s.options.logLevel,void 0)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},r))}function sa(e){if(e!==null){if(typeof e=="string"){if(e.trim()==="")return;try{return JSON.parse(e)}catch{let t=/^[^:]+:/.test(e),r=e.slice(0,50).trimStart().startsWith("{");return!t||r?void 0:Fs(e,{maxAliasCount:1e4,merge:!0})}}return ns(e),e}}function qs(e,t={}){if(ns(e))return e;let r=sa(e);return Array.isArray(r)?r:[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:lp(r),...t}]}function wu(e,t,r,a=[]){let s=qs(structuredClone(e)),i=rt(s),n=r?.specification??i.specification;if(!G(n)){if(t?.throwOnError)throw Error(me.NO_CONTENT);return{valid:!1,errors:a,schema:n}}Rs(n,s,r??i,new WeakSet,a,t,"document");let o=a.filter((l,p,d)=>p===d.findIndex(c=>c.message===l.message&&c.code===l.code));return{valid:o.length===0,errors:o,schema:n}}function Rs(e,t,r,a,s,i,n="object"){if(n==="literal"||e===null||a.has(e))return;a.add(e);let o=(p,d)=>{let c=To(`#${d}`,i,p,t,o,s);return ne(c)&&Rs(c,t,p,a,s,i,n),c},l=new Set;for(;Fn(n)&&e.$ref!==void 0;){if(l.has(e.$ref)){s.push({code:"SELF_REFERENCE",message:me.SELF_REFERENCE.replace("%s",e.$ref)}),delete e.$ref;break}l.add(e.$ref);let p=To(e.$ref,i,r,t,o,s);if(typeof p!="object"||!p)break;let d=e.$ref;delete e.$ref;for(let c of Object.keys(p))e[c]===void 0&&(e[c]=p[c]);d&&i?.onDereference?.({schema:e,ref:d,resolved:p})}for(let[p,d]of Object.entries(e))typeof d=="object"&&d&&Rs(d,t,r,a,s,i,_n(n,p,d))}function To(e,t,r,a,s,i){if(typeof e!="string"){if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));i.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)});return}let[n,o]=e.split("#",2),l=n!==r.filename;if(n&&l){let p=a.find(d=>d.filename===n);if(!p){if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",n));i.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",n)});return}return s(p,o??"")}try{return On(o).reduce((p,d)=>{if(!ne(p)||!(d in p))throw Error(me.INVALID_REFERENCE.replace("%s",e));return p[d]},r.specification)}catch{if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));i.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)})}}function Oo(e,t){let r=qs(e),a=rt(r),s=wu(r,t);return{specification:a.specification,errors:s.errors,schema:s.schema,...Tn(a.specification)}}var $u=1e5,ku=10,_o=e=>{let t=new WeakSet,r={sourceEntries:0,copiedEntries:0,sizes:new Map},a=s=>{if(s===null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===void 0)return s;if(!Array.isArray(s)&&!G(s))return structuredClone(s);if(t.has(s))throw Error("Cannot upgrade to OpenAPI 3.2: cyclic objects cannot be represented in JSON. Use $ref instead.");let i=r.sizes.get(s)??1+(Array.isArray(s)?s.length:Object.keys(s).length);if(r.sizes.has(s)||(r.sizes.set(s,i),r.sourceEntries+=i),r.copiedEntries+=i,r.copiedEntries>$u&&r.copiedEntries>r.sourceEntries*ku)throw Error("Cannot upgrade to OpenAPI 3.2: excessive YAML alias expansion. Use $ref for shared schemas.");t.add(s);let n=Array.isArray(s)?s.map(a):Object.fromEntries(Object.entries(s).map(([o,l])=>[o,a(l)]));return t.delete(s),n};return a(e)},Rt=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Su=e=>e.replaceAll("~1","/").replaceAll("~0","~"),Au=e=>decodeURI(Su(e)),Fo=e=>e.split("/").slice(1).map(Au),qo=class extends AggregateError{errors;constructor(e){super(e,e.map(t=>t.message).join(`
`)),this.errors=e,this.name="UpgradeIncompatibilityError"}},Eu=["properties","patternProperties","$defs","dependentSchemas"],Du=["allOf","anyOf","oneOf","prefixItems"],Cu=["items","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"],Tu=(e,t="throw")=>{let r=new WeakMap,a=(b,w)=>{let $=r.get(b)??new Map(Object.entries(Object.getOwnPropertyDescriptors(b)).filter(([,E])=>Object.hasOwn(E,"value")).map(([E,T])=>[E,T.value]));return r.set(b,$),$.get(w)},s=new Set,i=[],n=new WeakMap,o=new WeakSet,l={evaluations:0},p=new WeakSet,d=[],c=b=>{G(b)&&!p.has(b)&&(p.add(b),c(b.items),Array.isArray(b.prefixItems)&&b.prefixItems.forEach(c))},f=new WeakMap,h=new WeakMap,y=(b,w)=>{i.push(Error(`Cannot upgrade to OpenAPI 3.2 at ${b}: ${w}`))},u=(b,w=!1)=>{if(typeof b=="string"&&b.startsWith("#/"))try{return Fo(decodeURIComponent(b.slice(1))).reduce(($,E)=>{if((!w||!G($)||$.$id===void 0&&$.$schema===void 0)&&(!Array.isArray($)||/^(0|[1-9]\d*)$/.test(E))&&(G($)||Array.isArray($))&&Object.hasOwn($,E))return a($,E)},e)}catch{return}},g=(b,w)=>{if(typeof b!="string")return;let $=[...b.matchAll(/\{([^{}]+)\}/g)].map(E=>E[1]);new Set($).size!==$.length&&y(w,"Template variables must not be repeated. Rename the repeated variable and define it separately.")},v=(b,w,$=new Set)=>{if(b===!1)return!0;if(b===!0)return!1;if(!G(b)||b.$id!==void 0||b.$schema!==void 0)return;if($.has(b)){for(let _ of $)o.add(_);return}let E=n.get(b)??new Map;if(E.has(w))return E.get(w);if(++l.evaluations>1e5){l.evaluations===100001&&y("#","Discriminator requiredness analysis was truncated after 100,000 evaluations.");return}let T=_=>(_===void 0&&o.has(b)||(E.set(w,_),n.set(b,E)),_);if(Array.isArray(b.required)&&b.required.includes(w))return T(!0);let D=new Set([...$,b]),L=[];b.$ref!==void 0&&L.push(v(u(b.$ref,!0),w,D)),Array.isArray(b.allOf)&&L.push(...b.allOf.map(_=>v(_,w,D)));for(let _ of["oneOf","anyOf"])if(Array.isArray(b[_])){let B=b[_].map(V=>v(V,w,D));B.every(V=>V===!0)?L.push(!0):B.every(V=>V===!1)?L.push(!1):L.push(void 0)}return L.includes(!0)?T(!0):L.includes(void 0)||["if","not","$dynamicRef","const","enum","minProperties","dependentRequired","dependentSchemas"].some(_=>_ in b)?T(void 0):T(!1)},S=(b,w,{inferredName:$,propertyName:E,dialect:T,ancestors:D=new Set,baseChanged:L=!1})=>{if(!G(b)||D.has(b)||(b.$schema??T)!==void 0)return;let _=L||b.$id!==void 0,B=[$,E,_].join(":"),V=f.get(b)??new Set;if(V.has(B))return;let le=G(b.xml)?b.xml:{},ce=b.$ref!==void 0||b.$dynamicRef!==void 0||b.type==="array"?"none":"element",P=le.wrapped===!0?"element":ce,ee=le.nodeType??(le.attribute===!0?"attribute":P);ee!=="element"&&ee!=="attribute"||$||le.name!==void 0||y(w,"An inline XML element needs an explicit xml.name.");let K={dialect:T,ancestors:new Set([...D,b]),baseChanged:_};if(!_&&typeof b.$ref=="string"){let Q=u(b.$ref,!0);if(G(Q)){let J=Fo(decodeURIComponent(b.$ref.slice(1))),Bt=J.length===3&&J[0]==="components"&&J[1]==="schemas",dt=p.has(Q);S(Q,b.$ref,{...K,inferredName:Bt||dt,propertyName:dt})}}for(let Q of["allOf","anyOf","oneOf"]){let J=b[Q];Array.isArray(J)&&J.forEach((Bt,dt)=>S(Bt,w+"/"+Q+"/"+dt,{...K,inferredName:!1,propertyName:!1}))}if(S(b.items,w+"/items",{...K,inferredName:E,propertyName:E}),Array.isArray(b.prefixItems)&&b.prefixItems.forEach((Q,J)=>S(Q,w+"/prefixItems/"+J,{...K,inferredName:E,propertyName:E})),G(b.properties))for(let[Q,J]of Object.entries(b.properties))S(J,w+"/properties/"+Rt(Q),{...K,inferredName:!0,propertyName:!0});V.add(B),f.set(b,V)},A=(b,w,$,E=e.jsonSchemaDialect,T=!1)=>{if(!G(b))return;let D=w==="schema"?b.$schema??E:E,L=T||w==="schema"&&b.$id!==void 0,_=`${w}:${String(D)}:${L}`,B=h.get(b)??new Set;if(B.has(_))return;B.add(_),h.set(b,B);let V=(P,ee)=>A(a(b,P),ee,`${$}/${Rt(P)}`,D,L),le=(P,ee)=>{let K=a(b,P);Array.isArray(K)&&K.forEach((Q,J)=>A(Q,ee,`${$}/${P}/${J}`,D,L))},ce=(P,ee)=>{let K=a(b,P);if(G(K))for(let[Q,J]of Object.entries(K))P==="responses"&&Q.startsWith("x-")||(w==="schema"&&P==="properties"&&c(J),A(J,ee,`${$}/${P}/${Rt(Q)}`,D,L))};if(w==="schema"){if(D!==void 0)return;let P=a(b,"xml");G(P)&&(P.wrapped===!0&&P.attribute===!0&&y(`${$}/xml`,"wrapped and attribute cannot both be true."),(P.wrapped===!0||P.attribute===!0)&&(P.nodeType=P.attribute===!0?"attribute":"element",delete P.wrapped,delete P.attribute)),!L&&b.$ref!==void 0&&A(u(b.$ref,!0),"schema",String(b.$ref),D);let ee=b.discriminator;G(ee)&&typeof ee.propertyName=="string"&&ee.defaultMapping===void 0&&!L&&v(b,ee.propertyName)===!1&&y(`${$}/discriminator`,"An optional discriminating property needs an explicit defaultMapping.");for(let K of Eu)ce(K,"schema");for(let K of Du)le(K,"schema");for(let K of Cu)V(K,"schema")}else switch(b.$ref!==void 0&&A(u(b.$ref),w,String(b.$ref),D),w){case"document":{let P=a(b,"paths");if(G(P))for(let[K,Q]of Object.entries(P)){if(!K.startsWith("/"))continue;let J=`${$}/paths/${Rt(K)}`;g(K,J),A(Q,"pathItem",J)}ce("webhooks","pathItem"),le("servers","server");let ee=a(b,"components");if(G(ee))for(let[K,Q]of Object.entries({schemas:"schema",parameters:"parameter",headers:"header",requestBodies:"body",responses:"response",callbacks:"callback",pathItems:"pathItem"})){let J=a(ee,K);if(G(J))for(let[Bt,dt]of Object.entries(J))A(dt,Q,`${$}/components/${K}/${Rt(Bt)}`)}break}case"pathItem":for(let P of["get","put","post","delete","options","head","patch","trace"])V(P,"operation");le("parameters","parameter"),le("servers","server");break;case"operation":if(Array.isArray(b.tags))for(let P of b.tags)typeof P=="string"&&s.add(P);le("parameters","parameter"),le("servers","server"),V("requestBody","body"),ce("responses","response"),ce("callbacks","callback");break;case"callback":for(let[P,ee]of Object.entries(b))!P.startsWith("x-")&&P!=="$ref"&&A(ee,"pathItem",`${$}/${Rt(P)}`,D,L);break;case"parameter":(b.in==="path"||b.in==="cookie")&&delete b.allowReserved,V("schema","schema"),ce("content","media");break;case"header":V("schema","schema"),ce("content","media");break;case"response":ce("headers","header"),ce("content","media");break;case"body":ce("content","media");break;case"media":/\/(?:[^;]+\+)?xml(?:\s*;|$)/i.test($.slice($.lastIndexOf("/")+1).replace(/~1/g,"/"))&&d.push({schema:b.schema,path:`${$}/schema`,dialect:D}),V("schema","schema"),ce("encoding","encoding");break;case"encoding":ce("headers","header");break;case"server":g(b.url,`${$}/url`)}};A(e,"document","#");for(let{schema:b,path:w,dialect:$}of d)S(b,w,{inferredName:!1,propertyName:!1,dialect:$});if(i.length>0&&t==="throw")throw new qo(i);return s},Ou=(e,t)=>{let r=e["x-tagGroups"];if(!Array.isArray(r)||r.length===0||e.tags!==void 0&&!Array.isArray(e.tags))return;let a=e.tags??[];if(!a.every(l=>G(l)&&typeof l.name=="string"))return;let s=new Map(a.map(l=>[l.name,l])),i=new Set,n=new Set;for(let l of r){if(!G(l)||typeof l.name!="string"||!l.name||!Array.isArray(l.tags)||!l.tags.every(p=>typeof p=="string")||Object.keys(l).some(p=>p!=="name"&&p!=="tags")||i.has(l.name)||s.has(l.name)||t.has(l.name))return;i.add(l.name);for(let p of l.tags){if(n.has(p)||s.get(p)?.parent!==void 0)return;n.add(p)}}if([...i].some(l=>n.has(l))||s.size!==a.length)return;let o=[];for(let l of r){o.push({name:l.name,kind:"nav"});for(let p of l.tags)o.push({...s.get(p)??{name:p},parent:l.name})}e.tags=[...o,...a.filter(l=>!n.has(l.name))]},_u=e=>{if(!G(e)||typeof e.openapi!="string")return!1;if(/^3\.1\.\d+$/.test(e.openapi))return!0;if(/^3\.1(?:\D|$)/.test(e.openapi))throw Error(`Cannot upgrade to OpenAPI 3.2: invalid OpenAPI version "${e.openapi}". Expected 3.1.x with a numeric patch version.`);return!1},Fu=(e,t="throw")=>(_u(e)&&(Ou(e,Tu(e,t)),e.openapi="3.2.0"),e);function Ro(e,t,r){if(t==="3.2"){let s=Cn(wn(_o(e)));try{let i=Fu(s,r?.onIncompatible==="ignore"?"ignore":"throw");return r?.onIncompatible==="collect"?{document:i,diagnostics:[]}:i}catch(i){if(r?.onIncompatible!=="collect"||!(i instanceof qo))throw i;return{document:Ro(_o(e),"3.1"),diagnostics:i.errors}}}let a=wn(e);return t==="3.0"?a:Cn(a)}function qu(e){if(!e)return{specification:null,version:void 0};let t=Ro(ns(e)?rt(e).specification:sa(e),"3.1"),{version:r}=Tn(t);return{specification:t,version:r==="3.1"||r==="3.2"?r:void 0}}var Ru=(e,t)=>jo(e,t),jo=async(e,t,r,a=new Map)=>{let s=[];if(t?.filesystem?.find(u=>u.filename===e))return{specification:rt(t.filesystem)?.specification,filesystem:t.filesystem,errors:s};let i=t?.plugins?.find(u=>u.check(e)),n=typeof e=="string"?e:t?.filename,o=n===void 0?void 0:a.get(n),l=o?.content??sa(e);if(i&&!o)try{l=sa(await i.get(e))}catch{if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return s.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:s}}if(l===void 0){if(t?.throwOnError)throw Error("No content to load");return s.push({code:"NO_CONTENT",message:me.NO_CONTENT}),{specification:null,filesystem:[],errors:s}}let p=qs(l,{filename:t?.filename??null}),d=t?.filename?p.find(u=>u.filename===t?.filename):rt(p),c=o?.targets??new Set,f=(r??[{fragment:"",context:"document"}]).filter(u=>{let g=JSON.stringify(u);return!c.has(g)&&(c.add(g),!0)});n!==void 0&&a.set(n,{content:l,targets:c});let h=qn(d.specification,f),y=[...new Set(h.map(({filename:u})=>u))];if(d.references=y,y.length===0)return{specification:rt(p)?.specification,filesystem:p,errors:s};for(let u of y){let g=t?.plugins?.find(A=>A.check(u));if(!g)continue;let{filesystem:v,errors:S}=await jo(g.check(u)&&g.resolvePath?g.resolvePath(e,u):u,{...t,filename:u},h.filter(({filename:A})=>A===u).map(({fragment:A,context:b})=>({fragment:A,context:b})),a);s.push(...S);for(let A of v){let b=p.find(w=>w.filename===A.filename);b?b.references=[...new Set([...b.references,...A.references])]:p.push({...A,isEntrypoint:!1})}}return{specification:rt(p)?.specification,filesystem:p,errors:s}};function ot(e){return String(e||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[_\s/\\.]+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function ju(e,t=40){if(!e||e.length<=t)return e;let r=e.slice(0,t),a=r.lastIndexOf("-");return a>8?r.slice(0,a):r}function Io(e,t){let r=(e||"get").toLowerCase(),a=(t||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"");return a?`${r}-${a}`:r}function Iu(e={}){if(typeof e.operationId=="string"){let t=e.operationId.trim();if(t.length>0&&t.length<=45&&!/^(endpoint|operation|method|api)[-_]?\d+$/i.test(t)&&ot(t))return"operationId"}return typeof e.summary=="string"&&ot(e.summary.trim().slice(0,100))?"summary":"path"}var No=class{constructor(){this.slugger=new Ye,this.used=new Set,this.opMap=new Map}reset(){this.slugger.reset(),this.used.clear(),this.opMap.clear()}slugOp(e={}){let t=Iu(e);return t==="operationId"?ot(e.operationId.trim()):t==="summary"?ju(ot(e.summary.trim().slice(0,100)),40):Io(e.method,e.path)}slug(e={},t=""){let r=JSON.stringify([t,e.isWebhook===!0,(e.method||"get").toLowerCase(),e.path||""]);if(this.opMap.has(r))return this.opMap.get(r);let a=(e.isWebhook?"webhook-":"")+this.slugOp(e);if(this.used.has(a)){let i=`${(e.method||"get").toLowerCase()}-${a}`;this.used.has(i)||(a=i)}t&&t!=="general"&&(a=`${t}--${a}`);let s=this.slugger.slug(a);return this.used.add(s),r&&this.opMap.set(r,s),s}slugTag(e){return`tag--${ot(e)}`}slugTagGroup(e){return`tag-group--${ot(e)}`}};function Nu(e){return String(e||"").replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase()).replace(/^[a-z]/,t=>t.toUpperCase())}function Bo(e){if(typeof e!="string")return!1;let t=e.trim();return!(t.startsWith("{")||t.startsWith("[")||t.includes(`
`))}function js(){return typeof window<"u"&&window.location?.href?window.location.href:"http://localhost/"}function Bu(e){let t=new URL(e||js(),js());return{check(r){return typeof r!="string"||r.startsWith("#")?!1:Bo(r)},resolvePath(r,a){if(typeof a=="string"&&(a.startsWith("http://")||a.startsWith("https://")))return a;let s=typeof r=="string"&&(r.startsWith("http://")||r.startsWith("https://"))?new URL(r):t;return new URL(a,s).href},async get(r){let a=r.startsWith("http://")||r.startsWith("https://")?r:new URL(r,t).href,s=await fetch(a);if(!s.ok){let n=Error(`Failed to load ${a} (${s.status})`);throw n.status=s.status,n.statusCode=s.status,n.response=s,n.url=a,n}let i=await s.text();try{return JSON.parse(i)}catch{try{return Fs(i,{maxAliasCount:-1,merge:!0})}catch{return i}}}}}function Lo(e){let t=new WeakMap,r=new WeakSet;function a(s,i=new Set,n=null){if(!s||typeof s!="object")return s;let o=s["x-ref"];if(o&&i.has(o))return{$ref:o};if(r.has(s))return{$ref:o||n||"#/components/schemas/Circular"};if(t.has(s))return t.get(s);r.add(s);let l=i;o&&(l=new Set(i),l.add(o));let p;if(Array.isArray(s)){p=[],t.set(s,p);for(let d=0;d<s.length;d++)p.push(a(s[d],l,o||n))}else{p={},t.set(s,p);for(let d of Object.keys(s))d!=="x-ref"&&(p[d]=a(s[d],l,o||n))}return r.delete(s),p}return a(e)}async function Po(e,t=!1,r=!1,a=!1,s="none",i="",n="",o="",l="",p="",d="",c=""){let f;try{this?.requestUpdate?.();let b=e,w;if(typeof e=="string"&&Bo(e))try{w=new URL(e.trim(),js()).href,b=w}catch{w=e}else if(typeof e=="string")try{b=JSON.parse(e)}catch{try{b=Fs(e,{maxAliasCount:-1,merge:!0})}catch{b=e}}let $=Bu(w),E=await Ru(b,{plugins:[$]});if(E.errors&&E.errors.length>0&&!E.specification){let L=E.errors[0],_=Error(L.message||"Error loading specification");throw _.status=404,_}let T={onDereference:({schema:L,ref:_})=>{L["x-ref"]=_}},D;if(D=E.specification?.swagger&&String(E.specification.swagger).startsWith("2")?Lo((await Oo(qu(E.filesystem).specification,T)).schema):Lo((await Oo(E.filesystem,T)).schema),await jr(0),D&&(D.components||D.info||D.servers||D.tags||D.paths))f=Lu(D,p,d,c),this?.dispatchEvent?.(new CustomEvent("before-render",{detail:{spec:f}}));else return{specLoadError:!0,isSpecLoading:!1,info:{title:"Invalid Spec Definition",description:"Invalid Spec Definition",version:""},tags:[],tagGroups:[]}}catch(b){let w;return w=b.statusCode===404||b.status===404?b.response?.url||b.url?`${b.response?.url||b.url} \u2503 Not Found (${b.response?.status||b.status})`:"Spec Not Found \u2503 404":`Unable to load ${b.response?.url||b.url||(typeof e=="string"?e:"")} \u2503 ${b.response?.status||b.status||b.message}`,{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:w,version:""},tags:[],tagGroups:[]}}let h=!!(f?.["x-tagGroups"]&&f["x-tagGroups"].length>0||f?.["x-tag-groups"]&&f["x-tag-groups"].length>0),y=zu(f,s,t,r,h),u=Mu(f,y),g=Pu(f,a),v=f.info?.description?Is(f.info.description):[],S=[];if(f.components?.securitySchemes){let b=new Set;Object.entries(f.components.securitySchemes).forEach(w=>{if(!b.has(w[0])){b.add(w[0]);let $={securitySchemeId:w[0],...w[1]};$.in="header",$.name="Authorization",$.nameId=w[1].name||w[0],$.user="",$.password="",$.clientId="",$.clientSecret="",$.value="",$.finalKeyValue="",w[1].type==="apiKey"&&($.in=w[1].in||"header",$.name=w[1].name||"Authorization"),S.push($)}})}i&&n&&o&&S.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:i,nameId:i,in:n,value:o,finalKeyValue:o}),S.forEach(b=>{b.typeDisplay=b.type==="http"?b.scheme==="basic"?"HTTP Basic":`HTTP Bearer ${b.nameId}`:b.type==="apiKey"?`API Key (${b.name})`:b.type==="oauth2"?`OAuth (${b.securitySchemeId})`:b.type||"None"});let A=[];return f.servers&&Array.isArray(f.servers)&&f.servers.length>0?(f.servers.forEach(b=>{let w=b.url.trim();w.startsWith("http")||w.startsWith("//")||w.startsWith("{")||typeof window<"u"&&window.location?.origin?.startsWith("http")&&(b.url=window.location.origin+b.url,w=b.url),b.variables&&Object.entries(b.variables).forEach($=>{let E=RegExp(`{${$[0]}}`,"g");w=w.replace(E,$[1].default||""),$[1].value=$[1].default||""}),b.computedUrl=w}),l&&f.servers.push({url:l,computedUrl:l})):l?f.servers=[{url:l,computedUrl:l}]:typeof window<"u"&&window.location?.origin?.startsWith("http")?f.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:f.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],A=f.servers,{specLoadError:!1,isSpecLoading:!1,info:f.info,infoDescriptionHeaders:v,tags:y,tagGroups:u,components:g,externalDocs:f.externalDocs,securitySchemes:S,servers:A}}/* Path filtering correction start */
function Lu(spec, pattern = "", matchType = "", excludedLabels = "") {
const methods = new Set(["get", "put", "post", "delete", "patch", "head", "options", "trace", "query"]);
const labels = excludedLabels.split(",").map(label => label.trim().toLowerCase()).filter(Boolean);
const regex = pattern && matchType === "regex" ? new RegExp(pattern, "i") : null;
const paths = {};
function retain(path, method, operation) {
const candidate = (method + " " + path).toLowerCase();
if (pattern && !(regex ? regex.test(candidate) : candidate.includes(pattern.toLowerCase()))) return false;
const badges = operation?.["x-badges"];
return !Array.isArray(badges) || !badges.some(badge =>
typeof badge?.label === "string" && labels.includes(badge.label.toLowerCase()));
}
for (const [path, item] of Object.entries(spec.paths ?? {})) {
if (!path.startsWith("/")) continue;
const retained = { ...item };
let hasOperations = false;
for (const [name, operation] of Object.entries(item)) {
if (methods.has(name)) {
if (retain(path, name, operation)) hasOperations = true;
else delete retained[name];
} else if (name === "additionalOperations" && operation && typeof operation === "object") {
const additional = Object.fromEntries(Object.entries(operation).filter(([method, details]) =>
details && typeof details === "object" && retain(path, method, details)));
if (Object.keys(additional).length) {
retained[name] = additional;
hasOperations = true;
} else delete retained[name];
}
}
if (hasOperations) paths[path] = retained;
}
spec.paths = paths;
return spec;
}
/* Path filtering correction end */
function Is(e){return O.lexer(e).filter(t=>t.type==="heading"&&t.depth<=2)||[]}function Pu(e,t=!1){if(!e.components)return[];let r=[];for(let a in e.components){let s=[];for(let l in e.components[a]){let p={show:!0,id:`${a.toLowerCase()}-${l.toLowerCase()}`.replace(qd,"-"),name:l,component:e.components[a][l]};s.push(p)}let i=a,n=a;switch(a){case"schemas":t&&s.sort((l,p)=>l.name.localeCompare(p.name)),n="Schemas",i="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":n="Responses",i="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":n="Parameters",i="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":n="Examples",i="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":n="Request Bodies",i="Describes common request bodies that are used across the API operations.";break;case"headers":n="Headers",i='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":n="Security Schemes",i="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":n="Links",i="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":n="Callbacks",i="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:n=a,i=a}let o={show:!0,name:n,description:i,subComponents:s};r.push(o)}return r||[]}function Ns(e){if(!e)return!0;let t=e["x-tag-expanded"]??e["x-tagExpanded"]??e["x-expanded"]??e.expanded;return t!==!1&&t!=="false"}function zu(e,t="none",r=!1,a=!1,s=!1){let i=["get","put","post","delete","patch","head","options","trace","query"],n=new No,o=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map(d=>({show:!0,elementId:n.slugTag(d.name),name:d.name,displayName:d["x-displayName"]||d.name,description:d.description||"",headers:d.description?Is(d.description):[],paths:[],expanded:Ns(d),xInternal:d["x-internal"]??void 0,xHidden:d["x-hidden"]??void 0})):[],l=[...Object.entries(e.paths??{}).filter(([name])=>name.startsWith("/")).map(([name,item])=>[name,item,!1]),...Object.entries(e.webhooks??{}).map(([name,item])=>[name,item,!0])];for(let[d,pathItem,h]of l){let c=pathItem.parameters,f={servers:pathItem.servers||[],parameters:pathItem.parameters||[]},y=[];i.forEach(u=>{pathItem[u]&&y.push({methodName:u,pathOrHookObj:pathItem[u]})}),pathItem.additionalOperations&&typeof pathItem.additionalOperations=="object"&&Object.entries(pathItem.additionalOperations).forEach(([u,g])=>{g&&typeof g=="object"&&y.push({methodName:u.toLowerCase(),pathOrHookObj:g})}),y.forEach(({methodName:u,pathOrHookObj:g})=>{let v=g.tags?[...g.tags]:[];if(v.length===0)if(r){let S=d.replace(/^\/+|\/+$/g,""),A=S.indexOf("/");A===-1?v.push(S):v.push(S.substring(0,A))}else v.push("General");v.forEach(S=>{let A,b;e.tags&&(b=e.tags.find(_=>_.name.toLowerCase()===S.toLowerCase())),A=o.find(_=>_.name===S),A||(A={show:!0,elementId:n.slugTag(S),name:S,displayName:b?.["x-displayName"]||b?.name||S,description:b?.description||"",headers:b?.description?Is(b.description):[],paths:[],expanded:Ns(b),xInternal:b?.["x-internal"]??void 0,xHidden:b?.["x-hidden"]??void 0},o.push(A));let w=(g.summary||g.description||`${u.toUpperCase()} ${d}`).trim();w.length>100&&([w]=w.split(/[.|!|?]\s|[\r?\n]/));let $=[];if($=c?g.parameters?c.filter(_=>{if(!g.parameters.some(B=>_.name===B.name&&_.in===B.in))return _}).concat(g.parameters):c.slice(0):g.parameters?g.parameters.slice(0):[],g.callbacks)for(let[_,B]of Object.entries(g.callbacks)){let V=Object.entries(B).filter(le=>typeof le[1]=="object")||[];g.callbacks[_]=Object.fromEntries(V)}let E=`${u}${Nu((d||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,""))}`,T=g.operationId||E,D=s?ot(S):"",L=n.slug({method:u,path:d,isWebhook:h,operationId:g.operationId,summary:g.summary||g.description},D);A.paths.push({show:!0,expanded:!1,isWebhook:h,expandedAtLeastOnce:!1,summary:g.summary||"",description:g.description||"",externalDocs:g.externalDocs,shortSummary:w,method:u,path:d,operationId:T,elementId:L,servers:g.servers??f.servers,parameters:$,requestBody:g.requestBody,responses:g.responses,callbacks:g.callbacks,deprecated:g.deprecated,security:g.security??e.security,xBadges:g["x-badges"]||void 0,xCodeSamples:g["x-codeSamples"]||g["x-code-samples"]||"",rawOperation:g,xMcp:g["x-mcp"]||g["x-mcp-tool"]||void 0,xInternal:g["x-internal"]??pathItem?.["x-internal"]??void 0,xHidden:g["x-hidden"]??pathItem?.["x-hidden"]??void 0,xOpenAiIsConsequential:g["x-openai-isConsequential"],xSpeakeasyNameOverride:g["x-speakeasy-name-override"]||void 0})})})}let p=o.filter(d=>d.paths&&d.paths.length>0);return p.forEach(d=>{t!=="none"&&(t==="method"?d.paths.sort((c,f)=>{let h=i.indexOf(c.method),y=i.indexOf(f.method);return h!==-1&&y!==-1?h-y:h===-1?y===-1?c.method.localeCompare(f.method):1:-1}):t==="summary"?d.paths.sort((c,f)=>c.shortSummary.localeCompare(f.shortSummary)):t==="path"&&d.paths.sort((c,f)=>c.path.localeCompare(f.path))),d.firstPathId=d.paths[0]?.elementId||""}),a?p.sort((d,c)=>d.name.localeCompare(c.name)):p}function Mu(e,t=[]){let r=e?.["x-tagGroups"]||e?.["x-tag-groups"]||e?.["x-taggroups"];if(!r||!Array.isArray(r)||r.length===0)return[];let a=new No,s=new Set,i=[];return r.forEach(n=>{if(!n||!n.name)return;let o=Array.isArray(n.tags)?n.tags:[],l=[];o.forEach(p=>{if(typeof p!="string")return;let d=t.find(c=>c.name===p||c.name.toLowerCase()===p.toLowerCase());d&&!l.includes(d)&&(l.push(d),s.add(d.name))}),l.length>0&&i.push({name:n.name,displayName:n["x-displayName"]||n.displayName||n.name,description:n.description||"",elementId:a.slugTagGroup(n.name),tags:l,expanded:Ns(n),xInternal:n["x-internal"]??void 0,xHidden:n["x-hidden"]??void 0})}),i}function Uu(e){if(!e||typeof e!="string")return"";try{let t=e.trim();t.startsWith("^")&&(t=t.slice(1)),t.endsWith("$")&&!t.endsWith("\\$")&&(t=t.slice(0,-1)),t=t.replace(/\((?:\?:)?([^()|]+)(?:\|[^()]+)*\)/g,"$1");let r=/(\[[^\]]+\]|\\[dwsDWS]|\\[^]|\.|[^\\[\]{}()+*?|])(?:\{(\d+)(?:,\d*)?\}|([+*?]))?/g,a="",s;for(;(s=r.exec(t))!==null;){let i=s[1],n=s[2],o=s[3],l=1;n===void 0?o==="+"?l=1:(o==="*"||o==="?")&&(l=0):l=parseInt(n,10),l=Math.min(Math.max(0,l),50);let p="a";if(i==="\\d")p="0";else if(i==="\\D")p="a";else if(i==="\\w")p="a";else if(i==="\\W")p="_";else if(i==="\\s")p=" ";else if(i==="\\S")p="a";else if(i===".")p="a";else if(i.startsWith("\\"))p=i.slice(1);else if(i.startsWith("[")){let d=i.slice(1,-1);d.startsWith("^")?p=d.includes("a")?"0":"a":/[1-9]/.test(d)&&!d.includes("0")?p="1":/[0-9]/.test(d)&&!/[a-zA-Z]/.test(d)||/[0-9]/.test(d)&&/[a-fA-F]/.test(d)&&!/[g-zG-Z]/.test(d)?p="0":/[A-Z]/.test(d)&&!/[a-z]/.test(d)?p="A":/[a-z]/.test(d)?p="a":d.length>0&&(p=d[0])}else p=i;a+=p.repeat(l)}return a||e}catch{return e}}function ue(e){if(e===void 0)return"";if(e===null)return"null";if(e==="")return"\u2205";if(typeof e=="boolean"||typeof e=="number")return`${e}`;if(Array.isArray(e))return e.map(t=>t===null?"null":t===""?"\u2205":t.toString().replace(/^ +| +$/g,r=>"\u25CF".repeat(r.length))||"").join(", ");if(typeof e=="object"){let t=Object.keys(e);return`{ ${t[0]}:${e[t[0]]}${t.length>1?",":""} ... }`}return e.toString().replace(/^ +| +$/g,t=>"\u25CF".repeat(t.length))||""}function zo(e){return e?e.format==="binary"||e.contentEncoding==="binary"||!!e.contentMediaType&&e.contentEncoding!=="base64":!1}function ia(e){if(!e)return;let t="",r="";if(e.$ref){let n=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(n+1)}} `}else if(e.type)t=Array.isArray(e.type)?e.type.join("\u2503"):e.type,(e.format||e.enum||e.const!==void 0)&&(t=t.replace("string",e.enum?"enum":e.const===void 0?e.format:"const")),e.nullable&&(t+="\u2503null");else if(e.const!==void 0)t="const";else if(e.anyOf||e.oneOf){let n=(e.anyOf||e.oneOf).filter(Boolean),o=[];n.forEach(l=>{let p=ia(l);p?.type&&p.type!=="{missing-type-info}"&&p.type.split("\u2503").forEach(d=>{let c=d.trim();c&&!o.includes(c)&&o.push(c)})}),t=o.length>0?o.join("\u2503"):"{missing-type-info}"}else t=Object.keys(e).length===0?"any":"{missing-type-info}";let a=e.anyOf||e.oneOf?{...(e.anyOf||e.oneOf).find(n=>n&&n.type&&n.type!=="null")||(e.anyOf||e.oneOf)[0],...e}:e,s={type:t,format:e.format||a.format||"",contentMediaType:e.contentMediaType||a.contentMediaType||"",contentEncoding:e.contentEncoding||a.contentEncoding||"",contentSchema:e.contentSchema||a.contentSchema||null,pattern:(e.pattern||a.pattern)&&!e.enum&&!a.enum?e.pattern||a.pattern:"",readOrWriteOnly:e.readOnly?"\u{1F181}":e.writeOnly?"\u{1F186}":a.readOnly?"\u{1F181}":a.writeOnly?"\u{1F186}":"",deprecated:e.deprecated||a.deprecated?"\u274C":"",examples:e.examples||e.example||a.examples||a.example,default:ue(e.default===void 0?a.default:e.default),description:e.description||a.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if(s.type==="{recursive}"?s.description=e.$ref.substring(e.$ref.lastIndexOf("/")+1):(s.type==="{missing-type-info}"||s.type==="any")&&(s.description=s.description||""),s.allowedValues=e.const===void 0?Array.isArray(e.enum)?e.enum.map(n=>ue(n)).join("\u2503"):a.const===void 0?Array.isArray(a.enum)?a.enum.map(n=>ue(n)).join("\u2503"):"":ue(a.const):ue(e.const),!s.allowedValues&&(e.anyOf||e.oneOf)){let n=[];(e.anyOf||e.oneOf).forEach(o=>{let l=o.const===void 0?Array.isArray(o.enum)?o.enum.map(p=>ue(p)).join("\u2503"):"":ue(o.const);l&&!n.includes(l)&&n.push(l)}),n.length>0&&(s.allowedValues=n.join("\u2503"))}let i=e.items||a.items;if((t==="array"||t.split("\u2503").includes("array"))&&i){let n=i.format||i.contentMediaType||(Array.isArray(i?.type)?i.type.join("\u2503"):i?.type)||"",o=ue(i.default);s.arrayType=n?`array of ${n}`:`${e.type||"array"}`,s.default||=o,s.allowedValues||=i.const===void 0?Array.isArray(i?.enum)?i.enum.map(l=>ue(l)).join("\u2503"):"":ue(i.const)}if(t.match(/integer|number/g)){let n=e.minimum===void 0?a.minimum:e.minimum,o=e.exclusiveMinimum===void 0?a.exclusiveMinimum:e.exclusiveMinimum;(n!==void 0||o!==void 0)&&(r+=n===void 0?`More than ${o}`:`Min ${n}`);let l=e.maximum===void 0?a.maximum:e.maximum,p=e.exclusiveMaximum===void 0?a.exclusiveMaximum:e.exclusiveMaximum;(l!==void 0||p!==void 0)&&(r+=l===void 0?`${r?"\u2503":""}Less than ${p}`:`${r?"\u2503":""}Max ${l}`);let d=e.multipleOf===void 0?a.multipleOf:e.multipleOf;d!==void 0&&(r+=`${r?"\u2503":""} multiple of ${d}`)}if([].concat(a.type||[]).includes("string")||t.match(/string/g)){let n=e.minLength===void 0?a.minLength:e.minLength,o=e.maxLength===void 0?a.maxLength:e.maxLength;n!==void 0&&o!==void 0?r+=`${r?"\u2503":""}${n} to ${o} chars`:n===void 0?o!==void 0&&(r+=`${r?"\u2503":""}Max ${o} chars`):r+=`${r?"\u2503":""}Min ${n} chars`}return s.constrain=r,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function be(e){if(typeof e=="object"&&e&&!Array.isArray(e)){if(e.value!==void 0)return{Example:{...e}};let t=Object.entries(e).filter(([r,a])=>a?.value!==void 0);return t.length===0?void 0:Object.fromEntries(t)}return Array.isArray(e)?e.reduce((t,r,a)=>(t[`Example${a+1}`]={value:r},t),{}):e?{Example:{value:e}}:void 0}function Mo(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){let r=Object.values(e).filter(a=>a["x-example-show-value"]!==!1).map(a=>({value:typeof a.value=="boolean"||typeof a.value=="number"?`${a.value}`:a.value||"",printableValue:ue(a.value),summary:a.summary||"",description:a.description||""}));return{exampleVal:r.length>0?r[0].value:"",exampleList:r}}if(Array.isArray(e)||(e=e?[e]:[]),e.length===0)return{exampleVal:"",exampleList:[]};if(t==="array"){let[r]=e;return{exampleVal:r,exampleList:e.map(a=>({value:a,printableValue:ue(a)}))}}return{exampleVal:e[0].toString(),exampleList:e.map(r=>({value:r.toString(),printableValue:ue(r)}))}}function Uo(e){return e.some(t=>t.summary?.length>0||t.description?.length>0)}function Fe(e){let t;return e&&(t=e.examples&&e.examples.length>=1?e.examples[0]:e.example),t}function na(e){let t=Fe(e);if(t==="")return"";if(t===null)return null;if(t===0)return 0;if(t===!1)return!1;if(t instanceof Date)switch(e.format.toLowerCase()){case"date":return t.toISOString().split("T")[0];case"time":return t.toISOString().split("T")[1];default:return t.toISOString()}if(t)return t;if(Object.keys(e).length===0)return null;if(e.$ref)return{};if(e.const===!1||e.const===0||e.const===null||e.const===""||e.const)return e.const;if(e.default)return e.default;let r=Array.isArray(e.type)?e.type[0]:e.type;if(!r)return null;if(r.match(/^integer|^number/g)){let a=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),s=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),i=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?s||0:Number(e.exclusiveMinimum)+(r.startsWith("integer")?1:.001):Number(e.minimum);return a?a>=i?a:i%a===0?i:Math.ceil(i/a)*a:i}if(r.match(/^boolean/g))return!1;if(r.match(/^null/g))return null;if(r.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return Uu(e.pattern)}catch{return e.pattern}if(e.contentEncoding)switch(e.contentEncoding.toLowerCase()){case"base64":return"ZXhhbXBsZQ==";case"binary":case"7bit":case"8bit":case"quoted-printable":return"string"}if(e.contentMediaType){if(e.contentMediaType.toLowerCase()==="application/json"){if(e.contentSchema){let a=he(e.contentSchema),s=a?.["example-0"]??a;return JSON.stringify(s)}return"{}"}if(e.contentMediaType.startsWith("text/"))return"text content"}if(e.format)switch(e.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"byte":case"base64":return"ZXhhbXBsZQ==";case"binary":return"binary";default:return""}else{let a=Number.isNaN(e.minLength)?void 0:Number(e.minLength),s=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),i=a||(s>6?6:s||void 0);return i?"A".repeat(i):"string"}}return null}function Bs(e,t=1){if(e==null)return"";let r=" ".repeat(t),a="";if(typeof e!="object")return`
${r}${e.toString()}`;for(let s in e){if(s.startsWith("::"))continue;let i=e[s],n=s;Array.isArray(i)?n=i["::XML_TAG"]||i[0]?.["::XML_TAG"]||s:i&&typeof i=="object"?n=i["::XML_TAG"]||s:Array.isArray(e)&&e["::XML_TAG"]&&(n=e["::XML_TAG"]),a=i==null?`${a}
${r}<${n}></${n}>`:Array.isArray(i)||typeof i=="object"?`${a}
${r}<${n}>${Bs(i,t+1)}
${r}</${n}>`:`${a}
${r}<${n}>${i.toString()}</${n}>`}return a}function dr(e,t){typeof t=="object"&&t&&(e.title&&(t["::TITLE"]=e.title),e.description&&(t["::DESCRIPTION"]=e.description),e.xml?.name&&(t["::XML_TAG"]=e.xml?.name),e.xml?.wrapped&&(t["::XML_WRAP"]=e.xml?.wrapped.toString()))}function Ho(e){if(typeof e=="object"&&e){delete e["::TITLE"],delete e["::DESCRIPTION"],delete e["::XML_TAG"],delete e["::XML_WRAP"];for(let t in e)Ho(e[t])}}function oa(e,t,r){if(!e||typeof e!="object")return e;let a=r&&typeof r=="object"&&"example-0"in r?r["example-0"]:r&&typeof r=="object"&&Object.keys(r).length>0&&!Array.isArray(r)?Object.values(r)[0]:r;for(let s in e)e[s]&&typeof e[s]=="object"&&(e[s][t]=a);return e}function he(e,t={},r=0){let a={};if(!(!e||r>8)){if(e.allOf){let s={};if(e.allOf.length===1&&!e.allOf[0]?.properties&&!e.allOf[0]?.items){if(e.allOf[0].$ref)return{"example-0":{}};if(e.allOf[0].readOnly&&t.includeReadOnly){let i=e.allOf[0];return{"example-0":na(i)}}return}e.allOf.forEach(i=>{if(i){if(i.type==="object"||i.properties||i.allOf||i.anyOf||i.oneOf){let n=he(i,t,r+1),o=n?.["example-0"]??n;o&&typeof o=="object"&&!Array.isArray(o)&&Object.assign(s,o)}else if(i.type==="array"||i.items){let n=he(i,t,r+1),o=n?.["example-0"]??n;Array.isArray(o)&&(s[Object.keys(s).length]=o)}else if(i.type){let n=`prop${Object.keys(s).length}`;s[n]=na(i)}}}),a={"example-0":s},dr(e,a["example-0"])}else if(e.oneOf){let s={};if(e.properties)for(let i in e.properties){let n=e.properties[i];if(n?.properties||n?.items){let o=he(n,t,r+1);s[i]=o?.["example-0"]??o}else s[i]=na(n)}if(e.oneOf.length>0){let i=r===0?e.oneOf:[e.oneOf[0]],n=0;for(let o=0;o<i.length;o++){let l=i[o],p=he(l,t,r+1);for(let d in p){let c=p[d];if(Object.keys(s).length>0&&c&&typeof c=="object"&&!Array.isArray(c)&&(c={...s,...c}),a[`example-${n}`]=c,dr(l,a[`example-${n}`]),n++,r>0)break}}}}else if(e.anyOf){let s={"example-0":{}};if(e.type==="object"||e.properties)for(let i in e.properties){let n=e.properties[i];if(n?.deprecated&&!t.includeDeprecated||n?.readOnly&&!t.includeReadOnly||n?.writeOnly&&!t.includeWriteOnly)continue;let o=Fe(n);o===void 0?oa(s,i,he(n,t,r+1)):s["example-0"][i]=o}if(e.anyOf.length>0){let i=r===0?e.anyOf:[e.anyOf[0]],n=0;for(let o=0;o<i.length;o++){let l=i[o],p=he(l,t,r+1);for(let d in p){let c=p[d];if(s?.["example-0"]&&Object.keys(s["example-0"]).length>0?a[`example-${n}`]={...s["example-0"],...typeof c=="object"?c:{}}:a[`example-${n}`]=c,dr(l,a[`example-${n}`]),n++,r>0)break}}}}else if(e.type==="object"||e.properties){a["example-0"]={},dr(e,a["example-0"]);let s=Fe(e);if(s!==void 0)a["example-0"]=s;else{for(let i in e.properties){let n=e.properties[i];if(n&&(!n.deprecated||t.includeDeprecated)&&(!n.readOnly||t.includeReadOnly)&&(!n.writeOnly||t.includeWriteOnly))if(n.type==="array"||n.items){let o=Fe(n);if(o!==void 0)a["example-0"][i]=o;else if(Fe(n.items)!==void 0)a["example-0"][i]=[Fe(n.items)];else{let l=he(n.items,t,r+1),p=l?.["example-0"]??l;if(t.useXmlTagForProp){let d=n.xml?.name||i;n.xml?.wrapped?a["example-0"][d]={[d]:p}:a["example-0"][d]=[p]}else a["example-0"][i]=[p]}}else oa(a,i,he(n,t,r+1))}if(typeof e.additionalProperties=="object"&&e.additionalProperties!==null){let i=e.additionalProperties["x-additionalPropertiesName"]||"property";oa(a,`${i}1`,he(e.additionalProperties,t,r+1)),oa(a,`${i}2`,he(e.additionalProperties,t,r+1))}}}else if(e.type==="array"||e.items){let s=Fe(e);if(s!==void 0)a["example-0"]=s;else if(e.items){let i=Fe(e.items);if(i!==void 0)a["example-0"]=[i];else{let n=he(e.items,t,r+1),o=n?.["example-0"]??n;a["example-0"]=[o],dr(e.items,a["example-0"])}}else a["example-0"]=[]}else return{"example-0":na(e)};return a}}function Ls(e,t=0){let r="";e.title?r=e.description?`<b>${e.title}:</b> ${e.description}`:e.title:e.description&&(r=e.description);let a=[];e.minItems&&a.push(`<span class="descr-label">Min Items:</span> <span class="descr-value">${e.minItems}</span>`),e.maxItems&&a.push(`<span class="descr-label">Max Items:</span> <span class="descr-value">${e.maxItems}</span>`),e.uniqueItems===!0&&a.push('<span class="descr-label">Must have unique items</span>');let s=r?[r.trim()]:[];if(a.length>0&&s.push(`<div class="item-details">${a.join(" ")}</div>`),t>0&&e.items?.description){let i="";e.items.minProperties&&(i=`<span class="descr-label">Min Properties:</span> <span class="descr-value">${e.items.minProperties}</span>`),e.items.maxProperties&&(i=`${i} <span class="descr-label">Max Properties:</span> <span class="descr-value">${e.items.maxProperties}</span>`),s.push(`\u2B95 ${i} [ ${e.items.description} ]`)}return s.join(`
`)}function Ps(e,t,r,a){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,i=[];if(e.properties)for(let l in e.properties){let p=Array.isArray(e.required)&&e.required.includes(l),d=ae(e.properties[l],t+1,l,p);d&&i.push(d)}let n=[];if(e.patternProperties)for(let l in e.patternProperties){let p=ae(e.patternProperties[l],t+1,`[pattern: ${l}]`,!1);p&&n.push(p)}let o=null;return e.additionalProperties&&typeof e.additionalProperties=="object"&&(o=ae(e.additionalProperties,t+1,"[any-key]",!1)),{kind:"object",name:r,title:e.title||"",description:Ls(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"object \u2503 null":"object",properties:i,patternProperties:n,additionalProperties:o}}function zs(e,t,r,a){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,i=null;e.items&&(i=ae(e.items,t+1,"",!1));let n="";return e.items?.items?n=e.items.items.type||"":e.items?.type&&typeof e.items.type=="string"&&(n=e.items.type),{kind:"array",name:r,title:e.title||"",description:Ls(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"array \u2503 null":"array",arrayType:n,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems||!1,items:i}}function Ms(e,t,r){let a=ia(e)||{};return{kind:"primitive",name:t,type:a.type||e.type||"",format:a.format||e.format||"",contentMediaType:a.contentMediaType||e.contentMediaType||"",contentEncoding:a.contentEncoding||e.contentEncoding||"",contentSchema:a.contentSchema||e.contentSchema||null,pattern:a.pattern||e.pattern||"",constraints:a.constrain||"",defaultValue:a.default!==void 0&&a.default!==""?String(a.default):"",allowedValues:a.allowedValues||"",description:(e.description||a.description||"").trim(),title:(e.title||"").trim(),required:r,deprecated:e.deprecated||!!a.deprecated,readOnly:e.readOnly||a.readOrWriteOnly==="readonly",writeOnly:e.writeOnly||a.readOrWriteOnly==="writeonly",html:a.html||""}}var Ko=8,Wo=8e3,Vo=4;function Jo(e){let t=Array.isArray(e.type)?e.type:[e.type];return t.includes("object")||t.includes("array")||!!(e.properties||e.patternProperties||e.items)||!!e.additionalProperties&&typeof e.additionalProperties=="object"||!!e.allOf?.some(r=>r&&Jo(r))}var la=new Set,pr=Ko,ca=0;function ae(e,t=0,r="",a=!1,s=""){if(!e)return null;if(la.size>0)return Go(e,t,r,a,s);for(pr=Ko;;--pr){ca=0;let i=Go(e,t,r,a,s);if(ca<=Wo||pr<=Vo)return i}}function Go(e,t,r,a,s){if(!e)return null;ca+=1;let i=ca>Wo&&pr>Vo;if(la.has(e)||(t>pr||i)&&Jo(e)){let n=e.type==="array"||Array.isArray(e.type)&&e.type.includes("array")||!!e.items;return{kind:n?"array":"object",name:r,type:n?"array":"object",title:e.title||"",description:e.description||"",required:a,truncated:!0}}la.add(e);try{return Hu(e,t,r,a,s)}finally{la.delete(e)}}function Hu(e,t,r,a,s){if(e.allOf){if(e.allOf.length===1&&!e.allOf[0].properties&&!e.allOf[0].items){let u={...e.allOf[0],...e,title:e.title||e.allOf[0].title||"",description:e.description||e.allOf[0].description||""};return delete u.allOf,ae(u,t,r,a)}let i=[],n=[],o=null,l=[],p=e.title||"",d=e.description||"",c=e.deprecated||!1,f=e.readOnly||!1,h=e.writeOnly||!1,y=e.nullable||!1;return e.allOf.forEach((u,g)=>{if(u.title&&!p&&(p=u.title),u.description&&!d&&(d=u.description),u.deprecated&&(c=!0),u.readOnly&&(f=!0),u.writeOnly&&(h=!0),u.nullable&&(y=!0),u.type==="object"||u.properties||u.allOf||u.anyOf||u.oneOf){let v=ae(u,t,"",!1,(u.anyOf||u.oneOf)&&g>0?`${g}`:"");v&&(v.kind==="object"?(v.properties&&i.push(...v.properties),v.patternProperties&&n.push(...v.patternProperties),v.additionalProperties&&(o=v.additionalProperties)):v.kind==="union"&&l.push(v))}else if(u.type==="array"||u.items){let v=ae(u,t);v&&i.push(v)}else if(u.type){let v=`prop${i.length}`;i.push(ae(u,t,v,!1))}}),{kind:"object",name:r,title:p,description:Ls({...e,title:p,description:d},t),required:a,deprecated:c,readOnly:f,writeOnly:h,nullable:y,dataTypeLabel:y?"object \u2503 null":"object",properties:i,patternProperties:n,additionalProperties:o,unions:l}}if(e.anyOf||e.oneOf){let i=e.anyOf?"anyOf":"oneOf",n=(e.anyOf||e.oneOf).map((l,p)=>{let d=l.title||"",c=ae(l,t,d||`Option ${p+1}`,!1);return c&&(c.readOnly=!1,c.writeOnly=!1,c.optionIndex=p+1,c.optionTitle=d),c}).filter(Boolean),o=[];if((e.type==="object"||e.properties)&&e.properties)for(let l in e.properties){let p=Array.isArray(e.required)&&e.required.includes(l),d=ae(e.properties[l],t+1,l,p);d&&o.push(d)}return{kind:"union",operator:i,name:r,suffix:s,title:e.title||"",description:e.description||"",required:a,properties:o,options:n}}if(Array.isArray(e.type)){if(e.type.length===2&&e.type.includes("null")){if(e.type.includes("object"))return Ps(e,t,r,a);if(e.type.includes("array"))return zs(e,t,r,a)}let i=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e)),n=[],o=[];if(i.type.forEach(l=>{l.match(/integer|number|string|null|boolean/g)?n.push(l):l==="array"&&typeof i.items?.type=="string"&&i.items?.type.match(/integer|number|string|null|boolean/g)?i.items.type==="string"&&(i.items.format||i.items.contentMediaType)?n.push(`[${i.items.format||i.items.contentMediaType}]`):n.push(`[${i.items.type}]`):o.push(l)}),o.length===0&&n.length>0)return i.type=n.join("\u2503"),Ms(i,r,a);if(o.length>0){let l=[],p=1;if(o.forEach(d=>{if(d==="object"){let c=Ps(e,t,e.title||`Option ${p}`,!1);c.optionIndex=p++,c.optionTitle=e.title||"",l.push(c)}else if(d==="array"){let c=zs(e,t,e.title||`Option ${p}`,!1);c.optionIndex=p++,c.optionTitle=e.title||"",l.push(c)}}),n.length>0){i.type=n.join("\u2503");let d=Ms(i,`Option ${p}`,!1);d.optionIndex=p++,l.push(d)}return{kind:"union",operator:"oneOf",name:r,title:e.title||"",description:e.description||"",required:a,options:l}}}return e.type==="object"||e.properties?Ps(e,t,r,a):e.type==="array"||e.items?zs(e,t,r,a):Ms(e,r,a)}function Us(e,t="",r="json"){let a=e,s="text";if(t?.toLowerCase().includes("json"))if(r==="text")a=typeof e=="string"?e:JSON.stringify(e,void 0,2),s="text";else if(typeof e=="object"&&e)a=e,s="json";else if(typeof e=="string")try{a=JSON.parse(e),s="json"}catch{a=e,s="text"}else a=e,s="json";else a=typeof e=="object"&&e?JSON.stringify(e,void 0,2):String(e??""),s="text";return{content:a,format:s}}function jt(e,t="",r=null,a=null,s=!0,i=!0,n="json",o=!1){let l=[],p=t?.toLowerCase().includes("json"),d=t?.toLowerCase().includes("xml");if(r&&typeof r=="object"&&Object.keys(r).length>0)for(let c in r){let{content:f,format:h}=Us(r[c]?.value===void 0?r[c]:r[c].value,t,n);l.push({exampleId:c,exampleSummary:r[c]?.summary||c,exampleDescription:r[c]?.description||"",exampleType:t,exampleValue:f,exampleFormat:h})}else if(a!=null&&(typeof a!="object"||Object.keys(a).length>0)){let{content:c,format:f}=Us(a?.value===void 0?a:a.value,t,n);l.push({exampleId:"Example",exampleSummary:a?.summary||"",exampleDescription:a?.description||"",exampleType:t,exampleValue:c,exampleFormat:f})}if(l.length===0||o===!0)if(e){let c=Fe(e);if(c!=null){let{content:f,format:h}=Us(c,t,n);l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:f,exampleFormat:h})}else if(p||d||t?.toLowerCase().includes("text")||t?.toLowerCase().includes("yaml")||t?.toLowerCase().includes("*/*")){let f="",h="",y=n;d&&(f=e.xml?.name?`<${e.xml.name}${e.xml.namespace?` xmlns="${e.xml.namespace}"`:""}>`:"<root>",h=e.xml?.name?`</${e.xml.name}>`:"</root>",y="text");let u=he(e,{includeReadOnly:s,includeWriteOnly:i,deprecated:!0,useXmlTagForProp:d}),g=0;for(let v in u){if(!u[v])continue;let S=u[v]["::TITLE"]||`Example ${++g}`,A=u[v]["::DESCRIPTION"]||"",b="";d?b=`<?xml version="1.0" encoding="UTF-8"?>
${f}${Bs(u[v],1)}
${h}`:(Ho(u[v]),b=n==="text"?JSON.stringify(u[v],null,2):u[v]),l.push({exampleId:v,exampleSummary:S,exampleDescription:A,exampleType:t,exampleFormat:y,exampleValue:b})}}else t?.toLowerCase().includes("jose")?l.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:t,exampleValue:e.pattern||"bXJpbg==",exampleFormat:"text"}):l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"})}else l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"});return l}function Ku(e){return e==="application/json"?"json":e==="application/xml"?"xml":null}function Wu(e){if(e.schema)return[e.schema,null,null];if(e.content){for(let t of Object.keys(e.content))if(e.content[t].schema)return[e.content[t].schema,Ku(t),e.content[t]]}return[null,null,null]}var Hs=Object.freeze([]);function Zo(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return{};t.add(e);let r={...e.properties};return Array.isArray(e.allOf)&&e.allOf.forEach(a=>{Object.assign(r,Zo(a,t))}),r}function Yo(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return[];t.add(e);let r=Array.isArray(e.required)?[...e.required]:[];return Array.isArray(e.allOf)&&e.allOf.forEach(a=>{r.push(...Yo(a,t))}),[...new Set(r)]}var Ks={200:"OK",201:"Created",202:"Accepted",204:"No Content",301:"Moved Permanently",302:"Found",304:"Not Modified",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",409:"Conflict",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},ur=!1,It=null,Nt=null,hr=null,da=null,pa=[],oe={statusCode:"",statusStrategy:"first",delay:0,log:"true"},ua=new Map;function Xo(e=[]){let t=new Set;return t.add(""),e.forEach(r=>{let a=r.computedUrl||r.url||"";if(a)try{if(a.startsWith("http://")||a.startsWith("https://")){let s=new URL(a).pathname.replace(/\/+$/,"");s&&t.add(s)}else{let s=a.replace(/\/+$/,"");s&&t.add(s.startsWith("/")?s:`/${s}`)}}catch{}}),Array.from(t)}function Vu(e,t=""){let r=((t.endsWith("/")?t.slice(0,-1):t)+(e.startsWith("/")?e:`/${e}`)).replace(/\{([a-zA-Z0-9_-]+)\}/g,"__PARAM_$1__").replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace(/__PARAM_([a-zA-Z0-9_-]+)__/g,"(?<$1>[^/?#]+)");return RegExp(`^${r}(?:\\/)?$`)}function Ju(e){let t=[],r=Xo(e?.servers);if(!e?.tags||!Array.isArray(e.tags))return t;let a=new Set;return e.tags.forEach(s=>{(s.paths||[]).forEach(i=>{let n=(i.method||"GET").toUpperCase(),o=i.path||"",l=`${n} ${o}`;if(a.has(l))return;a.add(l);let p=(i.servers?.length>0?Xo(i.servers):r).map(d=>Vu(o,d));t.push({method:n,pathTemplate:o,routeKey:l,patterns:p,responses:i.responses||{},parameters:i.parameters||[]})})}),t}function Qo(e,t){if(!pa.length||!t)return null;let r;try{let i=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost";r=new URL(t,i)}catch{return null}let a=(e||"GET").toUpperCase(),s=decodeURI(r.pathname);for(let i of pa)if(i.method===a)for(let n of i.patterns){let o=s.match(n);if(o)return{route:i,pathParams:o.groups||{},url:r}}return null}function el(e,t,r,a={}){let s=(e||"").split(",").map(i=>i.trim()).filter(Boolean);if(s.length===0)return Object.keys(a).find(i=>i.startsWith("2"))||("default"in a?"default":Object.keys(a)[0]||"200");if(t==="random")return s[Math.floor(Math.random()*s.length)];if(t==="cycle"){let i=ua.get(r)||0,n=s[i%s.length];return ua.set(r,(i+1)%s.length),n}return s[0]}function tl(e,t){let r=e.responses?.[t]||e.responses?.[String(t)]||e.responses?.default,a={"X-Mock-Server":"RapiDoc","Access-Control-Allow-Origin":"*"},s="",i="application/json";if(r?.content){let n=Object.keys(r.content);i=n.find(l=>l.includes("json"))||n.find(l=>l.includes("xml"))||n.find(l=>l.includes("text"))||n[0]||"application/json";let o=r.content[i];if(o){if(o.example!==void 0)s=typeof o.example=="object"?JSON.stringify(o.example,null,2):String(o.example);else if(o.examples&&Object.keys(o.examples).length>0){let l=Object.values(o.examples)[0]?.value;l!==void 0&&(s=typeof l=="object"?JSON.stringify(l,null,2):String(l))}if(!s&&o.schema){let l=jt(o.schema,i,null,null,!0,!1,"text",!0);if(l&&l.length>0){let p=l[0].exampleValue;s=typeof p=="object"?JSON.stringify(p,null,2):String(p)}}}}if(!s)if(String(t)==="204")s="";else if(i.includes("json")){let n=Number(t)||200;s=JSON.stringify({status:n,message:Ks[n]||"Mock Response"},null,2)}else s=Ks[Number(t)]||"OK";return r?.headers&&Object.entries(r.headers).forEach(([n,o])=>{o.schema?.default===void 0?o.example!==void 0&&(a[n]=String(o.example)):a[n]=String(o.schema.default)}),String(t)!=="204"&&(a["Content-Type"]=i),{statusCode:Number(t)||200,statusText:Ks[Number(t)]||(t==="default"?"OK":"Mock Response"),headers:a,body:s}}function ha(e,t={}){oe={statusCode:t.statusCode||"",statusStrategy:t.statusStrategy||"first",delay:Number(t.delay)||0,log:t.log!=="false"},pa=Ju(e),ua.clear(),!ur&&typeof window<"u"&&(!It&&window.fetch&&(It=window.fetch,window.fetch=async function(r,a={}){if(!ur)return It.apply(this,arguments);let s="",i="GET";typeof r=="string"?(s=r,i=a?.method||"GET"):r instanceof URL?(s=r.href,i=a?.method||"GET"):r&&typeof r=="object"&&"url"in r&&(s=r.url,i=a?.method||r.method||"GET");let n=Qo(i,s);if(!n)return It.apply(this,arguments);let o=el(oe.statusCode,oe.statusStrategy,n.route.routeKey,n.route.responses),l=tl(n.route,o);return oe.delay>0&&await new Promise(p=>setTimeout(p,oe.delay)),oe.log,new Response(l.body,{status:l.statusCode,statusText:l.statusText,headers:l.headers})}),!Nt&&window.XMLHttpRequest&&(Nt=window.XMLHttpRequest.prototype.open,hr=window.XMLHttpRequest.prototype.send,da=window.XMLHttpRequest.prototype.setRequestHeader,window.XMLHttpRequest.prototype.open=function(r,a,...s){return this._mockMethod=r,this._mockUrl=a,this._mockHeaders={},Nt.apply(this,[r,a,...s])},window.XMLHttpRequest.prototype.setRequestHeader=function(r,a){return this._mockHeaders&&(this._mockHeaders[r]=a),da.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){if(!ur)return hr.apply(this,arguments);let r=Qo(this._mockMethod,this._mockUrl);if(!r)return hr.apply(this,arguments);let a=el(oe.statusCode,oe.statusStrategy,r.route.routeKey,r.route.responses),s=tl(r.route,a),i=oe.delay>0?oe.delay:10;setTimeout(()=>{oe.log,Object.defineProperty(this,"readyState",{value:4,writable:!0}),Object.defineProperty(this,"status",{value:s.statusCode,writable:!0}),Object.defineProperty(this,"statusText",{value:s.statusText,writable:!0}),Object.defineProperty(this,"responseText",{value:s.body,writable:!0}),Object.defineProperty(this,"response",{value:s.body,writable:!0});let n=Object.entries(s.headers).map(([o,l])=>`${o}: ${l}\r
`).join("");this.getAllResponseHeaders=()=>n,this.getResponseHeader=o=>{let l=o.toLowerCase(),p=Object.keys(s.headers).find(d=>d.toLowerCase()===l);return p?s.headers[p]:null},this.dispatchEvent(new Event("readystatechange")),this.dispatchEvent(new Event("load")),this.dispatchEvent(new Event("loadend")),typeof this.onreadystatechange=="function"&&this.onreadystatechange(),typeof this.onload=="function"&&this.onload()},i)}),ur=!0)}function ma(){ur=!1,pa=[],ua.clear(),typeof window<"u"&&(It&&=(window.fetch=It,null),Nt&&(window.XMLHttpRequest.prototype.open=Nt,window.XMLHttpRequest.prototype.send=hr,window.XMLHttpRequest.prototype.setRequestHeader=da,Nt=null,hr=null,da=null))}function rl(e={}){e.statusCode!==void 0&&(oe.statusCode=e.statusCode),e.statusStrategy!==void 0&&(oe.statusStrategy=e.statusStrategy),e.delay!==void 0&&(oe.delay=Number(e.delay)||0),e.log!==void 0&&(oe.log=e.log!=="false")}var Pe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fa=e=>(...t)=>({_$litDirective$:e,values:t}),ga=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Ws=class extends ga{constructor(e){if(super(e),this.it=F,e.type!==Pe.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===F||e==null)return this._t=void 0,this.it=e;if(e===se)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:[]}}};Ws.directiveName="unsafeHTML",Ws.resultType=1;var z=fa(Ws),al;function M(e){if(typeof e!="string")return"";if(typeof window<"u"&&window.Sanitizer&&Element.prototype.setHTML)try{let s=document.createElement("div");return al??=new window.Sanitizer({allowAttributes:{"*":["*"]}}),s.setHTML(e,{sanitizer:al}),s.innerHTML}catch{}let t;if(typeof DOMParser<"u")t=new DOMParser().parseFromString(e,"text/html");else return e;let r=t.querySelectorAll("script");for(let s=r.length-1;s>=0;s--)r[s].parentNode.removeChild(r[s]);let a=t.querySelectorAll("*");for(let s=0;s<a.length;s++){let i=a[s];for(let n=i.attributes.length-1;n>=0;n--){let o=i.attributes[n],l=o.name.toLowerCase(),p=o.value.toLowerCase();(l.startsWith("on")||(l==="href"||l==="src")&&(p.includes("javascript:")||p.includes("data:text/html")))&&i.removeAttribute(o.name)}}return t.body.innerHTML}function Gu(e="",t={}){let r=e;if(!t||typeof t!="object")return r;for(let[a,s]of Object.entries(t)){let i=s==null?"":String(s),n=`{${a}}`;r=r.replaceAll(n,encodeURIComponent(i))}return r}function Zu(e,t,r={}){let{style:a="form",explode:s=a==="form",isArray:i=Array.isArray(t),isObject:n=!1}=r;if(t==null||t==="")return[];if(n||typeof t=="object"&&!Array.isArray(t)){let o=t;if(typeof t=="string")try{o=JSON.parse(t)}catch{return[]}if(!o||typeof o!="object")return[];if(a==="json")return[[e,JSON.stringify(o)]];if(a==="xml")return[[e,Bs(o)]];let l=[];for(let p of Object.keys(o)){let d=`${e}[${p}]`,c=o[p];if(c!=null)if(typeof c=="object"&&Array.isArray(c)){let f=c.filter(h=>h!==""&&h!=null);f.length>0&&(a==="spaceDelimited"?l.push([d,f.join(" ")]):a==="pipeDelimited"?l.push([d,f.join("|")]):s?f.forEach(h=>l.push([d,String(h)])):l.push([d,f.join(",")]))}else typeof c=="object"?l.push([d,JSON.stringify(c)]):l.push([d,String(c)])}return l}if(i||Array.isArray(t)){let o=(Array.isArray(t)?t:[t]).filter(l=>l!==""&&l!=null);return o.length===0?[]:a==="spaceDelimited"?[[e,o.join(" ")]]:a==="pipeDelimited"?[[e,o.join("|")]]:s?o.map(l=>[e,String(l)]):[[e,o.join(",")]]}return[[e,String(t)]]}function Yu(e){return encodeURI(e).replace(/&/g,"%26").replace(/=/g,"%3D").replace(/\+/g,"%2B")}function Xu(e=[]){if(!Array.isArray(e)||e.length===0)return"";let t=[];for(let r of e){let{name:a,value:s,style:i="form",explode:n=i==="form",allowReserved:o=!1,isArray:l=!1,isObject:p=!1}=r,d=Zu(a,s,{style:i,explode:n,isArray:l,isObject:p});for(let[c,f]of d){let h=encodeURIComponent(c),y=o?Yu(f):encodeURIComponent(f);t.push(`${h}=${y}`)}}return t.join("&")}function Qu(e,t="oauth-receiver.html"){if(/^[a-z][a-z0-9+.-]*:/i.test(t))return new URL(t);if(t.startsWith("/"))return new URL(t,e.origin);let r=e.pathname.substring(0,e.pathname.lastIndexOf("/"));return new URL(`${e.origin}${r}/${t}`)}function eh(e="",t=""){return`${(e||"").replace(/\/+$/,"")}${t?`/${t.replace(/^\/+/,"")}`:""}`}function th({serverUrl:e="",path:t="",pathParams:r={},queryParams:a=[],apiKeys:s=[]}={}){let i=Gu(t,r),n=Xu(a);return n&&(i=`${i}${i.includes("?")?"&":"?"}${n}`),Array.isArray(s)&&s.filter(o=>o&&o.in==="query"&&o.finalKeyValue).forEach(o=>{i=`${i}${i.includes("?")?"&":"?"}${encodeURIComponent(o.name)}=${encodeURIComponent(o.finalKeyValue)}`}),eh(e,i)}var sl="rapidoc-oauth";function il(e){let t="";for(let r of e)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Vs(e=32){return il(crypto.getRandomValues(new Uint8Array(e)))}async function rh(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e));return il(new Uint8Array(t))}function ah(e){if(e.search&&e.search.length>1){let t=new URLSearchParams(e.search);return{responseType:"code",code:t.get("code"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}if(e.hash&&e.hash.length>1){let t=new URLSearchParams(e.hash.slice(1));return{responseType:"token",accessToken:t.get("access_token"),tokenType:t.get("token_type"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}return null}var ol="rapidoc";function ll(e){try{let t=new TextEncoder().encode(e),r="";for(let a=0;a<t.byteLength;a++)r+=String.fromCharCode(t[a]);return btoa(r)}catch{return btoa(e)}}function ya(e){let t=new URLSearchParams;if(!e)return t;if(e instanceof URLSearchParams){for(let[r,a]of e.entries())t.set(r,a);return t}if(typeof e=="object")return Object.entries(e).forEach(([r,a])=>{a!=null&&t.set(r,String(a))}),t;if(typeof e=="string"){let r=e.trim();if(r.startsWith("{")&&r.endsWith("}"))try{let i=JSON.parse(r);if(typeof i=="object"&&i)return Object.entries(i).forEach(([n,o])=>{o!=null&&t.set(n,String(o))}),t}catch{}let a=r.startsWith("?")?r.slice(1):r,s=new URLSearchParams(a);for(let[i,n]of s.entries())t.set(i,n);return t}return t}function lt(e,t="",r="",a="",s=""){let i=this.resolvedSpec.securitySchemes?.find(o=>o.securitySchemeId===e);if(!i)return!1;let n="";return i.scheme?.toLowerCase()==="basic"?t&&(n=`Basic ${ll(`${t}:${r}`)}`):a&&(i.value=a,n=`${i.scheme?.toLowerCase()==="bearer"?"Bearer ":""}${a}`),n?(i.finalKeyValue=n,i.hostNote=s?String(s):"",i.hostFormOpen=!1,this.requestUpdate(),!0):!1}function Js(){this.resolvedSpec.securitySchemes?.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue="",e.hostNote=""}),this.requestUpdate()}function Gs(){return JSON.parse(localStorage.getItem(ol))||{}}function cl(e){localStorage.setItem(ol,JSON.stringify(e))}function sh(){let e=Gs.call(this);Object.values(e).forEach(t=>{lt.call(this,t.securitySchemeId,t.username,t.password,t.value)})}function Zs(e){let t="",r=this.resolvedSpec.securitySchemes.find(a=>a.securitySchemeId===e);if(r){let a=this.shadowRoot.getElementById(`security-scheme-${e}`);if(a){if(r.type&&r.scheme&&r.type==="http"&&r.scheme.toLowerCase()==="basic"){let s=a.querySelector(".api-key-user").value.trim(),i=a.querySelector(".api-key-password").value.trim();lt.call(this,e,s,i)}else t=a.querySelector(".api-key-input").value.trim(),lt.call(this,e,"","",t);if(this.persistAuth==="true"){let s=Gs.call(this);s[e]=r,cl.call(this,s)}}}}function dl(e,t,r="Bearer"){let a=this.resolvedSpec.securitySchemes.find(s=>s.securitySchemeId===e);a.finalKeyValue=`${r.toLowerCase()==="bearer"?"Bearer":r.toLowerCase()==="mac"?"MAC":r} ${t}`,a.hostNote="",this.requestUpdate()}/* OAuth security patch start */
// Extends RapiDoc 12 OAuth with strict callbacks and cancellable transactions.
// Reuses dl (apply token), ya (parameters), Vs (randomness) and rh (PKCE).
const oauthAuthorization = (() => {
const pending = new WeakMap();
const lifetime = 5 * 60 * 1000;
function display(element, message) {
if (element) element.textContent = message;
}
function stopCallback(operation) {
if (operation.listener) window.removeEventListener('message', operation.listener);
clearInterval(operation.poll);
operation.listener = undefined;
if (operation.popup && !operation.popup.closed) operation.popup.close();
}
function finish(operation) {
if (!operation.active) return;
operation.active = false;
stopCallback(operation);
clearTimeout(operation.deadline);
window.removeEventListener('pagehide', operation.onPageHide);
operation.controller.abort();
if (operation.operations.get(operation.scheme) === operation) {
operation.operations.delete(operation.scheme);
}
}
function begin(viewer, scheme, element) {
let operations = pending.get(viewer);
if (!operations) {
operations = new Map();
pending.set(viewer, operations);
}
const previous = operations.get(scheme);
if (previous) finish(previous);
const operation = {
active: true, operations, scheme, element, spec: viewer.resolvedSpec,
controller: new AbortController(),
};
operations.set(scheme, operation);
operation.onPageHide = () => finish(operation);
window.addEventListener('pagehide', operation.onPageHide, { once: true });
operation.deadline = setTimeout(() => {
display(element, 'Authorization timed out. Please try again.');
finish(operation);
}, lifetime);
return operation;
}
function validText(value) {
return typeof value === 'string' && value.length > 0;
}
function isCurrent(viewer, operation) {
if (!operation.active) return false;
if (operation.spec === viewer.resolvedSpec) return true;
finish(operation);
return false;
}
async function fetchToken(viewer, operation, tokenUrl, clientId, clientSecret,
redirectUrl, grantType, authCode, sendClientSecretIn, scopes, username, password, verifier, tokenParamsSpec) {
try {
const form = ya(tokenParamsSpec);
for (const [name, value] of ya(viewer.additionalTokenParams)) form.set(name, value);
// Extensions may add provider parameters, but cannot introduce a second
// authentication method or stale values from another grant.
for (const name of ['grant_type', 'client_id', 'client_secret', 'code',
'code_verifier', 'redirect_uri', 'username', 'password']) form.delete(name);
const headers = new Headers();
form.set('grant_type', grantType);
if (clientSecret && sendClientSecretIn === 'header') {
// RFC 6749 section 2.3.1 encodes each credential before HTTP Basic.
const encode = (value) => new URLSearchParams([['', value]]).toString().slice(1);
headers.set('Authorization', `Basic ${btoa(`${encode(clientId)}:${encode(clientSecret)}`)}`);
} else {
form.set('client_id', clientId);
if (clientSecret) form.set('client_secret', clientSecret);
}
if (grantType === 'authorization_code') {
form.set('redirect_uri', redirectUrl);
form.set('code', authCode);
if (verifier) form.set('code_verifier', verifier);
}
if (grantType === 'password') {
form.set('username', username);
form.set('password', password);
}
if (scopes) form.set('scope', scopes);
const request = { method: 'POST', headers, body: form };
const beforeToken = new CustomEvent('before-token-request', {
bubbles: true, composed: true, cancelable: true,
detail: { securitySchemeId: operation.scheme, grantType, tokenUrl,
params: form, headers, request },
});
if (!viewer.dispatchEvent(beforeToken) || !isCurrent(viewer, operation)) return false;
const response = await fetch(tokenUrl, { ...request, signal: operation.controller.signal });
const token = await response.json();
if (!isCurrent(viewer, operation)) return false;
if (!response.ok || !token || typeof token !== 'object' || Array.isArray(token) || 'error' in token
|| !validText(token.access_token) || !validText(token.token_type)) {
display(operation.element, token && typeof token.error_description === 'string'
? token.error_description : 'Unable to get access token');
return false;
}
dl.call(viewer, operation.scheme, token.access_token, token.token_type);
display(operation.element, 'Access Token Received');
return true;
} catch {
if (operation.active) display(operation.element, 'Failed to get access token');
return false;
} finally {
finish(operation);
}
}
async function invoke(scheme, flowType, authUrl, tokenUrl, event, authorizeParamsSpec, tokenParamsSpec) {
const flow = event.target.closest('.oauth-flow');
const read = (selector, fallback = '') => flow.querySelector(selector)?.value ?? fallback;
const clientId = read('.oauth-client-id');
const clientSecret = read('.oauth-client-secret');
const username = read('.api-key-user');
const password = read('.api-key-password');
const sendSecretIn = read('.oauth-send-client-secret-in', 'request-body');
const scopes = [...flow.querySelectorAll('.scope-checkbox:checked')].map((e) => e.value).join(' ');
const element = flow.querySelector('.oauth-resp-display');
display(element, '');
const operation = begin(this, scheme, element);
if (flowType === 'clientCredentials' || flowType === 'password') {
return fetchToken(this, operation, tokenUrl, clientId, clientSecret, '',
flowType === 'clientCredentials' ? 'client_credentials' : 'password', '',
sendSecretIn, scopes, username, password, undefined, tokenParamsSpec);
}
if (flowType !== 'authorizationCode' && flowType !== 'implicit') {
finish(operation);
return false;
}
try {
const redirect = new URL(this.oauthReceiver || 'oauth-receiver.html', document.baseURI);
if (redirect.origin !== window.location.origin) throw new Error('OAuth receiver must be same-origin');
const authorization = new URL(authUrl);
if (!['https:', 'http:'].includes(authorization.protocol)) throw new Error('Invalid authorization URL');
// Open synchronously during the user gesture, before SHA-256 yields.
operation.popup = window.open('about:blank', '_blank');
if (!operation.popup) throw new Error('Authorization popup was blocked');
operation.poll = setInterval(() => {
if (operation.popup.closed) finish(operation);
}, 250);
const state = Vs();
const nonce = Vs();
const verifier = Vs();
const pkceInput = [...flow.querySelectorAll('input[id]')].find((input) => input.id === `${scheme}-pkce`);
const usePkce = flowType === 'authorizationCode' && Boolean(pkceInput?.checked);
const responseType = flowType === 'implicit' ? 'token' : 'code';
const parameters = authorization.searchParams;
for (const [name, value] of ya(authorizeParamsSpec)) parameters.set(name, value);
for (const [name, value] of ya(this.additionalAuthorizeParams)) parameters.set(name, value);
parameters.set('client_id', clientId);
parameters.set('redirect_uri', redirect.href);
parameters.set('response_type', responseType);
parameters.set('state', state);
parameters.set('nonce', nonce);
if (scopes) parameters.set('scope', scopes);
if (usePkce) {
parameters.set('code_challenge', await rh(verifier));
parameters.set('code_challenge_method', 'S256');
} else {
parameters.delete('code_challenge');
parameters.delete('code_challenge_method');
}
const beforeAuthorize = new CustomEvent('before-authorize', {
bubbles: true, composed: true, cancelable: true,
detail: { securitySchemeId: scheme, flowType, authUrl, authParams: parameters },
});
if (!this.dispatchEvent(beforeAuthorize)) {
finish(operation);
return false;
}
if (!isCurrent(this, operation) || operation.popup.closed) {
finish(operation);
return false;
}
operation.listener = (message) => {
const data = message.data;
if (!isCurrent(this, operation) || operation.callbackConsumed || message.origin !== redirect.origin
|| message.source !== operation.popup || !data || typeof data !== 'object'
|| Array.isArray(data) || data.state !== state) return;
if (validText(data.error)) {
display(element, validText(data.error_description) ? data.error_description : 'Authorization was denied');
finish(operation);
return;
}
if (data.responseType !== responseType) return;
if (responseType === 'code' && !validText(data.code)) return;
if (responseType === 'token' && (!validText(data.access_token) || !validText(data.token_type))) return;
operation.callbackConsumed = true;
// Stop listening before applying credentials or beginning an exchange.
// Keep the overall deadline and pagehide cancellation during fetch.
stopCallback(operation);
if (responseType === 'token') {
dl.call(this, scheme, data.access_token, data.token_type);
display(element, 'Access Token Received');
finish(operation);
} else {
void fetchToken(this, operation, tokenUrl, clientId, clientSecret, redirect.href,
'authorization_code', data.code, sendSecretIn, '', '', '', usePkce ? verifier : undefined, tokenParamsSpec);
}
};
window.addEventListener('message', operation.listener);
operation.popup.location.replace(authorization.href);
return true;
} catch {
if (operation.active) display(element, 'Unable to start authorization. Allow popups and use a secure browser context.');
finish(operation);
return false;
}
}
return { invoke };
})();
function oh(...args) { return oauthAuthorization.invoke.apply(this, args); }
/* OAuth security patch end */
function lh(e,t,r,a,s,i=[],n="request-body",o=void 0,l="true",p=null,d=null){let{authorizationUrl:c,tokenUrl:f,refreshUrl:h}=s,y=s["x-pkce-only"]||!1,u=new URL(this.selectedServer.computedUrl,document.baseURI);c&&(c=new URL(c,u).href),f&&(f=new URL(f,u).href),h&&(h=new URL(h,u).href);let v;v=e==="authorizationCode"?"Authorization Code Flow":e==="clientCredentials"?"Client Credentials Flow":e==="implicit"?"Implicit Flow":e==="password"?"Password Flow":e;let S=e==="authorizationCode"||e==="clientCredentials"||e==="password",A=S||e==="implicit";return m`<div class="oauth-flow ${e}"><h3 class="rapidoc-heading label-heading tiny-title upper" part="heading heading-3">${v}</h3>${c||f||h?m`<dl class="oauth-urls">${c?m`<dt>Auth URL</dt><dd class="mono-font">${c}</dd>`:""} ${f?m`<dt>Token URL</dt><dd class="mono-font">${f}</dd>`:""} ${h?m`<dt>Refresh URL</dt><dd class="mono-font">${h}</dd>`:""}</dl>`:""} ${A&&s.scopes?m`<div class="oauth-scopes-label">Scopes</div><div class="oauth-scopes" part="section-auth-scopes">${Object.entries(s.scopes).map(([b,w],$)=>m`<label class="auth-toggle" for="${a}${e}${$}"><input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${a}${e}${$}" ?checked="${i.includes(b)}" value="${b}"> <span><span class="oauth-scope-name mono-font">${b}</span>${b!==w&&w?m`<span class="oauth-scope-descr">${w}</span>`:""}</span></label>`)}</div>`:""} ${A&&l==="true"?m`${e==="authorizationCode"?m`<label class="auth-toggle oauth-pkce" for="${a}-pkce"><input type="checkbox" part="checkbox checkbox-auth-scope" id="${a}-pkce" checked="checked" ?disabled="${y}"> <span>Send Proof Key for Code Exchange (PKCE)</span></label>`:""} ${e==="password"?m`<div class="auth-controls"><input type="text" placeholder="username" spellcheck="false" class="oauth2 ${e} ${a} api-key-user" part="textbox textbox-username" id="input-${a}-${e}-api-key-user"> <input type="password" placeholder="password" spellcheck="false" class="oauth2 ${e} ${a} api-key-password" part="textbox textbox-password" id="input-${a}-${e}-api-key-password"></div>`:""}<div class="auth-controls"><input type="text" part="textbox textbox-auth-client-id" value="${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-id"> ${S?m`<input id="${a}-${e}-oauth-client-secret" type="password" part="textbox textbox-auth-client-secret" value="${r||""}" placeholder="client-secret" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-secret" ?hidden="${y}"> <select class="${e} ${a} oauth-send-client-secret-in" aria-label="Send client secret in" ?hidden="${y}">${!o||o.includes("request-body")?m`<option value="request-body" .selected="${n==="request-body"}">Request Body</option>`:""} ${!o||o.includes("header")?m`<option value="header" .selected="${n==="header"}">Authorization Header</option>`:""}</select>`:""} <button class="btn btn-outline" part="btn btn-outline" @click="${b=>{oh.call(this,a,e,c,f,b,p,d)}}">GET TOKEN</button></div><div class="oauth-resp-display red-text small-font-size"></div>`:""}</div>`}function ch(e){let t=this.resolvedSpec.securitySchemes?.find(r=>r.securitySchemeId===e);if(t.user="",t.password="",t.value="",t.finalKeyValue="",t.hostNote="",this.persistAuth==="true"){let r=Gs.call(this);delete r[t.securitySchemeId],cl.call(this,r)}this.requestUpdate()}function pl(e="true"){if(!this.resolvedSpec)return"";let t=this.resolvedSpec.securitySchemes?.filter(r=>r.finalKeyValue);if(t)return m`<section id="auth" part="section-auth" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}"><h2 class="rapidoc-heading sub-title regular-font" part="section-auth-title heading heading-2">Authentication</h2>${e==="true"?m`<div class="auth-status small-font-size">${t.length>0?m`<div class="blue-text">${t.length} API key applied</div><button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Js.call(this)}}">CLEAR ALL API KEYS</button>`:m`<div class="red-text">No API key applied</div>`}</div>`:""} ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?m`<ul class="auth-list" id="auth-list" part="auth-list" role="list">${this.resolvedSpec.securitySchemes.filter(r=>r.type).map(r=>{let a=e==="true"&&r.finalKeyValue?r.hostNote:"",s=a&&!r.hostFormOpen;return m`<li id="security-scheme-${r.securitySchemeId}" class="auth-scheme ${r.type.toLowerCase()}" part="auth-scheme"><div class="auth-scheme-body"><div class="auth-scheme-header"><span class="auth-scheme-title">${r.typeDisplay}</span> ${r.finalKeyValue?m`<span class="blue-text">Key Applied</span> <button class="btn btn-outline btn-sm" part="btn btn-outline" @click="${()=>{ch.call(this,r.securitySchemeId)}}">REMOVE</button>`:""}</div>${r.description?m`<div class="m-markdown">${z(M(O(r.description||"")))}</div>`:""} ${a?m`<div class="auth-host-note" part="auth-host-note">${a}</div><button class="btn btn-link auth-host-toggle" part="btn btn-link" aria-expanded="${s?"false":"true"}" @click="${()=>{r.hostFormOpen=!r.hostFormOpen,this.requestUpdate()}}">${s?"Use a different token":"Hide token form"}</button>`:""} ${!s&&r.type.toLowerCase()==="apikey"?m`<div class="auth-hint">Send <code>${r.name}</code> in <code>${r.in}</code></div>${e==="true"?r.in==="cookie"?m`<div class="auth-hint gray-text">Cookies cannot be set from here</div>`:m`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Zs.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!s&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="basic"?m`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.</div>${e==="true"?m`<div class="auth-controls"><input type="text" value="${r.user}" placeholder="username" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-user" id="input-${r.type}-${r.securitySchemeId}-api-key-user"> <input type="password" value="${r.password}" placeholder="password" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-password" id="input-${r.type}-${r.securitySchemeId}-api-key-password"> <button class="btn btn-outline" @click="${()=>{Zs.call(this,r.securitySchemeId)}}" part="btn btn-outline">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!s&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="bearer"?m`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and token value</div>${e==="true"?m`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Zs.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""}</div>${!s&&r.type.toLowerCase()==="oauth2"?m`<div class="auth-flows" part="auth-flows">${Object.keys(r.flows).map(i=>lh.call(this,i,r.flows[i]["x-client-id"]||r["x-client-id"]||"",r.flows[i]["x-client-secret"]||r["x-client-secret"]||"",r.securitySchemeId,r.flows[i],r.flows[i]["x-default-scopes"]||r["x-default-scopes"],r.flows[i]["x-receive-token-in"]||r["x-receive-token-in"],r.flows[i]["x-receive-token-in-options"]||r["x-receive-token-in-options"],e,r.flows[i]["x-authorize-params"]||r["x-authorize-params"]||null,r.flows[i]["x-token-params"]||r["x-token-params"]||null))}</div>`:""}</li>`})}</ul>`:""}<slot name="auth"></slot></section>`}function dh(e,t,r){let a=e.scopes?m`<div><b>Required scopes:</b><br><div style="margin-left:8px">${e.scopes.split(",").map((s,i)=>m`${i===0?"":"\u2503"}<span>${s.trim()}</span>`)}</div></div>`:"";return e.type==="oauth2"?m`<div>${t?m`<b>${r+1}.</b> `:"Needs "}OAuth Token <span style="font-family:var(--font-mono);color:var(--primary)">${e.securitySchemeId}</span> in <b>Authorization header</b> ${a}</div>`:e.type==="http"?m`<div>${t?m`<b>${r+1}.</b> `:"Requires "} ${e.scheme==="basic"?"Base 64 encoded username:password":m`Bearer Token <b>${e.nameId}</b>`} in <b>Authorization header</b> ${a}</div>`:m`<div>${t?m`<b>${r+1}.</b> `:"Requires "} Token in <b>${e.name} ${e.in}</b> ${a}</div>`}var ph=typeof CSS<"u"&&CSS.supports?.("anchor-name: --a"),Xs=new WeakMap,qe=null;function ul(e){e.key==="Escape"&&qe&&Qs(qe)}function Qs(e){e.matches(":popover-open")&&e.hidePopover(),qe===e&&(qe=null,document.removeEventListener("keydown",ul))}function uh(e,t){let r=e.getBoundingClientRect(),{offsetWidth:a,offsetHeight:s}=t,i=Math.max(8,Math.min(r.left,window.innerWidth-a-8)),n=r.bottom+6+s>window.innerHeight&&r.top-6-s>=0?r.top-6-s:r.bottom+6;Object.assign(t.style,{inset:"auto",margin:"0",left:`${i}px`,top:`${n}px`})}function ei(e){let t=e.currentTarget.closest(".security-chip"),r=t?.querySelector(".security-popover");r&&typeof r.showPopover=="function"&&(clearTimeout(Xs.get(t)),qe&&qe!==r&&Qs(qe),r.matches(":popover-open")||r.showPopover(),ph||uh(t,r),qe!==r&&(qe=r,document.addEventListener("keydown",ul)))}function hl(e){let t=e.currentTarget;clearTimeout(Xs.get(t)),Xs.set(t,setTimeout(()=>{let r=t.querySelector(".security-popover");r&&!t.matches(":hover, :focus-within")&&Qs(r)},150))}var ml=m`<svg class="security-lock" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke-width="1.75"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>`;function fl(e,t=""){if(!this.resolvedSpec.securitySchemes||!Array.isArray(e)||e.length===0)return"";let r=e.some(o=>!o||Object.keys(o).length===0),a=e.filter(o=>o&&Object.keys(o).length>0);if(a.length===0)return"";let s=[];a.forEach(o=>{let l=[],p=[];Object.keys(o).forEach(c=>{let f="",h=this.resolvedSpec.securitySchemes.find(y=>y.securitySchemeId===c);o[c]&&Array.isArray(o[c])&&(f=o[c].join(", ")),h&&(p.push(h.typeDisplay),l.push({...h,scopes:f}))});let d=p.length>1?`${p[0]} + ${p.length-1} more`:p[0];s.push({securityTypes:r?`${d} (Optional)`:d,securityDefs:l})});let i=`${t||"operation"}--security`,n=`--${i.replace(/[^\w-]/g,"_")}`;return m`<div class="operation-security" part="section-operation-security" role="group" aria-labelledby="${i}-label"><span id="${i}-label" class="security-label visually-hidden" part="label-operation-security">Authorization</span> ${this.updateRoute==="true"&&this.allowAuthentication==="true"?m`<a class="security-lock-btn" part="anchor anchor-operation-security" href="#auth" title="Go to Authentication" aria-label="Authorization: go to Authentication section">${ml}</a>`:m`<span class="security-lock-btn">${ml}</span>`}<ul class="value-list-items security-chips" role="list">${s.map((o,l)=>{if(!o.securityTypes)return"";let p=o.securityDefs.length>1,d=o.securityDefs.length>0,c=`${i}-${l}`,f=`${n}-${l}`,h=d?m`<button type="button" class="security-chip-label" aria-describedby="${c}" @click="${ei}">${o.securityTypes}</button>`:m`<span class="security-chip-label">${o.securityTypes}</span>`;return m`<li><span class="security-chip ${d?"has-details":""}" part="operation-security-chip" style="anchor-name:${f}" @mouseenter="${ei}" @mouseleave="${hl}" @focusin="${ei}" @focusout="${hl}">${h} ${d?m`<div id="${c}" class="security-popover" part="operation-security-details" popover="hint" role="tooltip" style="position-anchor:${f}">${p?m`<div>Requires <b>all</b> of the following:</div>`:""}<div style="padding-left:${p?"8px":"0"}">${o.securityDefs.map((y,u)=>dh(y,p,u))}</div></div>`:""}</span></li>`})}</ul></div>`}function gl(e){return m`<div class="code-samples-container"><h4 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-4">Code samples</h4><div part="tab-panel" class="tab-panel col" @click="${t=>{if(!t.target.classList.contains("tab-btn"))return;let r=t.target.dataset.tab,a=[...t.currentTarget.querySelectorAll(".tab-btn")],s=[...t.currentTarget.querySelectorAll(".tab-content")];a.forEach(i=>i.classList[i.dataset.tab===r?"add":"remove"]("active")),s.forEach(i=>{i.style.display=i.dataset.tab===r?"block":"none"}),_r(t.currentTarget.getRootNode()?.host?.shadowRoot||t.currentTarget)}}"><div part="tab-btn-row" class="tab-buttons row" style="width:100%;overflow:auto">${e.map((t,r)=>m`<button part="tab-btn" class="tab-btn ${r===0?"active":""}" data-tab="${t.lang}${r}">${t.label||t.lang}</button>`)}</div>${e.map((t,r)=>m`<div class="tab-content m-markdown" style="display:${r===0?"block":"none"}" data-tab="${t.lang}${r}"><button class="btn btn-sm btn-outline toolbar-btn" part="btn btn-outline btn-copy" @click="${a=>{Xt(t.source,a)}}">Copy</button><pre><code class="language-${t.lang?.toLowerCase()}">${t.source}</code></pre></div>`)}</div></div>`}function yl(e){return m`<h4 class="rapidoc-heading label-heading req-res-title" part="heading heading-4">Callbacks</h4>${Object.entries(e).map(t=>m`<div class="tiny-title" style="padding:12px;border:1px solid var(--border)"><h5 class="rapidoc-heading callback-name" part="heading heading-5">${t[0]}</h5>${Object.entries(t[1]).map(r=>m`<div class="callback-operation-list mono-font small-font-size">${Object.entries(r[1]).map(a=>m`<div class="callback-operation-item"><div class="callback-operation-header"><div class="method method-fg ${a[0]} callback-method"><span style="font-size:20px">⥄ </span>${a[0]}</div><span style="line-height:20px;vertical-align:baseline">${r[0]}</span></div><div class="expanded-req-resp-container"><api-request .config="${this.config}" class="${this.renderStyle}-mode callback" style="width:100%" callback="true" method="${a[0]||""}" path="${r[0]||""}" .parameters="${a[1]?.parameters||""}" .request_body="${a[1]?.requestBody||""}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="false" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":"true"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request><api-response .config="${this.config}" style="width:100%" class="${this.renderStyle}-mode" callback="true" .responses="${a[1]?.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":"true"}" schema-hide-write-only="false" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`)}</div>`)}</div>`)}`}var hh={},fr=fa(class extends ga{constructor(){super(...arguments),this.ot=hh}render(e,t){return t()}update(e,[t,r]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((a,s)=>a===this.ot[s]))return se}else if(this.ot===t)return se;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,r)}}),ba=W`.border-top{border-top:1px solid var(--border)}.border,.light-border{border:1px solid var(--border);border-radius:min(var(--radius), .5rem)}.pad-8-16{padding:8px 16px}.pad-top-8{padding-top:8px}.mar-top-8{margin-top:8px}`;function ti(e){if(!e||typeof e!="string")return e||"";let t=[];return e.split(",").map(r=>{let a=r.trim(),s=a.toLowerCase();return t.includes(s)?null:(t.push(s),a)}).filter(r=>r!==null).join(", ")}function mh({method:e="GET",url:t="",headers:r,body:a,contentType:s="",baseLocation:i=typeof location<"u"?location.href:""}={}){let n=t;if(!t.startsWith("http://")&&!t.startsWith("https://")&&i)try{n=new URL(t,i).href}catch{n=t}let o=`curl -X ${e.toUpperCase()} "${n}" \\
`,l=[];r instanceof Headers||r&&typeof r.forEach=="function"?r.forEach((h,y)=>{l.push([y,ti(h)])}):Array.isArray(r)?r.forEach(([h,y])=>{l.push([h,ti(y)])}):r&&typeof r=="object"&&Object.entries(r).forEach(([h,y])=>{l.push([h,ti(String(y))])});let p=l.map(([h,y])=>` -H '${h}: ${y}'`).join(`\\
`);p&&=`${p} \\
`;let d="",c="";if(typeof URLSearchParams<"u"&&a instanceof URLSearchParams)d=` -d ${a.toString()} \\
`;else if(typeof File<"u"&&a instanceof File)d=` --data-binary @${a.name} \\
`;else if(typeof FormData<"u"&&a instanceof FormData)c=Array.from(a).map(([h,y])=>typeof File<"u"&&y instanceof File?` -F "${h}=@${y.name}"`:` -F "${h}=${typeof y=="string"?y.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):y}"`).join(`\\
`),c&&=`${c} \\
`;else if(a!=null&&a!==""){let h=typeof a=="object"?JSON.stringify(a):String(a);if(s.includes("json")||h.trim().startsWith("{")&&h.trim().endsWith("}"))try{d=` -d '${JSON.stringify(JSON.parse(h)).replace(/'/g,"'\\''")}' \\
`}catch{}d||=` -d '${h.replace(/'/g,`'"'"'`)}' \\
`}let f=`${o}${p}${d}${c}`;return f.endsWith(` \\
`)?f.slice(0,-3):f}function fh(e,t={}){let{explode:r=!1,isObject:a=!1}=t;if(e==null||e==="")return"";if(a||typeof e=="object"&&!Array.isArray(e)){let s=e;if(typeof e=="string")try{s=JSON.parse(e.replace(/\n/g,"").trim())}catch{return""}if(!s||typeof s!="object")return"";let i=r?"=":",";return Object.keys(s).map(n=>{let o=s[n],l=typeof o=="object"?JSON.stringify(o):String(o);return`${n}${i}${l}`}).join(",")}return Array.isArray(e)?e.filter(s=>s!==""&&s!=null).join(","):String(e)}function gh({accept:e="",apiKeys:t=[],headerParams:r=[],contentType:a=""}={}){let s=new Headers;return e&&s.append("Accept",e),Array.isArray(t)&&t.filter(i=>i&&i.in==="header"&&i.finalKeyValue).forEach(i=>{s.append(i.name,i.finalKeyValue)}),Array.isArray(r)&&r.forEach(i=>{if(i&&i.name&&i.value!==void 0&&i.value!==null&&i.value!==""){let n=fh(i.value,{explode:i.explode===!0||i.explode==="true",isObject:i.isObject===!0});n&&s.append(i.name,n)}}),a&&!a.includes("form-data")&&s.append("Content-Type",a),s}function bl(e=[],t=""){let r=new URLSearchParams;if(t)try{let a=JSON.parse(t);if(a&&typeof a=="object"){for(let s of Object.keys(a))r.append(s,typeof a[s]=="object"?JSON.stringify(a[s]):String(a[s]));return r}}catch{}return Array.isArray(e)&&e.forEach(a=>{if(a&&a.name&&a.value!==void 0&&a.value!==null&&a.value!=="")if(a.isArray){let s=(Array.isArray(a.value)?a.value:[a.value]).filter(i=>i!==""&&i!=null);s.length>0&&r.append(a.name,s.join(","))}else r.append(a.name,String(a.value))}),r}function yh(e=[]){let t=new FormData;return Array.isArray(e)&&e.forEach(r=>{r&&r.name&&(typeof File<"u"&&r.file instanceof File?t.append(r.name,r.file,r.file.name):r.value!==void 0&&r.value!==null&&r.value!==""&&(r.isArray?(Array.isArray(r.value)?r.value:[r.value]).filter(a=>a!==""&&a!=null).forEach(a=>{typeof File<"u"&&a instanceof File?t.append(r.name,a,a.name):t.append(r.name,String(a))}):t.append(r.name,String(r.value))))}),t}function bh(e,{indentor:t=" ",textNodesOnSameLine:r=!0}={}){if(!e||typeof e!="string")return"";let a=e.split(/(<[^>]+>)/g).map(n=>n.trim()).filter(Boolean),s=0,i=[];for(let n=0;n<a.length;n++){let o=a[n],l=o.startsWith("</"),p=o.endsWith("/>"),d=/^<[^/!?]/.test(o)&&!p;l&&(s=Math.max(0,s-1));let c=t.repeat(s);if(r&&d&&n+2<a.length&&!a[n+1].startsWith("<")&&a[n+2].startsWith("</")){let f=o.match(/^<([a-zA-Z0-9_\-:]+)/)?.[1],h=a[n+2].match(/^<\/([a-zA-Z0-9_\-:]+)/)?.[1];if(f&&h&&f===h){i.push(`${c}${o}${a[n+1]}${a[n+2]}`),n+=2;continue}}i.push(`${c}${o}`),d&&s++}return i.join(`
`)}async function vh(e){let t,r,a,s=!1,i="",n="",o="",l="",p=e.headers.get("content-type");if((await e.clone().text()).length===0)l="";else if(p){if(p=p.split(";")[0].trim(),p==="application/x-ndjson")l=await e.text();else if(p.includes("json"))if(/charset=[^"']+/.test(p)){let d=p.split("charset=")[1],c=await e.arrayBuffer();try{a=new TextDecoder(d).decode(c)}catch{a=new TextDecoder("utf-8").decode(c)}try{r=JSON.parse(a),l=JSON.stringify(r,null,2)}catch{l=a}}else r=await e.json(),l=JSON.stringify(r,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(p)?(s=!0,i="download"):p.startsWith("image")?(s=!0,i="image"):/^audio|^image|^video/.test(p)?(s=!0,i="view"):(a=await e.text(),l=p.includes("xml")?bh(a,{textNodesOnSameLine:!0,indentor:" "}):a);if(s){let d=e.headers.get("content-disposition")||"",c="filename";if(d){let f=d.match(/filename\*=\s*UTF-8''([^;]+)/);if(f)c=decodeURIComponent(f[1]);else{let h=d.match(/filename="?([^"]+)"?/);h&&(c=h[1])}}o=c,t=await e.blob(),typeof URL<"u"&&URL.createObjectURL&&(n=URL.createObjectURL(t))}}else a=await e.text(),l=a;return{responseText:l,respJson:r,respBlob:t,respText:a,responseIsBlob:s,responseBlobType:i,responseBlobUrl:n,respContentDisposition:o}}function xh(e,t={}){let{callback:r=!1,webhook:a=!1}=t,s=r===!0||r==="true"||a===!0||a==="true",i={},n={},o="",l="";if(!e||typeof e!="object")return{headersForEachRespStatus:i,mimeResponsesForEachStatus:n,defaultStatus:o,defaultMimeType:l};for(let p of Object.keys(e)){if(p==="$$ref")continue;o||=p;let d={},c=e[p]?.content;if(c&&typeof c=="object")for(let h of Object.keys(c)){let y=c[h];l||=h;let u=y?.schema?ae(y.schema):null,g=jt(y?.schema,h,be(y?.examples),be(y?.example),!s,s,h.includes("json")?"json":"text");d[h]={description:e[p].description,examples:g,selectedExample:g[0]?.exampleId||"",schemaTree:u}}let f=[];if(e[p]?.headers)for(let h of Object.keys(e[p].headers))f.push({name:h,...e[p].headers[h]});i[p]=f,n[p]=d}return{headersForEachRespStatus:i,mimeResponsesForEachStatus:n,defaultStatus:o,defaultMimeType:l}}var{I:wh}=hc,vl=e=>e,$h=e=>e.strings===void 0,xl=()=>document.createComment(""),gr=(e,t,r)=>{let a=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(r===void 0)r=new wh(a.insertBefore(xl(),s),a.insertBefore(xl(),s),e,e.options);else{let i=r._$AB.nextSibling,n=r._$AM,o=n!==e;if(o){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==n._$AU&&r._$AP(l)}if(i!==s||o){let l=r._$AA;for(;l!==i;){let p=vl(l).nextSibling;vl(a).insertBefore(l,s),l=p}}}return r},ct=(e,t,r=e)=>(e._$AI(t,r),e),kh={},wl=(e,t=kh)=>e._$AH=t,Sh=e=>e._$AH,ri=e=>{e._$AR(),e._$AA.remove()},yr=fa(class extends ga{constructor(e){if(super(e),e.type!==Pe.PROPERTY&&e.type!==Pe.ATTRIBUTE&&e.type!==Pe.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!$h(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===se||t===F)return t;let r=e.element,a=e.name;if(e.type===Pe.PROPERTY){if(t===r[a])return se}else if(e.type===Pe.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(a))return se}else if(e.type===Pe.ATTRIBUTE&&r.getAttribute(a)===t+"")return se;return wl(e),t}}),$l=W`*,:before,:after{box-sizing:border-box}:host{interpolate-size:allow-keywords;container-type:inline-size}.tr{box-sizing:content-box;border-bottom:1px dotted #0000;flex:none;width:100%;transition:max-height .3s ease-out;display:flex;&.expanded-descr{max-height:3000px;@supports (interpolate-size:allow-keywords){max-height:max-content}}}.td{flex:none;display:block}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-all-descr .key{overflow:hidden}.key-descr{font-family:var(--font-sans);color:var(--muted-foreground);flex-shrink:1;align-items:flex-start;gap:4px;min-width:0;display:none;overflow:hidden;& .descr-expand-toggle{top:0;text-align:center;user-select:none;width:1em;color:var(--foreground);cursor:pointer;visibility:hidden;border-radius:2px;font-weight:400;transition:transform .2s;position:absolute;inset-inline-start:0;transform:rotate(45deg);&:hover{color:var(--primary)}&:focus-visible{outline:2px solid var(--primary)}}& .descr-body{flex:1;min-width:0;padding-inline-start:calc(1em + 4px);position:relative;&>.descr-expand-toggle+*{margin-top:0}& .item-details{margin-top:2px}& .descr-chip{line-break:anywhere;margin-right:8px;display:inline-block}& .descr-summary{display:none}& .descr-placeholder{color:var(--muted-foreground)}}& .descr-label,& b{font-weight:500;font-size:var(--font-size-xs);color:var(--primary)}& .descr-value{font-family:var(--font-mono);font-size:var(--font-size-small);line-height:1}}.expanded-descr .key-descr .descr-expand-toggle{transform:rotate(-90deg)}.key-descr .descr-body.has-more>.descr-expand-toggle,.tr.expanded-descr .key-descr .descr-expand-toggle{visibility:visible}.expanded-all-descr .tr .key-descr .descr-body>.descr-expand-toggle{visibility:hidden}.collapsed-all-descr .tr.expanded-descr .descr-body{cursor:pointer}.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{white-space:nowrap;text-overflow:ellipsis;color:var(--foreground);overflow:hidden;&.has-more{cursor:pointer}&>.descr-expand-toggle+*{white-space:inherit;margin:0;padding:0;display:inline}&>.descr-expand-toggle+:is(ul,ol)>li{display:inline}&>.descr-expand-toggle+:is(h1,h2,h3,h4,h5,h6){font-size:var(--font-size-description);line-height:inherit;font-weight:600}& .descr-chip{display:inline}&>.descr-expand-toggle+:is(ul,ol)>li:not(:first-child),&>.descr-expand-toggle+*~*{display:none}}@supports (container-type:scroll-state){.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{container-type:scroll-state}@container scroll-state(scrollable:inline-end){.descr-body>*{cursor:pointer}.descr-body>.descr-expand-toggle{visibility:visible}}}.xxx-of-key{font-size:var(--font-size-xs);line-height:calc(var(--font-size-small) + 1px);border-radius:var(--radius);corner-shape:squircle;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);vertical-align:middle;margin-bottom:1px;padding:1px 6px;display:inline-block}.xxx-of-descr{font-family:var(--font-sans);color:var(--primary);font-size:var(--font-size-xs);vertical-align:middle;margin-inline-start:4px}.stri,.string,.uri,.url,.byte,.bina,.date,.pass,.ipv4,.ipv4,.uuid,.emai,.host{color:var(--green)}.inte,.numb,.number,.int6,.int3,.floa,.doub,.deci .blue{color:var(--blue)}.null{color:var(--destructive)}.bool,.boolean{color:var(--orange)}.enum,.cons{color:var(--purple)}.recu{color:var(--brown)}.toolbar{width:100%;color:var(--primary);padding:2px 0;display:flex}.toolbar-item{cursor:pointer;margin:0 2px;padding:5px 0;&:first-of-type{margin:0 2px 0 0}}.schema-root-type{cursor:auto;color:var(--muted-foreground);text-transform:uppercase;font-weight:600}@container (width>=500px){.key-descr{display:flex}}`;function x(e,t,r,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}var Ah=/[*_`~[\]<>#|\\&\n]|https?:|ftp:|www\.|@|^([-+]|\d+[.)])\s|^-{3,}$/;function kl(e){return!Ah.test(e)}var va=new Map,Eh=5e3;function Dh(e,t){let r=`${t}
${e}`,a=va.get(r);if(a)return a;let s=e?O.lexer(e).find(f=>f.type!=="space"):null,i=en(s),n=t?`<b>${t}${e?":":""}</b>`:"",o=!!n&&!!s&&s.type!=="paragraph",l=o?`${n} ${i||Qi(s)}`:i,p=n&&e?`${n}${o?`
`:" "}${e}`:n||e,d=p?O.lexer(p):[],c=d.filter(f=>f.type!=="space");return a={summary:l?M(l):"",html:c.length?M(O.parser(d)).trim():"",hasMore:!!l||c.length>1||c[0]?.type==="list"&&c[0].items.length>1||/<br\s*\/?>(?!\s*$)/i.test(p)},va.size>=Eh&&va.clear(),va.set(r,a),a}var Re=class extends ve{constructor(...e){super(...e),this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="true"}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly)),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}handleAllEvents(e){let t=e.target.closest(".open-bracket, .obj-toggle");if(t)this.toggleObjectExpand(t);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.closest(".descr-expand-toggle, .descr-body")){if(this.schemaDescriptionExpanded==="true"||e.target.closest("a")||window.getSelection()?.isCollapsed===!1)return;let r=e.target.closest(".tr");if(r&&(r.classList.contains("expanded-descr")||this.descrHasMore(e.target.closest(".descr-body")))){let a=r.classList.toggle("expanded-descr");r.querySelector(".descr-expand-toggle")?.setAttribute("aria-expanded",a?"true":"false")}}}descrHasMore(e){if(!e)return!1;let t=e.querySelector(":scope > .descr-expand-toggle");return t&&getComputedStyle(t).visibility==="visible"||e.scrollWidth>e.clientWidth}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){let t=e.target.closest(".open-bracket, .obj-toggle, .descr-expand-toggle, .schema-multiline-toggle");t&&(e.preventDefault(),t.click())}}toggleObjectExpand(e){let t=e.closest(".tr");if(!t)return;let r=t.classList.contains("collapsed");r?t.classList.replace("collapsed","expanded"):t.classList.replace("expanded","collapsed");let a=t.querySelector(".open-bracket, .obj-toggle");a&&a.setAttribute("aria-expanded",r?"true":"false")}isFieldHidden(e){return!!(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)}renderDeprecatedIcon(e){return e?.deprecated?m`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--destructive);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}getReadWriteBadge(e){return e?.readOnly?m`🆁`:e?.writeOnly?m`🆆`:""}getReadWriteTip(e){return e?.readOnly?"Read-Only":e?.writeOnly?"Write-Only":""}getDataTypeCss(e){return(e||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase()}hasDetailChips(e){return!!(e&&(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding))}renderDetailChips(e){return e?m`${e.constraints?m`<div class="descr-chip"><span class="descr-label">Constraints:</span> <span class="descr-value">${e.constraints}</span></div>`:""} ${e.defaultValue?m`<div class="descr-chip"><span class="descr-label">Default:</span> <span class="descr-value">${e.defaultValue}</span></div>`:""} ${e.allowedValues?m`<div class="descr-chip"><span class="descr-label">${e.type==="const"?"Value":"Allowed"}:</span> <span class="descr-value">${e.allowedValues}</span></div>`:""} ${e.pattern?m`<div class="descr-chip"><span class="descr-label">Pattern:</span> <span class="descr-value">${e.pattern}</span></div>`:""} ${e.contentMediaType?m`<div class="descr-chip"><span class="descr-label">Media-Type:</span> <span class="descr-value">${e.contentMediaType}</span></div>`:""} ${e.contentEncoding?m`<div class="descr-chip"><span class="descr-label">Encoding:</span> <span class="descr-value">${e.contentEncoding}</span></div>`:""}`:""}renderDescriptionHtml(e,t=""){return!e&&!t?"":m`${z(M(O(t?e?`<b>${t}:</b> ${e}`:`<b>${t}</b>`:e)))}`}renderDescrCell(e,t=null,r=""){let a=typeof e=="string"?e.trim():"",s=this.hasDetailChips(t);if(!a&&!r&&!s)return m`<div class="td key-descr"></div>`;let i,n;if(kl(a)&&kl(r))i=r?m`<p><b>${r}${a?":":""}</b> ${a}</p>`:a?m`<p>${a}</p>`:"",n=s&&!!i;else{let l=Dh(a,r);i=m`${l.summary?m`<span class="descr-summary">${z(l.summary)}</span>`:""}${l.html?z(l.html):""}`,n=l.hasMore||!!l.html&&s}let o=this.schemaDescriptionExpanded==="true";return m`<div class="td key-descr"><div class="descr-body m-markdown-small ${n?"has-more":""}"><span class="descr-expand-toggle" role="button" tabindex="0" aria-label="Toggle description" aria-expanded="${o?"true":"false"}">➔</span>${i}${s?m`<div class="item-details">${this.renderDetailChips(t)}</div>`:""}</div></div>`}renderToolbar(e){return m`<div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?m`<div style="flex:1"></div><div part="schema-toolbar-item schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div>`}};x([k({type:Object})],Re.prototype,"config",void 0),x([k({type:Object})],Re.prototype,"data",void 0),x([k({type:Number,attribute:"schema-expand-level"})],Re.prototype,"schemaExpandLevel",void 0),x([k({type:String,attribute:"schema-description-expanded"})],Re.prototype,"schemaDescriptionExpanded",void 0),x([k({type:String,attribute:"allow-schema-description-expand-toggle"})],Re.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([k({type:String,attribute:"schema-hide-read-only"})],Re.prototype,"schemaHideReadOnly",void 0),x([k({type:String,attribute:"schema-hide-write-only"})],Re.prototype,"schemaHideWriteOnly",void 0);var Sl=class extends Re{static get styles(){return[Xe,$l,ba,W`.tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);direction:ltr;& .tr:hover{background-color:#00000026}& .tr.expanded-descr{max-height:none}&.expanded-all-descr .tr,&.collapsed-all-descr .tr.expanded-descr{border-bottom:1px solid color-mix(in srgb, var(--border) 60%, transparent)}&.collapsed-all-descr .tr.expanded-descr{box-shadow:0 -1px 0 color-mix(in srgb, var(--border) 60%, transparent)}& .key{max-width:300px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 8px);overflow:hidden;& .key{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}}.tr{&.expanded{&:hover{&>.td.key>.open-bracket,&+.inside-bracket+.close-bracket{color:var(--primary)}&+.inside-bracket{border-left:1px solid var(--muted-foreground)}}& .open-bracket .open-bracket-collapsed{display:none}}&.collapsed{&+.inside-bracket,&+.inside-bracket+.close-bracket{display:none;overflow:hidden}& .open-bracket .open-bracket-expanded{display:none}}}.inside-bracket{&.xxx-of-option{border-left:1px solid #0000}&.object,&.array{border-left:1px dotted var(--border)}}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}.close-bracket{font-family:var(--font-mono);display:inline-block}`,mt]}render(){if(!this.data)return m`<div class="tree"><span class="mono-font" style="color:var(--destructive)">Schema not found</span></div>`;let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return m`<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span> ${this.renderAST(this.data)}</div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let s=400-a*12,i=r<this.schemaExpandLevel,n=this.getReadWriteBadge(e),o=this.getReadWriteTip(e),l=e.nullable?"null\u2503":"",p=e.nullable?"nullable":"",d=this.renderDeprecatedIcon(e);if(e.kind==="array"){let c=e.items;if(!c){let h=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${i?"expanded":"collapsed"} array ${p}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${h}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${n}:</span>`:""} <span class="open-bracket array">${l}[ ]</span></div>${this.renderDescrCell(e.description)}</div>`}if(c.kind==="primitive"){let h=c.format||c.contentMediaType||c.type||"string",y=this.getDataTypeCss(h),u=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr primitive ${p}" title="${e.deprecated||c.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${u}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${y}" title="${o||F}">${l}[${h}]${n}</span></div>${this.renderDescrCell(e.description||c.description,c)}</div>`}if(c.kind==="object"){let h=m`<span class="open-bracket array-of-object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${i?"true":"false"}">${l}<span class="open-bracket-expanded">[{</span><span class="open-bracket-collapsed">[{...}]</span></span>`,y=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${i?"expanded":"collapsed"} object ${p}" title="${e.deprecated||c.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${y}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${n}:</span>`:""} ${h}</div>${this.renderDescrCell(e.description||c.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${c.properties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${c.patternProperties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${c.additionalProperties?this.renderAST(c.additionalProperties,"object",r+1,a+1):""} ${c.unions?.map(u=>this.renderAST(u,"object",r+1,a+1))}</div><div class="close-bracket">${"}]"}</div>`}if(c.kind==="array"){let h=e.arrayType==="object"?"":e.arrayType,y=m`<span class="open-bracket array-of-array" data-array-type="${h}" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${i?"true":"false"}">${l}<span class="open-bracket-expanded">[[ ${h} </span><span class="open-bracket-collapsed">[[...]]</span></span>`,u=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${i?"expanded":"collapsed"} array ${p}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${u}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${n}:</span>`:""} ${y}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",r+1,a+1)}</div><div class="close-bracket">${"]]"}</div>`}let f=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${i?"expanded":"collapsed"} array ${p}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${f}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${n}:</span>`:""} <span class="open-bracket array" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${i?"true":"false"}">${l}<span class="open-bracket-expanded">[</span><span class="open-bracket-collapsed">[...]</span></span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",r+1,a+1)}</div><div class="close-bracket">]</div>`}if(e.kind==="object"){let c=m`<span class="open-bracket object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${i?"true":"false"}">${l}<span class="open-bracket-expanded">{</span><span class="open-bracket-collapsed">{...}</span></span>`,f=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${i?"expanded":"collapsed"} object ${p}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${f}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${n}:</span>`:""} ${c}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${e.properties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${e.patternProperties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+1):""} ${e.unions?.map(h=>this.renderAST(h,"object",r+1,a+1))}</div><div class="close-bracket">${"}"}</div>`}if(e.kind==="union"){let c=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),f=t==="xxx-of-option"?a:a+1,h=e.name&&t!=="xxx-of-option",y=h?s-12:s,u=m`<div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${y}px"><span class="key-label xxx-of-key">${c}</span></div>${h?"":this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:0">${e.options?.map((g,v)=>m`<div><div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${y}px"><span class="key-label xxx-of-key">OPT ${g.optionIndex||v+1}</span> ${g.optionTitle?m`<span class="xxx-of-descr">${g.optionTitle}</span>`:""}</div></div>${this.renderAST(g,"xxx-of-option",r,f)}</div>`)}</div>`;return m`${e.properties?.map(g=>this.renderAST(g,"object",r,a))} ${h?m`<div class="tr expanded xxx-of-prop"><div class="td key" style="min-width:${s}px"><span class="key-label" title="${e.name}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:${12}px">${u}</div>`:u}`}if(e.kind==="primitive"){let c=this.getDataTypeCss(e.type),f=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr primitive" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${f}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${c}" title="${o||F}">${t==="array"?`[${e.type}]`:e.type}${n}</span></div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};Sl=x([Ce("schema-tree")],Sl);var xa=class extends ve{constructor(...e){super(...e),this.placeholder="",this.value=[]}static get properties(){return Object.fromEntries(this.elementProperties||[])}render(){let e="";return Array.isArray(this.value)&&(e=m`${this.value.filter(t=>t!==""&&t!=null&&String(t).trim()!=="").map(t=>m`<span class="tag">${t}</span>`)}`),m`<div class="tags" @click="${t=>this.focusEditor(t)}">${e} <input type="text" class="editor" @paste="${t=>this.afterPaste(t)}" @keydown="${t=>this.afterKeyDown(t)}" @blur="${t=>this.onBlur(t)}" placeholder="${this.placeholder||""}"></div>`}focusEditor(e){e.target.classList.contains("tags")&&this.shadowRoot?.querySelector(".editor")?.focus()}attributeChangedCallback(e,t,r){e==="value"&&r&&t!==r&&(this.value=r.split(",").filter(a=>a.trim()!=="")),super.attributeChangedCallback(e,t,r)}dispatchEvents(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}}))}afterPaste(e){let t=(e.clipboardData||window.clipboardData).getData("Text"),r=t?t.split(",").filter(a=>a.trim()!==""):"";r&&(this.value=Array.isArray(this.value)?[...this.value,...r]:r,this.dispatchEvents()),e.preventDefault()}afterKeyDown(e){if(e.key==="Enter"||e.keyCode===13){e.stopPropagation(),e.preventDefault();let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}else(e.key==="Backspace"||e.key==="Delete"||e.keyCode===8||e.keyCode===46)&&(!e.target.value||e.target.value.length===0)&&Array.isArray(this.value)&&this.value.length>0&&(e.preventDefault(),this.value=this.value.slice(0,-1),this.dispatchEvents())}onBlur(e){let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}static get styles(){return[W`.tags{box-sizing:border-box;min-height:calc(2.75 * var(--font-size-small) + 2px);border-radius:var(--radius);border:1px solid var(--input);cursor:text;background:var(--input-background);outline:none;flex-wrap:wrap;align-items:center;padding:0;transition:border-color .2s,box-shadow .2s;display:flex;overflow:hidden;&:focus-within{border-color:var(--primary);box-shadow:var(--focus-shadow)}}.tag,.editor{margin:2px;padding:3px}.tag{border:1px solid var(--input);background:var(--muted);color:var(--foreground);border-radius:var(--radius);word-break:break-all;font-size:var(--font-size-small)}.tag:hover~#cursor{display:block}.editor{color:var(--foreground);min-width:60px;line-height:inherit;font-family:inherit;font-size:calc(var(--font-size-small) + 1px);background:0 0;border:1px solid #0000;outline:none;flex:1}.editor::placeholder{color:var(--muted-foreground);opacity:1}`]}};x([k({type:String})],xa.prototype,"placeholder",void 0),x([k({type:Array,attribute:"value",hasChanged(e,t){return e===t?!1:!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.some((r,a)=>r!==t[a])}})],xa.prototype,"value",void 0),xa=x([Ce("tag-input")],xa);function Ch(e,t){return m`<div class="value-list" part="value-list"><span class="param-constraint-label value-list-label" part="value-list-label">${e}</span><ul class="value-list-items" part="value-list-items" role="list">${t.map(r=>m`<li>${r}</li>`)}</ul></div>`}function Al(e,t,r){let a=i=>m`<ul class="value-list-items" part="value-list-items" role="list">${i.map(n=>m`<li>${n}</li>`)}</ul>`,s=(i,n)=>m`<dt class="param-constraint-label" part="param-constraint-label">${i}</dt><dd>${n}</dd>`;return m`<dl class="param-constraint" part="param-constraint">${e.default?s("Default:",e.default):""} ${e.pattern?s("Pattern:",e.pattern):""} ${e.constrain?s("Limits:",a(e.constrain.split("\u2503").map(i=>i.trim()).filter(Boolean))):""} ${t?s("Allowed:",a(t)):""} ${r?s("Examples:",a(r)):""}</dl>`}function El(e,t,r=[]){return!e?.trim()&&!!t&&r.length>0&&!Uo(r)}function wa(e,t,r){return m`${t==="array"?"[":""} <button type="button" part="anchor anchor-param-example" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-example-type="${t==="array"?t:"string"}" data-example="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" title="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" @click="${a=>{let s=a.target.closest(".param-list").querySelector(`[data-pname="${r}"]`);s&&(s.value=a.target.dataset.exampleType==="array"?a.target.dataset.example.split("~|~"):a.target.dataset.example)}}">${e.printableValue||e.value}</button> ${t==="array"?"] ":""}`}function Th(e,t,r){return Ch("Examples:",e.map(a=>wa.call(this,a,t,r)))}function Oh(e,t,r){return m`<ul class="param-example-list" part="param-example-list" role="list">${e.map(a=>m`<li>${wa.call(this,a,t,r)} ${a.summary?.length>0?m`<span>(${a.summary})</span>`:""} ${a.description?.length>0?m`<div class="m-markdown-small">${z(M(O(a.description)))}</div>`:""}</li>`)}</ul>`}function Dl(e,t,r=[]){return m`${r.length>0?Uo(r)?m`<span class="param-constraint-label">Examples: </span>${Oh.call(this,r,t,e)}`:Th.call(this,r,t,e):""}`}function $a(e){let t=this.parameters?this.parameters.filter(s=>s.in===e):[];if(t.length===0)return"";let r="";e==="path"?r="Path parameters":e==="query"?r="Query-string parameters":e==="header"?r="Request headers":e==="cookie"&&(r="Cookies");let a=[];for(let s of t){let[i,n,o]=Wu(s);if(!i)continue;let l=ia(i);if(!l)continue;let p=ae(i),d="form",c=!0,f=!1;(e==="query"||e==="header"||e==="path")&&(s.style&&"form spaceDelimited pipeDelimited".includes(s.style)?d=s.style:n&&(d=n),typeof s.explode=="boolean"&&(c=s.explode),typeof s.allowReserved=="boolean"&&(f=s.allowReserved));let h=Mo(be(s.examples)||be(s.example)||be(o?.example)||be(o?.examples)||be(l.examples)||be(l.example),l.type);!h.exampleVal&&(l.type==="object"||l.type.split("\u2503").includes("object"))&&(h.exampleVal=jt(i,n||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1)[0]?.exampleValue||"");let y=l.default||l.constrain||l.allowedValues||l.pattern,u=El(s.description,y,h.exampleList);a.push(m`<li class="param ${s.deprecated?"deprecated":""}" part="param" title="${s.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${s.deprecated?"deprecated":""}" part="param-name">${s.deprecated?m`<svg class="param-deprecated-icon" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${s.required?m`<span class="param-required" title="Required">*</span>`:""} ${s.name}</div><div class="param-type" part="param-type">${l.type==="array"||l.type.split("\u2503").includes("array")?`${l.arrayType||l.type}`:`${l.format&&!l.type.includes("\u2503")?l.format:l.contentMediaType&&!l.type.includes("\u2503")?l.contentMediaType:l.type}`}</div></div>${this.allowTry==="true"?m`<div class="param-input" part="param-input">${l.type==="array"||l.type.split("\u2503").includes("array")&&!l.type.split("\u2503").includes("object")?m`<tag-input class="request-param" id="tag-input-request-param-${s.name}" style="width:100%" data-ptype="${e}" data-pname="${s.name}" data-example="${Array.isArray(h.exampleVal)?h.exampleVal.join("~|~"):h.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${c}" data-param-allow-reserved="${f}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="true" placeholder="add-multiple ↩" .value="${s["x-fill-example"]==="no"?Hs:yr(this.fillRequestFieldsWithExample==="true"?Array.isArray(h.exampleVal)?h.exampleVal:[h.exampleVal]:Hs)}" @input="${g=>{let v=this.getRequestPanel(g);this.liveCURLSyntaxUpdate(v)}}" @change="${g=>{let v=this.getRequestPanel(g);this.liveCURLSyntaxUpdate(v)}}"></tag-input>`:l.type==="object"||l.type.split("\u2503").includes("object")?m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${g=>{if(g.target.tagName.toLowerCase()==="button"){let v={...this.activeParameterSchemaTabs};v[s.name]=g.target.dataset.tab,this.activeParameterSchemaTabs=v}}}"><button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div>${m`<div part="tab-content" class="tab-content col" data-tab="example" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"block":"none"};padding-left:5px;width:100%"><textarea id="textarea-request-param-${s.name}" class="textarea request-param" part="textarea textarea-param" data-ptype="${e}-object" data-pname="${s.name}" data-example="${h.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${c}" data-param-allow-reserved="${f}" data-x-fill-example="${s["x-fill-example"]||"yes"}" spellcheck="false" .value="${s["x-fill-example"]==="no"?"":yr(this.fillRequestFieldsWithExample==="true"?typeof h.exampleVal=="object"?JSON.stringify(h.exampleVal,null,2):h.exampleVal:"")}" style="resize:vertical;width:100%;height:${"read focused".includes(this.renderStyle)?"180px":"120px"}" @input="${g=>{let v=this.getRequestPanel(g);this.liveCURLSyntaxUpdate(v)}}"></textarea></div>`} ${m`<div part="tab-content" class="tab-content col" data-tab="schema" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"none":"block"};padding-left:5px;width:100%"><schema-tree class="json" style="display:block" .data="${p}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly.includes(this.method)}" schema-hide-write-only="${this.schemaHideWriteOnly.includes(this.method)}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
anchor:anchor, anchor-param-example:anchor-param-example"></schema-tree></div>`}</div>`:m`<input type="${l.format==="password"?"password":"text"}" spellcheck="false" style="width:100%" id="input-request-param-${s.name}" class="request-param" part="textbox textbox-param" data-ptype="${e}" data-pname="${s.name}" data-example="${Array.isArray(h.exampleVal)?h.exampleVal.join("~|~"):h.exampleVal}" data-param-allow-reserved="${f}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="false" .value="${s["x-fill-example"]==="no"?"":yr(this.fillRequestFieldsWithExample==="true"?h.exampleVal:"")}" @input="${g=>{let v=this.getRequestPanel(g);this.liveCURLSyntaxUpdate(v)}}">`}</div>`:""} ${y?Al(l,l.allowedValues&&String(l.allowedValues).split("\u2503").map(g=>m`<button type="button" part="anchor anchor-param-constraint" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-type="${l.type==="array"?l.type:"string"}" data-enum="${g.trim()}" @click="${v=>{let S=v.target.closest(".param-list").querySelector(`[data-pname="${s.name}"]`);S&&(S.value=v.target.dataset.type==="array"?[v.target.dataset.enum]:v.target.dataset.enum)}}">${g}</button>`),u&&h.exampleList.map(g=>wa.call(this,g,l.type,s.name))):""}<div class="param-details" part="param-details">${s.description?m`<div class="m-markdown-small">${z(M(O(s.description)))}</div>`:""} ${u?"":Dl.call(this,s.name,l.type,h.exampleList)}</div></li>`)}return m`<h5 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-5">${r}</h5><div class="param-list-container"><ul class="param-list" part="param-list" role="list">${a}</ul></div>`}var Cl=(e,t,r)=>{let a=new Map;for(let s=t;s<=r;s++)a.set(e[s],s);return a},_h=fa(class extends ga{constructor(e){if(super(e),e.type!==Pe.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let a;r===void 0?r=t:t!==void 0&&(a=t);let s=[],i=[],n=0;for(let o of e)s[n]=a?a(o,n):n,i[n]=r(o,n),n++;return{values:i,keys:s}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,a]){let s=Sh(e),{values:i,keys:n}=this.dt(t,r,a);if(!Array.isArray(s))return this.ut=n,i;let o=this.ut??=[],l=[],p,d,c=0,f=s.length-1,h=0,y=i.length-1;for(;c<=f&&h<=y;)if(s[c]===null)c++;else if(s[f]===null)f--;else if(o[c]===n[h])l[h]=ct(s[c],i[h]),c++,h++;else if(o[f]===n[y])l[y]=ct(s[f],i[y]),f--,y--;else if(o[c]===n[y])l[y]=ct(s[c],i[y]),gr(e,l[y+1],s[c]),c++,y--;else if(o[f]===n[h])l[h]=ct(s[f],i[h]),gr(e,s[c],s[f]),f--,h++;else if(p===void 0&&(p=Cl(n,h,y),d=Cl(o,c,f)),p.has(o[c]))if(p.has(o[f])){let u=d.get(n[h]),g=u===void 0?null:s[u];if(g===null){let v=gr(e,s[c]);ct(v,i[h]),l[h]=v}else l[h]=ct(g,i[h]),gr(e,s[c],g),s[u]=null;h++}else ri(s[f]),f--;else ri(s[c]),c++;for(;h<=y;){let u=gr(e,l[y+1]);ct(u,i[h]),l[h++]=u}for(;c<=f;){let u=s[c++];u!==null&&ri(u)}return this.ut=n,wl(e,l),se}}),Tl=e=>e??F,Ol=class extends Re{static get styles(){return[Xe,$l,W`.table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);& .table-container{border:1px solid var(--border);background:color-mix(in srgb, var(--card) 80%, transparent);max-width:100%;overflow-x:auto}& .table-header{background:var(--card);border-bottom:1px solid var(--border);padding:8px 4px;display:flex;& .td{font-family:var(--font-sans);color:var(--foreground);font-weight:700}}& .tr{border-bottom:1px dotted var(--border);width:calc(100% - 5px);padding:0 0 0 5px;&.expanded{& .obj-toggle:after{content:"-"}&+.object-body{display:block}}&.collapsed{& .obj-toggle:after{content:"+"}&+.object-body{display:none}}}& .td{padding:4px 0}& .key{width:var(--table-schema-key-width);text-overflow:var(--table-schema-key-text-overflow);white-space:var(--table-schema-key-whitespace);overflow:hidden;& .key-label{font-size:var(--font-size-mono)}&.deprecated .key-label{color:var(--destructive)}}& .key-type{white-space:normal;width:150px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 16px);overflow:hidden}}.obj-toggle{color:var(--primary);cursor:pointer;font-size:14px;font-family:var(--font-mono);text-align:center;user-select:none;box-sizing:border-box;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:2px;justify-content:center;align-items:center;width:14px;min-width:14px;height:14px;margin-top:-2px;margin-left:-16px;padding:0;line-height:12px;display:inline-flex;&:hover{border-color:var(--primary)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}@supports (grid-template-columns:subgrid){.table{& .table-container{grid-template-columns:minmax(var(--table-schema-key-width), auto) minmax(150px, auto) 1fr;display:grid}& .table-header,& .tr{grid-column:1/-1;grid-template-columns:subgrid;box-sizing:border-box;width:100%;padding:0 4px;display:grid;& .key,& .key-type{width:auto}& .key-descr{min-width:0}}& .object-body{display:contents}& .tr.collapsed+.object-body{display:none}& .tr.expanded+.object-body{display:contents}}}`,mt]}render(){if(!this.data)return"";let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return m`<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span><div class="table-container"><div class="tr table-header"><div class="td key">Field</div><div class="td key-type">Type</div><div class="td key-descr">Description</div></div>${this.renderAST(this.data)}</div></div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let s=16*(a+1),i=r<this.schemaExpandLevel,n=e.nullable?"nullable":"",o=this.renderDeprecatedIcon(e),l=this.getReadWriteBadge(e),p=this.getReadWriteTip(e);if(e.kind==="array"){let d=e.items;if(!d){let h=e.dataTypeLabel||(e.nullable?"array \u2503 null":"array");return m`<div class="tr array ${n}" data-obj="${e.name||""}"><div class="td key" style="padding-left:${s}px"><span class="key-label" title="${e.name||F}">${o}${e.name||""}</span> ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${p||F}">${h}${l}</div>${this.renderDescrCell(e.description)}</div>`}if(d.kind==="primitive"){let h=d.format||d.contentMediaType||d.type||"string",y=this.getDataTypeCss(h);return m`<div class="tr primitive ${n}" title="${e.deprecated||d.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||d.deprecated?"deprecated":""}" style="padding-left:${s}px">${o}${e.name?m`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${y}" title="${p||F}">[${h}]${e.nullable?" \u2503 null":""}${l}</div>${this.renderDescrCell(e.description||d.description,d)}</div>`}let c="array";d.kind==="object"?c="array of object":d.kind==="array"?c=`array of array ${e.arrayType?`of ${e.arrayType}`:""}`.trim():d.kind==="union"&&(c="array of union"),e.nullable&&(c+=" \u2503 null");let f=d.kind!=="object"||!!(d.properties&&d.properties.length>0||d.patternProperties&&d.patternProperties.length>0||d.additionalProperties||d.unions&&d.unions.length>0);return m`<div class="tr ${i?"expanded":"collapsed"} array ${n}" data-obj="${e.name||""}" title="${e.deprecated?`Deprecated ${e.name}`:e.name||F}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${e.name&&f?m`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${i?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||F}" style="display:inline-block;${f?"margin-left:-6px;":""}">${o}${e.name||""} </span>${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${p||F}">${c}${l}</div>${this.renderDescrCell(e.description||d.description)}</div>${f?m`<div class="object-body">${d.kind==="object"?m`${d.properties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${d.patternProperties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${d.additionalProperties?this.renderAST(d.additionalProperties,"object",r+1,a+1):""} ${d.unions?.map(h=>this.renderAST(h,"object",r+1,a+1))}`:this.renderAST(d,"array",r+1,a+1)}</div>`:""}`}if(e.kind==="object"){let d=e.dataTypeLabel||(e.nullable?"object \u2503 null":"object"),c=!!(e.properties&&e.properties.length>0||e.patternProperties&&e.patternProperties.length>0||e.additionalProperties||e.unions&&e.unions.length>0);return m`${e.name?m`<div class="tr ${i?"expanded":"collapsed"} object ${n}" data-obj="${e.name}" title="${e.deprecated?`Deprecated ${e.name}`:e.name}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${c?m`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${i?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||F}" style="display:inline-block;${c?"margin-left:-6px;":""}">${o}${e.name} </span>${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${p||F}">${d}${l}</div>${this.renderDescrCell(e.description)}</div>`:""} ${c?m`<div class="object-body">${e.properties?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))} ${e.patternProperties?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+ +!!e.name):""} ${e.unions?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))}</div>`:""}`}if(e.kind==="union"){let d=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),c=e.name&&t!=="xxx-of-option";return m`${e.properties?.map(f=>this.renderAST(f,"object",r,a))}<div class="tr expanded xxx-of" data-obj="${c?e.name:d}">${c?m`<div class="td key" style="padding-left:${s}px"><span class="key-label" title="${e.name}">${e.name}</span> ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type"><span class="xxx-of-key">${d}</span></div>`:m`<div class="td key" style="padding-left:${s}px"><span class="xxx-of-key" style="margin-left:-6px">${d}</span></div><div class="td key-type"></div>`} ${this.renderDescrCell(e.description)}</div><div class="object-body">${e.options?.map((f,h)=>m`<div class="tr expanded xxx-of-option" data-obj="OPTION ${f.optionIndex||h+1}"><div class="td key" style="padding-left:${s+16}px"><span class="xxx-of-key">OPT ${f.optionIndex||h+1}</span> ${f.optionTitle?m`<span class="xxx-of-descr">${f.optionTitle}</span>`:""}</div><div class="td key-type"></div><div class="td key-descr"></div></div><div class="object-body">${this.renderAST(f,"xxx-of-option",r+1,a+1)}</div>`)}</div>`}if(e.kind==="primitive"){let d=this.getDataTypeCss(e.type);return m`<div class="tr primitive ${n}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${o}${e.name?m`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${d}" title="${p||F}">${t==="array"?`[${e.type}]`:e.type}${l}</div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};Ol=x([Ce("schema-table")],Ol);function Fh(e,t,r){let a=ae(t),s=jt(t,"json",be(t.examples),be(t.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return m`<div part="tab-panel" class="tab-panel row" style="min-height:220px;border-left:6px solid var(--border);align-items:stretch"><div style="width:24px;background:var(--border)"><div class="row" style="flex-direction:row-reverse;width:160px;height:24px;transform:rotate(270deg) translateX(-160px);transform-origin:top left;display:block" @click="${i=>{if(i.target.classList.contains("v-tab-btn")){let{tab:n}=i.target.dataset;if(n){let o=i.target.closest(".tab-panel"),l=o.querySelector(`.v-tab-btn[data-tab="${n}"]`),p=[...o.querySelectorAll(`.v-tab-btn:not([data-tab="${n}"])`)],d=o.querySelector(`.tab-content[data-tab="${n}"]`),c=[...o.querySelectorAll(`.tab-content:not([data-tab="${n}"])`)];l.classList.add("active"),d.style.display="block",p.forEach(f=>{f.classList.remove("active")}),c.forEach(f=>{f.style.display="none"})}}i.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=i.target.dataset.tab)}}"><button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button class="v-tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div></div>${m`<div class="tab-content col" data-tab="example" style="display:${this.activeSchemaTab==="example"?"block":"none"};padding-left:5px;width:100%"><textarea class="textarea" part="textarea textarea-param" style="width:100%;border:none;resize:vertical" data-array="false" data-ptype="${r.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${e}" data-example="${s[0]?.exampleValue||""}" .value="${yr(this.fillRequestFieldsWithExample==="true"&&s[0]?.exampleValue||"")}" spellcheck="false"></textarea></div>`} ${m`<div class="tab-content col" data-tab="schema" style="display:${this.activeSchemaTab==="example"?"none":"block"};padding-left:5px;width:100%">${this.schemaStyle==="table"?m`<schema-table .data="${a}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${a}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}</div>`}function qh(e,t,r=""){let a=[],s=Zo(e),i=Yo(e);if(Object.keys(s).length>0){for(let n in s){let o=s[n];if(o.readOnly)continue;let l=o.examples||o.example||"",p=o.type,d=ia(o),c=Mo(d.examples||d.example,d.type),f=p!=="object"&&(d.default||d.constrain||d.allowedValues||d.pattern),h=El(o.description,f,c.exampleList);a.push(m`<li class="param ${o.deprecated?"deprecated":""}" part="param" title="${o.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${o.deprecated?"deprecated":""}" part="param-name">${n}${i.includes(n)||o.required?m`<span class="param-required" title="Required">*</span>`:""}</div><div class="param-type" part="param-type">${d.type==="array"||d.type.split("\u2503").includes("array")?`${d.arrayType||d.type}`:`${d.format&&!d.type.includes("\u2503")?d.format:d.contentMediaType&&!d.type.includes("\u2503")?d.contentMediaType:d.type}`}</div></div>${p!=="object"&&this.allowTry!=="true"?"":m`<div class="param-input" part="param-input">${p==="array"?zo(o.items)?m`<div class="file-input-container col" style="align-items:flex-start;width:100%">${_h(this.fileInputKeys[n]??[0],y=>y,(y,u)=>m`<div class="input-set row" style="width:100%;margin-top:${u>0?"4px":"0"}"><input type="file" part="file-input" style="width:100%" data-pname="${n}" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-array="false" data-file-array="true"> <button class="file-input-remove-btn" aria-label="Remove file" title="Remove" @click="${()=>this.onRemoveFileInput(n,y)}">✕</button></div>`)} <button class="btn btn-primary btn-sm file-input-add-btn" part="btn btn-fill" @click="${()=>this.onAddFileInput(n)}">ADD</button></div>`:m`<tag-input style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${n}" data-example="${Array.isArray(l)?l.join("~|~"):l}" data-array="true" placeholder="add-multiple ↩" .value="${Array.isArray(l)?Array.isArray(l[0])?l[0]:l:Hs}"></tag-input>`:m`${p==="object"?Fh.call(this,n,o,t):m`${this.allowTry==="true"?m`<input .value="${this.fillRequestFieldsWithExample==="true"?c.exampleVal:""}" spellcheck="false" type="${zo(o)?"file":o.format==="password"?"password":"text"}" part="textbox textbox-param" style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${n}" data-example="${Array.isArray(l)?l[0]:l}" data-array="false">`:""}`}`}</div>`} ${f?Al(d,d.allowedValues&&String(d.allowedValues).split("\u2503").map(y=>m`<button type="button" part="anchor anchor-param-constraint" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-type="${d.type==="array"?d.type:"string"}" data-enum="${y.trim()}" @click="${u=>{let g=u.target.closest(".param-list").querySelector(`[data-pname="${n}"]`);if(g){g.value=u.target.dataset.type==="array"?[u.target.dataset.enum]:u.target.dataset.enum;let v=this.getRequestPanel(u);this.liveCURLSyntaxUpdate(v)}}}">${y}</button>`),h&&c.exampleList.map(y=>wa.call(this,y,d.type,n))):""} ${p==="object"?"":m`<div class="param-details" part="param-details">${o.description?m`<div class="m-markdown-small">${z(M(O(o.description)))}</div>`:""} ${h?"":Dl.call(this,n,d.type,c.exampleList)}</div>`}</li>`)}return m`<div class="param-list-container"><ul class="param-list" part="param-list" role="list" @input="${n=>{let o=this.getRequestPanel(n);this.liveCURLSyntaxUpdate(o)}}" @change="${n=>{let o=this.getRequestPanel(n);this.liveCURLSyntaxUpdate(o)}}">${a}</ul></div>`}return m`<textarea class="textarea dynamic-form-param ${t}" part="textarea textarea-param" spellcheck="false" data-pname="dynamic-form" data-ptype="${t}" .value="${yr(r)}" style="width:100%"></textarea> ${e.description?m`<span class="m-markdown-small">${z(M(O(e.description)))}</span>`:""}`}function Rh(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let e="",t="",r="",a="",s="",i=[],{content:n}=this.request_body;for(let o in n)i.push({mimeType:o,schema:n[o].schema,example:n[o].example,examples:n[o].examples}),this.selectedRequestBodyType||=o;return e=i.length===1?"":m`<select class="select-sm" aria-label="request body media type" @change="${o=>this.onMimeTypeChange(o)}">${i.map(o=>m`<option value="${o.mimeType}" ?selected="${o.mimeType===this.selectedRequestBodyType}">${o.mimeType}</option>`)}</select>`,i.forEach(o=>{let l,p=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))o.mimeType===this.selectedRequestBodyType&&(p=jt(o.schema,o.mimeType,be(o.examples),be(o.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||=p.length>0?p[0].exampleId:"",s=m`${s}<div class="example-panel">${p.length===1?"":m`<select class="select-sm example-select" aria-label="request body examples" @change="${d=>this.onSelectExample(d)}">${p.map(d=>m`<option value="${d.exampleId}" ?selected="${d.exampleId===this.selectedRequestBodyExample}">${d.exampleSummary.length>80?d.exampleId:d.exampleSummary?d.exampleSummary:d.exampleId}</option>`)}</select>`} ${p.filter(d=>d.exampleId===this.selectedRequestBodyExample).map(d=>m`<div class="example ${d.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example="${d.exampleId}">${d.exampleSummary&&d.exampleSummary.length>80?m`<div style="padding:4px 0">${d.exampleSummary}</div>`:""} ${d.exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${z(M(O(d.exampleDescription||"")))}</div>`:""}<pre class="textarea is-hidden request-body-param ${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" spellcheck="false" data-ptype="${o.mimeType}" style="width:100%;resize:vertical;display:none">
${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}</pre><textarea class="textarea request-body-param-user-input" part="textarea textarea-param" spellcheck="false" data-ptype="${o.mimeType}" data-example="${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}" data-example-format="${d.exampleFormat}" style="width:100%;resize:vertical" .value="${this.fillRequestFieldsWithExample==="true"?d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2):""}" @input="${c=>{let f=this.getRequestPanel(c);this.liveCURLSyntaxUpdate(f)}}" @keydown="${c=>{if((c.keyCode===10||c.keyCode===13)&&c.ctrlKey)return this.onTryClick(c)}}"></textarea></div>`)}</div>`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(o.mimeType===this.selectedRequestBodyType){let d=jt(o.schema,o.mimeType,o.examples,o.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);o.schema&&(r=qh.call(this,o.schema,o.mimeType,d[0]?d[0].exampleValue:""))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&o.mimeType===this.selectedRequestBodyType&&(t=m`<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file small-font-size bold-text" data-ptype="${o.mimeType}" spellcheck="false">`);(o.mimeType.includes("json")||o.mimeType.includes("xml")||o.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(l=ae(o.schema),this.schemaStyle==="table"?a=m`${a}<schema-table class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:this.schemaStyle==="tree"&&(a=m`${a}<schema-tree class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`))}),m`<div class="request-body-container" data-selected-request-body-type="${Tl(this.selectedRequestBodyType)}"><div class="table-title top-gap row" style="justify-content:space-between;align-items:center"><h5 class="rapidoc-heading label-heading" part="heading heading-5">Request body ${this.request_body.required?m`<span class="mono-font" style="color:var(--destructive)">*</span>`:""} <span style="font-weight:400;margin-left:5px;text-transform:none">${this.selectedRequestBodyType}</span></h5>${e}</div>${this.request_body.description?m`<div class="m-markdown" style="margin-bottom:12px">${z(M(O(this.request_body.description)))}</div>`:""} ${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${o=>{o.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=o.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div>${m`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"}">${s}</div>`} ${m`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"}">${a}</div>`}</div>`:m`${t} ${r}`}</div>`}function _l(e="flex"){return m`<div class="col m-markdown" style="flex:1;display:${e};position:relative;max-width:100%"><button class="btn btn-sm btn-outline toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${t=>{Xt(this.curlSyntax.trim().replace(/\\$/,""),t)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-shell">${this.curlSyntax.trim().replace(/\\$/,"")}</code></pre></div>`}function jh(){let e="",t="";return this.responseIsBlob||(e=this.responseHeaders.includes("application/x-ndjson")||this.responseHeaders.includes("json")?"json":this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?"html":"text",t=m`<code class="language-${e}">${this.responseText}</code>`),m`<div class="row" style="font-size:var(--font-size-small);margin:5px 0;justify-content:space-between;align-items:center"><div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div><button class="btn btn-outline" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button></div><div part="tab-panel" class="tab-panel col"><div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${r=>{(r.target.classList.contains("tab-btn")!==!1||r.target.classList.contains("tab")!==!1)&&(this.activeResponseTab=r.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab="response">RESPONSE</button> <button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab="headers">RESPONSE HEADERS</button> ${this.showCurlBeforeTry==="true"?"":m`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab="curl">CURL</button>`}</div>${this.responseIsBlob?m`<div part="tab-content" class="tab-content col" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}">${this.responseBlobType==="image"?m`<img style="max-height:var(--resp-area-height);object-fit:contain" class="mar-top-8" src="${Tl(this.responseBlobUrl)}">`:""} <button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{gn(this.responseBlobUrl,this.respContentDisposition)}}" part="btn btn-outline">DOWNLOAD</button> ${this.responseBlobType==="view"||this.responseBlobType==="image"?m`<button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{yn(this.responseBlobUrl)}}" part="btn btn-outline">VIEW (NEW TAB)</button>`:""}</div>`:m`<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{Xt(this.responseText,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre;min-height:50px;height:var(--resp-area-height);resize:vertical;overflow:auto">
${t}</pre></div>`}<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="headers"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{Xt(this.responseHeaders,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-css">${this.responseHeaders}</code></pre></div>${this.showCurlBeforeTry==="true"?"":_l.call(this,this.activeResponseTab==="curl"?"flex":"none")}</div>`}function Ih(){let e;return e=this.security?.length>0&&!this.security.every(t=>!t||Object.keys(t).length===0)?this.api_keys.length>0?m`<span class="blue-text">${this.api_keys.length===1?`${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}</span>`:this.security.some(t=>!t||Object.keys(t).length===0)?m`Optional (None Applied)`:m`Required <span class="red-text">(None Applied)</span>`:m`Not Required`,m`<div class="try-bar" part="wrap-request-btn"><div class="try-layout"><dl class="try-info">${this.serverUrl?m`<dt>API Server</dt><dd class="try-server-url">${this.serverUrl}</dd>`:""}<dt>Authentication</dt><dd>${e}</dd></dl><div class="try-actions">${this.parameters.length>0||this.request_body?m`<button class="btn btn-outline" part="btn btn-outline btn-fill" ?disabled="${this.loading}" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">FILL EXAMPLE</button> <button class="btn btn-outline" part="btn btn-outline btn-clear" ?disabled="${this.loading}" @click="${this.onClearRequestData}">CLEAR</button>`:""} <button class="btn btn-primary" part="btn btn-try" ?disabled="${this.loading}" aria-busy="${this.loading}" @click="${this.onTryClick}">${this.loading?"TRYING...":"TRY"}</button></div></div></div><div class="row" style="font-size:var(--font-size-small);margin:5px 0">${this.showCurlBeforeTry==="true"?_l.call(this):""}</div>${this.responseMessage===""?"":jh.call(this)}`}var I=class extends ve{constructor(){super(),this.serverUrl="",this.servers=[],this.method="",this.path="",this.security=[],this.parameters=[],this.api_keys=[],this.accept="",this.callback="",this.webhook="",this.fillRequestFieldsWithExample="",this.allowTry="true",this.showCurlBeforeTry="false",this.renderStyle="view",this.schemaStyle="tree",this.activeSchemaTab="schema",this.activeParameterSchemaTabs={},this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="false",this.fetchCredentials="",this.responseMessage="",this.responseText="",this.responseHeaders="",this.responseStatus="success",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.fileInputKeys={},this.loading=!1,this.activeAbortController=null,this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={},this.fileInputKeys={},this.loading=!1}static get styles(){return[qr,Zt,Xe,Fr,ba,Rr,Xa,W`*,:before,:after{box-sizing:border-box}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}tag-input:focus-within{outline:1px solid}.top-gap{margin-top:24px}.request-panel>div>.top-gap:first-child,.request-panel>div>.request-body-container:first-child>.top-gap{margin-top:4px}.textarea{resize:vertical;direction:ltr;min-height:220px;padding:5px}.response-message{text-overflow:ellipsis;font-weight:700;&.error{color:var(--destructive)}&.success{color:var(--blue)}}.file-input-container{align-items:flex-start;width:100%;& .input-set{align-items:center;width:100%;display:flex;position:relative;&:first-child .file-input-remove-btn{display:none}&:not(:first-child) input[type=file]{padding-right:2.25em}}& .file-input-add-btn{align-self:flex-start;margin:4px 0 0 .45em;font-weight:400}}.file-input-remove-btn{color:var(--destructive);border-radius:var(--radius);cursor:pointer;background:0 0;border:none;padding:0 .25em;font-size:1.25em;line-height:1;position:absolute;top:50%;right:.45em;transform:translateY(-50%);&:hover{background:color-mix(in srgb, var(--destructive) 15%, transparent)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.v-tab-btn{font-size:var(--font-size-small);opacity:.3;cursor:pointer;background:0 0;border:none;height:24px;padding:4px 8px;&.active{background:var(--background);opacity:1;font-weight:700}}@container (width>=768px){.textarea{padding:8px}}.try-bar{font-size:var(--font-size-small);margin:16px 0;container-type:inline-size}.try-layout{flex-direction:column;gap:.75em;display:flex}.try-info{grid-template-columns:max-content minmax(0,1fr);gap:.25em .75em;margin:0;line-height:1.35;display:grid;&>dt{color:var(--foreground);font-weight:600}&>dd{min-width:0;color:var(--muted-foreground);overflow-wrap:anywhere;margin:0}}.try-actions{flex-wrap:wrap;justify-content:flex-end;gap:.5em;display:flex}@container (width>=34rem){.try-layout{flex-direction:row;align-items:center;gap:1.5em}.try-info{flex:1;min-width:0}.try-actions{flex:none}}@container (width<=20rem){.try-info{grid-template-columns:minmax(0,1fr);gap:0;&>dd+dt{margin-top:.5em}}}`,mt]}get commonConfigDeps(){return[this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,this.allowSchemaDescriptionExpandToggle,this.schemaHideReadOnly,this.schemaHideWriteOnly,this.fillRequestFieldsWithExample,this.renderStyle,this.allowTry,this.callback,this.webhook]}get parameterGuardDeps(){return[this.method,this.path,this.parameters,this.activeParameterSchemaTabs,...this.commonConfigDeps]}get requestBodyGuardDeps(){return[this.method,this.path,this.request_body,this.selectedRequestBodyType,this.selectedRequestBodyExample,this.activeSchemaTab,this.fileInputKeys,...this.commonConfigDeps]}render(){return m`<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">${this.callback==="true"?m`<h6 class="rapidoc-heading label-heading tiny-title" part="section-request-title heading heading-6">Callback request</h6>`:m`<h4 class="rapidoc-heading label-heading req-res-title" part="section-request-title heading heading-4">Request</h4>`}<div>${fr(this.parameterGuardDeps,()=>$a.call(this,"path"))} ${fr(this.parameterGuardDeps,()=>$a.call(this,"query"))} ${fr(this.requestBodyGuardDeps,()=>Rh.call(this))} ${fr(this.parameterGuardDeps,()=>$a.call(this,"header"))} ${fr(this.parameterGuardDeps,()=>$a.call(this,"cookie"))} ${this.allowTry==="false"?"":m`${Ih.call(this)}`}</div></div>`}async updated(e){this.showCurlBeforeTry==="true"&&(!e||!e.has("curlSyntax")||e.size>1)&&this.applyCURLSyntax(this.shadowRoot),_r(this.getRootNode()?.host?.shadowRoot||this.shadowRoot),this.webhook==="true"&&(this.allowTry="false")}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;let t=e.target;window.setTimeout(r=>{let a=r.closest(".example-panel").querySelector(".request-body-param"),s=r.closest(".example-panel").querySelector(".request-body-param-user-input");s.value=a.innerText;let i=this.getRequestPanel({target:r});this.liveCURLSyntaxUpdate(i)},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;let t=e.target;this.selectedRequestBodyExample="",window.setTimeout(r=>{let a=r.closest(".request-body-container").querySelector(".request-body-param");if(a){let s=r.closest(".request-body-container").querySelector(".request-body-param-user-input");s.value=a.innerText}},0,t)}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.dataset.example&&(t.value=t.tagName.toUpperCase()==="TAG-INPUT"?t.dataset.example.split("~|~"):t.dataset.example)})}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.value=""})}buildFetchURL(e){let t=[...e.querySelectorAll("[data-ptype='path']")],r=[...e.querySelectorAll("[data-ptype='query']")],a=[...e.querySelectorAll("[data-ptype='query-object']")],s={};t.forEach(n=>{s[n.dataset.pname]=n.value});let i=[];return r.forEach(n=>{let o=n.dataset.array!=="false",l=n.dataset.paramSerializeStyle||"form",p=n.dataset.paramSerializeExplode===void 0?l==="form":n.dataset.paramSerializeExplode==="true",d=n.dataset.paramAllowReserved==="true";i.push({name:n.dataset.pname,value:n.value,style:l,explode:p,allowReserved:d,isArray:o})}),a.forEach(n=>{let o=n.dataset.paramSerializeStyle||"form",l=n.dataset.paramSerializeExplode===void 0?o==="form":n.dataset.paramSerializeExplode==="true",p=n.dataset.paramAllowReserved==="true";i.push({name:n.dataset.pname,value:n.value,style:o,explode:l,allowReserved:p,isObject:!0})}),th({serverUrl:this.serverUrl,path:this.path,pathParams:s,queryParams:i,apiKeys:this.api_keys})}buildFetchHeaders(e){let t=this.closest(".expanded-req-resp-container, .req-resp-container")?.getElementsByTagName("api-response")[0],r=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],a=e.querySelector(".request-body-container"),s=t?.selectedMimeType||this.accept||"",i=a?.dataset?.selectedRequestBodyType||"",n=r.map(o=>({name:o.dataset.pname,value:o.value,explode:o.dataset.paramSerializeExplode==="true",isObject:o.dataset.ptype==="header-object"}));return gh({accept:s,apiKeys:this.api_keys,headerParams:n,contentType:i})}buildFetchBodyOptions(e){let t=e.querySelector(".request-body-container"),r={method:this.method.toUpperCase()};if(t){let a=t.dataset.selectedRequestBodyType||"";if(a.includes("form-urlencoded")){let s=e.querySelector("[data-ptype='dynamic-form']");r.body=s?bl([],s.value):bl([...e.querySelectorAll("[data-ptype='form-urlencode']")].filter(i=>i.type!=="file").map(i=>({name:i.dataset.pname,value:i.value,isArray:i.dataset.array!=="false"})))}else if(a.includes("form-data"))r.body=yh([...e.querySelectorAll("[data-ptype='form-data']")].map(s=>({name:s.dataset.pname,value:s.value,file:s.type==="file"?s.files?.[0]:void 0,isArray:s.dataset.array!=="false"})));else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(a)){let s=e.querySelector(".request-body-param-file");s?.files[0]&&(r.body=s.files[0])}else if(a.includes("json")||a.includes("xml")||a.includes("text")){let s=e.querySelector(".request-body-param-user-input");s?.value&&(r.body=s.value)}}return r}async onTryClick(e){let t=e?.target?this.getRequestPanel(e):this.shadowRoot.querySelector(".request-panel"),r=this.buildFetchURL(t),a=this.buildFetchBodyOptions(t),s=this.buildFetchHeaders(t);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(r,s,a,t),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),this.fetchCredentials&&(a.credentials=this.fetchCredentials);let i=new AbortController;this.activeAbortController=i;let{signal:n}=i;a.headers=s;let o={url:r,...a};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:o,controller:i}}));let l={method:o.method,headers:o.headers,credentials:o.credentials,body:o.body},p,d,c;try{this.loading=!0,this.responseText="\u231B",this.responseMessage="",p=new Request(o.url,l);let f=performance.now();d=await fetch(p,{signal:n});let h=performance.now();c=d.clone(),this.responseMessage=m`${d.statusText?`${d.statusText}:${d.status}`:d.status}<div style="color:var(--muted-foreground)">Took ${Math.round(h-f)} milliseconds</div>`,this.responseUrl=d.url;let y={};d.headers.forEach((g,v)=>{y[v]=g,this.responseHeaders=`${this.responseHeaders}${v}: ${g}
`});let u=await vh(d);this.responseText=u.responseText,this.responseIsBlob=u.responseIsBlob,this.responseBlobType=u.responseBlobType,this.responseBlobUrl=u.responseBlobUrl,this.respContentDisposition=u.respContentDisposition,this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:p,response:c,responseHeaders:y,responseBody:u.respJson||u.respText||u.respBlob,responseStatus:c.ok}}))}catch(f){f.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:f,request:p}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:f,request:p}})),this.responseMessage=o.method?.toUpperCase()==="TRACE"?`${f.message} (Browser security restricts TRACE requests in fetch. Use the cURL snippet below.)`:`${f.message} (CORS or Network Issue)`)}finally{this.loading=!1,this.activeAbortController=null}}liveCURLSyntaxUpdate(e){this.applyCURLSyntax(e)}onGenerateCURLClick(e){let t=this.getRequestPanel(e);this.applyCURLSyntax(t)}getRequestPanel(e){return e.target.closest(".request-panel")}applyCURLSyntax(e){let t=this.buildFetchURL(e),r=this.buildFetchBodyOptions(e),a=this.buildFetchHeaders(e),s=this.generateCURLSyntax(t,a,r,e);this.curlSyntax!==s&&(this.curlSyntax=s)}generateCURLSyntax(e,t,r,a){let s=a?.querySelector(".request-body-container"),i=s?.dataset?.selectedRequestBodyType||"",n=r?.body;if(!n&&s){let o=a.querySelector(".request-body-param-user-input");o?.value&&(n=o.value)}return mh({method:this.method,url:e,headers:t,body:n,contentType:i})}onAddFileInput(e){let t=this.fileInputKeys[e]??[0],r=t.length>0?Math.max(...t)+1:0;this.fileInputKeys={...this.fileInputKeys,[e]:[...t,r]}}onRemoveFileInput(e,t){let r=this.fileInputKeys[e]??[0];this.fileInputKeys={...this.fileInputKeys,[e]:r.filter(a=>a!==t)}}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.fileInputKeys={},this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),"")}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"||this.webhook==="true"?"false":"true"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.fillRequestFieldsWithExample!==void 0&&(this.fillRequestFieldsWithExample=this.config.fillRequestFieldsWithExample),this.config.allowTry!==void 0&&(this.allowTry=this.config.allowTry),this.config.showCurlBeforeTry!==void 0&&(this.showCurlBeforeTry=this.config.showCurlBeforeTry),this.config.fetchCredentials!==void 0&&(this.fetchCredentials=this.config.fetchCredentials),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab))}disconnectedCallback(){this.curlSyntax="",this.activeAbortController&&=(this.activeAbortController.abort(),null),this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),super.disconnectedCallback()}};x([k({type:Object})],I.prototype,"config",void 0),x([k({type:String,attribute:"server-url"})],I.prototype,"serverUrl",void 0),x([k({type:Array})],I.prototype,"servers",void 0),x([k({type:String})],I.prototype,"method",void 0),x([k({type:String})],I.prototype,"path",void 0),x([k({type:Array})],I.prototype,"security",void 0),x([k({type:Array})],I.prototype,"parameters",void 0),x([k({type:Object})],I.prototype,"request_body",void 0),x([k({type:Array})],I.prototype,"api_keys",void 0),x([k({type:Object})],I.prototype,"parser",void 0),x([k({type:String})],I.prototype,"accept",void 0),x([k({type:String})],I.prototype,"callback",void 0),x([k({type:String})],I.prototype,"webhook",void 0),x([k({type:String,attribute:"fill-request-fields-with-example"})],I.prototype,"fillRequestFieldsWithExample",void 0),x([k({type:String,attribute:"allow-try"})],I.prototype,"allowTry",void 0),x([k({type:String,attribute:"show-curl-before-try"})],I.prototype,"showCurlBeforeTry",void 0),x([k({type:String,attribute:"render-style"})],I.prototype,"renderStyle",void 0),x([k({type:String,attribute:"schema-style"})],I.prototype,"schemaStyle",void 0),x([k({type:String,attribute:"active-schema-tab"})],I.prototype,"activeSchemaTab",void 0),x([k({type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"})],I.prototype,"activeParameterSchemaTabs",void 0),x([k({type:Number,attribute:"schema-expand-level"})],I.prototype,"schemaExpandLevel",void 0),x([k({type:String,attribute:"schema-description-expanded"})],I.prototype,"schemaDescriptionExpanded",void 0),x([k({type:String,attribute:"allow-schema-description-expand-toggle"})],I.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([k({type:String,attribute:"schema-hide-read-only"})],I.prototype,"schemaHideReadOnly",void 0),x([k({type:String,attribute:"schema-hide-write-only"})],I.prototype,"schemaHideWriteOnly",void 0),x([k({type:String,attribute:"fetch-credentials"})],I.prototype,"fetchCredentials",void 0),x([ie()],I.prototype,"responseMessage",void 0),x([ie()],I.prototype,"responseText",void 0),x([ie()],I.prototype,"responseHeaders",void 0),x([ie()],I.prototype,"responseStatus",void 0),x([ie()],I.prototype,"responseUrl",void 0),x([ie()],I.prototype,"curlSyntax",void 0),x([ie()],I.prototype,"responseIsBlob",void 0),x([ie()],I.prototype,"responseBlobType",void 0),x([ie()],I.prototype,"responseBlobUrl",void 0),x([ie()],I.prototype,"respContentDisposition",void 0),x([ie()],I.prototype,"activeResponseTab",void 0),x([ie()],I.prototype,"selectedRequestBodyType",void 0),x([ie()],I.prototype,"selectedRequestBodyExample",void 0),x([ie()],I.prototype,"fileInputKeys",void 0),x([ie()],I.prototype,"loading",void 0),I=x([Ce("api-request")],I);var ka=class extends ve{constructor(...e){super(...e),this.data=null,this.renderStyle=""}static get styles(){return[Xe,ba,Zt,W`:host{display:flex}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.json-tree{font-family:var(--font-mono);font-size:var(--font-size-small);word-break:break-all;line-height:calc(var(--font-size-small) + 6px);text-align:left;direction:ltr;flex:1;min-height:40px;display:inline-block;position:relative;overflow:hidden}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&.expanded:hover~.inside-bracket{border-left:1px solid var(--muted-foreground)}&.expanded:hover~.close-bracket{color:var(--primary)}&.collapsed+.inside-bracket,&.collapsed+.inside-bracket+.close-bracket,&.expanded .open-bracket-collapsed,&.collapsed .open-bracket-expanded{display:none}}.close-bracket{border-radius:min(var(--radius), .5rem);border:1px solid #0000;display:inline-block}.inside-bracket{border-left:1px dotted var(--border);padding-left:12px;overflow:hidden}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--destructive)}.boolean{color:var(--purple)}.object{color:var(--foreground)}.toolbar{align-items:center;padding:2px;display:flex;position:absolute;top:5px;right:6px}`,mt]}render(){return m`<div class="json-tree" @click="${e=>{e.target.classList.contains("btn-copy")?Xt(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}"><div class="toolbar"><button class="btn btn-sm btn-outline toolbar-btn btn-copy" part="btn btn-outline btn-copy">Copy</button></div>${this.generateTree(this.data,!0)}</div>`}generateTree(e,t=!1){if(e===null)return m`<span class="null">null</span>${t?"":","}`;if(typeof e=="object"&&!(e instanceof Date)){let r=Array.isArray(e)?"array":"pure_object";return Object.keys(e).length===0?m`${Array.isArray(e)?"[ ],":"{ },"}`:m`<div class="open-bracket expanded ${r==="array"?"array":"object"}"><span class="open-bracket-expanded">${r==="array"?"[":"{"}</span> <span class="open-bracket-collapsed">${r==="array"?"[...]":"{...}"}</span></div><div class="inside-bracket">${Object.keys(e).map((a,s,i)=>m`<div class="item">${r==="pure_object"?m`"${a}":`:""} ${this.generateTree(e[a],s===i.length-1)}</div>`)}</div><div class="close-bracket">${r==="array"?"]":"}"}${t?"":","}</div>`}return typeof e=="string"||e instanceof Date?m`<span class="${typeof e}">"${e}"</span>${t?"":","}`:m`<span class="${typeof e}">${e}</span>${t?"":","}`}toggleExpand(e){let t=e.target.closest(".open-bracket");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};x([k({type:Object})],ka.prototype,"data",void 0),x([k({type:String,attribute:"render-style"})],ka.prototype,"renderStyle",void 0),ka=x([Ce("json-tree")],ka);var re=class extends ve{constructor(){super(),this.callback="",this.webhook="",this.schemaStyle="",this.renderStyle="",this.selectedStatus="",this.selectedMimeType="",this.activeSchemaTab="schema",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="false",this.schemaHideWriteOnly="true",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.selectedStatus="",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get styles(){return[Xe,Fr,Rr,qr,Zt,ba,W`.resp-headers-list{margin-bottom:16px}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.resp-head{vertical-align:middle;padding:16px 0 8px;&.divider{border-top:1px solid var(--border);margin-top:10px}}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:var(--font-size-description);color:var(--muted-foreground);text-align:left}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}.status-group{flex-wrap:wrap;margin-top:8px;display:inline-flex}.status-btn{border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--muted-foreground);border-radius:0;margin:0 0 0 -1px;&:first-child{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius);margin-left:0}&:last-child{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius)}&:hover{background:var(--muted);color:var(--foreground)}&[aria-pressed=true]{z-index:1;border-color:var(--primary);background:color-mix(in srgb, var(--primary) 14%, transparent);color:var(--primary);position:relative}&:focus-visible{z-index:2}}`,mt]}willUpdate(e){if(super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"||this.webhook==="true"?"false":"true"),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab)),e.has("responses")||e.has("callback")||e.has("webhook")){if(!this.responses||typeof this.responses!="object")return;let t=xh(this.responses,{callback:this.callback,webhook:this.webhook});this.headersForEachRespStatus=t.headersForEachRespStatus,this.mimeResponsesForEachStatus=t.mimeResponsesForEachStatus,this.defaultStatus=t.defaultStatus,this.defaultMimeType=t.defaultMimeType,this.selectedStatus&&this.responses?.[this.selectedStatus]||(this.selectedStatus=t.defaultStatus),this.selectedMimeType||=t.defaultMimeType}}render(){return m`<div class="col regular-font response-panel ${this.renderStyle}-mode">${this.callback==="true"?m`<h6 class="rapidoc-heading label-heading tiny-title" part="section-response-title heading heading-6">Callback response</h6>`:m`<h4 class="rapidoc-heading label-heading req-res-title" part="section-response-title heading heading-4">Response</h4>`}<div>${this.responseTemplate()}</div></div>`}resetSelection(){this.selectedStatus=this.defaultStatus||this.responses&&Object.keys(this.responses).find(e=>e!=="$$ref")||"",this.selectedMimeType=this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]?Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||"":this.defaultMimeType||""}responseTemplate(){return this.responses?(this.selectedStatus&&this.responses[this.selectedStatus]||(this.selectedStatus=this.defaultStatus||Object.keys(this.responses).find(e=>e!=="$$ref")||Object.keys(this.responses)[0]||""),!this.selectedMimeType&&this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]&&(this.selectedMimeType=Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||this.defaultMimeType||""),m`${Object.keys(this.responses).length>1?m`<div class="status-group" role="group" aria-label="Response status">${Object.keys(this.responses).map(e=>m`${e==="$$ref"?"":m`<button @click="${()=>{this.selectedStatus=e,this.selectedMimeType=this.responses[e].content&&Object.keys(this.responses[e].content)[0]?Object.keys(this.responses[e].content)[0]:void 0}}" class="btn btn-sm status-btn" aria-pressed="${this.selectedStatus===e?"true":"false"}" part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}">${e}</button>`}`)}</div>`:m`<span>${Object.keys(this.responses)[0]}</span>`} ${Object.keys(this.responses).map(e=>m`<div style="display:${e===this.selectedStatus?"block":"none"}"><div class="top-gap"><span class="resp-descr m-markdown">${z(M(O(this.responses[e]?.description||"")))}</span> ${this.headersForEachRespStatus[e]&&this.headersForEachRespStatus[e]?.length>0?m`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}</div>${!this.mimeResponsesForEachStatus[e]||Object.keys(this.mimeResponsesForEachStatus[e]).length===0?"":m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${t=>{t.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=t.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button> ${Object.keys(this.mimeResponsesForEachStatus[e]).length===1?m`<span class="tab-bar-end">${Object.keys(this.mimeResponsesForEachStatus[e])[0]}</span>`:m`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}</div>${this.activeSchemaTab==="example"?m`<div part="tab-content" class="tab-content col">${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`:m`<div part="tab-content" class="tab-content col">${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`}</div>`}</div>`)}`):""}responseHeaderListTemplate(e){return m`<h5 class="rapidoc-heading label-heading resp-headers" part="heading heading-5">Response headers</h5><div class="param-list-container resp-headers-list"><ul class="param-list" part="param-list" role="list">${e.map(t=>m`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${t.name||""}</div>${t.schema?.type?m`<div class="param-type" part="param-type">${t.schema.type}</div>`:""}</div>${t.schema?.example?m`<dl class="param-constraint" part="param-constraint"><dt class="param-constraint-label" part="param-constraint-label">Example:</dt><dd>${t.schema.example}</dd></dl>`:""}<div class="param-details" part="param-details">${t.description?m`<div class="m-markdown-small">${z(M(O(t.description)))}</div>`:""}</div></li>`)}</ul></div>`}mimeTypeDropdownTemplate(e){return m`<select aria-label="mime types" class="select-sm tab-bar-end" @change="${t=>{this.selectedMimeType=t.target.value}}">${e.map(t=>m`<option value="${t}" ?selected="${t===this.selectedMimeType}">${t}</option>`)}</select>`}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return!e||!e.examples||e.examples.length===0?m`<pre style="color:var(--destructive)" class="example-panel"> No example provided </pre>`:m`${e.examples.length===1?m`${e.examples[0].exampleFormat==="json"?m`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?m`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${z(M(O(e.examples[0].exampleDescription||"")))}</div>`:""}<json-tree render-style="${this.renderStyle}" .data="${e.examples[0].exampleValue}" class="example-panel" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:m`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?m`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${z(M(O(e.examples[0].exampleDescription||"")))}</div>`:""}<pre class="example-panel">${e.examples[0].exampleValue}</pre>`}`:m`<div class="example-panel"><select aria-label="response examples" class="select-sm example-select" @change="${t=>this.onSelectExample(t)}">${e.examples.map(t=>m`<option value="${t.exampleId}" ?selected="${t.exampleId===e.selectedExample}">${t.exampleSummary.length>80?t.exampleId:t.exampleSummary}</option>`)}</select> ${e.examples.map(t=>m`<div class="example" data-example="${t.exampleId}" style="display:${t.exampleId===e.selectedExample?"block":"none"}">${t.exampleSummary&&t.exampleSummary.length>80?m`<div style="padding:4px 0">${t.exampleSummary}</div>`:""} ${t.exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${z(M(O(t.exampleDescription||"")))}</div>`:""} ${t.exampleFormat==="json"?m`<json-tree render-style="${this.renderStyle}" .data="${t.exampleValue}" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:m`<pre>${t.exampleValue}</pre>`}</div>`)}</div>`}`}mimeSchemaTemplate(e){return e?m`${this.schemaStyle==="table"?m`<schema-table .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}`:m`<pre style="color:var(--destructive)" class="example-panel"> Schema not found</pre>`}};x([k({type:Object})],re.prototype,"config",void 0),x([k({type:String})],re.prototype,"callback",void 0),x([k({type:String})],re.prototype,"webhook",void 0),x([k({type:Object})],re.prototype,"responses",void 0),x([k({type:Object})],re.prototype,"parser",void 0),x([k({type:String,attribute:"schema-style"})],re.prototype,"schemaStyle",void 0),x([k({type:String,attribute:"render-style"})],re.prototype,"renderStyle",void 0),x([k({type:String,attribute:"selected-status"})],re.prototype,"selectedStatus",void 0),x([k({type:String,attribute:"selected-mime-type"})],re.prototype,"selectedMimeType",void 0),x([k({type:String,attribute:"active-schema-tab"})],re.prototype,"activeSchemaTab",void 0),x([k({type:Number,attribute:"schema-expand-level"})],re.prototype,"schemaExpandLevel",void 0),x([k({type:String,attribute:"schema-description-expanded"})],re.prototype,"schemaDescriptionExpanded",void 0),x([k({type:String,attribute:"allow-schema-description-expand-toggle"})],re.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([k({type:String,attribute:"schema-hide-read-only"})],re.prototype,"schemaHideReadOnly",void 0),x([k({type:String,attribute:"schema-hide-write-only"})],re.prototype,"schemaHideWriteOnly",void 0),re=x([Ce("api-response")],re);function Nh(e){let t=new Ye,r=new O.Renderer;return r.heading=({text:a,depth:s})=>`<h${s} class="observe-me" id="${e}--${t.slug(a)}">${a}</h${s}>`,Tr(r),r}function ai(e,t="",r="",a=!1){let s=new Set;for(let p in e.responses)for(let d in e.responses[p]?.content)s.add(d.trim());let i=[...s].join(", "),n=this.resolvedSpec.securitySchemes.filter(p=>p.finalKeyValue&&e.security?.some(d=>p.securitySchemeId in d))||[],o=this.resolvedSpec.securitySchemes.find(p=>p.securitySchemeId==="_rapidoc_api_key"&&p.value!=="-");o&&n.push(o);let l=e.xCodeSamples?gl.call(this,e.xCodeSamples):"";return m`${this.renderStyle==="read"&&!a?m`<div class="divider" part="operation-divider"></div>`:""}<div class="expanded-endpoint-body observe-me ${e.method} ${e.deprecated?"deprecated":""}" part="section-operation ${e.elementId}" id="${e.elementId}" data-first-operation-in-tag="${a?"true":F}">${this.renderStyle==="focused"&&t?m`<div class="tag-container" part="section-operation-tag" style="margin-bottom:16px"><h2 class="rapidoc-heading upper" part="heading heading-2" style="font-size:var(--h3-font-size);margin:0">${t}</h2>${a&&r?m`<div class="tag-description regular-font" part="section-tag-description" style="margin-top:12px;padding:12px 14px;background:var(--code-bg);border-radius:min(var(--radius),.5rem);border:1px solid var(--border)"><div class="m-markdown">${z(M(O(r)))}</div></div>`:""}</div>`:""} ${e.deprecated?m`<div class="bold-text red-text">DEPRECATED</div>`:""} ${m`${e.xBadges&&e.xBadges?.length>0?m`<div style="display:flex;flex-wrap:wrap;margin-bottom:-24px;font-size:var(--font-size-small)">${e.xBadges.map(p=>p.color==="none"?"":m`<span style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${p.color}) 10%,transparent);color:var(--${p.color});border:1px solid var(--${p.color})">${p.label}</span>`)}</div>`:""}<h3 class="rapidoc-heading operation-summary" part="section-operation-summary heading heading-3">${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h3>${e.isWebhook?m`<span part="section-operation-webhook" style="color:var(--primary);font-weight:700;font-size:var(--font-size-regular)">WEBHOOK</span>`:m`<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left;direction:ltr;padding:8px 0;color:var(--muted-foreground)"><span part="label-operation-method" class="regular-font upper method-fg bold-text ${e.method}">${e.method}</span> <span style="overflow-wrap:break-word" part="label-operation-path">${e.path}</span></div>`} ${fl.call(this,e.security,e.elementId)}<slot name="${e.elementId}"></slot>`} ${e.description?m`<div class="m-markdown">${z(M(O(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?m`<div class="external-docs-box"><div class="m-markdown">${z(M(O(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?m`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""} ${l}<div class="req-resp-container expanded-req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.renderStyle}-mode ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${n}" .servers="${e.servers}" server-url="${e.servers?.[0]?.url||this.selectedServer?.computedUrl}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${i}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?yl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`}function Bh(){if(!this.resolvedSpec)return"";let e=t=>m`<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${t.displayName||t.name}</h2><slot name="${t.elementId}"></slot>${z(`
<div class="m-markdown regular-font">
${M(O(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:Nh(t.elementId)}:void 0))}
</div>`)}</section><section class="regular-font section-gap--read-mode" part="section-operations-in-tag">${t.paths.map((r,a)=>ai.call(this,r,t.name,t.description,a===0))}</section>`;if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let t=new Set;this.resolvedSpec.tagGroups.forEach(a=>{(a.tags||[]).forEach(s=>t.add(s.name.toLowerCase()))});let r=(this.resolvedSpec.tags||[]).filter(a=>!t.has(a.name.toLowerCase()));return m`${this.resolvedSpec.tagGroups.map(a=>m`<section id="${a.elementId}" part="section-tag-group" class="regular-font section-gap--read-mode observe-me read-mode-group"><h2 class="rapidoc-heading title tag-group" part="section-tag-group-title heading heading-2">${a.displayName||a.name}</h2>${a.description?m`<div class="m-markdown tag-group-description">${z(M(O(a.description)))}</div>`:""}</section>${a.tags.map(s=>e(s))}`)} ${r.map(a=>e(a))}`}return m`${this.resolvedSpec.tags.map(t=>e(t))}`}function Lh(e){return m`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}"><h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">Schema</span></h3>${this.schemaStyle==="table"?m`<schema-table .data="${ae(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${ae(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}function Ph(e,t){return e.id.indexOf("schemas-")===-1?m`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}">${m`<h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">${t}</span></h3>${e.component?m`<div class="mono-font regular-font-size" style="padding:8px 0;color:var(--card-foreground)"><json-tree class="border tree" render-style="${this.renderStyle}" .data="${e.component}"></json-tree></div>`:""}`}</div>`:Lh.call(this,e)}function Fl(){return this.resolvedSpec?m`${this.resolvedSpec.components.map(e=>m`<div id="cmp--${e.name.toLowerCase()}" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="heading heading-2">${e.name}</h2>${z(`<div class='m-markdown regular-font'>${M(O(e.description||""))}</div>`)}</div><div class="regular-font section-gap--read-mode">${e.subComponents.filter(t=>t.expanded!==!1).map(t=>Ph.call(this,t,e.name))}</div>`)}`:""}function zh(){let e=new Ye,t=new O.Renderer;return t.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="overview--${e.slug(r)}">${r}</h${a}>`,Tr(t),t}function si(){return m`<section id="overview" part="section-overview" class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">${this.resolvedSpec?.info?m`<h1 id="api-title" class="rapidoc-heading" part="section-overview-title heading heading-1">${this.resolvedSpec.info.title} ${this.resolvedSpec.info.version?m`<span class="version" part="label-overview-version">${this.resolvedSpec.info.version}</span>`:""}</h1><div id="api-info">${this.resolvedSpec.info.contact?.email?m`<span>${this.resolvedSpec.info.contact.name||"Email"}: <a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a></span>`:""} ${this.resolvedSpec.info.contact?.url?m`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""} ${this.resolvedSpec.info.license?m`<span>License: ${this.resolvedSpec.info.license.url?m`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name}</span>`:""} ${this.resolvedSpec.info.termsOfService?m`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}</div><slot name="overview"></slot>${this.resolvedSpec.info.description?m`<div id="api-description" class="m-markdown regular-font">${z(M(O(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:zh()}:void 0)))}</div>`:""}`:""}</section>`}var Mh=new Set(["authorization","cookie","set-cookie","x-api-key","api-key","apikey","user-agent","host","content-length","accept","accept-encoding","connection"]),Uh=new Set(["typescript","python","go","csharp","rust","java"]),ql={typescript:"TypeScript",python:"Python",go:"Go",csharp:"C#",rust:"Rust",java:"Java"};function Rl(e){if(!e||e===!1||e==="false")return[];let t=[];if(Array.isArray(e))t=e;else if(typeof e=="string"){let s=e.trim();if(s.startsWith("[")&&s.endsWith("]"))try{t=JSON.parse(s)}catch{t=s.slice(1,-1).split(",")}else t=s.split(",")}let r=t.map(s=>String(s).trim().toLowerCase()).filter(Boolean);if(r.includes("none")||r.includes("false"))return[];let a=r.map(s=>s==="c#"?"csharp":s).filter(s=>Uh.has(s));return[...new Set(a)]}function q(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").toLowerCase():"tool"}function Se(e){return e?q(e).split("_").filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""):"Tool"}function H(e){let t=Se(e);return t?t.charAt(0).toLowerCase()+t.slice(1):"param"}function jl(e,t=300){if(!e||typeof e!="string")return"";let r=e.replace(/<[^>]*>/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[`*_~#<>]/g,"").replace(/\s+/g," ").trim();return r.length<=t?r:r.slice(0,t-3)+"..."}function Hh(e,t){return q(`${e}_${t.split("/").filter(Boolean).map(r=>r.startsWith("{")&&r.endsWith("}")?`by_${r.slice(1,-1)}`:r).join("_")}`)}function Kh(e,t={}){let r=[],a=new Set((t.parameters?.exclude||[]).concat(e["x-ignoredHeaderParameters"]||[]).map(o=>o.toLowerCase())),s=t.parameters?.include?new Set(t.parameters.include.map(o=>o.toLowerCase())):null,i=t.parameters?.descriptions||{},n=t.parameters?.defaults||{};if(Array.isArray(e.parameters))for(let o of e.parameters){if(!o||!o.name)continue;let l=o.name.toLowerCase();if(o.in==="header"&&Mh.has(l)||o["x-speakeasy-param-ignore"]===!0||a.has(l)||s&&!s.has(l))continue;let p=o.schema||{},d=p.type||(p.enum,"string");r.push({name:o.name,in:o.in||"query",type:d,format:p.format,enum:p.enum,description:i[o.name]||o.description||p.description||"",required:!!(o.required||o.in==="path"),default:n[o.name]===void 0?p.default:n[o.name]})}if(e.requestBody&&e.requestBody.content){let o=(e.requestBody.content["application/json"]||e.requestBody.content["application/x-www-form-urlencoded"]||Object.values(e.requestBody.content)[0])?.schema;if(o&&o.properties){let l=new Set(o.required||[]);for(let[p,d]of Object.entries(o.properties)){let c=p.toLowerCase();a.has(c)||(!s||s.has(c))&&r.push({name:p,in:"body",type:d.type||"string",format:d.format,enum:d.enum,description:i[p]||d.description||"",required:l.has(p),default:n[p]===void 0?d.default:n[p]})}}else o&&r.push({name:"payload",in:"body",type:o.type||"object",description:e.requestBody.description||"Request payload",required:!!e.requestBody.required,default:void 0})}return r}function Il(e,t={}){let r=[],a=[],{includeInternal:s=!1,includeDeprecated:i=!1}=t,n=e?.spec||e||{},o=e?.tags||[],l=[];if(o.length>0){for(let d of o)if(Array.isArray(d.paths))for(let c of d.paths)l.push({...c,tagName:d.name})}else if(n.paths)for(let[d,c]of Object.entries(n.paths))for(let[f,h]of Object.entries(c))["get","post","put","delete","patch"].includes(f.toLowerCase())&&l.push({...h,method:f.toLowerCase(),path:d,rawOperation:h});for(let d of l){let c=d.rawOperation||d,f=c["x-mcp"]||c["x-mcp-tool"]||{};if(f.enabled===!1||f.type==="skip"||!s&&(c["x-internal"]===!0||c["x-hidden"]===!0)||!i&&d.deprecated===!0||d.isWebhook)continue;let h=(d.method||"get").toLowerCase(),y=d.path||"",u=Kh(d,f),g=!1;(f.type==="resource"||f.type!=="tool"&&h==="get"&&u.filter(E=>E.required).length===0&&(y.includes("/reference")||y.includes("/currencies")||y.includes("/countries")||y.includes("/tiers")||y.includes("/categories")||y.includes("/status")||y.includes("/schema")))&&(g=!0);let v=q(f.name||c["x-speakeasy-name-override"]||d.operationId||Hh(h,y)),S=jl(f.description||d.summary||d.description||`${h.toUpperCase()} ${y}`),A=!!(f.requireConfirmation??c["x-openai-isConsequential"]??["post","put","delete","patch"].includes(h.toUpperCase())),b=f.response?.filter||"",w=f.response?.maxItems||0,$={name:v,method:h.toUpperCase(),path:y,description:S,parameters:u,isConsequential:A,readOnly:!!(f.readOnly??h==="get"),responseFilter:b,responseMaxItems:w,tag:d.tagName||""};g?a.push({...$,uri:f.uri||`reference://${v.replace(/^get_/,"").replace(/_/g,"-")}`,mimeType:f.mimeType||"application/json"}):r.push($)}let p=n["x-mcp-workflows"]||[];return{metadata:{title:n.info?.title||"OpenAPI MCP Server",description:jl(n.info?.description||""),version:n.info?.version||"1.0.0",servers:n.servers||[{url:"http://localhost:3000"}]},tools:r,resources:a,workflows:p}}function ze(e=[],t=[],r=[]){let a=0,s=0;for(let n of e){a+=Math.ceil((n.name.length+n.description.length)/4),a+=25,n.isConsequential&&s++;for(let o of n.parameters)a+=Math.ceil((o.name.length+(o.description||"").length)/4),a+=10,o.enum&&(a+=o.enum.length*3)}for(let n of t)a+=Math.ceil((n.name.length+n.description.length+n.uri.length)/4)+20;for(let n of r)a+=Math.ceil((n.name.length+(n.description||"").length)/4)+40,n.parameters&&(a+=Object.keys(n.parameters).length*15);let i=[];return a>5e3&&i.push(`Context overhead (~${a.toLocaleString()} tokens/turn) is high. Consider pruning unused tools with x-mcp.enabled: false.`),e.length>30&&i.push(`${e.length} tools exceeds the recommended limit of 30 tools per agent to prevent model paralysis.`),{totalTools:e.length,totalResources:t.length,totalWorkflows:r.length,estimatedTokens:a,consequentialCount:s,warnings:i}}function Wh(e,t={}){let r=q(e||"api_mcp_server"),a=(t.target||"typescript").toLowerCase(),s="npx",i=["-y","tsx","server.ts"];a==="python"?(s="fastmcp",i=["run","server.py"]):a==="go"?(s=`./${r}`,i=[]):a==="csharp"||a==="c#"?(s="dotnet",i=["run"]):a==="rust"?(s=`./target/release/${r}`,i=[]):a==="java"&&(s="java",i=["-jar","target/mcp-server.jar"]);let n={mcpServers:{[r]:{command:s,args:i,env:{API_KEY:"your-api-key-here"}}}},o=n;return{claudeDesktopConfig:JSON.stringify(n,null,2),cursorConfig:JSON.stringify(o,null,2)}}function Vh(e,t,r,a,s={}){let i=q(s.serverName||e.title||"rapidoc_mcp_server"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=t.map(c=>{let f=c.parameters.map(g=>{let v="z.string()";return g.type==="integer"||g.type==="number"?v="z.number()":g.type==="boolean"?v="z.boolean()":g.type==="array"?v="z.array(z.string())":g.type==="object"&&(v="z.record(z.any())"),g.description&&(v+=`.describe(${JSON.stringify(g.description)})`),g.required||(v+=".optional()"),` ${JSON.stringify(g.name)}: ${v},`}).join(`
`),h=f?`${f}
apiKey: z.string().optional().describe('Optional Bearer API key override for multi-tenant sessions'),`:" apiKey: z.string().optional().describe('Optional Bearer API key override for multi-tenant sessions'),",y=c.path.replace(/\{([^}]+)\}/g,'${encodeURIComponent(args["$1"])}'),u=c.parameters.filter(g=>g.in==="header").map(g=>` if (args[${JSON.stringify(g.name)}]) {
headers[${JSON.stringify(g.name)}] = String(args[${JSON.stringify(g.name)}]);
}`).join(`
`);return`
// Tool: ${c.name} (${c.method} ${c.path})
// ${c.isConsequential?"\u26A0\uFE0F Consequential/Destructive action":"Safe/Read-only action"}
server.tool(
${JSON.stringify(c.name)},
${JSON.stringify(c.description+(c.isConsequential?" (Requires confirmation)":""))},
{
${h}
},
async (args: any) => {
const targetUrl = new URL(\`\${BASE_URL.replace(/\\/$/, '')}${y}\`);
let url = targetUrl.toString();
const queryParams = new URLSearchParams();
${c.parameters.filter(g=>g.in==="query").map(g=>` if (args[${JSON.stringify(g.name)}] !== undefined) queryParams.set(${JSON.stringify(g.name)}, String(args[${JSON.stringify(g.name)}]));`).join(`
`)}
const qs = queryParams.toString();
if (qs) url += (url.includes('?') ? '&' : '?') + qs;
const headers: Record<string, string> = {
'Accept': 'application/json',
'Content-Type': 'application/json',
};
${u?`
`+u+`
`:""} const resolvedKey = args?.apiKey || API_KEY;
if (resolvedKey) headers['Authorization'] = \`Bearer \${resolvedKey}\`;
const fetchOptions: RequestInit = {
method: ${JSON.stringify(c.method)},
headers,
};
${["POST","PUT","PATCH"].includes(c.method)?` const bodyPayload: Record<string, any> = {};
${c.parameters.filter(g=>g.in==="body").map(g=>` if (args[${JSON.stringify(g.name)}] !== undefined) bodyPayload[${JSON.stringify(g.name)}] = args[${JSON.stringify(g.name)}];`).join(`
`)}
if (Object.keys(bodyPayload).length > 0) {
fetchOptions.body = JSON.stringify(bodyPayload);
}`:""}
try {
const response = await fetch(url, fetchOptions);
const text = await response.text();
let data = text;
try { data = JSON.parse(text); } catch {}
return {
content: [{ type: 'text', text: typeof data === 'string' ? data : JSON.stringify(data, null, 2) }],
};
} catch (err: any) {
return {
isError: true,
content: [{ type: 'text', text: \`Error invoking ${c.name}: \${err.message}\` }],
};
}
}
);`}).join(`
`),p=r.map(c=>`
// Resource: ${c.name} (${c.uri})
server.resource(
${JSON.stringify(c.name)},
${JSON.stringify(c.uri)},
async (uri) => {
const targetUrl = new URL(\`\${BASE_URL.replace(/\\/$/, '')}${c.path}\`);
const resolvedKey = uri.searchParams?.get('apiKey') || uri.searchParams?.get('api_key') || API_KEY;
if (uri.searchParams) {
uri.searchParams.forEach((val, key) => {
if (!['apikey', 'api_key'].includes(key.toLowerCase())) {
targetUrl.searchParams.set(key, val);
}
});
}
const headers: Record<string, string> = { 'Accept': ${JSON.stringify(c.mimeType)} };
if (resolvedKey) headers['Authorization'] = \`Bearer \${resolvedKey}\`;
const res = await fetch(targetUrl.toString(), { headers });
const text = await res.text();
return {
contents: [{
uri: uri.href,
text,
mimeType: ${JSON.stringify(c.mimeType)},
}],
};
}
);`).join(`
`),d=a.map(c=>{let f=c.parameters?Object.keys(c.parameters):[],h=f.map(u=>` ${JSON.stringify(u)}: z.string().describe(${JSON.stringify(c.parameters[u].description||"")}),`).concat([" apiKey: z.string().optional().describe('Optional Bearer API key override for multi-tenant sessions'),"]).join(`
`),y=f[0]||"id";return`
// Composite Workflow: ${c.name}
// Collapses multi-step atomic REST calls into 1 tool call
server.tool(
${JSON.stringify(c.name)},
${JSON.stringify(c.description||"Composite workflow")},
{
${h}
},
async (args: any) => {
const results: Record<string, any> = {};
const headers: Record<string, string> = { 'Accept': 'application/json' };
const resolvedKey = args?.apiKey || API_KEY;
if (resolvedKey) headers['Authorization'] = \`Bearer \${resolvedKey}\`;
try {
${(c.steps||[]).map((u,g)=>` // Step ${g+1}: ${u.call}
const stepUrl_${g} = \`\${BASE_URL.replace(/\\/$/, '')}/api/\${encodeURIComponent(args[${JSON.stringify(y)}] || '')}\`;
const resp_${g} = await fetch(stepUrl_${g}, { headers });
results[${JSON.stringify(u.call)}] = await resp_${g}.json();`).join(`
`)}
return {
content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
};
} catch (err: any) {
return {
isError: true,
content: [{ type: 'text', text: \`Workflow ${c.name} failed: \${err.message}\` }],
};
}
}
);`}).join(`
`);return`/**
* Auto-generated by RapiDoc Curated MCP Generator
* Spec: ${e.title} (v${e.version})
*
* [MULTI-TENANCY & AUTHENTICATION]
* - Local Stdio Mode: Claude Desktop, Cursor, and local agents use API_KEY from environment.
* - Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
* per-session credentials directly in the \`apiKey\` parameter of any tool.
*
* [TOKEN BUDGET DIAGNOSTIC]
* - Total Tools: ${n.totalTools}
* - Total Resources: ${n.totalResources}
* - Total Workflows: ${n.totalWorkflows}
* - Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(c=>` * - \u26A0\uFE0F ${c}`).join(`
`)}
*
* [HOW TO RUN]
* 1. npm install @modelcontextprotocol/sdk zod
* 2. API_KEY="your-key" npx tsx server.ts
*/
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';
const API_KEY = process.env.API_KEY || '';
const BASE_URL = process.env.API_BASE_URL || ${JSON.stringify(o)};
const server = new McpServer({
name: ${JSON.stringify(i)},
version: ${JSON.stringify(e.version)},
});
${p}
${l}
${d}
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error(\`[MCP] ${i} running on stdio\`);
}
main().catch((err) => {
console.error('[MCP] Fatal error running server:', err);
process.exit(1);
});
`}function Jh(e,t,r={}){let a={name:q(r.serverName||t.title||"rapidoc-mcp-server"),version:t.version||"1.0.0",type:"module",scripts:{start:"npx tsx server.ts"},dependencies:{"@modelcontextprotocol/sdk":"^1.6.0",zod:"^3.24.0"},devDependencies:{tsx:"^4.19.0",typescript:"^5.7.0"}},s=`# ${t.title} - MCP Server (TypeScript)
Auto-generated by RapiDoc Curated MCP Generator.
### Prerequisites
- Node.js 18+
- \`npm install\`
### Running the Server
\`\`\`bash
API_KEY="your-key" npm start
\`\`\`
`;return{"server.ts":e,"package.json":JSON.stringify(a,null,2),"README.md":s}}function Gh(e,t,r,a,s={}){let i=q(s.serverName||e.title||"rapidoc_mcp_server"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=t.map(c=>{let f=[c.parameters.map(u=>{let g="str";if(u.type==="integer")g="int";else if(u.type==="number")g="float";else if(u.type==="boolean")g="bool";else if(u.type==="array"){let v=u.items?.type;g=v==="integer"?"List[int]":v==="number"?"List[float]":v==="boolean"?"List[bool]":v==="object"?"List[Dict[str, Any]]":"List[str]"}else u.type==="object"&&(g="Dict[str, Any]");return u.required?`${q(u.name)}: ${g}`:`${q(u.name)}: Optional[${g}] = None`}).join(", "),"api_key: Optional[str] = None"].filter(Boolean).join(", "),h=c.parameters.filter(u=>u.in==="path").map(u=>` safe_${q(u.name)} = urllib.parse.quote(str(${q(u.name)}))`).join(`
`),y=c.path.replace(/\{([^}]+)\}/g,(u,g)=>`{safe_${q(g)}}`);return`
@mcp.tool(
name="${c.name}",
description="${c.description.replace(/"/g,'\\"')}"
)
def ${c.name}(${f}) -> str:
"""${c.description}${c.isConsequential?" (\u26A0\uFE0F Consequential action - requires confirmation)":""}"""
${h?h+`
`:""} url = f"{BASE_URL.rstrip('/')}${y}"
headers = {"Accept": "application/json"}
${c.parameters.filter(u=>u.in==="header").map(u=>` if ${q(u.name)} is not None:
headers["${u.name}"] = str(${q(u.name)})`).join(`
`)}
resolved_key = api_key or API_KEY
if resolved_key:
headers["Authorization"] = f"Bearer {resolved_key}"
params = {}
${c.parameters.filter(u=>u.in==="query").map(u=>` if ${q(u.name)} is not None:
params["${u.name}"] = ${q(u.name)}`).join(`
`)}
if params:
url += ("&" if "?" in url else "?") + urllib.parse.urlencode(params)
body_bytes = None
${["POST","PUT","PATCH"].includes(c.method)?` body_payload = {}
${c.parameters.filter(u=>u.in==="body").map(u=>` if ${q(u.name)} is not None:
body_payload["${u.name}"] = ${q(u.name)}`).join(`
`)}
if body_payload:
headers["Content-Type"] = "application/json"
body_bytes = json.dumps(body_payload).encode("utf-8")`:""}
req = urllib.request.Request(url, data=body_bytes, headers=headers, method="${c.method}")
try:
with urllib.request.urlopen(req, timeout=30.0) as resp:
return resp.read().decode("utf-8")
except urllib.error.HTTPError as e:
return e.read().decode("utf-8")
except Exception as e:
return f"Error invoking ${c.name}: {str(e)}"
`}).join(`
`),p=r.map(c=>`
@mcp.resource("${c.uri}")
def ${q(c.name)}(uri: str = "") -> str:
"""${c.description}"""
url = f"{BASE_URL.rstrip('/')}${c.path}"
headers = {"Accept": "${c.mimeType||"application/json"}"}
resolved_key = API_KEY
if uri and "?" in uri:
parsed_query = urllib.parse.parse_qs(urllib.parse.urlparse(uri).query)
passed_key = parsed_query.get("apiKey") or parsed_query.get("api_key")
if passed_key and passed_key[0].strip():
resolved_key = passed_key[0].strip()
if resolved_key:
headers["Authorization"] = f"Bearer {resolved_key}"
if uri and "?" in uri:
parsed_query = urllib.parse.parse_qs(urllib.parse.urlparse(uri).query)
params = {k: v[0] for k, v in parsed_query.items() if k.lower() not in ["apikey", "api_key"]}
if params:
url += ("&" if "?" in url else "?") + urllib.parse.urlencode(params)
req = urllib.request.Request(url, headers=headers, method="GET")
try:
with urllib.request.urlopen(req, timeout=30.0) as resp:
return resp.read().decode("utf-8")
except urllib.error.HTTPError as e:
return e.read().decode("utf-8")
except Exception as e:
return f"Error loading resource: {str(e)}"
`).join(`
`),d=a.map(c=>{let f=c.parameters?Object.keys(c.parameters):[],h=f.map(y=>`${q(y)}: str`).concat(["api_key: Optional[str] = None"]).join(", ");return`
@mcp.tool(
name="${c.name}",
description="${(c.description||"Composite workflow").replace(/"/g,'\\"')}"
)
def ${q(c.name)}(${h}) -> str:
"""Composite workflow: ${(c.description||"").replace(/"/g,'\\"')}"""
results = {}
headers = {"Accept": "application/json"}
resolved_key = api_key or API_KEY
if resolved_key:
headers["Authorization"] = f"Bearer {resolved_key}"
try:
${(c.steps||[]).map((y,u)=>{let g=f[0]||"id";return` # Step ${u+1}: ${y.call}
step_url_${u} = f"{BASE_URL.rstrip('/')}/api/{urllib.parse.quote(str(${q(g)}))}"
req_${u} = urllib.request.Request(step_url_${u}, headers=headers, method="GET")
with urllib.request.urlopen(req_${u}, timeout=30.0) as resp_${u}:
results["${y.call}"] = json.loads(resp_${u}.read().decode("utf-8"))`}).join(`
`)}
return json.dumps(results, indent=2)
except Exception as e:
return f"Workflow ${c.name} failed: {str(e)}"
`}).join(`
`);return`"""
Auto-generated by RapiDoc Curated MCP Generator
Spec: ${e.title} (v${e.version})
[MULTI-TENANCY & AUTHENTICATION]
- Local Stdio Mode: Claude Desktop, Cursor, and local agents use API_KEY from environment.
- Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
per-session credentials directly in the \`api_key\` parameter of any tool.
[TOKEN BUDGET DIAGNOSTIC]
- Total Tools: ${n.totalTools}
- Total Resources: ${n.totalResources}
- Total Workflows: ${n.totalWorkflows}
- Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(c=>`- ${c}`).join(`
`)}
[HOW TO RUN]
1. pip install fastmcp
2. fastmcp run server.py
"""
import os
import json
import urllib.request
import urllib.parse
import urllib.error
from typing import Optional, List, Dict, Any
from fastmcp import FastMCP
API_KEY = os.environ.get("API_KEY", "")
BASE_URL = os.environ.get("API_BASE_URL", "${o}")
mcp = FastMCP("${i}")
${p}
${l}
${d}
if __name__ == "__main__":
mcp.run()
`}function Zh(e,t){return{"server.py":e,"requirements.txt":`fastmcp>=0.4.0
`,"README.md":`# ${t.title} - MCP Server (Python FastMCP)
Auto-generated by RapiDoc Curated MCP Generator.
Zero external networking dependencies: uses Python standard library (\`urllib.request\`) + FastMCP.
### Prerequisites
- Python 3.10+
- \`pip install -r requirements.txt\`
### Running the Server
\`\`\`bash
export API_KEY="your-api-key"
fastmcp run server.py
\`\`\`
`}}function Yh(e,t,r,a,s={}){let i=q(s.serverName||e.title||"rapidoc_mcp_server"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=t.map(c=>{let f=c.parameters.map(w=>{let $=[w.required?"mcp.Required()":"",w.description?`mcp.Description(${JSON.stringify(w.description)})`:""].filter(Boolean).join(", ");return w.type==="integer"||w.type==="number"?` mcp.WithNumber("${q(w.name)}"${$?`, ${$}`:""}),`:w.type==="boolean"?` mcp.WithBoolean("${q(w.name)}"${$?`, ${$}`:""}),`:w.type==="array"?` mcp.WithList("${q(w.name)}"${$?`, ${$}`:""}),`:w.type==="object"?` mcp.WithObject("${q(w.name)}"${$?`, ${$}`:""}),`:` mcp.WithString("${q(w.name)}"${$?`, ${$}`:""}),`}).join(`
`),h=c.parameters.filter(w=>w.in==="query"),y=c.parameters.filter(w=>w.in==="body"),u=["POST","PUT","PATCH"].includes(c.method)&&y.length>0,g=f?`${f}
mcp.WithString("api_key", mcp.Description("Optional Bearer API key override for multi-tenant sessions")),`:' mcp.WithString("api_key", mcp.Description("Optional Bearer API key override for multi-tenant sessions")),',v=c.path.replace(/\{[^}]+\}/g,"%s"),S=c.parameters.filter(w=>w.in==="path").map(w=>`url.PathEscape(fmt.Sprintf("%v", args["${q(w.name)}"]))`).join(", "),A=h.length>0?` queryParams := url.Values{}
${h.map(w=>` if v, ok := args["${q(w.name)}"]; ok && v != nil {
queryParams.Set("${w.name}", fmt.Sprintf("%v", v))
}`).join(`
`)}
if len(queryParams) > 0 {
if strings.Contains(urlStr, "?") {
urlStr += "&" + queryParams.Encode()
} else {
urlStr += "?" + queryParams.Encode()
}
}
`:"",b=u?` var bodyReader io.Reader
bodyPayload := make(map[string]any)
${y.map(w=>` if v, ok := args["${q(w.name)}"]; ok && v != nil {
bodyPayload["${w.name}"] = v
}`).join(`
`)}
if len(bodyPayload) > 0 {
b, _ := json.Marshal(bodyPayload)
bodyReader = bytes.NewBuffer(b)
}
req, err := http.NewRequestWithContext(ctx, "${c.method}", urlStr, bodyReader)
if err != nil {
return mcp.NewToolResultError(fmt.Sprintf("Failed to create request: %v", err)), nil
}
if bodyReader != nil {
req.Header.Set("Content-Type", "application/json")
}
`:` req, err := http.NewRequestWithContext(ctx, "${c.method}", urlStr, nil)
if err != nil {
return mcp.NewToolResultError(fmt.Sprintf("Failed to create request: %v", err)), nil
}
`;return`
// Tool: ${c.name} (${c.method} ${c.path})
s.AddTool(mcp.NewTool("${c.name}",
mcp.WithDescription(${JSON.stringify(c.description)}),
${g}
), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
args := request.Params.Arguments
urlStr := fmt.Sprintf("%s${v}", strings.TrimRight(baseURL, "/")${S?`, ${S}`:""})
${A}${b} req.Header.Set("Accept", "application/json")
${c.parameters.filter(w=>w.in==="header").map(w=>` if v, ok := args["${q(w.name)}"]; ok && v != nil {
req.Header.Set("${w.name}", fmt.Sprintf("%v", v))
}`).join(`
`)}
resolvedKey := apiKey
if keyVal, ok := args["api_key"].(string); ok && keyVal != "" {
resolvedKey = keyVal
}
if resolvedKey != "" {
req.Header.Set("Authorization", "Bearer "+resolvedKey)
}
resp, err := client.Do(req)
if err != nil {
return mcp.NewToolResultError(fmt.Sprintf("API request failed: %v", err)), nil
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return mcp.NewToolResultText(string(body)), nil
})
`}).join(`
`),p=r.map(c=>`
// Resource: ${c.name} (${c.uri})
s.AddResource(mcp.NewResource("${c.uri}", "${q(c.name)}", mcp.WithResourceDescription(${JSON.stringify(c.description)})),
func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) {
targetURL, err := url.Parse(strings.TrimRight(baseURL, "/") + "${c.path}")
if err != nil {
return nil, err
}
resolvedKey := apiKey
if incomingURL, err := url.Parse(request.Params.URI); err == nil {
q := incomingURL.Query()
if passedKey := q.Get("apiKey"); passedKey != "" {
resolvedKey = passedKey
} else if passedKey := q.Get("api_key"); passedKey != "" {
resolvedKey = passedKey
}
targetQuery := targetURL.Query()
for k, v := range q {
if strings.ToLower(k) != "apikey" && strings.ToLower(k) != "api_key" && len(v) > 0 {
targetQuery.Set(k, v[0])
}
}
targetURL.RawQuery = targetQuery.Encode()
}
req, err := http.NewRequestWithContext(ctx, "GET", targetURL.String(), nil)
if err != nil {
return nil, err
}
req.Header.Set("Accept", "${c.mimeType||"application/json"}")
if resolvedKey != "" {
req.Header.Set("Authorization", "Bearer "+resolvedKey)
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return []mcp.ResourceContents{mcp.TextResourceContents{URI: request.Params.URI, MIMEType: "${c.mimeType||"application/json"}", Text: string(body)}}, nil
})`).join(`
`),d=a.map(c=>{let f=c.parameters?Object.keys(c.parameters):[],h=f.map(y=>` mcp.WithString("${q(y)}", mcp.Required(), mcp.Description(${JSON.stringify(c.parameters[y].description||"")})),`).concat([' mcp.WithString("api_key", mcp.Description("Optional Bearer API key override for multi-tenant sessions")),']).join(`
`);return`
// Composite Workflow: ${c.name}
s.AddTool(mcp.NewTool("${c.name}",
mcp.WithDescription(${JSON.stringify(c.description||"Composite workflow")}),
${h}
), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
results := make(map[string]any)
paramVal, _ := request.Params.Arguments["${q(f[0]||"id")}"].(string)
resolvedKey := apiKey
if keyVal, ok := request.Params.Arguments["api_key"].(string); ok && keyVal != "" {
resolvedKey = keyVal
}
${(c.steps||[]).map((y,u)=>` // Step ${u+1}: ${y.call}
stepReq_${u}, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("%s/api/%s", strings.TrimRight(baseURL, "/"), url.QueryEscape(paramVal)), nil)
stepReq_${u}.Header.Set("Accept", "application/json")
if resolvedKey != "" { stepReq_${u}.Header.Set("Authorization", "Bearer "+resolvedKey) }
if resp_${u}, err := client.Do(stepReq_${u}); err == nil {
var jsonRes any
json.NewDecoder(resp_${u}.Body).Decode(&jsonRes)
results["${y.call}"] = jsonRes
resp_${u}.Body.Close()
}`).join(`
`)}
outBytes, _ := json.MarshalIndent(results, "", " ")
return mcp.NewToolResultText(string(outBytes)), nil
})`}).join(`
`);return`/*
Auto-generated by RapiDoc Curated MCP Generator
Spec: ${e.title} (v${e.version})
[MULTI-TENANCY & AUTHENTICATION]
- Local Stdio Mode: Claude Desktop, Cursor, and local agents use API_KEY from environment.
- Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
per-session credentials directly in the \`api_key\` parameter of any tool.
[TOKEN BUDGET DIAGNOSTIC]
- Total Tools: ${n.totalTools}
- Total Resources: ${n.totalResources}
- Total Workflows: ${n.totalWorkflows}
- Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(c=>`- ${c}`).join(`
`)}
[HOW TO RUN]
1. go mod tidy
2. go run main.go
*/
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"strings"
"time"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
)
var (
apiKey = os.Getenv("API_KEY")
baseURL = strings.TrimRight("${o}", "/")
client = &http.Client{Timeout: 30 * time.Second}
)
func main() {
if envURL := os.Getenv("API_BASE_URL"); envURL != "" {
baseURL = strings.TrimRight(envURL, "/")
}
baseURL = strings.TrimRight(baseURL, "/")
s := server.NewMCPServer("${i}", "${e.version||"1.0.0"}", server.WithResourceCapabilities(true, true))
${p}
${l}
${d}
if err := server.ServeStdio(s); err != nil {
fmt.Fprintf(os.Stderr, "Server error: %v\\n", err)
os.Exit(1)
}
}
`}function Xh(e,t,r={}){return{"main.go":e,"go.mod":`module ${q(r.serverName||t.title||"rapidoc_mcp")}
go 1.22
require github.com/mark3labs/mcp-go v0.8.4
`,"README.md":`# ${t.title} - MCP Server (Go)
Auto-generated by RapiDoc Curated MCP Generator using mark3labs/mcp-go.
### Prerequisites
- Go 1.22+
### Building & Running
\`\`\`bash
go mod tidy
go build -o server main.go
export API_KEY="your-api-key"
./server
\`\`\`
`}}function Qh(e,t,r,a,s={}){let i=Se(s.serverName||e.title||"RapiDocMcpServer"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=t.map(c=>{let f=c.parameters.map($=>{let E="string";$.type==="integer"?E="int":$.type==="number"?E="double":$.type==="boolean"?E="bool":$.type==="array"?E="IEnumerable<string>":$.type==="object"&&(E="Dictionary<string, object>");let T=$.required?"":" = default";return`[Description(${JSON.stringify($.description||"")})] ${E} ${H($.name)}${T}`});f.push('[Description("Optional Bearer API key override for multi-tenant sessions")] string apiKey = default');let h=c.parameters.filter($=>$.in==="path"),y=h.length>0?h.map($=>` var safe${Se($.name)} = Uri.EscapeDataString(${H($.name)}?.ToString() ?? "");`).join(`
`)+`
`:"",u=c.path.replace(/\{([^}]+)\}/g,($,E)=>`{safe${Se(E)}}`),g=c.parameters.filter($=>$.in==="query"),v=c.parameters.filter($=>$.in==="body"),S=["POST","PUT","PATCH"].includes(c.method)&&v.length>0,A=g.length>0?` var queryParams = new List<string>();
${g.map($=>` if (${H($.name)} != default) queryParams.Add("${$.name}=" + Uri.EscapeDataString(${H($.name)}.ToString()));`).join(`
`)}
var queryString = queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : "";
`:"",b=g.length>0?`$"${u}" + queryString`:`$"${u}"`,w=S?` var bodyPayload = new Dictionary<string, object>();
${v.map($=>` if (${H($.name)} != default) bodyPayload["${$.name}"] = ${H($.name)};`).join(`
`)}
if (bodyPayload.Count > 0)
{
request.Content = new StringContent(JsonSerializer.Serialize(bodyPayload), System.Text.Encoding.UTF8, "application/json");
}
`:"";return`
[McpTool("${c.name}", ${JSON.stringify(c.description)})]
public static async Task<string> ${Se(c.name)}(${f.join(", ")})
{
using var client = new HttpClient { BaseAddress = new Uri(BaseUrl.TrimEnd('/') + "/") };
var resolvedKey = !string.IsNullOrEmpty(apiKey) ? apiKey : ApiKey;
if (!string.IsNullOrEmpty(resolvedKey))
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", resolvedKey);
}
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
${y}${A} var request = new HttpRequestMessage(HttpMethod.${Se(c.method)}, ${b});
${c.parameters.filter($=>$.in==="header").map($=>` if (!string.IsNullOrEmpty(${H($.name)})) request.Headers.TryAddWithoutValidation("${$.name}", ${H($.name)});`).join(`
`)}
${w} var response = await client.SendAsync(request);
return await response.Content.ReadAsStringAsync();
}`}).join(`
`),p=r.map(c=>`
[McpResource("${c.uri}", "${c.name}", ${JSON.stringify(c.description)})]
public static async Task<string> Get${Se(c.name)}(string uri = "")
{
using var client = new HttpClient { BaseAddress = new Uri(BaseUrl.TrimEnd('/') + "/") };
var resolvedKey = ApiKey;
var outboundQuery = HttpUtility.ParseQueryString(string.Empty);
if (!string.IsNullOrEmpty(uri) && uri.Contains("?"))
{
var parsedUri = new Uri(uri);
var incomingParams = HttpUtility.ParseQueryString(parsedUri.Query);
var dynamicKey = incomingParams["apiKey"] ?? incomingParams["api_key"];
if (!string.IsNullOrEmpty(dynamicKey)) resolvedKey = dynamicKey;
foreach (string key in incomingParams)
{
if (key != null && !key.Equals("apikey", StringComparison.OrdinalIgnoreCase) && !key.Equals("api_key", StringComparison.OrdinalIgnoreCase))
{
outboundQuery[key] = incomingParams[key];
}
}
}
if (!string.IsNullOrEmpty(resolvedKey)) client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", resolvedKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("${c.mimeType||"application/json"}"));
var targetPath = "${c.path}" + (outboundQuery.Count > 0 ? "?" + outboundQuery.ToString() : "");
return await client.GetStringAsync(targetPath.TrimStart('/'));
}`).join(`
`),d=a.map(c=>{let f=c.parameters?Object.keys(c.parameters):[],h=f.map(u=>`[Description(${JSON.stringify(c.parameters[u].description||"")})] string ${H(u)}`).concat(['[Description("Optional Bearer API key override for multi-tenant sessions")] string apiKey = default']).join(", "),y=f[0]||"id";return`
[McpTool("${c.name}", ${JSON.stringify(c.description||"Composite workflow")})]
public static async Task<string> ${Se(c.name)}(${h})
{
using var client = new HttpClient { BaseAddress = new Uri(BaseUrl.TrimEnd('/') + "/") };
var resolvedKey = !string.IsNullOrEmpty(apiKey) ? apiKey : ApiKey;
if (!string.IsNullOrEmpty(resolvedKey)) client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", resolvedKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var results = new Dictionary<string, object>();
${(c.steps||[]).map((u,g)=>` // Step ${g+1}: ${u.call}
var resp_${g} = await client.GetStringAsync($"api/{Uri.EscapeDataString(${H(y)} ?? "")}");
results["${u.call}"] = JsonSerializer.Deserialize<object>(resp_${g});`).join(`
`)}
return JsonSerializer.Serialize(results, new JsonSerializerOptions { WriteIndented = true });
}`}).join(`
`);return`/*
Auto-generated by RapiDoc Curated MCP Generator
Spec: ${e.title} (v${e.version})
[MULTI-TENANCY & AUTHENTICATION]
- Local Stdio Mode: Claude Desktop, Cursor, and local agents use API_KEY from environment.
- Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
per-session credentials directly in the \`apiKey\` parameter of any tool.
[TOKEN BUDGET DIAGNOSTIC]
- Total Tools: ${n.totalTools}
- Total Resources: ${n.totalResources}
- Total Workflows: ${n.totalWorkflows}
- Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(c=>`- ${c}`).join(`
`)}
[HOW TO RUN]
1. dotnet restore
2. dotnet run
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Threading.Tasks;
using System.Web;
using ModelContextProtocol.NET.Server;
namespace ${i};
public class Program
{
private static readonly string ApiKey = Environment.GetEnvironmentVariable("API_KEY") ?? "";
private static readonly string BaseUrl = Environment.GetEnvironmentVariable("API_BASE_URL") ?? "${o}";
public static async Task Main(string[] args)
{
var server = new McpServer(new McpServerOptions
{
ServerInfo = new() { Name = "${q(i)}", Version = "${e.version||"1.0.0"}" }
});
server.RegisterTools<Program>();
server.RegisterResources<Program>();
await server.StartAsync(Console.OpenStandardInput(), Console.OpenStandardOutput());
}
${p}
${l}
${d}
}
`}function em(e,t){return{"Program.cs":e,"Server.csproj":`<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModelContextProtocol.NET.Server" Version="1.0.0" />
</ItemGroup>
</Project>
`,"README.md":`# ${t.title} - MCP Server (C# / .NET)
Auto-generated by RapiDoc Curated MCP Generator.
### Prerequisites
- .NET 8.0 SDK or newer
### Building & Running
\`\`\`bash
dotnet restore
export API_KEY="your-api-key"
dotnet run
\`\`\`
`}}function tm(e,t,r,a,s={}){let i=q(s.serverName||e.title||"rapidoc_mcp_server"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=t.map(y=>{let u=y.parameters.map(g=>{let v="string";return g.type==="integer"||g.type==="number"?v="number":g.type==="boolean"?v="boolean":g.type==="array"?v="array":g.type==="object"&&(v="object"),`
.property("${q(g.name)}", "${v}", ${!!g.required}, ${JSON.stringify(g.description||"")})`}).join("");return` server.add_tool(
Tool::new("${y.name}", ${JSON.stringify(y.description)})
${u?u+`
`:""} .property("api_key", "string", false, "Optional Bearer API key override for multi-tenant sessions")
);`}).join(`
`),p=a.map(y=>{let u=(y.parameters?Object.keys(y.parameters):[]).map(g=>`
.property("${q(g)}", "string", true, ${JSON.stringify(y.parameters[g].description||"")})`).join("");return` server.add_tool(
Tool::new("${y.name}", ${JSON.stringify(y.description||"Composite workflow")})
${u?u+`
`:""} .property("api_key", "string", false, "Optional Bearer API key override for multi-tenant sessions")
);`}).join(`
`),d=t.map(y=>{let u=y.path.replace(/\{[^}]+\}/g,"{}"),g=y.parameters.filter(E=>E.in==="path"),v=y.parameters.filter(E=>E.in==="query"),S=y.parameters.filter(E=>E.in==="body"),A=["POST","PUT","PATCH"].includes(y.method)&&S.length>0,b=g.map(E=>`urlencoding::encode(args.get("${q(E.name)}").and_then(|v| v.as_str()).unwrap_or("")).as_ref()`).join(", "),w=v.length>0?` let mut query_params: Vec<(&str, String)> = Vec::new();
${v.map(E=>` if let Some(val) = args.get("${q(E.name)}") {
let s = val.as_str().map(String::from).unwrap_or_else(|| val.to_string());
query_params.push(("${E.name}", s));
}`).join(`
`)}
if !query_params.is_empty() {
req = req.query(&query_params);
}
`:"",$=A?` let mut body_map = serde_json::Map::new();
${S.map(E=>` if let Some(val) = args.get("${q(E.name)}") {
body_map.insert("${E.name}".to_string(), val.clone());
}`).join(`
`)}
if !body_map.is_empty() {
req = req.json(&body_map);
}
`:"";return` "${y.name}" => {
let url = format!("{}${u}", base_url.trim_end_matches('/')${b?`, ${b}`:""});
let mut req = client.request(reqwest::Method::from_bytes(b"${y.method}")?, &url)
.header("Accept", "application/json");
${y.parameters.filter(E=>E.in==="header").map(E=>` if let Some(h) = args.get("${E.name}").or_else(|| args.get("${q(E.name)}")).and_then(|v| v.as_str()) {
req = req.header("${E.name}", h);
}`).join(`
`)}
let resolved_key = args.get("api_key").and_then(|v| v.as_str()).map(String::from).or_else(|| api_key.clone());
if let Some(ref key) = resolved_key {
req = req.header("Authorization", format!("Bearer {}", key));
}
${w}${$} let resp = req.send().await?;
let text = resp.text().await?;
Ok(ToolResponse::text(text))
}`}).join(`
`),c=a.map(y=>{let u=(y.parameters?Object.keys(y.parameters):[])[0]||"id";return` "${y.name}" => {
let resolved_key = args.get("api_key").and_then(|v| v.as_str()).map(String::from).or_else(|| api_key.clone());
let param_val = args.get("${q(u)}").and_then(|v| v.as_str()).unwrap_or("");
let mut results = serde_json::Map::new();
${(y.steps||[]).map((g,v)=>` // Step ${v+1}: ${g.call}
let step_url_${v} = format!("{}/api/{}", base_url.trim_end_matches('/'), urlencoding::encode(param_val));
let mut step_req_${v} = client.get(&step_url_${v}).header("Accept", "application/json");
if let Some(ref key) = resolved_key {
step_req_${v} = step_req_${v}.header("Authorization", format!("Bearer {}", key));
}
if let Ok(resp) = step_req_${v}.send().await {
if let Ok(json_res) = resp.json::<serde_json::Value>().await {
results.insert("${g.call}".to_string(), json_res);
}
}`).join(`
`)}
Ok(ToolResponse::text(serde_json::to_string_pretty(&results)?))
}`}).join(`
`),f=r.map(y=>` "${y.uri}" => {
let mut req = client.get(format!("{}{}", base_url.trim_end_matches('/'), "${y.path}")).header("Accept", "${y.mimeType}");
if !query_params.is_empty() {
req = req.query(&query_params);
}
if let Some(ref key) = resolved_key {
req = req.header("Authorization", format!("Bearer {}", key));
}
let resp = req.send().await.map_err(|e| Box::new(e) as Box<dyn Error>)?;
let text = resp.text().await.map_err(|e| Box::new(e) as Box<dyn Error>)?;
Ok(vec![mcp_sdk::server::ResourceContents::text("${y.uri}", "${y.mimeType}", text)])
}`).join(`
`),h=r.length>0?`
server.on_read_resource(move |uri| {
let client = client.clone();
let api_key = api_key.clone();
let base_url = base_url.clone();
async move {
let (base_uri, query_str) = uri.split_once('?').unwrap_or((uri.as_str(), ""));
let mut resolved_key = api_key.clone();
let mut query_params: Vec<(&str, &str)> = Vec::new();
if !query_str.is_empty() {
for pair in query_str.split('&') {
if let Some((k, v)) = pair.split_once('=') {
if k.eq_ignore_ascii_case("apikey") || k.eq_ignore_ascii_case("api_key") {
if !v.is_empty() {
resolved_key = Some(v.to_string());
}
} else if !k.is_empty() {
query_params.push((k, v));
}
}
}
}
match base_uri {
${f}
_ => Err(format!("Unknown resource: {}", uri).into()),
}
}
});`:"";return`/*
Auto-generated by RapiDoc Curated MCP Generator
Spec: ${e.title} (v${e.version})
[MULTI-TENANCY & AUTHENTICATION]
- Local Stdio Mode: Claude Desktop, Cursor, and local agents use API_KEY from environment.
- Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
per-session credentials directly in the \`api_key\` parameter of any tool.
[TOKEN BUDGET DIAGNOSTIC]
- Total Tools: ${n.totalTools}
- Total Resources: ${n.totalResources}
- Total Workflows: ${n.totalWorkflows}
- Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(y=>`- ${y}`).join(`
`)}
[HOW TO RUN]
1. cargo build --release
2. cargo run
*/
use std::env;
use std::error::Error;
use mcp_sdk::server::{Server, StdioTransport, Tool, ToolResponse};
use serde_json::Value;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let api_key = env::var("API_KEY").ok();
let base_url = env::var("API_BASE_URL").unwrap_or_else(|_| "${o}".to_string());
let client = reqwest::Client::new();
let mut server = Server::new("${i}", "${e.version||"1.0.0"}");
${l}
${p?`
`+p:""}
server.on_call_tool(move |name, args: Value| {
let client = client.clone();
let api_key = api_key.clone();
let base_url = base_url.clone();
async move {
let result: Result<ToolResponse, Box<dyn Error>> = async {
match name.as_str() {
${d}
${c}
_ => Err(format!("Unknown tool or workflow: {}", name).into()),
}
}.await;
match result {
Ok(resp) => Ok(resp),
Err(e) => Ok(ToolResponse::error(format!("Execution failed: {}", e))),
}
}
});${h}
server.listen(StdioTransport::new()).await?;
Ok(())
}
`}function rm(e,t,r={}){return{"src/main.rs":e,"Cargo.toml":`[package]
name = "${q(r.serverName||t.title||"rapidoc_mcp")}"
version = "0.1.0"
edition = "2021"
[dependencies]
mcp-sdk = "0.1"
tokio = { version = "1.0", features = ["full"] }
reqwest = { version = "0.11", features = ["json"] }
serde_json = "1.0"
urlencoding = "2.1"
`,"README.md":`# ${t.title} - MCP Server (Rust)
Auto-generated by RapiDoc Curated MCP Generator.
### Prerequisites
- Rust & Cargo (1.75+)
### Building & Running
\`\`\`bash
cargo build --release
export API_KEY="your-api-key"
./target/release/${q(r.serverName||t.title||"rapidoc_mcp")}
\`\`\`
`}}function am(e){return e.type==="integer"?"Integer":e.type==="number"?"Double":e.type==="boolean"?"Boolean":e.type==="array"?"java.util.List<String>":e.type==="object"?"java.util.Map<String, Object>":"String"}function sm(e,t,r,a,s={}){let i=Se(s.serverName||"RapiDocMcpServer"),n=ze(t,r,a),o=e.servers?.[0]?.url||"http://localhost:3000",l=[],p=t.map(h=>{let y=`${Se(h.name)}Request`,u=h.parameters.filter(D=>D.in==="path"),g=h.parameters.filter(D=>D.in==="query"),v=h.parameters.filter(D=>D.in==="header"),S=h.parameters.filter(D=>D.in==="body"),A=h.parameters.map(D=>`${` @JsonPropertyDescription(${JSON.stringify(D.description||D.name)})
`}${D.required?` @JsonProperty(value = ${JSON.stringify(D.name)}, required = true)
`:` @JsonProperty(${JSON.stringify(D.name)})
`} ${am(D)} ${H(D.name)}`);A.push(` @JsonPropertyDescription("Optional Bearer API key override for multi-tenant sessions")
@JsonProperty("apiKey")
String apiKey`),l.push(` @JsonClassDescription(${JSON.stringify(h.description||h.name)})
public record ${y}(
${A.join(`,
`)}
) {}`);let b=u.map(D=>` .replace("{${D.name}}", request.${H(D.name)}() != null ? UriUtils.encodePath(String.valueOf(request.${H(D.name)}()), StandardCharsets.UTF_8) : "")`).join(`
`),w=g.map(D=>` if (request.${H(D.name)}() != null) uriBuilder.queryParam("${D.name}", request.${H(D.name)}());`).join(`
`),$=v.map(D=>` if (request.${H(D.name)}() != null && !String.valueOf(request.${H(D.name)}()).isBlank()) {
spec.header("${D.name}", String.valueOf(request.${H(D.name)}()));
}`).join(`
`),E=["POST","PUT","PATCH"].includes(h.method)&&S.length>0,T=E?` Map<String, Object> bodyPayload = new java.util.LinkedHashMap<>();
${S.map(D=>` if (request.${H(D.name)}() != null) bodyPayload.put("${D.name}", request.${H(D.name)}());`).join(`
`)}`:"";return` // Tool: ${h.name} (${h.method} ${h.path})
// ${h.isConsequential?"\u26A0\uFE0F Consequential/Destructive action":"Safe/Read-only action"}
@Bean
@Description(${JSON.stringify(h.description+(h.isConsequential?" (Requires confirmation)":""))})
public Function<${y}, String> ${H(h.name)}() {
return request -> {
String resolvedKey = request.apiKey() != null && !request.apiKey().isBlank() ? request.apiKey() : this.apiKey;
String resolvedPath = "${h.path}"${b?`
`+b:""};
// Spring's builder automatically normalizes matching slashes between baseUrl and paths
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(this.baseUrl);
uriBuilder.path(resolvedPath);
${w?w+`
`:""}${T?T+`
`:""} try {
RestClient.RequestBodySpec spec = restClient.method(HttpMethod.${h.method})
.uri(uriBuilder.build().toUri())
.accept(MediaType.APPLICATION_JSON);
if (resolvedKey != null && !resolvedKey.isBlank()) {
spec.header("Authorization", "Bearer " + resolvedKey);
}
${$?$+`
`:""}${E?` if (!bodyPayload.isEmpty()) {
spec.contentType(MediaType.APPLICATION_JSON).body(bodyPayload);
}
`:""} return spec.retrieve().body(String.class);
} catch (Exception e) {
return "Error invoking ${h.name}: " + e.getMessage();
}
};
}`}).join(`
`),d=a.length>0,c=r.map(h=>{let y=`${h.uri}{?apiKey,api_key}`;return` // Resource: ${h.name} (${y})
@Bean
@Description(${JSON.stringify(`Resource: ${h.name} (${y})`)})
public Function<Map<String, Object>, String> ${H(h.name)}() {
return args -> {
String resolvedKey = this.apiKey;
if (args != null && args.containsKey("apiKey") && args.get("apiKey") != null) {
String passedKey = String.valueOf(args.get("apiKey"));
if (!passedKey.isBlank()) {
resolvedKey = passedKey;
}
} else if (args != null && args.containsKey("api_key") && args.get("api_key") != null) {
String passedKey = String.valueOf(args.get("api_key"));
if (!passedKey.isBlank()) {
resolvedKey = passedKey;
}
}
// Spring's builder automatically normalizes matching slashes between baseUrl and paths
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(this.baseUrl);
uriBuilder.path("${h.path}");
if (args != null) {
args.forEach((key, value) -> {
if (!"apiKey".equalsIgnoreCase(key) && !"api_key".equalsIgnoreCase(key) && value != null) {
uriBuilder.queryParam(key, value);
}
});
}
try {
RestClient.RequestHeadersSpec<?> spec = restClient.get()
.uri(uriBuilder.build().toUri())
.accept(MediaType.parseMediaType("${h.mimeType||"application/json"}"));
if (resolvedKey != null && !resolvedKey.isBlank()) {
spec.header("Authorization", "Bearer " + resolvedKey);
}
return spec.retrieve().body(String.class);
} catch (Exception e) {
return "Error loading resource: " + e.getMessage();
}
};
}`}).join(`
`),f=a.map(h=>{let y=`${Se(h.name)}Request`,u=h.parameters?Object.keys(h.parameters):[],g=u.map(S=>` @JsonPropertyDescription(${JSON.stringify(h.parameters[S].description||"")})
@JsonProperty(required = true)
String ${H(S)}`);g.push(` @JsonPropertyDescription("Optional Bearer API key override for multi-tenant sessions")
String apiKey`),l.push(` @JsonClassDescription(${JSON.stringify(h.description||"Composite workflow")})
public record ${y}(
${g.join(`,
`)}
) {}`);let v=u[0]||"id";return` // Composite Workflow: ${h.name}
@Bean
@Description(${JSON.stringify(h.description||"Composite workflow")})
public Function<${y}, String> ${H(h.name)}() {
return request -> {
String resolvedKey = request.apiKey() != null && !request.apiKey().isBlank() ? request.apiKey() : this.apiKey;
Map<String, Object> results = new java.util.LinkedHashMap<>();
ObjectMapper mapper = new ObjectMapper();
try {
${(h.steps||[]).map((S,A)=>` // Step ${A+1}: ${S.call}
UriComponentsBuilder stepUri_${A} = UriComponentsBuilder.fromUriString(this.baseUrl);
stepUri_${A}.path("/api/" + UriUtils.encodePath(String.valueOf(request.${H(v)}()), StandardCharsets.UTF_8));
RestClient.RequestHeadersSpec<?> stepSpec_${A} = restClient.get().uri(stepUri_${A}.build().toUri()).accept(MediaType.APPLICATION_JSON);
if (resolvedKey != null && !resolvedKey.isBlank()) { stepSpec_${A}.header("Authorization", "Bearer " + resolvedKey); }
String stepBody_${A} = stepSpec_${A}.retrieve().body(String.class);
try {
results.put("${S.call}", mapper.readValue(stepBody_${A}, Object.class));
} catch (Exception parseEx) {
results.put("${S.call}", stepBody_${A});
}`).join(`
`)}
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(results);
} catch (Exception e) {
return "Workflow ${h.name} failed: " + e.getMessage();
}
};
}`}).join(`
`);return`/*
Auto-generated by RapiDoc Curated MCP Generator
Spec: ${e.title} (v${e.version})
[MULTI-TENANCY & AUTHENTICATION]
- Local Stdio Mode: Runs locally (e.g. Claude Desktop, Cursor). Uses \`API_KEY\` from environment.
- Multi-Tenant / Agent Mode: When running in a shared service, the calling AI agent can pass
per-session credentials directly in the \`apiKey\` request field of any tool record.
[TOKEN BUDGET DIAGNOSTIC]
- Total Tools: ${n.totalTools}
- Total Resources: ${n.totalResources}
- Total Workflows: ${n.totalWorkflows}
- Estimated Prompt Context Overhead: ~${n.estimatedTokens.toLocaleString()} tokens/turn
${n.warnings.map(h=>`- ${h}`).join(`
`)}
[HOW TO RUN]
1. export API_KEY="your-api-key"
2. ./mvnw spring-boot:run
*/
package com.rapidoc.mcp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Description;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestClient;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.UriUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonClassDescription;
${d?`import com.fasterxml.jackson.databind.ObjectMapper;
`:""}
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.function.Function;
@SpringBootApplication
public class ${i} {
private final String baseUrl = System.getenv().getOrDefault("API_BASE_URL", "${o}");
private final String apiKey = System.getenv().getOrDefault("API_KEY", "");
private final RestClient restClient = RestClient.builder().build();
public static void main(String[] args) {
SpringApplication.run(${i}.class, args);
}
// ==========================================
// TOOL REQUEST RECORDS (Strongly Typed for Spring AI MCP)
// ==========================================
${l.join(`
`)}
// ==========================================
// MCP TOOLS (@Bean Function Callbacks)
// ==========================================
${p}
${c?`
// ==========================================
// MCP RESOURCES
// ==========================================
`+c:""}
${f?`
// ==========================================
// COMPOSITE WORKFLOWS
// ==========================================
`+f:""}
}
`}function im(e,t){return{"src/main/java/com/rapidoc/mcp/RapiDocMcpServer.java":e,"pom.xml":`<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.0</version>
<relativePath/>
</parent>
<groupId>com.rapidoc</groupId>
<artifactId>mcp-server</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</project>
`,"README.md":`# ${t.title} - MCP Server (Java Spring AI)
Auto-generated by RapiDoc Curated MCP Generator.
### Prerequisites
- Java 17+
- Maven 3.8+
### Building & Running
\`\`\`bash
export API_KEY="your-api-key"
./mvnw spring-boot:run
\`\`\`
`}}function nm(e,t={}){let r=(t.target||"typescript").toLowerCase(),a=r==="c#"?"csharp":r,s=Il(e,t),i=ze(s.tools,s.resources,s.workflows),n=Wh(t.serverName||s.metadata.title,{target:a}),o,l;a==="python"?(o=Gh(s.metadata,s.tools,s.resources,s.workflows,t),l=Zh(o,s.metadata,t)):a==="go"?(o=Yh(s.metadata,s.tools,s.resources,s.workflows,t),l=Xh(o,s.metadata,t)):a==="csharp"?(o=Qh(s.metadata,s.tools,s.resources,s.workflows,t),l=em(o,s.metadata,t)):a==="rust"?(o=tm(s.metadata,s.tools,s.resources,s.workflows,t),l=rm(o,s.metadata,t)):a==="java"?(o=sm(s.metadata,s.tools,s.resources,s.workflows,t),l=im(o,s.metadata,t)):(o=Vh(s.metadata,s.tools,s.resources,s.workflows,t),l=Jh(o,s.metadata,t));let p={"claude_desktop_config.json":n.claudeDesktopConfig,...l};return{target:a,serverCode:o,hostConfig:n.claudeDesktopConfig,budget:i,files:p,extracted:s}}function Sa(){let e=Rl(this.mcp),t=this.specUrl&&this.allowSpecFileDownload==="true",r=e.length>0;if(!t&&!r)return"";let a="section-gap";return this.renderStyle==="focused"?a="section-gap--focused-mode":this.renderStyle==="read"&&(a="section-gap--read-mode"),m`<section id="downloads" part="section-downloads" class="downloads-bar observe-me ${a}">${t?m`<button class="btn btn-outline download-btn" part="btn btn-outline" @click="${()=>{gn(this.specUrl,"openapi-spec")}}">Download OpenAPI spec</button> ${this.specUrl?.trim().toLowerCase().endsWith("json")?m`<button class="btn btn-outline download-btn view-spec" part="btn btn-outline" @click="${()=>{yn(this.specUrl)}}">View OpenAPI spec (New Tab)</button>`:""}`:""} ${r?e.length===1?m`<button class="btn btn-outline download-btn" part="btn btn-outline btn-mcp-export" @click="${()=>{this.downloadMcpServer(e[0])}}">Export MCP Server (${ql[e[0]]||e[0]})</button>`:m`<select class="btn btn-outline download-select" part="btn btn-outline btn-mcp-export" @change="${s=>{let i=s.target.value;i&&(this.downloadMcpServer(i),s.target.value="")}}"><option value="" disabled="disabled" selected="selected">Export MCP Server</option>${e.map(s=>m`<option value="${s}">Export ${ql[s]||s}</option>`)}</select>`:""}</section>`}function ii(e){let t=this.resolvedSpec?.servers.find(r=>r.url===e);return t?(this.selectedServer=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:t}})),!0):!1}function Nl(e,t){let r=[...e.currentTarget.closest("table").querySelectorAll("input, select")],a=t.url;r.forEach(s=>{let i=RegExp(`{${s.dataset.var}}`,"g");a=a.replace(i,s.value)}),t.computedUrl=a,this.requestUpdate()}function om(){return this.selectedServer&&this.selectedServer.variables?m`<h3 class="rapidoc-heading label-heading table-title" part="heading heading-3">Server variables</h3><div class="param-list-container"><ul class="param-list server-vars" part="param-list" role="list">${Object.entries(this.selectedServer.variables).map(e=>m`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${e[0]}</div></div><div class="param-input" part="param-input">${e[1].enum?m`<select data-var="${e[0]}" @input="${t=>{Nl.call(this,t,this.selectedServer)}}">${Object.entries(e[1].enum).map(t=>e[1].default===t[1]?m`<option selected="selected" label="${t[1]}" value="${t[1]}"></option>`:m`<option label="${t[1]}" value="${t[1]}"></option>`)}</select>`:m`<input type="text" part="textbox textbox-server-var" spellcheck="false" data-var="${e[0]}" value="${e[1].default}" @input="${t=>{Nl.call(this,t,this.selectedServer)}}">`}</div>${e[1].description?m`<div class="param-details" part="param-details"><div class="m-markdown-small">${z(M(O(e[1].description)))}</div></div>`:""}</li>`)}</ul></div>`:""}function Bl(){return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":m`<section id="servers" part="section-servers" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}"><h2 part="section-servers-title heading heading-2" class="rapidoc-heading sub-title" style="display:flex;align-items:center;gap:8px">API Server ${this.mockServer==="true"?m`<span style="font-size:var(--font-size-small);font-weight:700;color:var(--green);border:1px solid var(--green);border-radius:var(--radius);padding:1px 6px;letter-spacing:.5px" title="In-browser mock server is active">MOCK ACTIVE</span>`:""}</h2><div class="mono-font" style="margin:12px 0;font-size:calc(var(--font-size-small) + 1px)">${!this.resolvedSpec.servers||this.resolvedSpec.servers?.length===0?"":m`${this.resolvedSpec?.servers.map((e,t)=>m`<div class="server-opt-row"><input type="radio" name="api_server" id="srvr-opt-${t}" value="${e.url}" @change="${()=>{ii.call(this,e.url)}}" .checked="${this.selectedServer.url===e.url}"> <label for="srvr-opt-${t}">${e.url} ${e.description?m`- <span class="regular-font">${e.description}</span>`:""}</label></div>`)}`}<div class="table-title primary-text" part="label-selected-server">SELECTED: ${this.selectedServer?.computedUrl||"none"} ${this.mockServer==="true"?m`<span style="color:var(--green);margin-left:6px">(Mocked)</span>`:""}</div></div><slot name="servers"></slot>${om.call(this)}</section>`}function br(e,t="toggle"){let r=e?.closest(".nav-bar-tag-and-paths"),a=r?.querySelector(".nav-bar-paths-under-tag");if(r){let s=r.classList.contains("expanded");s&&(t==="toggle"||t==="collapse")?(a&&(a.style.maxHeight=0),r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag")?.setAttribute("aria-expanded","false")):s||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),a&&(a.style.maxHeight=a.scrollHeight?`${a.scrollHeight}px`:null),r.querySelector(".nav-bar-tag")?.setAttribute("aria-expanded","true"))}}function Aa(e,t="toggle"){let r=e?.closest(".nav-bar-tag-group");if(r){let a=r.classList.contains("expanded");a&&(t==="toggle"||t==="collapse")?(r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")):a||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true"))}}function ni(e){e&&(Aa(e,"expand"),br(e,"expand"))}function Ll(e,t,r){return Qa(e)?!1:!t||Ir(t,e,r)}function Ea(e,t){return!Qa(e)&&(e.paths||[]).some(r=>Ll(r,t,e.name))}function lm(e,t){return!Qa(e)&&(e.tags||[]).some(r=>Ea(r,t))}function cm(e,t="expand-all"){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target.closest(".nav-scroll"),a=[...r.querySelectorAll(".nav-bar-tag-group")];t==="expand-all"?a.forEach(i=>{i.classList.replace("collapsed","expanded"),i.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true")}):a.forEach(i=>{i.classList.replace("expanded","collapsed"),i.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")});let s=[...r.querySelectorAll(".nav-bar-tag-and-paths")];t==="expand-all"?s.forEach(i=>{let n=i.querySelector(".nav-bar-paths-under-tag");i.classList.replace("collapsed","expanded"),n&&(n.style.maxHeight=`${n?.scrollHeight}px`)}):s.forEach(i=>{i.classList.replace("expanded","collapsed")})}function Pl(e){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let t=e.target.closest("[data-action]")||e.target;if(!(t.closest("#nav-bar-search")||t.closest("#advanced-search-btn")||t.closest('[part~="btn-clear-filter"]')||t.closest('slot[name="nav-logo"]')))if(e.stopPropagation(),t.dataset?.action==="navigate"){this.scrollToEventTarget(e,!1);let r=e.currentTarget.closest("#nav-bar");r.classList.contains("floating-nav")&&r.classList.remove("floating-nav")}else t.dataset?.action==="expand-all"||t.dataset?.action==="collapse-all"?cm(e,t.dataset.action):t.dataset?.action==="expand-collapse-tag-group"?Aa(t,"toggle"):t.dataset?.action==="expand-collapse-tag"&&br(t,"toggle")}function dm(){let e=new Ye,t=!0;function r(){return t?(t=!1,!0):!1}return!this.resolvedSpec||this.resolvedSpec.specLoadError?m`<nav class="nav-bar" part="section-navbar"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot></div></nav>`:m`<button id="nav-bar-btn" part="btn-navbar" class="btn" @click="${this.onOpenNavBarToggle}">☰</button><nav id="nav-bar" class="nav-bar ${this.renderStyle} overflow-${this.navItemOverflow||"ellipsis"}" part="section-navbar"><div class="nav-scroll" tabindex="-1" part="section-navbar-scroll" @click="${a=>Pl.call(this,a)}" @keyup="${a=>Pl.call(this,a)}"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot>${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":m`<div class="nav-bar-search-container ${this.allowAdvancedSearch==="false"?"has-bottom-border":""}" part="section-navbar-search">${this.allowSearch==="false"?"":m`<div class="nav-bar-search-input-wrapper"><input id="nav-bar-search" part="textbox textbox-nav-filter" class="nav-bar-search-input" type="text" placeholder="Filter" @change="${this.onSearchChange}" spellcheck="false"><div class="nav-bar-search-icon" @click="${this.onSearchChange}">↩</div></div>${this.searchVal?m`<button @click="${this.onClearSearch}" class="btn btn-outline btn-clear-filter" part="btn btn-outline btn-clear-filter">CLEAR</button>`:""}`} ${this.allowAdvancedSearch==="false"||this.searchVal?"":m`<button id="advanced-search-btn" class="btn btn-primary" part="btn btn-fill btn-search" @click="${this.onShowAdvancedSearchClicked}">SEARCH</button>`}</div>`}</div>${this.showInfo==="false"||!this.resolvedSpec.info?"":m`${this.infoDescriptionHeadingsInNavBar==="true"?m`${this.resolvedSpec.infoDescriptionHeaders.length>0?(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-content-id="overview" data-action="navigate" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-overview">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})():""}<div class="overview-headers">${this.resolvedSpec.infoDescriptionHeaders.map(a=>{let s=e.slug(a.text);return m`<div class="nav-bar-h${a.depth}" id="link-overview--${s}" data-action="navigate" data-content-id="overview--${s}">${a.text}</div>`})}</div>${this.resolvedSpec.infoDescriptionHeaders.length>0?m`<hr style="border-top:1px solid var(--muted);border-width:1px 0 0 0;margin:15px 0 0 0">`:""}`:(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-action="navigate" data-content-id="overview" data-first-nav-item="${a?"true":F}" tabindex="0">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})()}`} ${this.allowServerSelection==="false"?"":(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-servers" data-action="navigate" data-content-id="servers" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-servers">API Servers</div>`})()} ${this.allowAuthentication==="false"||!this.resolvedSpec.securitySchemes?"":(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-auth" data-action="navigate" data-content-id="auth" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-auth">Authentication</div>`})()}<div id="link-operations-top" class="nav-bar-section operations" data-action="navigate" data-content-id="${this.renderStyle==="focused"?"":"operations-top"}" part="section-navbar-item section-navbar-operations-top"><div style="font-size:16px;display:flex;margin-left:10px">${this.renderStyle==="focused"?m`<div class="nav-bar-expand-all" data-action="expand-all" tabindex="0" title="Expand all">▸</div><div class="nav-bar-collapse-all" data-action="collapse-all" tabindex="0" title="Collapse all">▸</div>`:""}</div><div class="nav-bar-section-title">OPERATIONS</div></div>${(()=>{let a=s=>{let i=(s.paths||[]).filter(o=>Ll(o,this.searchVal,s.name));if(i.length===0)return"";let n=i[0].elementId;return m`<div class="nav-bar-tag-and-paths ${s.expanded?"expanded":"collapsed"}"><div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" id="link-${s.elementId}" data-action="expand-collapse-tag" data-first-path-id="${n}" tabindex="0" role="button" aria-expanded="${s.expanded?"true":"false"}"><div class="nav-bar-tag-title">${s.displayName||s.name}</div><div class="nav-bar-tag-icon" tabindex="0" data-action="expand-collapse-tag"></div></div>${this.infoDescriptionHeadingsInNavBar==="true"?m`<div class="tag-headers">${(()=>{let o=new Ye;return s.headers.map(l=>{let p=o.slug(l.text);return m`<div class="nav-bar-h${l.depth}" part="section-navbar-item section-navbar-h${l.depth}" id="link-${s.elementId}--${p}" data-action="navigate" data-content-id="${s.elementId}--${p}" tabindex="0">${l.text}</div>`})})()}</div>`:""}<div class="nav-bar-paths-under-tag">${i.map(o=>{let l=r();return m`<div class="nav-bar-path${l?" first-nav-item":""}" style="${o.deprecated?"filter:opacity(0.5);":""}" part="section-navbar-item section-navbar-path" data-action="navigate" data-content-id="${o.elementId}" data-first-nav-item="${l?"true":F}" id="link-${o.elementId}" tabindex="0"><span class="nav-bar-path-label">${o.isWebhook?m`<span class="nav-bar-webhook">WEBHOOK</span>`:""} ${this.usePathInNavBar==="true"?m`<span class="mono-font">${o.path}</span>`:o.summary||o.shortSummary} </span>${m`<span class="nav-method ${this.showMethodInNavBar} ${o.method}">${this.showMethodInNavBar==="as-colored-block"?o.method.substring(0,3).toUpperCase():o.method.toUpperCase()}</span>`}</div>`})}</div></div>`};if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let s=new Set;return this.resolvedSpec.tagGroups.forEach(i=>{(i.tags||[]).forEach(n=>{s.add(n.name.toLowerCase())})}),m`${this.resolvedSpec.tagGroups.filter(i=>lm(i,this.searchVal)).map(i=>{let n=i.tags.filter(o=>Ea(o,this.searchVal));return n.length===0?"":m`<div class="nav-bar-tag-group ${i.expanded?"expanded":"collapsed"}" id="link-${i.elementId}"><div class="nav-bar-tag-group-header" part="section-navbar-item section-navbar-tag-group" data-action="expand-collapse-tag-group" tabindex="0" role="button" aria-expanded="${i.expanded?"true":"false"}"><div class="nav-bar-tag-group-title">${i.displayName||i.name}</div><div class="nav-bar-tag-group-icon" tabindex="0" data-action="expand-collapse-tag-group"></div></div><div class="nav-bar-tags-under-group">${n.map(o=>a(o))}</div></div>`})}${(this.resolvedSpec.tags||[]).filter(i=>!s.has(i.name.toLowerCase())&&Ea(i,this.searchVal)).map(i=>a(i))}`}return(this.resolvedSpec.tags||[]).filter(s=>Ea(s,this.searchVal)).map(s=>a(s))})()} ${this.resolvedSpec.components&&this.showComponents==="true"?m`<div id="link-components" class="nav-bar-section components"><div class="nav-bar-section-title">COMPONENTS</div></div>${this.resolvedSpec.components.map(a=>a.subComponents.length?m`<div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" data-action="navigate" data-content-id="cmp--${a.name.toLowerCase()}" id="link-cmp--${a.name.toLowerCase()}">${a.name}</div>${a.subComponents.filter(s=>s.expanded!==!1).map(s=>m`<div class="nav-bar-path" data-action="navigate" data-content-id="cmp--${s.id}" id="link-cmp--${s.id}"><span style="pointer-events:none">${s.name}</span></div>`)}`:"")}`:""}</div></nav>`}function pm(e){let t=new O.Renderer,r=new Ye;return t.heading=({text:a,depth:s})=>`<h${s} class="observe-me" id="${e}--${r.slug(a)}">${a}</h${s}>`,Tr(t),t}function Da(e){return m`<div class="regular-font section-gap--focused-mode" part="section-operations-in-tag">${e}</div>`}function zl(){if(this.showInfo==="true")return Da(m`${si.call(this)}${Sa.call(this)}`);let e=this.resolvedSpec.tags[0],t=this.resolvedSpec.tags[0]?.paths[0];return Da(e&&t?ai.call(this,t,e.name||"",e.description||"",!0):"")}function um(e){return m`<h2 id="${e.elementId}" class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${e.displayName||e.name}</h2>${e.description?m`<div class="m-markdown regular-font">${z(M(O(e.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:pm(e.elementId)}:void 0)))}</div>`:""}`}function hm(){if(!this.focusedElementId&&this.resolvedSpec&&(this.focusedElementId=this.showInfo==="false"||this.showInfo===!1?this.resolvedSpec.tags?.[0]?.paths?.[0]?.elementId||"":"overview"),!this.focusedElementId||!this.resolvedSpec)return;let e=this.focusedElementId,t=null,r=null,a;if(e.startsWith("overview")&&this.showInfo==="true")a=m`${si.call(this)}${Sa.call(this)}`;else if(e==="auth"&&this.allowAuthentication==="true")a=pl.call(this,this.allowTry);else if(e==="servers"&&this.allowServerSelection==="true")a=Bl.call(this);else if(e==="operations-top")a=m`<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>`;else if(e.startsWith("cmp--")&&this.showComponents==="true")a=Fl.call(this);else if(e.startsWith("tag--")){let s=e.indexOf("--",4)>0?e.substring(0,e.indexOf("--",5)):e;r=this.resolvedSpec.tags.find(i=>i.elementId===s),a=r?Da.call(this,um.call(this,r)):zl.call(this)}else{for(let s of this.resolvedSpec.tags)if(r=s,t=s.paths.find(i=>`${i.elementId}`===e),t)break;if(t){let s=this.shadowRoot?.getElementById(`link-${e}`);br(s,"expand");let i=r?.paths?.[0]?.elementId===t.elementId;a=Da.call(this,ai.call(this,t,r.name||"",r.description||"",i))}else a=zl.call(this)}return a}function mm(e){if(e.expanded)e.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(e.expanded=!0,this.updateRoute==="true"){let t=`#${e.elementId}`;window.location.hash!==t&&this.replaceHistoryState(e.elementId)}this.requestUpdate()}function fm(e,t="expand-all"){let r=[...e.querySelectorAll(".section-tag-group")],a=[...e.querySelectorAll(".section-tag")];t==="expand-all"?(r.forEach(s=>{s.classList.replace("collapsed","expanded")}),a.forEach(s=>{s.classList.replace("collapsed","expanded")})):(r.forEach(s=>{s.classList.replace("expanded","collapsed")}),a.forEach(s=>{s.classList.replace("expanded","collapsed")}))}function Ml(e,t="expand-all"){fm.call(this,e.target.closest(".operations-root"),t)}function Ul(e,t=!1){return m`<summary @click="${r=>{mm.call(this,e,r)}}" part="section-endpoint-head-${e.expanded?"expanded":"collapsed"}" class="endpoint-head ${e.method} ${e.deprecated?"deprecated":""} ${t||e.expanded?"expanded":"collapsed"}"><div part="section-endpoint-head-method" class="method ${e.method} ${e.deprecated?"deprecated":""}">${e.method}</div><div part="section-endpoint-head-path" class="path ${e.deprecated?"deprecated":""}">${e.path} ${e.isWebhook?m`<span style="font-family:var(--font-sans);font-size:var(--font-size-small);color:var(--primary);margin-left:16px">Webhook</span>`:""}</div>${e.deprecated?m`<span style="font-size:var(--font-size-small);text-transform:uppercase;font-weight:700;color:var(--destructive);margin:2px 0 0 5px">deprecated</span>`:""} ${this.showSummaryWhenCollapsed?m`<div part="section-endpoint-head-description" class="descr">${e.summary||e.shortSummary}</div>`:""}</summary>`}function Hl(e){let t=new Set;for(let n in e.responses)for(let o in e.responses[n]?.content)t.add(o.trim());let r=[...t].join(", "),a=this.resolvedSpec.securitySchemes.filter(n=>n.finalKeyValue&&e.security?.some(o=>n.securitySchemeId in o))||[],s=this.resolvedSpec.securitySchemes.find(n=>n.securitySchemeId==="_rapidoc_api_key"&&n.value!=="-");s&&a.push(s);let i=e.xCodeSamples?gl(e.xCodeSamples):"";return m`<div part="section-endpoint-body-${e.expanded?"expanded":"collapsed"}" class="endpoint-body ${e.method} ${e.deprecated?"deprecated":""}"><div class="summary">${e.summary?m`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.summary}</h3>`:e.shortSummary===e.description?m`<h3 class="visually-hidden">${e.method.toUpperCase()} ${e.path}</h3>`:m`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.shortSummary}</h3>`} ${e.xBadges&&e.xBadges?.length>0?m`<div style="display:flex;flex-wrap:wrap;font-size:var(--font-size-small)">${e.xBadges.map(n=>n.color==="none"?"":m`<span part="endpoint-badge" style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${n.color}) 20%,transparent);color:var(--${n.color});border:1px solid var(--${n.color})">${n.label}</span>`)}</div>`:""} ${fl.call(this,e.security,e.elementId)} ${e.description?m`<div part="section-endpoint-body-description" class="m-markdown">${z(M(O(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?m`<div class="external-docs-box"><div class="m-markdown">${z(M(O(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?m`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""}<slot name="${e.elementId}"></slot>${i}</div><div class="req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${a}" .servers="${e.servers}" server-url="${e.servers?.length>0?e.servers[0].url:this.selectedServer?.computedUrl}" active-schema-tab="${this.defaultSchemaTab}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${r}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?yl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" part="section-response-panel" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" active-schema-tab="${this.defaultSchemaTab}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, btn-clear-resp:btn-clear-resp,
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-response></div></div>`}function gm(e=!1,t=!1){if(!this.resolvedSpec)return"";let r=n=>m`${e?m`<div class="section-tag-body">${n.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${z(M(O(n.description||"")))}</div>`:""} ${n.paths.filter(o=>!this.searchVal||Ir(this.searchVal,o,n.name)).map((o,l)=>m`<section id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":F}">${Ul.call(this,o,t)} ${t||o.expanded?Hl.call(this,o):""}</section>`)}</div>`:m`<div class="regular-font section-gap section-tag ${n.expanded?"expanded":"collapsed"}"><div class="section-tag-header" @click="${()=>{n.expanded=!n.expanded,this.requestUpdate()}}"><h2 id="${n.elementId}" class="rapidoc-heading sub-title tag" part="heading heading-2" style="color:var(--primary)">${n.displayName||n.name}</h2></div><div class="section-tag-body"><slot name="${n.elementId}"></slot>${n.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${z(M(O(n.description||"")))}</div>`:""} ${n.paths.filter(o=>!this.searchVal||Ir(this.searchVal,o,n.name)).map((o,l)=>m`<section part="section-endpoint" id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":F}">${Ul.call(this,o,t)} ${t||o.expanded?Hl.call(this,o):""}</section>`)}</div></div>`}`,a=this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0,s=new Set;a&&this.resolvedSpec.tagGroups.forEach(n=>{(n.tags||[]).forEach(o=>s.add(o.name.toLowerCase()))});let i=a?(this.resolvedSpec.tags||[]).filter(n=>!s.has(n.name.toLowerCase())):[];return m`${e?"":m`<div class="section-expand-collapse-container"><span @click="${n=>Ml(n,"expand-all")}" style="color:var(--primary);cursor:pointer">Expand all </span> | <span @click="${n=>Ml(n,"collapse-all")}" style="color:var(--primary);cursor:pointer">Collapse all </span> sections</div>`} ${a?m`${this.resolvedSpec.tagGroups.map(n=>m`<div class="regular-font section-gap section-tag-group ${n.expanded?"expanded":"collapsed"}" id="${n.elementId}"><div class="section-tag-group-header" @click="${()=>{n.expanded=!n.expanded,this.requestUpdate()}}"><h2 class="rapidoc-heading sub-title tag-group" part="heading heading-2" style="color:var(--foreground);font-size:var(--h4-font-size);font-weight:700;text-transform:uppercase;letter-spacing:.05em">${n.displayName||n.name}</h2><div class="section-tag-group-icon"></div></div><div class="section-tag-group-body">${n.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${z(M(O(n.description||"")))}</div>`:""} ${n.tags.map(o=>r(o))}</div></div>`)} ${i.map(n=>r(n))}`:this.resolvedSpec.tags.map(n=>r(n))}`}function ym(e){return m`<svg style="${e}" viewBox="1 0 511 512"><path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/><path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/><path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/><path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/><path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/><path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/></svg>`}function bm(){return m`<header class="row main-header regular-font" part="section-header"><div class="only-large-screen-flex" style="align-items:center"><slot name="logo" class="logo" part="section-logo">${ym("height:36px;width:36px;margin-left:5px")}</slot><div class="header-title" part="label-header-title">${this.headingText}</div></div><div class="main-header-controls">${this.allowSpecUrlLoad==="false"?"":m`<input id="spec-url" type="text" style="font-size:var(--font-size-small)" class="header-input mono-font" part="textbox textbox-spec-url" placeholder="Spec URL" value="${this.specUrl||""}" @change="${this.onSpecUrlChange}" spellcheck="false"><div class="header-action-icon" @click="${this.onSpecUrlChange}">↩</div>`} ${this.allowSpecFileLoad==="false"?"":m`<input id="spec-file" part="file-input" type="file" style="display:none" value="${this.specFile||""}" @change="${this.onSpecFileChange}" spellcheck="false"> <button class="btn btn-primary only-large-screen" style="margin-left:10px" part="btn btn-fill" @click="${this.onFileLoadClick}">LOCAL JSON FILE</button>`}<slot name="header"></slot>${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":m`<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px" spellcheck="false"><div class="header-action-icon" @click="${this.onSearchChange}">↩</div>`} ${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":m`<button class="btn btn-primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px" @click="${this.onShowAdvancedSearchClicked}">Search</button>`}</div></header>`}function vm(){return m`<dialog id="advanced-search-dialog" class="dialog-box"><header class="dialog-box-header"><span class="dialog-box-title">Search</span> <button type="button" @click="${e=>this.onAdvancedSearchClose(e)}">×</button></header><div class="dialog-box-content"><div class="advanced-search-options"><input id="input-advanced-search-dialog" style="width:100%;padding-right:20px" type="text" part="textbox textbox-search-dialog" placeholder="search text..." spellcheck="false" @keyup="${e=>this.onAdvancedSearch(e,400)}"><div class="search-options-row"><label class="search-option-label" for="search-api-path"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Path</label> <label class="search-option-label" for="search-api-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Description</label> <label class="search-option-label" for="search-api-params"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change="${e=>this.onAdvancedSearch(e,0)}"> API Parameters</label> <label class="search-option-label" for="search-api-request-body"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change="${e=>this.onAdvancedSearch(e,0)}"> Request Body Parameters</label> <label class="search-option-label" for="search-api-resp-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change="${e=>this.onAdvancedSearch(e,0)}"> Response Description</label></div></div>${this.advancedSearchMatches?.map(e=>m`<div class="mono-font small-font-size hover-bg search-match-row" style="${e.deprecated?"filter:opacity(0.5);":""}" data-content-id="${e.elementId}" tabindex="0" @click="${t=>{this.searchVal="",this.shadowRoot.getElementById("advanced-search-dialog").close(),this.requestUpdate(),this.scrollToEventTarget(t,!0)}}"><span class="upper bold-text method-fg ${e.method}">${e.method}</span> <span>${e.path}</span> <span class="regular-font gray-text">${e.summary}</span></div>`)}</div></dialog>`}function Kl(e=!1,t=!1){return this.resolvedSpec?(this.persistAuth==="true"&&sh.call(this),this.resolvedSpec.specLoadError?m`<div id="spec-not-found">${this.resolvedSpec.info.description}</div>`:this.resolvedSpec.isSpecLoading?m`<main class="main-content regular-font" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode"><div class="loader"></div></div></main>`:m`<slot name="fixed-header"></slot>${this.showHeader==="false"?"":bm.call(this)} ${this.allowAdvancedSearch==="false"?"":vm.call(this)}<div id="the-main-body" class="body ${this.cssClasses}" dir="${this.pageDirection}">${(this.renderStyle==="read"||this.renderStyle==="focused")&&this.showSideNav==="true"&&this.resolvedSpec?dm.call(this):""}<main class="main-content regular-font" tabindex="-1" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode">${this.loading===!0?m`<div class="loader"></div>`:m`${this.loadFailed===!0?m`<div style="text-align:center;margin:16px">Unable to load the Spec</div>`:m`<div class="operations-root" @click="${r=>{this.handleHref(r)}}">${this.renderStyle==="focused"?m`${this.showInfo==="false"?Sa.call(this):""}${hm.call(this)}`:m`${this.showInfo==="true"?si.call(this):""} ${Sa.call(this)} ${this.allowServerSelection==="true"?Bl.call(this):""} ${this.allowAuthentication==="true"?pl.call(this,this.allowTry):""}<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>${this.renderStyle==="read"?Bh.call(this):gm.call(this,e,t)} ${this.showComponents==="true"?Fl.call(this):""}`}</div>`}`}</div><slot name="footer"></slot></main></div>`):""}function xm(e,t,r={}){let a=typeof e=="string"?document.querySelector(e):e,s=typeof t=="string"?document.querySelector(t):t;if(!a||typeof window>"u")return()=>{};let i=r.activeClass||"active",n=r.updateHistory!==!1;function o(y){return y?a.querySelector(`#link-${CSS.escape(y)}`)||a.querySelector(`.nav-bar-path[data-content-id="${CSS.escape(y)}"]`)||a.querySelector(`.nav-bar-path[data-op-slug="${CSS.escape(y)}"]`)||a.querySelector(`#link-${CSS.escape(y.replace(/^[a-z0-9_-]+--/,""))}`)||(y==="overview"?a.querySelector("#link-overview, .nav-bar-info"):null):null}function l(y,u=!0){let g=o(y);if(!g||g.classList.contains(i))return;if(a.querySelectorAll("."+i).forEach(S=>S.classList.remove(i)),g.classList.add(i),ni(g),u&&n){let S=g.getAttribute("href");S&&window.history.replaceState(null,"",S)}let v=g.closest(".nav-scroll");if(v){let S=g.getBoundingClientRect(),A=v.getBoundingClientRect();if(S.top<A.top+20||S.bottom>A.bottom-40){let b=S.top-A.top+v.scrollTop-40;v.scrollTo({top:b,behavior:"smooth"})}}}let p=y=>{let u=y.target.closest("[data-action]")||y.target.closest(".nav-bar-path, .nav-bar-info");if(!u)return;let g=u.dataset?.action;if(g==="expand-collapse-tag")br(u,"toggle");else if(g==="expand-collapse-tag-group")Aa(u,"toggle");else if(g==="navigate"||u.classList.contains("nav-bar-path")||u.classList.contains("nav-bar-info")){let v=u.getAttribute("href")||u.getAttribute("data-tag-href"),S=v?v.indexOf("#"):-1,A=(S===-1?v:v.substring(S+1))||u.getAttribute("data-content-id")||u.getAttribute("data-op-slug")||u.id?.replace(/^link-/,"");A&&s&&typeof s.scrollToPath=="function"&&(y.preventDefault(),l(A,!1),s.scrollToPath(A),n&&v&&window.history.pushState(null,"",v))}};a.addEventListener("click",p);let d=a.querySelector(".portal-filter-input, .nav-bar-search-input"),c=null;d&&(c=y=>{let u=(y.target.value||"").toLowerCase().trim();a.querySelectorAll(".nav-bar-path, .portal-sidebar-op-item").forEach(g=>{g.style.display=g.textContent.toLowerCase().includes(u)?"flex":"none"}),a.querySelectorAll(".nav-bar-tag-and-paths").forEach(g=>{let v=g.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');g.style.display=v||!u?"":"none",u&&v&&br(g,"expand")}),a.querySelectorAll(".nav-bar-tag-group").forEach(g=>{let v=g.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');g.style.display=v||!u?"":"none",u&&v&&Aa(g,"expand")})},d.addEventListener("input",c));let f=y=>{let u=y.detail?.operationId||y.detail?.id||y.detail?.elementId;u&&l(u,!0)};s&&s.addEventListener("nav-active-change",f);let h=()=>{if(window.location.hash){let y=window.location.hash.replace(/^#/,"");y&&(l(y,!1),s&&typeof s.scrollToPath=="function"&&s.scrollToPath(y))}};return window.addEventListener("popstate",h),window.addEventListener("hashchange",h),s&&(s.addEventListener("spec-loaded",()=>setTimeout(h,80)),typeof s.updateComplete?.then=="function"&&s.updateComplete.then(()=>setTimeout(h,50))),setTimeout(h,150),()=>{a.removeEventListener("click",p),d&&c&&d.removeEventListener("input",c),s&&s.removeEventListener("nav-active-change",f),window.removeEventListener("popstate",h),window.removeEventListener("hashchange",h)}}var Wl=class{constructor(e){this.host=e,this.active=!1,this.resolved="",this.observer=null,this.media=null,this.onPageChange=()=>this.apply(),e.addController(this)}hostConnected(){this.host.colorScheme==="auto"?this.enable():this.active&&(this.watch(!0),this.apply())}hostDisconnected(){this.watch(!1)}hostUpdate(){let e=this.host.colorScheme;e==="auto"?this.enable():this.active&&e!==this.resolved&&(this.active=!1,this.watch(!1))}enable(){this.active=!0,this.watch(!0),this.apply()}apply(){if(!this.active||typeof window>"u")return;let e=wm(this.host);this.resolved=e,this.host.colorScheme!==e&&(this.host.colorScheme=e),this.host.getAttribute("color-scheme")!==e&&this.host.setAttribute("color-scheme",e)}watch(e){this.observer?.disconnect(),this.observer=null,this.media?.removeEventListener("change",this.onPageChange),this.media=null,e&&typeof window<"u"&&(this.observer=new MutationObserver(this.onPageChange),this.observer.observe(document.documentElement,{attributes:!0}),document.body&&this.observer.observe(document.body,{attributes:!0}),this.media=window.matchMedia("(prefers-color-scheme: light)"),this.media.addEventListener("change",this.onPageChange))}};function wm(e){let t=e.parentElement||e.getRootNode().host||document.documentElement,r=getComputedStyle(t).colorScheme||"",a=/\bdark\b/.test(r);return a===/\blight\b/.test(r)?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":a?"dark":"light"}var Vl={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},Jl=["pointerdown","keydown","wheel","touchstart"],C=class extends ve{constructor(){super(),this.headingText="",this.gotoPath="",this.updateRoute="true",this.specUrl="",this.sortTags="false",this.sortSchemas="false",this.generateMissingTags="false",this.sortEndpointsBy="path",this.layout="row",this.renderStyle="read",this.defaultSchemaTab="example",this.responseAreaHeight="400px",this.fillRequestFieldsWithExample="true",this.persistAuth="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="true",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.defaultApiServerUrl="",this.serverUrl="",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="example",this.mockServerDelay=0,this.mockServerLog="false",this.showHeader="true",this.showSideNav="true",this.showInfo="true",this.allowAuthentication="true",this.allowTry="true",this.showCurlBeforeTry="false",this.allowSpecUrlLoad="true",this.allowSpecFileLoad="true",this.allowSpecFileDownload="false",this.allowSearch="true",this.allowAdvancedSearch="true",this.allowServerSelection="true",this.allowSchemaDescriptionExpandToggle="true",this.mcp="true",this.mcpServerName="",this.showComponents="false",this.pageDirection="ltr",this.scrollBehavior="smooth",this.autoHeight="false",this.scrollContainer="",this.scrollOffset="",this.theme=Qe,this.primaryColor="",this.colorScheme="dark",this._autoColorScheme=new Wl(this),this.radius="sm",this.scale="default",this.cssFile="",this.cssClasses="",this.navItemSpacing="default",this.navItemOverflow="ellipsis",this.showMethodInNavBar="false",this.usePathInNavBar="false",this.infoDescriptionHeadingsInNavBar="false",this.fetchCredentials="",this.matchPaths="",this.matchType="includes",this.removeEndpointsWithBadgeLabelAs="",this.loading=!1,this.focusedElementId="",this.searchVal="",this.showSummaryWhenCollapsed=!0,this._intersectingElements=new Map,this.isIntersectionObserverActive=!1,this._userSetLayout=!1,this._isDefaultingLayout=!1,this._observerLockTimeout=null,this._observerLockCleanup=null,this._readerHasInteracted=!1,this._onFirstInteraction=null,this.initIntersectionObserver()}static get styles(){return[fn,Xe,Zt,Fr,cn,qr,dn,Xa,Rr,pn,un,Cd,Td,mt]}connectedCallback(){super.connectedCallback(),this.initIntersectionObserver(),this.shadowRoot&&this.shadowRoot.querySelector(".main-content")&&(this._hasDsd=!0);let e=this.parentElement;if(e&&e.tagName==="BODY"&&(e.offsetWidth===0&&e.style.width===""&&(e.style.width="100vw"),e.offsetHeight===0&&e.style.height===""&&(e.style.height="100vh"),e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0")),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.hasAttribute("layout")){let r=this.getAttribute("layout");"row, column,".includes(`${r},`)&&(this.layout=r,this._userSetLayout=!0)}if(this._userSetLayout)this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row",this.setAttribute("layout",this.layout));else{let r=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.theme=Qe),this.primaryColor&&ft(this.primaryColor)&&(this.theme=this.primaryColor);let t=gt(this.theme);if(this.theme=t.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.navItemSpacing&&"compact, default, relaxed,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),yt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="400px",this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navItemOverflow&&"ellipsis, wrap,".includes(`${this.navItemOverflow},`)||(this.navItemOverflow="ellipsis"),this.getAttribute("nav-item-overflow")||this.setAttribute("nav-item-overflow",this.navItemOverflow),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",this.cssFile||=null,this.cssClasses||="",this.mcp||="none",window.addEventListener("hashchange",()=>{this.scrollToPath(this.getElementIDFromURL())},!0),!this._readerHasInteracted&&!this._onFirstInteraction&&(this._onFirstInteraction=()=>{this._readerHasInteracted=!0,this.removeFirstInteractionListeners()},Jl.forEach(r=>window.addEventListener(r,this._onFirstInteraction,{capture:!0,passive:!0}))),!this.resolvedSpec){let r=this.querySelector('script[type="application/json"][slot="rapidoc-spec"]');if(r?.textContent)try{let a=JSON.parse(r.textContent);this.loadSpec(a)}catch{}else this.getAttribute("spec-url")&&this.loadSpec(this.getAttribute("spec-url"))}}disconnectedCallback(){this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),this.intersectionObserver&&this.intersectionObserver.disconnect(),this.removeFirstInteractionListeners(),this.mockServer==="true"&&ma(),super.disconnectedCallback()}removeFirstInteractionListeners(){this._onFirstInteraction&&=(Jl.forEach(e=>window.removeEventListener(e,this._onFirstInteraction,{capture:!0})),null)}getContentScrollBehavior(){return this._readerHasInteracted?this.scrollBehavior:"instant"}infoDescriptionHeadingRenderer(){let e=new O.Renderer,t=new Ye;return e.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="${t.slug(r)}">${r}</h${a}>`,Tr(e),e}willUpdate(e){if(super.willUpdate?.(e),this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),e.has("layout")&&!this._isDefaultingLayout&&(this._userSetLayout=!!(this.layout&&"row, column,".includes(`${this.layout},`))),e.has("renderStyle")&&!this._userSetLayout){let t=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this.layout!==t&&(this._isDefaultingLayout=!0,this.layout=t,this.setAttribute("layout",t),this._isDefaultingLayout=!1)}}_clearDsdIfNeeded(){this._hasDsd&&this.shadowRoot&&(this.shadowRoot.replaceChildren(),this.renderOptions&&delete this.renderOptions.renderBefore,this._hasDsd=!1)}render(){if(this._hasDsd&&!this.resolvedSpec)return se;this._clearDsdIfNeeded();let e=document.querySelector(`link[href*="${this.cssFile}"]`);return e&&this.shadowRoot.appendChild(e.cloneNode()),Kl.call(this)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),_r(this.shadowRoot),e.has("theme")){(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.setAttribute("color-scheme",this.colorScheme),this.theme=Qe,this.setAttribute("theme",Qe));let t=gt(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),yt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&ft(this.primaryColor)&&(this.theme=gt(this.primaryColor).theme,this.setAttribute("theme",this.theme),yt(this,this.theme)),e.has("colorScheme")&&(this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.getAttribute("color-scheme")!==this.colorScheme&&this.setAttribute("color-scheme",this.colorScheme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&ma()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&rl({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),e.has("scrollContainer")&&this.initIntersectionObserver()}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="scroll-offset"&&t!==r&&window.setTimeout(()=>this.initIntersectionObserver(),0),e==="layout"&&!this._isDefaultingLayout){if(r!==null&&"row, column,".includes(`${r},`))this._userSetLayout=!0,this.layout=r;else if(r===null){this._userSetLayout=!1;let a=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}}if(e==="render-style"&&(r==="read"?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect(),!this._userSetLayout)){let a=r==="read"||r==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}if(e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,s="",i="",n="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,i=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(i=r,s=this.getAttribute("api-key-name"),n=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(n=r,i=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Yt);o?(o.name=s,o.in=i,o.value=n,o.finalKeyValue=n):this.resolvedSpec.securitySchemes.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:i,value:n,finalKeyValue:n}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);let t=e.target.files[0],r=new FileReader;r.onload=()=>{try{let a=JSON.parse(r.result);this.loadSpec(a),this.shadowRoot.getElementById("spec-url").value=""}catch{}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){let t=e.target instanceof HTMLInputElement?e.target:this.shadowRoot.getElementById("nav-bar-search");this.searchVal=t?.value??"",this.resolvedSpec.tags.forEach(r=>r.paths.filter(a=>{this.searchVal&&Ir(this.searchVal,a,r.name)&&(r.expanded=!0)})),this.resolvedSpec.components.forEach(r=>r.subComponents.filter(a=>{a.expanded=!1,Rd(this.searchVal,a)&&(a.expanded=!0)})),this.requestUpdate()}onClearSearch(){let e=this.shadowRoot.getElementById("nav-bar-search");e.value="",this.searchVal="",this.resolvedSpec.components.forEach(t=>t.subComponents.filter(r=>{r.expanded=!0}))}onOpenNavBarToggle(){this.shadowRoot.getElementById("nav-bar").classList.toggle("floating-nav")}onShowAdvancedSearchClicked(){this.shadowRoot.getElementById("advanced-search-dialog").showModal()}onAdvancedSearchClose(){this.shadowRoot.getElementById("advanced-search-dialog").close()}async loadSpec(e){if(e){this.searchVal="";try{this._hasDsd||(this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0),this.loadFailed=!1;let t=await Po.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch{this.loading=!1,this._clearDsdIfNeeded(),this.loadFailed=!0,this.resolvedSpec=null}}}async afterSpecParsedAndValidated(e){for(this._clearDsdIfNeeded(),this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(a=>a.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);let t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t),this.mockServer==="true"&&ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),this.intersectionObserver.disconnect(),this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="read"&&(await jr(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;let r=this.getElementIDFromURL();if(r)this.renderStyle==="view"?this.expandAndGotoOperation(r,!0,!0):this.scrollToPath(r);else if(this.gotoPath)this.scrollToPath(this.gotoPath);else if(this.renderStyle==="focused"&&!this.gotoPath){let a=this.showInfo==="true"?"overview":this.resolvedSpec.tags[0]?.paths[0]?.elementId;a&&this.scrollToPath(a)}}getComponentBaseURL(){return window.location.href.split("#")[0]}getElementIDFromURL(){return window.location.hash?window.location.hash.substring(1):""}replaceHistoryState(e){let t=this.getComponentBaseURL();window.history.replaceState(null,null,e?`${t}#${e}`:t)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let r=!0,a=e.indexOf("#")===-1?e:e.substring(1);if(a.startsWith("overview")||a==="servers"||a==="auth")r=!1;else{for(let s=0;s<this.resolvedSpec.tags?.length;s++){let i=this.resolvedSpec.tags[s],n=i.paths?.find(o=>o.elementId===e);n&&(n.expanded&&i.expanded?r=!1:(n.expanded=!0,i.expanded=!0))}if(this.resolvedSpec.tagGroups)for(let s=0;s<this.resolvedSpec.tagGroups.length;s++){let i=this.resolvedSpec.tagGroups[s];i.tags?.some(n=>n.paths?.some(o=>o.elementId===e))&&!i.expanded&&(i.expanded=!0,r=!0)}}t&&(r&&this.requestUpdate(),window.setTimeout(()=>{let s=this.shadowRoot.querySelector(".first-nav-item"),i=s&&s.dataset.contentId===a,n=this.shadowRoot.getElementById(a);if(n){let o=this.shadowRoot.querySelector(".main-content"),l;if(this.autoHeight==="true")this.scrollAutoHeightTarget(n,a);else if(i)l=0,this.lockObserverDuringScroll(n,a,l),o?o.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):n.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(o){let p=o.getBoundingClientRect();l=n.getBoundingClientRect().top-p.top+o.scrollTop,this.lockObserverDuringScroll(n,a,l),o.scrollTo({top:l,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(n,a),n.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});this._activeElementId=a,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:a,elementId:a},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(a)}},r?150:0))}isValidTopId(e){return e.startsWith("overview")||e==="servers"||e==="auth"}isValidPathId(e){return e==="overview"&&this.showInfo||e==="servers"&&this.allowServerSelection||e==="auth"&&this.allowAuthentication?!0:e.startsWith("tag--")?this.resolvedSpec?.tags?.find(t=>t.elementId===e):this.resolvedSpec?.tags?.find(t=>t.paths.find(r=>r.elementId===e))}initIntersectionObserver(){this.intersectionObserver&&this.intersectionObserver.disconnect();let e=null;if(this.scrollContainer&&typeof document<"u")try{e=document.querySelector(this.scrollContainer);let r=!!(e&&(e.contains(this)||this.assignedSlot&&e.contains(this.assignedSlot)||e.shadowRoot&&e.shadowRoot.contains(this.assignedSlot)));e&&!r&&(e=null)}catch{}if(!e&&typeof window<"u"){let r=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;r&&r!==document.body&&r!==document.documentElement;){let a=window.getComputedStyle(r).overflowY;if(a==="auto"||a==="scroll"){e=r;break}r=r.parentElement||(r.getRootNode&&r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null)}}this._scrollRootContainer=e;let t={root:e,rootMargin:`-${this.getScrollOffset()}px 0px -50% 0px`,threshold:0};this.intersectionObserver=new IntersectionObserver(r=>{this.onIntersect(r)},t),this.isIntersectionObserverActive&&this.observeExpandedContent()}onIntersect(e){if(this.isIntersectionObserverActive===!1)return;this._intersectingElements||=new Map;for(let o of e)o.isIntersecting&&o.intersectionRatio>0?this._intersectingElements.set(o.target.id,o.target):this._intersectingElements.delete(o.target.id);if(this._intersectingElements.size===0)return;let t=Array.from(this._intersectingElements.values()).filter(o=>o.isConnected);if(t.length===0)return;let r=(this._scrollRootContainer?this._scrollRootContainer.getBoundingClientRect().top:0)+this.getScrollOffset(),a=[],s=[];for(let o of t){let l=o.getBoundingClientRect().top-r;l>-1?a.push({el:o,top:l}):s.push({el:o,top:l})}let i;a.length>0?(a.sort((o,l)=>o.top-l.top),i=a[0].el):(s.sort((o,l)=>l.top-o.top),i=s[0].el);let n=i.id;this._activeElementId!==n&&(this._activeElementId=n,this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this._intersectionRaf=requestAnimationFrame(()=>{let o=n;if(n.startsWith("tag--")&&this.resolvedSpec?.tags){let p=this.resolvedSpec.tags.find(d=>d.elementId===n);p?.paths?.[0]?.elementId&&(o=p.paths[0].elementId)}this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:n,elementId:n,operationId:o},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(n);let l=this.shadowRoot.getElementById(`link-${n}`);if(l){let p=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");p&&p!==l&&(p.classList.remove("active"),p.part.remove("section-navbar-active-item")),ni(l),l.classList.add("active"),l.part.add("section-navbar-active-item");let d=l.closest(".nav-scroll");if(d){let c=d.querySelector(".nav-bar-header")||d.querySelector(".nav-bar-search-container"),f=c?c.offsetHeight:0;if(l.offsetTop<=f+30){if(d.scrollTop>0){let h=this.scrollBehavior==="auto"?"auto":"smooth";d.scrollTo({top:0,behavior:h})}}else{let h=d.getBoundingClientRect(),y=l.getBoundingClientRect();if(y.top<h.top+f+15||y.bottom>h.bottom-40){let u=this.scrollBehavior==="auto"?"auto":"smooth",g=y.top-h.top+d.scrollTop-f-20;d.scrollTo({top:g,behavior:u})}}}}}))}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));if(t){let r=this.shadowRoot.querySelector(".main-content");if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(t,t.id);else if(r){let a=r.getBoundingClientRect(),s=t.getBoundingClientRect().top-a.top+r.scrollTop;r.scrollTo({top:s,behavior:this.scrollBehavior})}else t.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}}getScrollOffset(){if(!(this.autoHeight==="true"||this.hasAttribute("auto-height"))||typeof window>"u")return 0;let e=parseFloat(this.scrollOffset);if(Number.isFinite(e))return e;let t=this._scrollRootContainer||document.scrollingElement||document.documentElement,r=getComputedStyle(t).scrollPaddingTop,a=parseFloat(r);return Number.isFinite(a)?r.endsWith("%")?a/100*t.clientHeight:a:0}scrollAutoHeightTarget(e,t){let r=e.getBoundingClientRect().top-this.getScrollOffset(),a=this._scrollRootContainer;if(a){let s=r-a.getBoundingClientRect().top+a.scrollTop;this.lockObserverDuringScroll(e,t,s),a.scrollTo({top:s,behavior:this.getContentScrollBehavior()})}else{let s=r+window.scrollY;this.lockObserverDuringScroll(e,t,s),window.scrollTo({top:s,behavior:this.getContentScrollBehavior()})}}lockObserverDuringScroll(e,t="",r){this._intersectionRaf&&=(cancelAnimationFrame(this._intersectionRaf),null),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null);let a=e?.id||t;this.isIntersectionObserverActive=!1,this._intersectingElements&&(this._intersectingElements.clear(),e&&a&&this._intersectingElements.set(a,e)),a&&(this._activeElementId=a);let s=this.autoHeight==="true"||this.hasAttribute("auto-height")?this._scrollRootContainer||(typeof window<"u"?window:null):this.shadowRoot?.querySelector(".main-content")||(typeof window<"u"?window:null);if(!s||typeof window>"u"){this.isIntersectionObserverActive=!0;return}let i=!1,n=()=>{i||(i=!0,d&&(d(),d=null,this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),e&&a&&this._intersectingElements&&this._intersectingElements.set(a,e),this.isIntersectionObserverActive=!0)},o=null,l=()=>{clearTimeout(o),o=setTimeout(n,120)},p=()=>{n()},d=()=>{s.removeEventListener?.("scrollend",p),window.removeEventListener?.("scrollend",p),s.removeEventListener?.("scroll",l),window.removeEventListener?.("scroll",l),clearTimeout(o)};this._observerLockCleanup=d,"onscrollend"in window&&(s.addEventListener?.("scrollend",p,{once:!0,passive:!0}),window.addEventListener?.("scrollend",p,{once:!0,passive:!0})),s.addEventListener?.("scroll",l,{passive:!0}),window.addEventListener?.("scroll",l,{passive:!0});let c=s===window?window.scrollY:s.scrollTop||0,f=typeof r=="number"&&Math.abs(r-c)<3?60:this.getContentScrollBehavior()==="smooth"?1200:100;this._observerLockTimeout=setTimeout(n,f)}async scrollToEventTarget(e,t=!0){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target?.closest?.("[data-content-id]")||e.target;if(!r?.dataset?.contentId)return;if(this.renderStyle==="focused"){let s=this.shadowRoot.querySelector("api-request");typeof s?.beforeNavigationFocusedMode=="function"&&s.beforeNavigationFocusedMode()}let a=r.dataset.firstNavItem==="true";this.scrollToPath(r.dataset.contentId,!0,t,a)}getTargetElement(e){return!e||!this.shadowRoot?null:this.shadowRoot.getElementById(e)||this.shadowRoot.querySelector(`[data-op-slug="${CSS.escape(e)}"]`)||this.shadowRoot.querySelector(`[id$="--${CSS.escape(e)}"]`)||this.shadowRoot.getElementById(e.replace(/^[a-z0-9_-]+--/,""))}resolveOperationAlias(e){if(!e||this.getTargetElement(e))return e;let t=a=>a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),r=t(e);for(let a of this.resolvedSpec?.tags||[]){let s=a.paths?.find(i=>t(Io(i.method,i.path))===r);if(s)return s.elementId}return e}bindNavBar(e,t){return xm(e,this,t)}async scrollTo(e){return this.scrollToPath(e)}async scrollToPath(e,t=!0,r=!0,a=!1){if(e=this.resolveOperationAlias(e),this.renderStyle==="focused"&&(this.focusedElementId=e,await jr(0)),this.renderStyle==="view")this.expandAndGotoOperation(e,t,!0);else{let s=this.getTargetElement(e),i=!!s;if(s){let n=this.shadowRoot.querySelector(".first-nav-item"),o=a||n&&n.dataset.contentId===e,l=this.shadowRoot.querySelector(".main-content"),p;if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(s,e);else if(o)p=0,this.lockObserverDuringScroll(s,e,p),l?l.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):s.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(l){let d=l.getBoundingClientRect();p=s.getBoundingClientRect().top-d.top+l.scrollTop,this.lockObserverDuringScroll(s,e,p),l.scrollTo({top:p,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(s,e),s.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"})}if(i){if(this.renderStyle==="focused"){let o=this.shadowRoot.querySelector("api-request");typeof o?.afterNavigationFocusedMode=="function"&&o.afterNavigationFocusedMode();let l=this.shadowRoot.querySelector("api-response");typeof l?.resetSelection=="function"&&l.resetSelection()}this._activeElementId=s?.id||e,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:e,elementId:e},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(e);let n=this.shadowRoot.getElementById(`link-${e}`);if(n){if(ni(n),r){let l=this.shadowRoot.querySelector(".nav-scroll");if(l){let p=l.getBoundingClientRect(),d=n.getBoundingClientRect().top-p.top+l.scrollTop-l.clientHeight/2;l.scrollTo({top:d,behavior:this.scrollBehavior})}else n.scrollIntoView({behavior:this.scrollBehavior,block:"center"})}await jr(0);let o=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");o&&(o.classList.remove("active"),o.part.remove("active"),o.part.remove("section-navbar-active-item")),n.classList.add("active"),n.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,r){return lt.call(this,e,t,r)}setApiKey(e,t,r={}){return lt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return Js.call(this)}setApiServer(e){return ii.call(this,e)}get mcpTargets(){return Rl(this.mcp)}generateMcpServer(e,t={}){let r=this.resolvedSpec||this.openApiSpec;if(!r)return null;let a=this.mcpTargets[0]||"typescript";return nm(r,{target:e||a,serverName:this.mcpServerName,...t})}downloadMcpServer(e,t={}){let r=this.mcpTargets[0]||"typescript",a=this.generateMcpServer(e||r,t);if(!a||!a.serverCode)return;let s=a.target,i="server.ts",n="text/typescript";s==="python"?(i="server.py",n="text/x-python"):s==="go"?(i="main.go",n="text/x-go"):s==="csharp"||s==="c#"?(i="Program.cs",n="text/plain"):s==="rust"?(i="main.rs",n="text/x-rust"):s==="java"&&(i="RapiDocMcpServer.java",n="text/x-java-source");let o=new Blob([a.serverCode],{type:n}),l=document.createElement("a");l.href=URL.createObjectURL(o),l.download=i,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(l.href)}getMcpBudget(e={}){let t=this.resolvedSpec||this.openApiSpec;if(!t)return null;let r=Il(t,e);return ze(r.tools,r.resources,r.workflows)}onAdvancedSearch(e,t){let r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let a;a=r.type==="text"?r:r.closest(".advanced-search-options").querySelector("input[type=text]");let s=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map(i=>i.id);this.advancedSearchMatches=jd(a.value,this.resolvedSpec.tags,s)},t)}};x([k({type:String,attribute:"heading-text"})],C.prototype,"headingText",void 0),x([k({type:String,attribute:"goto-path"})],C.prototype,"gotoPath",void 0),x([k({type:String,attribute:"update-route"})],C.prototype,"updateRoute",void 0),x([k({type:String,attribute:"spec-url"})],C.prototype,"specUrl",void 0),x([k({type:String,attribute:"sort-tags"})],C.prototype,"sortTags",void 0),x([k({type:String,attribute:"sort-schemas"})],C.prototype,"sortSchemas",void 0),x([k({type:String,attribute:"generate-missing-tags"})],C.prototype,"generateMissingTags",void 0),x([k({type:String,attribute:"sort-endpoints-by"})],C.prototype,"sortEndpointsBy",void 0),x([k({type:String,attribute:!1})],C.prototype,"specFile",void 0),x([k({type:String,reflect:!0})],C.prototype,"layout",void 0),x([k({type:String,attribute:"render-style"})],C.prototype,"renderStyle",void 0),x([k({type:String,attribute:"default-schema-tab"})],C.prototype,"defaultSchemaTab",void 0),x([k({type:String,attribute:"response-area-height"})],C.prototype,"responseAreaHeight",void 0),x([k({type:String,attribute:"fill-request-fields-with-example"})],C.prototype,"fillRequestFieldsWithExample",void 0),x([k({type:String,attribute:"persist-auth"})],C.prototype,"persistAuth",void 0),x([k({type:String,attribute:"schema-style"})],C.prototype,"schemaStyle",void 0),x([k({type:Number,attribute:"schema-expand-level"})],C.prototype,"schemaExpandLevel",void 0),x([k({type:String,attribute:"schema-description-expanded"})],C.prototype,"schemaDescriptionExpanded",void 0),x([k({type:String,attribute:"schema-hide-read-only"})],C.prototype,"schemaHideReadOnly",void 0),x([k({type:String,attribute:"schema-hide-write-only"})],C.prototype,"schemaHideWriteOnly",void 0),x([k({type:String,attribute:"api-key-name"})],C.prototype,"apiKeyName",void 0),x([k({type:String,attribute:"api-key-location"})],C.prototype,"apiKeyLocation",void 0),x([k({type:String,attribute:"api-key-value"})],C.prototype,"apiKeyValue",void 0),x([k({type:String,attribute:"default-api-server"})],C.prototype,"defaultApiServerUrl",void 0),x([k({type:String,attribute:"server-url"})],C.prototype,"serverUrl",void 0),x([k({type:String,attribute:"oauth-receiver"})],C.prototype,"oauthReceiver",void 0),x([k({type:Object,attribute:"additional-authorize-params",converter:Vl})],C.prototype,"additionalAuthorizeParams",void 0),x([k({type:Object,attribute:"additional-token-params",converter:Vl})],C.prototype,"additionalTokenParams",void 0),x([k({type:String,attribute:"mock-server"})],C.prototype,"mockServer",void 0),x([k({type:String,attribute:"mock-server-status-code"})],C.prototype,"mockServerStatusCode",void 0),x([k({type:String,attribute:"mock-server-status-strategy"})],C.prototype,"mockServerStatusStrategy",void 0),x([k({type:Number,attribute:"mock-server-delay"})],C.prototype,"mockServerDelay",void 0),x([k({type:String,attribute:"mock-server-log"})],C.prototype,"mockServerLog",void 0),x([k({type:String,attribute:"show-header"})],C.prototype,"showHeader",void 0),x([k({type:String,attribute:"show-side-nav"})],C.prototype,"showSideNav",void 0),x([k({type:String,attribute:"show-info"})],C.prototype,"showInfo",void 0),x([k({type:String,attribute:"allow-authentication"})],C.prototype,"allowAuthentication",void 0),x([k({type:String,attribute:"allow-try"})],C.prototype,"allowTry",void 0),x([k({type:String,attribute:"show-curl-before-try"})],C.prototype,"showCurlBeforeTry",void 0),x([k({type:String,attribute:"allow-spec-url-load"})],C.prototype,"allowSpecUrlLoad",void 0),x([k({type:String,attribute:"allow-spec-file-load"})],C.prototype,"allowSpecFileLoad",void 0),x([k({type:String,attribute:"allow-spec-file-download"})],C.prototype,"allowSpecFileDownload",void 0),x([k({type:String,attribute:"allow-search"})],C.prototype,"allowSearch",void 0),x([k({type:String,attribute:"allow-advanced-search"})],C.prototype,"allowAdvancedSearch",void 0),x([k({type:String,attribute:"allow-server-selection"})],C.prototype,"allowServerSelection",void 0),x([k({type:String,attribute:"allow-schema-description-expand-toggle"})],C.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([k({type:String,attribute:"mcp"})],C.prototype,"mcp",void 0),x([k({type:String,attribute:"mcp-server-name"})],C.prototype,"mcpServerName",void 0),x([k({type:String,attribute:"show-components"})],C.prototype,"showComponents",void 0),x([k({type:String,attribute:"page-direction"})],C.prototype,"pageDirection",void 0),x([k({type:String,attribute:"scroll-behavior"})],C.prototype,"scrollBehavior",void 0),x([k({type:String,attribute:"auto-height"})],C.prototype,"autoHeight",void 0),x([k({type:String,attribute:"scroll-container"})],C.prototype,"scrollContainer",void 0),x([k({type:String,attribute:"scroll-offset"})],C.prototype,"scrollOffset",void 0),x([k({type:String,reflect:!0})],C.prototype,"theme",void 0),x([k({type:String,attribute:"primary-color"})],C.prototype,"primaryColor",void 0),x([k({type:String,attribute:"color-scheme",reflect:!0})],C.prototype,"colorScheme",void 0),x([k({type:String,reflect:!0})],C.prototype,"radius",void 0),x([k({type:String,reflect:!0})],C.prototype,"scale",void 0),x([k({type:String,attribute:"css-file"})],C.prototype,"cssFile",void 0),x([k({type:String,attribute:"css-classes"})],C.prototype,"cssClasses",void 0),x([k({type:String,attribute:"nav-item-spacing",reflect:!0})],C.prototype,"navItemSpacing",void 0),x([k({type:String,attribute:"nav-item-overflow",reflect:!0})],C.prototype,"navItemOverflow",void 0),x([k({type:String,attribute:"show-method-in-nav-bar"})],C.prototype,"showMethodInNavBar",void 0),x([k({type:String,attribute:"use-path-in-nav-bar"})],C.prototype,"usePathInNavBar",void 0),x([k({type:String,attribute:"info-description-headings-in-navbar"})],C.prototype,"infoDescriptionHeadingsInNavBar",void 0),x([k({type:String,attribute:"fetch-credentials"})],C.prototype,"fetchCredentials",void 0),x([k({type:String,attribute:"match-paths"})],C.prototype,"matchPaths",void 0),x([k({type:String,attribute:"match-type"})],C.prototype,"matchType",void 0),x([k({type:String,attribute:"remove-endpoints-with-badge-label-as"})],C.prototype,"removeEndpointsWithBadgeLabelAs",void 0),x([k({type:Boolean})],C.prototype,"loading",void 0),x([k({type:String})],C.prototype,"focusedElementId",void 0),x([k({type:Object})],C.prototype,"advancedSearchMatches",void 0),x([k({type:String})],C.prototype,"searchVal",void 0),C=x([Ce("rapi-doc")],C);var $m=C,Gl={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},N=class extends ve{constructor(){super(),this.specUrl="",this.sortEndpointsBy="path",this.layout="row",this.pathsExpanded="false",this.defaultSchemaTab="example",this.responseAreaHeight="300px",this.showSummaryWhenCollapsed="true",this.fillRequestFieldsWithExample="true",this.persistAuth="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.defaultApiServerUrl="",this.serverUrl="",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="example",this.mockServerDelay=0,this.mockServerLog="false",this.allowTry="true",this.showCurlBeforeTry="false",this.theme=Qe,this.primaryColor="",this.colorScheme="dark",this._autoColorScheme=new Wl(this),this.radius="sm",this.scale="default",this.fetchCredentials="",this.matchPaths="",this.matchType="includes",this.removeEndpointsWithBadgeLabelAs="",this.loading=!1,this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false",this.loadFailed=!1}static get styles(){return[fn,Xe,Zt,Fr,cn,qr,dn,Xa,Rr,pn,un,W`:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}@container (width>=768px){.only-large-screen{display:block}.only-large-screen-flex{display:flex}}`]}connectedCallback(){super.connectedCallback(),this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.primaryColor&&ft(this.primaryColor)&&(this.theme=this.primaryColor);let e=gt(this.theme);this.theme=e.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),yt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="300px",this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials="")}disconnectedCallback(){this.mockServer==="true"&&ma(),super.disconnectedCallback()}render(){return Kl.call(this,!0,this.pathsExpanded)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),_r(this.shadowRoot),e.has("theme")){let t=gt(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),yt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&ft(this.primaryColor)&&(this.theme=gt(this.primaryColor).theme,this.setAttribute("theme",this.theme),yt(this,this.theme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&ma()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&rl({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(r)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,s="",i="",n="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,i=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(i=r,s=this.getAttribute("api-key-name"),n=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(n=r,i=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Yt);o?(o.name=s,o.in=i,o.value=n,o.finalKeyValue=n):this.resolvedSpec.securitySchemes.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:i,value:n,finalKeyValue:n}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(e){if(e)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();let t=await Po.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch{this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null}}setHttpUserNameAndPassword(e,t,r){return lt.call(this,e,t,r)}setApiKey(e,t,r={}){return lt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return Js.call(this)}setApiServer(e){return ii.call(this,e)}async afterSpecParsedAndValidated(e){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(r=>r.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);let t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t),this.mockServer==="true"&&ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}};x([k({type:String,attribute:"spec-url"})],N.prototype,"specUrl",void 0),x([k({type:String,attribute:"sort-endpoints-by"})],N.prototype,"sortEndpointsBy",void 0),x([k({type:String})],N.prototype,"layout",void 0),x([k({type:String,attribute:"paths-expanded"})],N.prototype,"pathsExpanded",void 0),x([k({type:String,attribute:"default-schema-tab"})],N.prototype,"defaultSchemaTab",void 0),x([k({type:String,attribute:"response-area-height"})],N.prototype,"responseAreaHeight",void 0),x([k({type:String,attribute:"show-summary-when-collapsed"})],N.prototype,"showSummaryWhenCollapsed",void 0),x([k({type:String,attribute:"fill-request-fields-with-example"})],N.prototype,"fillRequestFieldsWithExample",void 0),x([k({type:String,attribute:"persist-auth"})],N.prototype,"persistAuth",void 0),x([k({type:String,attribute:"schema-style"})],N.prototype,"schemaStyle",void 0),x([k({type:Number,attribute:"schema-expand-level"})],N.prototype,"schemaExpandLevel",void 0),x([k({type:String,attribute:"schema-description-expanded"})],N.prototype,"schemaDescriptionExpanded",void 0),x([k({type:String,attribute:"api-key-name"})],N.prototype,"apiKeyName",void 0),x([k({type:String,attribute:"api-key-location"})],N.prototype,"apiKeyLocation",void 0),x([k({type:String,attribute:"api-key-value"})],N.prototype,"apiKeyValue",void 0),x([k({type:String,attribute:"default-api-server"})],N.prototype,"defaultApiServerUrl",void 0),x([k({type:String,attribute:"server-url"})],N.prototype,"serverUrl",void 0),x([k({type:String,attribute:"oauth-receiver"})],N.prototype,"oauthReceiver",void 0),x([k({type:Object,attribute:"additional-authorize-params",converter:Gl})],N.prototype,"additionalAuthorizeParams",void 0),x([k({type:Object,attribute:"additional-token-params",converter:Gl})],N.prototype,"additionalTokenParams",void 0),x([k({type:String,attribute:"mock-server"})],N.prototype,"mockServer",void 0),x([k({type:String,attribute:"mock-server-status-code"})],N.prototype,"mockServerStatusCode",void 0),x([k({type:String,attribute:"mock-server-status-strategy"})],N.prototype,"mockServerStatusStrategy",void 0),x([k({type:Number,attribute:"mock-server-delay"})],N.prototype,"mockServerDelay",void 0),x([k({type:String,attribute:"mock-server-log"})],N.prototype,"mockServerLog",void 0),x([k({type:String,attribute:"allow-try"})],N.prototype,"allowTry",void 0),x([k({type:String,attribute:"show-curl-before-try"})],N.prototype,"showCurlBeforeTry",void 0),x([k({type:String,reflect:!0})],N.prototype,"theme",void 0),x([k({type:String,attribute:"primary-color"})],N.prototype,"primaryColor",void 0),x([k({type:String,attribute:"color-scheme",reflect:!0})],N.prototype,"colorScheme",void 0),x([k({type:String,reflect:!0})],N.prototype,"radius",void 0),x([k({type:String,reflect:!0})],N.prototype,"scale",void 0),x([k({type:String,attribute:"fetch-credentials"})],N.prototype,"fetchCredentials",void 0),x([k({type:String,attribute:"match-paths"})],N.prototype,"matchPaths",void 0),x([k({type:String,attribute:"match-type"})],N.prototype,"matchType",void 0),x([k({type:String,attribute:"remove-endpoints-with-badge-label-as"})],N.prototype,"removeEndpointsWithBadgeLabelAs",void 0),x([k({type:Boolean})],N.prototype,"loading",void 0),N=x([Ce("rapi-doc-mini")],N);var km=N,oi=class extends HTMLElement{connectedCallback(){let e=ah(window.location);if(e&&(window.history.replaceState(null,"",window.location.pathname),window.opener&&window.opener.postMessage(e,window.location.origin),typeof BroadcastChannel=="function")){let t=new BroadcastChannel(sl);t.postMessage(e),t.close()}}};oi=x([Ce("oauth-receiver")],oi);var Sm=oi,Am={RapiDoc:$m};export{Sm as OAuthReceiver,km as RapiDocMini,Am as default};