UNPKG

vitepress-plugin-auto-sidebar

Version:
33 lines (32 loc) 44.2 kB
(function(Q,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("fs"),require("path")):typeof define=="function"&&define.amd?define(["exports","fs","path"],G):(Q=typeof globalThis<"u"?globalThis:Q||self,G(Q.AutoSidebar={},Q.fs,Q.path))})(this,(function(Q,G,pe){"use strict";function Xr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var se={exports:{}},D={},ne={},V={},dr;function ie(){if(dr)return V;dr=1;function u(c){return typeof c>"u"||c===null}function y(c){return typeof c=="object"&&c!==null}function S(c){return Array.isArray(c)?c:u(c)?[]:[c]}function b(c,d){var n,i,t,w;if(d)for(w=Object.keys(d),n=0,i=w.length;n<i;n+=1)t=w[n],c[t]=d[t];return c}function v(c,d){var n="",i;for(i=0;i<d;i+=1)n+=c;return n}function s(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return V.isNothing=u,V.isObject=y,V.toArray=S,V.repeat=v,V.isNegativeZero=s,V.extend=b,V}var Le,hr;function ue(){if(hr)return Le;hr=1;function u(y,S){Error.call(this),this.name="YAMLException",this.reason=y,this.mark=S,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.toString=function(S){var b=this.name+": ";return b+=this.reason||"(unknown reason)",!S&&this.mark&&(b+=" "+this.mark.toString()),b},Le=u,Le}var De,mr;function Zr(){if(mr)return De;mr=1;var u=ie();function y(S,b,v,s,c){this.name=S,this.buffer=b,this.position=v,this.line=s,this.column=c}return y.prototype.getSnippet=function(b,v){var s,c,d,n,i;if(!this.buffer)return null;for(b=b||4,v=v||75,s="",c=this.position;c>0&&`\0\r …\u2028\u2029`.indexOf(this.buffer.charAt(c-1))===-1;)if(c-=1,this.position-c>v/2-1){s=" ... ",c+=5;break}for(d="",n=this.position;n<this.buffer.length&&`\0\r …\u2028\u2029`.indexOf(this.buffer.charAt(n))===-1;)if(n+=1,n-this.position>v/2-1){d=" ... ",n-=5;break}return i=this.buffer.slice(c,n),u.repeat(" ",b)+s+i+d+` `+u.repeat(" ",b+this.position-c+s.length)+"^"},y.prototype.toString=function(b){var v,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),b||(v=this.getSnippet(),v&&(s+=`: `+v)),s},De=y,De}var Me,xr;function q(){if(xr)return Me;xr=1;var u=ue(),y=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],S=["scalar","sequence","mapping"];function b(s){var c={};return s!==null&&Object.keys(s).forEach(function(d){s[d].forEach(function(n){c[String(n)]=d})}),c}function v(s,c){if(c=c||{},Object.keys(c).forEach(function(d){if(y.indexOf(d)===-1)throw new u('Unknown option "'+d+'" is met in definition of "'+s+'" YAML type.')}),this.tag=s,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(d){return d},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.defaultStyle=c.defaultStyle||null,this.styleAliases=b(c.styleAliases||null),S.indexOf(this.kind)===-1)throw new u('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Me=v,Me}var Ne,vr;function oe(){if(vr)return Ne;vr=1;var u=ie(),y=ue(),S=q();function b(c,d,n){var i=[];return c.include.forEach(function(t){n=b(t,d,n)}),c[d].forEach(function(t){n.forEach(function(w,F){w.tag===t.tag&&w.kind===t.kind&&i.push(F)}),n.push(t)}),n.filter(function(t,w){return i.indexOf(w)===-1})}function v(){var c={scalar:{},sequence:{},mapping:{},fallback:{}},d,n;function i(t){c[t.kind][t.tag]=c.fallback[t.tag]=t}for(d=0,n=arguments.length;d<n;d+=1)arguments[d].forEach(i);return c}function s(c){this.include=c.include||[],this.implicit=c.implicit||[],this.explicit=c.explicit||[],this.implicit.forEach(function(d){if(d.loadKind&&d.loadKind!=="scalar")throw new y("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=b(this,"implicit",[]),this.compiledExplicit=b(this,"explicit",[]),this.compiledTypeMap=v(this.compiledImplicit,this.compiledExplicit)}return s.DEFAULT=null,s.create=function(){var d,n;switch(arguments.length){case 1:d=s.DEFAULT,n=arguments[0];break;case 2:d=arguments[0],n=arguments[1];break;default:throw new y("Wrong number of arguments for Schema.create function")}if(d=u.toArray(d),n=u.toArray(n),!d.every(function(i){return i instanceof s}))throw new y("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(i){return i instanceof S}))throw new y("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new s({include:d,explicit:n})},Ne=s,Ne}var qe,gr;function zr(){if(gr)return qe;gr=1;var u=q();return qe=new u("tag:yaml.org,2002:str",{kind:"scalar",construct:function(y){return y!==null?y:""}}),qe}var Be,Ar;function en(){if(Ar)return Be;Ar=1;var u=q();return Be=new u("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(y){return y!==null?y:[]}}),Be}var Ye,yr;function rn(){if(yr)return Ye;yr=1;var u=q();return Ye=new u("tag:yaml.org,2002:map",{kind:"mapping",construct:function(y){return y!==null?y:{}}}),Ye}var Pe,Cr;function je(){if(Cr)return Pe;Cr=1;var u=oe();return Pe=new u({explicit:[zr(),en(),rn()]}),Pe}var He,Er;function nn(){if(Er)return He;Er=1;var u=q();function y(v){if(v===null)return!0;var s=v.length;return s===1&&v==="~"||s===4&&(v==="null"||v==="Null"||v==="NULL")}function S(){return null}function b(v){return v===null}return He=new u("tag:yaml.org,2002:null",{kind:"scalar",resolve:y,construct:S,predicate:b,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),He}var Ue,wr;function on(){if(wr)return Ue;wr=1;var u=q();function y(v){if(v===null)return!1;var s=v.length;return s===4&&(v==="true"||v==="True"||v==="TRUE")||s===5&&(v==="false"||v==="False"||v==="FALSE")}function S(v){return v==="true"||v==="True"||v==="TRUE"}function b(v){return Object.prototype.toString.call(v)==="[object Boolean]"}return Ue=new u("tag:yaml.org,2002:bool",{kind:"scalar",resolve:y,construct:S,predicate:b,represent:{lowercase:function(v){return v?"true":"false"},uppercase:function(v){return v?"TRUE":"FALSE"},camelcase:function(v){return v?"True":"False"}},defaultStyle:"lowercase"}),Ue}var Ke,Fr;function ln(){if(Fr)return Ke;Fr=1;var u=ie(),y=q();function S(n){return 48<=n&&n<=57||65<=n&&n<=70||97<=n&&n<=102}function b(n){return 48<=n&&n<=55}function v(n){return 48<=n&&n<=57}function s(n){if(n===null)return!1;var i=n.length,t=0,w=!1,F;if(!i)return!1;if(F=n[t],(F==="-"||F==="+")&&(F=n[++t]),F==="0"){if(t+1===i)return!0;if(F=n[++t],F==="b"){for(t++;t<i;t++)if(F=n[t],F!=="_"){if(F!=="0"&&F!=="1")return!1;w=!0}return w&&F!=="_"}if(F==="x"){for(t++;t<i;t++)if(F=n[t],F!=="_"){if(!S(n.charCodeAt(t)))return!1;w=!0}return w&&F!=="_"}for(;t<i;t++)if(F=n[t],F!=="_"){if(!b(n.charCodeAt(t)))return!1;w=!0}return w&&F!=="_"}if(F==="_")return!1;for(;t<i;t++)if(F=n[t],F!=="_"){if(F===":")break;if(!v(n.charCodeAt(t)))return!1;w=!0}return!w||F==="_"?!1:F!==":"?!0:/^(:[0-5]?[0-9])+$/.test(n.slice(t))}function c(n){var i=n,t=1,w,F,I=[];return i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),w=i[0],(w==="-"||w==="+")&&(w==="-"&&(t=-1),i=i.slice(1),w=i[0]),i==="0"?0:w==="0"?i[1]==="b"?t*parseInt(i.slice(2),2):i[1]==="x"?t*parseInt(i,16):t*parseInt(i,8):i.indexOf(":")!==-1?(i.split(":").forEach(function(k){I.unshift(parseInt(k,10))}),i=0,F=1,I.forEach(function(k){i+=k*F,F*=60}),t*i):t*parseInt(i,10)}function d(n){return Object.prototype.toString.call(n)==="[object Number]"&&n%1===0&&!u.isNegativeZero(n)}return Ke=new y("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:c,predicate:d,represent:{binary:function(n){return n>=0?"0b"+n.toString(2):"-0b"+n.toString(2).slice(1)},octal:function(n){return n>=0?"0"+n.toString(8):"-0"+n.toString(8).slice(1)},decimal:function(n){return n.toString(10)},hexadecimal:function(n){return n>=0?"0x"+n.toString(16).toUpperCase():"-0x"+n.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ke}var Ge,_r;function un(){if(_r)return Ge;_r=1;var u=ie(),y=q(),S=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function b(n){return!(n===null||!S.test(n)||n[n.length-1]==="_")}function v(n){var i,t,w,F;return i=n.replace(/_/g,"").toLowerCase(),t=i[0]==="-"?-1:1,F=[],"+-".indexOf(i[0])>=0&&(i=i.slice(1)),i===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:i===".nan"?NaN:i.indexOf(":")>=0?(i.split(":").forEach(function(I){F.unshift(parseFloat(I,10))}),i=0,w=1,F.forEach(function(I){i+=I*w,w*=60}),t*i):t*parseFloat(i,10)}var s=/^[-+]?[0-9]+e/;function c(n,i){var t;if(isNaN(n))switch(i){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===n)switch(i){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===n)switch(i){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(u.isNegativeZero(n))return"-0.0";return t=n.toString(10),s.test(t)?t.replace("e",".e"):t}function d(n){return Object.prototype.toString.call(n)==="[object Number]"&&(n%1!==0||u.isNegativeZero(n))}return Ge=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:b,construct:v,predicate:d,represent:c,defaultStyle:"lowercase"}),Ge}var We,Sr;function br(){if(Sr)return We;Sr=1;var u=oe();return We=new u({include:[je()],implicit:[nn(),on(),ln(),un()]}),We}var $e,Tr;function Or(){if(Tr)return $e;Tr=1;var u=oe();return $e=new u({include:[br()]}),$e}var Je,kr;function tn(){if(kr)return Je;kr=1;var u=q(),y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),S=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function b(c){return c===null?!1:y.exec(c)!==null||S.exec(c)!==null}function v(c){var d,n,i,t,w,F,I,k=0,L=null,W,X,$;if(d=y.exec(c),d===null&&(d=S.exec(c)),d===null)throw new Error("Date resolve error");if(n=+d[1],i=+d[2]-1,t=+d[3],!d[4])return new Date(Date.UTC(n,i,t));if(w=+d[4],F=+d[5],I=+d[6],d[7]){for(k=d[7].slice(0,3);k.length<3;)k+="0";k=+k}return d[9]&&(W=+d[10],X=+(d[11]||0),L=(W*60+X)*6e4,d[9]==="-"&&(L=-L)),$=new Date(Date.UTC(n,i,t,w,F,I,k)),L&&$.setTime($.getTime()-L),$}function s(c){return c.toISOString()}return Je=new u("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:b,construct:v,instanceOf:Date,represent:s}),Je}var Qe,Rr;function fn(){if(Rr)return Qe;Rr=1;var u=q();function y(S){return S==="<<"||S===null}return Qe=new u("tag:yaml.org,2002:merge",{kind:"scalar",resolve:y}),Qe}function Ir(u){throw new Error('Could not dynamically require "'+u+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ve,Lr;function cn(){if(Lr)return Ve;Lr=1;var u;try{var y=Ir;u=y("buffer").Buffer}catch{}var S=q(),b=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function v(n){if(n===null)return!1;var i,t,w=0,F=n.length,I=b;for(t=0;t<F;t++)if(i=I.indexOf(n.charAt(t)),!(i>64)){if(i<0)return!1;w+=6}return w%8===0}function s(n){var i,t,w=n.replace(/[\r\n=]/g,""),F=w.length,I=b,k=0,L=[];for(i=0;i<F;i++)i%4===0&&i&&(L.push(k>>16&255),L.push(k>>8&255),L.push(k&255)),k=k<<6|I.indexOf(w.charAt(i));return t=F%4*6,t===0?(L.push(k>>16&255),L.push(k>>8&255),L.push(k&255)):t===18?(L.push(k>>10&255),L.push(k>>2&255)):t===12&&L.push(k>>4&255),u?u.from?u.from(L):new u(L):L}function c(n){var i="",t=0,w,F,I=n.length,k=b;for(w=0;w<I;w++)w%3===0&&w&&(i+=k[t>>18&63],i+=k[t>>12&63],i+=k[t>>6&63],i+=k[t&63]),t=(t<<8)+n[w];return F=I%3,F===0?(i+=k[t>>18&63],i+=k[t>>12&63],i+=k[t>>6&63],i+=k[t&63]):F===2?(i+=k[t>>10&63],i+=k[t>>4&63],i+=k[t<<2&63],i+=k[64]):F===1&&(i+=k[t>>2&63],i+=k[t<<4&63],i+=k[64],i+=k[64]),i}function d(n){return u&&u.isBuffer(n)}return Ve=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:v,construct:s,predicate:d,represent:c}),Ve}var Xe,Dr;function an(){if(Dr)return Xe;Dr=1;var u=q(),y=Object.prototype.hasOwnProperty,S=Object.prototype.toString;function b(s){if(s===null)return!0;var c=[],d,n,i,t,w,F=s;for(d=0,n=F.length;d<n;d+=1){if(i=F[d],w=!1,S.call(i)!=="[object Object]")return!1;for(t in i)if(y.call(i,t))if(!w)w=!0;else return!1;if(!w)return!1;if(c.indexOf(t)===-1)c.push(t);else return!1}return!0}function v(s){return s!==null?s:[]}return Xe=new u("tag:yaml.org,2002:omap",{kind:"sequence",resolve:b,construct:v}),Xe}var Ze,Mr;function pn(){if(Mr)return Ze;Mr=1;var u=q(),y=Object.prototype.toString;function S(v){if(v===null)return!0;var s,c,d,n,i,t=v;for(i=new Array(t.length),s=0,c=t.length;s<c;s+=1){if(d=t[s],y.call(d)!=="[object Object]"||(n=Object.keys(d),n.length!==1))return!1;i[s]=[n[0],d[n[0]]]}return!0}function b(v){if(v===null)return[];var s,c,d,n,i,t=v;for(i=new Array(t.length),s=0,c=t.length;s<c;s+=1)d=t[s],n=Object.keys(d),i[s]=[n[0],d[n[0]]];return i}return Ze=new u("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:S,construct:b}),Ze}var ze,Nr;function sn(){if(Nr)return ze;Nr=1;var u=q(),y=Object.prototype.hasOwnProperty;function S(v){if(v===null)return!0;var s,c=v;for(s in c)if(y.call(c,s)&&c[s]!==null)return!1;return!0}function b(v){return v!==null?v:{}}return ze=new u("tag:yaml.org,2002:set",{kind:"mapping",resolve:S,construct:b}),ze}var er,qr;function te(){if(qr)return er;qr=1;var u=oe();return er=new u({include:[Or()],implicit:[tn(),fn()],explicit:[cn(),an(),pn(),sn()]}),er}var rr,Br;function dn(){if(Br)return rr;Br=1;var u=q();function y(){return!0}function S(){}function b(){return""}function v(s){return typeof s>"u"}return rr=new u("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:y,construct:S,predicate:v,represent:b}),rr}var nr,Yr;function hn(){if(Yr)return nr;Yr=1;var u=q();function y(s){if(s===null||s.length===0)return!1;var c=s,d=/\/([gim]*)$/.exec(s),n="";return!(c[0]==="/"&&(d&&(n=d[1]),n.length>3||c[c.length-n.length-1]!=="/"))}function S(s){var c=s,d=/\/([gim]*)$/.exec(s),n="";return c[0]==="/"&&(d&&(n=d[1]),c=c.slice(1,c.length-n.length-1)),new RegExp(c,n)}function b(s){var c="/"+s.source+"/";return s.global&&(c+="g"),s.multiline&&(c+="m"),s.ignoreCase&&(c+="i"),c}function v(s){return Object.prototype.toString.call(s)==="[object RegExp]"}return nr=new u("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:y,construct:S,predicate:v,represent:b}),nr}var ir,Pr;function mn(){if(Pr)return ir;Pr=1;var u;try{var y=Ir;u=y("esprima")}catch{typeof window<"u"&&(u=window.esprima)}var S=q();function b(d){if(d===null)return!1;try{var n="("+d+")",i=u.parse(n,{range:!0});return!(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function v(d){var n="("+d+")",i=u.parse(n,{range:!0}),t=[],w;if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(F){t.push(F.name)}),w=i.body[0].expression.body.range,i.body[0].expression.body.type==="BlockStatement"?new Function(t,n.slice(w[0]+1,w[1]-1)):new Function(t,"return "+n.slice(w[0],w[1]))}function s(d){return d.toString()}function c(d){return Object.prototype.toString.call(d)==="[object Function]"}return ir=new S("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:b,construct:v,predicate:c,represent:s}),ir}var or,jr;function de(){if(jr)return or;jr=1;var u=oe();return or=u.DEFAULT=new u({include:[te()],explicit:[dn(),hn(),mn()]}),or}var Hr;function xn(){if(Hr)return ne;Hr=1;var u=ie(),y=ue(),S=Zr(),b=te(),v=de(),s=Object.prototype.hasOwnProperty,c=1,d=2,n=3,i=4,t=1,w=2,F=3,I=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k=/[\x85\u2028\u2029]/,L=/[,\[\]\{\}]/,W=/^(?:!|!!|![a-z\-]+!)$/i,X=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $(e){return Object.prototype.toString.call(e)}function P(e){return e===10||e===13}function J(e){return e===9||e===32}function B(e){return e===9||e===32||e===10||e===13}function Z(e){return e===44||e===91||e===93||e===123||e===125}function tr(e){var o;return 48<=e&&e<=57?e-48:(o=e|32,97<=o&&o<=102?o-97+10:-1)}function me(e){return e===120?2:e===117?4:e===85?8:0}function xe(e){return 48<=e&&e<=57?e-48:-1}function ve(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?` `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function ge(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Ae=new Array(256),fe=new Array(256),M=0;M<256;M++)Ae[M]=ve(M)?1:0,fe[M]=ve(M);function fr(e,o){this.input=e,this.filename=o.filename||null,this.schema=o.schema||v,this.onWarning=o.onWarning||null,this.legacy=o.legacy||!1,this.json=o.json||!1,this.listener=o.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ye(e,o){return new y(o,new S(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function T(e,o){throw ye(e,o)}function le(e,o){e.onWarning&&e.onWarning.call(null,ye(e,o))}var ce={YAML:function(o,p,C){var h,E,r;o.version!==null&&T(o,"duplication of %YAML directive"),C.length!==1&&T(o,"YAML directive accepts exactly one argument"),h=/^([0-9]+)\.([0-9]+)$/.exec(C[0]),h===null&&T(o,"ill-formed argument of the YAML directive"),E=parseInt(h[1],10),r=parseInt(h[2],10),E!==1&&T(o,"unacceptable YAML version of the document"),o.version=C[0],o.checkLineBreaks=r<2,r!==1&&r!==2&&le(o,"unsupported YAML version of the document")},TAG:function(o,p,C){var h,E;C.length!==2&&T(o,"TAG directive accepts exactly two arguments"),h=C[0],E=C[1],W.test(h)||T(o,"ill-formed tag handle (first argument) of the TAG directive"),s.call(o.tagMap,h)&&T(o,'there is a previously declared suffix for "'+h+'" tag handle'),X.test(E)||T(o,"ill-formed tag prefix (second argument) of the TAG directive"),o.tagMap[h]=E}};function j(e,o,p,C){var h,E,r,l;if(o<p){if(l=e.input.slice(o,p),C)for(h=0,E=l.length;h<E;h+=1)r=l.charCodeAt(h),r===9||32<=r&&r<=1114111||T(e,"expected valid JSON character");else I.test(l)&&T(e,"the stream contains non-printable characters");e.result+=l}}function Ce(e,o,p,C){var h,E,r,l;for(u.isObject(p)||T(e,"cannot merge mappings; the provided source object is unacceptable"),h=Object.keys(p),r=0,l=h.length;r<l;r+=1)E=h[r],s.call(o,E)||(o[E]=p[E],C[E]=!0)}function H(e,o,p,C,h,E,r,l){var f,g;if(Array.isArray(h))for(h=Array.prototype.slice.call(h),f=0,g=h.length;f<g;f+=1)Array.isArray(h[f])&&T(e,"nested arrays are not supported inside keys"),typeof h=="object"&&$(h[f])==="[object Object]"&&(h[f]="[object Object]");if(typeof h=="object"&&$(h)==="[object Object]"&&(h="[object Object]"),h=String(h),o===null&&(o={}),C==="tag:yaml.org,2002:merge")if(Array.isArray(E))for(f=0,g=E.length;f<g;f+=1)Ce(e,o,E[f],p);else Ce(e,o,E,p);else!e.json&&!s.call(p,h)&&s.call(o,h)&&(e.line=r||e.line,e.position=l||e.position,T(e,"duplicated mapping key")),o[h]=E,delete p[h];return o}function U(e){var o;o=e.input.charCodeAt(e.position),o===10?e.position++:o===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):T(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function N(e,o,p){for(var C=0,h=e.input.charCodeAt(e.position);h!==0;){for(;J(h);)h=e.input.charCodeAt(++e.position);if(o&&h===35)do h=e.input.charCodeAt(++e.position);while(h!==10&&h!==13&&h!==0);if(P(h))for(U(e),h=e.input.charCodeAt(e.position),C++,e.lineIndent=0;h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);else break}return p!==-1&&C!==0&&e.lineIndent<p&&le(e,"deficient indentation"),C}function ee(e){var o=e.position,p;return p=e.input.charCodeAt(o),!!((p===45||p===46)&&p===e.input.charCodeAt(o+1)&&p===e.input.charCodeAt(o+2)&&(o+=3,p=e.input.charCodeAt(o),p===0||B(p)))}function ae(e,o){o===1?e.result+=" ":o>1&&(e.result+=u.repeat(` `,o-1))}function Ee(e,o,p){var C,h,E,r,l,f,g,x,a=e.kind,A=e.result,m;if(m=e.input.charCodeAt(e.position),B(m)||Z(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(h=e.input.charCodeAt(e.position+1),B(h)||p&&Z(h)))return!1;for(e.kind="scalar",e.result="",E=r=e.position,l=!1;m!==0;){if(m===58){if(h=e.input.charCodeAt(e.position+1),B(h)||p&&Z(h))break}else if(m===35){if(C=e.input.charCodeAt(e.position-1),B(C))break}else{if(e.position===e.lineStart&&ee(e)||p&&Z(m))break;if(P(m))if(f=e.line,g=e.lineStart,x=e.lineIndent,N(e,!1,-1),e.lineIndent>=o){l=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=r,e.line=f,e.lineStart=g,e.lineIndent=x;break}}l&&(j(e,E,r,!1),ae(e,e.line-f),E=r=e.position,l=!1),J(m)||(r=e.position+1),m=e.input.charCodeAt(++e.position)}return j(e,E,r,!1),e.result?!0:(e.kind=a,e.result=A,!1)}function we(e,o){var p,C,h;if(p=e.input.charCodeAt(e.position),p!==39)return!1;for(e.kind="scalar",e.result="",e.position++,C=h=e.position;(p=e.input.charCodeAt(e.position))!==0;)if(p===39)if(j(e,C,e.position,!0),p=e.input.charCodeAt(++e.position),p===39)C=e.position,e.position++,h=e.position;else return!0;else P(p)?(j(e,C,h,!0),ae(e,N(e,!1,o)),C=h=e.position):e.position===e.lineStart&&ee(e)?T(e,"unexpected end of the document within a single quoted scalar"):(e.position++,h=e.position);T(e,"unexpected end of the stream within a single quoted scalar")}function Fe(e,o){var p,C,h,E,r,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,p=C=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return j(e,p,e.position,!0),e.position++,!0;if(l===92){if(j(e,p,e.position,!0),l=e.input.charCodeAt(++e.position),P(l))N(e,!1,o);else if(l<256&&Ae[l])e.result+=fe[l],e.position++;else if((r=me(l))>0){for(h=r,E=0;h>0;h--)l=e.input.charCodeAt(++e.position),(r=tr(l))>=0?E=(E<<4)+r:T(e,"expected hexadecimal character");e.result+=ge(E),e.position++}else T(e,"unknown escape sequence");p=C=e.position}else P(l)?(j(e,p,C,!0),ae(e,N(e,!1,o)),p=C=e.position):e.position===e.lineStart&&ee(e)?T(e,"unexpected end of the document within a double quoted scalar"):(e.position++,C=e.position)}T(e,"unexpected end of the stream within a double quoted scalar")}function _e(e,o){var p=!0,C,h=e.tag,E,r=e.anchor,l,f,g,x,a,A={},m,_,R,O;if(O=e.input.charCodeAt(e.position),O===91)f=93,a=!1,E=[];else if(O===123)f=125,a=!0,E={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),O=e.input.charCodeAt(++e.position);O!==0;){if(N(e,!0,o),O=e.input.charCodeAt(e.position),O===f)return e.position++,e.tag=h,e.anchor=r,e.kind=a?"mapping":"sequence",e.result=E,!0;p||T(e,"missed comma between flow collection entries"),_=m=R=null,g=x=!1,O===63&&(l=e.input.charCodeAt(e.position+1),B(l)&&(g=x=!0,e.position++,N(e,!0,o))),C=e.line,z(e,o,c,!1,!0),_=e.tag,m=e.result,N(e,!0,o),O=e.input.charCodeAt(e.position),(x||e.line===C)&&O===58&&(g=!0,O=e.input.charCodeAt(++e.position),N(e,!0,o),z(e,o,c,!1,!0),R=e.result),a?H(e,E,A,_,m,R):g?E.push(H(e,null,A,_,m,R)):E.push(m),N(e,!0,o),O=e.input.charCodeAt(e.position),O===44?(p=!0,O=e.input.charCodeAt(++e.position)):p=!1}T(e,"unexpected end of the stream within a flow collection")}function Se(e,o){var p,C,h=t,E=!1,r=!1,l=o,f=0,g=!1,x,a;if(a=e.input.charCodeAt(e.position),a===124)C=!1;else if(a===62)C=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)t===h?h=a===43?F:w:T(e,"repeat of a chomping mode identifier");else if((x=xe(a))>=0)x===0?T(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):r?T(e,"repeat of an indentation width identifier"):(l=o+x-1,r=!0);else break;if(J(a)){do a=e.input.charCodeAt(++e.position);while(J(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!P(a)&&a!==0)}for(;a!==0;){for(U(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!r||e.lineIndent<l)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!r&&e.lineIndent>l&&(l=e.lineIndent),P(a)){f++;continue}if(e.lineIndent<l){h===F?e.result+=u.repeat(` `,E?1+f:f):h===t&&E&&(e.result+=` `);break}for(C?J(a)?(g=!0,e.result+=u.repeat(` `,E?1+f:f)):g?(g=!1,e.result+=u.repeat(` `,f+1)):f===0?E&&(e.result+=" "):e.result+=u.repeat(` `,f):e.result+=u.repeat(` `,E?1+f:f),E=!0,r=!0,f=0,p=e.position;!P(a)&&a!==0;)a=e.input.charCodeAt(++e.position);j(e,p,e.position,!1)}return!0}function re(e,o){var p,C=e.tag,h=e.anchor,E=[],r,l=!1,f;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),f=e.input.charCodeAt(e.position);f!==0&&!(f!==45||(r=e.input.charCodeAt(e.position+1),!B(r)));){if(l=!0,e.position++,N(e,!0,-1)&&e.lineIndent<=o){E.push(null),f=e.input.charCodeAt(e.position);continue}if(p=e.line,z(e,o,n,!1,!0),E.push(e.result),N(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===p||e.lineIndent>o)&&f!==0)T(e,"bad indentation of a sequence entry");else if(e.lineIndent<o)break}return l?(e.tag=C,e.anchor=h,e.kind="sequence",e.result=E,!0):!1}function cr(e,o,p){var C,h,E,r,l=e.tag,f=e.anchor,g={},x={},a=null,A=null,m=null,_=!1,R=!1,O;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),O=e.input.charCodeAt(e.position);O!==0;){if(C=e.input.charCodeAt(e.position+1),E=e.line,r=e.position,(O===63||O===58)&&B(C))O===63?(_&&(H(e,g,x,a,A,null),a=A=m=null),R=!0,_=!0,h=!0):_?(_=!1,h=!0):T(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,O=C;else if(z(e,p,d,!1,!0))if(e.line===E){for(O=e.input.charCodeAt(e.position);J(O);)O=e.input.charCodeAt(++e.position);if(O===58)O=e.input.charCodeAt(++e.position),B(O)||T(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(H(e,g,x,a,A,null),a=A=m=null),R=!0,_=!1,h=!1,a=e.tag,A=e.result;else if(R)T(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=f,!0}else if(R)T(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=f,!0;else break;if((e.line===E||e.lineIndent>o)&&(z(e,o,i,!0,h)&&(_?A=e.result:m=e.result),_||(H(e,g,x,a,A,m,E,r),a=A=m=null),N(e,!0,-1),O=e.input.charCodeAt(e.position)),e.lineIndent>o&&O!==0)T(e,"bad indentation of a mapping entry");else if(e.lineIndent<o)break}return _&&H(e,g,x,a,A,null),R&&(e.tag=l,e.anchor=f,e.kind="mapping",e.result=g),R}function ar(e){var o,p=!1,C=!1,h,E,r;if(r=e.input.charCodeAt(e.position),r!==33)return!1;if(e.tag!==null&&T(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),r===60?(p=!0,r=e.input.charCodeAt(++e.position)):r===33?(C=!0,h="!!",r=e.input.charCodeAt(++e.position)):h="!",o=e.position,p){do r=e.input.charCodeAt(++e.position);while(r!==0&&r!==62);e.position<e.length?(E=e.input.slice(o,e.position),r=e.input.charCodeAt(++e.position)):T(e,"unexpected end of the stream within a verbatim tag")}else{for(;r!==0&&!B(r);)r===33&&(C?T(e,"tag suffix cannot contain exclamation marks"):(h=e.input.slice(o-1,e.position+1),W.test(h)||T(e,"named tag handle cannot contain such characters"),C=!0,o=e.position+1)),r=e.input.charCodeAt(++e.position);E=e.input.slice(o,e.position),L.test(E)&&T(e,"tag suffix cannot contain flow indicator characters")}return E&&!X.test(E)&&T(e,"tag name cannot contain such characters: "+E),p?e.tag=E:s.call(e.tagMap,h)?e.tag=e.tagMap[h]+E:h==="!"?e.tag="!"+E:h==="!!"?e.tag="tag:yaml.org,2002:"+E:T(e,'undeclared tag handle "'+h+'"'),!0}function be(e){var o,p;if(p=e.input.charCodeAt(e.position),p!==38)return!1;for(e.anchor!==null&&T(e,"duplication of an anchor property"),p=e.input.charCodeAt(++e.position),o=e.position;p!==0&&!B(p)&&!Z(p);)p=e.input.charCodeAt(++e.position);return e.position===o&&T(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(o,e.position),!0}function Te(e){var o,p,C;if(C=e.input.charCodeAt(e.position),C!==42)return!1;for(C=e.input.charCodeAt(++e.position),o=e.position;C!==0&&!B(C)&&!Z(C);)C=e.input.charCodeAt(++e.position);return e.position===o&&T(e,"name of an alias node must contain at least one character"),p=e.input.slice(o,e.position),s.call(e.anchorMap,p)||T(e,'unidentified alias "'+p+'"'),e.result=e.anchorMap[p],N(e,!0,-1),!0}function z(e,o,p,C,h){var E,r,l,f=1,g=!1,x=!1,a,A,m,_,R;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,E=r=l=i===p||n===p,C&&N(e,!0,-1)&&(g=!0,e.lineIndent>o?f=1:e.lineIndent===o?f=0:e.lineIndent<o&&(f=-1)),f===1)for(;ar(e)||be(e);)N(e,!0,-1)?(g=!0,l=E,e.lineIndent>o?f=1:e.lineIndent===o?f=0:e.lineIndent<o&&(f=-1)):l=!1;if(l&&(l=g||h),(f===1||i===p)&&(c===p||d===p?_=o:_=o+1,R=e.position-e.lineStart,f===1?l&&(re(e,R)||cr(e,R,_))||_e(e,_)?x=!0:(r&&Se(e,_)||we(e,_)||Fe(e,_)?x=!0:Te(e)?(x=!0,(e.tag!==null||e.anchor!==null)&&T(e,"alias node should not have any properties")):Ee(e,_,c===p)&&(x=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(x=l&&re(e,R))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&T(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),a=0,A=e.implicitTypes.length;a<A;a+=1)if(m=e.implicitTypes[a],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else s.call(e.typeMap[e.kind||"fallback"],e.tag)?(m=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&m.kind!==e.kind&&T(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result)?(e.result=m.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):T(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):T(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||x}function Oe(e){var o=e.position,p,C,h,E=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(r=e.input.charCodeAt(e.position))!==0&&(N(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){for(E=!0,r=e.input.charCodeAt(++e.position),p=e.position;r!==0&&!B(r);)r=e.input.charCodeAt(++e.position);for(C=e.input.slice(p,e.position),h=[],C.length<1&&T(e,"directive name must not be less than one character in length");r!==0;){for(;J(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!P(r));break}if(P(r))break;for(p=e.position;r!==0&&!B(r);)r=e.input.charCodeAt(++e.position);h.push(e.input.slice(p,e.position))}r!==0&&U(e),s.call(ce,C)?ce[C](e,C,h):le(e,'unknown document directive "'+C+'"')}if(N(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,N(e,!0,-1)):E&&T(e,"directives end mark is expected"),z(e,e.lineIndent-1,i,!1,!0),N(e,!0,-1),e.checkLineBreaks&&k.test(e.input.slice(o,e.position))&&le(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ee(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,N(e,!0,-1));return}if(e.position<e.length-1)T(e,"end of the stream or a document separator is expected");else return}function ke(e,o){e=String(e),o=o||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=` `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var p=new fr(e,o),C=e.indexOf("\0");for(C!==-1&&(p.position=C,T(p,"null byte is not allowed in input")),p.input+="\0";p.input.charCodeAt(p.position)===32;)p.lineIndent+=1,p.position+=1;for(;p.position<p.length-1;)Oe(p);return p.documents}function Re(e,o,p){o!==null&&typeof o=="object"&&typeof p>"u"&&(p=o,o=null);var C=ke(e,p);if(typeof o!="function")return C;for(var h=0,E=C.length;h<E;h+=1)o(C[h])}function Ie(e,o){var p=ke(e,o);if(p.length!==0){if(p.length===1)return p[0];throw new y("expected a single document in the stream, but found more")}}function pr(e,o,p){return typeof o=="object"&&o!==null&&typeof p>"u"&&(p=o,o=null),Re(e,o,u.extend({schema:b},p))}function sr(e,o){return Ie(e,u.extend({schema:b},o))}return ne.loadAll=Re,ne.load=Ie,ne.safeLoadAll=pr,ne.safeLoad=sr,ne}var he={},Ur;function vn(){if(Ur)return he;Ur=1;var u=ie(),y=ue(),S=de(),b=te(),v=Object.prototype.toString,s=Object.prototype.hasOwnProperty,c=9,d=10,n=13,i=32,t=33,w=34,F=35,I=37,k=38,L=39,W=42,X=44,$=45,P=58,J=61,B=62,Z=63,tr=64,me=91,xe=93,ve=96,ge=123,Ae=124,fe=125,M={};M[0]="\\0",M[7]="\\a",M[8]="\\b",M[9]="\\t",M[10]="\\n",M[11]="\\v",M[12]="\\f",M[13]="\\r",M[27]="\\e",M[34]='\\"',M[92]="\\\\",M[133]="\\N",M[160]="\\_",M[8232]="\\L",M[8233]="\\P";var fr=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ye(r,l){var f,g,x,a,A,m,_;if(l===null)return{};for(f={},g=Object.keys(l),x=0,a=g.length;x<a;x+=1)A=g[x],m=String(l[A]),A.slice(0,2)==="!!"&&(A="tag:yaml.org,2002:"+A.slice(2)),_=r.compiledTypeMap.fallback[A],_&&s.call(_.styleAliases,m)&&(m=_.styleAliases[m]),f[A]=m;return f}function T(r){var l,f,g;if(l=r.toString(16).toUpperCase(),r<=255)f="x",g=2;else if(r<=65535)f="u",g=4;else if(r<=4294967295)f="U",g=8;else throw new y("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+f+u.repeat("0",g-l.length)+l}function le(r){this.schema=r.schema||S,this.indent=Math.max(1,r.indent||2),this.noArrayIndent=r.noArrayIndent||!1,this.skipInvalid=r.skipInvalid||!1,this.flowLevel=u.isNothing(r.flowLevel)?-1:r.flowLevel,this.styleMap=ye(this.schema,r.styles||null),this.sortKeys=r.sortKeys||!1,this.lineWidth=r.lineWidth||80,this.noRefs=r.noRefs||!1,this.noCompatMode=r.noCompatMode||!1,this.condenseFlow=r.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ce(r,l){for(var f=u.repeat(" ",l),g=0,x=-1,a="",A,m=r.length;g<m;)x=r.indexOf(` `,g),x===-1?(A=r.slice(g),g=m):(A=r.slice(g,x+1),g=x+1),A.length&&A!==` `&&(a+=f),a+=A;return a}function j(r,l){return` `+u.repeat(" ",r.indent*l)}function Ce(r,l){var f,g,x;for(f=0,g=r.implicitTypes.length;f<g;f+=1)if(x=r.implicitTypes[f],x.resolve(l))return!0;return!1}function H(r){return r===i||r===c}function U(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==65279||65536<=r&&r<=1114111}function N(r){return U(r)&&!H(r)&&r!==65279&&r!==n&&r!==d}function ee(r,l){return U(r)&&r!==65279&&r!==X&&r!==me&&r!==xe&&r!==ge&&r!==fe&&r!==P&&(r!==F||l&&N(l))}function ae(r){return U(r)&&r!==65279&&!H(r)&&r!==$&&r!==Z&&r!==P&&r!==X&&r!==me&&r!==xe&&r!==ge&&r!==fe&&r!==F&&r!==k&&r!==W&&r!==t&&r!==Ae&&r!==J&&r!==B&&r!==L&&r!==w&&r!==I&&r!==tr&&r!==ve}function Ee(r){var l=/^\n* /;return l.test(r)}var we=1,Fe=2,_e=3,Se=4,re=5;function cr(r,l,f,g,x){var a,A,m,_=!1,R=!1,O=g!==-1,K=-1,Y=ae(r.charCodeAt(0))&&!H(r.charCodeAt(r.length-1));if(l)for(a=0;a<r.length;a++){if(A=r.charCodeAt(a),!U(A))return re;m=a>0?r.charCodeAt(a-1):null,Y=Y&&ee(A,m)}else{for(a=0;a<r.length;a++){if(A=r.charCodeAt(a),A===d)_=!0,O&&(R=R||a-K-1>g&&r[K+1]!==" ",K=a);else if(!U(A))return re;m=a>0?r.charCodeAt(a-1):null,Y=Y&&ee(A,m)}R=R||O&&a-K-1>g&&r[K+1]!==" "}return!_&&!R?Y&&!x(r)?we:Fe:f>9&&Ee(r)?re:R?Se:_e}function ar(r,l,f,g){r.dump=(function(){if(l.length===0)return"''";if(!r.noCompatMode&&fr.indexOf(l)!==-1)return"'"+l+"'";var x=r.indent*Math.max(1,f),a=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-x),A=g||r.flowLevel>-1&&f>=r.flowLevel;function m(_){return Ce(r,_)}switch(cr(l,A,r.indent,a,m)){case we:return l;case Fe:return"'"+l.replace(/'/g,"''")+"'";case _e:return"|"+be(l,r.indent)+Te(ce(l,x));case Se:return">"+be(l,r.indent)+Te(ce(z(l,a),x));case re:return'"'+ke(l)+'"';default:throw new y("impossible error: invalid scalar style")}})()}function be(r,l){var f=Ee(r)?String(l):"",g=r[r.length-1]===` `,x=g&&(r[r.length-2]===` `||r===` `),a=x?"+":g?"":"-";return f+a+` `}function Te(r){return r[r.length-1]===` `?r.slice(0,-1):r}function z(r,l){for(var f=/(\n+)([^\n]*)/g,g=(function(){var R=r.indexOf(` `);return R=R!==-1?R:r.length,f.lastIndex=R,Oe(r.slice(0,R),l)})(),x=r[0]===` `||r[0]===" ",a,A;A=f.exec(r);){var m=A[1],_=A[2];a=_[0]===" ",g+=m+(!x&&!a&&_!==""?` `:"")+Oe(_,l),x=a}return g}function Oe(r,l){if(r===""||r[0]===" ")return r;for(var f=/ [^ ]/g,g,x=0,a,A=0,m=0,_="";g=f.exec(r);)m=g.index,m-x>l&&(a=A>x?A:m,_+=` `+r.slice(x,a),x=a+1),A=m;return _+=` `,r.length-x>l&&A>x?_+=r.slice(x,A)+` `+r.slice(A+1):_+=r.slice(x),_.slice(1)}function ke(r){for(var l="",f,g,x,a=0;a<r.length;a++){if(f=r.charCodeAt(a),f>=55296&&f<=56319&&(g=r.charCodeAt(a+1),g>=56320&&g<=57343)){l+=T((f-55296)*1024+g-56320+65536),a++;continue}x=M[f],l+=!x&&U(f)?r[a]:x||T(f)}return l}function Re(r,l,f){var g="",x=r.tag,a,A;for(a=0,A=f.length;a<A;a+=1)o(r,l,f[a],!1,!1)&&(a!==0&&(g+=","+(r.condenseFlow?"":" ")),g+=r.dump);r.tag=x,r.dump="["+g+"]"}function Ie(r,l,f,g){var x="",a=r.tag,A,m;for(A=0,m=f.length;A<m;A+=1)o(r,l+1,f[A],!0,!0)&&((!g||A!==0)&&(x+=j(r,l)),r.dump&&d===r.dump.charCodeAt(0)?x+="-":x+="- ",x+=r.dump);r.tag=a,r.dump=x||"[]"}function pr(r,l,f){var g="",x=r.tag,a=Object.keys(f),A,m,_,R,O;for(A=0,m=a.length;A<m;A+=1)O="",A!==0&&(O+=", "),r.condenseFlow&&(O+='"'),_=a[A],R=f[_],o(r,l,_,!1,!1)&&(r.dump.length>1024&&(O+="? "),O+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),o(r,l,R,!1,!1)&&(O+=r.dump,g+=O));r.tag=x,r.dump="{"+g+"}"}function sr(r,l,f,g){var x="",a=r.tag,A=Object.keys(f),m,_,R,O,K,Y;if(r.sortKeys===!0)A.sort();else if(typeof r.sortKeys=="function")A.sort(r.sortKeys);else if(r.sortKeys)throw new y("sortKeys must be a boolean or a function");for(m=0,_=A.length;m<_;m+=1)Y="",(!g||m!==0)&&(Y+=j(r,l)),R=A[m],O=f[R],o(r,l+1,R,!0,!0,!0)&&(K=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024,K&&(r.dump&&d===r.dump.charCodeAt(0)?Y+="?":Y+="? "),Y+=r.dump,K&&(Y+=j(r,l)),o(r,l+1,O,!0,K)&&(r.dump&&d===r.dump.charCodeAt(0)?Y+=":":Y+=": ",Y+=r.dump,x+=Y));r.tag=a,r.dump=x||"{}"}function e(r,l,f){var g,x,a,A,m,_;for(x=f?r.explicitTypes:r.implicitTypes,a=0,A=x.length;a<A;a+=1)if(m=x[a],(m.instanceOf||m.predicate)&&(!m.instanceOf||typeof l=="object"&&l instanceof m.instanceOf)&&(!m.predicate||m.predicate(l))){if(r.tag=f?m.tag:"?",m.represent){if(_=r.styleMap[m.tag]||m.defaultStyle,v.call(m.represent)==="[object Function]")g=m.represent(l,_);else if(s.call(m.represent,_))g=m.represent[_](l,_);else throw new y("!<"+m.tag+'> tag resolver accepts not "'+_+'" style');r.dump=g}return!0}return!1}function o(r,l,f,g,x,a){r.tag=null,r.dump=f,e(r,f,!1)||e(r,f,!0);var A=v.call(r.dump);g&&(g=r.flowLevel<0||r.flowLevel>l);var m=A==="[object Object]"||A==="[object Array]",_,R;if(m&&(_=r.duplicates.indexOf(f),R=_!==-1),(r.tag!==null&&r.tag!=="?"||R||r.indent!==2&&l>0)&&(x=!1),R&&r.usedDuplicates[_])r.dump="*ref_"+_;else{if(m&&R&&!r.usedDuplicates[_]&&(r.usedDuplicates[_]=!0),A==="[object Object]")g&&Object.keys(r.dump).length!==0?(sr(r,l,r.dump,x),R&&(r.dump="&ref_"+_+r.dump)):(pr(r,l,r.dump),R&&(r.dump="&ref_"+_+" "+r.dump));else if(A==="[object Array]"){var O=r.noArrayIndent&&l>0?l-1:l;g&&r.dump.length!==0?(Ie(r,O,r.dump,x),R&&(r.dump="&ref_"+_+r.dump)):(Re(r,O,r.dump),R&&(r.dump="&ref_"+_+" "+r.dump))}else if(A==="[object String]")r.tag!=="?"&&ar(r,r.dump,l,a);else{if(r.skipInvalid)return!1;throw new y("unacceptable kind of an object to dump "+A)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function p(r,l){var f=[],g=[],x,a;for(C(r,f,g),x=0,a=g.length;x<a;x+=1)l.duplicates.push(f[g[x]]);l.usedDuplicates=new Array(a)}function C(r,l,f){var g,x,a;if(r!==null&&typeof r=="object")if(x=l.indexOf(r),x!==-1)f.indexOf(x)===-1&&f.push(x);else if(l.push(r),Array.isArray(r))for(x=0,a=r.length;x<a;x+=1)C(r[x],l,f);else for(g=Object.keys(r),x=0,a=g.length;x<a;x+=1)C(r[g[x]],l,f)}function h(r,l){l=l||{};var f=new le(l);return f.noRefs||p(r,f),o(f,0,r,!0,!0)?f.dump+` `:""}function E(r,l){return h(r,u.extend({schema:b},l))}return he.dump=h,he.safeDump=E,he}var Kr;function gn(){if(Kr)return D;Kr=1;var u=xn(),y=vn();function S(b){return function(){throw new Error("Function "+b+" is deprecated and cannot be used.")}}return D.Type=q(),D.Schema=oe(),D.FAILSAFE_SCHEMA=je(),D.JSON_SCHEMA=br(),D.CORE_SCHEMA=Or(),D.DEFAULT_SAFE_SCHEMA=te(),D.DEFAULT_FULL_SCHEMA=de(),D.load=u.load,D.loadAll=u.loadAll,D.safeLoad=u.safeLoad,D.safeLoadAll=u.safeLoadAll,D.dump=y.dump,D.safeDump=y.safeDump,D.YAMLException=ue(),D.MINIMAL_SCHEMA=je(),D.SAFE_SCHEMA=te(),D.DEFAULT_SCHEMA=de(),D.scan=S("scan"),D.parse=S("parse"),D.compose=S("compose"),D.addConstructor=S("addConstructor"),D}var lr,Gr;function An(){if(Gr)return lr;Gr=1;var u=gn();return lr=u,lr}var Wr;function yn(){if(Wr)return se.exports;Wr=1;var u=An(),y="\\ufeff?",S=typeof process<"u"?process.platform:"",b="^("+y+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(S==="win32"?"\\r?":"")+"(?:\\n)?)",v=new RegExp(b,"m");se.exports=s,se.exports.test=n;function s(i,t){i=i||"";var w={allowUnsafe:!1};t=t instanceof Object?{...w,...t}:w,t.allowUnsafe=!!t.allowUnsafe;var F=i.split(/(\r?\n)/);return F[0]&&/= yaml =|---/.test(F[0])?d(i,t.allowUnsafe):{attributes:{},body:i,bodyBegin:1}}function c(i,t){for(var w=1,F=t.indexOf(` `),I=i.index+i[0].length;F!==-1;){if(F>=I)return w;w++,F=t.indexOf(` `,F+1)}return w}function d(i,t){var w=v.exec(i);if(!w)return{attributes:{},body:i,bodyBegin:1};var F=t?u.load:u.safeLoad,I=w[w.length-1].replace(/^\s+|\s+$/g,""),k=F(I)||{},L=i.replace(w[0],""),W=c(w,i);return{attributes:k,body:L,bodyBegin:W,frontmatter:I}}function n(i){return i=i||"",v.test(i)}return se.exports}var Cn=yn();const En=Xr(Cn),ur=".md",wn="_";function $r(u){return(u.charAt(0).toUpperCase()+u.slice(1)).replaceAll("-"," ")}function Jr(u){try{return G.accessSync(u,G.constants.R_OK),!0}catch{return!1}}function Qr(u){try{return G.statSync(u)}catch(y){return console.warn(`[vitepress-plugin-auto-sidebar] Cannot read stats for: ${u}`,y),null}}function Fn(u){try{const y=G.readFileSync(u,{encoding:"utf-8"});return En(y).attributes?.title}catch(y){console.warn(`[vitepress-plugin-auto-sidebar] Cannot read frontmatter from: ${u}`,y);return}}function Vr(u,y,S,b){return u.filter(v=>{const s=typeof v=="string"?v:v.path,c=pe.resolve(y,s);if(!Jr(c))return!1;const d=Qr(c);return d&&(s.endsWith(ur)||d.isDirectory())}).map(v=>{const s=typeof v=="string"?v:v.path,c=pe.resolve(y,s),d=Qr(c);if(!d)return null;if(d.isDirectory())try{const n=Vr(G.readdirSync(c),c,S,b);if(n.length===0)return null;const i=s.split("/").pop()??"";return{text:typeof v!="string"&&v.title?v.title:$r(i),collapsible:b.collapsible,collapsed:b.collapsed,items:n}}catch(n){return console.warn(`[vitepress-plugin-auto-sidebar] Cannot read directory: ${c}`,n),null}else if(s.endsWith(ur)&&!s.startsWith(wn)){let n;b.useFrontmatter&&(n=Fn(c));const i=$r(s.slice(0,-ur.length));return{text:n||i,link:c.replace(S,"")}}return null}).filter(v=>v!==null)}function _n(u={}){const y={contentRoot:u.contentRoot??"/",contentDirs:u.contentDirs?.length?u.contentDirs:["/"],collapsible:u.collapsible??!0,collapsed:u.collapsed??!0,useFrontmatter:u.useFrontmatter??!1},S=pe.isAbsolute(y.contentRoot)?y.contentRoot:pe.join(process.cwd(),y.contentRoot);return Jr(S)?Vr(y.contentDirs,S,S,y):(console.error(`[vitepress-plugin-auto-sidebar] Content root does not exist: ${S}`),[])}Q.getSidebar=_n,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})}));