UNPKG

rapidoc

Version:

RapiDoc - Open API spec viewer with built in console

258 lines • 537 kB
/*!
 * @license
 * rapidoc v11.0.1
 * (c) 2026 Mrinmoy Majumdar <mrin9@yahoo.com>
 * SPDX-License-Identifier: MIT
 */
var Gt=globalThis,Ya=Gt.ShadowRoot&&(Gt.ShadyCSS===void 0||Gt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qa=Symbol(),Es=new WeakMap,As=class{constructor(e,t,a){if(this._$cssResult$=!0,a!==Qa)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(Ya&&e===void 0){let a=t!==void 0&&t.length===1;a&&(e=Es.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),a&&Es.set(t,e))}return e}toString(){return this.cssText}},Wo=e=>new As(typeof e=="string"?e:e+"",void 0,Qa),B=(e,...t)=>new As(e.length===1?e[0]:t.reduce((a,r,s)=>a+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1],e[0]),e,Qa),Vo=(e,t)=>{if(Ya)e.adoptedStyleSheets=t.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet);else for(let a of t){let r=document.createElement("style"),s=Gt.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=a.cssText,e.appendChild(r)}},Ds=Ya?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let a="";for(let r of t.cssRules)a+=r.cssText;return Wo(a)})(e):e,{is:Ko,defineProperty:Zo,getOwnPropertyDescriptor:Jo,getOwnPropertyNames:Go,getOwnPropertySymbols:Xo,getPrototypeOf:Yo}=Object,Xt=globalThis,Cs=Xt.trustedTypes,Qo=Cs?Cs.emptyScript:"",el=Xt.reactiveElementPolyfillSupport,bt=(e,t)=>e,er={toAttribute(e,t){switch(t){case Boolean:e=e?Qo:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=e!==null;break;case Number:a=e===null?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch{a=null}}return a}},Ts=(e,t)=>!Ko(e,t),Fs={attribute:!0,type:String,converter:er,reflect:!1,useDefault:!1,hasChanged:Ts};Symbol.metadata??=Symbol("metadata"),Xt.litPropertyMetadata??=new WeakMap;var Ke=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=Fs){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 a=Symbol(),r=this.getPropertyDescriptor(e,a,t);r!==void 0&&Zo(this.prototype,e,r)}}static getPropertyDescriptor(e,t,a){let{get:r,set:s}=Jo(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:r,set(n){let i=r?.call(this);s?.call(this,n),this.requestUpdate(e,i,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Fs}static _$Ei(){if(this.hasOwnProperty(bt("elementProperties")))return;let e=Yo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(bt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bt("properties"))){let t=this.properties,a=[...Go(t),...Xo(t)];for(let r of a)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[a,r]of t)this.elementProperties.set(a,r)}this._$Eh=new Map;for(let[t,a]of this.elementProperties){let r=this._$Eu(t,a);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let a=new Set(e.flat(1/0).reverse());for(let r of a)t.unshift(Ds(r))}else e!==void 0&&t.push(Ds(e));return t}static _$Eu(e,t){let a=t.attribute;return a===!1?void 0:typeof a=="string"?a: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 a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vo(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,a){this._$AK(e,a)}_$ET(e,t){let a=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,a);if(r!==void 0&&a.reflect===!0){let s=(a.converter?.toAttribute===void 0?er:a.converter).toAttribute(t,a.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){let a=this.constructor,r=a._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let s=a.getPropertyOptions(r),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute===void 0?er:s.converter;this._$Em=r;let i=n.fromAttribute(t,s.type);this[r]=i??this._$Ej?.get(r)??i,this._$Em=null}}requestUpdate(e,t,a,r=!1,s){if(e!==void 0){let n=this.constructor;if(r===!1&&(s=this[e]),a??=n.getPropertyOptions(e),!((a.hasChanged??Ts)(s,t)||a.useDefault&&a.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,a))))return;this.C(e,t,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:a,reflect:r,wrapped:s},n){a&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||a||(t=void 0),this._$AL.set(e,t)),r===!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[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[r,s]of a){let{wrapped:n}=s,i=this[r];n!==!0||this._$AL.has(r)||i===void 0||this.C(r,void 0,s,i)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(t)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}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){}};Ke.elementStyles=[],Ke.shadowRootOptions={mode:"open"},Ke[bt("elementProperties")]=new Map,Ke[bt("finalized")]=new Map,el?.({ReactiveElement:Ke}),(Xt.reactiveElementVersions??=[]).push("2.1.2");var tr=globalThis,Os=e=>e,Yt=tr.trustedTypes,_s=Yt?Yt.createPolicy("lit-html",{createHTML:e=>e}):void 0,ar="$lit$",ge=`lit$${Math.random().toFixed(9).slice(2)}$`,rr="?"+ge,tl=`<${rr}>`,Te=document,vt=()=>Te.createComment(""),xt=e=>e===null||typeof e!="object"&&typeof e!="function",sr=Array.isArray,js=e=>sr(e)||typeof e?.[Symbol.iterator]=="function",nr=`[ 	
\f\r]`,wt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rs=/-->/g,Ns=/>/g,Fe=RegExp(`>|${nr}(?:([^\\s"'>=/]+)(${nr}*=${nr}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),qs=/'/g,Ls=/"/g,Bs=/^(?:script|style|textarea|title)$/i,p=(e=>(t,...a)=>({_$litType$:e,strings:t,values:a}))(1),Y=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),Is=new WeakMap,Oe=Te.createTreeWalker(Te,129);function zs(e,t){if(!sr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return _s===void 0?t:_s.createHTML(t)}var Ps=(e,t)=>{let a=e.length-1,r=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=wt;for(let o=0;o<a;o++){let l=e[o],c,d,u=-1,h=0;for(;h<l.length&&(i.lastIndex=h,d=i.exec(l),d!==null);)h=i.lastIndex,i===wt?d[1]==="!--"?i=Rs:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(i=Fe):(Bs.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=Fe):i=Ns:i===Fe?d[0]===">"?(i=s??wt,u=-1):d[1]===void 0?u=-2:(u=i.lastIndex-d[2].length,c=d[1],i=d[3]===void 0?Fe:d[3]==='"'?Ls:qs):i===Ls||i===qs?i=Fe:i===Rs||i===Ns?i=wt:(i=Fe,s=void 0);let m=i===Fe&&e[o+1].startsWith("/>")?" ":"";n+=i===wt?l+tl:u>=0?(r.push(c),l.slice(0,u)+ar+l.slice(u)+ge+m):l+ge+(u===-2?o:m)}return[zs(e,n+(e[a]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},ir=class Bo{constructor({strings:t,_$litType$:a},r){let s;this.parts=[];let n=0,i=0,o=t.length-1,l=this.parts,[c,d]=Ps(t,a);if(this.el=Bo.createElement(c,r),Oe.currentNode=this.el.content,a===2||a===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(s=Oe.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(let u of s.getAttributeNames())if(u.endsWith(ar)){let h=d[i++],m=s.getAttribute(u).split(ge),y=/([.?@])?(.*)/.exec(h);l.push({type:1,index:n,name:y[2],strings:m,ctor:y[1]==="."?Ms:y[1]==="?"?Hs:y[1]==="@"?Ws:kt}),s.removeAttribute(u)}else u.startsWith(ge)&&(l.push({type:6,index:n}),s.removeAttribute(u));if(Bs.test(s.tagName)){let u=s.textContent.split(ge),h=u.length-1;if(h>0){s.textContent=Yt?Yt.emptyScript:"";for(let m=0;m<h;m++)s.append(u[m],vt()),Oe.nextNode(),l.push({type:2,index:++n});s.append(u[h],vt())}}}else if(s.nodeType===8)if(s.data===rr)l.push({type:2,index:n});else{let u=-1;for(;(u=s.data.indexOf(ge,u+1))!==-1;)l.push({type:7,index:n}),u+=ge.length-1}n++}}static createElement(t,a){let r=Te.createElement("template");return r.innerHTML=t,r}};function _e(e,t,a=e,r){if(t===Y)return t;let s=r===void 0?a._$Cl:a._$Co?.[r],n=xt(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,a,r)),r===void 0?a._$Cl=s:(a._$Co??=[])[r]=s),s!==void 0&&(t=_e(e,s._$AS(e,t.values),s,r)),t}var Us=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:a}=this._$AD,r=(e?.creationScope??Te).importNode(t,!0);Oe.currentNode=r;let s=Oe.nextNode(),n=0,i=0,o=a[0];for(;o!==void 0;){if(n===o.index){let l;o.type===2?l=new Qt(s,s.nextSibling,this,e):o.type===1?l=new o.ctor(s,o.name,o.strings,this,e):o.type===6&&(l=new Vs(s,this,e)),this._$AV.push(l),o=a[++i]}n!==o?.index&&(s=Oe.nextNode(),n++)}return Oe.currentNode=Te,r}p(e){let t=0;for(let a of this._$AV)a!==void 0&&(a.strings===void 0?a._$AI(e[t]):(a._$AI(e,a,t),t+=a.strings.length-2)),t++}},Qt=class Io{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,a,r,s){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=a,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,a=this._$AM;return a!==void 0&&t?.nodeType===11&&(t=a.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,a=this){t=_e(this,t,a),xt(t)?t===I||t==null||t===""?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==Y&&this._(t):t._$litType$===void 0?t.nodeType===void 0?js(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!==I&&xt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Te.createTextNode(t)),this._$AH=t}$(t){let{values:a,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=ir.createElement(zs(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(a);else{let n=new Us(s,this),i=n.u(this.options);n.p(a),this.T(i),this._$AH=n}}_$AC(t){let a=Is.get(t.strings);return a===void 0&&Is.set(t.strings,a=new ir(t)),a}k(t){sr(this._$AH)||(this._$AH=[],this._$AR());let a=this._$AH,r,s=0;for(let n of t)s===a.length?a.push(r=new Io(this.O(vt()),this.O(vt()),this,this.options)):r=a[s],r._$AI(n),s++;s<a.length&&(this._$AR(r&&r._$AB.nextSibling,s),a.length=s)}_$AR(t=this._$AA.nextSibling,a){for(this._$AP?.(!1,!0,a);t!==this._$AB;){let r=Os(t).nextSibling;Os(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},kt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,a,r,s){this.type=1,this._$AH=I,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=I}_$AI(e,t=this,a,r){let s=this.strings,n=!1;if(s===void 0)e=_e(this,e,t,0),n=!xt(e)||e!==this._$AH&&e!==Y,n&&(this._$AH=e);else{let i=e,o,l;for(e=s[0],o=0;o<s.length-1;o++)l=_e(this,i[a+o],t,o),l===Y&&(l=this._$AH[o]),n||=!xt(l)||l!==this._$AH[o],l===I?e=I:e!==I&&(e+=(l??"")+s[o+1]),this._$AH[o]=l}n&&!r&&this.j(e)}j(e){e===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ms=class extends kt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===I?void 0:e}},Hs=class extends kt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==I)}},Ws=class extends kt{constructor(e,t,a,r,s){super(e,t,a,r,s),this.type=5}_$AI(e,t=this){if((e=_e(this,e,t,0)??I)===Y)return;let a=this._$AH,r=e===I&&a!==I||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,s=e!==I&&(a===I||r);r&&this.element.removeEventListener(this.name,this,a),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)}},Vs=class{constructor(e,t,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){_e(this,e)}},al={M:ar,P:ge,A:rr,C:1,L:Ps,R:Us,D:js,V:_e,I:Qt,H:kt,N:Hs,U:Ws,B:Ms,F:Vs},rl=tr.litHtmlPolyfillSupport;rl?.(ir,Qt),(tr.litHtmlVersions??=[]).push("3.3.3");var sl=(e,t,a)=>{let r=a?.renderBefore??t,s=r._$litPart$;if(s===void 0){let n=a?.renderBefore??null;r._$litPart$=s=new Qt(t.insertBefore(vt(),n),n,void 0,a??{})}return s._$AI(e),s},or=globalThis,se=class extends Ke{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=sl(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}};se._$litElement$=!0,se.finalized=!0,or.litElementHydrateSupport?.({LitElement:se});var nl=or.litElementPolyfillSupport;nl?.({LitElement:se}),(or.litElementVersions??=[]).push("4.2.2");function lr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var je=lr();function Ks(e){je=e}var Re={exec:()=>null};function Ze(e){let t=[];return a=>{let r=Math.max(0,Math.min(3,a-1)),s=t[r];return s||(s=e(r),t[r]=s),s}}function T(e,t=""){let a=typeof e=="string"?e:e.source,r={replace:(s,n)=>{let i=typeof n=="string"?n:n.source;return i=i.replace(K.caret,"$1"),a=a.replace(s,i),r},getRegex:()=>new RegExp(a,t)};return r}var il=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),K={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,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}));/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:Ze(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`)),hrRegex:Ze(e=>RegExp(`^ {0,${e}}((?:-[ 	]*){3,}|(?:_[ 	]*){3,}|(?:\\*[ 	]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ze(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ze(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ze(e=>RegExp(`^ {0,${e}}(?:</?(?:${St})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ze(e=>RegExp(`^ {0,${e}}>`))},ol=/^(?:[ \t]*(?:\n|$))+/,ll=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$t=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,cr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Zs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Js=T(Zs).replace(/bull/g,cr).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(),pl=T(Zs).replace(/bull/g,cr).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(),dr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ul=/^[^\n]+/,pr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hl=T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ml=T(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,cr).getRegex(),St="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",ur=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fl=T("^ {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)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",ur).replace("tag",St).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gs=e=>T(dr).replace("hr",$t).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex(),yl=Gs(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),gl=Gs(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),hr={blockquote:T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gl).getRegex(),code:ll,def:hl,fences:cl,heading:dl,hr:$t,html:fl,lheading:Js,list:ml,newline:ol,paragraph:yl,table:Re,text:ul},Xs=T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$t).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex(),bl={...hr,lheading:pl,table:Xs,paragraph:T(dr).replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Xs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex()},vl={...hr,html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ur).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:Re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:T(dr).replace("hr",$t).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Js).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ys=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,kl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,be=/[\p{P}\p{S}]/u,Je=/[\s\p{P}\p{S}]/u,Et=/[^\s\p{P}\p{S}]/u,$l=T(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Je).getRegex(),Sl=/[\p{Pi}\p{Ps}"']/u,Qs=/(?!~)[\p{P}\p{S}]/u,El=/(?!~)[\s\p{P}\p{S}]/u,Al=/(?:[^\s\p{P}\p{S}]|~)/u,Dl=T(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",il?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),en=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Cl=T(en,"u").replace(/punct/g,be).getRegex(),Tl=T(en,"u").replace(/punct/g,Qs).getRegex(),Fl=T(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,Sl).replace(/punct/g,be).getRegex(),tn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ol=T(tn,"gu").replace(/notPunctSpace/g,Et).replace(/punctSpace/g,Je).replace(/punct/g,be).getRegex(),_l=T(tn,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,El).replace(/punct/g,Qs).getRegex(),jl=T("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Et).replace(/punctSpace/g,Je).replace(/punct/g,be).getRegex(),Rl=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Et).replace(/punctSpace/g,Je).replace(/punct/g,be).getRegex(),Nl=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Et).replace(/punctSpace/g,Je).replace(/punct/g,be).getRegex(),ql=T(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,be).getRegex(),Ll=T("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Et).replace(/punctSpace/g,Je).replace(/punct/g,be).getRegex(),Bl=T(/\\(punct)/,"gu").replace(/punct/g,be).getRegex(),Il=T(/^<(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(),zl=T(ur).replace("(?:-->|$)","-->").getRegex(),Pl=T("^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",zl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),an=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,ea=T(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",an).getRegex(),Ul=T(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",ea).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ml=T(/^!?\[(label)\]\[(ref)\]/).replace("label",ea).replace("ref",pr).getRegex(),Hl=T(/^!?\[(ref)\](?:\[\])?/).replace("ref",pr).getRegex(),rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Wl=T(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",an).getRegex(),Vl=T("reflink|nolink(?!\\()","g").replace("reflink",T(/^!?\[(label)\]\[(ref)\]/).replace("label",Wl).replace("ref",rn).getRegex()).replace("nolink",T(/^!?\[(ref)\](?:\[\])?/).replace("ref",rn).getRegex()).getRegex(),sn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Kl=T(/(?: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(),mr={_backpedal:Re,anyPunctuation:Bl,autolink:Il,blockSkip:Dl,br:Ys,code:wl,del:Re,delLDelim:Re,delRDelim:Re,emStrongLDelim:Cl,emStrongRDelimAst:Ol,emStrongRDelimUnd:Rl,escape:xl,link:Ul,nolink:Hl,punctuation:$l,reflink:Ml,reflinkSearch:Vl,tag:Pl,text:kl,url:Re},Zl={...mr,emStrongLDelim:Fl,emStrongRDelimAst:jl,emStrongRDelimUnd:Nl,link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",ea).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ea).getRegex()},fr={...mr,emStrongRDelimAst:_l,emStrongLDelim:Tl,delLDelim:ql,delRDelim:Ll,url:T(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Kl).replace("protocol",sn).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:T(/^(?:[^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",sn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Jl={...fr,br:T(Ys).replace("{2,}","*").getRegex(),text:T(fr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ta={normal:hr,gfm:bl,pedantic:vl},At={normal:mr,gfm:fr,breaks:Jl,pedantic:Zl},Gl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nn=e=>Gl[e];function ee(e,t){if(t){if(K.escapeTest.test(e))return e.replace(K.escapeReplace,nn)}else if(K.escapeTestNoEncode.test(e))return e.replace(K.escapeReplaceNoEncode,nn);return e}function Xl(e){return e.replace(K.numericCharacterReference,(t,a,r)=>{let s=a===void 0?Number.parseInt(r,16):Number.parseInt(a,10);return s===0||s>1114111||s>=55296&&s<=57343?"\uFFFD":String.fromCodePoint(s)})}function on(e){try{e=encodeURI(e).replace(K.percentDecode,"%")}catch{return null}return e}function ln(e,t){let a=e.replace(K.findPipe,(s,n,i)=>{let o=!1,l=n;for(;--l>=0&&i[l]==="\\";)o=!o;return o?"|":" |"}).split(K.splitPipe),r=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;r<a.length;r++)a[r]=a[r].trim().replace(K.slashPipe,"|");return a}function Se(e,t,a){let r=e.length;if(r===0)return"";let s=0;for(;s<r;){let n=e.charAt(r-s-1);if(n===t&&!a)s++;else if(n!==t&&a)s++;else break}return e.slice(0,r-s)}function cn(e){let t=e.split(`
`),a=t.length-1;for(;a>=0&&K.blankLine.test(t[a]);)a--;return t.length-a<=2?e:t.slice(0,a+1).join(`
`)}function aa(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function dn(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let a=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])a++;else if(e[r]===t[1]&&(a--,a<0))return r;return a>0?-2:-1}function pn(e,t=0){let a=t,r="";for(let s of e)if(s==="	"){let n=4-a%4;r+=" ".repeat(n),a+=n}else r+=s,a++;return r}function un(e,t,a,r,s){let n=t.href,i=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!";r.state.inLink=!0;let c=r.state.linkEmitted,d=r.state.inRawBlock;r.state.linkEmitted=!1;let u=r.inlineTokens(o),h=r.state.linkEmitted;if(r.state.linkEmitted=c,r.state.inLink=!1,!l){if(h){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:l?"image":"link",raw:a,href:n,title:i,text:o,tokens:u}}function Yl(e,t,a){let r=e.match(a.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
`).map(n=>{let i=n.match(a.other.beginningSpace);if(i===null)return n;let[o]=i;return n.slice(Math.min(o.length,s.length))}).join(`
`)}function hn(e,t,a,r){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++;continue}if(t[s]==="`"){let o=r.inline.code.exec(t.slice(s));if(o){s+=o[0].length-1;continue}}if(t[s]!=="<")continue;let n=e.slice(a+s),i=r.inline.tag.exec(n)||r.inline.autolink.exec(n);if(i){if(i[0].length>t.length-s)return!0;s+=i[0].length-1}}return!1}var ra=class{options;rules;lexer;constructor(e){this.options=e||je}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 a=this.options.pedantic?t[0]:cn(t[0]);return{type:"code",raw:a,codeBlockStyle:"indented",text:a.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let a=t[0],r=Yl(a,t[3]||"",this.rules);return{type:"code",raw:a,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let a=t[2].trim();if(this.rules.other.endingHash.test(a)){let r=Se(a,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(a=r.trim())}return{type:"heading",raw:Se(t[0],`
`),depth:t[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Se(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let a=Se(t[0],`
`).split(`
`),r="",s="",n=[];for(;a.length>0;){let i=!1,o=[],l=0;for(;l<a.length;l++)if(this.rules.other.blockquoteStart.test(a[l]))o.push(a[l]),i=!0;else if(!i)o.push(a[l]);else break;a=a.slice(l);let c=o.join(`
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${c}`:c,s=s?`${s}
${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=u,a.length===0)break;let h=n.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let m=h,y=a.join(`
`),f=m.raw+`
`+y.replace(this.rules.other.blockquoteSetextReplace2,""),b=this.blockquote(f);n[n.length-1]=b;let x=f.substring(b.raw.length).replace(/^\n/,""),v=x?x.split(`
`).length:0,k=v?a.slice(0,-v):a;k.length>0&&(r=`${r}
${k.join(`
`)}`),s=s.substring(0,s.length-m.text.length)+b.text;break}if(h?.type==="list"){let m=h,y=m.raw+`
`+a.join(`
`),f=this.list(y);n[n.length-1]=f,r=r.substring(0,r.length-h.raw.length)+f.raw,s=s.substring(0,s.length-m.raw.length)+f.raw,a=y.substring(n.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:n,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let a=t[1].trim(),r=a.length>1,s={type:"list",raw:"",ordered:r,start:r?+a.slice(0,-1):"",loose:!1,items:[]};a=r?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=r?a:"[*+-]");let n=this.rules.other.listItemRegex(a),i=!1;for(;e;){let l=!1,c="",d="";if(!(t=n.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(`
`,1)[0],h=t[1].length,m=this.options.pedantic?pn(u,h):u.replace(this.rules.other.leadingSpaceTab,x=>pn(x,h)),y=e.split(`
`,1)[0],f=!m.trim(),b=0;if(this.options.pedantic?(b=2,d=m.trimStart()):f?b=h+1:(b=m.search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=m.slice(b),b+=h),f&&this.rules.other.blankLine.test(y)&&(c+=y+`
`,e=e.substring(y.length+1),l=!0),!l){let x=this.rules.other.nextBulletRegex(b),v=this.rules.other.hrRegex(b),k=this.rules.other.fencesBeginRegex(b),g=this.rules.other.headingBeginRegex(b),w=this.rules.other.htmlBeginRegex(b),$=this.rules.other.blockquoteBeginRegex(b);for(;e;){let A=e.split(`
`,1)[0],S;if(y=A,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting,"  "),S=y):S=y.replace(this.rules.other.leadingSpaceTab,_=>_.replace(this.rules.other.tabCharGlobal,"    ")),k.test(y)||g.test(y)||w.test(y)||$.test(y)||x.test(y)||v.test(y))break;if(S.search(this.rules.other.nonSpaceChar)>=b||!y.trim())d+=`
`+S.slice(b);else{if(f||m.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||k.test(m)||g.test(m)||v.test(m))break;d+=`
`+y}f=!y.trim(),c+=A+`
`,e=e.substring(A.length+1),m=S.slice(b)}}s.loose||(i?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),s.raw+=c}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l of s.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!s.loose){let c=l.tokens.filter(d=>d.type==="space");s.loose=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw))}for(let l of s.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.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 u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let u={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=u.checked,s.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=u.raw+l.tokens[0].raw,l.tokens[0].text=u.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(u)):l.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):l.tokens.unshift(u)}}else l.task&&=!1}if(s.loose)for(let l of s.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let a=cn(t[0]);return{type:"html",block:!0,raw:a,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:a}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&dn(t[2],"()")!==-1)return;let a=aa(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=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:a,raw:Se(t[0],`
`),href:r,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let a=ln(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],n={type:"table",raw:Se(t[0],`
`),header:[],align:[],rows:[]};if(a.length===r.length){for(let i of r)this.rules.other.tableAlignRight.test(i)?n.align.push("right"):this.rules.other.tableAlignCenter.test(i)?n.align.push("center"):this.rules.other.tableAlignLeft.test(i)?n.align.push("left"):n.align.push(null);for(let i=0;i<a.length;i++)n.header.push({text:a[i],tokens:this.lexer.inline(a[i]),header:!0,align:n.align[i]});for(let i of s)n.rows.push(ln(i,n.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:n.align[l]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let a=t[1].trim();return{type:"heading",raw:Se(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let a=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:a,tokens:this.lexer.inline(a)}}}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 a=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&hn(e,t[1],a,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Se(r.slice(0,-1),"\\");if((r.length-i.length)%2==0)return}else{let i=dn(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=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(r)?s.slice(1):s.slice(1,-1)),un(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let a;if((a=this.rules.inline.reflink.exec(e))||(a=this.rules.inline.nolink.exec(e))){let r=a[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&hn(e,a[1],r,this.rules))return;let s=t[aa((a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!s){let n=a[0].charAt(0);return{type:"text",raw:n,text:n}}return un(a,s,a[0],this.lexer,this.rules)}}emStrong(e,t,a=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!a||this.rules.inline.punctuation.exec(a))){let s=[...r[0]].length-1,n,i,o=s,l=0,c=r[0][0],d=a===c,u=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);(r=u.exec(t))!==null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){o+=i;continue}if(r[5]||r[6]){if(s%3&&!((s+i)%3)){l+=i;continue}if(d)break}if(o-=i,o>0)continue;i=Math.min(i,i+o+l);let h=[...r[0]][0].length,m=e.slice(0,s+r.index+h+i);if(Math.min(s,i)%2){let f=m.slice(1,-1);return{type:"em",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}let y=m.slice(2,-2);return{type:"strong",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let a=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(a),s=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return r&&s&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:t[0],text:a}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,a=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!a||this.rules.inline.punctuation.exec(a))){let s=[...r[0]].length-1,n,i,o=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+s);(r=l.exec(t))!==null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(i=[...n].length,i!==s))continue;if(r[3]||r[4]){o+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o);let c=[...r[0]][0].length,d=e.slice(0,s+r.index+c+i),u=d.slice(s,-s);return{type:"del",raw:d,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let a,r;return t[2]==="@"?(a=t[1],r="mailto:"+a):(a=t[1],r=a),{type:"link",raw:t[0],text:a,href:r,autolink:!0,tokens:[{type:"text",raw:a,text:a}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let a,r;if(t[2]==="@")a=t[0],r="mailto:"+a;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);a=t[0],r=t[1]==="www."?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:a,href:r,autolink:!0,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let a=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:a?t[0]:Xl(t[0]),escaped:a}}}},ue=class $s{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||je,this.options.tokenizer=this.options.tokenizer||new ra,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 a={other:K,block:ta.normal,inline:At.normal};this.options.pedantic?(a.block=ta.pedantic,a.inline=At.pedantic):this.options.gfm&&(a.block=ta.gfm,a.inline=this.options.breaks?At.breaks:At.gfm),this.tokenizer.rules=a}static get rules(){return{block:ta,inline:At}}static lex(t,a){return new $s(a).lex(t)}static lexInline(t,a){return new $s(a).inlineTokens(t)}lex(t){t=t.replace(K.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let a=0;a<this.inlineQueue.length;a++){let r=this.inlineQueue[a];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,a=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(K.tabCharGlobal,"    ").replace(K.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,a))?(t=t.substring(n.raw.length),a.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=a.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
`:a.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=a.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+n.raw,o.text+=`
`+n.text,this.inlineQueue.at(-1).src=o.text):a.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=a.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+n.raw,o.text+=`
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},a.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),a.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(i=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let o=a.at(-1);r&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+n.raw,o.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):a.push(n),r=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=a.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+n.raw,o.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):a.push(n);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}linkInText(t){if(!t.includes("["))return!1;let a=this.tokenizer.rules.inline.link;for(let r of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(a.test(r[0])&&t.charAt(r.index-1)!=="!")return!0;for(let r of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=r[0],n=s.lastIndexOf("[");if(s.charAt(0)!=="!"&&Object.hasOwn(this.tokens.links,aa(s.slice(n+1,-1)))&&!(n>1&&this.linkInText(s.slice(1,n-1))))return!0}return!1}inlineTokens(t,a=[]){this.tokenizer.lexer=this;let r=this.state.linkParenPossible;this.state.linkParenPossible=r&&t.includes(")");try{return this.#e(t,a)}finally{this.state.linkParenPossible=r}}#e(t,a){let r=t;if(this.tokens.links&&t.includes("[")){let o=this.tokenizer.rules.inline.reflinkSearch,l=c=>{let d=c.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,aa(c.slice(d+1,-1))))return c;if(d>1&&c.charAt(0)!=="!"){let u=c.slice(1,d-1);if(this.linkInText(u))return"["+u.replace(o,l)+"]["+"a".repeat(c.length-d-2)+"]"}return"["+"a".repeat(c.length-2)+"]"};r=r.replace(o,l)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,o=>"+".repeat(o.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(o,l,c)=>{let d=c?c.length:0;return o.slice(0,d)+"["+"a".repeat(o.length-d-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,n="",i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(n=""),s=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},t,a))?(t=t.substring(o.raw.length),a.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let c=a.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o);continue}if(o=this.tokenizer.emStrong(t,r,n)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.del(t,r,n)){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),a.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),a.push(o);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),u;this.options.extensions.startInline.forEach(h=>{u=h.call({lexer:this},d),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(n=o.raw.slice(-1)),s=!0;let c=a.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return a}infiniteLoopError(t){let a="Infinite loop on byte: "+t;if(!this.options.silent)throw Error(a)}},sa=class{options;parser;constructor(e){this.options=e||je}space(e){return""}code({text:e,lang:t,escaped:a}){let r=(t||"").match(K.notSpaceStart)?.[0],s=e?e.replace(K.endingNewline,"")+`
`:"";return r?'<pre><code class="language-'+ee(r)+'">'+(a?s:ee(s,!0))+`</code></pre>
`:"<pre><code>"+(a?s:ee(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,a=e.start,r="";for(let i=0;i<e.items.length;i++){let o=e.items[i];r+=this.listitem(o)}let s=t?"ol":"ul",n=t&&a!==1?' start="'+a+'"':"";return"<"+s+n+`>
`+r+"</"+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="",a="";for(let s=0;s<e.header.length;s++)a+=this.tablecell(e.header[s]);t+=this.tablerow({text:a});let r="";for(let s=0;s<e.rows.length;s++){let n=e.rows[s];a="";for(let i=0;i<n.length;i++)a+=this.tablecell(n[i]);r+=this.tablerow({text:a})}return r&&=`<tbody>${r}</tbody>`,`<table>
<thead>
`+t+`</thead>
`+r+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),a=e.header?"th":"td";return(e.align?`<${a} align="${e.align}">`:`<${a}>`)+t+`</${a}>
`}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>${ee(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:a,tokens:r,autolink:s}){let n=s?ee(a,!0):this.parser.parseInline(r),i=on(e);if(i===null)return n;e=ee(i,s);let o='<a href="'+e+'"';return t&&(o+=' title="'+ee(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:a,tokens:r}){r&&(a=this.parser.parseInline(r,this.parser.textRenderer));let s=on(e);if(s===null)return ee(a);e=s;let n=`<img src="${ee(e)}" alt="${ee(a)}"`;return t&&(n+=` title="${ee(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ee(e.text)}},yr=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},he=class Ss{options;renderer;textRenderer;constructor(t){this.options=t||je,this.options.renderer=this.options.renderer||new sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yr}static parse(t,a){return new Ss(a).parse(t)}static parseInline(t,a){return new Ss(a).parseInline(t)}parse(t){this.renderer.parser=this;let a="";for(let r=0;r<t.length;r++){let s=t[r];if(this.options.extensions?.renderers?.[s.type]){let i=s,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(i.type)){a+=o||"";continue}}let n=s;switch(n.type){case"space":a+=this.renderer.space(n);break;case"hr":a+=this.renderer.hr(n);break;case"heading":a+=this.renderer.heading(n);break;case"code":a+=this.renderer.code(n);break;case"table":a+=this.renderer.table(n);break;case"blockquote":a+=this.renderer.blockquote(n);break;case"list":a+=this.renderer.list(n);break;case"checkbox":a+=this.renderer.checkbox(n);break;case"html":a+=this.renderer.html(n);break;case"def":a+=this.renderer.def(n);break;case"paragraph":a+=this.renderer.paragraph(n);break;case"text":a+=this.renderer.text(n);break;default:{let i='Token with "'+n.type+'" type was not found.';if(this.options.silent)return"";throw Error(i)}}}return a}parseInline(t,a=this.renderer){this.renderer.parser=this;let r="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){r+=o||"";continue}}let i=n;switch(i.type){case"escape":r+=a.text(i);break;case"html":r+=a.html(i);break;case"link":r+=a.link(i);break;case"image":r+=a.image(i);break;case"checkbox":r+=a.checkbox(i);break;case"strong":r+=a.strong(i);break;case"em":r+=a.em(i);break;case"codespan":r+=a.codespan(i);break;case"br":r+=a.br(i);break;case"del":r+=a.del(i);break;case"text":r+=a.text(i);break;default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return"";throw Error(o)}}}return r}},Dt=class{options;block;constructor(e){this.options=e||je}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?ue.lex:ue.lexInline}provideParser(e=this.block){return e?he.parse:he.parseInline}},Ne=new class{defaults=lr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=he;Renderer=sa;TextRenderer=yr;Lexer=ue;Tokenizer=ra;Hooks=Dt;constructor(...e){this.use(...e)}walkTokens(e,t){let a=[];for(let r of e)switch(a=a.concat(t.call(this,r)),r.type){case"table":{let s=r;for(let n of s.header)a=a.concat(this.walkTokens(n.tokens,t));for(let n of s.rows)for(let i of n)a=a.concat(this.walkTokens(i.tokens,t));break}case"list":{let s=r;a=a.concat(this.walkTokens(s.items,t));break}default:{let s=r;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let i=s[n].flat(1/0);a=a.concat(this.walkTokens(i,t))}):s.tokens&&(a=a.concat(this.walkTokens(s.tokens,t)))}}return a}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{let r={...a};if(r.async=this.defaults.async||r.async||!1,a.extensions&&(a.extensions.forEach(s=>{if(!s.name)throw Error("extension name required");if("renderer"in s){let n=t.renderers[s.name];n?t.renderers[s.name]=function(...i){let o=s.renderer.apply(this,i);return o===!1&&(o=n.apply(this,i)),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 n=t[s.level];n?n.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)}),r.extensions=t),a.renderer){let s=this.defaults.renderer||new sa(this.defaults);for(let n in a.renderer){if(!(n in s))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let i=n,o=a.renderer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}r.renderer=s}if(a.tokenizer){let s=this.defaults.tokenizer||new ra(this.defaults);for(let n in a.tokenizer){if(!(n in s))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let i=n,o=a.tokenizer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}r.tokenizer=s}if(a.hooks){let s=this.defaults.hooks||new Dt;for(let n in a.hooks){if(!(n in s))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let i=n,o=a.hooks[i],l=s[i];s[i]=Dt.passThroughHooks.has(n)?c=>{if(this.defaults.async&&Dt.passThroughHooksRespectAsync.has(n))return(async()=>{let u=await o.call(s,c);return l.call(s,u)})();let d=o.call(s,c);return l.call(s,d)}:(...c)=>{if(this.defaults.async)return(async()=>{let u=await o.apply(s,c);return u===!1&&(u=await l.apply(s,c)),u})();let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}r.hooks=s}if(a.walkTokens){let s=this.defaults.walkTokens,n=a.walkTokens;r.walkTokens=function(i){let o=[];return o.push(n.call(this,i)),s&&(o=o.concat(s.call(this,i))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ue.lex(e,t??this.defaults)}parser(e,t){return he.parse(e,t??this.defaults)}parseMarkdown(e){return(t,a)=>{let r={...a},s={...this.defaults,...r},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return n(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 n(Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(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 i=s.hooks?await s.hooks.preprocess(t):t,o=await(s.hooks?await s.hooks.provideLexer(e):e?ue.lex:ue.lexInline)(i,s),l=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(e):e?he.parse:he.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(t=s.hooks.preprocess(t));let i=(s.hooks?s.hooks.provideLexer(e):e?ue.lex:ue.lexInline)(t,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let o=(s.hooks?s.hooks.provideParser(e):e?he.parse:he.parseInline)(i,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(i){return n(i)}}}onError(e,t){return a=>{if(a.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+ee(a.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(a);throw a}}};function E(e,t){return Ne.parse(e,t)}E.options=E.setOptions=function(e){return Ne.setOptions(e),E.defaults=Ne.defaults,Ks(E.defaults),E},E.getDefaults=lr,E.defaults=je;function Ql(...e){return Ne.use(...e),E.defaults=Ne.defaults,Ks(E.defaults),E}E.use=Ql,E.walkTokens=function(e,t){return Ne.walkTokens(e,t)},E.parseInline=Ne.parseInline,E.Parser=he,E.parser=he.parse,E.Renderer=sa,E.TextRenderer=yr,E.Lexer=ue,E.lexer=ue.lex,E.Tokenizer=ra,E.Hooks=Dt,E.parse=E,E.options,E.setOptions,E.walkTokens,E.parseInline,he.parse,ue.lex;var mn=!1;function fn(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function yn(e,{href:t,title:a,tokens:r}){if(!t?.startsWith("#")||typeof location>"u")return!1;let s=`${location.href.replace(/#.*/,"")}${t}`,n=a?` title="${fn(a)}"`:"";return`<a class="anchor-link" href="${fn(s)}"${n}>${e.parser.parseInline(r)}</a>`}function na(e){let t=e.link;e.link=function(a){let r=yn(this,a);return r===!1?t.call(this,a):r}}function ec(){mn||(mn=!0,E.use({renderer:{link(e){return yn(this,e)}}}))}ec();function J(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/<br\s*\/?>$/i,"").trim();return t.includes("<br")||t.includes(`
`)}var tc=/[\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,ac=Object.hasOwnProperty,Ge=class{constructor(){this.occurrences,this.reset()}slug(e,t){let a=this,r=rc(e,t===!0),s=r;for(;ac.call(a.occurrences,r);)a.occurrences[s]++,r=s+"-"+a.occurrences[s];return a.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function rc(e,t){return typeof e=="string"?(t||(e=e.toLowerCase()),e.replace(tc,"").replace(/ /g,"-")):""}var gn={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"}]}},bn=new Map;Object.values(gn).forEach(e=>{e?.scopeName&&bn.set(e.scopeName,e)});var sc={"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"},nc={indices:[[1/0,1/0]]},Ct=new Map,ic=e=>{let t=e.split("."),[a,r,s]=t,n=t.at(-1);if(a==="markup"&&["quote","inserted","deleted","raw"].includes(r))return r;if(a==="entity"&&r==="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(n))return n;if(["comment","string","constant","storage","keyword","variable","punctuation","entity","support"].includes(a))return a},ia=(e,t,a,r)=>{let s=ic(r);if(!s||t===a)return;let n=new Range;n.setStart(e,t),n.setEnd(e,a),Ct.has(s)||Ct.set(s,new Highlight),Ct.get(s).add(n)},gr=(e,t,a={})=>{Object.entries(a).forEach(([r,s])=>{let n=t.indices[+r];n&&ia(e,...n,s.name)})},oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lc=(e,t)=>e.replace(/\\(\d+)/g,(a,r)=>t[r]===void 0?a:oc(t[r])),vn=e=>e?Array.isArray(e)?e:e.match||e.begin||e.include?[e]:e.patterns||[]:[],cc=(e,t,a)=>{if(e==="$self")return{grammar:t,rules:t.patterns};if(e==="$base")return{grammar:a,rules:a.patterns};if(e[0]==="#")return{grammar:t,rules:vn(t.repository?.[e.slice(1)])};let[r,s]=e.split("#"),n=bn.get(r);return n?{grammar:n,rules:s?vn(n.repository?.[s]):n.patterns}:null},xn=(e,t,a,r=new Set)=>{let s=[];return e.forEach(n=>{if(n.include){let i=`${t.scopeName}:${n.include}`;if(r.has(i))return;let o=cc(n.include,t,a);if(!o)return;let l=new Set(r);l.add(i),s.push(...xn(o.rules,o.grammar,a,l));return}(n.match||n.begin&&n.end)&&s.push({grammar:t,rule:n})}),s},br=new Map,vr=new Map,wn=(e,t,a,r)=>{let s=vr.get(e);if(!s||s.indices[0][0]<a){br.has(e)||br.set(e,new RegExp(e,"dgm"));let n=br.get(e);n.lastIndex=a,s=n.exec(t.data)||nc,vr.set(e,s)}return s.indices[0][0]<r&&s.indices[0][1]<=r?s:null},dc=(e,t,a,r)=>{let s=null;return t.forEach(n=>{let i=wn(n.rule.match||n.rule.begin,e,a,r);i&&(!s||i.indices[0][0]<s.match.indices[0][0])&&(s={...n,match:i})}),s},kn=(e,t,a,r,s,n=s,i=null)=>{let o=xn(t,s,n),l=a;for(;l<r;){let c=dc(e,o,l,r),d=i?wn(i.pattern,e,l,r):null,u=c?.match.indices[0][0]??1/0,h=d?.indices[0][0]??1/0;if(d&&(h<u||h===u&&!i?.applyEndPatternLast))return{contentEnd:h,end:d.indices[0][1],match:d};if(!c)return{contentEnd:r,end:r,match:null};let{rule:m,match:y,grammar:f}=c;if(m.match){m.name&&ia(e,...y.indices[0],m.name),gr(e,y,m.captures),l=y.indices[0][1]>l?y.indices[0][1]:l+1;continue}let b=kn(e,m.patterns||[],y.indices[0][1],r,f,n,{pattern:lc(m.end,y),applyEndPatternLast:m.applyEndPatternLast});m.name&&ia(e,y.indices[0][0],b.end,m.name),m.contentName&&ia(e,y.indices[0][1],b.contentEnd,m.contentName),gr(e,y,m.beginCaptures||m.captures),b.match&&gr(e,b.match,m.endCaptures||m.captures),l=b.end>l?b.end:l+1}return{contentEnd:r,end:r,match:null}},$n=e=>{let t=e.parentElement,a=r=>!r||!r.classList?null:[...r.classList].find(s=>s.startsWith("language-"))?.slice(9);return(a(e)||e.dataset?.language||a(t)||t?.dataset?.language||t?.getAttribute?.("lang")||"").toLowerCase()},pc=e=>sc[e]||e,uc=(e=document)=>{let t=[],a=new Set,r=s=>{if(s&&!a.has(s)&&(a.add(s),s.querySelectorAll)){let n=s.querySelectorAll("pre > code");t.push(...n);let i=s.querySelectorAll("*");for(let o=0;o<i.length;o++){let l=i[o];l.shadowRoot&&r(l.shadowRoot)}}};return r(e),t},xr=!1,hc=(e=document)=>{if(typeof window>"u"||typeof CSS>"u"||!CSS.highlights)return;let t=uc(e).filter($n);t.length!==0&&(Ct.forEach((a,r)=>{CSS.highlights.get(r)===a&&CSS.highlights.delete(r),a.clear()}),t.forEach(a=>{let r=gn[pc($n(a))];if(!r)return;let s=Array.from(a.childNodes).filter(n=>n.nodeType===Node.TEXT_NODE&&n.data?.length>0);s.length!==0&&(vr=new Map,s.forEach(n=>{kn(n,r.patterns,0,n.data.length,r)}))}),Ct.forEach((a,r)=>{a.size&&CSS.highlights.set(r,a)}))},oa=(e=document)=>{xr||(xr=!0,requestAnimationFrame(()=>{xr=!1,hc(e)}))},qe=B`.hover-bg:hover{background:var(--muted)}::selection{background:var(--selection-bg);color:var(--selection-fg)}.regular-font{font-family:var(--font-regular)}.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{text-wrap:balance;font-size:1.25rem}.req-res-title{font-family:var(--font-regular);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(--red)}.blue-text{color:var(--blue)}.multiline{max-height:var(--resp-area-height,400px);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{color:var(--method-copy,var(--method-default))}.method-fg.purge{color:var(--method-purge,var(--method-default))}h1{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.75rem;font-weight:400}h2{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.5rem;font-weight:400}h3{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.25rem;font-weight:400}h4{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1rem;font-weight:400}h5{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:.875rem;font-weight:400}h6{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:.75rem;font-weight:400}h1,h2,h3,h4,h5,h6{text-wrap:balance;margin-block-end:.2em}p{margin-block-start:.5em}a{color:var(--blue);cursor:pointer}a.inactive-link{color:var(--foreground);cursor:text;text-decoration:none}code,pre{font-family:var(--font-mono);font-size:calc(var(--font-size-mono) - 1px);margin:0}.m-markdown,.m-markdown-small{color:var(--markdown-fg,var(--foreground));display:block}.m-markdown p,.m-markdown span{font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 8px);color:inherit}.m-markdown li{font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 10px);color:inherit;margin-block:4px}.m-markdown-small p,.m-markdown-small span{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 6px);color:inherit}.m-markdown-small li{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 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:24px}.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:var(--card-radius);color:var(--inline-code-fg);background-color:var(--inline-code-bg,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;border-radius:var(--card-radius);border:1px solid var(--input-border);line-height:normal;overflow-x:auto}.m-markdown pre{background:var(--input-background);color:var(--foreground);padding:12px}.m-markdown-small pre{background:var(--input-background);color:var(--card-foreground);margin-top:4px;padding:2px 4px}.m-markdown-small pre code,.m-markdown pre code{background:0 0;border:none;padding:0}.m-markdown pre code{color:var(--code-fg)}.m-markdown-small pre code{color:var(--card-foreground);background:0 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:var(--card-radius);font-size:calc(var(--font-size-small) + 1px);line-height:calc(var(--font-size-small) + 4px);max-width:100%;margin:10px 0}.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{font-size:calc(var(--font-size-mono) - 2px)}.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)}`,Tt=B`.m-btn{border-radius:var(--radius);font-weight:600;font-size:var(--font-size-small);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;padding:.4em 1em;line-height:1;transition:background .2s,color .2s,border-color .2s,transform .1s;display:inline-block;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.m-btn:hover{background:color-mix(in srgb, var(--primary) 28%, transparent);color:var(--foreground)}.m-btn.primary{background:var(--primary);color:var(--primary-foreground)}.m-btn.primary:hover{background:var(--primary);filter:brightness(110%);color:var(--primary-foreground)}.m-btn.thin-border{border-width:1px}.m-btn.large{padding:.55em 1.1em}.m-btn.small{padding:.35em .85em}.m-btn.tiny{padding:.3em .5em}.m-btn.circle{border-radius:50%}.m-btn.nav{border:1px solid var(--primary)}.m-btn.nav:hover{background:var(--primary)}.m-btn:disabled{background:var(--muted);color:var(--muted-foreground);border-color:var(--border);cursor:not-allowed;opacity:.4}.m-btn:active{filter:brightness(85%);transition:scale;transform:scale(.97)}.toolbar-btn{cursor:pointer;font-size:var(--font-size-small);min-width:50px;color:var(--primary-foreground);border-radius:var(--radius);background:var(--primary);border:none;margin:0 2px;padding:4px}input,textarea,select,pre{color:var(--foreground);background:var(--input-background);border:1px solid var(--input-border);border-radius:var(--radius);outline:none}textarea,pre{border-radius:var(--card-radius)}button{font-family:var(--font-regular);color:var(--foreground)}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 5px;transition:border .2s}select{font-family:var(--font-regular);-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:5px 30px 5px 5px}select:hover{border-color:var(--primary)}textarea::placeholder,input[type=text]::placeholder,input[type=password]::placeholder{color:var(--muted-foreground);opacity:1}input[type=file]{font-family:var(--font-regular);cursor:pointer;background:var(--input-background);border:1px solid var(--input-border);border-radius:var(--radius);min-height:calc(var(--font-size-small) + 1.125rem);padding:2px}input[type=file]::file-selector-button,input[type=file]::-webkit-file-upload-button{font-family:var(--font-regular);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:3px 8px}input[type=file]::file-selector-button,input[type=file]::file-selector-button{font-family:var(--font-regular);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:3px 8px}pre,textarea{scrollbar-width:thin;scrollbar-color:var(--input-border) 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);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;background:var(--muted);border:1px solid var(--border);cursor:pointer;vertical-align:top;border-radius:9px;width:36px;min-width:36px;height:18px;transition:border .25s .15s,box-shadow .25s .3s,padding .25s;display:inline-block;position:relative}input[type=checkbox]:after{background:var(--background);border:1px solid var(--border);content:"";border-radius:8px;height:16px;transition:border .25s .15s,left .25s .1s,right .15s .175s;display:block;position:absolute;top:0;left:0;right:16px}input[type=checkbox]:checked{background:var(--green);border-color:var(--green)}input[type=checkbox]:checked:after{border:1px solid var(--green);transition:border .25s,left .15s .25s,right .25s .175s;left:16px;right:1px}`,la=B`.row,.col{display:flex}.row{flex-direction:row;align-items:center}.col{flex-direction:column;align-items:stretch}`,ca=B`.m-table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:var(--card-radius);direction:ltr;max-width:100%;margin:0}.m-table tr:first-child td,.m-table tr:first-child th{border-top:0}.m-table td,.m-table th{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 4px);vertical-align:top;padding:4px 5px}.m-table.padded-12 td,.m-table.padded-12 th{padding:12px}.m-table td:not([align]),.m-table th:not([align]){text-align:start}.m-table th{color:var(--card-foreground);font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 18px);letter-spacing:normal;background:var(--card);vertical-align:bottom;border-bottom:1px solid var(--border);font-weight:600}.m-table>tbody>tr>td,.m-table>tr>td{border-top:1px solid var(--border);text-overflow:ellipsis;overflow:hidden}.table-title{font-size:var(--font-size-small);vertical-align:middle;margin:12px 0 4px;font-weight:700}`,Sn=B`.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}.endpoint-head .descr{font-size:var(--font-size-small);color:var(--muted-foreground);overflow-wrap:break-word;word-break:break-all;align-items:center;font-weight:400;display:none}.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,var(--orange));background:color-mix(in srgb, var(--method-put,var(--orange)) 10%, transparent)}.m-endpoint>.endpoint-head.post:hover,.m-endpoint>.endpoint-head.post.expanded{border-color:var(--method-post,var(--green));background:color-mix(in srgb, var(--method-post,var(--green)) 10%, transparent)}.m-endpoint>.endpoint-head.get:hover,.m-endpoint>.endpoint-head.get.expanded{border-color:var(--method-get,var(--blue));background:color-mix(in srgb, var(--method-get,var(--blue)) 10%, transparent)}.m-endpoint>.endpoint-head.delete:hover,.m-endpoint>.endpoint-head.delete.expanded{border-color:var(--method-delete,var(--red));background:color-mix(in srgb, var(--method-delete,var(--red)) 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.delete{border-color:var(--red)}.m-endpoint .endpoint-body.put{border-color:var(--orange)}.m-endpoint .endpoint-body.post{border-color:var(--green)}.m-endpoint .endpoint-body.get{border-color:var(--blue)}.m-endpoint .endpoint-body.head,.m-endpoint .endpoint-body.patch,.m-endpoint .endpoint-body.options{border-color:var(--yellow)}.m-endpoint .endpoint-body.trace{border-color:var(--pink)}.m-endpoint .endpoint-body.query{border-color:var(--purple)}.m-endpoint .endpoint-body.copy,.m-endpoint .endpoint-body.purge{border-color:var(--method-color,var(--method-default))}.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{font-size:calc(var(--font-size-regular) + 2px);word-break:break-all;margin-bottom:6px}.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{border:2px solid var(--method-copy,var(--method-default))}.endpoint-head .method.purge{border:2px solid var(--method-purge,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{--method-color:var(--method-copy,var(--method-default))}.purge{--method-color:var(--method-purge,var(--method-default))}.req-resp-container{border-top:1px solid var(--border);flex-flow:column wrap;align-items:stretch;min-width:0;margin-top:16px;display:flex}.expanded-req-resp-container{border-top:none;flex-flow:column wrap;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(--red)}.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:var(--layout,row);flex-wrap:nowrap}: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(--red) 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}}`,wr=B`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:var(--card-radius);background:var(--input-background);border:1px solid var(--input-border);margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{white-space:normal;border-radius:var(--card-radius)}::highlight(comment),::highlight(quote){color:var(--syntax-comment,#6e7781)}::highlight(keyword),::highlight(storage),::highlight(at-rule),::highlight(doctype),::highlight(important),::highlight(section){color:var(--syntax-keyword,#cf222e)}::highlight(operator),::highlight(punctuation){color:var(--syntax-operator,#24292f)}::highlight(string),::highlight(regexp),::highlight(attribute-value),::highlight(link),::highlight(raw){color:var(--syntax-string,#0a3069)}::highlight(numeric),::highlight(boolean),::highlight(constant),::highlight(symbol),::highlight(character-entity),::highlight(anchor),::highlight(entity){color:var(--syntax-constant,#0550ae)}::highlight(function),::highlight(decorator),::highlight(animation){color:var(--syntax-function,#8250df)}::highlight(type),::highlight(support){color:var(--syntax-type,#8250df)}::highlight(variable),::highlight(interpolation){color:var(--syntax-variable,#953800)}::highlight(property),::highlight(key),::highlight(attribute-name){color:var(--syntax-property,#0550ae)}::highlight(tag){color:var(--syntax-tag,#116329)}::highlight(selector){color:var(--syntax-selector,#8250df)}::highlight(inserted){color:var(--syntax-inserted,#116329)}::highlight(deleted){color:var(--syntax-deleted,#cf222e)}`,da=B`.tab-panel{border:none}.tab-buttons{border-bottom:1px solid var(--border);scrollbar-width:thin;align-items:stretch;height:30px;padding:4px 4px 0;overflow:auto hidden}.tab-buttons::-webkit-scrollbar{background:var(--border);height:1px}.tab-btn{corner-shape:square;color:var(--muted-foreground);white-space:nowrap;cursor:pointer;font-family:var(--font-regular);font-size:var(--font-size-small);background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;outline:none;margin-inline-end:16px;padding:2px 4px;transition:color .15s}.tab-btn.active{border-bottom:2px solid var(--primary);color:var(--primary);font-weight:600}.tab-btn:hover{color:var(--primary)}.tab-content{min-height:50px;margin:-1px 0 0;position:relative}`,En=B`#advanced-search-btn{width:75px;margin-left:5px;padding:6px 8px;display:none}.btn-clear-filter{color:var(--muted-foreground);width:75px;margin-left:5px;padding:6px 8px}.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{width:100%;color:var(--foreground);border:1px solid var(--input-border);border-radius:var(--radius);background:var(--input-background);font-size:calc(var(--font-size-small) + 1px);box-sizing:border-box;padding:6px 28px 6px 10px;transition:border-color .2s,box-shadow .2s}.nav-bar-search-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);outline:none}.nav-bar-search-icon{font-size:var(--font-size-regular);cursor:pointer;color:var(--muted-foreground);opacity:.6;user-select:none;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.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);cursor:pointer;z-index:10;border-radius:4px;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(--muted-foreground);background:var(--background);background-blend-mode:multiply;border-right:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px);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(--nav-logo-max-height,60px);object-fit:contain;width:auto;padding:16px 16px 0}.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.read .nav-bar-tag-icon{display:none}.nav-bar-paths-under-tag{transition:max-height .2s ease-out,visibility .3s;overflow:hidden}.collapsed .nav-bar-paths-under-tag{visibility:hidden;max-height:0}.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{color:var(--muted-foreground);font-size:20px}.nav-bar-tag-icon:hover{color:var(--foreground)}.nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon:after{content:"⌵";text-align:center;width:16px;height:16px;transition:transform .2s ease-out;display:inline-block;transform:rotate(-90deg)}.nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon:after{content:"⌵";text-align:center;width:16px;height:16px;transition:transform .2s ease-out;display:inline-block}.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{font-size:var(--font-size-regular);color:var(--primary);text-transform:capitalize;border-inline-start:4px solid #0000;padding:15px 15px 15px 10px;font-weight:700}.nav-bar-components,.nav-bar-h1,.nav-bar-h2,.nav-bar-info,.nav-bar-tag,.nav-bar-path{cursor:pointer;width:100%;color:var(--muted-foreground);background:0 0;border:none;border-inline-start:4px solid #0000;transition:background .15s,color .15s;display:flex}.nav-bar-path-inner{pointer-events:none;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.nav-bar-path-label{overflow-wrap:break-word;word-break:break-word;flex:1;align-items:baseline;min-width:0;display:flex}.nav-bar-webhook{font-weight:700;font-size:calc(var(--font-size-small) - 2px);flex-shrink:0;margin-right:8px}.nav-bar-h1,.nav-bar-h2,.nav-bar-path{font-size:calc(var(--font-size-small) + 1px);padding:var(--nav-item-padding)}.nav-bar-path.small-font{font-size:var(--font-size-small)}.nav-bar-info{font-size:var(--font-size-regular);padding:16px 10px;font-weight:700}.nav-bar-section{font-size:var(--font-size-small);color:var(--muted-foreground);padding:var(--nav-item-padding);flex-direction:row;justify-content:space-between;font-weight:700;display:flex}.nav-bar-section.operations{cursor:pointer;transition:background .15s,color .15s}.nav-bar-section.operations:hover{color:var(--nav-hover-fg,var(--foreground));background:var(--nav-hover-bg,var(--muted))}.nav-bar-section:first-child{display:none}.nav-bar-h2{padding-inline-start:28px}.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(--primary);color:var(--nav-accent-fg,var(--primary))}.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(--nav-accent-fg,var(--primary))}.nav-bar-h1.colored-block.active,.nav-bar-h2.colored-block.active,.nav-bar-info.colored-block.active,.nav-bar-tag.colored-block.active,.nav-bar-path.colored-block.active,.nav-bar-section.colored-block.operations.active,.nav-bar-h1.colored-block.active:hover,.nav-bar-h2.colored-block.active:hover,.nav-bar-info.colored-block.active:hover,.nav-bar-tag.colored-block.active:hover,.nav-bar-path.colored-block.active:hover,.nav-bar-section.colored-block.operations.active:hover{background:var(--primary);color:var(--primary-foreground)}.nav-bar-h1:hover,.nav-bar-h2:hover,.nav-bar-info:hover,.nav-bar-tag:hover,.nav-bar-path:hover{color:var(--nav-hover-fg,var(--foreground));background:var(--nav-hover-bg,var(--muted))}`,An=B`#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}`,Xe=B``,mc=B`*,:before,:after{box-sizing:border-box}.dialog-box{background:var(--card);color:var(--card-foreground);border-radius:var(--card-radius);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:var(--card-radius);border-top-right-radius:var(--card-radius);align-self:stretch;align-items:center;min-height:60px;max-height:60px;padding:0 16px;display:flex;position:sticky;top:0;overflow:hidden}.dialog-box-header 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}.dialog-box-header button:hover{border-color:var(--primary)}.dialog-box-content{height:100%;padding:1rem;display:block;overflow:auto}.dialog-box-title{flex-grow:1;font-size:24px}`,Dn=["amber","blue","emerald","violet","graphite","rose","slate"];function Cn(e){return!e||typeof e!="string"?!1:/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.trim())}function pa(e){if(!e||typeof e!="string")return{theme:"amber"};let t=e.trim(),a=t.toLowerCase();return Dn.includes(a)?{theme:a}:Cn(t)?{theme:t}:{theme:"amber"}}function fc(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(a=>a+a).join("")),t.length===6||t.length===8){let a=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return(a*299+r*587+s*114)/1e3>=128}return!1}function ua(e,t){if(!e||!e.style)return;if(!t||Dn.includes(t.trim().toLowerCase())||!Cn(t)){e.style.removeProperty("--primary"),e.style.removeProperty("--ring"),e.style.removeProperty("--primary-foreground");return}let a=t.trim();e.style.setProperty("--primary",a),e.style.setProperty("--ring",a);let r=fc(a)?"#000000":"#ffffff";e.style.setProperty("--primary-foreground",r)}var Tn=B`:host{--font-mono:"Roboto Mono", Monaco, "Andale Mono", Consolas, monospace;--font-regular:var(--font-sans,"Open Sans", "Segoe UI", Tahoma, Arial, sans-serif);--radius:.25rem;--card-radius:4px;--border-radius:var(--radius);--ui-base-size:14px;--font-size-small:12px;--font-size-mono:13px;--font-size-regular:14px;--nav-width:18.75rem;--nav-item-padding:.4375rem 1rem .4375rem .625rem;--nav-logo-max-height:60px;--resp-area-height:400px;--layout:row;--table-schema-key-width:240px;--table-schema-key-text-overflow:ellipsis;--table-schema-key-whitespace:nowrap;--scroll-bar-width:8px;--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);--nav-accent-fg:var(--primary)}:host([radius=none]){--radius:0px;--card-radius:0px}:host([radius=sm]),:host(:not([radius])){--radius:.25rem;--card-radius:4px}:host([radius=md]){--radius:.375rem;--card-radius:6px}:host([radius=lg]){--radius:.5rem;--card-radius:8px}:host([radius=full]){--radius:9999px;--card-radius:8px}:host([scale=sm]){--ui-base-size:13px;--font-size-small:11px;--font-size-mono:12px;--font-size-regular:13px;--nav-width:17rem}:host([scale=default]),:host(:not([scale])){--ui-base-size:14px;--font-size-small:12px;--font-size-mono:13px;--font-size-regular:14px;--nav-width:18.75rem}:host([scale=lg]){--ui-base-size:16px;--font-size-small:14px;--font-size-mono:15px;--font-size-regular:16px;--nav-width:21rem}:host([nav-item-spacing=compact]){--nav-item-padding:.3125rem 1rem .3125rem .625rem}:host([nav-item-spacing=default]),:host(:not([nav-item-spacing])){--nav-item-padding:.4375rem 1rem .4375rem .625rem}:host([nav-item-spacing=relaxed]){--nav-item-padding:.625rem 1rem .625rem .625rem}:host,:host([color-scheme=dark]),:host([color-scheme=system]),:host(:not([color-scheme])){--background:var(--_preset-bg,#09090b);--foreground:var(--_preset-fg,#fafafa);--card:var(--_preset-card,#18181b);--card-foreground:var(--_preset-card-fg,#fafafa);--muted:var(--_preset-muted,#27272a);--muted-foreground:#a1a1aa;--border:var(--_preset-border,#27272a);--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 75%, #000);--input-border:color-mix(in srgb, var(--border) 60%, var(--background));--input:var(--input-background);--method-get:#5c98f9;--method-post:#68cc97;--method-put:#f59e0b;--method-delete:#f75252;--method-patch:#8b5cf6;--method-head:#eab308;--method-options:#06b6d4;--method-trace:#ec4899;--method-query:#818cf8;--method-default:#64748b;--method-badge-fg:#000;--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);--code-fg:var(--foreground);--inline-code-fg:#c4c6d1;--inline-code-bg:#3b3c45;--markdown-fg:#c4c6d1;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}:host([color-scheme=light]){--background:#fff;--foreground:#09090b;--card:#f4f4f5;--card-foreground:#09090b;--muted:#f4f4f5;--muted-foreground:#71717a;--border:#e4e4e7;--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 94%, var(--foreground));--input-border:color-mix(in srgb, var(--border) 80%, var(--foreground));--input:var(--input-background);--method-get:#2563eb;--method-post:#059669;--method-put:#c2410c;--method-delete:#dc2626;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#db2777;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--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:var(--input-background);--code-fg:var(--foreground);--inline-code-fg:#334155;--inline-code-bg:#e2e8f0;--markdown-fg:#475569;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}@media (prefers-color-scheme:light){:host([color-scheme=system]){--background:#fff;--foreground:#09090b;--card:#f4f4f5;--card-foreground:#09090b;--muted:#f4f4f5;--muted-foreground:#71717a;--border:#e4e4e7;--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 94%, var(--foreground));--input-border:color-mix(in srgb, var(--border) 80%, var(--foreground));--input:var(--input-background);--method-get:#2563eb;--method-post:#059669;--method-put:#c2410c;--method-delete:#dc2626;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#db2777;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--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:var(--input-background);--code-fg:var(--foreground);--inline-code-fg:#334155;--inline-code-bg:#e2e8f0;--markdown-fg:#475569;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}}:host,:host([theme=amber]),:host(:not([theme])){--primary:#f76b39;--primary-foreground:#000;--foreground:#ccc;--ring:#f76b39;--_preset-bg:oklch(26.13% .0134 272.84);--_preset-card:oklch(26.13% .0134 272.84);--_preset-border:#363636}:host([theme=amber][color-scheme=light]),:host(:not([theme])[color-scheme=light]){--primary:#f76b39;--primary-foreground:#000;--foreground:#555;--ring:#d97706}:host([theme=blue]){--primary:#488bf8;--primary-foreground:#fff;--ring:#488bf8;--_preset-bg:#1c1b1b;--_preset-fg:#e5e5e5;--_preset-border:#414146}:host([theme=blue][color-scheme=light]){--primary:#2563eb;--primary-foreground:#fff;--ring:#2563eb}:host([theme=emerald]){--primary:#03bf80;--primary-foreground:#0f331d;--ring:#03bf80;--_preset-bg:#060913;--_preset-fg:#e2e8f0;--_preset-card:#0f172a;--_preset-card-fg:#f8fafc;--_preset-muted:#111827;--_preset-border:#242c29}:host([theme=emerald][color-scheme=light]){--primary:#059669;--primary-foreground:#fff;--ring:#059669}:host([theme=violet]){--primary:#8b5cf6;--primary-foreground:#fff;--ring:#8b5cf6;--_preset-bg:#130e20;--_preset-fg:#f5f3ff;--_preset-card:#1e1633;--_preset-card-fg:#f5f3ff;--_preset-muted:#19122b;--_preset-border:#342854}:host([theme=violet][color-scheme=light]){--primary:#7c3aed;--primary-foreground:#fff;--ring:#7c3aed}:host([theme=graphite]){--primary:#fafafa;--primary-foreground:#18181b;--ring:#d4d4d8}:host([theme=graphite][color-scheme=light]){--primary:#18181b;--primary-foreground:#fafafa;--foreground:#111;--muted-foreground:#222;--ring:#27272a}:host([theme=rose]){--primary:#ee5d7c;--ring:#ee5d7c;--_preset-bg:oklch(26.13% .0134 272.84);--_preset-card:oklch(26.13% .0134 272.84)}:host([theme=rose][color-scheme=light]){--primary:#e11d48;--primary-foreground:#fff;--ring:#e11d48}:host([theme=slate]){--primary:#64748b;--primary-foreground:#fff;--nav-accent-fg:#fff;--ring:#64748b}:host([theme=slate][color-scheme=light]){--primary:#475569;--primary-foreground:#fff;--ring:#475569}@media (prefers-color-scheme:light){:host([theme=amber][color-scheme=system]),:host(:not([theme])[color-scheme=system]){--primary:#d97706;--primary-foreground:#fff;--ring:#d97706}:host([theme=blue][color-scheme=system]){--primary:#2563eb;--primary-foreground:#fff;--ring:#2563eb}:host([theme=emerald][color-scheme=system]){--primary:#059669;--primary-foreground:#fff;--ring:#059669}:host([theme=violet][color-scheme=system]){--primary:#7c3aed;--primary-foreground:#fff;--ring:#7c3aed}:host([theme=graphite][color-scheme=system]){--primary:#18181b;--primary-foreground:#fafafa;--ring:#27272a}:host([theme=rose][color-scheme=system]){--primary:#e11d48;--primary-foreground:#fff;--ring:#e11d48}:host([theme=slate][color-scheme=system]){--primary:#475569;--primary-foreground:#fff;--ring:#475569}}`,ha=/[\s#:?&={}]/g,Ft="_rapidoc_api_key";function ma(e){return new Promise(t=>setTimeout(t,e))}function Ot(e,t){let a=t.target,r=document.createElement("textarea");r.value=e,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy"),a.innerText="Copied",setTimeout(()=>{a.innerText="Copy"},5e3)}catch{}document.body.removeChild(r)}function yc(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}function _t(e,t,a=""){return`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${a}`.toLowerCase().includes(e.toLowerCase())}function kr(e,t=new Set){return e&&Object.keys(e).forEach(a=>{t.add(a),e[a].properties?kr(e[a].properties,t):e[a].items?.properties&&kr(e[a].items?.properties,t)}),t}function gc(e,t,a=[]){if(!e.trim()||a.length===0)return;let r=[];return t.forEach(s=>{s.paths.forEach(n=>{let i="";if(a.includes("search-api-path")&&(i=n.path),a.includes("search-api-descr")&&(i=`${i} ${(n.summary||"")+(n.description||"")}`),a.includes("search-api-params")&&(i=`${i} ${n.parameters?.map(o=>o.name).join(" ")||""}`),a.includes("search-api-request-body")&&n.requestBody){let o=new Set;for(let l in n.requestBody?.content)n.requestBody.content[l].schema?.properties&&(o=kr(n.requestBody.content[l].schema?.properties)),i=`${i} ${[...o].join(" ")}`}a.includes("search-api-resp-descr")&&(i=`${i} ${Object.values(n.responses).map(o=>o.description||"").join(" ")}`),i.toLowerCase().includes(e.trim().toLowerCase())&&r.push({elementId:n.elementId,method:n.method,path:n.path,summary:n.summary||n.description||"",deprecated:n.deprecated})})}),r}function Fn(e,t){if(e){let a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=e,a.download=t,a.click(),a.remove()}}function On(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 P=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 Le(e,t,a=[]){let r={};for(let[s,n]of Object.entries(e)){let i=[...a,s];if(Array.isArray(n)){r[s]=n.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?Le(o,t,[...i,l.toString()]):o);continue}if(ne(n)){r[s]=Le(n,t,i);continue}r[s]=n}return t(r,a)}var Ee="application/json";function _n(e){let t=e["x-example"],a=e["x-examples"];return delete e["x-example"],delete e["x-examples"],{xExample:t,xExamples:a}}function Be(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Object.keys(e).length>0}function bc(e){return Be(e)&&Object.values(e).every(t=>typeof t=="object"&&!!t&&!Array.isArray(t))}function vc(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(a=>a in t)||typeof t.properties=="object"&&t.properties!==null&&Object.keys(t.properties).length>0)}function jn(e){let t=Object.keys(e);if(t.some(a=>{let r=e[a];return ne(r)&&(r.example!==void 0||r.examples!==void 0)}))for(let a of t){let r=e[a];if(!ne(r))continue;let s=r.example!==void 0||r.examples!==void 0;r.schema!==void 0&&!s&&Object.keys(r).length===1&&vc(r.schema)&&delete e[a]}}var xc=new Set(["summary","description","value","externalValue"]);function Rn(e){if(typeof e!="object"||!e)return!1;let t=e,a="value"in t||"externalValue"in t,r=Object.keys(t).every(s=>xc.has(s));return a&&r}function Ye(e){return Rn(e)?e:{value:e}}var wc=/^[a-zA-Z0-9*+.-]+\/[a-zA-Z0-9*+.+-]+$/;function $r(e){return wc.test(e)}function kc(e){return Object.entries(e).reduce((t,[a,r])=>(t[a]={value:r},t),{})}var $c=e=>{switch(e){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return e}};function Nn(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 a=Array.isArray(t.schemes)&&t.schemes?.length?t.schemes:["http"];t.servers=a.map(r=>({url:`${r}://${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 a of Object.values(t.definitions))ve(a);t.components=Object.assign({},t.components,{schemas:t.definitions}),delete t.definitions,t=Le(t,a=>(typeof a.$ref=="string"&&a.$ref.startsWith("#/definitions/")&&(a.$ref=a.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),a))}if(t=Le(t,a=>(a.type==="file"&&(a.type="string",a.format="binary"),a)),Object.hasOwn(t,"parameters")){t=Le(t,n=>{if(typeof n.$ref=="string"&&n.$ref.startsWith("#/parameters/")){let i=n.$ref.split("/")[2];if(!i)return n;let o=ne(t.parameters)&&i in t.parameters?t.parameters[i]:void 0;n.$ref=o&&typeof o=="object"&&"in"in o&&(o.in==="body"||o.in==="formData")?n.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):n.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return n}),t.components??={};let a={},r={},s=ne(t.parameters)?t.parameters:{};for(let[n,i]of Object.entries(s))i&&typeof i=="object"&&("$ref"in i?a[n]=Er(i):"in"in i&&(i.in==="body"?r[n]=In(i,t.consumes??[Ee]):i.in==="formData"?r[n]=zn([i],t.consumes):a[n]=Er(i)));Object.keys(a).length>0&&(t.components.parameters=a),Object.keys(r).length>0&&(t.components.requestBodies=r),delete t.parameters}if(Object.hasOwn(t,"responses")&&typeof t.responses=="object"&&t.responses!==null){t=Le(t,s=>(typeof s.$ref=="string"&&s.$ref.startsWith("#/responses/")&&(s.$ref=s.$ref.replace(/^#\/responses\//,"#/components/responses/")),s)),t.components??={};let a={},r=t.responses;for(let[s,n]of Object.entries(r))if(ne(n))if("$ref"in n)a[s]=n;else{let i=n,o=t.produces??[Ee];if(i.schema){ve(i.schema),typeof i.content!="object"&&(i.content={});for(let l of o)i.content[l]={schema:i.schema};delete i.schema}if(i.examples&&typeof i.examples=="object"){typeof i.content!="object"&&(i.content={});let l=o[0]??Ee;for(let[c,d]of Object.entries(i.examples))if($r(c))typeof i.content[c]!="object"&&(i.content[c]={}),i.content[c].example=d;else{typeof i.content[l]!="object"&&(i.content[l]={});let u=i.content[l];typeof u.examples!="object"&&(u.examples={}),u.examples[c]=Ye(d)}delete i.examples}i.content&&typeof i.content=="object"&&jn(i.content),ne(i.headers)&&(i.headers=Object.entries(i.headers).reduce((l,[c,d])=>d&&typeof d=="object"?{[c]:qn(d),...l}:l,{})),a[s]=i}Object.keys(a).length>0&&(t.components.responses=a),delete t.responses}if(typeof t.paths=="object"){for(let a in t.paths)if(Object.hasOwn(t.paths,a)){let r=ne(t.paths)&&a in t.paths?t.paths[a]:void 0;if(!r||typeof r!="object")continue;let s;for(let n in r)if(n==="parameters"&&Object.hasOwn(r,n)){let i=Pn(r.parameters,t.consumes??[Ee]);r.parameters=i.parameters,s=i.requestBody}else if(Object.hasOwn(r,n)){let i=r[n];if(s&&(i.requestBody=s),i.parameters){let o=Pn(i.parameters,i.consumes??t.consumes??[Ee]);i.parameters=o.parameters,o.requestBody&&(i.requestBody=o.requestBody)}if(delete i.consumes,i.responses){for(let o in i.responses)if(Object.hasOwn(i.responses,o)){let l=i.responses[o];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((c,[d,u])=>u&&typeof u=="object"?{[d]:qn(u),...c}:c,{})),l.schema){ve(l.schema);let c=t.produces??i.produces??[Ee];typeof l.content!="object"&&(l.content={});for(let d of c)l.content[d]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});let c=(t.produces??i.produces??[Ee])[0]??Ee;for(let[d,u]of Object.entries(l.examples))if($r(d))typeof l.content[d]!="object"&&(l.content[d]={}),l.content[d].example=u;else{typeof l.content[c]!="object"&&(l.content[c]={});let h=l.content[c];typeof h.examples!="object"&&(h.examples={}),h.examples[d]=Ye(u)}delete l.examples}l.content&&typeof l.content=="object"&&jn(l.content)}}delete i.produces,i.parameters?.length===0&&delete i.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[a,r]of Object.entries(t.securityDefinitions))if(typeof r=="object")if("type"in r&&r.type==="oauth2"){let{flow:s,authorizationUrl:n,tokenUrl:i,scopes:o}=r;t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:{type:"oauth2",flows:{[$c(s||"implicit")]:Object.assign({},n&&{authorizationUrl:n},i&&{tokenUrl:i},o&&{scopes:o})}}})}else"type"in r&&r.type==="basic"?t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:{type:"http",scheme:"basic"}}):t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:r});delete t.securityDefinitions}return delete t.consumes,delete t.produces,t}var ve=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))ve(t);if(ve(e.items),ve(e.additionalProperties),Array.isArray(e.allOf))for(let t of e.allOf)ve(t)}};function Sr(e){let t=["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf","x-nullable"].reduce((a,r)=>(Object.hasOwn(e,r)&&(a[r]=e[r],delete e[r]),a),{});return ve(t),t}function Sc(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 Er(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Ec(e),a=Sr(e),{xExample:r,xExamples:s}=_n(e);if(Be(r)?e.examples=kc(r):Be(s)&&(e.examples=Object.entries(s).reduce((n,[i,o])=>(n[i]=Ye(o),n),{})),delete e.collectionFormat,delete e.default,!e.in)throw Error('Parameter object must have an "in" property');return{schema:a,...t,...e,in:Sc(e.in)}}function qn(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Sr(e);return{...e,schema:t}}var Ln={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Bn={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},Ar={header:Bn,query:Ln,path:Bn};function Ec(e){if(e.type!=="array"||e.in!=="query"&&e.in!=="path"&&e.in!=="header")return{};let t=e.collectionFormat??"csv";return e.in in Ar&&t in Ar[e.in]?Ar[e.in][t]:{}}function Ac(e){if(e.type!=="array"||typeof e.collectionFormat!="string")return;let t=Ln[e.collectionFormat];if(t&&Object.keys(t).length!==0)return t}function In(e,t){let{xExample:a,xExamples:r}=_n(e);delete e.name,delete e.in;let{schema:s,...n}=e;ve(s);let i={content:{},...n};if(i.content)for(let o of t){if(i.content[o]={schema:s},Be(r)&&o in r){let l=r[o];Be(l)&&Object.values(l).every(c=>Rn(c))?i.content[o].examples=l:bc(l)?i.content[o].examples=Object.entries(l).reduce((c,[d,u])=>(c[d]=Ye(u),c),{}):i.content[o].examples={default:Ye(l)}}else Be(r)&&!Object.keys(r).some($r)&&(i.content[o].examples=Object.entries(r).reduce((l,[c,d])=>(l[c]=Ye(d),l),{}));!i.content[o].examples&&Be(a)&&o in a&&(i.content[o].example=a[o])}return i}function zn(e,t=["multipart/form-data"]){let a={content:{}},r=t.filter(n=>n==="multipart/form-data"||n==="application/x-www-form-urlencoded"),s=r.length>0?r:["multipart/form-data"];if(a.content)for(let n of s){a.content[n]={schema:{type:"object",properties:{},required:[]}};let i=a.content?.[n];if(i?.schema&&typeof i.schema=="object"&&"properties"in i.schema){for(let o of e)if(o.name&&i.schema.properties){i.schema.properties[o.name]={...Sr(structuredClone(o)),...o.description===void 0?{}:{description:o.description}};let l=Ac(o);l&&(i.encoding??={},i.encoding[o.name]=l),o.required&&Array.isArray(i.schema.required)&&i.schema.required.push(o.name)}}}return a}function Pn(e,t){let a={parameters:e.filter(n=>n.in!=="body"&&n.in!=="formData").map(n=>Er(n))},r=structuredClone(e.find(n=>n.in==="body")??{});r&&Object.keys(r).length&&(a.requestBody=In(r,t));let s=e.filter(n=>n.in==="formData");if(s.length>0){let n=zn(s,t);a.requestBody=typeof a.requestBody=="object"?{...a.requestBody,content:{...a.requestBody.content,...n.content}}:n,typeof a.requestBody!="object"&&(a.requestBody={content:{}})}return a}var Dc=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema","schemas"]),Cc=new Set(["paths","webhooks","responses","content","headers","examples","links","encoding","variables","parameters","requestBodies","securitySchemes","pathItems","scopes"]),Tc=e=>{if(!e)return!1;let t=e[0]==="x-ext"&&e[1]!==void 0?e.slice(2):e,a=0;for(let r of t){if(a>0){a--;continue}if(Dc.has(r)||r.endsWith("Schema"))return!0;if(r==="callbacks"){a=2;continue}Cc.has(r)&&(a=1)}return!1},Fc=new Set(["properties","patternProperties","$defs","definitions"]);function fa(e){let t=e?.[e.length-1];return t===void 0?!1:t==="schemas"&&e?.[e.length-2]==="components"||Fc.has(t)}var Oc=new Set(["example","default","const","enum"]);function _c(e){if(!e)return!1;for(let[t,a]of e.entries())if(Oc.has(a)&&!fa(e.slice(0,t))||a==="value"&&e[t-2]==="examples"&&!fa(e.slice(0,t-2)))return!0;return!1}function Un(e){let t=e;return t===null||typeof t.openapi!="string"||!t.openapi.startsWith("3.0")||(t.openapi="3.1.1",t=Le(t,jc)),t}var jc=(e,t)=>{if(_c(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:n,$ref:i,...o}=e;return{...o,anyOf:[{$ref:i},{type:"null"}]}}if(Array.isArray(e.allOf)){let{nullable:n,allOf:i,...o}=e,l=i.length===1?i[0]:{allOf:i};return{...o,anyOf:[l,{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 a=t?.some((n,i)=>n==="examples"&&i>0&&!fa(t.slice(0,i)));e.example!==void 0&&!a&&!fa(t)&&(e.examples=Tc(t)?[e.example]:{default:{value:e.example}},delete e.example);let{format:r,...s}=e;if(e.type==="string"||Array.isArray(e.type)&&e.type.includes("string")){if(e.format==="binary"){let{type:n,...i}=s;return t?.at(-1)==="schema"&&t.at(-3)==="content"?i:{contentMediaType:"application/octet-stream",...i}}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},Rc=["2.0","3.0","3.1","3.2"],ie={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 Mn(e){if(e===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(P(e))for(let t of new Set(Rc)){let a=t==="2.0"?"swagger":"openapi",r=e[a];if(typeof r!="string")continue;let[s,n]=r.split(".");if(`${s}.${n}`===t)return{version:t,specificationType:a,specificationVersion:r}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function Ie(e){return e?.find(t=>t.isEntrypoint)}function Dr(e,t,a=[]){let r={};for(let[s,n]of Object.entries(e)){let i=[...a,s];if(Array.isArray(n)){r[s]=n.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?Dr(o,t,[...i,l.toString()]):o);continue}if(typeof n=="object"&&n){r[s]=Dr(n,t,i);continue}r[s]=n}return t(r,a)}function Hn(e){let t=[];return!e||typeof e!="object"?t:(Dr(e,a=>(a.$ref&&typeof a.$ref=="string"&&!a.$ref.startsWith("#")&&t.push(a.$ref.split("#")[0]),a)),[...new Set(t)])}function Cr(e){return e!==void 0&&Array.isArray(e)&&e.length>0&&e.some(t=>t.isEntrypoint===!0)}var Tr=Symbol.for("yaml.alias"),Fr=Symbol.for("yaml.document"),Ae=Symbol.for("yaml.map"),Wn=Symbol.for("yaml.pair"),ye=Symbol.for("yaml.scalar"),Qe=Symbol.for("yaml.seq"),oe=Symbol.for("yaml.node.type"),et=e=>!!e&&typeof e=="object"&&e[oe]===Tr,ya=e=>!!e&&typeof e=="object"&&e[oe]===Fr,jt=e=>!!e&&typeof e=="object"&&e[oe]===Ae,U=e=>!!e&&typeof e=="object"&&e[oe]===Wn,R=e=>!!e&&typeof e=="object"&&e[oe]===ye,Rt=e=>!!e&&typeof e=="object"&&e[oe]===Qe;function M(e){if(e&&typeof e=="object")switch(e[oe]){case Ae:case Qe:return!0}return!1}function H(e){if(e&&typeof e=="object")switch(e[oe]){case Tr:case Ae:case ye:case Qe:return!0}return!1}var Vn=e=>(R(e)||M(e))&&!!e.anchor,ze=Symbol("break visit"),Nc=Symbol("skip children"),Nt=Symbol("remove node");function tt(e,t){let a=qc(t);ya(e)?at(null,e.contents,a,Object.freeze([e]))===Nt&&(e.contents=null):at(null,e,a,Object.freeze([]))}tt.BREAK=ze,tt.SKIP=Nc,tt.REMOVE=Nt;function at(e,t,a,r){let s=Lc(e,t,a,r);if(H(s)||U(s))return Bc(e,r,s),at(e,s,a,r);if(typeof s!="symbol"){if(M(t)){r=Object.freeze(r.concat(t));for(let n=0;n<t.items.length;++n){let i=at(n,t.items[n],a,r);if(typeof i=="number")n=i-1;else{if(i===ze)return ze;i===Nt&&(t.items.splice(n,1),--n)}}}else if(U(t)){r=Object.freeze(r.concat(t));let n=at("key",t.key,a,r);if(n===ze)return ze;n===Nt&&(t.key=null);let i=at("value",t.value,a,r);if(i===ze)return ze;i===Nt&&(t.value=null)}}return s}function qc(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 Lc(e,t,a,r){if(typeof a=="function")return a(e,t,r);if(jt(t))return a.Map?.(e,t,r);if(Rt(t))return a.Seq?.(e,t,r);if(U(t))return a.Pair?.(e,t,r);if(R(t))return a.Scalar?.(e,t,r);if(et(t))return a.Alias?.(e,t,r)}function Bc(e,t,a){let r=t[t.length-1];if(M(r))r.items[e]=a;else if(U(r))e==="key"?r.key=a:r.value=a;else if(ya(r))r.contents=a;else{let s=et(r)?"alias":"scalar";throw Error(`Cannot replace node with ${s} parent`)}}var Ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},zc=e=>e.replace(/[!,[\]{}]/g,t=>Ic[t]),rt=class $e{constructor(t,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},$e.defaultYaml,t),this.tags=Object.assign({},$e.defaultTags,a)}clone(){let t=new $e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new $e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:$e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},$e.defaultTags)}return t}add(t,a){this.atNextDocument&&=(this.yaml={explicit:$e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},$e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[n,i]=r;return this.tags[n]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;let[n]=r;if(n==="1.1"||n==="1.2")return this.yaml.version=n,!0;{let i=/^\d+\.\d+$/.test(n);return a(6,`Unsupported YAML version ${n}`,i),!1}}default:return a(0,`Unknown directive ${s}`,!0),!1}}tagName(t,a){if(t==="!")return"!";if(t[0]!=="!")return a(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let i=t.slice(2,-1);return i==="!"||i==="!!"?(a(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&a("Verbatim tags must end with a >"),i)}let[,r,s]=t.match(/^(.*!)([^!]*)$/s);s||a(`The ${t} tag has no suffix`);let n=this.tags[r];if(n)try{return n+decodeURIComponent(s)}catch(i){return a(String(i)),null}return r==="!"?t:(a(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[a,r]of Object.entries(this.tags))if(t.startsWith(r))return a+zc(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(t&&r.length>0&&H(t.contents)){let n={};tt(t.contents,(i,o)=>{H(o)&&o.tag&&(n[o.tag]=!0)}),s=Object.keys(n)}else s=[];for(let[n,i]of r)(n!=="!!"||i!=="tag:yaml.org,2002:")&&(!t||s.some(o=>o.startsWith(i)))&&a.push(`%TAG ${n} ${i}`);return a.join(`
`)}};rt.defaultYaml={explicit:!1,version:"1.2"},rt.defaultTags={"!!":"tag:yaml.org,2002:"};function Kn(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 Zn(e){let t=new Set;return tt(e,{Value(a,r){r.anchor&&t.add(r.anchor)}}),t}function Jn(e,t){for(let a=1;;++a){let r=`${e}${a}`;if(!t.has(r))return r}}function Pc(e,t){let a=[],r=new Map,s=null;return{onAnchor:n=>{a.push(n),s??=Zn(e);let i=Jn(t,s);return s.add(i),i},setAnchors:()=>{for(let n of a){let i=r.get(n);if(typeof i=="object"&&i.anchor&&(R(i.node)||M(i.node)))i.node.anchor=i.anchor;else{let o=Error("Failed to resolve repeated object (this should not happen)");throw o.source=n,o}}},sourceObjects:r}}function st(e,t,a,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,n=r.length;s<n;++s){let i=r[s],o=st(e,r,String(s),i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}else if(r instanceof Map)for(let s of Array.from(r.keys())){let n=r.get(s),i=st(e,r,s,n);i===void 0?r.delete(s):i!==n&&r.set(s,i)}else if(r instanceof Set)for(let s of Array.from(r)){let n=st(e,r,s,s);n===void 0?r.delete(s):n!==s&&(r.delete(s),r.add(n))}else for(let[s,n]of Object.entries(r)){let i=st(e,r,s,n);i===void 0?delete r[s]:i!==n&&(r[s]=i)}return e.call(t,a,r)}function le(e,t,a){if(Array.isArray(e))return e.map((r,s)=>le(r,String(s),a));if(e&&typeof e.toJSON=="function"){if(!a||!Vn(e))return e.toJSON(t,a);let r={aliasCount:0,count:1,res:void 0};a.anchors.set(e,r),a.onCreate=n=>{r.res=n,delete a.onCreate};let s=e.toJSON(t,a);return a.onCreate&&a.onCreate(s),s}return typeof e=="bigint"&&!a?.keep?Number(e):e}var Or=class{constructor(e){Object.defineProperty(this,oe,{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:a,onAnchor:r,reviver:s}={}){if(!ya(e))throw TypeError("A document argument is required");let n={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},i=le(this,"",n);if(typeof r=="function")for(let{count:o,res:l}of n.anchors.values())r(l,o);return typeof s=="function"?st(s,{"":i},"",i):i}},_r=class extends Or{constructor(e){super(Tr),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 a;t?.aliasResolveCache?a=t.aliasResolveCache:(a=[],tt(e,{Node:(s,n)=>{(et(n)||Vn(n))&&a.push(n)}}),t&&(t.aliasResolveCache=a));let r;for(let s of a){if(s===this)break;s.anchor===this.source&&(r=s)}if(r&&t){let{anchors:s,doc:n,maxAliasCount:i}=t,o=s.get(r);if(o||=(le(r,null,t),s.get(r)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=ga(n,r,s)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return r}toJSON(e,t){if(!t)return{source:this.source};let a=this.resolve(t.doc,t);if(!a){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(r)}return t.anchors.get(a).res}toString(e,t,a){let r=`*${this.source}`;if(e){if(Kn(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`${r} `}return r}};function ga(e,t,a){if(et(t)){let r=t.resolve(e),s=a&&r&&a.get(r);return s?s.count*s.aliasCount:0}if(M(t)){let r=0;for(let s of t.items){let n=ga(e,s,a);n>r&&(r=n)}return r}if(U(t)){let r=ga(e,t.key,a),s=ga(e,t.value,a);return Math.max(r,s)}return 1}var Gn=e=>!e||typeof e!="function"&&typeof e!="object",D=class extends Or{constructor(e){super(ye),this.value=e}toJSON(e,t){return t?.keep?this.value:le(this.value,e,t)}toString(){return String(this.value)}};D.BLOCK_FOLDED="BLOCK_FOLDED",D.BLOCK_LITERAL="BLOCK_LITERAL",D.PLAIN="PLAIN",D.QUOTE_DOUBLE="QUOTE_DOUBLE",D.QUOTE_SINGLE="QUOTE_SINGLE";var Uc="tag:yaml.org,2002:";function Mc(e,t,a){if(t){let r=a.filter(n=>n.tag===t),s=r.find(n=>!n.format)??r[0];if(!s)throw Error(`Tag ${t} not found`);return s}return a.find(r=>r.identify?.(e)&&!r.format)}function qt(e,t,a){if(ya(e)&&(e=e.contents),H(e))return e;if(U(e)){let u=a.schema[Ae].createNode?.(a.schema,null,a);return u.items.push(e),u}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:s,onTagObj:n,schema:i,sourceObjects:o}=a,l;if(r&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=s(e)),new _r(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=Uc+t.slice(2));let c=Mc(e,t,i.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let u=new D(e);return l&&(l.node=u),u}c=e instanceof Map?i[Ae]:Symbol.iterator in Object(e)?i[Qe]:i[Ae]}n&&(n(c),delete a.onTagObj);let d=c?.createNode?c.createNode(a.schema,e,a):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(a.schema,e,a):new D(e);return t?d.tag=t:c.default||(d.tag=c.tag),l&&(l.node=d),d}function ba(e,t,a){let r=a;for(let s=t.length-1;s>=0;--s){let n=t[s];if(typeof n=="number"&&Number.isInteger(n)&&n>=0){let i=[];i[n]=r,r=i}else r=new Map([[n,r]])}return qt(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Lt=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Xn=class extends Or{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(a=>H(a)||U(a)?a.clone(e):a),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Lt(e))this.add(t);else{let[a,...r]=e,s=this.get(a,!0);if(M(s))s.addIn(r,t);else if(s===void 0&&this.schema)this.set(a,ba(this.schema,r,t));else throw Error(`Expected YAML collection at ${a}. Remaining path: ${r}`)}}deleteIn(e){let[t,...a]=e;if(a.length===0)return this.delete(t);let r=this.get(t,!0);if(M(r))return r.deleteIn(a);throw Error(`Expected YAML collection at ${t}. Remaining path: ${a}`)}getIn(e,t){let[a,...r]=e,s=this.get(a,!0);return r.length===0?!t&&R(s)?s.value:s:M(s)?s.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!U(t))return!1;let a=t.value;return a==null||e&&R(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(e){let[t,...a]=e;if(a.length===0)return this.has(t);let r=this.get(t,!0);return M(r)?r.hasIn(a):!1}setIn(e,t){let[a,...r]=e;if(r.length===0)this.set(a,t);else{let s=this.get(a,!0);if(M(s))s.setIn(r,t);else if(s===void 0&&this.schema)this.set(a,ba(this.schema,r,t));else throw Error(`Expected YAML collection at ${a}. Remaining path: ${r}`)}}},Hc=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function xe(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Pe=(e,t,a)=>e.endsWith(`
`)?xe(a,t):a.includes(`
`)?`
`+xe(a,t):(e.endsWith(" ")?"":" ")+a,Yn="flow",Wc="block",Vc="quoted";function va(e,t,a="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:n=20,onFold:i,onOverflow:o}={}){if(!s||s<0)return e;s<n&&(n=0);let l=Math.max(1+n,1+s-t.length);if(e.length<=l)return e;let c=[],d={},u=s-t.length;typeof r=="number"&&(r>s-Math.max(2,n)?c.push(0):u=s-r);let h,m,y=!1,f=-1,b=-1,x=-1;a==="block"&&(f=Qn(e,f,t.length),f!==-1&&(u=f+l));for(let k;k=e[f+=1];){if(a==="quoted"&&k==="\\"){switch(b=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}x=f}if(k===`
`)a==="block"&&(f=Qn(e,f,t.length)),u=f+t.length+l,h=void 0;else{if(k===" "&&m&&m!==" "&&m!==`
`&&m!=="	"){let g=e[f+1];g&&g!==" "&&g!==`
`&&g!=="	"&&(h=f)}if(f>=u)if(h)c.push(h),u=h+l,h=void 0;else if(a==="quoted"){for(;m===" "||m==="	";)m=k,k=e[f+=1],y=!0;let g=f>x+1?f-2:b-1;if(d[g])return e;c.push(g),d[g]=!0,u=g+l,h=void 0}else y=!0}m=k}if(y&&o&&o(),c.length===0)return e;i&&i();let v=e.slice(0,c[0]);for(let k=0;k<c.length;++k){let g=c[k],w=c[k+1]||e.length;g===0?v=`
${t}${e.slice(0,w)}`:(a==="quoted"&&d[g]&&(v+=`${e[g]}\\`),v+=`
${t}${e.slice(g+1,w)}`)}return v}function Qn(e,t,a){let r=t,s=t+1,n=e[s];for(;n===" "||n==="	";)if(t<s+a)n=e[++t];else{do n=e[++t];while(n&&n!==`
`);r=t,s=t+1,n=e[s]}return r}var xa=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),wa=e=>/^(%|---|\.\.\.)/m.test(e);function Kc(e,t,a){if(!t||t<0)return!1;let r=t-a,s=e.length;if(s<=r)return!1;for(let n=0,i=0;n<s;++n)if(e[n]===`
`){if(n-i>r)return!0;if(i=n+1,s-i<=r)return!1}return!0}function Bt(e,t){let a=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return a;let{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,n=t.indent||(wa(e)?"  ":""),i="",o=0;for(let l=0,c=a[l];c;c=a[++l])if(c===" "&&a[l+1]==="\\"&&a[l+2]==="n"&&(i+=a.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(a[l+1]){case"u":{i+=a.slice(o,l);let d=a.substr(l+2,4);switch(d){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:d.substr(0,2)==="00"?i+="\\x"+d.substr(2):i+=a.substr(l,6)}l+=5,o=l+1}break;case"n":if(r||a[l+2]==='"'||a.length<s)l+=1;else{for(i+=a.slice(o,l)+`

`;a[l+2]==="\\"&&a[l+3]==="n"&&a[l+4]!=='"';)i+=`
`,l+=2;i+=n,a[l+2]===" "&&(i+="\\"),l+=1,o=l+1}break;default:l+=1}return i=o?i+a.slice(o):a,r?i:va(i,n,Vc,xa(t,!1))}function jr(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return Bt(e,t);let a=t.indent||(wa(e)?"  ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${a}`)+"'";return t.implicitKey?r:va(r,a,Yn,xa(t,!1))}function nt(e,t){let{singleQuote:a}=t.options,r;if(a===!1)r=Bt;else{let s=e.includes('"'),n=e.includes("'");r=s&&!n?jr:n&&!s?Bt:a?jr:Bt}return r(e,t)}var Rr;try{Rr=RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{Rr=/\n+(?!\n|$)/g}function ka({comment:e,type:t,value:a},r,s,n){let{blockQuote:i,commentString:o,lineWidth:l}=r.options;if(!i||/\n[\t ]+$/.test(a))return nt(a,r);let c=r.indent||(r.forceBlockIndent||wa(a)?"  ":""),d=i==="literal"?!0:i==="folded"||t===D.BLOCK_FOLDED?!1:t===D.BLOCK_LITERAL||!Kc(a,l,c.length);if(!a)return d?`|
`:`>
`;let u,h;for(h=a.length;h>0;--h){let g=a[h-1];if(g!==`
`&&g!=="	"&&g!==" ")break}let m=a.substring(h),y=m.indexOf(`
`);y===-1?u="-":a===m||y!==m.length-1?(u="+",n&&n()):u="",m&&=(a=a.slice(0,-m.length),m[m.length-1]===`
`&&(m=m.slice(0,-1)),m.replace(Rr,`$&${c}`));let f=!1,b,x=-1;for(b=0;b<a.length;++b){let g=a[b];if(g===" ")f=!0;else if(g===`
`)x=b;else break}let v=a.substring(0,x<b?x+1:b);v&&=(a=a.substring(v.length),v.replace(/\n+/g,`$&${c}`));let k=(f?c?"2":"1":"")+u;if(e&&(k+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!d){let g=a.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),w=!1,$=xa(r,!0);i!=="folded"&&t!==D.BLOCK_FOLDED&&($.onOverflow=()=>{w=!0});let A=va(`${v}${g}${m}`,c,Wc,$);if(!w)return`>${k}
${c}${A}`}return a=a.replace(/\n+/g,`$&${c}`),`|${k}
${c}${v}${a}${m}`}function Zc(e,t,a,r){let{type:s,value:n}=e,{actualString:i,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&n.includes(`
`)||d&&/[[\]{},]/.test(n))return nt(n,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(n))return o||d||!n.includes(`
`)?nt(n,t):ka(e,t,a,r);if(!o&&!d&&s!==D.PLAIN&&n.includes(`
`))return ka(e,t,a,r);if(wa(n)){if(l==="")return t.forceBlockIndent=!0,ka(e,t,a,r);if(o&&l===c)return nt(n,t)}let u=n.replace(/\n+/g,`$&
${l}`);if(i){let h=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(u),{compat:m,tags:y}=t.doc.schema;if(y.some(h)||m?.some(h))return nt(n,t)}return o?u:va(u,l,Yn,xa(t,!1))}function Nr(e,t,a,r){let{implicitKey:s,inFlow:n}=t,i=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==D.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(o=D.QUOTE_DOUBLE);let l=d=>{switch(d){case D.BLOCK_FOLDED:case D.BLOCK_LITERAL:return s||n?nt(i.value,t):ka(i,t,a,r);case D.QUOTE_DOUBLE:return Bt(i.value,t);case D.QUOTE_SINGLE:return jr(i.value,t);case D.PLAIN:return Zc(i,t,a,r);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:u}=t.options,h=s&&d||u;if(c=l(h),c===null)throw Error(`Unsupported default string type ${h}`)}return c}function ei(e,t){let a=Object.assign({blockQuote:!0,commentString:Hc,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(a.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):"  ",inFlow:r,options:a}}function Jc(e,t){if(t.tag){let s=e.filter(n=>n.tag===t.tag);if(s.length>0)return s.find(n=>n.format===t.format)??s[0]}let a,r;if(R(t)){r=t.value;let s=e.filter(n=>n.identify?.(r));if(s.length>1){let n=s.filter(i=>i.test);n.length>0&&(s=n)}a=s.find(n=>n.format===t.format)??s.find(n=>!n.format)}else r=t,a=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!a){let s=r?.constructor?.name??(r===null?"null":typeof r);throw Error(`Tag not resolved for ${s} value`)}return a}function Gc(e,t,{anchors:a,doc:r}){if(!r.directives)return"";let s=[],n=(R(e)||M(e))&&e.anchor;n&&Kn(n)&&(a.add(n),s.push(`&${n}`));let i=e.tag??(t.default?null:t.tag);return i&&s.push(r.directives.tagString(i)),s.join(" ")}function it(e,t,a,r){if(U(e))return e.toString(t,a,r);if(et(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,n=H(e)?e:t.doc.createNode(e,{onTagObj:l=>s=l});s??=Jc(t.doc.schema.tags,n);let i=Gc(n,s,t);i.length>0&&(t.indentAtStart=(t.indentAtStart??0)+i.length+1);let o=typeof s.stringify=="function"?s.stringify(n,t,a,r):R(n)?Nr(n,t,a,r):n.toString(t,a,r);return i?R(n)||o[0]==="{"||o[0]==="["?`${i} ${o}`:`${i}
${t.indent}${o}`:o}function Xc({key:e,value:t},a,r,s){let{allNullValues:n,doc:i,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=a,h=H(e)&&e.comment||null;if(u){if(h)throw Error("With simple keys, key nodes cannot have comments");if(M(e)||!H(e)&&typeof e=="object")throw Error("With simple keys, collection cannot be used as a key value")}let m=!u&&(!e||h&&t==null&&!a.inFlow||M(e)||(R(e)?e.type===D.BLOCK_FOLDED||e.type===D.BLOCK_LITERAL:typeof e=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!m&&(u||!n),indent:o+l});let y=!1,f=!1,b=it(e,a,()=>y=!0,()=>f=!0);if(!m&&!a.inFlow&&b.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(a.inFlow){if(n||t==null)return y&&r&&r(),b===""?"?":m?`? ${b}`:b}else if(n&&!u||t==null&&m)return b=`? ${b}`,h&&!y?b+=Pe(b,a.indent,c(h)):f&&s&&s(),b;y&&(h=null),m?(h&&(b+=Pe(b,a.indent,c(h))),b=`? ${b}
${o}:`):(b=`${b}:`,h&&(b+=Pe(b,a.indent,c(h))));let x,v,k;H(t)?(x=!!t.spaceBefore,v=t.commentBefore,k=t.comment):(x=!1,v=null,k=null,t&&typeof t=="object"&&(t=i.createNode(t))),a.implicitKey=!1,!m&&!h&&R(t)&&(a.indentAtStart=b.length+1),f=!1,!d&&l.length>=2&&!a.inFlow&&!m&&Rt(t)&&!t.flow&&!t.tag&&!t.anchor&&(a.indent=a.indent.substring(2));let g=!1,w=it(t,a,()=>g=!0,()=>f=!0),$=" ";if(h||x||v){if($=x?`
`:"",v){let A=c(v);$+=`
${xe(A,a.indent)}`}w===""&&!a.inFlow?$===`
`&&k&&($=`

`):$+=`
${a.indent}`}else if(!m&&M(t)){let A=w[0],S=w.indexOf(`
`),_=S!==-1,N=a.inFlow??t.flow??t.items.length===0;if(_||!N){let C=!1;if(_&&(A==="&"||A==="!")){let q=w.indexOf(" ");A==="&"&&q!==-1&&q<S&&w[q+1]==="!"&&(q=w.indexOf(" ",q+1)),(q===-1||S<q)&&(C=!0)}C||($=`
${a.indent}`)}}else(w===""||w[0]===`
`)&&($="");return b+=$+w,a.inFlow?g&&r&&r():k&&!g?b+=Pe(b,a.indent,c(k)):f&&s&&s(),b}function $u(e,t){}var $a="<<",we={identify:e=>e===$a||typeof e=="symbol"&&e.description===$a,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new D(Symbol($a)),{addToJSMap:ti}),stringify:()=>$a},Yc=(e,t)=>(we.identify(t)||R(t)&&(!t.type||t.type===D.PLAIN)&&we.identify(t.value))&&e?.doc.schema.tags.some(a=>a.tag===we.tag&&a.default);function ti(e,t,a){let r=ai(e,a);if(Rt(r))for(let s of r.items)qr(e,t,s);else if(Array.isArray(r))for(let s of r)qr(e,t,s);else qr(e,t,r)}function qr(e,t,a){let r=ai(e,a);if(!jt(r))throw Error("Merge sources must be maps or map aliases");let s=r.toJSON(null,e,Map);for(let[n,i]of s)t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function ai(e,t){return e&&et(t)?t.resolve(e.doc,e):t}function ri(e,t,{key:a,value:r}){if(H(a)&&a.addToJSMap)a.addToJSMap(e,t,r);else if(Yc(e,a))ti(e,t,r);else{let s=le(a,"",e);if(t instanceof Map)t.set(s,le(r,s,e));else if(t instanceof Set)t.add(s);else{let n=Qc(a,s,e),i=le(r,n,e);n in t?Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[n]=i}}return t}function Qc(e,t,a){if(t===null)return"";if(typeof t!="object")return String(t);if(H(e)&&a?.doc){let r=ei(a.doc,{});r.anchors=new Set;for(let n of a.anchors.keys())r.anchors.add(n.anchor);r.inFlow=!0,r.inStringifyKey=!0;let s=e.toString(r);if(!a.mapKeyWarned){let n=JSON.stringify(s);n.length>40&&(n=n.substring(0,36)+'..."'),a.doc.options.logLevel,`${n}`,a.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Lr(e,t,a){return new te(qt(e,void 0,a),qt(t,void 0,a))}var te=class zo{constructor(t,a=null){Object.defineProperty(this,oe,{value:Wn}),this.key=t,this.value=a}clone(t){let{key:a,value:r}=this;return H(a)&&(a=a.clone(t)),H(r)&&(r=r.clone(t)),new zo(a,r)}toJSON(t,a){return ri(a,a?.mapAsMap?new Map:{},this)}toString(t,a,r){return t?.doc?Xc(this,t,a,r):JSON.stringify(this)}};function si(e,t,a){return(t.inFlow??e.flow?td:ed)(e,t,a)}function ed({comment:e,items:t},a,{blockItemPrefix:r,flowChars:s,itemIndent:n,onChompKeep:i,onComment:o}){let{indent:l,options:{commentString:c}}=a,d=Object.assign({},a,{indent:n,type:null}),u=!1,h=[];for(let y=0;y<t.length;++y){let f=t[y],b=null;if(H(f))!u&&f.spaceBefore&&h.push(""),Sa(a,h,f.commentBefore,u),f.comment&&(b=f.comment);else if(U(f)){let v=H(f.key)?f.key:null;v&&(!u&&v.spaceBefore&&h.push(""),Sa(a,h,v.commentBefore,u))}u=!1;let x=it(f,d,()=>b=null,()=>u=!0);b&&(x+=Pe(x,n,c(b))),u&&b&&(u=!1),h.push(r+x)}let m;if(h.length===0)m=s.start+s.end;else{m=h[0];for(let y=1;y<h.length;++y){let f=h[y];m+=f?`
${l}${f}`:`
`}}return e?(m+=`
`+xe(c(e),l),o&&o()):u&&i&&i(),m}function td({items:e},t,{flowChars:a,itemIndent:r}){let{indent:s,indentStep:n,flowCollectionPadding:i,options:{commentString:o}}=t;r+=n;let l=Object.assign({},t,{indent:r,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let y=0;y<e.length;++y){let f=e[y],b=null;if(H(f))f.spaceBefore&&u.push(""),Sa(t,u,f.commentBefore,!1),f.comment&&(b=f.comment);else if(U(f)){let v=H(f.key)?f.key:null;v&&(v.spaceBefore&&u.push(""),Sa(t,u,v.commentBefore,!1),v.comment&&(c=!0));let k=H(f.value)?f.value:null;k?(k.comment&&(b=k.comment),k.commentBefore&&(c=!0)):f.value==null&&v?.comment&&(b=v.comment)}b&&(c=!0);let x=it(f,l,()=>b=null);c||=u.length>d||x.includes(`
`),y<e.length-1?x+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||=u.reduce((v,k)=>v+k.length+2,2)+(x.length+2)>t.options.lineWidth),c&&(x+=",")),b&&(x+=Pe(x,r,o(b))),u.push(x),d=u.length}let{start:h,end:m}=a;if(u.length===0)return h+m;if(!c){let y=u.reduce((f,b)=>f+b.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=h;for(let f of u)y+=f?`
${n}${s}${f}`:`
`;return`${y}
${s}${m}`}return`${h}${i}${u.join(" ")}${i}${m}`}function Sa({indent:e,options:{commentString:t}},a,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){let n=xe(t(r),e);a.push(n.trimStart())}}function Ue(e,t){let a=R(t)?t.value:t;for(let r of e)if(U(r)&&(r.key===t||r.key===a||R(r.key)&&r.key.value===a))return r}var ce=class extends Xn{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ae,e),this.items=[]}static from(e,t,a){let{keepUndefined:r,replacer:s}=a,n=new this(e),i=(o,l)=>{if(typeof s=="function")l=s.call(t,o,l);else if(Array.isArray(s)&&!s.includes(o))return;(l!==void 0||r)&&n.items.push(Lr(o,l,a))};if(t instanceof Map)for(let[o,l]of t)i(o,l);else if(t&&typeof t=="object")for(let o of Object.keys(t))i(o,t[o]);return typeof e.sortMapEntries=="function"&&n.items.sort(e.sortMapEntries),n}add(e,t){let a;a=U(e)?e:!e||typeof e!="object"||!("key"in e)?new te(e,e?.value):new te(e.key,e.value);let r=Ue(this.items,a.key),s=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${a.key} already set`);R(r.value)&&Gn(a.value)?r.value.value=a.value:r.value=a.value}else if(s){let n=this.items.findIndex(i=>s(a,i)<0);n===-1?this.items.push(a):this.items.splice(n,0,a)}else this.items.push(a)}delete(e){let t=Ue(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let a=Ue(this.items,e)?.value;return(!t&&R(a)?a.value:a)??void 0}has(e){return!!Ue(this.items,e)}set(e,t){this.add(new te(e,t),!0)}toJSON(e,t,a){let r=a?new a:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let s of this.items)ri(t,r,s);return r}toString(e,t,a){if(!e)return JSON.stringify(this);for(let r of this.items)if(!U(r))throw Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),si(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:a,onComment:t})}},ot={collection:"map",default:!0,nodeClass:ce,tag:"tag:yaml.org,2002:map",resolve(e,t){return jt(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,a)=>ce.from(e,t,a)},Me=class extends Xn{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Qe,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ea(e);return typeof t=="number"&&this.items.splice(t,1).length>0}get(e,t){let a=Ea(e);if(typeof a!="number")return;let r=this.items[a];return!t&&R(r)?r.value:r}has(e){let t=Ea(e);return typeof t=="number"&&t<this.items.length}set(e,t){let a=Ea(e);if(typeof a!="number")throw Error(`Expected a valid index, not ${e}.`);let r=this.items[a];R(r)&&Gn(t)?r.value=t:this.items[a]=t}toJSON(e,t){let a=[];t?.onCreate&&t.onCreate(a);let r=0;for(let s of this.items)a.push(le(s,String(r++),t));return a}toString(e,t,a){return e?si(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:a,onComment:t}):JSON.stringify(this)}static from(e,t,a){let{replacer:r}=a,s=new this(e);if(t&&Symbol.iterator in Object(t)){let n=0;for(let i of t){if(typeof r=="function"){let o=t instanceof Set?i:String(n++);i=r.call(t,o,i)}s.items.push(qt(i,void 0,a))}}return s}};function Ea(e){let t=R(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}var lt={collection:"seq",default:!0,nodeClass:Me,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Rt(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,a)=>Me.from(e,t,a)},Aa={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,a,r){return t=Object.assign({actualString:!0},t),Nr(e,t,a,r)}},Da={identify:e=>e==null,createNode:()=>new D(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new D(null),stringify:({source:e},t)=>typeof e=="string"&&Da.test.test(e)?e:t.options.nullStr},Br={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new D(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},a){return e&&Br.test.test(e)&&t===(e[0]==="t"||e[0]==="T")?e:t?a.options.trueStr:a.options.falseStr}};function me({format:e,minFractionDigits:t,tag:a,value:r}){if(typeof r=="bigint")return String(r);let s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let n=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!a||a==="tag:yaml.org,2002:float")&&/^-?\d/.test(n)&&!n.includes("e")){let i=n.indexOf(".");i<0&&(i=n.length,n+=".");let o=t-(n.length-i-1);for(;o-- >0;)n+="0"}return n}var ni={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:me},ii={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():me(e)}},oi={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 D(parseFloat(e)),a=e.indexOf(".");return a!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-a-1),t},stringify:me},Ca=e=>typeof e=="bigint"||Number.isInteger(e),Ir=(e,t,a,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),a);function li(e,t,a){let{value:r}=e;return Ca(r)&&r>=0?a+r.toString(t):me(e)}var ci={identify:e=>Ca(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,a)=>Ir(e,2,8,a),stringify:e=>li(e,8,"0o")},di={identify:Ca,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,a)=>Ir(e,0,10,a),stringify:me},pi={identify:e=>Ca(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,a)=>Ir(e,2,16,a),stringify:e=>li(e,16,"0x")},ad=[ot,lt,Aa,Da,Br,ci,di,pi,ni,ii,oi];function ui(e){return typeof e=="bigint"||Number.isInteger(e)}var Ta=({value:e})=>JSON.stringify(e),rd=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Ta},{identify:e=>e==null,createNode:()=>new D(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ta},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Ta},{identify:ui,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:a})=>a?BigInt(e):parseInt(e,10),stringify:({value:e})=>ui(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:Ta}],sd=[ot,lt].concat(rd,{default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),zr={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let a=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(a.length);for(let s=0;s<a.length;++s)r[s]=a.charCodeAt(s);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:a},r,s,n){if(!a)return"";let i=a,o;if(typeof btoa=="function"){let l="";for(let c=0;c<i.length;++c)l+=String.fromCharCode(i[c]);o=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??=D.BLOCK_LITERAL,t!==D.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(o.length/l),d=Array(c);for(let u=0,h=0;u<c;++u,h+=l)d[u]=o.substr(h,l);o=d.join(t===D.BLOCK_LITERAL?`
`:" ")}return Nr({comment:e,type:t,value:o},r,s,n)}};function hi(e,t){if(Rt(e))for(let a=0;a<e.items.length;++a){let r=e.items[a];if(!U(r)){if(jt(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let s=r.items[0]||new te(new D(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
${s.key.commentBefore}`:r.commentBefore),r.comment){let n=s.value??s.key;n.comment=n.comment?`${r.comment}
${n.comment}`:r.comment}r=s}e.items[a]=U(r)?r:new te(r)}}else t("Expected a sequence for this tag");return e}function mi(e,t,a){let{replacer:r}=a,s=new Me(e);s.tag="tag:yaml.org,2002:pairs";let n=0;if(t&&Symbol.iterator in Object(t))for(let i of t){typeof r=="function"&&(i=r.call(t,String(n++),i));let o,l;if(Array.isArray(i))if(i.length===2)o=i[0],l=i[1];else throw TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){let c=Object.keys(i);if(c.length===1)o=c[0],l=i[o];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=i;s.items.push(Lr(o,l,a))}return s}var Pr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:hi,createNode:mi},Fa=class Po extends Me{constructor(){super(),this.add=ce.prototype.add.bind(this),this.delete=ce.prototype.delete.bind(this),this.get=ce.prototype.get.bind(this),this.has=ce.prototype.has.bind(this),this.set=ce.prototype.set.bind(this),this.tag=Po.tag}toJSON(t,a){if(!a)return super.toJSON(t);let r=new Map;a?.onCreate&&a.onCreate(r);for(let s of this.items){let n,i;if(U(s)?(n=le(s.key,"",a),i=le(s.value,n,a)):n=le(s,"",a),r.has(n))throw Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}static from(t,a,r){let s=mi(t,a,r),n=new this;return n.items=s.items,n}};Fa.tag="tag:yaml.org,2002:omap";var Ur={collection:"seq",identify:e=>e instanceof Map,nodeClass:Fa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let a=hi(e,t),r=[];for(let{key:s}of a.items)R(s)&&(r.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Fa,a)},createNode:(e,t,a)=>Fa.from(e,t,a)};function fi({value:e,source:t},a){return t&&(e?yi:gi).test.test(t)?t:e?a.options.trueStr:a.options.falseStr}var yi={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 D(!0),stringify:fi},gi={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 D(!1),stringify:fi},nd={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:me},id={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():me(e)}},od={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 D(parseFloat(e.replace(/_/g,""))),a=e.indexOf(".");if(a!==-1){let r=e.substring(a+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:me},It=e=>typeof e=="bigint"||Number.isInteger(e);function Oa(e,t,a,{intAsBigInt:r}){let s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(a){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let i=BigInt(e);return s==="-"?BigInt(-1)*i:i}let n=parseInt(e,a);return s==="-"?-1*n:n}function Mr(e,t,a){let{value:r}=e;if(It(r)){let s=r.toString(t);return r<0?"-"+a+s.substr(1):a+s}return me(e)}var ld={identify:It,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,a)=>Oa(e,2,2,a),stringify:e=>Mr(e,2,"0b")},cd={identify:It,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,a)=>Oa(e,1,8,a),stringify:e=>Mr(e,8,"0")},dd={identify:It,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,a)=>Oa(e,0,10,a),stringify:me},pd={identify:It,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,a)=>Oa(e,2,16,a),stringify:e=>Mr(e,16,"0x")},_a=class Uo extends ce{constructor(t){super(t),this.tag=Uo.tag}add(t){let a;a=U(t)?t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?new te(t.key,null):new te(t,null),Ue(this.items,a.key)||this.items.push(a)}get(t,a){let r=Ue(this.items,t);return!a&&U(r)?R(r.key)?r.key.value:r.key:r}set(t,a){if(typeof a!="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);let r=Ue(this.items,t);r&&!a?this.items.splice(this.items.indexOf(r),1):!r&&a&&this.items.push(new te(t))}toJSON(t,a){return super.toJSON(t,a,Set)}toString(t,a,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),a,r);throw Error("Set items must all have null values")}static from(t,a,r){let{replacer:s}=r,n=new this(t);if(a&&Symbol.iterator in Object(a))for(let i of a)typeof s=="function"&&(i=s.call(a,i,i)),n.items.push(Lr(i,null,r));return n}};_a.tag="tag:yaml.org,2002:set";var Hr={collection:"map",identify:e=>e instanceof Set,nodeClass:_a,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,a)=>_a.from(e,t,a),resolve(e,t){if(jt(e)){if(e.hasAllNullValues(!0))return Object.assign(new _a,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Wr(e,t){let a=e[0],r=a==="-"||a==="+"?e.substring(1):e,s=i=>t?BigInt(i):Number(i),n=r.replace(/_/g,"").split(":").reduce((i,o)=>i*s(60)+s(o),s(0));return a==="-"?s(-1)*n:n}function bi(e){let{value:t}=e,a=i=>i;if(typeof t=="bigint")a=i=>BigInt(i);else if(isNaN(t)||!isFinite(t))return me(e);let r="";t<0&&(r="-",t*=a(-1));let s=a(60),n=[t%s];return t<60?n.unshift(0):(t=(t-n[0])/s,n.unshift(t%s),t>=60&&(t=(t-n[0])/s,n.unshift(t))),r+n.map(i=>String(i).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var vi={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:a})=>Wr(e,a),stringify:bi},xi={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=>Wr(e,!1),stringify:bi},ja={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(ja.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,a,r,s,n,i,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(a,r-1,s,n||0,i||0,o||0,l),d=t[8];if(d&&d!=="Z"){let u=Wr(d,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},wi=[ot,lt,Aa,Da,yi,gi,ld,cd,dd,pd,nd,id,od,zr,we,Ur,Pr,Hr,vi,xi,ja],ki=new Map([["core",ad],["failsafe",[ot,lt,Aa]],["json",sd],["yaml11",wi],["yaml-1.1",wi]]),$i={binary:zr,bool:Br,float:oi,floatExp:ii,floatNaN:ni,floatTime:xi,int:di,intHex:pi,intOct:ci,intTime:vi,map:ot,merge:we,null:Da,omap:Ur,pairs:Pr,seq:lt,set:Hr,timestamp:ja},ud={"tag:yaml.org,2002:binary":zr,"tag:yaml.org,2002:merge":we,"tag:yaml.org,2002:omap":Ur,"tag:yaml.org,2002:pairs":Pr,"tag:yaml.org,2002:set":Hr,"tag:yaml.org,2002:timestamp":ja};function Vr(e,t,a){let r=ki.get(t);if(r&&!e)return a&&!r.includes(we)?r.concat(we):r.slice();let s=r;if(!s)if(Array.isArray(e))s=[];else{let n=Array.from(ki.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${n} or define customTags array`)}if(Array.isArray(e))for(let n of e)s=s.concat(n);else typeof e=="function"&&(s=e(s.slice()));return a&&(s=s.concat(we)),s.reduce((n,i)=>{let o=typeof i=="string"?$i[i]:i;if(!o){let l=JSON.stringify(i),c=Object.keys($i).map(d=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}return n.includes(o)||n.push(o),n},[])}var hd=(e,t)=>e.key<t.key?-1:+(e.key>t.key),md=class Mo{constructor({compat:t,customTags:a,merge:r,resolveKnownTags:s,schema:n,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(t)?Vr(t,"compat"):t?Vr(null,t):null,this.name=typeof n=="string"&&n||"core",this.knownTags=s?ud:{},this.tags=Vr(a,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Ae,{value:ot}),Object.defineProperty(this,ye,{value:Aa}),Object.defineProperty(this,Qe,{value:lt}),this.sortMapEntries=typeof i=="function"?i:i===!0?hd:null}clone(){let t=Object.create(Mo.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function fd(e,t){let a=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(a.push(l),r=!0):e.directives.docStart&&(r=!0)}r&&a.push("---");let s=ei(e,t),{commentString:n}=s.options;if(e.commentBefore){a.length!==1&&a.unshift("");let l=n(e.commentBefore);a.unshift(xe(l,""))}let i=!1,o=null;if(e.contents){if(H(e.contents)){if(e.contents.spaceBefore&&r&&a.push(""),e.contents.commentBefore){let d=n(e.contents.commentBefore);a.push(xe(d,""))}s.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>i=!0,c=it(e.contents,s,()=>o=null,l);o&&(c+=Pe(c,"",n(o))),(c[0]==="|"||c[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${c}`:a.push(c)}else a.push(it(e.contents,s));if(e.directives?.docEnd)if(e.comment){let l=n(e.comment);l.includes(`
`)?(a.push("..."),a.push(xe(l,""))):a.push(`... ${l}`)}else a.push("...");else{let l=e.comment;l&&i&&(l=l.replace(/^\n+/,"")),l&&((!i||o)&&a[a.length-1]!==""&&a.push(""),a.push(xe(n(l),"")))}return a.join(`
`)+`
`}var Si=class Ho{constructor(t,a,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,oe,{value:Fr});let s=null;typeof a=="function"||Array.isArray(a)?s=a:r===void 0&&a&&(r=a,a=void 0);let n=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=n;let{version:i}=n;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new rt({version:i}),this.setSchema(i,r),this.contents=t===void 0?null:this.createNode(t,s,r)}clone(){let t=Object.create(Ho.prototype,{[oe]:{value:Fr}});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=H(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){ct(this.contents)&&this.contents.add(t)}addIn(t,a){ct(this.contents)&&this.contents.addIn(t,a)}createAlias(t,a){if(!t.anchor){let r=Zn(this);t.anchor=!a||r.has(a)?Jn(a||"a",r):a}return new _r(t.anchor)}createNode(t,a,r){let s;if(typeof a=="function")t=a.call({"":t},"",t),s=a;else if(Array.isArray(a)){let b=a.filter(x=>typeof x=="number"||x instanceof String||x instanceof Number).map(String);b.length>0&&(a=a.concat(b)),s=a}else r===void 0&&a&&(r=a,a=void 0);let{aliasDuplicateObjects:n,anchorPrefix:i,flow:o,keepUndefined:l,onTagObj:c,tag:d}=r??{},{onAnchor:u,setAnchors:h,sourceObjects:m}=Pc(this,i||"a"),y={aliasDuplicateObjects:n??!0,keepUndefined:l??!1,onAnchor:u,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:m},f=qt(t,d,y);return o&&M(f)&&(f.flow=!0),h(),f}createPair(t,a,r={}){return new te(this.createNode(t,null,r),this.createNode(a,null,r))}delete(t){return ct(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Lt(t)?this.contents!=null&&(this.contents=null,!0):ct(this.contents)?this.contents.deleteIn(t):!1}get(t,a){return M(this.contents)?this.contents.get(t,a):void 0}getIn(t,a){return Lt(t)?!a&&R(this.contents)?this.contents.value:this.contents:M(this.contents)?this.contents.getIn(t,a):void 0}has(t){return M(this.contents)?this.contents.has(t):!1}hasIn(t){return Lt(t)?this.contents!==void 0:M(this.contents)?this.contents.hasIn(t):!1}set(t,a){this.contents==null?this.contents=ba(this.schema,[t],a):ct(this.contents)&&this.contents.set(t,a)}setIn(t,a){Lt(t)?this.contents=a:this.contents==null?this.contents=ba(this.schema,Array.from(t),a):ct(this.contents)&&this.contents.setIn(t,a)}setSchema(t,a={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new rt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new rt({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let s=JSON.stringify(t);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(a.schema instanceof Object)this.schema=a.schema;else if(r)this.schema=new md(Object.assign(r,a));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:a,mapAsMap:r,maxAliasCount:s,onAnchor:n,reviver:i}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=le(this.contents,a??"",o);if(typeof n=="function")for(let{count:c,res:d}of o.anchors.values())n(d,c);return typeof i=="function"?st(i,{"":l},"",l):l}toJSON(t,a){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:a})}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 a=JSON.stringify(t.indent);throw Error(`"indent" option must be a positive integer, not ${a}`)}return fd(this,t)}};function ct(e){if(M(e))return!0;throw Error("Expected a YAML collection as document contents")}var Ei=class extends Error{constructor(e,t,a,r){super(),this.name=e,this.code=a,this.message=r,this.pos=t}},zt=class extends Ei{constructor(e,t,a){super("YAMLParseError",e,t,a)}},yd=class extends Ei{constructor(e,t,a){super("YAMLWarning",e,t,a)}},Ai=(e,t)=>a=>{if(a.pos[0]===-1)return;a.linePos=a.pos.map(o=>t.linePos(o));let{line:r,col:s}=a.linePos[0];a.message+=` at line ${r}, column ${s}`;let n=s-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(n>=60&&i.length>80){let o=Math.min(n-39,i.length-79);i="\u2026"+i.substring(o),n-=o-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(i.substring(0,n))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
`),i=o+i}if(/[^ ]/.test(i)){let o=1,l=a.linePos[1];l?.line===r&&l.col>s&&(o=Math.max(1,Math.min(l.col-s,80-n)));let c=" ".repeat(n)+"^".repeat(o);a.message+=`:

${i}
${c}
`}};function dt(e,{flow:t,indicator:a,next:r,offset:s,onError:n,parentIndent:i,startOnNewline:o}){let l=!1,c=o,d=o,u="",h="",m=!1,y=!1,f=null,b=null,x=null,v=null,k=null,g=null,w=null;for(let S of e)switch(y&&=(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&n(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),!1),f&&=(c&&S.type!=="comment"&&S.type!=="newline"&&n(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),null),S.type){case"space":!t&&(a!=="doc-start"||r?.type!=="flow-collection")&&S.source.includes("	")&&(f=S),d=!0;break;case"comment":{d||n(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let _=S.source.substring(1)||" ";u?u+=h+_:u=_,h="",c=!1;break}case"newline":c?u?u+=S.source:(!g||a!=="seq-item-ind")&&(l=!0):h+=S.source,c=!0,m=!0,(b||x)&&(v=S),d=!0;break;case"anchor":b&&n(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&n(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=S,w??=S.offset,c=!1,d=!1,y=!0;break;case"tag":x&&n(S,"MULTIPLE_TAGS","A node can have at most one tag"),x=S,w??=S.offset,c=!1,d=!1,y=!0;break;case a:(b||x)&&n(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),g&&n(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${t??"collection"}`),g=S,c=a==="seq-item-ind"||a==="explicit-key-ind",d=!1;break;case"comma":if(t){k&&n(S,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=S,c=!1,d=!1;break}default:n(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),c=!1,d=!1}let $=e[e.length-1],A=$?$.offset+$.source.length:s;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&n(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(c&&f.indent<=i||r?.type==="block-map"||r?.type==="block-seq")&&n(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:g,spaceBefore:l,comment:u,hasNewline:m,anchor:b,tag:x,newlineAfterProp:v,end:A,start:w??A}}function Pt(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 a of t.start)if(a.type==="newline")return!0;if(t.sep){for(let a of t.sep)if(a.type==="newline")return!0}if(Pt(t.key)||Pt(t.value))return!0}return!1;default:return!0}}function Kr(e,t,a){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&Pt(t)&&a(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Di(e,t,a){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let s=typeof r=="function"?r:(n,i)=>n===i||R(n)&&R(i)&&n.value===i.value;return t.some(n=>s(n.key,a))}var Ci="All mapping items must start at the same column";function gd({composeNode:e,composeEmptyNode:t},a,r,s,n){let i=new(n?.nodeClass??ce)(a.schema);a.atRoot&&=!1;let o=r.offset,l=null;for(let c of r.items){let{start:d,key:u,sep:h,value:m}=c,y=dt(d,{indicator:"explicit-key-ind",next:u??h?.[0],offset:o,onError:s,parentIndent:r.indent,startOnNewline:!0}),f=!y.found;if(f){if(u&&(u.type==="block-seq"?s(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==r.indent&&s(o,"BAD_INDENT",Ci)),!y.anchor&&!y.tag&&!h){l=y.end,y.comment&&(i.comment?i.comment+=`
`+y.comment:i.comment=y.comment);continue}(y.newlineAfterProp||Pt(u))&&s(u??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else y.found?.indent!==r.indent&&s(o,"BAD_INDENT",Ci);a.atKey=!0;let b=y.end,x=u?e(a,u,y,s):t(a,b,d,null,y,s);a.schema.compat&&Kr(r.indent,u,s),a.atKey=!1,Di(a,i.items,x)&&s(b,"DUPLICATE_KEY","Map keys must be unique");let v=dt(h??[],{indicator:"map-value-ind",next:m,offset:x.range[2],onError:s,parentIndent:r.indent,startOnNewline:!u||u.type==="block-scalar"});if(o=v.end,v.found){f&&(m?.type==="block-map"&&!v.hasNewline&&s(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),a.options.strict&&y.start<v.found.offset-1024&&s(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=m?e(a,m,v,s):t(a,o,h,null,v,s);a.schema.compat&&Kr(r.indent,m,s),o=k.range[2];let g=new te(x,k);a.options.keepSourceTokens&&(g.srcToken=c),i.items.push(g)}else{f&&s(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(x.comment?x.comment+=`
`+v.comment:x.comment=v.comment);let k=new te(x);a.options.keepSourceTokens&&(k.srcToken=c),i.items.push(k)}}return l&&l<o&&s(l,"IMPOSSIBLE","Map comment with trailing content"),i.range=[r.offset,o,l??o],i}function bd({composeNode:e,composeEmptyNode:t},a,r,s,n){let i=new(n?.nodeClass??Me)(a.schema);a.atRoot&&=!1,a.atKey&&=!1;let o=r.offset,l=null;for(let{start:c,value:d}of r.items){let u=dt(c,{indicator:"seq-item-ind",next:d,offset:o,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||d)d?.type==="block-seq"?s(u.end,"BAD_INDENT","All sequence items must start at the same column"):s(o,"MISSING_CHAR","Sequence item without - indicator");else{l=u.end,u.comment&&(i.comment=u.comment);continue}let h=d?e(a,d,u,s):t(a,u.end,c,null,u,s);a.schema.compat&&Kr(r.indent,d,s),o=h.range[2],i.items.push(h)}return i.range=[r.offset,o,l??o],i}function Ut(e,t,a,r){let s="";if(e){let n=!1,i="";for(let o of e){let{source:l,type:c}=o;switch(c){case"space":n=!0;break;case"comment":{a&&!n&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";s?s+=i+d:s=d,i="";break}case"newline":s&&(i+=l),n=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:s,offset:t}}var Zr="Block collections are not allowed within flow collections",Jr=e=>e&&(e.type==="block-map"||e.type==="block-seq");function vd({composeNode:e,composeEmptyNode:t},a,r,s,n){let i=r.start.source==="{",o=i?"flow map":"flow sequence",l=new(n?.nodeClass??(i?ce:Me))(a.schema);l.flow=!0;let c=a.atRoot;c&&(a.atRoot=!1),a.atKey&&=!1;let d=r.offset+r.start.source.length;for(let f=0;f<r.items.length;++f){let b=r.items[f],{start:x,key:v,sep:k,value:g}=b,w=dt(x,{flow:o,indicator:"explicit-key-ind",next:v??k?.[0],offset:d,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!k&&!g){f===0&&w.comma?s(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):f<r.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}!i&&a.options.strict&&Pt(v)&&s(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(f===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 A of x)switch(A.type){case"comma":case"space":break;case"comment":$=A.source.substring(1);break e;default:break e}if($){let A=l.items[l.items.length-1];U(A)&&(A=A.value??A.key),A.comment?A.comment+=`
`+$:A.comment=$,w.comment=w.comment.substring($.length+1)}}if(!i&&!k&&!w.found){let $=g?e(a,g,w,s):t(a,w.end,k,null,w,s);l.items.push($),d=$.range[2],Jr(g)&&s($.range,"BLOCK_IN_FLOW",Zr)}else{a.atKey=!0;let $=w.end,A=v?e(a,v,w,s):t(a,$,x,null,w,s);Jr(v)&&s(A.range,"BLOCK_IN_FLOW",Zr),a.atKey=!1;let S=dt(k??[],{flow:o,indicator:"map-value-ind",next:g,offset:A.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(S.found){if(!i&&!w.found&&a.options.strict){if(k)for(let C of k){if(C===S.found)break;if(C.type==="newline"){s(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<S.found.offset-1024&&s(S.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else g&&("source"in g&&g.source?.[0]===":"?s(g,"MISSING_CHAR",`Missing space after : in ${o}`):s(S.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let _=g?e(a,g,S,s):S.found?t(a,S.end,k,null,S,s):null;_?Jr(g)&&s(_.range,"BLOCK_IN_FLOW",Zr):S.comment&&(A.comment?A.comment+=`
`+S.comment:A.comment=S.comment);let N=new te(A,_);if(a.options.keepSourceTokens&&(N.srcToken=b),i){let C=l;Di(a,C.items,A)&&s($,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(N)}else{let C=new ce(a.schema);C.flow=!0,C.items.push(N);let q=(_??A).range;C.range=[A.range[0],q[1],q[2]],l.items.push(C)}d=_?_.range[2]:S.end}}let u=i?"}":"]",[h,...m]=r.end,y=d;if(h?.source===u)y=h.offset+h.source.length;else{let f=o[0].toUpperCase()+o.substring(1),b=c?`${f} must end with a ${u}`:`${f} in block collection must be sufficiently indented and end with a ${u}`;s(d,c?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&m.unshift(h)}if(m.length>0){let f=Ut(m,y,a.options.strict,s);f.comment&&(l.comment?l.comment+=`
`+f.comment:l.comment=f.comment),l.range=[r.offset,y,f.offset]}else l.range=[r.offset,y,y];return l}function Gr(e,t,a,r,s,n){let i=a.type==="block-map"?gd(e,t,a,r,n):a.type==="block-seq"?bd(e,t,a,r,n):vd(e,t,a,r,n),o=i.constructor;return s==="!"||s===o.tagName?(i.tag=o.tagName,i):(s&&(i.tag=s),i)}function xd(e,t,a,r,s){let n=r.tag,i=n?t.directives.tagName(n.source,h=>s(n,"TAG_RESOLVE_FAILED",h)):null;if(a.type==="block-seq"){let{anchor:h,newlineAfterProp:m}=r,y=h&&n?h.offset>n.offset?h:n:h??n;y&&(!m||m.offset<y.offset)&&s(y,"MISSING_CHAR","Missing newline after block sequence props")}let o=a.type==="block-map"?"map":a.type==="block-seq"?"seq":a.start.source==="{"?"map":"seq";if(!n||!i||i==="!"||i===ce.tagName&&o==="map"||i===Me.tagName&&o==="seq")return Gr(e,t,a,s,i);let l=t.schema.tags.find(h=>h.tag===i&&h.collection===o);if(!l){let h=t.schema.knownTags[i];if(h?.collection===o)t.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h?s(n,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${h.collection??"scalar"}`,!0):s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),Gr(e,t,a,s,i)}let c=Gr(e,t,a,s,i,l),d=l.resolve?.(c,h=>s(n,"TAG_RESOLVE_FAILED",h),t.options)??c,u=H(d)?d:new D(d);return u.range=c.range,u.tag=i,l?.format&&(u.format=l.format),u}function wd(e,t,a){let r=t.offset,s=kd(t,e.options.strict,a);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};let n=s.mode===">"?D.BLOCK_FOLDED:D.BLOCK_LITERAL,i=t.source?$d(t.source):[],o=i.length;for(let f=i.length-1;f>=0;--f){let b=i[f][1];if(b===""||b==="\r")o=f;else break}if(o===0){let f=s.chomp==="+"&&i.length>0?`
`.repeat(Math.max(1,i.length-1)):"",b=r+s.length;return t.source&&(b+=t.source.length),{value:f,type:n,comment:s.comment,range:[r,b,b]}}let l=t.indent+s.indent,c=t.offset+s.length,d=0;for(let f=0;f<o;++f){let[b,x]=i[f];if(x===""||x==="\r")s.indent===0&&b.length>l&&(l=b.length);else{b.length<l&&a(c+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=b.length),d=f,l===0&&!e.atRoot&&a(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=b.length+x.length+1}for(let f=i.length-1;f>=o;--f)i[f][0].length>l&&(o=f+1);let u="",h="",m=!1;for(let f=0;f<d;++f)u+=i[f][0].slice(l)+`
`;for(let f=d;f<o;++f){let[b,x]=i[f];c+=b.length+x.length+1;let v=x[x.length-1]==="\r";if(v&&(x=x.slice(0,-1)),x&&b.length<l){let k=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;a(c-x.length-(v?2:1),"BAD_INDENT",k),b=""}n===D.BLOCK_LITERAL?(u+=h+b.slice(l)+x,h=`
`):b.length>l||x[0]==="	"?(h===" "?h=`
`:!m&&h===`
`&&(h=`

`),u+=h+b.slice(l)+x,h=`
`,m=!0):x===""?h===`
`?u+=`
`:h=`
`:(u+=h+x,h=" ",m=!1)}switch(s.chomp){case"-":break;case"+":for(let f=o;f<i.length;++f)u+=`
`+i[f][0].slice(l);u[u.length-1]!==`
`&&(u+=`
`);break;default:u+=`
`}let y=r+s.length+t.source.length;return{value:u,type:n,comment:s.comment,range:[r,y,y]}}function kd({offset:e,props:t},a,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],n=s[0],i=0,o="",l=-1;for(let h=1;h<s.length;++h){let m=s[h];if(!o&&(m==="-"||m==="+"))o=m;else{let y=Number(m);!i&&y?i=y:l===-1&&(l=e+h)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,d="",u=s.length;for(let h=1;h<t.length;++h){let m=t[h];switch(m.type){case"space":c=!0;case"newline":u+=m.source.length;break;case"comment":a&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,d=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{r(m,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${m.type}`);let y=m.source;y&&typeof y=="string"&&(u+=y.length)}}}return{mode:n,indent:i,chomp:o,comment:d,length:u}}function $d(e){let t=e.split(/\n( *)/),a=t[0],r=a.match(/^( *)/),s=[r?.[1]?[r[1],a.slice(r[1].length)]:["",a]];for(let n=1;n<t.length;n+=2)s.push([t[n],t[n+1]]);return s}function Sd(e,t,a){let{offset:r,type:s,source:n,end:i}=e,o,l,c=(h,m,y)=>a(r+h,m,y);switch(s){case"scalar":o=D.PLAIN,l=Ed(n,c);break;case"single-quoted-scalar":o=D.QUOTE_SINGLE,l=Ad(n,c);break;case"double-quoted-scalar":o=D.QUOTE_DOUBLE,l=Dd(n,c);break;default:return a(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+n.length,r+n.length]}}let d=r+n.length,u=Ut(i,d,t,a);return{value:l,type:o,comment:u.comment,range:[r,d,u.offset]}}function Ed(e,t){let a="";switch(e[0]){case"	":a="a tab character";break;case",":a="flow indicator character ,";break;case"%":a="directive indicator character %";break;case"|":case">":a=`block scalar indicator ${e[0]}`;break;case"@":case"`":a=`reserved character ${e[0]}`}return a&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${a}`),Ti(e)}function Ad(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Ti(e.slice(1,-1)).replace(/''/g,"'")}function Ti(e){let t=/(.*?)\r?\n/sy,a=t.exec(e);if(!a)return e;let r,s;try{r=RegExp("(?<![ 	])[ 	]+$"),s=RegExp("^[ 	]+|(?<![ 	])[ 	]+$","g")}catch{r=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let n=a[1].replace(r,""),i=" ",o=t.lastIndex;for(;a=t.exec(e);){let c=a[1].replace(s,"");c===""?i===`
`?n+=i:i=`
`:(n+=i+c,i=" "),o=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=o,a=l.exec(e),n+i+(a?.[1]??"")}function Dd(e,t){let a="";for(let r=1;r<e.length-1;++r){let s=e[r];if(s!=="\r"||e[r+1]!==`
`)if(s===`
`){let{fold:n,offset:i}=Cd(e,r);a+=n,r=i}else if(s==="\\"){let n=e[++r],i=Td[n];if(i)a+=i;else if(n===`
`)for(n=e[r+1];n===" "||n==="	";)n=e[++r+1];else if(n==="\r"&&e[r+1]===`
`)for(n=e[++r+1];n===" "||n==="	";)n=e[++r+1];else if(n==="x"||n==="u"||n==="U"){let o=n==="x"?2:n==="u"?4:8;a+=Fd(e,r+1,o,t),r+=o}else{let o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),a+=o}}else if(s===" "||s==="	"){let n=r,i=e[r+1];for(;i===" "||i==="	";)i=e[++r+1];i!==`
`&&(i!=="\r"||e[r+2]!==`
`)&&(a+=r>n?e.slice(n,r+1):s)}else a+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),a}function Cd(e,t){let a="",r=e[t+1];for(;(r===" "||r==="	"||r===`
`||r==="\r")&&(r!=="\r"||e[t+2]===`
`);)r===`
`&&(a+=`
`),t+=1,r=e[t+1];return a||=" ",{fold:a,offset:t}}var Td={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function Fd(e,t,a,r){let s=e.substr(t,a),n=s.length===a&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(n)}catch{let i=e.substr(t-2,a+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}function Fi(e,t,a,r){let{value:s,type:n,comment:i,range:o}=t.type==="block-scalar"?wd(e,t,r):Sd(t,e.options.strict,r),l=a?e.directives.tagName(a.source,u=>r(a,"TAG_RESOLVE_FAILED",u)):null,c;c=e.options.stringKeys&&e.atKey?e.schema[ye]:l?Od(e.schema,s,l,a,r):t.type==="scalar"?_d(e,s,t,r):e.schema[ye];let d;try{let u=c.resolve(s,h=>r(a??t,"TAG_RESOLVE_FAILED",h),e.options);d=R(u)?u:new D(u)}catch(u){let h=u instanceof Error?u.message:String(u);r(a??t,"TAG_RESOLVE_FAILED",h),d=new D(s)}return d.range=o,d.source=s,n&&(d.type=n),l&&(d.tag=l),c.format&&(d.format=c.format),i&&(d.comment=i),d}function Od(e,t,a,r,s){if(a==="!")return e[ye];let n=[];for(let o of e.tags)if(!o.collection&&o.tag===a)if(o.default&&o.test)n.push(o);else return o;for(let o of n)if(o.test?.test(t))return o;let i=e.knownTags[a];return i&&!i.collection?(e.tags.push(Object.assign({},i,{default:!1,test:void 0})),i):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,a!=="tag:yaml.org,2002:str"),e[ye])}function _d({atKey:e,directives:t,schema:a},r,s,n){let i=a.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(r))||a[ye];if(a.compat){let o=a.compat.find(l=>l.default&&l.test?.test(r))??a[ye];i.tag!==o.tag&&n(s,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(i.tag)} or ${t.tagString(o.tag)}`,!0)}return i}function jd(e,t,a){if(t){a??=t.length;for(let r=a-1;r>=0;--r){let s=t[r];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++r];s?.type==="space";)e+=s.source.length,s=t[++r];break}}return e}var Rd={composeNode:Oi,composeEmptyNode:Xr};function Oi(e,t,a,r){let s=e.atKey,{spaceBefore:n,comment:i,anchor:o,tag:l}=a,c,d=!0;switch(t.type){case"alias":c=Nd(e,t,r),(o||l)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Fi(e,t,l,r),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=xd(Rd,e,t,a,r),o&&(c.anchor=o.source.substring(1))}catch(u){r(t,"RESOURCE_EXHAUSTION",u instanceof Error?u.message:String(u))}break;default:r(t,"UNEXPECTED_TOKEN",t.type==="error"?t.message:`Unsupported token (type: ${t.type})`),d=!1}return c??=Xr(e,t.offset,void 0,null,a,r),o&&c.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!R(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),n&&(c.spaceBefore=!0),i&&(t.type==="scalar"&&t.source===""?c.comment=i:c.commentBefore=i),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Xr(e,t,a,r,{spaceBefore:s,comment:n,anchor:i,tag:o,end:l},c){let d=Fi(e,{type:"scalar",offset:jd(t,a,r),indent:-1,source:""},o,c);return i&&(d.anchor=i.source.substring(1),d.anchor===""&&c(i,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(d.spaceBefore=!0),n&&(d.comment=n,d.range[2]=l),d}function Nd({options:e},{offset:t,source:a,end:r},s){let n=new _r(a.substring(1));n.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),n.source.endsWith(":")&&s(t+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let i=t+a.length,o=Ut(r,i,e.strict,s);return n.range=[t,i,o.offset],o.comment&&(n.comment=o.comment),n}function qd(e,t,{offset:a,start:r,value:s,end:n},i){let o=new Si(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},c=dt(r,{indicator:"doc-start",next:s??n?.[0],offset:a,onError:i,parentIndent:0,startOnNewline:!0});c.found&&(o.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!c.hasNewline&&i(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=s?Oi(l,s,c,i):Xr(l,c.end,r,null,c,i);let d=o.contents.range[2],u=Ut(n,d,!1,i);return u.comment&&(o.comment=u.comment),o.range=[a,d,u.offset],o}function Mt(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:a}=e;return[t,t+(typeof a=="string"?a.length:1)]}function _i(e){let t="",a=!1,r=!1;for(let s=0;s<e.length;++s){let n=e[s];switch(n[0]){case"#":t+=(t===""?"":r?`

`:`
`)+(n.substring(1)||" "),a=!0,r=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),a=!1;break;default:a||(r=!0),a=!1}}return{comment:t,afterEmptyLine:r}}var Ld=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,a,r,s)=>{let n=Mt(t);s?this.warnings.push(new yd(n,a,r)):this.errors.push(new zt(n,a,r))},this.directives=new rt({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:a,afterEmptyLine:r}=_i(this.prelude);if(a){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
${a}`:a;else if(r||e.directives.docStart||!s)e.commentBefore=a;else if(M(s)&&!s.flow&&s.items.length>0){let n=s.items[0];U(n)&&(n=n.key);let i=n.commentBefore;n.commentBefore=i?`${a}
${i}`:a}else{let n=s.commentBefore;s.commentBefore=n?`${a}
${n}`:a}}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:_i(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,a=-1){for(let r of e)yield*this.next(r);yield*this.end(t,a)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,a,r)=>{let s=Mt(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",a,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=qd(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,a=new zt(Mt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){this.errors.push(new zt(Mt(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=Ut(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let a=this.doc.comment;this.doc.comment=a?`${a}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new zt(Mt(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 a=new Si(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,t,t],this.decorate(a,!1),yield a}}},Yr=Symbol("break visit"),Bd=Symbol("skip children"),ji=Symbol("remove item");function pt(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Ri(Object.freeze([]),e,t)}pt.BREAK=Yr,pt.SKIP=Bd,pt.REMOVE=ji,pt.itemAtPath=(e,t)=>{let a=e;for(let[r,s]of t){let n=a?.[r];if(n&&"items"in n)a=n.items[s];else return}return a},pt.parentCollection=(e,t)=>{let a=pt.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],s=a?.[r];if(s&&"items"in s)return s;throw Error("Parent collection not found")};function Ri(e,t,a){let r=a(t,e);if(typeof r=="symbol")return r;for(let s of["key","value"]){let n=t[s];if(n&&"items"in n){for(let i=0;i<n.items.length;++i){let o=Ri(Object.freeze(e.concat([[s,i]])),n.items[i],a);if(typeof o=="number")i=o-1;else{if(o===Yr)return Yr;o===ji&&(n.items.splice(i,1),--i)}}typeof r=="function"&&s==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}function Id(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 fe(e){switch(e){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}var Ni=new Set("0123456789ABCDEFabcdef"),zd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ra=new Set(",[]{}"),Pd=new Set(` ,[]{}
\r	`),Qr=e=>!e||Pd.has(e),Ud=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 a=this.next??"stream";for(;a&&(t||this.hasChars(1));)a=yield*this.parseNext(a)}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 a=0;for(;t===" ";)t=this.buffer[++a+e];if(t==="\r"){let r=this.buffer[a+e+1];if(r===`
`||!r&&!this.atEnd)return e+a+1}return t===`
`||a>=this.indentNext||!t&&!this.atEnd?e+a:-1}if(t==="-"||t==="."){let a=this.buffer.substr(e,3);if((a==="---"||a==="...")&&fe(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,a=e.indexOf("#");for(;a!==-1;){let s=e[a-1];if(s===" "||s==="	"){t=a-1;break}a=e.indexOf("#",a+1)}for(;;){let s=e[t-1];if(s===" "||s==="	")--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&fe(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&&!fe(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===":")&&fe(t)){let a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,"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(Qr),"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,a=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=a=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&r[0]!=="#"||a===0&&(r.startsWith("---")||r.startsWith("..."))&&fe(r[3]))&&(a!==this.indentNext-1||this.flowLevel!==1||r[0]!=="]"&&r[0]!=="}"))return this.flowLevel=0,yield"",yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.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(Qr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let n=this.charAt(1);if(this.flowKey||fe(n)||n===",")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 a=this.buffer.substring(0,t),r=a.indexOf(`
`,this.pos);if(r!==-1){for(;r!==-1;){let s=this.continueScalar(r+1);if(s===-1)break;r=a.indexOf(`
`,s)}r!==-1&&(t=r-(a[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>fe(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,a;e:for(let s=this.pos;a=this.buffer[s];++s)switch(a){case" ":t+=1;break;case`
`:e=s,t=0;break;case"\r":{let n=this.buffer[s+1];if(!n&&!this.atEnd)return this.setNext("block-scalar");if(n===`
`)break}default:break e}if(!a&&!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 r=e+1;for(a=this.buffer[r];a===" ";)a=this.buffer[++r];if(a==="	"){for(;a==="	"||a===" "||a==="\r"||a===`
`;)a=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let s=e-1,n=this.buffer[s];n==="\r"&&(n=this.buffer[--s]);let i=s;for(;n===" ";)n=this.buffer[--s];if(n===`
`&&s>=this.pos&&s+1+t>i)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,a=this.pos-1,r;for(;r=this.buffer[++a];)if(r===":"){let s=this.buffer[a+1];if(fe(s)||e&&Ra.has(s))break;t=a}else if(fe(r)){let s=this.buffer[a+1];if(r==="\r"&&(s===`
`?(a+=1,r=`
`,s=this.buffer[a+1]):t=a),s==="#"||e&&Ra.has(s))break;if(r===`
`){let n=this.continueScalar(a+1);if(n===-1)break;a=Math.max(a,n-2)}}else{if(e&&Ra.has(r))break;t=a}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield"",yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let a=this.buffer.slice(this.pos,e);return a?(yield a,this.pos+=a.length,a.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(Qr),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,a=this.charAt(1);if(fe(a)||t&&Ra.has(a)){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(;!fe(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(zd.has(t))t=this.buffer[++e];else if(t==="%"&&Ni.has(this.buffer[e+1])&&Ni.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,a;do a=this.buffer[++t];while(a===" "||e&&a==="	");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,a=this.buffer[t];for(;!e(a);)a=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Md=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,a=this.lineStarts.length;for(;t<a;){let s=t+a>>1;this.lineStarts[s]<e?t=s+1:a=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function De(e,t){for(let a=0;a<e.length;++a)if(e[a].type===t)return!0;return!1}function qi(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 Li(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 Na(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 ut(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 qa(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let a=0;a<t.length;++a)e.push(t[a])}function Bi(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!De(t.start,"explicit-key-ind")&&!De(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Li(t.value)?t.value.end?qa(t.value.end,t.sep):t.value.end=t.sep:qa(t.start,t.sep),delete t.sep)}var Hd=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 Ud,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let a of this.lexer.lex(e,t))yield*this.next(a);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=Id(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 a=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:a,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});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let a=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in a?a.indent:0:t.type==="flow-collection"&&a.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Bi(t),a.type){case"document":a.value=t;break;case"block-scalar":a.props.push(t);break;case"block-map":{let r=a.items[a.items.length-1];if(r.value){a.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=a.items[a.items.length-1];r.value?a.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=a.items[a.items.length-1];!r||r.value?a.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&qi(r.start)===-1&&(t.indent===0||r.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(a.type==="document"?a.end=r.start:a.items.push({start:r.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":qi(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=ut(Na(this.peek(2))),a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let 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 a="end"in t.value?t.value.end:void 0;(Array.isArray(a)?a[a.length-1]:void 0)?.type==="comment"?a?.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 a=e.items[e.items.length-2]?.value?.end;if(Array.isArray(a)){qa(a,t.start),a.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let a=!this.onKeyLine&&this.indent===e.indent,r=a&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(r&&t.sep&&!t.value){let n=[];for(let i=0;i<t.sep.length;++i){let o=t.sep[i];switch(o.type){case"newline":n.push(i);break;case"space":break;case"comment":o.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":r||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):r||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(De(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(Li(t.key)&&!De(t.sep,"newline")){let n=ut(t.start),i=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:n,key:i,sep:o}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(De(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let n=ut(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:s,key:null,sep:[this.sourceToken]}):De(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:s,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let n=this.startBlockValue(e);if(n){if(n.type==="block-seq"){if(!t.explicitKey&&t.sep&&!De(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 a&&e.items.push({start:s});this.stack.push(n);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 a="end"in t.value?t.value.end:void 0;(Array.isArray(a)?a[a.length-1]:void 0)?.type==="comment"?a?.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 a=e.items[e.items.length-2]?.value?.end;if(Array.isArray(a)){qa(a,t.start),a.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||De(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while(a?.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 r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let a=this.startBlockValue(e);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{let a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===e.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){let r=ut(Na(a));Bi(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}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=ut(Na(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=ut(Na(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(a=>a.type==="newline"||a.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 Wd(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Md||null,prettyErrors:t}}function Vd(e,t={}){let{lineCounter:a,prettyErrors:r}=Wd(t),s=new Hd(a?.addNewLine),n=new Ld(t),i=null;for(let o of n.compose(s.parse(e),!0,e.length))if(!i)i=o;else if(i.options.logLevel!=="silent"){i.errors.push(new zt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&a&&(i.errors.forEach(Ai(e,a)),i.warnings.forEach(Ai(e,a))),i}function es(e,t,a){let r;typeof t=="function"?r=t:a===void 0&&t&&typeof t=="object"&&(a=t);let s=Vd(e,a);if(!s)return null;if(s.warnings.forEach(n=>(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:r},a))}function La(e){if(e!==null){if(typeof e=="string"){if(e.trim()==="")return;try{return JSON.parse(e)}catch{let t=/^[^:]+:/.test(e),a=e.slice(0,50).trimStart().startsWith("{");return!t||a?void 0:es(e,{maxAliasCount:1e4,merge:!0})}}return Cr(e),e}}function ts(e,t={}){if(Cr(e))return e;let a=La(e);return Array.isArray(a)?a:[{isEntrypoint:!0,specification:a,filename:null,dir:"./",references:Hn(a),...t}]}function Kd(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function Zd(e){return e.split("/").slice(1).map(Kd)}function Jd(e,t,a,r=[]){let s=ts(structuredClone(e)),n=Ie(s),i=a?.specification??n.specification;if(!P(i)){if(t?.throwOnError)throw Error(ie.NO_CONTENT);return{valid:!1,errors:r,schema:i}}return as(i,s,a??n,new WeakSet,r,t),r=r.filter((o,l,c)=>l===c.findIndex(d=>d.message===o.message&&d.code===o.code)),{valid:r.length===0,errors:r,schema:i}}function as(e,t,a,r,s,n){if(e===null||r.has(e))return;r.add(e);function i(l){return as(l.specification,t,l,r,s,n),l}let o=new Set;for(;e.$ref!==void 0;){if(o.has(e.$ref)){s.push({code:"SELF_REFERENCE",message:ie.SELF_REFERENCE.replace("%s",e.$ref)}),delete e.$ref;break}o.add(e.$ref);let l=Ii(e.$ref,n,a,t,i,s);if(typeof l!="object"||!l)break;let c=e.$ref;delete e.$ref;for(let d of Object.keys(l))e[d]===void 0&&(e[d]=l[d]);c&&n?.onDereference?.({schema:e,ref:c,resolved:l})}for(let l of Object.values(e))typeof l=="object"&&l&&as(l,t,a,r,s,n)}function Ii(e,t,a,r,s,n){if(typeof e!="string"){if(t?.throwOnError)throw Error(ie.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:ie.INVALID_REFERENCE.replace("%s",e)});return}let[i,o]=e.split("#",2),l=i!==a.filename;if(i&&l){let c=r.find(d=>d.filename===i);if(!c){if(t?.throwOnError)throw Error(ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i));n.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i)});return}return o===void 0?c.specification:Ii(`#${o}`,t,s(c),r,s,n)}try{return Zd(o).reduce((c,d)=>{if(!ne(c)||!(d in c))throw Error(ie.INVALID_REFERENCE.replace("%s",e));return c[d]},a.specification)}catch{if(t?.throwOnError)throw Error(ie.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:ie.INVALID_REFERENCE.replace("%s",e)})}}function zi(e,t){let a=ts(e),r=Ie(a),s=Jd(a,t);return{specification:r.specification,errors:s.errors,schema:s.schema,...Mn(r.specification)}}var Gd=1e5,Xd=10,Pi=e=>{let t=new WeakSet,a={sourceEntries:0,copiedEntries:0,sizes:new Map},r=s=>{if(s===null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===void 0)return s;if(!Array.isArray(s)&&!P(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 n=a.sizes.get(s)??1+(Array.isArray(s)?s.length:Object.keys(s).length);if(a.sizes.has(s)||(a.sizes.set(s,n),a.sourceEntries+=n),a.copiedEntries+=n,a.copiedEntries>Gd&&a.copiedEntries>a.sourceEntries*Xd)throw Error("Cannot upgrade to OpenAPI 3.2: excessive YAML alias expansion. Use $ref for shared schemas.");t.add(s);let i=Array.isArray(s)?s.map(r):Object.fromEntries(Object.entries(s).map(([o,l])=>[o,r(l)]));return t.delete(s),i};return r(e)},ht=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Yd=e=>e.replaceAll("~1","/").replaceAll("~0","~"),Qd=e=>decodeURI(Yd(e)),Ui=e=>e.split("/").slice(1).map(Qd),Mi=class extends AggregateError{errors;constructor(e){super(e,e.map(t=>t.message).join(`
`)),this.errors=e,this.name="UpgradeIncompatibilityError"}},ep=["properties","patternProperties","$defs","dependentSchemas"],tp=["allOf","anyOf","oneOf","prefixItems"],ap=["items","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"],rp=(e,t="throw")=>{let a=new WeakMap,r=(g,w)=>{let $=a.get(g)??new Map(Object.entries(Object.getOwnPropertyDescriptors(g)).filter(([,A])=>Object.hasOwn(A,"value")).map(([A,S])=>[A,S.value]));return a.set(g,$),$.get(w)},s=new Set,n=[],i=new WeakMap,o=new WeakSet,l={evaluations:0},c=new WeakSet,d=[],u=g=>{P(g)&&!c.has(g)&&(c.add(g),u(g.items),Array.isArray(g.prefixItems)&&g.prefixItems.forEach(u))},h=new WeakMap,m=new WeakMap,y=(g,w)=>{n.push(Error(`Cannot upgrade to OpenAPI 3.2 at ${g}: ${w}`))},f=(g,w=!1)=>{if(typeof g=="string"&&g.startsWith("#/"))try{return Ui(decodeURIComponent(g.slice(1))).reduce(($,A)=>{if((!w||!P($)||$.$id===void 0&&$.$schema===void 0)&&(!Array.isArray($)||/^(0|[1-9]\d*)$/.test(A))&&(P($)||Array.isArray($))&&Object.hasOwn($,A))return r($,A)},e)}catch{return}},b=(g,w)=>{if(typeof g!="string")return;let $=[...g.matchAll(/\{([^{}]+)\}/g)].map(A=>A[1]);new Set($).size!==$.length&&y(w,"Template variables must not be repeated. Rename the repeated variable and define it separately.")},x=(g,w,$=new Set)=>{if(g===!1)return!0;if(g===!0)return!1;if(!P(g)||g.$id!==void 0||g.$schema!==void 0)return;if($.has(g)){for(let C of $)o.add(C);return}let A=i.get(g)??new Map;if(A.has(w))return A.get(w);if(++l.evaluations>1e5){l.evaluations===100001&&y("#","Discriminator requiredness analysis was truncated after 100,000 evaluations.");return}let S=C=>((C!==void 0||!o.has(g))&&(A.set(w,C),i.set(g,A)),C);if(Array.isArray(g.required)&&g.required.includes(w))return S(!0);let _=new Set([...$,g]),N=[];g.$ref!==void 0&&N.push(x(f(g.$ref,!0),w,_)),Array.isArray(g.allOf)&&N.push(...g.allOf.map(C=>x(C,w,_)));for(let C of["oneOf","anyOf"])if(Array.isArray(g[C])){let q=g[C].map(Z=>x(Z,w,_));q.every(Z=>Z===!0)?N.push(!0):q.every(Z=>Z===!1)?N.push(!1):N.push(void 0)}return N.includes(!0)?S(!0):N.includes(void 0)||["if","not","$dynamicRef","const","enum","minProperties","dependentRequired","dependentSchemas"].some(C=>C in g)?S(void 0):S(!1)},v=(g,w,{inferredName:$,propertyName:A,dialect:S,ancestors:_=new Set,baseChanged:N=!1})=>{if(!P(g)||_.has(g)||(g.$schema??S)!==void 0)return;let C=N||g.$id!==void 0,q=[$,A,C].join(":"),Z=h.get(g)??new Set;if(Z.has(q))return;let pe=P(g.xml)?g.xml:{},Q=g.$ref!==void 0||g.$dynamicRef!==void 0||g.type==="array"?"none":"element",j=pe.wrapped===!0?"element":Q,V=pe.nodeType??(pe.attribute===!0?"attribute":j);(V==="element"||V==="attribute")&&!$&&pe.name===void 0&&y(w,"An inline XML element needs an explicit xml.name.");let L={dialect:S,ancestors:new Set([..._,g]),baseChanged:C};if(!C&&typeof g.$ref=="string"){let W=f(g.$ref,!0);if(P(W)){let z=Ui(decodeURIComponent(g.$ref.slice(1))),gt=z.length===3&&z[0]==="components"&&z[1]==="schemas",Ve=c.has(W);v(W,g.$ref,{...L,inferredName:gt||Ve,propertyName:Ve})}}for(let W of["allOf","anyOf","oneOf"]){let z=g[W];Array.isArray(z)&&z.forEach((gt,Ve)=>v(gt,w+"/"+W+"/"+Ve,{...L,inferredName:!1,propertyName:!1}))}if(v(g.items,w+"/items",{...L,inferredName:A,propertyName:A}),Array.isArray(g.prefixItems)&&g.prefixItems.forEach((W,z)=>v(W,w+"/prefixItems/"+z,{...L,inferredName:A,propertyName:A})),P(g.properties))for(let[W,z]of Object.entries(g.properties))v(z,w+"/properties/"+ht(W),{...L,inferredName:!0,propertyName:!0});Z.add(q),h.set(g,Z)},k=(g,w,$,A=e.jsonSchemaDialect,S=!1)=>{if(!P(g))return;let _=w==="schema"?g.$schema??A:A,N=S||w==="schema"&&g.$id!==void 0,C=`${w}:${String(_)}:${N}`,q=m.get(g)??new Set;if(q.has(C))return;q.add(C),m.set(g,q);let Z=(j,V)=>k(r(g,j),V,`${$}/${ht(j)}`,_,N),pe=(j,V)=>{let L=r(g,j);Array.isArray(L)&&L.forEach((W,z)=>k(W,V,`${$}/${j}/${z}`,_,N))},Q=(j,V)=>{let L=r(g,j);if(P(L))for(let[W,z]of Object.entries(L))j==="responses"&&W.startsWith("x-")||(w==="schema"&&j==="properties"&&u(z),k(z,V,`${$}/${j}/${ht(W)}`,_,N))};if(w==="schema"){if(_!==void 0)return;let j=r(g,"xml");P(j)&&(j.wrapped===!0&&j.attribute===!0&&y(`${$}/xml`,"wrapped and attribute cannot both be true."),(j.wrapped===!0||j.attribute===!0)&&(j.nodeType=j.attribute===!0?"attribute":"element",delete j.wrapped,delete j.attribute)),!N&&g.$ref!==void 0&&k(f(g.$ref,!0),"schema",String(g.$ref),_);let V=g.discriminator;P(V)&&typeof V.propertyName=="string"&&V.defaultMapping===void 0&&!N&&x(g,V.propertyName)===!1&&y(`${$}/discriminator`,"An optional discriminating property needs an explicit defaultMapping.");for(let L of ep)Q(L,"schema");for(let L of tp)pe(L,"schema");for(let L of ap)Z(L,"schema");return}switch(g.$ref!==void 0&&k(f(g.$ref),w,String(g.$ref),_),w){case"document":{let j=r(g,"paths");if(P(j))for(let[L,W]of Object.entries(j)){if(!L.startsWith("/"))continue;let z=`${$}/paths/${ht(L)}`;b(L,z),k(W,"pathItem",z)}Q("webhooks","pathItem"),pe("servers","server");let V=r(g,"components");if(P(V))for(let[L,W]of Object.entries({schemas:"schema",parameters:"parameter",headers:"header",requestBodies:"body",responses:"response",callbacks:"callback",pathItems:"pathItem"})){let z=r(V,L);if(P(z))for(let[gt,Ve]of Object.entries(z))k(Ve,W,`${$}/components/${L}/${ht(gt)}`)}break}case"pathItem":for(let j of["get","put","post","delete","options","head","patch","trace"])Z(j,"operation");pe("parameters","parameter"),pe("servers","server");break;case"operation":if(Array.isArray(g.tags))for(let j of g.tags)typeof j=="string"&&s.add(j);pe("parameters","parameter"),pe("servers","server"),Z("requestBody","body"),Q("responses","response"),Q("callbacks","callback");break;case"callback":for(let[j,V]of Object.entries(g))!j.startsWith("x-")&&j!=="$ref"&&k(V,"pathItem",`${$}/${ht(j)}`,_,N);break;case"parameter":(g.in==="path"||g.in==="cookie")&&delete g.allowReserved,Z("schema","schema"),Q("content","media");break;case"header":Z("schema","schema"),Q("content","media");break;case"response":Q("headers","header"),Q("content","media");break;case"body":Q("content","media");break;case"media":/\/(?:[^;]+\+)?xml(?:\s*;|$)/i.test($.slice($.lastIndexOf("/")+1).replace(/~1/g,"/"))&&d.push({schema:g.schema,path:`${$}/schema`,dialect:_}),Z("schema","schema"),Q("encoding","encoding");break;case"encoding":Q("headers","header");break;case"server":b(g.url,`${$}/url`)}};k(e,"document","#");for(let{schema:g,path:w,dialect:$}of d)v(g,w,{inferredName:!1,propertyName:!1,dialect:$});if(n.length>0&&t==="throw")throw new Mi(n);return s},sp=(e,t)=>{let a=e["x-tagGroups"];if(!Array.isArray(a)||a.length===0||e.tags!==void 0&&!Array.isArray(e.tags))return;let r=e.tags??[];if(!r.every(l=>P(l)&&typeof l.name=="string"))return;let s=new Map(r.map(l=>[l.name,l])),n=new Set,i=new Set;for(let l of a){if(!P(l)||typeof l.name!="string"||!l.name||!Array.isArray(l.tags)||!l.tags.every(c=>typeof c=="string")||Object.keys(l).some(c=>c!=="name"&&c!=="tags")||n.has(l.name)||s.has(l.name)||t.has(l.name))return;n.add(l.name);for(let c of l.tags){if(i.has(c)||s.get(c)?.parent!==void 0)return;i.add(c)}}if([...n].some(l=>i.has(l))||s.size!==r.length)return;let o=[];for(let l of a){o.push({name:l.name,kind:"nav"});for(let c of l.tags)o.push({...s.get(c)??{name:c},parent:l.name})}e.tags=[...o,...r.filter(l=>!i.has(l.name))]},np=e=>{if(!P(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},ip=(e,t="throw")=>(np(e)&&(sp(e,rp(e,t)),e.openapi="3.2.0"),e);function Hi(e,t,a){if(t==="3.2"){let s=Un(Nn(Pi(e)));try{let n=ip(s,a?.onIncompatible==="ignore"?"ignore":"throw");return a?.onIncompatible==="collect"?{document:n,diagnostics:[]}:n}catch(n){if(a?.onIncompatible!=="collect"||!(n instanceof Mi))throw n;return{document:Hi(Pi(e),"3.1"),diagnostics:n.errors}}}let r=Nn(e);return t==="3.0"?r:Un(r)}function op(e){if(!e)return{specification:null,version:void 0};let t=Hi(Cr(e)?Ie(e).specification:La(e),"3.1"),{version:a}=Mn(t);return{specification:t,version:a==="3.1"||a==="3.2"?a:void 0}}async function Wi(e,t){let a=[];if(t?.filesystem?.find(o=>o.filename===e))return{specification:Ie(t.filesystem)?.specification,filesystem:t.filesystem,errors:a};let r=t?.plugins?.find(o=>o.check(e)),s=La(e);if(r)try{s=La(await r.get(e))}catch{if(t?.throwOnError)throw Error(ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return a.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:a}}if(s===void 0){if(t?.throwOnError)throw Error("No content to load");return a.push({code:"NO_CONTENT",message:ie.NO_CONTENT}),{specification:null,filesystem:[],errors:a}}let n=ts(s,{filename:t?.filename??null}),i=(t?.filename?n.find(o=>o.filename===t?.filename):Ie(n)).references??Hn(s);if(i.length===0)return{specification:Ie(n)?.specification,filesystem:n,errors:a};for(let o of i){let l=t?.plugins?.find(h=>h.check(o));if(!l)continue;let c=l.check(o)&&l.resolvePath?l.resolvePath(e,o):o;if(n.find(h=>h.filename===o))continue;let{filesystem:d,errors:u}=await Wi(c,{...t,filename:o});a.push(...u),n=[...n,...d.map(h=>({...h,isEntrypoint:!1}))]}return{specification:Ie(n)?.specification,filesystem:n,errors:a}}function rs(e){if(typeof e!="string")return!1;let t=e.trim();return!(t.startsWith("{")||t.startsWith("[")||t.includes(`
`))}function lp(e){let t=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost/",a=e?new URL(e,t):new URL(t);return{check(r){return typeof r!="string"||r.startsWith("#")?!1:rs(r)},resolvePath(r,s){if(s.startsWith("http://")||s.startsWith("https://"))return s;let n=r&&(r.startsWith("http://")||r.startsWith("https://"))?new URL(r):a;return new URL(s,n).href},async get(r){let s=r.startsWith("http://")||r.startsWith("https://")?r:new URL(r,a).href,n=await fetch(s);if(!n.ok){let o=Error(`Failed to load ${s} (${n.status})`);throw o.status=n.status,o.statusCode=n.status,o.response=n,o.url=s,o}let i=await n.text();try{return JSON.parse(i)}catch{try{return es(i,{maxAliasCount:-1,merge:!0})}catch{return i}}}}}function Vi(e){let t=new WeakMap,a=new WeakSet;function r(s,n=new Set,i=null){if(!s||typeof s!="object")return s;let o=s["x-ref"];if(o&&n.has(o))return{$ref:o};if(a.has(s))return{$ref:o||i||"#/components/schemas/Circular"};if(t.has(s))return t.get(s);a.add(s);let l=n;o&&(l=new Set(n),l.add(o));let c;if(Array.isArray(s)){c=[],t.set(s,c);for(let d=0;d<s.length;d++)c.push(r(s[d],l,o||i))}else{c={},t.set(s,c);for(let d of Object.keys(s))d!=="x-ref"&&(c[d]=r(s[d],l,o||i))}return a.delete(s),c}return r(e)}async function Ki(e,t=!1,a=!1,r=!1,s="none",n="",i="",o="",l="",c="",d="",u=""){let h;try{this?.requestUpdate?.();let v=e;if(typeof e=="string"&&!rs(e))try{v=JSON.parse(e)}catch{try{v=es(e,{maxAliasCount:-1,merge:!0})}catch{v=e}}let k=lp(typeof e=="string"&&rs(e)?e:void 0),g=await Wi(v,{plugins:[k]});if(g.errors&&g.errors.length>0&&!g.specification){let A=g.errors[0],S=Error(A.message||"Error loading specification");throw S.status=404,S}let w={onDereference:({schema:A,ref:S})=>{A["x-ref"]=S}},$;if($=g.specification?.swagger&&String(g.specification.swagger).startsWith("2")?Vi((await zi(op(g.filesystem).specification,w)).schema):Vi((await zi(g.filesystem,w)).schema),await ma(0),$&&($.components||$.info||$.servers||$.tags||$.paths))h=cp($,c,d,u),this?.dispatchEvent?.(new CustomEvent("before-render",{detail:{spec:h}}));else return{specLoadError:!0,isSpecLoading:!1,info:{title:"Invalid Spec Definition",description:"Invalid Spec Definition",version:""},tags:[]}}catch(v){let k;return k=v.statusCode===404||v.status===404?v.response?.url||v.url?`${v.response?.url||v.url} \u2503 Not Found (${v.response?.status||v.status})`:"Spec Not Found \u2503 404":`Unable to load ${v.response?.url||v.url||(typeof e=="string"?e:"")} \u2503 ${v.response?.status||v.status||v.message}`,{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:k,version:""},tags:[]}}let m=pp(h,s,t,a),y=dp(h,r),f=h.info?.description?ss(h.info.description):[],b=[];if(h.components?.securitySchemes){let v=new Set;Object.entries(h.components.securitySchemes).forEach(k=>{if(!v.has(k[0])){v.add(k[0]);let g={securitySchemeId:k[0],...k[1]};g.in="header",g.name="Authorization",g.nameId=k[1].name||k[0],g.user="",g.password="",g.clientId="",g.clientSecret="",g.value="",g.finalKeyValue="",k[1].type==="apiKey"&&(g.in=k[1].in||"header",g.name=k[1].name||"Authorization"),b.push(g)}})}n&&i&&o&&b.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:n,nameId:n,in:i,value:o,finalKeyValue:o}),b.forEach(v=>{v.typeDisplay=v.type==="http"?v.scheme==="basic"?"HTTP Basic":`HTTP Bearer ${v.nameId}`:v.type==="apiKey"?`API Key (${v.name})`:v.type==="oauth2"?`OAuth (${v.securitySchemeId})`:v.type||"None"});let x=[];return h.servers&&Array.isArray(h.servers)&&h.servers.length>0?(h.servers.forEach(v=>{let k=v.url.trim();k.startsWith("http")||k.startsWith("//")||k.startsWith("{")||typeof window<"u"&&window.location?.origin?.startsWith("http")&&(v.url=window.location.origin+v.url,k=v.url),v.variables&&Object.entries(v.variables).forEach(g=>{let w=RegExp(`{${g[0]}}`,"g");k=k.replace(w,g[1].default||""),g[1].value=g[1].default||""}),v.computedUrl=k}),l&&h.servers.push({url:l,computedUrl:l})):l?h.servers=[{url:l,computedUrl:l}]:typeof window<"u"&&window.location?.origin?.startsWith("http")?h.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:h.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],x=h.servers,{specLoadError:!1,isSpecLoading:!1,info:h.info,infoDescriptionHeaders:f,tags:m,components:y,externalDocs:h.externalDocs,securitySchemes:b,servers:x}}function cp(e,t="",a="",r=""){let s={},n=r.split(",").map(l=>l.trim().toLowerCase()).filter(Boolean);function i(l,c){if(!t)return!0;let d=`${c} ${l}`.toLowerCase();return a==="regex"?new RegExp(t,"i").test(d):d.includes(t.toLowerCase())}function o(l){return l.some(c=>n.includes(c?.label.toLowerCase()))}return Object.entries(e.paths).forEach(([l,c])=>{let d={};Object.entries(c).forEach(([u,h])=>{if(u==="additionalOperations"&&typeof h=="object"&&h){let y={};Object.entries(h).forEach(([f,b])=>{let x=b?.["x-badges"];i(l,f)&&(x&&Array.isArray(x)&&o(x)||(y[f]=b))}),Object.keys(y).length>0&&(d.additionalOperations=y);return}if(["parameters","servers","summary","description"].includes(u)){d[u]=h;return}let m=h?.["x-badges"];i(l,u)&&(m&&Array.isArray(m)&&o(m)||(d[u]=h))}),Object.keys(d).length>0&&(s[l]=d)}),e.paths=s,e}function ss(e){return E.lexer(e).filter(t=>t.type==="heading"&&t.depth<=2)||[]}function dp(e,t=!1){if(!e.components)return[];let a=[];for(let r in e.components){let s=[];for(let l in e.components[r]){let c={show:!0,id:`${r.toLowerCase()}-${l.toLowerCase()}`.replace(ha,"-"),name:l,component:e.components[r][l]};s.push(c)}let n=r,i=r;switch(r){case"schemas":t&&s.sort((l,c)=>l.name.localeCompare(c.name)),i="Schemas",n="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":i="Responses",n="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":i="Parameters",n="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":i="Examples",n="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":i="Request Bodies",n="Describes common request bodies that are used across the API operations.";break;case"headers":i="Headers",n='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":i="Security Schemes",n="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":i="Links",n="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":i="Callbacks",n="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:i=r,n=r}let o={show:!0,name:i,description:n,subComponents:s};a.push(o)}return a||[]}function pp(e,t="none",a=!1,r=!1){let s=["get","put","post","delete","patch","head","options","trace","query"],n=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map(l=>({show:!0,elementId:`tag--${l.name.replace(ha,"-")}`,name:l.name,displayName:l["x-displayName"]||l.name,description:l.description||"",headers:l.description?ss(l.description):[],paths:[],expanded:l["x-tag-expanded"]!==!1})):[],i=e.paths||{};if(e.webhooks)for(let[l,c]of Object.entries(e.webhooks))c._type="webhook",i[l]=c;for(let l in i){let c=i[l].parameters,d={servers:i[l].servers||[],parameters:i[l].parameters||[]},u=i[l]._type==="webhook",h=[];s.forEach(m=>{i[l][m]&&h.push({methodName:m,pathOrHookObj:i[l][m]})}),i[l].additionalOperations&&typeof i[l].additionalOperations=="object"&&Object.entries(i[l].additionalOperations).forEach(([m,y])=>{y&&typeof y=="object"&&h.push({methodName:m.toLowerCase(),pathOrHookObj:y})}),h.forEach(({methodName:m,pathOrHookObj:y})=>{let f=y.tags||[];if(f.length===0)if(a){let b=l.replace(/^\/+|\/+$/g,""),x=b.indexOf("/");x===-1?f.push(b):f.push(b.substring(0,x))}else f.push("General \u2982");f.forEach(b=>{let x,v;e.tags&&(v=e.tags.find(w=>w.name.toLowerCase()===b.toLowerCase())),x=n.find(w=>w.name===b),x||(x={show:!0,elementId:`tag--${b.replace(ha,"-")}`,name:b,description:v?.description||"",headers:v?.description?ss(v.description):[],paths:[],expanded:!v||v["x-tag-expanded"]!==!1},n.push(x));let k=(y.summary||y.description||`${m.toUpperCase()} ${l}`).trim();k.length>100&&([k]=k.split(/[.|!|?]\s|[\r?\n]/));let g=[];if(g=c?y.parameters?c.filter(w=>{if(!y.parameters.some($=>w.name===$.name&&w.in===$.in))return w}).concat(y.parameters):c.slice(0):y.parameters?y.parameters.slice(0):[],y.callbacks)for(let[w,$]of Object.entries(y.callbacks)){let A=Object.entries($).filter(S=>typeof S[1]=="object")||[];y.callbacks[w]=Object.fromEntries(A)}x.paths.push({show:!0,expanded:!1,isWebhook:u,expandedAtLeastOnce:!1,summary:y.summary||"",description:y.description||"",externalDocs:y.externalDocs,shortSummary:k,method:m,path:l,operationId:y.operationId,elementId:`${m}-${l.replace(ha,"-")}`,servers:y.servers?d.servers.concat(y.servers):d.servers,parameters:g,requestBody:y.requestBody,responses:y.responses,callbacks:y.callbacks,deprecated:y.deprecated,security:y.security??e.security,xBadges:y["x-badges"]||void 0,xCodeSamples:y["x-codeSamples"]||y["x-code-samples"]||""})})})}let o=n.filter(l=>l.paths&&l.paths.length>0);return t!=="none"&&o.forEach(l=>{t==="method"?l.paths.sort((c,d)=>{let u=s.indexOf(c.method),h=s.indexOf(d.method);return u!==-1&&h!==-1?u-h:u===-1?h===-1?c.method.localeCompare(d.method):1:-1}):t==="summary"?l.paths.sort((c,d)=>c.shortSummary.localeCompare(d.shortSummary)):t==="path"&&l.paths.sort((c,d)=>c.path.localeCompare(d.path)),l.firstPathId=l.paths[0].elementId}),r?o.sort((l,c)=>l.name.localeCompare(c.name)):o}function up(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 a=/(\[[^\]]+\]|\\[dwsDWS]|\\[^]|\.|[^\\[\]{}()+*?|])(?:\{(\d+)(?:,\d*)?\}|([+*?]))?/g,r="",s;for(;(s=a.exec(t))!==null;){let n=s[1],i=s[2],o=s[3],l=1;i===void 0?o==="+"?l=1:(o==="*"||o==="?")&&(l=0):l=parseInt(i,10),l=Math.min(Math.max(0,l),50);let c="a";if(n==="\\d")c="0";else if(n==="\\D")c="a";else if(n==="\\w")c="a";else if(n==="\\W")c="_";else if(n==="\\s")c=" ";else if(n==="\\S")c="a";else if(n===".")c="a";else if(n.startsWith("\\"))c=n.slice(1);else if(n.startsWith("[")){let d=n.slice(1,-1);d.startsWith("^")?c=d.includes("a")?"0":"a":/[1-9]/.test(d)&&!d.includes("0")?c="1":/[0-9]/.test(d)&&!/[a-zA-Z]/.test(d)||/[0-9]/.test(d)&&/[a-fA-F]/.test(d)&&!/[g-zG-Z]/.test(d)?c="0":/[A-Z]/.test(d)&&!/[a-z]/.test(d)?c="A":/[a-z]/.test(d)?c="a":d.length>0&&(c=d[0])}else c=n;r+=c.repeat(l)}return r||e}catch{return e}}function ae(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,a=>"\u25CF".repeat(a.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 Zi(e){return e?e.format==="binary"||e.contentEncoding==="binary"||!!e.contentMediaType&&e.contentEncoding!=="base64":!1}function Ba(e){if(!e)return;let t="",a="";if(e.$ref){let i=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(i+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 i=(e.anyOf||e.oneOf).filter(Boolean),o=[];i.forEach(l=>{let c=Ba(l);c?.type&&c.type!=="{missing-type-info}"&&c.type.split("\u2503").forEach(d=>{let u=d.trim();u&&!o.includes(u)&&o.push(u)})}),t=o.length>0?o.join("\u2503"):"{missing-type-info}"}else t=Object.keys(e).length===0?"any":"{missing-type-info}";let r=e.anyOf||e.oneOf?{...(e.anyOf||e.oneOf).find(i=>i&&i.type&&i.type!=="null")||(e.anyOf||e.oneOf)[0]||{},...e}:e,s={type:t,format:e.format||r.format||"",contentMediaType:e.contentMediaType||r.contentMediaType||"",contentEncoding:e.contentEncoding||r.contentEncoding||"",contentSchema:e.contentSchema||r.contentSchema||null,pattern:(e.pattern||r.pattern)&&!e.enum&&!r.enum?e.pattern||r.pattern:"",readOrWriteOnly:e.readOnly?"\u{1F181}":e.writeOnly?"\u{1F186}":r.readOnly?"\u{1F181}":r.writeOnly?"\u{1F186}":"",deprecated:e.deprecated||r.deprecated?"\u274C":"",examples:e.examples||e.example||r.examples||r.example,default:ae(e.default===void 0?r.default:e.default),description:e.description||r.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(i=>ae(i)).join("\u2503"):r.const===void 0?Array.isArray(r.enum)?r.enum.map(i=>ae(i)).join("\u2503"):"":ae(r.const):ae(e.const),!s.allowedValues&&(e.anyOf||e.oneOf)){let i=[];(e.anyOf||e.oneOf).forEach(o=>{let l=o.const===void 0?Array.isArray(o.enum)?o.enum.map(c=>ae(c)).join("\u2503"):"":ae(o.const);l&&!i.includes(l)&&i.push(l)}),i.length>0&&(s.allowedValues=i.join("\u2503"))}let n=e.items||r.items;if((t==="array"||t.split("\u2503").includes("array"))&&n){let i=n.format||n.contentMediaType||(Array.isArray(n?.type)?n.type.join("\u2503"):n?.type)||"",o=ae(n.default);s.arrayType=i?`array of ${i}`:`${e.type||"array"}`,s.default||=o,s.allowedValues||=n.const===void 0?Array.isArray(n?.enum)?n.enum.map(l=>ae(l)).join("\u2503"):"":ae(n.const)}if(t.match(/integer|number/g)){let i=e.minimum===void 0?r.minimum:e.minimum,o=e.exclusiveMinimum===void 0?r.exclusiveMinimum:e.exclusiveMinimum;(i!==void 0||o!==void 0)&&(a+=i===void 0?`More than ${o}`:`Min ${i}`);let l=e.maximum===void 0?r.maximum:e.maximum,c=e.exclusiveMaximum===void 0?r.exclusiveMaximum:e.exclusiveMaximum;(l!==void 0||c!==void 0)&&(a+=l===void 0?`${a?"\u2503":""}Less than ${c}`:`${a?"\u2503":""}Max ${l}`);let d=e.multipleOf===void 0?r.multipleOf:e.multipleOf;d!==void 0&&(a+=`${a?"\u2503":""} multiple of ${d}`)}if(t.match(/string/g)){let i=e.minLength===void 0?r.minLength:e.minLength,o=e.maxLength===void 0?r.maxLength:e.maxLength;i!==void 0&&o!==void 0?a+=`${a?"\u2503":""}${i} to ${o} chars`:i===void 0?o!==void 0&&(a+=`Max ${a?"\u2503":""}${o} chars`):a+=`${a?"\u2503":""}Min ${i} chars`}return s.constrain=a,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function de(e){if(typeof e=="object"&&e&&!Array.isArray(e)){if(e.value!==void 0)return{Example:{...e}};let t=Object.entries(e).filter(([a,r])=>r?.value!==void 0);return t.length===0?void 0:Object.fromEntries(t)}return Array.isArray(e)?e.reduce((t,a,r)=>(t[`Example${r+1}`]={value:a},t),{}):e?{Example:{value:e}}:void 0}function Ji(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){let a=Object.values(e).filter(r=>r["x-example-show-value"]!==!1).map(r=>({value:typeof r.value=="boolean"||typeof r.value=="number"?`${r.value}`:r.value||"",printableValue:ae(r.value),summary:r.summary||"",description:r.description||""}));return{exampleVal:a.length>0?a[0].value:"",exampleList:a}}if(Array.isArray(e)||(e=e?[e]:[]),e.length===0)return{exampleVal:"",exampleList:[]};if(t==="array"){let[a]=e;return{exampleVal:a,exampleList:e.map(r=>({value:r,printableValue:ae(r)}))}}return{exampleVal:e[0].toString(),exampleList:e.map(a=>({value:a.toString(),printableValue:ae(a)}))}}function hp(e){return e.some(t=>t.summary?.length>0||t.description?.length>0)}function ke(e){let t;return e&&(t=e.examples&&e.examples.length>=1?e.examples[0]:e.example),t}function Ia(e){let t=ke(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 a=Array.isArray(e.type)?e.type[0]:e.type;if(!a)return null;if(a.match(/^integer|^number/g)){let r=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),s=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),n=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?s||0:Number(e.exclusiveMinimum)+(a.startsWith("integer")?1:.001):Number(e.minimum);return r?r>=n?r:n%r===0?n:Math.ceil(n/r)*r:n}if(a.match(/^boolean/g))return!1;if(a.match(/^null/g))return null;if(a.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return up(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 r=re(e.contentSchema),s=r?.["example-0"]??r;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 r=Number.isNaN(e.minLength)?void 0:Number(e.minLength),s=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),n=r||(s>6?6:s||void 0);return n?"A".repeat(n):"string"}}return null}function ns(e,t=1){if(e==null)return"";let a="  ".repeat(t),r="";if(typeof e!="object")return`
${a}${e.toString()}`;for(let s in e){if(s.startsWith("::"))continue;let n=e[s],i=s;Array.isArray(n)?i=n["::XML_TAG"]||n[0]?.["::XML_TAG"]||s:n&&typeof n=="object"?i=n["::XML_TAG"]||s:Array.isArray(e)&&e["::XML_TAG"]&&(i=e["::XML_TAG"]),r=n==null?`${r}
${a}<${i}></${i}>`:Array.isArray(n)||typeof n=="object"?`${r}
${a}<${i}>${ns(n,t+1)}
${a}</${i}>`:`${r}
${a}<${i}>${n.toString()}</${i}>`}return r}function Ht(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 Gi(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)Gi(e[t])}}function za(e,t,a){if(!e||typeof e!="object")return e;let r=a&&typeof a=="object"&&"example-0"in a?a["example-0"]:a&&typeof a=="object"&&Object.keys(a).length>0&&!Array.isArray(a)?Object.values(a)[0]:a;for(let s in e)e[s]&&typeof e[s]=="object"&&(e[s][t]=r);return e}function re(e,t={},a=0){let r={};if(!(!e||a>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 n=e.allOf[0];return{"example-0":Ia(n)}}return}e.allOf.forEach(n=>{if(n){if(n.type==="object"||n.properties||n.allOf||n.anyOf||n.oneOf){let i=re(n,t,a+1),o=i?.["example-0"]??i;o&&typeof o=="object"&&!Array.isArray(o)&&Object.assign(s,o)}else if(n.type==="array"||n.items){let i=re(n,t,a+1),o=i?.["example-0"]??i;Array.isArray(o)&&(s[Object.keys(s).length]=o)}else if(n.type){let i=`prop${Object.keys(s).length}`;s[i]=Ia(n)}}}),r={"example-0":s},Ht(e,r["example-0"])}else if(e.oneOf){let s={};if(e.properties)for(let n in e.properties){let i=e.properties[n];if(i?.properties||i?.items){let o=re(i,t,a+1);s[n]=o?.["example-0"]??o}else s[n]=Ia(i)}if(e.oneOf.length>0){let n=a===0?e.oneOf:[e.oneOf[0]],i=0;for(let o=0;o<n.length;o++){let l=n[o],c=re(l,t,a+1);for(let d in c){let u=c[d];if(Object.keys(s).length>0&&u&&typeof u=="object"&&!Array.isArray(u)&&(u={...s,...u}),r[`example-${i}`]=u,Ht(l,r[`example-${i}`]),i++,a>0)break}}}}else if(e.anyOf){let s={"example-0":{}};if(e.type==="object"||e.properties)for(let n in e.properties){let i=e.properties[n];if(i?.deprecated&&!t.includeDeprecated||i?.readOnly&&!t.includeReadOnly||i?.writeOnly&&!t.includeWriteOnly)continue;let o=ke(i);o===void 0?za(s,n,re(i,t,a+1)):s["example-0"][n]=o}if(e.anyOf.length>0){let n=a===0?e.anyOf:[e.anyOf[0]],i=0;for(let o=0;o<n.length;o++){let l=n[o],c=re(l,t,a+1);for(let d in c){let u=c[d];if(s?.["example-0"]&&Object.keys(s["example-0"]).length>0?r[`example-${i}`]={...s["example-0"],...typeof u=="object"?u:{}}:r[`example-${i}`]=u,Ht(l,r[`example-${i}`]),i++,a>0)break}}}}else if(e.type==="object"||e.properties){r["example-0"]={},Ht(e,r["example-0"]);let s=ke(e);if(s!==void 0)r["example-0"]=s;else{for(let n in e.properties){let i=e.properties[n];if(i&&(!i.deprecated||t.includeDeprecated)&&(!i.readOnly||t.includeReadOnly)&&(!i.writeOnly||t.includeWriteOnly)){if(i.type==="array"||i.items){let o=ke(i);if(o!==void 0)r["example-0"][n]=o;else if(ke(i.items)!==void 0)r["example-0"][n]=[ke(i.items)];else{let l=re(i.items,t,a+1),c=l?.["example-0"]??l;if(t.useXmlTagForProp){let d=i.xml?.name||n;i.xml?.wrapped?r["example-0"][d]={[d]:c}:r["example-0"][d]=[c]}else r["example-0"][n]=[c]}continue}za(r,n,re(i,t,a+1))}}if(typeof e.additionalProperties=="object"&&e.additionalProperties!==null){let n=e.additionalProperties["x-additionalPropertiesName"]||"property";za(r,`${n}1`,re(e.additionalProperties,t,a+1)),za(r,`${n}2`,re(e.additionalProperties,t,a+1))}}}else if(e.type==="array"||e.items){let s=ke(e);if(s!==void 0)r["example-0"]=s;else if(e.items){let n=ke(e.items);if(n!==void 0)r["example-0"]=[n];else{let i=re(e.items,t,a+1),o=i?.["example-0"]??i;r["example-0"]=[o],Ht(e.items,r["example-0"])}}else r["example-0"]=[]}else return{"example-0":Ia(e)};return r}}function is(e,t=0){let a="";e.title?a=e.description?`<b>${e.title}:</b> ${e.description}`:e.title:e.description&&(a=e.description);let r=[];if(e.minItems&&r.push(`<b>Min Items:</b> ${e.minItems}`),e.maxItems&&r.push(`<b>Max Items:</b> ${e.maxItems}`),e.uniqueItems===!0&&r.push("<b>Must have unique items</b>"),t>0&&e.items?.description){let s="";e.items.minProperties&&(s=`<b>Min Properties:</b> ${e.items.minProperties}`),e.items.maxProperties&&(s=`${s} <b>Max Properties:</b> ${e.items.maxProperties}`),r.push(`\u2B95 ${s} [ ${e.items.description} ]`)}return a&&r.length>0?`${a.trim()}

${r.join(" ")}`:a?a.trim():r.join(" ")}function os(e,t,a,r){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,n=[];if(e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=G(e.properties[l],t+1,l,c);d&&n.push(d)}let i=[];if(e.patternProperties)for(let l in e.patternProperties){let c=G(e.patternProperties[l],t+1,`[pattern: ${l}]`,!1);c&&i.push(c)}let o=null;return e.additionalProperties&&typeof e.additionalProperties=="object"&&(o=G(e.additionalProperties,t+1,"[any-key]",!1)),{kind:"object",name:a,title:e.title||"",description:is(e,t),required:r,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"object \u2503 null":"object",properties:n,patternProperties:i,additionalProperties:o}}function ls(e,t,a,r){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,n=null;e.items&&(n=G(e.items,t+1,"",!1));let i="";return e.items?.items?i=e.items.items.type||"":e.items?.type&&typeof e.items.type=="string"&&(i=e.items.type),{kind:"array",name:a,title:e.title||"",description:is(e,t),required:r,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"array \u2503 null":"array",arrayType:i,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems||!1,items:n}}function cs(e,t,a){let r=Ba(e)||{};return{kind:"primitive",name:t,type:r.type||e.type||"",format:r.format||e.format||"",contentMediaType:r.contentMediaType||e.contentMediaType||"",contentEncoding:r.contentEncoding||e.contentEncoding||"",contentSchema:r.contentSchema||e.contentSchema||null,pattern:r.pattern||e.pattern||"",constraints:r.constrain||"",defaultValue:r.default!==void 0&&r.default!==""?String(r.default):"",allowedValues:r.allowedValues||"",description:(e.description||r.description||"").trim(),title:(e.title||"").trim(),required:a,deprecated:e.deprecated||!!r.deprecated,readOnly:e.readOnly||r.readOrWriteOnly==="readonly",writeOnly:e.writeOnly||r.readOrWriteOnly==="writeonly",html:r.html||""}}function G(e,t=0,a="",r=!1,s=""){if(!e)return null;if(t>8)return{kind:"object",name:a,type:e.type||"object",title:e.title||"",description:e.description||"",required:r,truncated:!0};if(e.allOf){if(e.allOf.length===1&&!e.allOf[0].properties&&!e.allOf[0].items){let f={...e.allOf[0],...e,title:e.title||e.allOf[0].title||"",description:e.description||e.allOf[0].description||""};return delete f.allOf,G(f,t,a,r)}let n=[],i=[],o=null,l=[],c=e.title||"",d=e.description||"",u=e.deprecated||!1,h=e.readOnly||!1,m=e.writeOnly||!1,y=e.nullable||!1;return e.allOf.forEach((f,b)=>{if(f.title&&!c&&(c=f.title),f.description&&!d&&(d=f.description),f.deprecated&&(u=!0),f.readOnly&&(h=!0),f.writeOnly&&(m=!0),f.nullable&&(y=!0),f.type==="object"||f.properties||f.allOf||f.anyOf||f.oneOf){let x=(f.anyOf||f.oneOf)&&b>0?`${b}`:"",v=G(f,t+1,"",!1,x);v&&(v.kind==="object"?(v.properties&&n.push(...v.properties),v.patternProperties&&i.push(...v.patternProperties),v.additionalProperties&&(o=v.additionalProperties)):v.kind==="union"&&l.push(v))}else if(f.type==="array"||f.items){let x=G(f,t+1);x&&n.push(x)}else if(f.type){let x=`prop${n.length}`;n.push(G(f,t+1,x,!1))}}),{kind:"object",name:a,title:c,description:is({...e,title:c,description:d},t),required:r,deprecated:u,readOnly:h,writeOnly:m,nullable:y,dataTypeLabel:y?"object \u2503 null":"object",properties:n,patternProperties:i,additionalProperties:o,unions:l}}if(e.anyOf||e.oneOf){let n=e.anyOf?"anyOf":"oneOf",i=(e.anyOf||e.oneOf).map((l,c)=>{let d=l.title||"",u=G(l,t+1,d||`Option ${c+1}`,!1);return u&&(u.readOnly=!1,u.writeOnly=!1,u.optionIndex=c+1,u.optionTitle=d),u}).filter(Boolean),o=[];if((e.type==="object"||e.properties)&&e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=G(e.properties[l],t+1,l,c);d&&o.push(d)}return{kind:"union",operator:n,name:a,suffix:s,title:e.title||"",description:e.description||"",required:r,properties:o,options:i}}if(Array.isArray(e.type)){if(e.type.length===2&&e.type.includes("null")){if(e.type.includes("object"))return os(e,t,a,r);if(e.type.includes("array"))return ls(e,t,a,r)}let n=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e)),i=[],o=[];if(n.type.forEach(l=>{l.match(/integer|number|string|null|boolean/g)?i.push(l):l==="array"&&typeof n.items?.type=="string"&&n.items?.type.match(/integer|number|string|null|boolean/g)?n.items.type==="string"&&(n.items.format||n.items.contentMediaType)?i.push(`[${n.items.format||n.items.contentMediaType}]`):i.push(`[${n.items.type}]`):o.push(l)}),o.length===0&&i.length>0)return n.type=i.join("\u2503"),cs(n,a,r);if(o.length>0){let l=[],c=1;if(o.forEach(d=>{if(d==="object"){let u=os(e,t+1,e.title||`Option ${c}`,!1);u.optionIndex=c++,u.optionTitle=e.title||"",l.push(u)}else if(d==="array"){let u=ls(e,t+1,e.title||`Option ${c}`,!1);u.optionIndex=c++,u.optionTitle=e.title||"",l.push(u)}}),i.length>0){n.type=i.join("\u2503");let d=cs(n,`Option ${c}`,!1);d.optionIndex=c++,l.push(d)}return{kind:"union",operator:"oneOf",name:a,title:e.title||"",description:e.description||"",required:r,options:l}}}return e.type==="object"||e.properties?os(e,t,a,r):e.type==="array"||e.items?ls(e,t,a,r):cs(e,a,r)}function ds(e,t="",a="json"){let r=e,s="text";if(t?.toLowerCase().includes("json"))if(a==="text")r=typeof e=="string"?e:JSON.stringify(e,void 0,2),s="text";else if(typeof e=="object"&&e)r=e,s="json";else if(typeof e=="string")try{r=JSON.parse(e),s="json"}catch{r=e,s="text"}else r=e,s="json";else r=typeof e=="object"&&e?JSON.stringify(e,void 0,2):String(e??""),s="text";return{content:r,format:s}}function mt(e,t="",a=null,r=null,s=!0,n=!0,i="json",o=!1){let l=[],c=t?.toLowerCase().includes("json"),d=t?.toLowerCase().includes("xml");if(a&&typeof a=="object"&&Object.keys(a).length>0)for(let u in a){let{content:h,format:m}=ds(a[u]?.value===void 0?a[u]:a[u].value,t,i);l.push({exampleId:u,exampleSummary:a[u]?.summary||u,exampleDescription:a[u]?.description||"",exampleType:t,exampleValue:h,exampleFormat:m})}else if(r!=null&&(typeof r!="object"||Object.keys(r).length>0)){let{content:u,format:h}=ds(r?.value===void 0?r:r.value,t,i);l.push({exampleId:"Example",exampleSummary:r?.summary||"",exampleDescription:r?.description||"",exampleType:t,exampleValue:u,exampleFormat:h})}if(l.length===0||o===!0)if(e){let u=ke(e);if(u!=null){let{content:h,format:m}=ds(u,t,i);l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:h,exampleFormat:m})}else if(c||d||t?.toLowerCase().includes("text")||t?.toLowerCase().includes("yaml")||t?.toLowerCase().includes("*/*")){let h="",m="",y=i;d&&(h=e.xml?.name?`<${e.xml.name}${e.xml.namespace?` xmlns="${e.xml.namespace}"`:""}>`:"<root>",m=e.xml?.name?`</${e.xml.name}>`:"</root>",y="text");let f=re(e,{includeReadOnly:s,includeWriteOnly:n,deprecated:!0,useXmlTagForProp:d}),b=0;for(let x in f){if(!f[x])continue;let v=f[x]["::TITLE"]||`Example ${++b}`,k=f[x]["::DESCRIPTION"]||"",g="";d?g=`<?xml version="1.0" encoding="UTF-8"?>
${h}${ns(f[x],1)}
${m}`:(Gi(f[x]),g=i==="text"?JSON.stringify(f[x],null,2):f[x]),l.push({exampleId:x,exampleSummary:v,exampleDescription:k,exampleType:t,exampleFormat:y,exampleValue:g})}}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 mp(e){return e==="application/json"?"json":e==="application/xml"?"xml":null}function fp(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,mp(t),e.content[t]]}return[null,null,null]}var ps=Object.freeze([]);function Xi(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return{};t.add(e);let a={...e.properties||{}};return Array.isArray(e.allOf)&&e.allOf.forEach(r=>{Object.assign(a,Xi(r,t))}),a}function Yi(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return[];t.add(e);let a=Array.isArray(e.required)?[...e.required]:[];return Array.isArray(e.allOf)&&e.allOf.forEach(r=>{a.push(...Yi(r,t))}),[...new Set(a)]}var us={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"},Wt=!1,ft=null,yt=null,Vt=null,Pa=null,Ua=[],X={statusCode:"",statusStrategy:"first",delay:0,log:"true"},Ma=new Map;function Qi(e=[]){let t=new Set;return t.add(""),e.forEach(a=>{let r=a.computedUrl||a.url||"";if(r)try{if(r.startsWith("http://")||r.startsWith("https://")){let s=new URL(r).pathname.replace(/\/+$/,"");s&&t.add(s)}else{let s=r.replace(/\/+$/,"");s&&t.add(s.startsWith("/")?s:`/${s}`)}}catch{}}),Array.from(t)}function yp(e,t=""){let a=((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(`^${a}(?:\\/)?$`)}function gp(e){let t=[],a=Qi(e?.servers);if(!e?.tags||!Array.isArray(e.tags))return t;let r=new Set;return e.tags.forEach(s=>{(s.paths||[]).forEach(n=>{let i=(n.method||"GET").toUpperCase(),o=n.path||"",l=`${i} ${o}`;if(r.has(l))return;r.add(l);let c=(n.servers?.length>0?Qi(n.servers):a).map(d=>yp(o,d));t.push({method:i,pathTemplate:o,routeKey:l,patterns:c,responses:n.responses||{},parameters:n.parameters||[]})})}),t}function eo(e,t){if(!Ua.length||!t)return null;let a;try{let n=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost";a=new URL(t,n)}catch{return null}let r=(e||"GET").toUpperCase(),s=decodeURI(a.pathname);for(let n of Ua)if(n.method===r)for(let i of n.patterns){let o=s.match(i);if(o)return{route:n,pathParams:o.groups||{},url:a}}return null}function to(e,t,a,r={}){let s=(e||"").split(",").map(n=>n.trim()).filter(Boolean);if(s.length===0)return Object.keys(r).find(n=>n.startsWith("2"))||("default"in r?"default":Object.keys(r)[0]||"200");if(t==="random")return s[Math.floor(Math.random()*s.length)];if(t==="cycle"){let n=Ma.get(a)||0,i=s[n%s.length];return Ma.set(a,(n+1)%s.length),i}return s[0]}function ao(e,t){let a=e.responses?.[t]||e.responses?.[String(t)]||e.responses?.default,r={"X-Mock-Server":"RapiDoc","Access-Control-Allow-Origin":"*"},s="",n="application/json";if(a?.content){let i=Object.keys(a.content);n=i.find(l=>l.includes("json"))||i.find(l=>l.includes("xml"))||i.find(l=>l.includes("text"))||i[0]||"application/json";let o=a.content[n];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=mt(o.schema,n,null,null,!0,!1,"text",!0);if(l&&l.length>0){let c=l[0].exampleValue;s=typeof c=="object"?JSON.stringify(c,null,2):String(c)}}}}if(!s)if(String(t)==="204")s="";else if(n.includes("json")){let i=Number(t)||200;s=JSON.stringify({status:i,message:us[i]||"Mock Response"},null,2)}else s=us[Number(t)]||"OK";return a?.headers&&Object.entries(a.headers).forEach(([i,o])=>{o.schema?.default===void 0?o.example!==void 0&&(r[i]=String(o.example)):r[i]=String(o.schema.default)}),String(t)!=="204"&&(r["Content-Type"]=n),{statusCode:Number(t)||200,statusText:us[Number(t)]||(t==="default"?"OK":"Mock Response"),headers:r,body:s}}function Ha(e,t={}){X={statusCode:t.statusCode||"",statusStrategy:t.statusStrategy||"first",delay:Number(t.delay)||0,log:t.log!=="false"},Ua=gp(e),Ma.clear(),!Wt&&typeof window<"u"&&(!ft&&window.fetch&&(ft=window.fetch,window.fetch=async function(a,r={}){if(!Wt)return ft.apply(this,arguments);let s="",n="GET";typeof a=="string"?(s=a,n=r?.method||"GET"):a instanceof URL?(s=a.href,n=r?.method||"GET"):a&&typeof a=="object"&&"url"in a&&(s=a.url,n=r?.method||a.method||"GET");let i=eo(n,s);if(!i)return ft.apply(this,arguments);let o=to(X.statusCode,X.statusStrategy,i.route.routeKey,i.route.responses),l=ao(i.route,o);return X.delay>0&&await new Promise(c=>setTimeout(c,X.delay)),X.log,new Response(l.body,{status:l.statusCode,statusText:l.statusText,headers:l.headers})}),!yt&&window.XMLHttpRequest&&(yt=window.XMLHttpRequest.prototype.open,Vt=window.XMLHttpRequest.prototype.send,Pa=window.XMLHttpRequest.prototype.setRequestHeader,window.XMLHttpRequest.prototype.open=function(a,r,...s){return this._mockMethod=a,this._mockUrl=r,this._mockHeaders={},yt.apply(this,[a,r,...s])},window.XMLHttpRequest.prototype.setRequestHeader=function(a,r){return this._mockHeaders&&(this._mockHeaders[a]=r),Pa.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){if(!Wt)return Vt.apply(this,arguments);let a=eo(this._mockMethod,this._mockUrl);if(!a)return Vt.apply(this,arguments);let r=to(X.statusCode,X.statusStrategy,a.route.routeKey,a.route.responses),s=ao(a.route,r),n=X.delay>0?X.delay:10;setTimeout(()=>{X.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 i=Object.entries(s.headers).map(([o,l])=>`${o}: ${l}\r
`).join("");this.getAllResponseHeaders=()=>i,this.getResponseHeader=o=>{let l=o.toLowerCase(),c=Object.keys(s.headers).find(d=>d.toLowerCase()===l);return c?s.headers[c]: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()},n)}),Wt=!0)}function Wa(){Wt=!1,Ua=[],Ma.clear(),typeof window<"u"&&(ft&&=(window.fetch=ft,null),yt&&(window.XMLHttpRequest.prototype.open=yt,window.XMLHttpRequest.prototype.send=Vt,window.XMLHttpRequest.prototype.setRequestHeader=Pa,yt=null,Vt=null,Pa=null))}function ro(e={}){e.statusCode!==void 0&&(X.statusCode=e.statusCode),e.statusStrategy!==void 0&&(X.statusStrategy=e.statusStrategy),e.delay!==void 0&&(X.delay=Number(e.delay)||0),e.log!==void 0&&(X.log=e.log!=="false")}var Ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Va=e=>(...t)=>({_$litDirective$:e,values:t}),Ka=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},hs=class extends Ka{constructor(e){if(super(e),this.it=I,e.type!==Ce.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===I||e==null)return this._t=void 0,this.it=e;if(e===Y)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:[]}}};hs.directiveName="unsafeHTML",hs.resultType=1;var F=Va(hs);function O(e){if(typeof e!="string")return"";if(typeof window<"u"&&window.Sanitizer&&Element.prototype.setHTML)try{let s=document.createElement("div"),n=new window.Sanitizer({allowAttributes:{"*":["*"]}});return s.setHTML(e,{sanitizer:n}),s.innerHTML}catch{}let t;if(typeof DOMParser<"u")t=new DOMParser().parseFromString(e,"text/html");else return e;let a=t.querySelectorAll("script");for(let s=a.length-1;s>=0;s--)a[s].parentNode.removeChild(a[s]);let r=t.querySelectorAll("*");for(let s=0;s<r.length;s++){let n=r[s];for(let i=n.attributes.length-1;i>=0;i--){let o=n.attributes[i],l=o.name.toLowerCase(),c=o.value.toLowerCase();(l.startsWith("on")||(l==="href"||l==="src")&&(c.includes("javascript:")||c.includes("data:text/html")))&&n.removeAttribute(o.name)}}return t.body.innerHTML}var bp="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",vp="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",so="rapidoc";function no(e){try{let t=new TextEncoder().encode(e),a="";for(let r=0;r<t.byteLength;r++)a+=String.fromCharCode(t[r]);return btoa(a)}catch{return btoa(e)}}function Za(e){let t=new URLSearchParams;if(!e)return t;if(e instanceof URLSearchParams){for(let[a,r]of e.entries())t.set(a,r);return t}if(typeof e=="object")return Object.entries(e).forEach(([a,r])=>{r!=null&&t.set(a,String(r))}),t;if(typeof e=="string"){let a=e.trim();if(a.startsWith("{")&&a.endsWith("}"))try{let n=JSON.parse(a);if(typeof n=="object"&&n)return Object.entries(n).forEach(([i,o])=>{o!=null&&t.set(i,String(o))}),t}catch{}let r=a.startsWith("?")?a.slice(1):a,s=new URLSearchParams(r);for(let[n,i]of s.entries())t.set(n,i);return t}return t}function He(e,t="",a="",r=""){let s=this.resolvedSpec.securitySchemes?.find(i=>i.securitySchemeId===e);if(!s)return!1;let n="";return s.scheme?.toLowerCase()==="basic"?t&&(n=`Basic ${no(`${t}:${a}`)}`):r&&(s.value=r,n=`${s.scheme?.toLowerCase()==="bearer"?"Bearer ":""}${r}`),n?(s.finalKeyValue=n,this.requestUpdate(),!0):!1}function ms(){this.resolvedSpec.securitySchemes?.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue=""}),this.requestUpdate()}function fs(){return JSON.parse(localStorage.getItem(so))||{}}function io(e){localStorage.setItem(so,JSON.stringify(e))}function xp(){let e=fs.call(this);Object.values(e).forEach(t=>{He.call(this,t.securitySchemeId,t.username,t.password,t.value)})}function ys(e){let t="",a=this.resolvedSpec.securitySchemes.find(r=>r.securitySchemeId===e);if(a){let r=this.shadowRoot.getElementById(`security-scheme-${e}`);if(r){if(a.type&&a.scheme&&a.type==="http"&&a.scheme.toLowerCase()==="basic"){let s=r.querySelector(".api-key-user").value.trim(),n=r.querySelector(".api-key-password").value.trim();He.call(this,e,s,n)}else t=r.querySelector(".api-key-input").value.trim(),He.call(this,e,"","",t);if(this.persistAuth==="true"){let s=fs.call(this);s[e]=a,io.call(this,s)}}}}function oo(e,t,a="Bearer"){let r=this.resolvedSpec.securitySchemes.find(s=>s.securitySchemeId===e);r.finalKeyValue=`${a.toLowerCase()==="bearer"?"Bearer":a.toLowerCase()==="mac"?"MAC":a} ${t}`,this.requestUpdate()}async function gs(e,t,a,r,s,n,i,o,l="request-body",c=null,d=null,u=null,h=null){let m=o?o.querySelector(".oauth-resp-display"):void 0,y=new URLSearchParams,f=new Headers,b=Za(h);for(let[g,w]of b.entries())y.set(g,w);let x=Za(this.additionalTokenParams);for(let[g,w]of x.entries())y.set(g,w);y.set("grant_type",s),s!=="client_credentials"&&s!=="password"&&y.set("redirect_uri",r),n&&(y.set("code",n),y.set("code_verifier",bp)),l==="header"&&a?f.set("Authorization",`Basic ${no(`${t}:${a}`)}`):(t&&y.set("client_id",t),a&&y.set("client_secret",a)),s==="password"&&(y.set("username",d),y.set("password",u)),c&&y.set("scope",c);let v={method:"POST",headers:f,body:y},k=new CustomEvent("before-token-request",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:i,grantType:s,tokenUrl:e,params:y,headers:f,request:v}});if(!this.dispatchEvent(k))return!1;try{let g=await fetch(e,{method:v.method||"POST",headers:v.headers||f,body:v.body||y}),w=await g.json();if(g.ok){if(w.token_type&&w.access_token)return oo.call(this,i,w.access_token,w.token_type),m&&(m.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}else return m&&(m.innerHTML=`<span style="color:var(--red)">${w.error_description||w.error||"Unable to get access token"}</span>`),!1}catch{return m&&(m.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function wp(e,t,a,r,s,n,i,o,l,c,d=null){sessionStorage.removeItem("winMessageEventActive"),t.close(),!e.data.fake&&(e.data,e.data.error,e.data&&(e.data.responseType==="code"?gs.call(this,a,r,s,n,i,e.data.code,l,c,o,null,null,null,d):e.data.responseType==="token"&&oo.call(this,l,e.data.access_token,e.data.token_type)))}async function kp(e,t,a,r,s,n=null,i=null){let o=s.target.closest(".oauth-flow"),l=o.querySelector(".oauth-client-id")?o.querySelector(".oauth-client-id").value.trim():"",c=o.querySelector(".oauth-client-secret")?o.querySelector(".oauth-client-secret").value.trim():"",d=o.querySelector(".api-key-user")?o.querySelector(".api-key-user").value.trim():"",u=o.querySelector(".api-key-password")?o.querySelector(".api-key-password").value.trim():"",h=o.querySelector(".oauth-send-client-secret-in")?o.querySelector(".oauth-send-client-secret-in").value.trim():"request-body",m=[...o.querySelectorAll(".scope-checkbox:checked")],y=o.querySelector(`#${e}-pkce`),f=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,b=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,x=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`),v="",k="",g;if([...o.parentNode.querySelectorAll(".oauth-resp-display")].forEach(w=>{w.innerHTML=""}),t==="authorizationCode"||t==="implicit"){let w=new URL(a);t==="authorizationCode"?(v="authorization_code",k="code"):t==="implicit"&&(k="token");let $=new URLSearchParams(w.search),A=Za(n);for(let[C,q]of A.entries())$.set(C,q);let S=Za(this.additionalAuthorizeParams);for(let[C,q]of S.entries())$.set(C,q);let _=m.map(C=>C.value).join(" ");_&&$.set("scope",_),$.set("client_id",l),$.set("redirect_uri",x.toString()),$.set("response_type",k),$.set("state",f),$.set("nonce",b),y&&y.checked&&($.set("code_challenge",vp),$.set("code_challenge_method","S256")),$.set("show_dialog",!0);let N=new CustomEvent("before-authorize",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:e,flowType:t,authUrl:a,authParams:$}});if(!this.dispatchEvent(N))return;w.search=$.toString(),sessionStorage.getItem("winMessageEventActive")==="true"&&window.postMessage({fake:!0},"*"),setTimeout(()=>{g=window.open(w.toString()),g&&(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",C=>wp.call(this,C,g,r,l,c,x.toString(),v,h,e,o,i),{once:!0}))},10)}else if(t==="clientCredentials"){v="client_credentials";let w=m.map($=>$.value).join(" ");gs.call(this,r,l,c,x.toString(),v,"",e,o,h,w,null,null,i)}else if(t==="password"){v="password";let w=m.map($=>$.value).join(" ");gs.call(this,r,l,c,x.toString(),v,"",e,o,h,w,d,u,i)}}function $p(e,t,a,r,s,n=[],i="request-body",o=void 0,l="true",c=null,d=null){let{authorizationUrl:u,tokenUrl:h,refreshUrl:m}=s,y=s["x-pkce-only"]||!1,f=v=>v.indexOf("://")>0||v.indexOf("//")===0,b=new URL(this.selectedServer?.computedUrl).origin;m&&!f(m)&&(m=this.selectedServer?.computedUrl.trim().endsWith("/")&&!m.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${m.trim()}`:`${b}/${m.replace(/^\//,"")}`),h&&!f(h)&&(h=this.selectedServer?.computedUrl.trim().endsWith("/")&&!h.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${h.trim()}`:`${b}/${h.replace(/^\//,"")}`),u&&!f(u)&&(u=this.selectedServer?.computedUrl.trim().endsWith("/")&&!u.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${u.trim()}`:`${b}/${u.replace(/^\//,"")}`);let x;return x=e==="authorizationCode"?"Authorization Code Flow":e==="clientCredentials"?"Client Credentials Flow":e==="implicit"?"Implicit Flow":e==="password"?"Password Flow":e,p`<div class="oauth-flow ${e}" style="padding:12px 0;margin-bottom:12px"><div class="tiny-title upper" style="margin-bottom:8px">${x}</div>${u?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Auth URL</span> <span class="mono-font">${u}</span></div>`:""} ${h?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Token URL</span> <span class="mono-font">${h}</span></div>`:""} ${m?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Refresh URL</span> <span class="mono-font">${m}</span></div>`:""} ${e==="authorizationCode"||e==="clientCredentials"||e==="implicit"||e==="password"?p`${s.scopes?p`<span>Scopes</span><div class="oauth-scopes" part="section-auth-scopes" style="width:100%;display:flex;flex-direction:column;flex-wrap:wrap;margin:0 0 10px 24px">${Object.entries(s.scopes).map((v,k)=>p`<div class="m-checkbox" style="display:inline-flex;align-items:center"><input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${r}${e}${k}" ?checked="${n.includes(v[0])}" value="${v[0]}"> <label for="${r}${e}${k}" style="margin-left:5px;cursor:pointer"><span class="mono-font">${v[0]}</span> ${v[0]===v[1]?"":` - ${v[1]||""}`}</label></div>`)}</div>`:""} ${e==="password"&&l==="true"?p`<div style="margin:5px 0"><input type="text" placeholder="username" spellcheck="false" class="oauth2 ${e} ${r} api-key-user" part="textbox textbox-username" id="input-${r}-${e}-api-key-user"> <input type="password" placeholder="password" spellcheck="false" class="oauth2 ${e} ${r} api-key-password" style="margin:0 5px" part="textbox textbox-password" id="input-${r}-${e}-api-key-password"></div>`:""} ${l==="true"?p`<div>${e==="authorizationCode"?p`<div style="margin:16px 0 4px"><input type="checkbox" part="checkbox checkbox-auth-scope" id="${r}-pkce" checked="checked" ?disabled="${y}"> <label for="${r}-pkce" style="margin:0 16px 0 4px;line-height:24px;cursor:pointer">Send Proof Key for Code Exchange (PKCE)</label></div>`:""} <input type="text" part="textbox textbox-auth-client-id" value="${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${r} oauth-client-id"> ${e==="authorizationCode"||e==="clientCredentials"||e==="password"?p`<input id="${r}-${e}-oauth-client-secret" type="password" part="textbox textbox-auth-client-secret" value="${a||""}" placeholder="client-secret" spellcheck="false" class="oauth2 ${e} ${r} oauth-client-secret" style="margin:0 5px;${y?"display:none;":""}"> <select style="margin-right:5px;${y?"display:none;":""}" class="${e} ${r} oauth-send-client-secret-in">${!o||o.includes("request-body")?p`<option value="request-body" .selected="${i==="request-body"}">Request Body</option>`:""} ${!o||o.includes("header")?p`<option value="header" .selected="${i==="header"}">Authorization Header</option>`:""}</select>`:""} ${e==="authorizationCode"||e==="clientCredentials"||e==="implicit"||e==="password"?p`<button class="m-btn thin-border" part="btn btn-outline" @click="${v=>{kp.call(this,r,e,u,h,v,c,d)}}">GET TOKEN</button>`:""}</div><div class="oauth-resp-display red-text small-font-size"></div>`:""}`:""}</div>`}function Sp(e){let t=this.resolvedSpec.securitySchemes?.find(a=>a.securitySchemeId===e);if(t.user="",t.password="",t.value="",t.finalKeyValue="",this.persistAuth==="true"){let a=fs.call(this);delete a[t.securitySchemeId],io.call(this,a)}this.requestUpdate()}function lo(e="true"){if(!this.resolvedSpec)return"";let t=this.resolvedSpec.securitySchemes?.filter(a=>a.finalKeyValue);if(t)return p`<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 "}"><div class="sub-title regular-font">AUTHENTICATION</div>${e==="true"?p`<div class="small-font-size" style="display:flex;align-items:center;min-height:30px">${t.length>0?p`<div class="blue-text">${t.length} API key applied</div><div style="flex:1"></div><button class="m-btn thin-border" part="btn btn-outline" @click="${()=>{ms.call(this)}}">CLEAR ALL API KEYS</button>`:p`<div class="red-text">No API key applied</div>`}</div>`:""} ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?p`<table role="presentation" id="auth-table" class="m-table padded-12" style="width:100%">${this.resolvedSpec.securitySchemes.filter(a=>a.type).map(a=>p`<tr id="security-scheme-${a.securitySchemeId}" class="${a.type.toLowerCase()}"><td style="max-width:500px;overflow-wrap:break-word"><div style="line-height:28px;margin-bottom:5px"><span style="font-weight:700;font-size:var(--font-size-regular)">${a.typeDisplay}</span> ${a.finalKeyValue?p`<span class="blue-text">${a.finalKeyValue?"Key Applied":""} </span><button class="m-btn thin-border small" part="btn btn-outline" @click="${()=>{Sp.call(this,a.securitySchemeId)}}">REMOVE</button>`:""}</div>${a.description?p`<div class="m-markdown">${F(O(E(a.description||"")))}</div>`:""} ${a.type.toLowerCase()==="apikey"?p`<div style="margin-bottom:5px">Send <code>${a.name}</code> in <code>${a.in}</code></div>${e==="true"?p`<div style="max-height:28px">${a.in==="cookie"?p`<span class="gray-text" style="font-size::var(--font-size-small)">cookies cannot be set from here</span>`:p`<input type="text" value="${a.value}" class="${a.type} ${a.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${a.type}-${a.securitySchemeId}-api-key-input"> <button class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${()=>{ys.call(this,a.securitySchemeId)}}">${a.finalKeyValue?"UPDATE":"SET"}</button>`}</div>`:""}`:""} ${a.type.toLowerCase()==="http"&&a.scheme?.toLowerCase()==="basic"?p`<div style="margin-bottom:5px">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"?p`<div><input type="text" value="${a.user}" placeholder="username" spellcheck="false" class="${a.type} ${a.securitySchemeId} api-key-user" style="width:100px" id="input-${a.type}-${a.securitySchemeId}-api-key-user"> <input type="password" value="${a.password}" placeholder="password" spellcheck="false" class="${a.type} ${a.securitySchemeId} api-key-password" style="width:100px;margin:0 5px" id="input-${a.type}-${a.securitySchemeId}-api-key-password"> <button class="m-btn thin-border" @click="${()=>{ys.call(this,a.securitySchemeId)}}" part="btn btn-outline">${a.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${a.type.toLowerCase()==="http"&&a.scheme?.toLowerCase()==="bearer"?p`<div style="margin-bottom:5px">Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and token value</div>${e==="true"?p`<div style="max-height:28px"><input type="text" value="${a.value}" class="${a.type} ${a.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${a.type}-${a.securitySchemeId}-api-key-input"> <button class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${()=>{ys.call(this,a.securitySchemeId)}}">${a.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""}</td></tr>${a.type.toLowerCase()==="oauth2"?p`<tr><td style="border:none;padding-left:48px">${Object.keys(a.flows).map(r=>$p.call(this,r,a.flows[r]["x-client-id"]||a["x-client-id"]||"",a.flows[r]["x-client-secret"]||a["x-client-secret"]||"",a.securitySchemeId,a.flows[r],a.flows[r]["x-default-scopes"]||a["x-default-scopes"],a.flows[r]["x-receive-token-in"]||a["x-receive-token-in"],a.flows[r]["x-receive-token-in-options"]||a["x-receive-token-in-options"],e,a.flows[r]["x-authorize-params"]||a["x-authorize-params"]||null,a.flows[r]["x-token-params"]||a["x-token-params"]||null))}</td></tr>`:""}`)}</table>`:""}<slot name="auth"></slot></section>`}function Ep(e,t,a){let r=e.scopes?p`<div><b>Required scopes:</b><br><div style="margin-left:8px">${e.scopes.split(",").map((s,n)=>p`${n===0?"":"\u2503"}<span>${s.trim()}</span>`)}</div></div>`:"";return e.type==="oauth2"?p`<div>${t?p`<b>${a+1}.</b>  `:"Needs "}OAuth Token <span style="font-family:var(--font-mono);color:var(--primary)">${e.securitySchemeId}</span> in <b>Authorization header</b> ${r}</div>`:e.type==="http"?p`<div>${t?p`<b>${a+1}.</b>  `:"Requires "} ${e.scheme==="basic"?"Base 64 encoded username:password":p`Bearer Token <b>${e.nameId}</b>`} in <b>Authorization header</b> ${r}</div>`:p`<div>${t?p`<b>${a+1}.</b>  `:"Requires "} Token in <b>${e.name} ${e.in}</b> ${r}</div>`}function co(e){if(!this.resolvedSpec.securitySchemes||!Array.isArray(e)||e.length===0)return"";let t=e.some(s=>!s||Object.keys(s).length===0),a=e.filter(s=>s&&Object.keys(s).length>0);if(a.length===0)return"";let r=[];return a.forEach(s=>{let n=[],i=[];Object.keys(s).forEach(l=>{let c="",d=this.resolvedSpec.securitySchemes.find(u=>u.securitySchemeId===l);s[l]&&Array.isArray(s[l])&&(c=s[l].join(", ")),d&&(i.push(d.typeDisplay),n.push({...d,scopes:c}))});let o=i.length>1?`${i[0]} + ${i.length-1} more`:i[0];r.push({securityTypes:t?`${o} (Optional)`:o,securityDefs:n})}),p`<div style="position:absolute;top:3px;right:2px;font-size:var(--font-size-small);line-height:1.5"><div style="position:relative;display:flex;min-width:350px;max-width:700px;justify-content:flex-end"><svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--muted-foreground)"><rect x="5" y="11" width="14" height="10" rx="2"/><circle cx="12" cy="16" r="1"/><path d="M8 11v-4a4 4 0 0 1 8 0v4"/></svg> ${r.map((s,n)=>{if(!s.securityTypes)return"";let i=s.securityDefs.length>1,o=this.updateRoute==="true"&&this.allowAuthentication==="true"&&s.securityDefs.length>0?p`<a part="anchor anchor-operation-security" href="#auth">${s.securityTypes}</a>`:p`${s.securityTypes}`;return p`${n===0?"":p`<div style="padding:3px 4px">OR</div>`}<div class="tooltip" style="${s.securityDefs.length===0?"cursor:default;":""}"><div style="padding:2px 4px;white-space:nowrap;text-overflow:ellipsis;max-width:150px;overflow:hidden">${o}</div>${s.securityDefs.length>0?p`<div class="tooltip-text" style="position:absolute;color:var(--foreground);top:26px;right:0;border:1px solid var(--border);padding:4px 6px;display:block">${i?p`<div>Requires <b>all</b> of the following:</div>`:""}<div style="padding-left:${i?"8px":"0"}">${s.securityDefs.map((l,c)=>Ep(l,i,c))}</div></div>`:""}</div>`})}</div></div>`}function po(e){return p`<section class="table-title" style="margin-top:24px">CODE SAMPLES<div part="tab-panel" class="tab-panel col" @click="${t=>{if(!t.target.classList.contains("tab-btn"))return;let a=t.target.dataset.tab,r=[...t.currentTarget.querySelectorAll(".tab-btn")],s=[...t.currentTarget.querySelectorAll(".tab-content")];r.forEach(n=>n.classList[n.dataset.tab===a?"add":"remove"]("active")),s.forEach(n=>{n.style.display=n.dataset.tab===a?"block":"none"}),oa(t.currentTarget.getRootNode()?.host?.shadowRoot||t.currentTarget)}}"><div part="tab-btn-row" class="tab-buttons row" style="width:100">${e.map((t,a)=>p`<button part="tab-btn" class="tab-btn ${a===0?"active":""}" data-tab="${t.lang}${a}">${t.label||t.lang}</button>`)}</div>${e.map((t,a)=>p`<div class="tab-content m-markdown" style="display:${a===0?"block":"none"}" data-tab="${t.lang}${a}"><button class="toolbar-btn" part="btn btn-fill btn-copy" style="position:absolute;top:12px;right:8px" @click="${r=>{Ot(t.source,r)}}">Copy</button><pre><code class="language-${t.lang?.toLowerCase()}">${t.source}</code></pre></div>`)}</div></section>`}function uo(e){return p`<div class="req-res-title" style="margin-top:12px">CALLBACKS</div>${Object.entries(e).map(t=>p`<div class="tiny-title" style="padding:12px;border:1px solid var(--border)">${t[0]} ${Object.entries(t[1]).map(a=>p`<div class="mono-font small-font-size" style="display:flex;margin-left:16px"><div style="width:100%">${Object.entries(a[1]).map(r=>p`<div><div style="margin-top:12px"><div class="method method-fg ${r[0]}" style="width:70px;border:none;margin:0;padding:0;line-height:20px;vertical-align:baseline;text-align:left"><span style="font-size:20px">⥄ </span>${r[0]}</div><span style="line-height:20px;vertical-align:baseline">${a[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="${r[0]||""}" path="${a[0]||""}" .parameters="${r[1]?.parameters||""}" .request_body="${r[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="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, 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="${r[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="btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, 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"></api-response></div></div>`)}</div></div>`)}</div>`)}`}var Ap={},Kt=Va(class extends Ka{constructor(){super(...arguments),this.ot=Ap}render(e,t){return t()}update(e,[t,a]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,s)=>r===this.ot[s]))return Y}else if(this.ot===t)return Y;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,a)}}),Ja=B`.border-top{border-top:1px solid var(--border)}.border,.light-border{border:1px solid var(--border);border-radius:var(--card-radius)}.pad-8-16{padding:8px 16px}.pad-top-8{padding-top:8px}.mar-top-8{margin-top:8px}`;function Dp(e="",t={}){let a=e;if(!t||typeof t!="object")return a;for(let[r,s]of Object.entries(t)){let n=s==null?"":String(s),i=`{${r}}`;a=a.replaceAll(i,encodeURIComponent(n))}return a}function Cp(e,t,a={}){let{style:r="form",explode:s=r==="form",isArray:n=Array.isArray(t),isObject:i=!1}=a;if(t==null||t==="")return[];if(i||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(r==="json")return[[e,JSON.stringify(o)]];if(r==="xml")return[[e,ns(o)]];let l=[];for(let c of Object.keys(o)){let d=`${e}[${c}]`,u=o[c];if(u!=null)if(typeof u=="object"&&Array.isArray(u)){let h=u.filter(m=>m!==""&&m!=null);h.length>0&&(r==="spaceDelimited"?l.push([d,h.join(" ")]):r==="pipeDelimited"?l.push([d,h.join("|")]):s?h.forEach(m=>l.push([d,String(m)])):l.push([d,h.join(",")]))}else typeof u=="object"?l.push([d,JSON.stringify(u)]):l.push([d,String(u)])}return l}if(n||Array.isArray(t)){let o=(Array.isArray(t)?t:[t]).filter(l=>l!==""&&l!=null);return o.length===0?[]:r==="spaceDelimited"?[[e,o.join(" ")]]:r==="pipeDelimited"?[[e,o.join("|")]]:s?o.map(l=>[e,String(l)]):[[e,o.join(",")]]}return[[e,String(t)]]}function Tp(e){return encodeURI(e).replace(/&/g,"%26").replace(/=/g,"%3D").replace(/\+/g,"%2B")}function Fp(e=[]){if(!Array.isArray(e)||e.length===0)return"";let t=[];for(let a of e){let{name:r,value:s,style:n="form",explode:i=n==="form",allowReserved:o=!1,isArray:l=!1,isObject:c=!1}=a,d=Cp(r,s,{style:n,explode:i,isArray:l,isObject:c});for(let[u,h]of d){let m=encodeURIComponent(u),y=o?Tp(h):encodeURIComponent(h);t.push(`${m}=${y}`)}}return t.join("&")}function Op(e="",t=""){return`${(e||"").replace(/\/+$/,"")}${t?`/${t.replace(/^\/+/,"")}`:""}`}function _p({serverUrl:e="",path:t="",pathParams:a={},queryParams:r=[],apiKeys:s=[]}={}){let n=Dp(t,a),i=Fp(r);return i&&(n=`${n}${n.includes("?")?"&":"?"}${i}`),Array.isArray(s)&&s.filter(o=>o&&o.in==="query"&&o.finalKeyValue).forEach(o=>{n=`${n}${n.includes("?")?"&":"?"}${encodeURIComponent(o.name)}=${encodeURIComponent(o.finalKeyValue)}`}),Op(e,n)}function bs(e){if(!e||typeof e!="string")return e||"";let t=[];return e.split(",").map(a=>{let r=a.trim(),s=r.toLowerCase();return t.includes(s)?null:(t.push(s),r)}).filter(a=>a!==null).join(", ")}function jp({method:e="GET",url:t="",headers:a,body:r,contentType:s="",baseLocation:n=typeof location<"u"?location.href:""}={}){let i=t;if(!t.startsWith("http://")&&!t.startsWith("https://")&&n)try{i=new URL(t,n).href}catch{i=t}let o=`curl -X ${e.toUpperCase()} "${i}" \\
`,l=[];a instanceof Headers||a&&typeof a.forEach=="function"?a.forEach((m,y)=>{l.push([y,bs(m)])}):Array.isArray(a)?a.forEach(([m,y])=>{l.push([m,bs(y)])}):a&&typeof a=="object"&&Object.entries(a).forEach(([m,y])=>{l.push([m,bs(String(y))])});let c=l.map(([m,y])=>` -H '${m}: ${y}'`).join(`\\
`);c&&=`${c} \\
`;let d="",u="";if(typeof URLSearchParams<"u"&&r instanceof URLSearchParams)d=` -d ${r.toString()} \\
`;else if(typeof File<"u"&&r instanceof File)d=` --data-binary @${r.name} \\
`;else if(typeof FormData<"u"&&r instanceof FormData)u=Array.from(r).map(([m,y])=>typeof File<"u"&&y instanceof File?` -F "${m}=@${y.name}"`:` -F "${m}=${typeof y=="string"?y.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):y}"`).join(`\\
`),u&&=`${u} \\
`;else if(r!=null&&r!==""){let m=typeof r=="object"?JSON.stringify(r):String(r);if(s.includes("json")||m.trim().startsWith("{")&&m.trim().endsWith("}"))try{d=` -d '${JSON.stringify(JSON.parse(m)).replace(/'/g,"'\\''")}' \\
`}catch{}d||=` -d '${m.replace(/'/g,`'"'"'`)}' \\
`}let h=`${o}${c}${d}${u}`;return h.endsWith(` \\
`)?h.slice(0,-3):h}function Rp(e,t={}){let{explode:a=!1,isObject:r=!1}=t;if(e==null||e==="")return"";if(r||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 n=a?"=":",";return Object.keys(s).map(i=>{let o=s[i],l=typeof o=="object"?JSON.stringify(o):String(o);return`${i}${n}${l}`}).join(",")}return Array.isArray(e)?e.filter(s=>s!==""&&s!=null).join(","):String(e)}function Np({accept:e="",apiKeys:t=[],headerParams:a=[],contentType:r=""}={}){let s=new Headers;return e&&s.append("Accept",e),Array.isArray(t)&&t.filter(n=>n&&n.in==="header"&&n.finalKeyValue).forEach(n=>{s.append(n.name,n.finalKeyValue)}),Array.isArray(a)&&a.forEach(n=>{if(n&&n.name&&n.value!==void 0&&n.value!==null&&n.value!==""){let i=Rp(n.value,{explode:n.explode===!0||n.explode==="true",isObject:n.isObject===!0});i&&s.append(n.name,i)}}),r&&!r.includes("form-data")&&s.append("Content-Type",r),s}function ho(e=[],t=""){let a=new URLSearchParams;if(t)try{let r=JSON.parse(t);if(r&&typeof r=="object"){for(let s of Object.keys(r))a.append(s,typeof r[s]=="object"?JSON.stringify(r[s]):String(r[s]));return a}}catch{}return Array.isArray(e)&&e.forEach(r=>{if(r&&r.name&&r.value!==void 0&&r.value!==null&&r.value!=="")if(r.isArray){let s=(Array.isArray(r.value)?r.value:[r.value]).filter(n=>n!==""&&n!=null);s.length>0&&a.append(r.name,s.join(","))}else a.append(r.name,String(r.value))}),a}function qp(e=[]){let t=new FormData;return Array.isArray(e)&&e.forEach(a=>{if(a&&a.name){if(typeof File<"u"&&a.file instanceof File){t.append(a.name,a.file,a.file.name);return}a.value!==void 0&&a.value!==null&&a.value!==""&&(a.isArray?(Array.isArray(a.value)?a.value:[a.value]).filter(r=>r!==""&&r!=null).forEach(r=>{typeof File<"u"&&r instanceof File?t.append(a.name,r,r.name):t.append(a.name,String(r))}):t.append(a.name,String(a.value)))}}),t}function Lp(e,{indentor:t="  ",textNodesOnSameLine:a=!0}={}){if(!e||typeof e!="string")return"";let r=e.split(/(<[^>]+>)/g).map(i=>i.trim()).filter(Boolean),s=0,n=[];for(let i=0;i<r.length;i++){let o=r[i],l=/^<\//.test(o),c=/\/>$/.test(o),d=/^<[^/!?]/.test(o)&&!c;l&&(s=Math.max(0,s-1));let u=t.repeat(s);if(a&&d&&i+2<r.length&&!r[i+1].startsWith("<")&&r[i+2].startsWith("</")){let h=o.match(/^<([a-zA-Z0-9_\-:]+)/)?.[1],m=r[i+2].match(/^<\/([a-zA-Z0-9_\-:]+)/)?.[1];if(h&&m&&h===m){n.push(`${u}${o}${r[i+1]}${r[i+2]}`),i+=2;continue}}n.push(`${u}${o}`),d&&s++}return n.join(`
`)}async function Bp(e){let t,a,r,s=!1,n="",i="",o="",l="",c=e.headers.get("content-type");if((await e.clone().text()).length===0)l="";else if(c){if(c=c.split(";")[0].trim(),c==="application/x-ndjson")l=await e.text();else if(c.includes("json"))if(/charset=[^"']+/.test(c)){let d=c.split("charset=")[1],u=await e.arrayBuffer();try{r=new TextDecoder(d).decode(u)}catch{r=new TextDecoder("utf-8").decode(u)}try{a=JSON.parse(r),l=JSON.stringify(a,null,2)}catch{l=r}}else a=await e.json(),l=JSON.stringify(a,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(c)?(s=!0,n="download"):/^image/.test(c)?(s=!0,n="image"):/^audio|^image|^video/.test(c)?(s=!0,n="view"):(r=await e.text(),l=c.includes("xml")?Lp(r,{textNodesOnSameLine:!0,indentor:"  "}):r);if(s){let d=e.headers.get("content-disposition")||"",u="filename";if(d){let h=d.match(/filename\*=\s*UTF-8''([^;]+)/);if(h)u=decodeURIComponent(h[1]);else{let m=d.match(/filename="?([^"]+)"?/);m&&(u=m[1])}}o=u,t=await e.blob(),typeof URL<"u"&&URL.createObjectURL&&(i=URL.createObjectURL(t))}}else r=await e.text(),l=r;return{responseText:l,respJson:a,respBlob:t,respText:r,responseIsBlob:s,responseBlobType:n,responseBlobUrl:i,respContentDisposition:o}}function Ip(e,t={}){let{callback:a=!1,webhook:r=!1}=t,s=a===!0||a==="true"||r===!0||r==="true",n={},i={},o="",l="";if(!e||typeof e!="object")return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l};for(let c of Object.keys(e)){if(c==="$$ref")continue;o||=c;let d={},u=e[c]?.content;if(u&&typeof u=="object")for(let m of Object.keys(u)){let y=u[m];l||=m;let f=y?.schema?G(y.schema):null,b=mt(y?.schema,m,de(y?.examples),de(y?.example),!s,s,m.includes("json")?"json":"text");d[m]={description:e[c].description,examples:b,selectedExample:b[0]?.exampleId||"",schemaTree:f}}let h=[];if(e[c]?.headers)for(let m of Object.keys(e[c].headers))h.push({name:m,...e[c].headers[m]});n[c]=h,i[c]=d}return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l}}var{I:zp}=al,mo=e=>e,Pp=e=>e.strings===void 0,fo=()=>document.createComment(""),Zt=(e,t,a)=>{let r=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(a===void 0)a=new zp(r.insertBefore(fo(),s),r.insertBefore(fo(),s),e,e.options);else{let n=a._$AB.nextSibling,i=a._$AM,o=i!==e;if(o){let l;a._$AQ?.(e),a._$AM=e,a._$AP!==void 0&&(l=e._$AU)!==i._$AU&&a._$AP(l)}if(n!==s||o){let l=a._$AA;for(;l!==n;){let c=mo(l).nextSibling;mo(r).insertBefore(l,s),l=c}}}return a},We=(e,t,a=e)=>(e._$AI(t,a),e),Up={},yo=(e,t=Up)=>e._$AH=t,Mp=e=>e._$AH,vs=e=>{e._$AR(),e._$AA.remove()},Jt=Va(class extends Ka{constructor(e){if(super(e),e.type!==Ce.PROPERTY&&e.type!==Ce.ATTRIBUTE&&e.type!==Ce.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pp(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Y||t===I)return t;let a=e.element,r=e.name;if(e.type===Ce.PROPERTY){if(t===a[r])return Y}else if(e.type===Ce.BOOLEAN_ATTRIBUTE){if(!!t===a.hasAttribute(r))return Y}else if(e.type===Ce.ATTRIBUTE&&a.getAttribute(r)===t+"")return Y;return yo(e),t}}),go=B`*,:before,:after{box-sizing:border-box}.tr{box-sizing:content-box;border-bottom:1px dotted #0000;flex:none;width:100%;transition:max-height .3s ease-out;display:flex}.td{flex:none;display:block}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-all-descr .key{overflow:hidden}.expanded-all-descr .key-descr .descr-expand-toggle{display:none}.key-descr .descr-expand-toggle{user-select:none;color:var(--foreground);cursor:pointer;margin-right:4px;transition:transform .2s;display:inline-block;transform:rotate(45deg)}.key-descr .m-markdown-small{vertical-align:top;max-width:100%;display:inline-block}.key-descr .m-markdown-small p{margin:0;display:inline}.key-descr .m-markdown-small p+p{margin-top:4px;display:block}.key-descr .item-details{margin-top:2px;display:block}.expanded-descr .key-descr .descr-expand-toggle,.key-descr .descr-expand-toggle.expanded-descr{transform:rotate(270deg)}.key-descr .descr-expand-toggle:hover{color:var(--primary)}.expanded-descr .more-content{display:none}.key-descr{font-family:var(--font-regular);color:var(--muted-foreground);text-overflow:ellipsis;flex-shrink:1;display:none;overflow:hidden}.expanded-descr .key-descr{max-height:auto;display:none;overflow:hidden}.xxx-of-key{font-size:calc(var(--font-size-small) - 3px);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-regular);color:var(--primary);font-size:calc(var(--font-size-small) - 2px);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(--red)}.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}.schema-root-type{cursor:auto;color:var(--card-foreground);text-transform:uppercase;font-weight:700}.toolbar-item:first-of-type{margin:0 2px 0 0}@container (width>=500px){.key-descr,.expanded-descr .key-descr{display:block}}`,Hp=class extends se{static get properties(){return{config:{type:Object},data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}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")}static get styles(){return[qe,go,Ja,B`.tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);direction:ltr}.tree .tr:hover{background:var(--muted)}.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 8px);overflow:hidden}.tree .tr.expanded-descr{max-height:none}.tree .key{max-width:300px}.tr.expanded:hover>.td.key>.open-bracket{color:var(--primary)}.tr.expanded:hover+.inside-bracket{border-left:1px solid var(--muted-foreground)}.tr.expanded:hover+.inside-bracket+.close-bracket{color:var(--primary)}.inside-bracket.xxx-of-option{border-left:1px solid #0000}.open-bracket{cursor:pointer;border-radius:var(--card-radius);border:1px solid #0000;padding:0 20px 0 0;display:inline-block}.open-bracket:hover{color:var(--primary);background:var(--muted);border:1px solid var(--border)}.close-bracket{font-family:var(--font-mono);display:inline-block}.tr.collapsed+.inside-bracket,.tr.collapsed+.inside-bracket+.close-bracket{display:none;overflow:hidden}.inside-bracket.object,.inside-bracket.array{border-left:1px dotted var(--border)}.tr.expanded .open-bracket .open-bracket-collapsed,.tr.collapsed .open-bracket .open-bracket-expanded{display:none}`,Xe]}render(){if(!this.data)return p`<div class="tree"><span class="mono-font" style="color:var(--red)">Schema not found</span></div>`;let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return p`<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${a=>this.handleAllEvents(a)}"><div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?p`<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><span part="schema-description" class="m-markdown">${F(O(E(t)))}</span> ${this.renderAST(this.data)}</div>`}renderAST(e,t="",a=0,r=0){if(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)return"";let s=400-r*12,n=a<this.schemaExpandLevel,i=e.readOnly?p`🆁`:e.writeOnly?p`🆆`:"",o=e.readOnly?"Read-Only":e.writeOnly?"Write-Only":"",l=e.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:"";if(e.kind==="array"){let c=e.items;if(!c)return p`<div class="tr ${n?"expanded":"collapsed"} array" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array">[ ]</span></div><div class="td key-descr m-markdown-small">${F(O(E(e.description||"")))}</div></div>`;if(c.kind==="primitive"){let m=c.format||c.contentMediaType||c.type||"string",y=m.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),f=!!(e.description||c.description),b=!!(c.constraints||c.defaultValue||c.allowedValues||c.pattern||c.contentMediaType||c.contentEncoding),x=b||J(e.description)||J(c.description),v=f&&x?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",k=p`${c.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${c.constraints}</div>`:""} ${c.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${c.defaultValue}</div>`:""} ${c.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${c.type==="const"?"Value":"Allowed"}: </span>${c.allowedValues}</div>`:""} ${c.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${c.pattern}</div>`:""} ${c.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${c.contentMediaType}</div>`:""} ${c.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${c.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}:</span>`:""} <span class="${y}" title="${o}">[${m}]${i}</span></div><div class="td key-descr">${f?p`<span class="m-markdown-small">${v} ${F(O(E(e.description||c.description)))}</span>`:""} ${f&&b?p`<div class="item-details">${k}</div>`:k}</div></div>`}if(c.kind==="object"){let m=p`<span class="open-bracket array-of-object"><span class="open-bracket-expanded">[{</span><span class="open-bracket-collapsed">[{...}]</span></span>`,y=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} object ${c.nullable?"nullable":""}" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${m}</div><div class="td key-descr m-markdown-small">${y} ${F(O(E(e.description||c.description||"")))}</div></div><div class="inside-bracket object" style="padding-left:${12}px">${c.properties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.patternProperties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.additionalProperties?this.renderAST(c.additionalProperties,"object",a+1,r+1):""} ${c.unions?.map(f=>this.renderAST(f,"object",a+1,r+1))}</div><div class="close-bracket">${"}]"}</div>`}if(c.kind==="array"){let m=e.arrayType==="object"?"":e.arrayType,y=p`<span class="open-bracket array-of-array" data-array-type="${m}"><span class="open-bracket-expanded">[[ ${m} </span><span class="open-bracket-collapsed">[[...]]</span></span>`,f=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} array ${e.nullable?"nullable":""}" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${y}</div><div class="td key-descr m-markdown-small">${f} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",a+1,r+1)}</div><div class="close-bracket">${"]]"}</div>`}let d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} array" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array"><span class="open-bracket-expanded">[</span><span class="open-bracket-collapsed">[...]</span></span></div><div class="td key-descr m-markdown-small">${h} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",a+1,r+1)}</div><div class="close-bracket">]</div>`}if(e.kind==="object"){let c=p`<span class="open-bracket object">${e.nullable?"null\u2503":""}<span class="open-bracket-expanded">{</span><span class="open-bracket-collapsed">{...}</span></span>`,d=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} object ${e.nullable?"nullable":""}" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${c}</div><div class="td key-descr m-markdown-small">${d} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket object" style="padding-left:${12}px">${e.properties?.map(u=>this.renderAST(u,"object",a+1,r+1))} ${e.patternProperties?.map(u=>this.renderAST(u,"object",a+1,r+1))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",a+1,r+1):""} ${e.unions?.map(u=>this.renderAST(u,"object",a+1,r+1))}</div><div class="close-bracket">${"}"}</div>`}if(e.kind==="union"){let c=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),d=t==="xxx-of-option"?r:r+1,u=!!e.description,h=J(e.description),m=u&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`${e.properties?.map(y=>this.renderAST(y,"object",a,r))}<div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${s}px"><span class="key-label xxx-of-key">${c}</span></div><div class="td key-descr m-markdown-small">${m} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket xxx-of-option" style="padding-left:0">${e.options?.map((y,f)=>p`<div><div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${s}px"><span class="key-label xxx-of-key">OPT ${y.optionIndex||f+1}</span> ${y.optionTitle?p`<span class="xxx-of-descr">${y.optionTitle}</span>`:""}</div></div>${this.renderAST(y,"xxx-of-option",a,d)}</div>`)}</div>`}if(e.kind==="primitive"){let c=(e.type||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),d=!!(e.description||e.title),u=!!(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding),h=u||J(e.description),m=d&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=p`${e.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${e.constraints}</div>`:""} ${e.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${e.defaultValue}</div>`:""} ${e.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${e.type==="const"?"Value":"Allowed"}: </span>${e.allowedValues}</div>`:""} ${e.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${e.pattern}</div>`:""} ${e.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${e.contentMediaType}</div>`:""} ${e.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${e.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}:</span>`:""} <span class="${c}" title="${o}">${t==="array"?`[${e.type}]`:e.type}${i}</span></div><div class="td key-descr">${d?p`<span class="m-markdown-small">${m} ${F(O(E(e.title?e.description?`<b>${e.title}:</b> ${e.description}`:`<b>${e.title}</b>`:e.description)))}</span>`:""} ${d&&u?p`<div class="item-details">${y}</div>`:y}</div></div>`}return""}handleAllEvents(e){let t=e.target.closest(".open-bracket");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.classList.contains("descr-expand-toggle")){let a=e.target.closest(".tr");a&&(a.classList.toggle("expanded-descr"),a.classList.contains("expanded-descr")?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight="")}}toggleObjectExpand(e){let t=e.closest(".tr");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};customElements.define("schema-tree",Hp);var Wp=class extends se{render(){let e="";return Array.isArray(this.value)&&(e=p`${this.value.filter(t=>t!==""&&t!=null&&String(t).trim()!=="").map(t=>p`<span class="tag">${t}</span>`)}`),p`<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()}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value",hasChanged(e,t){return e===t?!1:!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.some((a,r)=>a!==t[r])}}}}attributeChangedCallback(e,t,a){e==="value"&&a&&t!==a&&(this.value=a.split(",").filter(r=>r.trim()!=="")),super.attributeChangedCallback(e,t,a)}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"),a=t?t.split(",").filter(r=>r.trim()!==""):"";a&&(this.value=Array.isArray(this.value)?[...this.value,...a]:a,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[B`.tags{border-radius:var(--border-radius);border:1px solid var(--input-border);cursor:text;background:var(--input-background);outline:none;flex-wrap:wrap;padding:0;display:flex;overflow:hidden}.tag,.editor{margin:2px;padding:3px}.tag{border:1px solid var(--border);background:var(--muted);color:var(--muted-foreground);border-radius:var(--border-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:focus-visible{outline:1px solid}.editor::placeholder{color:var(--muted-foreground);opacity:1}`]}};customElements.define("tag-input",Wp);function bo(e,t,a){return p`${t==="array"?"[":""} <a part="anchor anchor-param-example" style="display:inline-block;min-width:24px;text-align:center" class="${this.allowTry==="true"?"":"inactive-link"}" 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="${r=>{let s=r.target.closest("table").querySelector(`[data-pname="${a}"]`);s&&(s.value=r.target.dataset.exampleType==="array"?r.target.dataset.example.split("~|~"):r.target.dataset.example)}}">${e.printableValue||e.value} </a>${t==="array"?"] ":""}`}function Vp(e,t,a){return p`${e.map((r,s)=>p`${s===0?"":"\u2503"} ${bo.call(this,r,t,a)}`)}`}function Kp(e,t,a){return p`<ul style="list-style-type:disclosure-closed">${e.map(r=>p`<li>${bo.call(this,r,t,a)} ${r.summary?.length>0?p`<span>(${r.summary})</span>`:""} ${r.description?.length>0?p`<p>${F(O(E(r.description)))}</p>`:""}</li>`)}</ul>`}function vo(e,t,a=[]){return p`${a.length>0?p`<span style="font-weight:700">Examples: </span>${hp(a)?Kp.call(this,a,t,e):Vp.call(this,a,t,e)}`:""}`}function Ga(e){let t=this.parameters?this.parameters.filter(s=>s.in===e):[];if(t.length===0)return"";let a="";e==="path"?a="PATH PARAMETERS":e==="query"?a="QUERY-STRING PARAMETERS":e==="header"?a="REQUEST HEADERS":e==="cookie"&&(a="COOKIES");let r=[];for(let s of t){let[n,i,o]=fp(s);if(!n)continue;let l=Ba(n);if(!l)continue;let c=G(n),d="form",u=!0,h=!1;(e==="query"||e==="header"||e==="path")&&(s.style&&"form spaceDelimited pipeDelimited".includes(s.style)?d=s.style:i&&(d=i),typeof s.explode=="boolean"&&(u=s.explode),typeof s.allowReserved=="boolean"&&(h=s.allowReserved));let m=Ji(de(s.examples)||de(s.example)||de(o?.example)||de(o?.examples)||de(l.examples)||de(l.example),l.type);!m.exampleVal&&(l.type==="object"||l.type.split("\u2503").includes("object"))&&(m.exampleVal=mt(n,i||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1)[0]?.exampleValue||"");let y="read focused".includes(this.renderStyle)?"200px":"160px";r.push(p`<tr title="${s.deprecated?"Deprecated":""}"><td rowspan="${this.allowTry==="true"?"1":"2"}" style="width:${y};min-width:100px"><div class="param-name ${s.deprecated?"deprecated":""}">${s.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${s.required?p`<span style="color:var(--red)">*</span>`:""} ${s.name}</div><div class="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></td>${this.allowTry==="true"?p`<td style="min-width:100px" colspan="${l.default||l.constrain||l.allowedValues||l.pattern?"1":"2"}">${l.type==="array"||l.type.split("\u2503").includes("array")&&!l.type.split("\u2503").includes("object")?p`<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(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${u}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="true" placeholder="add-multiple ↩" .value="${s["x-fill-example"]==="no"?ps:Jt(this.fillRequestFieldsWithExample==="true"?Array.isArray(m.exampleVal)?m.exampleVal:[m.exampleVal]:ps)}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}" @change="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}"></tag-input>`:l.type==="object"||l.type.split("\u2503").includes("object")?p`<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0"><div part="tab-btn-row" class="tab-buttons row" @click="${f=>{if(f.target.tagName.toLowerCase()==="button"){let b={...this.activeParameterSchemaTabs};b[s.name]=f.target.dataset.tab,this.activeParameterSchemaTabs=b}}}"><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>${p`<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="${m.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${u}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" spellcheck="false" .value="${s["x-fill-example"]==="no"?"":Jt(this.fillRequestFieldsWithExample==="true"?typeof m.exampleVal=="object"?JSON.stringify(m.exampleVal,null,2):m.exampleVal:"")}" style="resize:vertical;width:100%;height:${"read focused".includes(this.renderStyle)?"180px":"120px"}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}"></textarea></div>`} ${p`<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="${c}" 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>`:p`<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(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="false" .value="${s["x-fill-example"]==="no"?"":Jt(this.fillRequestFieldsWithExample==="true"?m.exampleVal:"")}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}">`}</td>`:""} ${l.default||l.constrain||l.allowedValues||l.pattern?p`<td colspan="${this.allowTry==="true"?"1":"2"}"><div class="param-constraint">${l.default?p`<span style="font-weight:700">Default: </span>${l.default}<br>`:""} ${l.pattern?p`<span style="font-weight:700">Pattern: </span>${l.pattern}<br>`:""} ${l.constrain?p`${l.constrain}<br>`:""} ${l.allowedValues&&String(l.allowedValues).split("\u2503").map((f,b)=>p`${b>0?"\u2503":p`<span style="font-weight:700">Allowed:</span>`} ${p`<a part="anchor anchor-param-constraint" class="${this.allowTry==="true"?"":"inactive-link"}" data-type="${l.type==="array"?l.type:"string"}" data-enum="${f.trim()}" @click="${x=>{let v=x.target.closest("table").querySelector(`[data-pname="${s.name}"]`);v&&(v.value=x.target.dataset.type==="array"?[x.target.dataset.enum]:x.target.dataset.enum)}}">${f}</a>`}`)}</div></td>`:p`<td></td>`}</tr><tr>${this.allowTry==="true"?p`<td style="border:none"></td>`:""}<td colspan="2" style="border:none"><span class="m-markdown-small">${F(O(E(s.description||"")))} </span>${vo.call(this,s.name,l.type,m.exampleList)}</td></tr>`)}return p`<div class="table-title top-gap">${a}</div><div style="display:block;overflow-x:auto;max-width:100%"><table role="presentation" class="m-table" style="width:100%;word-break:break-word">${r}</table></div>`}var xo=(e,t,a)=>{let r=new Map;for(let s=t;s<=a;s++)r.set(e[s],s);return r},Zp=Va(class extends Ka{constructor(e){if(super(e),e.type!==Ce.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,a){let r;a===void 0?a=t:t!==void 0&&(r=t);let s=[],n=[],i=0;for(let o of e)s[i]=r?r(o,i):i,n[i]=a(o,i),i++;return{values:n,keys:s}}render(e,t,a){return this.dt(e,t,a).values}update(e,[t,a,r]){let s=Mp(e),{values:n,keys:i}=this.dt(t,a,r);if(!Array.isArray(s))return this.ut=i,n;let o=this.ut??=[],l=[],c,d,u=0,h=s.length-1,m=0,y=n.length-1;for(;u<=h&&m<=y;)if(s[u]===null)u++;else if(s[h]===null)h--;else if(o[u]===i[m])l[m]=We(s[u],n[m]),u++,m++;else if(o[h]===i[y])l[y]=We(s[h],n[y]),h--,y--;else if(o[u]===i[y])l[y]=We(s[u],n[y]),Zt(e,l[y+1],s[u]),u++,y--;else if(o[h]===i[m])l[m]=We(s[h],n[m]),Zt(e,s[u],s[h]),h--,m++;else if(c===void 0&&(c=xo(i,m,y),d=xo(o,u,h)),c.has(o[u]))if(c.has(o[h])){let f=d.get(i[m]),b=f===void 0?null:s[f];if(b===null){let x=Zt(e,s[u]);We(x,n[m]),l[m]=x}else l[m]=We(b,n[m]),Zt(e,s[u],b),s[f]=null;m++}else vs(s[h]),h--;else vs(s[u]),u++;for(;m<=y;){let f=Zt(e,l[y+1]);We(f,n[m]),l[m++]=f}for(;u<=h;){let f=s[u++];f!==null&&vs(f)}return this.ut=i,yo(e,l),Y}}),wo=e=>e??I,Jp=class extends se{static get properties(){return{config:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}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")}static get styles(){return[qe,go,B`.table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px)}.table .tr{border-bottom:1px dotted var(--border);width:calc(100% - 5px);padding:0 0 0 5px}.table .td{padding:4px 0}.table .key{width:var(--table-schema-key-width,240px);text-overflow:var(--table-schema-key-text-overflow,ellipsis);white-space:var(--table-schema-key-whitespace,nowrap)}.key .key-label{font-size:var(--font-size-mono)}.key.deprecated .key-label{color:var(--red)}.table .key-type{white-space:normal;width:150px}.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + var(--font-size-small));overflow:hidden}.table .tr.expanded-descr{max-height:none}.obj-toggle{color:var(--primary);cursor:pointer;font-size:calc(var(--font-size-small) + 4px);font-family:var(--font-mono);text-align:center;user-select:none;background-clip:border-box;border:1px solid #0000;border-radius:2px;min-width:14px;margin-left:-16px;padding:0 2px;display:inline-block}.obj-toggle:hover{border-color:var(--primary)}.tr.expanded .obj-toggle:after{content:"-"}.tr.collapsed .obj-toggle:after{content:"+"}.tr.expanded+.object-body{display:block}.tr.collapsed+.object-body{display:none}`,Xe]}render(){if(!this.data)return"";let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return p`<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${a=>this.handleAllEvents(a)}"><div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?p`<div style="flex:1"></div><div part="schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div><span part="schema-description" class="m-markdown">${F(O(E(t)))}</span><div style="border:1px solid var(--border)"><div style="display:flex;background:var(--card);padding:8px 4px;border-bottom:1px solid var(--border)"><div class="key" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Field</div><div class="key-type" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Type</div><div class="key-descr" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Description</div></div>${this.renderAST(this.data)}</div></div>`}renderAST(e,t="",a=0,r=0){if(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)return"";let s=16*(r+1),n=a<this.schemaExpandLevel,i=e.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:"",o=e.readOnly?" \u{1F181}":e.writeOnly?" \u{1F186}":"",l=e.readOnly?"Read-Only":e.writeOnly?"Write-Only":"";if(e.kind==="array"){let c=e.items;if(!c){let f=!!e.description,b=J(e.description),x=f&&b?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr array" data-obj="${e.name||""}"><div class="td key" style="padding-left:${s}px"><span class="key-label">${i}${e.name||""}</span> ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">array${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${f?p`<span class="m-markdown-small">${x} ${F(O(E(e.description)))}</span>`:""}</div></div>`}if(c.kind==="primitive"){let f=c.format||c.contentMediaType||c.type||"string",b=f.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),x=!!(e.description||c.description),v=!!(c.constraints||c.defaultValue||c.allowedValues||c.pattern||c.contentMediaType||c.contentEncoding),k=v||J(e.description)||J(c.description),g=x&&k?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",w=p`${c.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${c.constraints}</div>`:""} ${c.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${c.defaultValue}</div>`:""} ${c.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${c.type==="const"?"Value":"Allowed"}: </span>${c.allowedValues}</div>`:""} ${c.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${c.pattern}</div>`:""} ${c.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${c.contentMediaType}</div>`:""} ${c.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${c.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="padding-left:${s}px">${i} ${e.name?p`<span class="key-label">${e.name}</span>`:""} ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type ${b}" title="${l}">[${f}]${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${x?p`<span class="m-markdown-small">${g} ${F(O(E(e.description||c.description)))}</span>`:""} ${x&&v?p`<div class="item-details">${w}</div>`:w}</div></div>`}let d=c.kind==="object"?"array of object":`array of array ${e.arrayType?`of ${e.arrayType}`:""}`,u=!!(e.description||c.description),h=J(e.description)||J(c.description),m=u&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=c.kind!=="object"||!!(c.properties&&c.properties.length>0||c.patternProperties&&c.patternProperties.length>0||c.additionalProperties||c.unions&&c.unions.length>0);return p`<div class="tr ${n?"expanded":"collapsed"} array" data-obj="${e.name||""}" title="${e.deprecated?`Deprecated ${e.name}`:e.name||""}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${e.name&&y?p`<span class="obj-toggle" data-obj="${e.name}"></span>`:""} <span class="key-label" style="display:inline-block;${y?"margin-left:-6px;":""}">${i}${e.name||""} </span>${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">${d}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${u?p`<span class="m-markdown-small">${m} ${F(O(E(e.description||c.description||"")))}</span>`:""}</div></div>${y?p`<div class="object-body">${c.kind==="object"?p`${c.properties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.patternProperties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.additionalProperties?this.renderAST(c.additionalProperties,"object",a+1,r+1):""} ${c.unions?.map(f=>this.renderAST(f,"object",a+1,r+1))}`:this.renderAST(c,"array",a+1,r+1)}</div>`:""}`}if(e.kind==="object"){let c=e.dataTypeLabel||"object",d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",m=!!(e.properties&&e.properties.length>0||e.patternProperties&&e.patternProperties.length>0||e.additionalProperties||e.unions&&e.unions.length>0);return p`${e.name?p`<div class="tr ${n?"expanded":"collapsed"} object" data-obj="${e.name}" title="${e.deprecated?`Deprecated ${e.name}`:e.name}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${m?p`<span class="obj-toggle" data-obj="${e.name}"></span>`:""} <span class="key-label" style="display:inline-block;${m?"margin-left:-6px;":""}">${i}${e.name} </span>${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">${c}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${h} ${F(O(E(e.description||"")))}</span>`:""}</div></div>`:""} ${m?p`<div class="object-body">${e.properties?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))} ${e.patternProperties?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",a+1,r+ +!!e.name):""} ${e.unions?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))}</div>`:""}`}if(e.kind==="union"){let c=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`${e.properties?.map(m=>this.renderAST(m,"object",a,r))}<div class="tr expanded xxx-of" data-obj="${c}"><div class="td key" style="padding-left:${s}px"><span class="xxx-of-key" style="margin-left:-6px">${c}</span></div><div class="td key-type"></div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${h} ${F(O(E(e.description||"")))}</span>`:""}</div></div><div class="object-body">${e.options?.map((m,y)=>p`<div class="tr expanded xxx-of-option" data-obj="OPTION ${m.optionIndex||y+1}"><div class="td key" style="padding-left:${s+16}px"><span class="xxx-of-key">OPT ${m.optionIndex||y+1}</span> ${m.optionTitle?p`<span class="xxx-of-descr">${m.optionTitle}</span>`:""}</div><div class="td key-type"></div><div class="td key-descr"></div></div><div class="object-body">${this.renderAST(m,"xxx-of-option",a+1,r+1)}</div>`)}</div>`}if(e.kind==="primitive"){let c=(e.type||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),d=!!(e.description||e.title),u=!!(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding),h=u||J(e.description),m=d&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=p`${e.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${e.constraints}</div>`:""} ${e.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${e.defaultValue}</div>`:""} ${e.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${e.type==="const"?"Value":"Allowed"}: </span>${e.allowedValues}</div>`:""} ${e.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${e.pattern}</div>`:""} ${e.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${e.contentMediaType}</div>`:""} ${e.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${e.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${i} ${e.name?p`<span class="key-label">${e.name}</span>`:""} ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type ${c}" title="${l}">${t==="array"?`[${e.type}]`:e.type}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${m} ${F(O(E(e.title?e.description?`<b>${e.title}:</b> ${e.description}`:`<b>${e.title}</b>`:e.description)))}</span>`:""} ${d&&u?p`<div class="item-details">${y}</div>`:y}</div></div>`}return""}handleAllEvents(e){if(e.target.classList.contains("obj-toggle"))this.toggleObjectExpand(e);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.classList.contains("descr-expand-toggle")){let t=e.target.closest(".tr");t&&(t.classList.toggle("expanded-descr"),t.classList.contains("expanded-descr")?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight="")}}toggleObjectExpand(e){let t=e.target.closest(".tr");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};customElements.define("schema-table",Jp);function Gp(e,t,a){let r=G(t),s=mt(t,"json",de(t.examples),de(t.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return p`<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="${n=>{if(n.target.classList.contains("v-tab-btn")){let{tab:i}=n.target.dataset;if(i){let o=n.target.closest(".tab-panel"),l=o.querySelector(`.v-tab-btn[data-tab="${i}"]`),c=[...o.querySelectorAll(`.v-tab-btn:not([data-tab="${i}"])`)],d=o.querySelector(`.tab-content[data-tab="${i}"]`),u=[...o.querySelectorAll(`.tab-content:not([data-tab="${i}"])`)];l.classList.add("active"),d.style.display="block",c.forEach(h=>{h.classList.remove("active")}),u.forEach(h=>{h.style.display="none"})}}n.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=n.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>${p`<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="${a.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${e}" data-example="${s[0]?.exampleValue||""}" .value="${Jt(this.fillRequestFieldsWithExample==="true"&&s[0]?.exampleValue||"")}" spellcheck="false"></textarea></div>`} ${p`<div class="tab-content col" data-tab="schema" style="display:${this.activeSchemaTab==="example"?"none":"block"};padding-left:5px;width:100%">${this.schemaStyle==="table"?p`<schema-table .data="${r}" 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>`:p`<schema-tree .data="${r}" 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 Xp(e,t,a=""){let r=[],s=Xi(e),n=Yi(e);if(Object.keys(s).length>0){for(let i in s){let o=s[i];if(o.readOnly)continue;let l=o.examples||o.example||"",c=o.type,d=Ba(o),u="read focused".includes(this.renderStyle)?"200px":"160px",h=Ji(d.examples||d.example,d.type);r.push(p`<tr title="${o.deprecated?"Deprecated":""}"><td style="width:${u};min-width:100px"><div class="param-name ${o.deprecated?"deprecated":""}">${i}${n.includes(i)||o.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="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></td><td style="${c==="object"?"width:100%; padding:0;":this.allowTry==="true"?"":"display:none;"}min-width:100px" colspan="${c==="object"?2:1}">${c==="array"?Zi(o.items)?p`<div class="file-input-container col" style="align-items:flex-start;width:100%">${Zp(this.fileInputKeys[i]??[0],m=>m,(m,y)=>p`<div class="input-set row" style="width:100%;margin-top:${y>0?"4px":"0"}"><input type="file" part="file-input" style="width:100%" data-pname="${i}" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-array="false" data-file-array="true"> <button class="file-input-remove-btn" @click="${()=>this.onRemoveFileInput(i,m)}">✕</button></div>`)} <button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:4px 0 0 0;padding:2px 8px;align-self:flex-start" @click="${()=>this.onAddFileInput(i)}">ADD</button></div>`:p`<tag-input style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${i}" 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:ps}"></tag-input>`:p`${c==="object"?Gp.call(this,i,o,t):p`${this.allowTry==="true"?p`<input .value="${this.fillRequestFieldsWithExample==="true"?h.exampleVal:""}" spellcheck="false" type="${Zi(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="${i}" data-example="${Array.isArray(l)?l[0]:l}" data-array="false">`:""}`}`}</td>${c==="object"?"":p`<td>${d.default||d.constrain||d.allowedValues||d.pattern?p`<div class="param-constraint">${d.default?p`<span style="font-weight:700">Default: </span>${d.default}<br>`:""} ${d.pattern?p`<span style="font-weight:700">Pattern: </span>${d.pattern}<br>`:""} ${d.constrain?p`${d.constrain}<br>`:""} ${d.allowedValues&&String(d.allowedValues).split("\u2503").map((m,y)=>p`${y>0?"\u2503":p`<span style="font-weight:700">Allowed:</span>`} ${p`<a part="anchor anchor-param-constraint" class="${this.allowTry==="true"?"":"inactive-link"}" data-type="${d.type==="array"?d.type:"string"}" data-enum="${m.trim()}" @click="${f=>{let b=f.target.closest("table").querySelector(`[data-pname="${i}"]`);if(b){b.value=f.target.dataset.type==="array"?[f.target.dataset.enum]:f.target.dataset.enum;let x=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(x)}}}">${m}</a>`}`)}</div>`:""}</td>`}</tr>${c==="object"?"":p`<tr><td style="border:none"></td><td colspan="2" style="border:none;margin-top:0;padding:0 5px 8px 5px"><span class="m-markdown-small">${F(O(E(o.description||"")))} </span>${vo.call(this,i,d.type,h.exampleList)}</td></tr>`}`)}return p`<table role="presentation" style="width:100%" class="m-table" @input="${i=>{let o=this.getRequestPanel(i);this.liveCURLSyntaxUpdate(o)}}" @change="${i=>{let o=this.getRequestPanel(i);this.liveCURLSyntaxUpdate(o)}}">${r}</table>`}return p`<textarea class="textarea dynamic-form-param ${t}" part="textarea textarea-param" spellcheck="false" data-pname="dynamic-form" data-ptype="${t}" .value="${Jt(a)}" style="width:100%"></textarea> ${e.description?p`<span class="m-markdown-small">${F(O(E(e.description)))}</span>`:""}`}function Yp(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let e="",t="",a="",r="",s="",n=[],{content:i}=this.request_body;for(let o in i)n.push({mimeType:o,schema:i[o].schema,example:i[o].example,examples:i[o].examples}),this.selectedRequestBodyType||=o;return e=n.length===1?"":p`<select style="min-width:100px;max-width:100%;margin-bottom:-1px" @change="${o=>this.onMimeTypeChange(o)}">${n.map(o=>p`<option value="${o.mimeType}" ?selected="${o.mimeType===this.selectedRequestBodyType}">${o.mimeType}</option>`)}</select>`,n.forEach(o=>{let l,c=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))o.mimeType===this.selectedRequestBodyType&&(c=mt(o.schema,o.mimeType,de(o.examples),de(o.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||=c.length>0?c[0].exampleId:"",s=p`${s}<div class="example-panel border-top pad-top-8">${c.length===1?"":p`<select style="min-width:100px;max-width:100%;margin-bottom:-1px" @change="${d=>this.onSelectExample(d)}">${c.map(d=>p`<option value="${d.exampleId}" ?selected="${d.exampleId===this.selectedRequestBodyExample}">${d.exampleSummary.length>80?d.exampleId:d.exampleSummary?d.exampleSummary:d.exampleId}</option>`)}</select>`} ${c.filter(d=>d.exampleId===this.selectedRequestBodyExample).map(d=>p`<div class="example ${d.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example="${d.exampleId}">${d.exampleSummary&&d.exampleSummary.length>80?p`<div style="padding:4px 0">${d.exampleSummary}</div>`:""} ${d.exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(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="${u=>{let h=this.getRequestPanel(u);this.liveCURLSyntaxUpdate(h)}}" @keydown="${u=>{if((u.keyCode===10||u.keyCode===13)&&u.ctrlKey)return this.onTryClick(u)}}"></textarea></div>`)}</div>`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(o.mimeType===this.selectedRequestBodyType){let d=mt(o.schema,o.mimeType,o.examples,o.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);o.schema&&(a=Xp.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=p`<div class="small-font-size bold-text row"><input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file" data-ptype="${o.mimeType}" spellcheck="false"></div>`);(o.mimeType.includes("json")||o.mimeType.includes("xml")||o.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(l=G(o.schema),this.schemaStyle==="table"?r=p`${r}<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"&&(r=p`${r}<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>`))}),p`<div class="request-body-container" data-selected-request-body-type="${wo(this.selectedRequestBodyType)}"><div class="table-title top-gap row">REQUEST BODY ${this.request_body.required?p`<span class="mono-font" style="color:var(--red)">*</span>`:""} <span style="font-weight:400;margin-left:5px">${this.selectedRequestBodyType}</span> <span style="flex:1"></span> ${e}</div>${this.request_body.description?p`<div class="m-markdown" style="margin-bottom:12px">${F(O(E(this.request_body.description)))}</div>`:""} ${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?p`<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0"><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>${p`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"}">${s}</div>`} ${p`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"}">${r}</div>`}</div>`:p`${t} ${a}`}</div>`}function ko(e="flex"){return p`<div class="col m-markdown" style="flex:1;display:${e};position:relative;max-width:100%"><button class="toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${t=>{Ot(this.curlSyntax.trim().replace(/\\$/,""),t)}}" part="btn btn-fill btn-copy">Copy</button><pre style="white-space:pre"><code class="language-shell">${this.curlSyntax.trim().replace(/\\$/,"")}</code></pre></div>`}function Qp(){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=p`<code class="language-${e}">${this.responseText}</code>`),p`<div class="row" style="font-size:var(--font-size-small);margin:5px 0"><div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div><div style="flex:1"></div><button class="m-btn" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button></div><div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0"><div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${a=>{a.target.classList.contains("tab-btn")!==!1&&(this.activeResponseTab=a.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"?"":p`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab="curl">CURL</button>`}</div>${this.responseIsBlob?p`<div part="tab-content" class="tab-content col" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}">${this.responseBlobType==="image"?p`<img style="max-height:var(--resp-area-height,400px);object-fit:contain" class="mar-top-8" src="${wo(this.responseBlobUrl)}">`:""} <button class="m-btn thin-border mar-top-8" style="width:135px" @click="${()=>{Fn(this.responseBlobUrl,this.respContentDisposition)}}" part="btn btn-outline">DOWNLOAD</button> ${this.responseBlobType==="view"||this.responseBlobType==="image"?p`<button class="m-btn thin-border mar-top-8" style="width:135px" @click="${()=>{On(this.responseBlobUrl)}}" part="btn btn-outline">VIEW (NEW TAB)</button>`:""}</div>`:p`<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}"><button class="toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${a=>{Ot(this.responseText,a)}}" part="btn btn-fill btn-copy">Copy</button><pre style="white-space:pre;min-height:50px;height:var(--resp-area-height,400px);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="toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${a=>{Ot(this.responseHeaders,a)}}" part="btn btn-fill btn-copy">Copy</button><pre style="white-space:pre"><code class="language-css">${this.responseHeaders}</code></pre></div>${this.showCurlBeforeTry==="true"?"":ko.call(this,this.activeResponseTab==="curl"?"flex":"none")}</div>`}function eu(){return p`<div style="display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 8px;margin:16px 0;font-size:var(--font-size-small)" part="wrap-request-btn"><div class="hide-in-small-screen" style="display:flex;flex-direction:column;margin:0;flex:1 1 180px;min-width:0"><div style="display:flex;flex-direction:row;align-items:center;overflow:hidden">${p`<div style="display:flex;flex-direction:column">${this.serverUrl?p`<div style="display:flex;align-items:baseline"><div style="font-weight:700;padding-right:5px">API Server</div><span class="gray-text">${this.serverUrl}</span></div>`:""}</div>`}</div><div style="display:flex;flex-wrap:wrap"><div style="font-weight:700;padding-right:5px">Authentication</div>${this.security?.length>0&&!this.security.every(e=>!e||Object.keys(e).length===0)?p`${this.api_keys.length>0?p`<div style="color:var(--blue);overflow:hidden">${this.api_keys.length===1?`${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}</div>`:this.security.some(e=>!e||Object.keys(e).length===0)?p`<div class="gray-text">Optional <span class="gray-text">(None Applied)</span></div>`:p`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span></div>`}`:p`<span class="gray-text">Not Required</span>`}</div></div><div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex-shrink:0">${this.parameters.length>0||this.request_body?p`<button class="m-btn thin-border" part="btn btn-outline btn-fill" ?disabled="${this.loading}" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">FILL EXAMPLE</button> <button class="m-btn thin-border" part="btn btn-outline btn-clear" ?disabled="${this.loading}" @click="${this.onClearRequestData}">CLEAR</button>`:""} <button class="m-btn primary thin-border" part="btn btn-try" ?disabled="${this.loading}" aria-busy="${this.loading}" @click="${this.onTryClick}">${this.loading?"TRYING...":"TRY"}</button></div></div><div class="row" style="font-size:var(--font-size-small);margin:5px 0">${this.showCurlBeforeTry==="true"?ko.call(this):""}</div>${this.responseMessage===""?"":Qp.call(this)}`}var tu=class extends se{constructor(){super(),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 properties(){return{config:{type:Object},serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},responseMessage:{state:!0},responseText:{state:!0},responseHeaders:{state:!0},responseStatus:{state:!0},responseUrl:{state:!0},curlSyntax:{state:!0},responseIsBlob:{state:!0},responseBlobType:{state:!0},responseBlobUrl:{state:!0},respContentDisposition:{state:!0},activeResponseTab:{state:!0},selectedRequestBodyType:{state:!0},selectedRequestBodyExample:{state:!0},fileInputKeys:{state:!0},loading:{state:!0}}}static get styles(){return[ca,Tt,qe,la,Ja,da,wr,B`*,: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}.param-name,.param-type{text-align:right;line-height:var(--font-size-small);margin:1px 0}.param-name{color:var(--foreground);font-family:var(--font-mono)}.param-name.deprecated{color:var(--red)}.param-type{color:var(--muted-foreground);font-family:var(--font-regular)}.param-constraint{min-width:100px}.param-constraint:empty{display:none}.top-gap{margin-top:24px}.textarea{resize:vertical;direction:ltr;min-height:220px;padding:5px}.example:first-child{margin-top:-9px}.response-message{text-overflow:ellipsis;font-weight:700}.response-message.error{color:var(--red)}.response-message.success{color:var(--blue)}.file-input-container{align-items:flex-start;width:100%}.file-input-container .input-set{align-items:center;width:100%;display:flex}.file-input-container .input-set:first-child .file-input-remove-btn{visibility:hidden}.file-input-remove-btn{color:var(--red);cursor:pointer;background:0 0;border:none;outline:none;font-size:16px}.v-tab-btn{font-size:var(--font-size-small);opacity:.3;cursor:pointer;background:0 0;border:none;height:24px;padding:4px 8px}.v-tab-btn.active{background:var(--background);opacity:1;font-weight:700}@container (width>=768px){.textarea{padding:8px}}@container (width<=470px){.hide-in-small-screen{display:none}}`,Xe]}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 p`<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}"><div class="${this.callback==="true"?"tiny-title":"req-res-title"}">${this.callback==="true"?"CALLBACK REQUEST":"REQUEST"}</div><div>${Kt(this.parameterGuardDeps,()=>Ga.call(this,"path"))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"query"))} ${Kt(this.requestBodyGuardDeps,()=>Yp.call(this))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"header"))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"cookie"))} ${this.allowTry==="false"?"":p`${eu.call(this)}`}</div></div>`}async updated(e){this.showCurlBeforeTry==="true"&&(!e||!e.has("curlSyntax")||e.size>1)&&this.applyCURLSyntax(this.shadowRoot),oa(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(a=>{let r=a.closest(".example-panel").querySelector(".request-body-param"),s=a.closest(".example-panel").querySelector(".request-body-param-user-input");s.value=r.innerText;let n=this.getRequestPanel({target:a});this.liveCURLSyntaxUpdate(n)},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;let t=e.target;this.selectedRequestBodyExample="",window.setTimeout(a=>{let r=a.closest(".request-body-container").querySelector(".request-body-param");if(r){let s=a.closest(".request-body-container").querySelector(".request-body-param-user-input");s.value=r.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']")],a=[...e.querySelectorAll("[data-ptype='query']")],r=[...e.querySelectorAll("[data-ptype='query-object']")],s={};t.forEach(i=>{s[i.dataset.pname]=i.value});let n=[];return a.forEach(i=>{let o=i.dataset.array!=="false",l=i.dataset.paramSerializeStyle||"form",c=i.dataset.paramSerializeExplode===void 0?l==="form":i.dataset.paramSerializeExplode==="true",d=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:l,explode:c,allowReserved:d,isArray:o})}),r.forEach(i=>{let o=i.dataset.paramSerializeStyle||"form",l=i.dataset.paramSerializeExplode===void 0?o==="form":i.dataset.paramSerializeExplode==="true",c=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:o,explode:l,allowReserved:c,isObject:!0})}),_p({serverUrl:this.serverUrl,path:this.path,pathParams:s,queryParams:n,apiKeys:this.api_keys})}buildFetchHeaders(e){let t=this.closest(".expanded-req-resp-container, .req-resp-container")?.getElementsByTagName("api-response")[0],a=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],r=e.querySelector(".request-body-container"),s=t?.selectedMimeType||this.accept||"",n=r?.dataset?.selectedRequestBodyType||"",i=a.map(o=>({name:o.dataset.pname,value:o.value,explode:o.dataset.paramSerializeExplode==="true",isObject:o.dataset.ptype==="header-object"}));return Np({accept:s,apiKeys:this.api_keys,headerParams:i,contentType:n})}buildFetchBodyOptions(e){let t=e.querySelector(".request-body-container"),a={method:this.method.toUpperCase()};if(t){let r=t.dataset.selectedRequestBodyType||"";if(r.includes("form-urlencoded")){let s=e.querySelector("[data-ptype='dynamic-form']");a.body=s?ho([],s.value):ho([...e.querySelectorAll("[data-ptype='form-urlencode']")].filter(n=>n.type!=="file").map(n=>({name:n.dataset.pname,value:n.value,isArray:n.dataset.array!=="false"})))}else if(r.includes("form-data"))a.body=qp([...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(r)){let s=e.querySelector(".request-body-param-file");s?.files[0]&&(a.body=s.files[0])}else if(r.includes("json")||r.includes("xml")||r.includes("text")){let s=e.querySelector(".request-body-param-user-input");s?.value&&(a.body=s.value)}}return a}async onTryClick(e){let t=e?.target?this.getRequestPanel(e):this.shadowRoot.querySelector(".request-panel"),a=this.buildFetchURL(t),r=this.buildFetchBodyOptions(t),s=this.buildFetchHeaders(t);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(a,s,r,t),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),this.fetchCredentials&&(r.credentials=this.fetchCredentials);let n=new AbortController;this.activeAbortController=n;let{signal:i}=n;r.headers=s;let o={url:a,...r};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:o,controller:n}}));let l={method:o.method,headers:o.headers,credentials:o.credentials,body:o.body},c,d,u;try{this.loading=!0,this.responseText="\u231B",this.responseMessage="",c=new Request(o.url,l);let h=performance.now();d=await fetch(c,{signal:i});let m=performance.now();u=d.clone(),this.responseMessage=p`${d.statusText?`${d.statusText}:${d.status}`:d.status}<div style="color:var(--muted-foreground)">Took ${Math.round(m-h)} milliseconds</div>`,this.responseUrl=d.url;let y={};d.headers.forEach((b,x)=>{y[x]=b,this.responseHeaders=`${this.responseHeaders}${x}: ${b}
`});let f=await Bp(d);this.responseText=f.responseText,this.responseIsBlob=f.responseIsBlob,this.responseBlobType=f.responseBlobType,this.responseBlobUrl=f.responseBlobUrl,this.respContentDisposition=f.respContentDisposition,this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:c,response:u,responseHeaders:y,responseBody:f.respJson||f.respText||f.respBlob,responseStatus:u.ok}}))}catch(h){h.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage=o.method?.toUpperCase()==="TRACE"?`${h.message} (Browser security restricts TRACE requests in fetch. Use the cURL snippet below.)`:`${h.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),a=this.buildFetchBodyOptions(e),r=this.buildFetchHeaders(e),s=this.generateCURLSyntax(t,r,a,e);this.curlSyntax!==s&&(this.curlSyntax=s)}generateCURLSyntax(e,t,a,r){let s=r?.querySelector(".request-body-container"),n=s?.dataset?.selectedRequestBodyType||"",i=a?.body;if(!i&&s){let o=r.querySelector(".request-body-param-user-input");o?.value&&(i=o.value)}return jp({method:this.method,url:e,headers:t,body:i,contentType:n})}onAddFileInput(e){let t=this.fileInputKeys[e]??[0],a=t.length>0?Math.max(...t)+1:0;this.fileInputKeys={...this.fileInputKeys,[e]:[...t,a]}}onRemoveFileInput(e,t){let a=this.fileInputKeys[e]??[0];this.fileInputKeys={...this.fileInputKeys,[e]:a.filter(r=>r!==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()}};customElements.define("api-request",tu);var au=class extends se{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[qe,Ja,Tt,B`: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:var(--card-radius);border:1px solid #0000;padding:0 20px 0 0;display:inline-block}.close-bracket{border-radius:var(--card-radius);border:1px solid #0000;display:inline-block}.open-bracket:hover{color:var(--primary);background:var(--muted);border:1px solid var(--border)}.open-bracket.expanded:hover~.inside-bracket{border-left:1px solid var(--muted-foreground)}.open-bracket.expanded:hover~.close-bracket{color:var(--primary)}.inside-bracket{border-left:1px dotted var(--border);padding-left:12px;overflow:hidden}.open-bracket.collapsed+.inside-bracket,.open-bracket.collapsed+.inside-bracket+.close-bracket,.open-bracket.expanded .open-bracket-collapsed,.open-bracket.collapsed .open-bracket-expanded{display:none}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--red)}.boolean{color:var(--purple)}.object{color:var(--foreground)}.toolbar{align-items:center;padding:2px;display:flex;position:absolute;top:5px;right:6px}`,Xe]}render(){return p`<div class="json-tree" @click="${e=>{e.target.classList.contains("btn-copy")?Ot(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}"><div class="toolbar"><button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy">Copy</button></div>${this.generateTree(this.data,!0)}</div>`}generateTree(e,t=!1){if(e===null)return p`<span class="null">null</span>${t?"":","}`;if(typeof e=="object"&&!(e instanceof Date)){let a=Array.isArray(e)?"array":"pure_object";return Object.keys(e).length===0?p`${Array.isArray(e)?"[ ],":"{ },"}`:p`<div class="open-bracket expanded ${a==="array"?"array":"object"}"><span class="open-bracket-expanded">${a==="array"?"[":"{"}</span> <span class="open-bracket-collapsed">${a==="array"?"[...]":"{...}"}</span></div><div class="inside-bracket">${Object.keys(e).map((r,s,n)=>p`<div class="item">${a==="pure_object"?p`"${r}":`:""} ${this.generateTree(e[r],s===n.length-1)}</div>`)}</div><div class="close-bracket">${a==="array"?"]":"}"}${t?"":","}</div>`}return typeof e=="string"||e instanceof Date?p`<span class="${typeof e}">"${e}"</span>${t?"":","}`:p`<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"))}};customElements.define("json-tree",au);var ru=class extends se{constructor(){super(),this.selectedStatus="",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{config:{type:Object},callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[qe,la,da,ca,Tt,Ja,B`: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}.resp-head.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:calc(var(--font-size-small) + 1px);color:var(--muted-foreground);text-align:left}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}`,Xe]}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")){let t=Ip(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 p`<div class="col regular-font response-panel ${this.renderStyle}-mode"><div class="${this.callback==="true"?"tiny-title":"req-res-title"}">${this.callback==="true"?"CALLBACK RESPONSE":"RESPONSE"}</div><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||""),p`${Object.keys(this.responses).length>1?p`<div class="row" style="flex-wrap:wrap">${Object.keys(this.responses).map(e=>p`${e==="$$ref"?"":p`<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="m-btn small ${this.selectedStatus===e?"primary":""}" part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}" style="margin:8px 4px 0 0">${e}</button>`}`)}</div>`:p`<span>${Object.keys(this.responses)[0]}</span>`} ${Object.keys(this.responses).map(e=>p`<div style="display:${e===this.selectedStatus?"block":"none"}"><div class="top-gap"><span class="resp-descr m-markdown">${F(O(E(this.responses[e]?.description||"")))}</span> ${this.headersForEachRespStatus[e]&&this.headersForEachRespStatus[e]?.length>0?p`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}</div>${!this.mimeResponsesForEachStatus[e]||Object.keys(this.mimeResponsesForEachStatus[e]).length===0?"":p`<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><div style="flex:1"></div>${Object.keys(this.mimeResponsesForEachStatus[e]).length===1?p`<span class="small-font-size gray-text" style="align-self:center;margin-top:8px">${Object.keys(this.mimeResponsesForEachStatus[e])[0]}</span>`:p`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}</div>${this.activeSchemaTab==="example"?p`<div part="tab-content" class="tab-content col" style="flex:1">${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`:p`<div part="tab-content" class="tab-content col" style="flex:1">${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`}</div>`}</div>`)}`):""}responseHeaderListTemplate(e){return p`<div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div><table role="presentation" style="border-collapse:collapse;margin-bottom:16px;border:1px solid var(--border);border-radius:var(--card-radius)" class="small-font-size mono-font">${e.map(t=>p`<tr><td style="padding:8px;vertical-align:baseline;min-width:120px;border-top:1px solid var(--border);text-overflow:ellipsis">${t.name||""}</td><td style="padding:4px;vertical-align:baseline;padding:0 5px;border-top:1px solid var(--border);text-overflow:ellipsis">${t.schema?.type||""}</td><td style="padding:8px;vertical-align:baseline;border-top:1px solid var(--border);text-overflow:ellipsis"><div class="m-markdown-small regular-font">${F(O(E(t.description||"")))}</div></td><td style="padding:8px;vertical-align:baseline;border-top:1px solid var(--border);text-overflow:ellipsis">${t.schema?.example||""}</td></tr>`)}</table>`}mimeTypeDropdownTemplate(e){return p`<select aria-label="mime types" @change="${t=>{this.selectedMimeType=t.target.value}}" style="margin-bottom:-1px;z-index:1">${e.map(t=>p`<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?p`<pre style="color:var(--red)" class="${this.renderStyle==="read"?"read example-panel border pad-8-16":"example-panel border-top"}">
 No example provided </pre>`:p`${e.examples.length===1?p`${e.examples[0].exampleFormat==="json"?p`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?p`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(e.examples[0].exampleDescription||"")))}</div>`:""}<json-tree render-style="${this.renderStyle}" .data="${e.examples[0].exampleValue}" class="example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}" exportparts="btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"></json-tree>`:p`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?p`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(e.examples[0].exampleDescription||"")))}</div>`:""}<pre class="example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}">
${e.examples[0].exampleValue}</pre>`}`:p`<span class="example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}"><select aria-label="response examples" style="min-width:100px;max-width:100%" @change="${t=>this.onSelectExample(t)}">${e.examples.map(t=>p`<option value="${t.exampleId}" ?selected="${t.exampleId===e.selectedExample}">${t.exampleSummary.length>80?t.exampleId:t.exampleSummary}</option>`)}</select> ${e.examples.map(t=>p`<div class="example" data-example="${t.exampleId}" style="display:${t.exampleId===e.selectedExample?"block":"none"}">${t.exampleSummary&&t.exampleSummary.length>80?p`<div style="padding:4px 0">${t.exampleSummary}</div>`:""} ${t.exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(t.exampleDescription||"")))}</div>`:""} ${t.exampleFormat==="json"?p`<json-tree render-style="${this.renderStyle}" .data="${t.exampleValue}" exportparts="btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"></json-tree>`:p`<pre>${t.exampleValue}</pre>`}</div>`)}</span>`}`}mimeSchemaTemplate(e){return e?p`${this.schemaStyle==="table"?p`<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>`:p`<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>`}`:p`<pre style="color:var(--red)" class="${this.renderStyle==="read"?"border pad-8-16":"border-top"}"> Schema not found</pre>`}};customElements.define("api-response",ru);function su(e){let t=new Ge,a=new E.Renderer;return a.heading=({text:r,depth:s})=>`<h${s} class="observe-me" id="${e}--${t.slug(r)}">${r}</h${s}>`,na(a),a}function nu(e){let t=e.target.closest(".tag-container").querySelector(".tag-description"),a=e.target.closest(".tag-container").querySelector(".tag-icon");t&&a&&(t.classList.contains("expanded")?(t.style.maxHeight=0,t.classList.replace("expanded","collapsed"),a.classList.replace("expanded","collapsed")):(t.style.maxHeight=`${t.scrollHeight}px`,t.classList.replace("collapsed","expanded"),a.classList.replace("collapsed","expanded")))}function xs(e,t="",a=""){let r=new Set;for(let l in e.responses)for(let c in e.responses[l]?.content)r.add(c.trim());let s=[...r].join(", "),n=this.resolvedSpec.securitySchemes.filter(l=>l.finalKeyValue&&e.security?.some(c=>l.securitySchemeId in c))||[],i=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId==="_rapidoc_api_key"&&l.value!=="-");i&&n.push(i);let o=e.xCodeSamples?po.call(this,e.xCodeSamples):"";return p`${this.renderStyle==="read"?p`<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}">${this.renderStyle==="focused"&&t!=="General \u2982"?p`<div class="tag-container" part="section-operation-tag"><span class="upper" style="font-weight:700;font-size:18px">${t} </span>${a?p`<svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary);vertical-align:top;cursor:pointer" @click="${l=>{nu.call(this,l)}}"><path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path></svg><div class="tag-description collapsed" style="max-height:0;overflow:hidden;margin-top:16px;border:1px solid var(--border)"><div class="m-markdown" style="padding:8px">${F(O(E(a)))}</div></div>`:""}</div>`:""} ${e.deprecated?p`<div class="bold-text red-text">DEPRECATED</div>`:""} ${p`${e.xBadges&&e.xBadges?.length>0?p`<div style="display:flex;flex-wrap:wrap;margin-bottom:-24px;font-size:var(--font-size-small)">${e.xBadges.map(l=>l.color==="none"?"":p`<span style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${l.color}) 10%,transparent);color:var(--${l.color});border:1px solid var(--${l.color})">${l.label}</span>`)}</div>`:""}<h2 part="section-operation-summary">${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h2>${e.isWebhook?p`<span part="section-operation-webhook" style="color:var(--primary);font-weight:700;font-size:var(--font-size-regular)">WEBHOOK</span>`:p`<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>`}<slot name="${e.elementId}"></slot>`} ${e.description?p`<div class="m-markdown">${F(O(E(e.description)))}</div>`:""} ${co.call(this,e.security)} ${e.externalDocs?.url||e.externalDocs?.description?p`<div style="background:var(--muted);padding:2px 8px 8px 8px;margin:8px 0;border-radius:var(--card-radius)"><div class="m-markdown">${F(O(E(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?p`<a style="font-family:var(--font-mono);font-size:var(--font-size-small)" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url}<div style="transform:rotate(270deg) scale(1.5);display:inline-block;margin-left:5px">⇲</div></a>`:""}</div>`:""} ${o}<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="${s}" 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="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, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?uo.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="btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, 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"></api-response></div></div>`}function iu(){return this.resolvedSpec?p`${this.resolvedSpec.tags.map(e=>p`<section id="${e.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary)"><div class="title tag" part="section-tag-title label-tag-title">${e.displayName||e.name}</div><slot name="${e.elementId}"></slot><div class="regular-font-size">${F(`
          <div class="m-markdown regular-font">
          ${O(E(e.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:su(e.elementId)}:void 0))}
        </div>`)}</div></section><section class="regular-font section-gap--read-mode" part="section-operations-in-tag">${e.paths.map(t=>xs.call(this,t))}</section>`)}`:""}function ou(e){return p`<div class="divider"></div><div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}"><div style="font-weight:700">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">Schema</span></div>${this.schemaStyle==="table"?p`<schema-table .data="${G(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>`:p`<schema-tree .data="${G(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 lu(e,t){return e.id.indexOf("schemas-")===-1?p`<div class="divider"></div><div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}">${p`<div style="font-weight:700">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">${t}</span></div>${e.component?p`<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>`:ou.call(this,e)}function $o(){return this.resolvedSpec?p`${this.resolvedSpec.components.map(e=>p`<div id="cmp--${e.name.toLowerCase()}" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary)"><div class="title tag">${e.name}</div><div class="regular-font-size">${F(`<div class='m-markdown regular-font'>${O(E(e.description||""))}</div>`)}</div></div><div class="regular-font section-gap--read-mode">${e.subComponents.filter(t=>t.expanded!==!1).map(t=>lu.call(this,t,e.name))}</div>`)}`:""}function cu(){let e=new Ge,t=new E.Renderer;return t.heading=({text:a,depth:r})=>`<h${r} class="observe-me" id="overview--${e.slug(a)}">${a}</h${r}>`,na(t),t}function ws(){return p`<section id="overview" part="section-overview" class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">${this.resolvedSpec?.info?p`<div id="api-title" part="section-overview-title" style="font-size:32px">${this.resolvedSpec.info.title} ${this.resolvedSpec.info.version?p`<span style="font-size:var(--font-size-small);font-weight:700">${this.resolvedSpec.info.version}</span>`:""}</div><div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px);margin-top:8px">${this.resolvedSpec.info.contact?.email?p`<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?p`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""} ${this.resolvedSpec.info.license?p`<span>License: ${this.resolvedSpec.info.license.url?p`<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?p`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""} ${this.specUrl&&this.allowSpecFileDownload==="true"?p`<div style="display:flex;margin:12px 0;gap:8px;justify-content:start"><button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click="${()=>{Fn(this.specUrl,"openapi-spec")}}">Download OpenAPI spec</button> ${this.specUrl?.trim().toLowerCase().endsWith("json")?p`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click="${()=>{On(this.specUrl)}}">View OpenAPI spec (New Tab)</button>`:""}</div>`:""}</div><slot name="overview"></slot><div id="api-description">${this.resolvedSpec.info.description?p`${F(O(`<div class="m-markdown regular-font">
                        ${E(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:cu()}:void 0)}
                      </div>`))}`:""}</div>`:""}</section>`}function ks(e){let t=this.resolvedSpec?.servers.find(a=>a.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 So(e,t){let a=[...e.currentTarget.closest("table").querySelectorAll("input, select")],r=t.url;a.forEach(s=>{let n=RegExp(`{${s.dataset.var}}`,"g");r=r.replace(n,s.value)}),t.computedUrl=r,this.requestUpdate()}function du(){return this.selectedServer&&this.selectedServer.variables?p`<div class="table-title">SERVER VARIABLES</div><table class="m-table" role="presentation">${Object.entries(this.selectedServer.variables).map(e=>p`<tr><td style="vertical-align:middle">${e[0]}</td><td>${e[1].enum?p`<select data-var="${e[0]}" @input="${t=>{So.call(this,t,this.selectedServer)}}">${Object.entries(e[1].enum).map(t=>e[1].default===t[1]?p`<option selected="selected" label="${t[1]}" value="${t[1]}"></option>`:p`<option label="${t[1]}" value="${t[1]}"></option>`)}</select>`:p`<input type="text" part="textbox textbox-server-var" spellcheck="false" data-var="${e[0]}" value="${e[1].default}" @input="${t=>{So.call(this,t,this.selectedServer)}}">`}</td></tr>${e[1].description?p`<tr><td colspan="2" style="border:none"><span class="m-markdown-small">${F(O(E(e[1].description)))}</span></td></tr>`:""}`)}</table>`:""}function Eo(){return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":p`<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"}"><div part="section-servers-title" class="sub-title" style="display:flex;align-items:center;gap:8px">API SERVER ${this.mockServer==="true"?p`<span style="font-size:var(--font-size-small);font-weight:700;color:var(--green,#10b981);border:1px solid var(--green,#10b981);border-radius:4px;padding:1px 6px;letter-spacing:.5px" title="In-browser mock server is active">MOCK ACTIVE</span>`:""}</div><div class="mono-font" style="margin:12px 0;font-size:calc(var(--font-size-small) + 1px)">${!this.resolvedSpec.servers||this.resolvedSpec.servers?.length===0?"":p`${this.resolvedSpec?.servers.map((e,t)=>p`<input type="radio" name="api_server" id="srvr-opt-${t}" value="${e.url}" @change="${()=>{ks.call(this,e.url)}}" .checked="${this.selectedServer.url===e.url}" style="margin:4px 0;cursor:pointer"> <label style="cursor:pointer" for="srvr-opt-${t}">${e.url} ${e.description?p`- <span class="regular-font">${e.description}</span>`:""}</label><br>`)}`}<div class="table-title primary-text" part="label-selected-server">SELECTED: ${this.selectedServer?.computedUrl||"none"} ${this.mockServer==="true"?p`<span style="color:var(--green,#10b981);margin-left:6px">(Mocked)</span>`:""}</div></div><slot name="servers"></slot>${du.call(this)}</section>`}function Ao(e,t="toggle"){let a=e?.closest(".nav-bar-tag-and-paths"),r=a?.querySelector(".nav-bar-paths-under-tag");if(a){let s=a.classList.contains("expanded");s&&(t==="toggle"||t==="collapse")?(r.style.maxHeight=0,a.classList.replace("expanded","collapsed")):!s&&(t==="toggle"||t==="expand")&&(a.classList.replace("collapsed","expanded"),r.style.maxHeight=`${r.scrollHeight}px`)}}function pu(e,t="expand-all"){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let a=[...e.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];t==="expand-all"?a.forEach(r=>{let s=r.querySelector(".nav-bar-paths-under-tag");r.classList.replace("collapsed","expanded"),s.style.maxHeight=`${s?.scrollHeight}px`}):a.forEach(r=>{r.classList.replace("expanded","collapsed")})}function Do(e){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let t=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 a=e.currentTarget.closest("#nav-bar");a.classList.contains("floating-nav")&&a.classList.remove("floating-nav")}else t.dataset?.action==="expand-all"||t.dataset?.action==="collapse-all"?pu(e,t.dataset.action):t.dataset?.action==="expand-collapse-tag"&&Ao(t,"toggle")}function uu(){let e=new Ge;return!this.resolvedSpec||this.resolvedSpec.specLoadError?p`<nav class="nav-bar" part="section-navbar"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo"></slot></div></nav>`:p`<button id="nav-bar-btn" part="btn-navbar" class="btn" @click="${this.onOpenNavBarToggle}">☰</button><nav id="nav-bar" class="nav-bar ${this.renderStyle}" part="section-navbar"><nav class="nav-scroll" tabindex="-1" part="section-navbar-scroll" @click="${t=>Do.call(this,t)}" @keyup="${t=>Do.call(this,t)}"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo"></slot>${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":p`<div class="nav-bar-search-container ${this.allowAdvancedSearch==="false"?"has-bottom-border":""}" part="section-navbar-search">${this.allowSearch==="false"?"":p`<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?p`<button @click="${this.onClearSearch}" class="m-btn thin-border btn-clear-filter" part="btn btn-outline btn-clear-filter">CLEAR</button>`:""}`} ${this.allowAdvancedSearch==="false"||this.searchVal?"":p`<button id="advanced-search-btn" class="m-btn primary" part="btn btn-fill btn-search" @click="${this.onShowAdvancedSearchClicked}">SEARCH</button>`}</div>`}</div>${this.showInfo==="false"||!this.resolvedSpec.info?"":p`${this.infoDescriptionHeadingsInNavBar==="true"?p`${this.resolvedSpec.infoDescriptionHeaders.length>0?p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-overview" data-content-id="overview" data-action="navigate" tabindex="0" part="section-navbar-item section-navbar-overview">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`:""}<div class="overview-headers">${this.resolvedSpec.infoDescriptionHeaders.map(t=>{let a=e.slug(t.text);return p`<div class="nav-bar-h${t.depth} ${this.navActiveItemMarker}" id="link-overview--${a}" data-action="navigate" data-content-id="overview--${a}">${t.text}</div>`})}</div>${this.resolvedSpec.infoDescriptionHeaders.length>0?p`<hr style="border-top:1px solid var(--muted);border-width:1px 0 0 0;margin:15px 0 0 0">`:""}`:p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-overview" data-action="navigate" data-content-id="overview" tabindex="0">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`}`} ${this.allowServerSelection==="false"?"":p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-servers" data-action="navigate" data-content-id="servers" tabindex="0" part="section-navbar-item section-navbar-servers">API Servers</div>`} ${this.allowAuthentication==="false"||!this.resolvedSpec.securitySchemes?"":p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-auth" data-action="navigate" data-content-id="auth" 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"?p`<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>${this.resolvedSpec.tags.filter(t=>t.paths.filter(a=>_t(this.searchVal,a,t.name)).length).map(t=>p`<div class="nav-bar-tag-and-paths ${this.renderStyle==="read"||t.expanded?"expanded":"collapsed"}">${t.name==="General \u2982"?p`<hr style="border:none;border-top:1px dotted var(--muted-foreground);opacity:.3;margin:-1px 0 0 0">`:p`<div class="nav-bar-tag ${this.navActiveItemMarker}" part="section-navbar-item section-navbar-tag" id="link-${t.elementId}" data-action="${this.renderStyle==="read"||this.onNavTagClick==="show-description"?"navigate":"expand-collapse-tag"}" data-content-id="${(this.renderStyle==="read"?`${t.elementId}`:this.onNavTagClick==="show-description")?`${t.elementId}`:""}" data-first-path-id="${t.firstPathId}" tabindex="0"><div style="pointer-events:none">${t.displayName||t.name}</div><div class="nav-bar-tag-icon" tabindex="0" data-action="expand-collapse-tag"></div></div>`} ${this.infoDescriptionHeadingsInNavBar==="true"?p`${this.renderStyle==="focused"&&this.onNavTagClick==="expand-collapse"?"":p`<div class="tag-headers">${(()=>{let a=new Ge;return t.headers.map(r=>{let s=a.slug(r.text);return p`<div class="nav-bar-h${r.depth} ${this.navActiveItemMarker}" part="section-navbar-item section-navbar-h${r.depth}" id="link-${t.elementId}--${s}" data-action="navigate" data-content-id="${t.elementId}--${s}" tabindex="0">${r.text}</div>`})})()}</div>`}`:""}<div class="nav-bar-paths-under-tag">${t.paths.filter(a=>!this.searchVal||_t(this.searchVal,a,t.name)).map(a=>p`<div class="nav-bar-path ${this.navActiveItemMarker} ${this.usePathInNavBar==="true"?"small-font":""}" part="section-navbar-item section-navbar-path" data-action="navigate" data-content-id="${a.elementId}" id="link-${a.elementId}" tabindex="0"><span class="nav-bar-path-inner" style="${a.deprecated?"filter:opacity(0.5);":""}"><span class="nav-bar-path-label">${a.isWebhook?p`<span class="nav-bar-webhook">WEBHOOK</span>`:""} ${this.usePathInNavBar==="true"?p`<span class="mono-font">${a.path}</span>`:a.summary||a.shortSummary} </span>${p`<span class="nav-method ${this.showMethodInNavBar} ${a.method}">${this.showMethodInNavBar==="as-colored-block"?a.method.substring(0,3).toUpperCase():a.method.toUpperCase()}</span>`}</span></div>`)}</div></div>`)} ${this.resolvedSpec.components&&this.showComponents==="true"?p`<div id="link-components" class="nav-bar-section components"><div></div><div class="nav-bar-section-title">COMPONENTS</div></div>${this.resolvedSpec.components.map(t=>t.subComponents.length?p`<div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" data-action="navigate" data-content-id="cmp--${t.name.toLowerCase()}" id="link-cmp--${t.name.toLowerCase()}">${t.name}</div>${t.subComponents.filter(a=>a.expanded!==!1).map(a=>p`<div class="nav-bar-path" data-action="navigate" data-content-id="cmp--${a.id}" id="link-cmp--${a.id}"><span style="pointer-events:none">${a.name}</span></div>`)}`:"")}`:""}</nav></nav>`}function hu(e){let t=new E.Renderer,a=new Ge;return t.heading=({text:r,depth:s})=>`<h${s} class="observe-me" id="${e}--${a.slug(r)}">${r}</h${s}>`,na(t),t}function Xa(e){return p`<div class="regular-font section-gap--focused-mode" part="section-operations-in-tag">${e}</div>`}function Co(){if(this.showInfo==="true")return Xa(ws.call(this));let e=this.resolvedSpec.tags[0],t=this.resolvedSpec.tags[0]?.paths[0];return Xa(e&&t?xs.call(this,t,e.name):"")}function mu(e){return p`<h1 id="${e.elementId}">${e.displayName||e.name}</h1>${this.onNavTagClick==="show-description"&&e.description?p`<div class="m-markdown">${F(`<div class="m-markdown regular-font">
            ${O(E(e.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:hu(e.elementId)}:void 0))}
          </div>`)}</div>`:""}`}function fu(){if(!this.focusedElementId||!this.resolvedSpec)return;let e=this.focusedElementId,t=null,a=null,r,s=0;if(e.startsWith("overview")&&this.showInfo==="true")r=ws.call(this);else if(e==="auth"&&this.allowAuthentication==="true")r=lo.call(this,this.allowTry);else if(e==="servers"&&this.allowServerSelection==="true")r=Eo.call(this);else if(e==="operations-top")r=p`<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>`;else if(e.startsWith("cmp--")&&this.showComponents==="true")r=$o.call(this);else if(e.startsWith("tag--")){let n=e.indexOf("--",4)>0?e.substring(0,e.indexOf("--",5)):e;a=this.resolvedSpec.tags.find(i=>i.elementId===n),r=a?Xa.call(this,mu.call(this,a)):Co.call(this)}else{for(s=0;s<this.resolvedSpec.tags.length&&(a=this.resolvedSpec.tags[s],t=this.resolvedSpec.tags[s].paths.find(n=>`${n.elementId}`===e),!t);s+=1);t?(Ao(this.shadowRoot.getElementById(`link-${e}`),"expand"),r=Xa.call(this,xs.call(this,t,a.name||"",a.description||""))):r=Co.call(this)}return r}function yu(e){if(e.expanded)e.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(e.expanded=!0,this.updateRoute==="true"){let t=`${this.routePrefix||"#"}${e.elementId}`;window.location.hash!==t&&this.replaceHistoryState(e.elementId)}this.requestUpdate()}function gu(e,t="expand-all"){let a=[...e.querySelectorAll(".section-tag")];t==="expand-all"?a.map(r=>{r.classList.replace("collapsed","expanded")}):a.map(r=>{r.classList.replace("expanded","collapsed")})}function To(e,t="expand-all"){gu.call(this,e.target.closest(".operations-root"),t)}function Fo(e,t=!1){return p`<summary @click="${a=>{yu.call(this,e,a)}}" 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?p`<span style="font-family:var(--font-regular);font-size:var(--font-size-small);color:var(--primary);margin-left:16px">Webhook</span>`:""}</div>${e.deprecated?p`<span style="font-size:var(--font-size-small);text-transform:uppercase;font-weight:700;color:var(--red);margin:2px 0 0 5px">deprecated</span>`:""} ${this.showSummaryWhenCollapsed?p`<div class="only-large-screen" style="min-width:60px;flex:1"></div><div part="section-endpoint-head-description" class="descr">${e.summary||e.shortSummary}</div>`:""}</summary>`}function Oo(e){let t=new Set;for(let i in e.responses)for(let o in e.responses[i]?.content)t.add(o.trim());let a=[...t].join(", "),r=this.resolvedSpec.securitySchemes.filter(i=>i.finalKeyValue&&e.security?.some(o=>i.securitySchemeId in o))||[],s=this.resolvedSpec.securitySchemes.find(i=>i.securitySchemeId==="_rapidoc_api_key"&&i.value!=="-");s&&r.push(s);let n=e.xCodeSamples?po(e.xCodeSamples):"";return p`<div part="section-endpoint-body-${e.expanded?"expanded":"collapsed"}" class="endpoint-body ${e.method} ${e.deprecated?"deprecated":""}"><div class="summary">${e.summary?p`<div class="title" part="section-endpoint-body-title">${e.summary}</div>`:e.shortSummary===e.description?"":p`<div class="title" part="section-endpoint-body-title">${e.shortSummary}</div>`} ${e.xBadges&&e.xBadges?.length>0?p`<div style="display:flex;flex-wrap:wrap;font-size:var(--font-size-small)">${e.xBadges.map(i=>i.color==="none"?"":p`<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(--${i.color}) 20%,transparent);color:var(--${i.color});border:1px solid var(--${i.color})">${i.label}</span>`)}</div>`:""} ${e.description?p`<div part="section-endpoint-body-description" class="m-markdown">${F(O(E(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?p`<div style="background:var(--muted);padding:2px 8px 8px 8px;margin:8px 0;border-radius:var(--card-radius)"><div class="m-markdown">${F(O(E(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?p`<a style="font-family:var(--font-mono);font-size:var(--font-size-small)" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url}<div style="transform:rotate(270deg) scale(1.5);display:inline-block;margin-left:5px">⇲</div></a>`:""}</div>`:""}<slot name="${e.elementId}"></slot>${co.call(this,e.security)} ${n}</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="${r}" .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="${a}" 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="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, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?uo.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="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, 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 bu(e=!1,t=!1){return this.resolvedSpec?p`${e?"":p`<div style="display:flex;justify-content:flex-end"><span @click="${a=>To(a,"expand-all")}" style="color:var(--primary);cursor:pointer">Expand all </span> |  <span @click="${a=>To(a,"collapse-all")}" style="color:var(--primary);cursor:pointer">Collapse all </span>  sections</div>`} ${this.resolvedSpec.tags.map(a=>p`${e?p`<div class="section-tag-body">${a.paths.filter(r=>!this.searchVal||_t(this.searchVal,r,a.name)).map(r=>p`<section id="${r.elementId}" class="m-endpoint regular-font ${r.method} ${t||r.expanded?"expanded":"collapsed"}">${Fo.call(this,r,t)} ${t||r.expanded?Oo.call(this,r):""}</section>`)}</div>`:p`<div class="regular-font section-gap section-tag ${a.expanded?"expanded":"collapsed"}"><div class="section-tag-header" @click="${()=>{a.expanded=!a.expanded,this.requestUpdate()}}"><div id="${a.elementId}" class="sub-title tag" style="color:var(--primary)">${a.displayName||a.name}</div></div><div class="section-tag-body"><slot name="${a.elementId}"></slot><div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${F(O(E(a.description||"")))}</div>${a.paths.filter(r=>!this.searchVal||_t(this.searchVal,r,a.name)).map(r=>p`<section part="section-endpoint" id="${r.elementId}" class="m-endpoint regular-font ${r.method} ${t||r.expanded?"expanded":"collapsed"}">${Fo.call(this,r,t)} ${t||r.expanded?Oo.call(this,r):""}</section>`)}</div></div>`}`)}`:""}function vu(e){return p`<div style="${e}"><svg 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></div>`}function xu(){return p`<header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px"><div class="only-large-screen-flex" style="align-items:center"><slot name="logo" class="logo" part="section-logo">${vu("height:36px;width:36px;margin-left:5px")}</slot><div class="header-title" part="label-header-title">${this.headingText}</div></div><div style="margin:0 8px;display:flex;flex:1">${this.allowSpecUrlLoad==="false"?"":p`<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 style="margin:6px 5px 0 -24px;font-size:var(--font-size-regular);cursor:pointer">↩</div>`} ${this.allowSpecFileLoad==="false"?"":p`<input id="spec-file" part="file-input" type="file" style="display:none" value="${this.specFile||""}" @change="${this.onSpecFileChange}" spellcheck="false"> <button class="m-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)?"":p`<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 style="margin:6px 5px 0 -24px;font-size:var(--font-size-regular);cursor:pointer">↩</div>`} ${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":p`<button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px" @click="${this.onShowAdvancedSearchClicked}">Search</button>`}</div></header>`}function wu(){return p`<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"><span 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 style="display:flex;gap:16px;flex-wrap:wrap;margin:8px 0 24px"><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> <label for="search-api-path" style="cursor:pointer">API Path</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-descr">API Description</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-params">API Parameters</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-request-body">Request Body Parameters</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-resp-descr">Response Description</label></div></div></span>${this.advancedSearchMatches?.map(e=>p`<div class="mono-font small-font-size hover-bg" style="padding:5px;cursor:pointer;border-bottom:1px solid var(--border);${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 style="pointer-events:none" class="upper bold-text method-fg ${e.method}">${e.method}</span> <span style="pointer-events:none">${e.path}</span> <span style="pointer-events:none" class="regular-font gray-text">${e.summary}</span></div>`)}</div></dialog>`}function _o(e=!1,t=!1){return this.resolvedSpec?(this.persistAuth==="true"&&xp.call(this),this.resolvedSpec.specLoadError?p`<div id="spec-not-found" style="display:flex;align-items:center;justify-content:center;border:1px dashed var(--border);padding:12px;overflow-wrap:anywhere;font-size:var(--font-size-small);color:var(--red);font-family:var(--font-mono)">${this.resolvedSpec.info.description}</div>`:this.resolvedSpec.isSpecLoading?p`<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>`:p`<slot name="fixed-header"></slot>${this.showHeader==="false"?"":xu.call(this)} ${this.allowAdvancedSearch==="false"?"":wu.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?uu.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?p`<div class="loader"></div>`:p`${this.loadFailed===!0?p`<div style="text-align:center;margin:16px">Unable to load the Spec</div>`:p`<div class="operations-root" @click="${a=>{this.handleHref(a)}}">${this.renderStyle==="focused"?p`${fu.call(this)}`:p`${this.showInfo==="true"?ws.call(this):""} ${this.allowServerSelection==="true"?Eo.call(this):""} ${this.allowAuthentication==="true"?lo.call(this,this.allowTry):""}<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>${this.renderStyle==="read"?iu.call(this):bu.call(this,e,t)} ${this.showComponents==="true"?$o.call(this):""}`}</div>`}`}</div><slot name="footer"></slot></main></div>`):""}var jo={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},Ro=class extends se{constructor(){super();let e={rootMargin:"0px 0px -50% 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this._intersectingElements=new Map,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver(t=>{this.onIntersect(t)},e),this._userSetLayout=!1,this._isDefaultingLayout=!1}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String,reflect:!0},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},additionalAuthorizeParams:{type:Object,attribute:"additional-authorize-params",converter:jo},additionalTokenParams:{type:Object,attribute:"additional-token-params",converter:jo},mockServer:{type:String,attribute:"mock-server"},mockServerStatusCode:{type:String,attribute:"mock-server-status-code"},mockServerStatusStrategy:{type:String,attribute:"mock-server-status-strategy"},mockServerDelay:{type:Number,attribute:"mock-server-delay"},mockServerLog:{type:String,attribute:"mock-server-log"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String,reflect:!0},colorScheme:{type:String,attribute:"color-scheme",reflect:!0},radius:{type:String,reflect:!0},scale:{type:String,reflect:!0},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navItemSpacing:{type:String,attribute:"nav-item-spacing",reflect:!0},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[Tn,qe,Tt,la,ca,Sn,wr,da,En,An,mc,B`rapi-doc:not(:defined){display:none}:host{all:initial;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-regular);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}.main-content-inner--view-mode{padding:0 8px}.main-content-inner--read-mode{padding-bottom: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{padding:0 4px}.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}::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}.tag.title{text-transform:uppercase}.main-header{background:var(--background);color:var(--foreground)}.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:3px;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:var(--card-radius);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:2px solid var(--border);width:100%;margin:24px 0}.tooltip{cursor:pointer;border:1px solid var(--border);border-left-width:4px;margin-left:2px}.tooltip a{color:var(--card-foreground);text-decoration:none}.tooltip-text{color:var(--card-foreground);z-index:1;background:var(--card);visibility:hidden;overflow-wrap:break-word;max-width:400px;position:absolute}.tooltip:hover{color:var(--primary);border-color:var(--primary)}.tooltip:hover a:hover{color:var(--primary)}.tooltip:hover .tooltip-text{visibility:visible}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.nav-method{font-weight:700;font-size:calc(var(--font-size-small) - 2px);white-space:nowrap;flex-shrink:0;margin-inline-start:auto}.nav-method.false{display:none}.nav-method.as-colored-text{color:var(--method-default)}.nav-method.as-colored-text.get{color:var(--nav-get-color,var(--method-get))}.nav-method.as-colored-text.put{color:var(--nav-put-color,var(--method-put))}.nav-method.as-colored-text.post{color:var(--nav-post-color,var(--method-post))}.nav-method.as-colored-text.delete{color:var(--nav-delete-color,var(--method-delete))}.nav-method.as-colored-text.head{color:var(--nav-head-color,var(--method-head))}.nav-method.as-colored-text.patch{color:var(--nav-patch-color,var(--method-patch))}.nav-method.as-colored-text.options{color:var(--nav-options-color,var(--method-options))}.nav-method.as-colored-text.trace{color:var(--nav-trace-color,var(--method-trace))}.nav-method.as-colored-text.query{color:var(--nav-query-color,var(--method-query))}.nav-method.as-colored-text.copy{color:var(--nav-copy-color,var(--method-copy,var(--method-default)))}.nav-method.as-colored-text.purge{color:var(--nav-purge-color,var(--method-purge,var(--method-default)))}.nav-method.as-colored-block{text-align:center;border-radius:var(--radius);min-width:32px;color:var(--nav-method-badge-fg,var(--method-badge-fg,#000));background:var(--method-default);padding:1px 4px;font-weight:700}:host([color-scheme=light]) .nav-method.as-colored-block{color:var(--nav-method-badge-fg,var(--method-badge-fg,#fff))}@media (prefers-color-scheme:light){:host([color-scheme=system]) .nav-method.as-colored-block{color:var(--nav-method-badge-fg,var(--method-badge-fg,#fff))}}.colored-block .nav-method.as-colored-block{outline:1px solid}.nav-method.as-colored-block.get{background:var(--nav-get-color,var(--method-get))}.nav-method.as-colored-block.put{background:var(--nav-put-color,var(--method-put))}.nav-method.as-colored-block.post{background:var(--nav-post-color,var(--method-post))}.nav-method.as-colored-block.delete{background:var(--nav-delete-color,var(--method-delete))}.nav-method.as-colored-block.head{background:var(--nav-head-color,var(--method-head))}.nav-method.as-colored-block.patch{background:var(--nav-patch-color,var(--method-patch))}.nav-method.as-colored-block.options{background:var(--nav-options-color,var(--method-options))}.nav-method.as-colored-block.trace{background:var(--nav-trace-color,var(--method-trace))}.nav-method.as-colored-block.query{background:var(--nav-query-color,var(--method-query))}.nav-method.as-colored-block.copy{background:var(--nav-copy-color,var(--method-copy,var(--method-default)))}.nav-method.as-colored-block.purge{background:var(--nav-purge-color,var(--method-purge,var(--method-default)))}@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(--nav-width,18.75rem);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}}`,Xe]}connectedCallback(){super.connectedCallback();let e=this.parentElement;if(e&&(e.offsetWidth===0&&e.style.width===""&&(e.style.width="100vw"),e.offsetHeight===0&&e.style.height===""&&(e.style.height="100vh"),e.tagName==="BODY"&&(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.loadFonts!=="false"){let a={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",a);a.weight="600";let s=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",a);r.load().then(n=>{document.fonts.add(n)}),s.load().then(n=>{document.fonts.add(n)})}if((!this.renderStyle||!"read, view, focused,".includes(`${this.renderStyle},`))&&(this.renderStyle="focused"),this.hasAttribute("layout")){let a=this.getAttribute("layout");"row, column,".includes(`${a},`)&&(this.layout=a,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 a=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}(!this.schemaStyle||!"tree, table,".includes(`${this.schemaStyle},`))&&(this.schemaStyle="tree");let t=pa(this.theme);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),ua(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.routePrefix||="#",(!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.onNavTagClick||!"expand-collapse, show-description,".includes(`${this.onNavTagClick},`))&&(this.onNavTagClick="expand-collapse"),(!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.navActiveItemMarker||!"left-bar, colored-block".includes(`${this.navActiveItemMarker},`))&&(this.navActiveItemMarker="left-bar"),(!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||="",window.addEventListener("hashchange",()=>{this.scrollToPath(this.getElementIDFromURL())},!0)}disconnectedCallback(){this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this.intersectionObserver&&this.intersectionObserver.disconnect(),this.mockServer==="true"&&Wa(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){let e=new E.Renderer,t=new Ge;return e.heading=({text:a,depth:r})=>`<h${r} class="observe-me" id="${t.slug(a)}">${a}</h${r}>`,na(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)}}render(){let e=document.querySelector(`link[href*="${this.cssFile}"]`);return e&&this.shadowRoot.appendChild(e.cloneNode()),_o.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),oa(this.shadowRoot),e.has("theme")){let t=pa(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),ua(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"&&Wa()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&ro({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,a){if(e==="spec-url"&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(a),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="layout"&&!this._isDefaultingLayout){if(a!==null&&"row, column,".includes(`${a},`))this._userSetLayout=!0,this.layout=a;else if(a===null){this._userSetLayout=!1;let r=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}}if(e==="render-style"&&(a==="read"?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect(),!this._userSetLayout)){let r=a==="read"||a==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}if(e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let r=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=a,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=a,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=a,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),r=!0),r&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Ft);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,a)}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],a=new FileReader;a.onload=()=>{try{let r=JSON.parse(a.result);this.loadSpec(r),this.shadowRoot.getElementById("spec-url").value=""}catch{}},a.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(a=>a.paths.filter(r=>{this.searchVal&&_t(this.searchVal,r,a.name)&&(a.expanded=!0)})),this.resolvedSpec.components.forEach(a=>a.subComponents.filter(r=>{r.expanded=!1,yc(this.searchVal,r)&&(r.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(a=>{a.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.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;let t=await Ki.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}}}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}),this.intersectionObserver.disconnect(),this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="read"&&(await ma(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;let a=this.getElementIDFromURL();if(a)this.renderStyle==="view"?this.expandAndGotoOperation(a,!0,!0):this.scrollToPath(a);else if(this.renderStyle==="focused"&&!this.gotoPath){let r=this.showInfo==="true"?"overview":this.resolvedSpec.tags[0]?.paths[0]?.elementId;r&&this.scrollToPath(r)}}getComponentBaseURL(){let{href:e}=window.location,t=this.routePrefix.replace(/(#|\/)$/,"");if(!t)return e.split("#")[0];let a=e.lastIndexOf(t);return a===-1?e:e.slice(0,a)}getElementIDFromURL(){let e=this.getComponentBaseURL();return window.location.href.replace(e+this.routePrefix,"")}replaceHistoryState(e){let t=this.getComponentBaseURL();window.history.replaceState(null,null,`${t}${this.routePrefix||"#"}${e}`)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let a=!0,r=e.indexOf("#")===-1?e:e.substring(1);if(r.startsWith("overview")||r==="servers"||r==="auth")a=!1;else for(let s=0;s<this.resolvedSpec.tags?.length;s++){let n=this.resolvedSpec.tags[s],i=n.paths?.find(o=>o.elementId===e);i&&(i.expanded&&n.expanded?a=!1:(i.expanded=!0,n.expanded=!0))}t&&(a&&this.requestUpdate(),window.setTimeout(()=>{let s=this.shadowRoot.getElementById(r);s&&(s.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),this.updateRoute==="true"&&this.replaceHistoryState(r))},a?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(a=>a.elementId===e))}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 a=[],r=[];for(let o of t){let l=o.getBoundingClientRect().top;l>=0?a.push({el:o,top:l}):r.push({el:o,top:l})}let s;a.length>0?(a.sort((o,l)=>o.top-l.top),s=a[0].el):(r.sort((o,l)=>l.top-o.top),s=r[0].el);let n=s.id,i=this.shadowRoot.getElementById(`link-${n}`);i&&!i.classList.contains("active")&&(this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this._intersectionRaf=requestAnimationFrame(()=>{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!==i&&(o.classList.remove("active"),o.part.remove("section-navbar-active-item")),i.classList.add("active"),i.part.add("section-navbar-active-item");let l=i.closest(".nav-scroll");if(l){let c=l.querySelector(".nav-bar-header")||l.querySelector(".nav-bar-search-container"),d=c?c.offsetHeight:0;if(i.offsetTop<=d+30){if(l.scrollTop>0){let u=this.scrollBehavior==="auto"?"auto":"smooth";l.scrollTo({top:0,behavior:u})}}else{let u=l.getBoundingClientRect(),h=i.getBoundingClientRect();if(h.top<u.top+d+15||h.bottom>u.bottom-40){let m=this.scrollBehavior==="auto"?"auto":"smooth";i.scrollIntoView({behavior:m,block:"nearest"})}}}this.updateRoute==="true"&&this.replaceHistoryState(n)}))}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:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(e,t=!0){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let a=e.target;if(a.dataset.contentId){if(this.isIntersectionObserverActive=!1,this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="focused"){let r=this.shadowRoot.querySelector("api-request");typeof r?.beforeNavigationFocusedMode=="function"&&r.beforeNavigationFocusedMode()}this.scrollToPath(a.dataset.contentId,!0,t),setTimeout(()=>{this.isIntersectionObserverActive=!0},500)}}async scrollTo(e){return this.scrollToPath(e)}async scrollToPath(e,t=!0,a=!0){if(this.renderStyle==="focused"&&(this.focusedElementId=e,await ma(0)),this.renderStyle==="view")this.expandAndGotoOperation(e,t,!0);else{let r=!1,s=this.shadowRoot.getElementById(e);if(s?(r=!0,s.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):r=!1,r){if(this.renderStyle==="focused"){let i=this.shadowRoot.querySelector("api-request");typeof i?.afterNavigationFocusedMode=="function"&&i.afterNavigationFocusedMode();let o=this.shadowRoot.querySelector("api-response");typeof o?.resetSelection=="function"&&o.resetSelection()}this.updateRoute==="true"&&this.replaceHistoryState(e);let n=this.shadowRoot.getElementById(`link-${e}`);if(n){a&&n.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await ma(0);let i=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");i&&(i.classList.remove("active"),i.part.remove("active"),i.part.remove("section-navbar-active-item")),n.classList.add("active"),n.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,a){return He.call(this,e,t,a)}setApiKey(e,t){return He.call(this,e,"","",t)}removeAllSecurityKeys(){return ms.call(this)}setApiServer(e){return ks.call(this,e)}onAdvancedSearch(e,t){let a=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let r;r=a.type==="text"?a:a.closest(".advanced-search-options").querySelector("input[type=text]");let s=[...a.closest(".advanced-search-options").querySelectorAll("input:checked")].map(n=>n.id);this.advancedSearchMatches=gc(r.value,this.resolvedSpec.tags,s)},t)}};customElements.define("rapi-doc",Ro);var No={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},qo=class extends se{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},additionalAuthorizeParams:{type:Object,attribute:"additional-authorize-params",converter:No},additionalTokenParams:{type:Object,attribute:"additional-token-params",converter:No},mockServer:{type:String,attribute:"mock-server"},mockServerStatusCode:{type:String,attribute:"mock-server-status-code"},mockServerStatusStrategy:{type:String,attribute:"mock-server-status-strategy"},mockServerDelay:{type:Number,attribute:"mock-server-delay"},mockServerLog:{type:String,attribute:"mock-server-log"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String,reflect:!0},colorScheme:{type:String,attribute:"color-scheme",reflect:!0},radius:{type:String,reflect:!0},scale:{type:String,reflect:!0},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[Tn,qe,Tt,la,ca,Sn,wr,da,En,An,B`:host{all:initial;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-regular);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(){if(super.connectedCallback(),this.loadFonts!=="false"){let t={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},a=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",t);t.weight="600";let r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",t);a.load().then(s=>{document.fonts.add(s)}),r.load().then(s=>{document.fonts.add(s)})}(!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");let e=pa(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),ua(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"&&Wa(),super.disconnectedCallback()}render(){return _o.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),oa(this.shadowRoot),e.has("theme")){let t=pa(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),ua(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"&&Wa()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&ro({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}attributeChangedCallback(e,t,a){if(e==="spec-url"&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(a)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let r=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=a,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=a,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=a,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),r=!0),r&&this.resolvedSpec){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Ft);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,a)}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 Ki.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,a){return He.call(this,e,t,a)}setApiKey(e,t){return He.call(this,e,"","",t)}removeAllSecurityKeys(){return ms.call(this)}setApiServer(e){return ks.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(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})}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"})}}};customElements.define("rapi-doc-mini",qo);var Lo=class extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",e=>this.relayAuthParams(e),!0)}receiveAuthParms(){let e={};if(document.location.search){let t=new URLSearchParams(document.location.search);e={code:t.get("code"),error:t.get("error"),state:t.get("state"),responseType:"code"}}else window.location.hash&&(e={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"});if(window.opener){window.opener.postMessage(e,this.target);return}sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(e))}relayAuthParams(e){if(window.parent&&e.key==="rapidoc-oauth-data"){let t=JSON.parse(e.newValue);window.parent.postMessage(t,this.target)}}parseQueryString(e,t){let a=e.split("&");for(let r=0;r<a.length;r++){let s=a[r].split("=");if(decodeURIComponent(s[0])===t)return decodeURIComponent(s[1])}}};customElements.define("oauth-receiver",Lo);var ku={RapiDoc:Ro};export{Lo as OAuthReceiver,qo as RapiDocMini,ku as default};