Debian Codegraph @

debian/missing-sources/yaml.js/yaml.min.js

raw
1 (function(){function a(f,h,d){function g(j,k){if(!h[j]){if(!f[j]){var m="function"==typeof require&&require;if(!k&&m){return m(j,!0)}if(b){return b(j,!0)}var e=new Error("Cannot find module '"+j+"'");throw e.code="MODULE_NOT_FOUND",e}var l=h[j]={exports:{}};f[j][0].call(l.exports,function(i){var o=f[j][1][i];return g(o||i)},l,l.exports,a,f,h,d)}return h[j].exports}for(var b="function"==typeof require&&require,c=0;c<d.length;c++){g(d[c])}return g}return a})()({1:[function(c,d,b){var a,f,e;e=c("./Utils");f=c("./Inline");a=(function(){function g(){}g.indentation=4;g.prototype.dump=function(q,p,l,j,t){var m,s,o,k,n,r,h;if(p==null){p=0}if(l==null){l=0}if(j==null){j=false}if(t==null){t=null}k="";if(typeof q==="function"){return k}n=(l?e.strRepeat(" ",l):"");if(p<=0||typeof q!=="object"||q instanceof Date||e.isEmpty(q)){k+=n+f.dump(q,j,t)}else{if(q instanceof Array){for(m=0,o=q.length;m<o;m++){r=q[m];h=p-1<=0||typeof r!=="object"||e.isEmpty(r);k+=n+"-"+(h?" ":"\n")+this.dump(r,p-1,(h?0:l+this.indentation),j,t)+(h?"\n":"")}}else{for(s in q){r=q[s];h=p-1<=0||typeof r!=="object"||e.isEmpty(r);k+=n+f.dump(s,j,t)+":"+(h?" ":"\n")+this.dump(r,p-1,(h?0:l+this.indentation),j,t)+(h?"\n":"")}}}return k};return g})();d.exports=a},{"./Inline":6,"./Utils":10}],2:[function(c,d,a){var b,e;e=c("./Pattern");b=(function(){var g;function f(){}f.LIST_ESCAPEES=["\\","\\\\",'\\"','"',"\x00","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\x08","\x09","\x0a","\x0b","\x0c","\x0d","\x0e","\x0f","\x10","\x11","\x12","\x13","\x14","\x15","\x16","\x17","\x18","\x19","\x1a","\x1b","\x1c","\x1d","\x1e","\x1f",(g=String.fromCharCode)(133),g(160),g(8232),g(8233)];f.LIST_ESCAPED=["\\\\",'\\"','\\"','\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];f.MAPPING_ESCAPEES_TO_ESCAPED=(function(){var l,k,h,m;h={};for(l=k=0,m=f.LIST_ESCAPEES.length;0<=m?k<m:k>m;l=0<=m?++k:--k){h[f.LIST_ESCAPEES[l]]=f.LIST_ESCAPED[l]}return h})();f.PATTERN_CHARACTERS_TO_ESCAPE=new e("[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9");f.PATTERN_MAPPING_ESCAPEES=new e(f.LIST_ESCAPEES.join("|").split("\\").join("\\\\"));f.PATTERN_SINGLE_QUOTING=new e("[\\s'\":{}[\\],&*#?]|^[-?|<>=!%@`]");f.requiresDoubleQuoting=function(h){return this.PATTERN_CHARACTERS_TO_ESCAPE.test(h)};f.escapeWithDoubleQuotes=function(i){var h;h=this.PATTERN_MAPPING_ESCAPEES.replace(i,(function(j){return function(k){return j.MAPPING_ESCAPEES_TO_ESCAPED[k]}})(this));return'"'+h+'"'};f.requiresSingleQuoting=function(h){return this.PATTERN_SINGLE_QUOTING.test(h)};f.escapeWithSingleQuotes=function(h){return"'"+h.replace(/'/g,"''")+"'"};return f})();d.exports=b},{"./Pattern":8}],3:[function(c,d,b){var a,f=function(j,h){for(var g in h){if(e.call(h,g)){j[g]=h[g]}}function i(){this.constructor=j}i.prototype=h.prototype;j.prototype=new i();j.__super__=h.prototype;return j},e={}.hasOwnProperty;a=(function(h){f(g,h);function g(k,i,j){g.__super__.constructor.call(this,k);this.message=k;this.parsedLine=i;this.snippet=j}g.prototype.toString=function(){if((this.parsedLine!=null)&&(this.snippet!=null)){return"<DumpException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<DumpException> "+this.message}};return g})(Error);d.exports=a},{}],4:[function(c,d,b){var a,f=function(j,h){for(var g in h){if(e.call(h,g)){j[g]=h[g]}}function i(){this.constructor=j}i.prototype=h.prototype;j.prototype=new i();j.__super__=h.prototype;return j},e={}.hasOwnProperty;a=(function(h){f(g,h);function g(k,i,j){g.__super__.constructor.call(this,k);this.message=k;this.parsedLine=i;this.snippet=j}g.prototype.toString=function(){if((this.parsedLine!=null)&&(this.snippet!=null)){return"<ParseException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<ParseException> "+this.message}};return g})(Error);d.exports=a},{}],5:[function(c,d,b){var a,f=function(j,h){for(var g in h){if(e.call(h,g)){j[g]=h[g]}}function i(){this.constructor=j}i.prototype=h.prototype;j.prototype=new i();j.__super__=h.prototype;return j},e={}.hasOwnProperty;a=(function(h){f(g,h);function g(k,i,j){g.__super__.constructor.call(this,k);this.message=k;this.parsedLine=i;this.snippet=j}g.prototype.toString=function(){if((this.parsedLine!=null)&&(this.snippet!=null)){return"<ParseMore> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<ParseMore> "+this.message}};return g})(Error);d.exports=a},{}],6:[function(c,a,f){var g,b,l,d,j,e,h,i,k=[].indexOf||function(o){for(var n=0,m=this.length;n<m;n++){if(n in this&&this[n]===o){return n}}return -1};e=c("./Pattern");h=c("./Unescaper");b=c("./Escaper");i=c("./Utils");d=c("./Exception/ParseException");j=c("./Exception/ParseMore");g=c("./Exception/DumpException");l=(function(){function m(){}m.REGEX_QUOTED_STRING="(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";m.PATTERN_TRAILING_COMMENTS=new e("^\\s*#.*$");m.PATTERN_QUOTED_SCALAR=new e("^"+m.REGEX_QUOTED_STRING);m.PATTERN_THOUSAND_NUMERIC_SCALAR=new e("^(-|\\+)?[0-9,]+(\\.[0-9]+)?$");m.PATTERN_SCALAR_BY_DELIMITERS={};m.settings={};m.configure=function(n,o){if(n==null){n=null}if(o==null){o=null}this.settings.exceptionOnInvalidType=n;this.settings.objectDecoder=o};m.parse=function(q,o,r){var p,n;if(o==null){o=false}if(r==null){r=null}this.settings.exceptionOnInvalidType=o;this.settings.objectDecoder=r;if(q==null){return""}q=i.trim(q);if(0===q.length){return""}p={exceptionOnInvalidType:o,objectDecoder:r,i:0};switch(q.charAt(0)){case"[":n=this.parseSequence(q,p);++p.i;break;case"{":n=this.parseMapping(q,p);++p.i;break;default:n=this.parseScalar(q,null,['"',"'"],p)}if(this.PATTERN_TRAILING_COMMENTS.replace(q.slice(p.i),"")!==""){throw new d('Unexpected characters near "'+q.slice(p.i)+'".')}return n};m.dump=function(s,p,o){var r,n,q;if(p==null){p=false}if(o==null){o=null}if(s==null){return"null"}q=typeof s;if(q==="object"){if(s instanceof Date){return s.toISOString()}else{if(o!=null){n=o(s);if(typeof n==="string"||(n!=null)){return n}}}return this.dumpObject(s)}if(q==="boolean"){return(s?"true":"false")}if(i.isDigits(s)){return(q==="string"?"'"+s+"'":String(parseInt(s)))}if(i.isNumeric(s)){return(q==="string"?"'"+s+"'":String(parseFloat(s)))}if(q==="number"){return(s===Infinity?".Inf":(s===-Infinity?"-.Inf":(isNaN(s)?".NaN":s)))}if(b.requiresDoubleQuoting(s)){return b.escapeWithDoubleQuotes(s)}if(b.requiresSingleQuoting(s)){return b.escapeWithSingleQuotes(s)}if(""===s){return'""'}if(i.PATTERN_DATE.test(s)){return"'"+s+"'"}if((r=s.toLowerCase())==="null"||r==="~"||r==="true"||r==="false"){return"'"+s+"'"}return s};m.dumpObject=function(t,p,o){var r,s,q,n,u;if(o==null){o=null}if(t instanceof Array){n=[];for(r=0,q=t.length;r<q;r++){u=t[r];n.push(this.dump(u))}return"["+n.join(", ")+"]"}else{n=[];for(s in t){u=t[s];n.push(this.dump(s)+": "+this.dump(u))}return"{"+n.join(", ")+"}"}};m.parseScalar=function(p,z,A,o,r){var v,n,w,t,y,s,x,q,u;if(z==null){z=null}if(A==null){A=['"',"'"]}if(o==null){o=null}if(r==null){r=true}if(o==null){o={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}v=o.i;if(s=p.charAt(v),k.call(A,s)>=0){t=this.parseQuotedScalar(p,o);v=o.i;if(z!=null){u=i.ltrim(p.slice(v)," ");if(!(x=u.charAt(0),k.call(z,x)>=0)){throw new d("Unexpected characters ("+p.slice(v)+").")}}}else{if(!z){t=p.slice(v);v+=t.length;q=t.indexOf(" #");if(q!==-1){t=i.rtrim(t.slice(0,q))}}else{n=z.join("|");y=this.PATTERN_SCALAR_BY_DELIMITERS[n];if(y==null){y=new e("^(.+?)("+n+")");this.PATTERN_SCALAR_BY_DELIMITERS[n]=y}if(w=y.exec(p.slice(v))){t=w[1];v+=t.length}else{throw new d("Malformed inline YAML string ("+p+").")}}if(r){t=this.evaluateScalar(t,o)}}o.i=v;return t};m.parseQuotedScalar=function(o,r){var q,p,n;q=r.i;if(!(p=this.PATTERN_QUOTED_SCALAR.exec(o.slice(q)))){throw new j("Malformed inline YAML string ("+o.slice(q)+").")}n=p[0].substr(1,p[0].length-2);if('"'===o.charAt(q)){n=h.unescapeDoubleQuotedString(n)}else{n=h.unescapeSingleQuotedString(n)}q+=p[0].length;r.i=q;return n};m.parseSequence=function(q,n){var t,u,r,w,s,p,o,v;p=[];s=q.length;r=n.i;r+=1;while(r<s){n.i=r;switch(q.charAt(r)){case"[":p.push(this.parseSequence(q,n));r=n.i;break;case"{":p.push(this.parseMapping(q,n));r=n.i;break;case"]":return p;case",":case" ":case"\n":break;default:w=((o=q.charAt(r))==='"'||o==="'");v=this.parseScalar(q,[",","]"],['"',"'"],n);r=n.i;if(!w&&typeof v==="string"&&(v.indexOf(": ")!==-1||v.indexOf(":\n")!==-1)){try{v=this.parseMapping("{"+v+"}")}catch(u){t=u}}p.push(v);--r}++r}throw new j("Malformed inline YAML string "+q)};m.parseMapping=function(n,o){var q,r,v,s,p,u,t;p={};s=n.length;r=o.i;r+=1;u=false;while(r<s){o.i=r;switch(n.charAt(r)){case" ":case",":case"\n":++r;o.i=r;u=true;break;case"}":return p}if(u){u=false;continue}v=this.parseScalar(n,[":"," ","\n"],['"',"'"],o,false);r=o.i;q=false;while(r<s){o.i=r;switch(n.charAt(r)){case"[":t=this.parseSequence(n,o);r=o.i;if(p[v]===void 0){p[v]=t}q=true;break;case"{":t=this.parseMapping(n,o);r=o.i;if(p[v]===void 0){p[v]=t}q=true;break;case":":case" ":case"\n":break;default:t=this.parseScalar(n,[",","}"],['"',"'"],o);r=o.i;if(p[v]===void 0){p[v]=t}q=true;--r}++r;if(q){break}}}throw new j("Malformed inline YAML string "+n)};m.evaluateScalar=function(p,o){var r,s,q,y,t,x,v,w,z,u,n;p=i.trim(p);z=p.toLowerCase();switch(z){case"null":case"":case"~":return null;case"true":return true;case"false":return false;case".inf":return Infinity;case".nan":return NaN;case"-.inf":return Infinity;default:y=z.charAt(0);switch(y){case"!":t=p.indexOf(" ");if(t===-1){x=z}else{x=z.slice(0,t)}switch(x){case"!":if(t!==-1){return parseInt(this.parseScalar(p.slice(2)))}return null;case"!str":return i.ltrim(p.slice(4));case"!!str":return i.ltrim(p.slice(5));case"!!int":return parseInt(this.parseScalar(p.slice(5)));case"!!bool":return i.parseBoolean(this.parseScalar(p.slice(6)),false);case"!!float":return parseFloat(this.parseScalar(p.slice(7)));case"!!timestamp":return i.stringToDate(i.ltrim(p.slice(11)));default:if(o==null){o={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}v=o.objectDecoder,q=o.exceptionOnInvalidType;if(v){n=i.rtrim(p);t=n.indexOf(" ");if(t===-1){return v(n,null)}else{u=i.ltrim(n.slice(t+1));if(!(u.length>0)){u=null}return v(n.slice(0,t),u)}}if(q){throw new d("Custom object support when parsing a YAML file has been disabled.")}return null}break;case"0":if("0x"===p.slice(0,2)){return i.hexDec(p)}else{if(i.isDigits(p)){return i.octDec(p)}else{if(i.isNumeric(p)){return parseFloat(p)}else{return p}}}break;case"+":if(i.isDigits(p)){w=p;r=parseInt(w);if(w===String(r)){return r}else{return w}}else{if(i.isNumeric(p)){return parseFloat(p)}else{if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(p)){return parseFloat(p.replace(",",""))}}}return p;case"-":if(i.isDigits(p.slice(1))){if("0"===p.charAt(1)){return -i.octDec(p.slice(1))}else{w=p.slice(1);r=parseInt(w);if(w===String(r)){return -r}else{return -w}}}else{if(i.isNumeric(p)){return parseFloat(p)}else{if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(p)){return parseFloat(p.replace(",",""))}}}return p;default:if(s=i.stringToDate(p)){return s}else{if(i.isNumeric(p)){return parseFloat(p)}else{if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(p)){return parseFloat(p.replace(",",""))}}}return p}}};return m})();a.exports=l},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(b,a,f){var i,c,h,d,e,g;i=b("./Inline");e=b("./Pattern");g=b("./Utils");c=b("./Exception/ParseException");h=b("./Exception/ParseMore");d=(function(){j.prototype.PATTERN_FOLDED_SCALAR_ALL=new e("^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");j.prototype.PATTERN_FOLDED_SCALAR_END=new e("(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");j.prototype.PATTERN_SEQUENCE_ITEM=new e("^\\-((?<leadspaces>\\s+)(?<value>.+?))?\\s*$");j.prototype.PATTERN_ANCHOR_VALUE=new e("^&(?<ref>[^ ]+) *(?<value>.*)");j.prototype.PATTERN_COMPACT_NOTATION=new e("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\{\\[].*?) *\\:(\\s+(?<value>.+?))?\\s*$");j.prototype.PATTERN_MAPPING_ITEM=new e("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\[\\{].*?) *\\:(\\s+(?<value>.+?))?\\s*$");j.prototype.PATTERN_DECIMAL=new e("\\d+");j.prototype.PATTERN_INDENT_SPACES=new e("^ +");j.prototype.PATTERN_TRAILING_LINES=new e("(\n*)$");j.prototype.PATTERN_YAML_HEADER=new e("^\\%YAML[: ][\\d\\.]+.*\n","m");j.prototype.PATTERN_LEADING_COMMENTS=new e("^(\\#.*?\n)+","m");j.prototype.PATTERN_DOCUMENT_MARKER_START=new e("^\\-\\-\\-.*?\n","m");j.prototype.PATTERN_DOCUMENT_MARKER_END=new e("^\\.\\.\\.\\s*$","m");j.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION={};j.prototype.CONTEXT_NONE=0;j.prototype.CONTEXT_SEQUENCE=1;j.prototype.CONTEXT_MAPPING=2;function j(k){this.offset=k!=null?k:0;this.lines=[];this.currentLineNb=-1;this.currentLine="";this.refs={}}j.prototype.parse=function(P,I,r){var O,aa,v,Z,ad,X,W,F,q,p,x,V,B,Y,U,T,D,S,H,E,w,u,t,s,R,o,K,Q,z,M,ac,J,N,A,y,L,C,G,ab;if(I==null){I=false}if(r==null){r=null}this.currentLineNb=-1;this.currentLine="";this.lines=this.cleanup(P).split("\n");X=null;ad=this.CONTEXT_NONE;aa=false;while(this.moveToNextLine()){if(this.isCurrentLineEmpty()){continue}if("\t"===this.currentLine[0]){throw new c("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine)}Y=K=false;if(ab=this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)){if(this.CONTEXT_MAPPING===ad){throw new c("You cannot define a sequence item when in a mapping")}ad=this.CONTEXT_SEQUENCE;if(X==null){X=[]}if((ab.value!=null)&&(o=this.PATTERN_ANCHOR_VALUE.exec(ab.value))){Y=o.ref;ab.value=o.value}if(!(ab.value!=null)||""===g.trim(ab.value," ")||g.ltrim(ab.value," ").indexOf("#")===0){if(this.currentLineNb<this.lines.length-1&&!this.isNextLineUnIndentedCollection()){Z=this.getRealCurrentLineNb()+1;J=new j(Z);J.refs=this.refs;X.push(J.parse(this.getNextEmbedBlock(null,true),I,r))}else{X.push(null)}}else{if(((N=ab.leadspaces)!=null?N.length:void 0)&&(o=this.PATTERN_COMPACT_NOTATION.exec(ab.value))){Z=this.getRealCurrentLineNb();J=new j(Z);J.refs=this.refs;v=ab.value;B=this.getCurrentLineIndentation();if(this.isNextLineIndented(false)){v+="\n"+this.getNextEmbedBlock(B+ab.leadspaces.length+1,true)}X.push(J.parse(v,I,r))}else{X.push(this.parseValue(ab.value,I,r))}}}else{if((ab=this.PATTERN_MAPPING_ITEM.exec(this.currentLine))&&ab.key.indexOf(" #")===-1){if(this.CONTEXT_SEQUENCE===ad){throw new c("You cannot define a mapping item when in a sequence")}ad=this.CONTEXT_MAPPING;if(X==null){X={}}i.configure(I,r);try{D=i.parseScalar(ab.key)}catch(F){W=F;W.parsedLine=this.getRealCurrentLineNb()+1;W.snippet=this.currentLine;throw W}if("<<"===D){K=true;aa=true;if(((A=ab.value)!=null?A.indexOf("*"):void 0)===0){L=ab.value.slice(1);if(this.refs[L]==null){throw new c('Reference "'+L+'" does not exist.',this.getRealCurrentLineNb()+1,this.currentLine)}C=this.refs[L];if(typeof C!=="object"){throw new c("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(C instanceof Array){for(V=U=0,E=C.length;U<E;V=++U){P=C[V];if(X[z=String(V)]==null){X[z]=P}}}else{for(D in C){P=C[D];if(X[D]==null){X[D]=P}}}}else{if((ab.value!=null)&&ab.value!==""){P=ab.value}else{P=this.getNextEmbedBlock()}Z=this.getRealCurrentLineNb()+1;J=new j(Z);J.refs=this.refs;M=J.parse(P,I);if(typeof M!=="object"){throw new c("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(M instanceof Array){for(S=0,w=M.length;S<w;S++){ac=M[S];if(typeof ac!=="object"){throw new c("Merge items must be objects.",this.getRealCurrentLineNb()+1,ac)}if(ac instanceof Array){for(V=R=0,u=ac.length;R<u;V=++R){P=ac[V];T=String(V);if(!X.hasOwnProperty(T)){X[T]=P}}}else{for(D in ac){P=ac[D];if(!X.hasOwnProperty(D)){X[D]=P}}}}}else{for(D in M){P=M[D];if(!X.hasOwnProperty(D)){X[D]=P}}}}}else{if((ab.value!=null)&&(o=this.PATTERN_ANCHOR_VALUE.exec(ab.value))){Y=o.ref;ab.value=o.value}}if(K){}else{if(!(ab.value!=null)||""===g.trim(ab.value," ")||g.ltrim(ab.value," ").indexOf("#")===0){if(!(this.isNextLineIndented())&&!(this.isNextLineUnIndentedCollection())){if(aa||X[D]===void 0){X[D]=null}}else{Z=this.getRealCurrentLineNb()+1;J=new j(Z);J.refs=this.refs;G=J.parse(this.getNextEmbedBlock(),I,r);if(aa||X[D]===void 0){X[D]=G}}}else{G=this.parseValue(ab.value,I,r);if(aa||X[D]===void 0){X[D]=G}}}}else{s=this.lines.length;if(1===s||(2===s&&g.isEmpty(this.lines[1]))){try{P=i.parse(this.lines[0],I,r)}catch(q){W=q;W.parsedLine=this.getRealCurrentLineNb()+1;W.snippet=this.currentLine;throw W}if(typeof P==="object"){if(P instanceof Array){x=P[0]}else{for(D in P){x=P[D];break}}if(typeof x==="string"&&x.indexOf("*")===0){X=[];for(Q=0,t=P.length;Q<t;Q++){O=P[Q];X.push(this.refs[O.slice(1)])}P=X}}return P}else{if((y=g.ltrim(P).charAt(0))==="["||y==="{"){try{return i.parse(P,I,r)}catch(p){W=p;W.parsedLine=this.getRealCurrentLineNb()+1;W.snippet=this.currentLine;throw W}}}throw new c("Unable to parse.",this.getRealCurrentLineNb()+1,this.currentLine)}}if(Y){if(X instanceof Array){this.refs[Y]=X[X.length-1]}else{H=null;for(D in X){H=D}this.refs[Y]=X[H]}}}if(g.isEmpty(X)){return null}else{return X}};j.prototype.getRealCurrentLineNb=function(){return this.currentLineNb+this.offset};j.prototype.getCurrentLineIndentation=function(){return this.currentLine.length-g.ltrim(this.currentLine," ").length};j.prototype.getNextEmbedBlock=function(q,s){var o,l,m,n,r,p,k;if(q==null){q=null}if(s==null){s=false}this.moveToNextLine();if(q==null){n=this.getCurrentLineIndentation();k=this.isStringUnIndentedCollectionItem(this.currentLine);if(!(this.isCurrentLineEmpty())&&0===n&&!k){throw new c("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}else{n=q}o=[this.currentLine.slice(n)];if(!s){m=this.isStringUnIndentedCollectionItem(this.currentLine)}p=this.PATTERN_FOLDED_SCALAR_END;r=!p.test(this.currentLine);while(this.moveToNextLine()){l=this.getCurrentLineIndentation();if(l===n){r=!p.test(this.currentLine)}if(r&&this.isCurrentLineComment()){continue}if(this.isCurrentLineBlank()){o.push(this.currentLine.slice(n));continue}if(m&&!this.isStringUnIndentedCollectionItem(this.currentLine)&&l===n){this.moveToPreviousLine();break}if(l>=n){o.push(this.currentLine.slice(n))}else{if(g.ltrim(this.currentLine).charAt(0)==="#"){}else{if(0===l){this.moveToPreviousLine();break}else{throw new c("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}}}return o.join("\n")};j.prototype.moveToNextLine=function(){if(this.currentLineNb>=this.lines.length-1){return false}this.currentLine=this.lines[++this.currentLineNb];return true};j.prototype.moveToPreviousLine=function(){this.currentLine=this.lines[--this.currentLineNb]};j.prototype.parseValue=function(u,k,r){var q,s,n,o,v,t,m,p,l;if(0===u.indexOf("*")){t=u.indexOf("#");if(t!==-1){u=u.substr(1,t-2)}else{u=u.slice(1)}if(this.refs[u]===void 0){throw new c('Reference "'+u+'" does not exist.',this.currentLine)}return this.refs[u]}if(o=this.PATTERN_FOLDED_SCALAR_ALL.exec(u)){v=(m=o.modifiers)!=null?m:"";n=Math.abs(parseInt(v));if(isNaN(n)){n=0}l=this.parseFoldedScalar(o.separator,this.PATTERN_DECIMAL.replace(v,""),n);if(o.type!=null){i.configure(k,r);return i.parseScalar(o.type+" "+l)}else{return l}}if((p=u.charAt(0))==="["||p==="{"||p==='"'||p==="'"){while(true){try{return i.parse(u,k,r)}catch(s){q=s;if(q instanceof h&&this.moveToNextLine()){u+="\n"+g.trim(this.currentLine," ")}else{q.parsedLine=this.getRealCurrentLineNb()+1;q.snippet=this.currentLine;throw q}}}}else{if(this.isNextLineIndented()){u+="\n"+this.getNextEmbedBlock()}return i.parse(u,k,r)}};j.prototype.parseFoldedScalar=function(o,t,s){var u,m,q,w,p,n,l,r,k,v;if(t==null){t=""}if(s==null){s=0}l=this.moveToNextLine();if(!l){return""}u=this.isCurrentLineBlank();v="";while(l&&u){if(l=this.moveToNextLine()){v+="\n";u=this.isCurrentLineBlank()}}if(0===s){if(p=this.PATTERN_INDENT_SPACES.exec(this.currentLine)){s=p[0].length}}if(s>0){r=this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[s];if(r==null){r=new e("^ {"+s+"}(.*)$");j.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[s]=r}while(l&&(u||(p=r.exec(this.currentLine)))){if(u){v+=this.currentLine.slice(s)}else{v+=p[1]}if(l=this.moveToNextLine()){v+="\n";u=this.isCurrentLineBlank()}}}else{if(l){v+="\n"}}if(l){this.moveToPreviousLine()}if(">"===o){n="";k=v.split("\n");for(m=0,q=k.length;m<q;m++){w=k[m];if(w.length===0||w.charAt(0)===" "){n=g.rtrim(n," ")+w+"\n"}else{n+=w+" "}}v=n}if("+"!==t){v=g.rtrim(v)}if(""===t){v=this.PATTERN_TRAILING_LINES.replace(v,"\n")}else{if("-"===t){v=this.PATTERN_TRAILING_LINES.replace(v,"")}}return v};j.prototype.isNextLineIndented=function(l){var n,m,k;if(l==null){l=true}m=this.getCurrentLineIndentation();n=!this.moveToNextLine();if(l){while(!n&&this.isCurrentLineEmpty()){n=!this.moveToNextLine()}}else{while(!n&&this.isCurrentLineBlank()){n=!this.moveToNextLine()}}if(n){return false}k=false;if(this.getCurrentLineIndentation()>m){k=true}this.moveToPreviousLine();return k};j.prototype.isCurrentLineEmpty=function(){var k;k=g.trim(this.currentLine," ");return k.length===0||k.charAt(0)==="#"};j.prototype.isCurrentLineBlank=function(){return""===g.trim(this.currentLine," ")};j.prototype.isCurrentLineComment=function(){var k;k=g.ltrim(this.currentLine," ");return k.charAt(0)==="#"};j.prototype.cleanup=function(x){var u,r,m,p,n,v,q,z,y,k,w,t,o,s;if(x.indexOf("\r")!==-1){x=x.split("\r\n").join("\n").split("\r").join("\n")}u=0;k=this.PATTERN_YAML_HEADER.replaceAll(x,""),x=k[0],u=k[1];this.offset+=u;w=this.PATTERN_LEADING_COMMENTS.replaceAll(x,"",1),s=w[0],u=w[1];if(u===1){this.offset+=g.subStrCount(x,"\n")-g.subStrCount(s,"\n");x=s}t=this.PATTERN_DOCUMENT_MARKER_START.replaceAll(x,"",1),s=t[0],u=t[1];if(u===1){this.offset+=g.subStrCount(x,"\n")-g.subStrCount(s,"\n");x=s;x=this.PATTERN_DOCUMENT_MARKER_END.replace(x,"")}y=x.split("\n");o=-1;for(p=0,v=y.length;p<v;p++){z=y[p];if(g.trim(z," ").length===0){continue}m=z.length-g.ltrim(z).length;if(o===-1||m<o){o=m}}if(o>0){for(r=n=0,q=y.length;n<q;r=++n){z=y[r];y[r]=z.slice(o)}x=y.join("\n")}return x};j.prototype.isNextLineUnIndentedCollection=function(l){var m,k;if(l==null){l=null}if(l==null){l=this.getCurrentLineIndentation()}m=this.moveToNextLine();while(m&&this.isCurrentLineEmpty()){m=this.moveToNextLine()}if(false===m){return false}k=false;if(this.getCurrentLineIndentation()===l&&this.isStringUnIndentedCollectionItem(this.currentLine)){k=true}this.moveToPreviousLine();return k};j.prototype.isStringUnIndentedCollectionItem=function(){return this.currentLine==="-"||this.currentLine.slice(0,2)==="- "};return j})();a.exports=d},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(b,c,a){var d;d=(function(){e.prototype.regex=null;e.prototype.rawRegex=null;e.prototype.cleanedRegex=null;e.prototype.mapping=null;function e(m,p){var q,l,j,n,o,f,g,h,k;if(p==null){p=""}j="";o=m.length;f=null;l=0;n=0;while(n<o){q=m.charAt(n);if(q==="\\"){j+=m.slice(n,+(n+1)+1||9000000000);n++}else{if(q==="("){if(n<o-2){h=m.slice(n,+(n+2)+1||9000000000);if(h==="(?:"){n+=2;j+=h}else{if(h==="(?<"){l++;n+=2;g="";while(n+1<o){k=m.charAt(n+1);if(k===">"){j+="(";n++;if(g.length>0){if(f==null){f={}}f[g]=l}break}else{g+=k}n++}}else{j+=q;l++}}}else{j+=q}}else{j+=q}}n++}this.rawRegex=m;this.cleanedRegex=j;this.regex=new RegExp(this.cleanedRegex,"g"+p.replace("g",""));this.mapping=f}e.prototype.exec=function(j){var g,i,f,h;this.regex.lastIndex=0;i=this.regex.exec(j);if(i==null){return null}if(this.mapping!=null){h=this.mapping;for(f in h){g=h[f];i[f]=i[g]}}return i};e.prototype.test=function(f){this.regex.lastIndex=0;return this.regex.test(f)};e.prototype.replace=function(g,f){this.regex.lastIndex=0;return g.replace(this.regex,f)};e.prototype.replaceAll=function(i,g,f){var h;if(f==null){f=0}this.regex.lastIndex=0;h=0;while(this.regex.test(i)&&(f===0||h<f)){this.regex.lastIndex=0;i=i.replace(this.regex,g);h++}return[i,h]};return e})();c.exports=d},{}],9:[function(b,c,a){var e,d,f;f=b("./Utils");e=b("./Pattern");d=(function(){function g(){}g.PATTERN_ESCAPED_CHARACTER=new e('\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})');g.unescapeSingleQuotedString=function(h){return h.replace(/\'\'/g,"'")};g.unescapeDoubleQuotedString=function(h){if(this._unescapeCallback==null){this._unescapeCallback=(function(i){return function(j){return i.unescapeCharacter(j)}})(this)}return this.PATTERN_ESCAPED_CHARACTER.replace(h,this._unescapeCallback)};g.unescapeCharacter=function(i){var h;h=String.fromCharCode;switch(i.charAt(1)){case"0":return h(0);case"a":return h(7);case"b":return h(8);case"t":return"\t";case"\t":return"\t";case"n":return"\n";case"v":return h(11);case"f":return h(12);case"r":return h(13);case"e":return h(27);case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return h(133);case"_":return h(160);case"L":return h(8232);case"P":return h(8233);case"x":return f.utf8chr(f.hexDec(i.substr(2,2)));case"u":return f.utf8chr(f.hexDec(i.substr(2,4)));case"U":return f.utf8chr(f.hexDec(i.substr(2,8)));default:return""}};return g})();c.exports=d},{"./Pattern":8,"./Utils":10}],10:[function(b,c,a){var e,f,d={}.hasOwnProperty;e=b("./Pattern");f=(function(){function g(){}g.REGEX_LEFT_TRIM_BY_CHAR={};g.REGEX_RIGHT_TRIM_BY_CHAR={};g.REGEX_SPACES=/\s+/g;g.REGEX_DIGITS=/^\d+$/;g.REGEX_OCTAL=/[^0-7]/gi;g.REGEX_HEXADECIMAL=/[^a-f0-9]/gi;g.PATTERN_DATE=new e("^(?<year>[0-9][0-9][0-9][0-9])-(?<month>[0-9][0-9]?)-(?<day>[0-9][0-9]?)(?:(?:[Tt]|[ \t]+)(?<hour>[0-9][0-9]?):(?<minute>[0-9][0-9]):(?<second>[0-9][0-9])(?:.(?<fraction>[0-9]*))?(?:[ \t]*(?<tz>Z|(?<tz_sign>[-+])(?<tz_hour>[0-9][0-9]?)(?::(?<tz_minute>[0-9][0-9]))?))?)?$","i");g.LOCAL_TIMEZONE_OFFSET=new Date().getTimezoneOffset()*60*1000;g.trim=function(k,h){var i,j;if(h==null){h="\\s"}i=this.REGEX_LEFT_TRIM_BY_CHAR[h];if(i==null){this.REGEX_LEFT_TRIM_BY_CHAR[h]=i=new RegExp("^"+h+""+h+"*")}i.lastIndex=0;j=this.REGEX_RIGHT_TRIM_BY_CHAR[h];if(j==null){this.REGEX_RIGHT_TRIM_BY_CHAR[h]=j=new RegExp(h+""+h+"*$")}j.lastIndex=0;return k.replace(i,"").replace(j,"")};g.ltrim=function(j,h){var i;if(h==null){h="\\s"}i=this.REGEX_LEFT_TRIM_BY_CHAR[h];if(i==null){this.REGEX_LEFT_TRIM_BY_CHAR[h]=i=new RegExp("^"+h+""+h+"*")}i.lastIndex=0;return j.replace(i,"")};g.rtrim=function(j,h){var i;if(h==null){h="\\s"}i=this.REGEX_RIGHT_TRIM_BY_CHAR[h];if(i==null){this.REGEX_RIGHT_TRIM_BY_CHAR[h]=i=new RegExp(h+""+h+"*$")}i.lastIndex=0;return j.replace(i,"")};g.isEmpty=function(h){return !h||h===""||h==="0"||(h instanceof Array&&h.length===0)||this.isEmptyObject(h)};g.isEmptyObject=function(i){var h;return i instanceof Object&&((function(){var j;j=[];for(h in i){if(!d.call(i,h)){continue}j.push(h)}return j})()).length===0};g.subStrCount=function(p,q,k,l){var s,o,n,r,m,h;s=0;p=""+p;q=""+q;if(k!=null){p=p.slice(k)}if(l!=null){p=p.slice(0,l)}r=p.length;h=q.length;for(o=n=0,m=r;0<=m?n<m:n>m;o=0<=m?++n:--n){if(q===p.slice(o,h)){s++;o+=h-1}}return s};g.isDigits=function(h){this.REGEX_DIGITS.lastIndex=0;return this.REGEX_DIGITS.test(h)};g.octDec=function(h){this.REGEX_OCTAL.lastIndex=0;return parseInt((h+"").replace(this.REGEX_OCTAL,""),8)};g.hexDec=function(h){this.REGEX_HEXADECIMAL.lastIndex=0;h=this.trim(h);if((h+"").slice(0,2)==="0x"){h=(h+"").slice(2)}return parseInt((h+"").replace(this.REGEX_HEXADECIMAL,""),16)};g.utf8chr=function(i){var h;h=String.fromCharCode;if(128>(i%=2097152)){return h(i)}if(2048>i){return h(192|i>>6)+h(128|i&63)}if(65536>i){return h(224|i>>12)+h(128|i>>6&63)+h(128|i&63)}return h(240|i>>18)+h(128|i>>12&63)+h(128|i>>6&63)+h(128|i&63)};g.parseBoolean=function(i,h){var j;if(h==null){h=true}if(typeof i==="string"){j=i.toLowerCase();if(!h){if(j==="no"){return false}}if(j==="0"){return false}if(j==="false"){return false}if(j===""){return false}return true}return !!i};g.isNumeric=function(h){this.REGEX_SPACES.lastIndex=0;return typeof h==="number"||typeof h==="string"&&!isNaN(h)&&h.replace(this.REGEX_SPACES,"")!==""};g.stringToDate=function(r){var k,s,t,n,j,m,p,h,o,i,l,q;if(!(r!=null?r.length:void 0)){return null}j=this.PATTERN_DATE.exec(r);if(!j){return null}q=parseInt(j.year,10);p=parseInt(j.month,10)-1;s=parseInt(j.day,10);if(j.hour==null){k=new Date(Date.UTC(q,p,s));return k}n=parseInt(j.hour,10);m=parseInt(j.minute,10);h=parseInt(j.second,10);if(j.fraction!=null){t=j.fraction.slice(0,3);while(t.length<3){t+="0"}t=parseInt(t,10)}else{t=0}if(j.tz!=null){o=parseInt(j.tz_hour,10);if(j.tz_minute!=null){i=parseInt(j.tz_minute,10)}else{i=0}l=(o*60+i)*60000;if("-"===j.tz_sign){l*=-1}}k=new Date(Date.UTC(q,p,s,n,m,h,t));if(l){k.setTime(k.getTime()-l)}return k};g.strRepeat=function(l,k){var j,h;h="";j=0;while(j<k){h+=l;j++}return h};g.getStringFromFile=function(s,q){var n,o,l,m,h,i,p,r;if(q==null){q=null}r=null;if(typeof window!=="undefined"&&window!==null){if(window.XMLHttpRequest){r=new XMLHttpRequest()}else{if(window.ActiveXObject){i=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(l=0,m=i.length;l<m;l++){h=i[l];try{r=new ActiveXObject(h)}catch(k){}}}}}if(r!=null){if(q!=null){r.onreadystatechange=function(){if(r.readyState===4){if(r.status===200||r.status===0){return q(r.responseText)}else{return q(null)}}};r.open("GET",s,true);return r.send(null)}else{r.open("GET",s,false);r.send(null);if(r.status===200||r.status===0){return r.responseText}return null}}else{p=b;o=p("fs");if(q!=null){return o.readFile(s,function(j,t){if(j){return q(null)}else{return q(String(t))}})}else{n=o.readFileSync(s);if(n!=null){return String(n)}return null}}};return g})();c.exports=f},{"./Pattern":8}],11:[function(c,e,b){var a,g,f,d;g=c("./Parser");a=c("./Dumper");f=c("./Utils");d=(function(){function h(){}h.parse=function(j,i,k){if(i==null){i=false}if(k==null){k=null}return new g().parse(j,i,k)};h.parseFile=function(k,m,j,l){var i;if(m==null){m=null}if(j==null){j=false}if(l==null){l=null}if(m!=null){return f.getStringFromFile(k,(function(n){return function(p){var o;o=null;if(p!=null){o=n.parse(p,j,l)}m(o)}})(this))}else{i=f.getStringFromFile(k);if(i!=null){return this.parse(i,j,l)}return null}};h.dump=function(l,n,i,k,j){var m;if(n==null){n=2}if(i==null){i=4}if(k==null){k=false}if(j==null){j=null}m=new a();m.indentation=i;return m.dump(l,n,0,k,j)};h.stringify=function(l,m,i,k,j){return this.dump(l,m,i,k,j)};h.load=function(j,l,i,k){return this.parseFile(j,l,i,k)};return h})();if(typeof window!=="undefined"&&window!==null){window.YAML=d}if(typeof window==="undefined"||window===null){this.YAML=d}e.exports=d},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]);