/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ (function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})})(this,(function(e){"use strict" function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="" for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var s=function(e,t){if(t=Object.create(t||null),!e.buffer)return null t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2) for(var i,r=/\r?\n|\r|\0/g,o=[0],s=[],c=-1;i=r.exec(e.buffer);)s.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&c<0&&(c=o.length-2) c<0&&(c=o.length-1) var u,p,f="",d=Math.min(e.line+t.linesAfter,s.length).toString().length,h=t.maxLength-(t.indent+d+3) for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=a(e.buffer,o[c-u],s[c-u],e.position-(o[c]-o[c-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f for(p=a(e.buffer,o[c],s[c],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=s.length);u++)p=a(e.buffer,o[c+u],s[c+u],e.position-(o[c]-o[c+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n" return f.replace(/\n$/,"")},c=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"] var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===c.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={} return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')} function f(e,t){var n=[] return e[t].forEach((function(e){var t=n.length n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[] if(e instanceof p)n.push(e) else if(Array.isArray(e))n=n.concat(e) else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })") e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.") if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.") if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")})) var i=Object.create(d.prototype) return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}} function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$") var I=/^[-+]?[0-9]+e/ var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i if(isNaN(e))switch(t){case"lowercase":return".nan" case"uppercase":return".NAN" case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf" case"uppercase":return".INF" case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf" case"uppercase":return"-.INF" case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0" return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),j=b.extend({implicit:[A,v,C,S]}),O=j,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),E=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]))?))?$") var M=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==E.exec(e))},construct:function(e){var t,n,i,r,o,a,l,s,c=0,u=null if(null===(t=T.exec(e))&&(t=E.exec(e)),null===t)throw new Error("Date resolve error") if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r)) if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0" c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,r,o,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}}) var L=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r" var F=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1 var t,n,i=0,r=e.length,o=N for(n=0;n64)){if(t<0)return!1 i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=N,a=0,l=[] for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t)) return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=N for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t] return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString var q=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0 var t,n,i,r,o,a=[],l=e for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ue=new Array(256),pe=new Array(256),fe=0;fe<256;fe++)ue[fe]=se(fe)?1:0,pe[fe]=se(fe) function de(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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.firstTabInLine=-1,this.documents=[]}function he(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart} return n.snippet=s(n),new o(t,n)}function me(e,t){throw he(e,t)}function ge(e,t){e.onWarning&&e.onWarning.call(null,he(e,t))}var ye={YAML:function(e,t,n){var i,r,o null!==e.version&&me(e,"duplication of %YAML directive"),1!==n.length&&me(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&me(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&me(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ge(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r 2!==n.length&&me(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ee.test(i)||me(e,"ill-formed tag handle (first argument) of the TAG directive"),B.call(e.tagMap,i)&&me(e,'there is a previously declared suffix for "'+i+'" tag handle'),te.test(r)||me(e,"ill-formed tag prefix (second argument) of the TAG directive") try{r=decodeURIComponent(r)}catch(o){me(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}} function be(e,t,n,i){var r,o,a,l if(t1&&(e.result+=n.repeat("\n",t-1))}function Ie(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1 if(-1!==e.firstTabInLine)return!1 for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,me(e,"tab characters must not be used in indentation")),45===i)&&oe(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,we(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position) else if(n=e.line,Oe(e,t,H,!1,!0),a.push(e.result),we(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)me(e,"bad indentation of a sequence entry") else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,s=e.position),Oe(e,t,G,!0,r)&&(y?m=e.result:g=e.result),y||(ve(e,f,d,h,m,g,a,l,s),h=m=g=null),we(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)me(e,"bad indentation of a mapping entry") else if(e.lineIndent=0))break 0===o?me(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?me(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(re(a)){do{a=e.input.charCodeAt(++e.position)}while(re(a)) if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!ie(a)&&0!==a)}for(;0!==a;){for(ke(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),ie(a))f++ else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=le(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:me(e,"expected hexadecimal character") e.result+=ce(o),e.position++}else me(e,"unknown escape sequence") n=i=e.position}else ie(l)?(be(e,n,i,!0),xe(e,we(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Ce(e)?me(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}me(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i if(42!==(i=e.input.charCodeAt(e.position)))return!1 for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!oe(i)&&!ae(i);)i=e.input.charCodeAt(++e.position) return e.position===t&&me(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),B.call(e.anchorMap,n)||me(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],we(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,s,c,u,p=e.kind,f=e.result if(oe(u=e.input.charCodeAt(e.position))||ae(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1 if((63===u||45===u)&&(oe(i=e.input.charCodeAt(e.position+1))||n&&ae(i)))return!1 for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(oe(i=e.input.charCodeAt(e.position+1))||n&&ae(i))break}else if(35===u){if(oe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ce(e)||n&&ae(u))break if(ie(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,we(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position) continue}e.position=o,e.line=l,e.lineStart=s,e.lineIndent=c break}}a&&(be(e,r,o,!1),xe(e,e.line-l),r=o=e.position,a=!1),re(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return be(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,K===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||me(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(y=s&&Ie(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result) else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&me(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c"),null!==e.result&&f.kind!==e.kind&&me(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):me(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Te(e){var t,n,i,r,o=e.position,a=!1 for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(we(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!oe(r);)r=e.input.charCodeAt(++e.position) for(i=[],(n=e.input.slice(t,e.position)).length<1&&me(e,"directive name must not be less than one character in length");0!==r;){for(;re(r);)r=e.input.charCodeAt(++e.position) if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!ie(r)) break}if(ie(r))break for(t=e.position;0!==r&&!oe(r);)r=e.input.charCodeAt(++e.position) i.push(e.input.slice(t,e.position))}0!==r&&ke(e),B.call(ye,n)?ye[n](e,n,i):ge(e,'unknown document directive "'+n+'"')}we(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,we(e,!0,-1)):a&&me(e,"directives end mark is expected"),Oe(e,e.lineIndent-1,G,!1,!0),we(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(o,e.position))&&ge(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ce(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,we(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function At(e){return/^\n* /.test(e)}var vt=1,kt=2,wt=3,Ct=4,xt=5 function It(e,t,n,i,r,o,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,m=-1,g=mt(c=bt(e,0))&&c!==Fe&&!ht(c)&&c!==Ge&&c!==Je&&c!==Ve&&c!==He&&c!==Xe&&c!==et&&c!==nt&&c!==rt&&c!==Re&&c!==Be&&c!==We&&c!==Ye&&c!==it&&c!==Ze&&c!==ze&&c!==Ke&&c!==Pe&&c!==$e&&c!==Qe&&c!==tt&&function(e){return!ht(e)&&e!==Ve}(bt(e,e.length-1)) if(t||a)for(s=0;s=65536?s+=2:s++){if(!mt(u=bt(e,s)))return xt g=g&&yt(u,p,l),p=u}else{for(s=0;s=65536?s+=2:s++){if((u=bt(e,s))===De)f=!0,h&&(d=d||s-m-1>i&&" "!==e[m+1],m=s) else if(!mt(u))return xt g=g&&yt(u,p,l),p=u}d=d||h&&s-m-1>i&&" "!==e[m+1]}return f||d?n>9&&At(e)?xt:a?o===ut?xt:kt:d?Ct:wt:!g||a||r(e)?o===ut?xt:kt:vt}function St(e,t,n,i,r){e.dump=function(){if(0===t.length)return e.quotingType===ut?'""':"''" if(!e.noCompatMode&&(-1!==at.indexOf(t)||lt.test(t)))return e.quotingType===ut?'"'+t+'"':"'"+t+"'" var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&n>=e.flowLevel switch(It(t,s,e.indent,l,(function(t){return function(e,t){var n,i for(n=0,i=e.implicitTypes.length;n"+jt(t,e.indent)+Ot(ft(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Tt(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0] var l for(;i=r.exec(e);){var s=i[1],c=i[2] n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+Tt(c,t),a=n}return o}(t,l),a)) case xt:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=bt(e,r),!(t=ot[i])&&mt(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||st(i) return n}(t)+'"' default:throw new o("impossible error: invalid scalar style")}}()}function jt(e,t){var n=At(e)?String(t):"",i="\n"===e[e.length-1] return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Ot(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Tt(e,t){if(""===e||" "===e[0])return e for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,s="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,s+="\n"+e.slice(o,i),o=i+1),a=l return s+="\n",e.length-o>t&&a>o?s+=e.slice(o,a)+"\n"+e.slice(a+1):s+=e.slice(o),s.slice(1)}function Et(e,t,n,i){var r,o,a,l="",s=e.tag for(r=0,o=n.length;r tag resolver accepts not "'+c+'" style') i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function Lt(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Mt(e,n,!1)||Mt(e,n,!0) var s,c=Le.call(e.dump),u=i i&&(i=e.flowLevel<0||e.flowLevel>t) var p,f,d="[object Object]"===c||"[object Array]"===c if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var r,a,l,s,c,u,p="",f=e.tag,d=Object.keys(n) if(!0===e.sortKeys)d.sort() else if("function"==typeof e.sortKeys)d.sort(e.sortKeys) else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function") for(r=0,a=d.length;r1024)&&(e.dump&&De===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=dt(e,t)),Lt(e,t+1,s,!0,c)&&(e.dump&&De===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump)) e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a,l,s="",c=e.tag,u=Object.keys(n) for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Lt(e,t,a,!1,!1)&&(s+=l+=e.dump)) e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump)) else if("[object Array]"===c)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?Et(e,t-1,e.dump,r):Et(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a="",l=e.tag for(i=0,r=n.length;i",e.dump=s+" "+e.dump)}return!0}function Nt(e,t){var n,i,r=[],o=[] for(Ft(e,r,o),n=0,i=o.length;nn.keyCol)return t.skipToEnd(),"string" if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def" if(t.match(/\.\.\./))return"def" if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?n.inlinePairs++:"}"==i?n.inlinePairs--:"["==i?n.inlineList++:n.inlineList--,"meta" if(n.inlineList>0&&!r&&","==i)return t.next(),"meta" if(n.inlinePairs>0&&!r&&","==i)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta" if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta" if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2" if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number" if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number" if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}})),e.defineMIME("text/x-yaml","yaml")}))