@techdocs/cli 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/cjs/{generate-b637bb78.cjs.js → generate-e530be0d.cjs.js} +2 -2
- package/dist/cjs/generate-e530be0d.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +1 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.09ef0e28.chunk.js → 1553.c2a9eb50.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.09ef0e28.chunk.js.map → 1553.c2a9eb50.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.56f057f3.chunk.js → 2426.32fc1ca1.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.56f057f3.chunk.js.map → 2426.32fc1ca1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3555.4d83af5a.chunk.js +8 -0
- package/dist/embedded-app/static/3555.4d83af5a.chunk.js.map +1 -0
- package/dist/embedded-app/static/{390.0d686030.chunk.js → 390.74a27040.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.0d686030.chunk.js.map → 390.74a27040.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.7b5d6caf.chunk.js → 4022.ca590614.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.7b5d6caf.chunk.js.map → 4022.ca590614.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4949.bffcfed7.chunk.js +3 -0
- package/dist/embedded-app/static/4949.bffcfed7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{6235.8385fd0b.chunk.js → 6235.61c00d19.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.8385fd0b.chunk.js.map → 6235.61c00d19.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6583.19098eda.chunk.js → 6583.0b42ebbe.chunk.js} +2 -2
- package/dist/embedded-app/static/{6583.19098eda.chunk.js.map → 6583.0b42ebbe.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js → 7110.135c2721.chunk.js} +2 -2
- package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js.map → 7110.135c2721.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7758.75aef2ae.chunk.js +3 -0
- package/dist/embedded-app/static/7758.75aef2ae.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8061.411cf8de.chunk.js → 8061.f5e20bb7.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.411cf8de.chunk.js.map → 8061.f5e20bb7.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8718.b6fd1dca.chunk.js → 8718.bd799167.chunk.js} +2 -2
- package/dist/embedded-app/static/8718.bd799167.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8792.bd5eec10.chunk.js → 8792.6f60e67c.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.bd5eec10.chunk.js.map → 8792.6f60e67c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.afacb85a.chunk.js → 9028.1e31ab6a.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.afacb85a.chunk.js.map → 9028.1e31ab6a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.a9307e40.js +487 -0
- package/dist/embedded-app/static/main.a9307e40.js.map +1 -0
- package/dist/embedded-app/static/module-luxon.ee0def5d.js +3 -0
- package/dist/embedded-app/static/module-luxon.ee0def5d.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.1e05f502.js → module-material-ui.cd8dff4a.js} +11 -11
- package/dist/embedded-app/static/module-material-ui.cd8dff4a.js.map +1 -0
- package/dist/embedded-app/static/module-yaml.0874c6f8.js +136 -0
- package/dist/embedded-app/static/module-yaml.0874c6f8.js.map +1 -0
- package/dist/embedded-app/static/module-zod.53b5d347.js +3 -0
- package/dist/embedded-app/static/module-zod.53b5d347.js.map +1 -0
- package/dist/embedded-app/static/{runtime.9724fcfa.js → runtime.a9307e40.js} +2 -2
- package/dist/embedded-app/static/{runtime.9724fcfa.js.map → runtime.a9307e40.js.map} +1 -1
- package/dist/embedded-app/static/vendor.a9307e40.js +102 -0
- package/dist/embedded-app/static/vendor.a9307e40.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/cjs/generate-b637bb78.cjs.js.map +0 -1
- package/dist/embedded-app/static/1959.9f791e1b.chunk.js +0 -8
- package/dist/embedded-app/static/1959.9f791e1b.chunk.js.map +0 -1
- package/dist/embedded-app/static/3860.30afe880.chunk.js +0 -3
- package/dist/embedded-app/static/3860.30afe880.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.94a98122.chunk.js +0 -3
- package/dist/embedded-app/static/7758.94a98122.chunk.js.map +0 -1
- package/dist/embedded-app/static/8718.b6fd1dca.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.9724fcfa.js +0 -487
- package/dist/embedded-app/static/main.9724fcfa.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.1e05f502.js.map +0 -1
- package/dist/embedded-app/static/module-yaml.63d08f2d.js +0 -151
- package/dist/embedded-app/static/module-yaml.63d08f2d.js.map +0 -1
- package/dist/embedded-app/static/module-zod.2193e794.js +0 -3
- package/dist/embedded-app/static/module-zod.2193e794.js.map +0 -1
- package/dist/embedded-app/static/vendor.9724fcfa.js +0 -103
- package/dist/embedded-app/static/vendor.9724fcfa.js.map +0 -1
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9035],{60155:function(vt,ht,pe){vt.exports=pe(56093).YAML},56093:function(vt,ht,pe){"use strict";pe.d(ht,{YAML:function(){return Or}});function J(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(n){return typeof n}:J=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J(i)}function N(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function pt(i,n){for(var e=0;e<n.length;e++){var a=n[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,a.key,a)}}function A(i,n,e){return n&&pt(i.prototype,n),e&&pt(i,e),i}function x(i,n,e){return n in i?Object.defineProperty(i,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[n]=e,i}function M(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),n&&ge(i,n)}function F(i){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},F(i)}function ge(i,n){return ge=Object.setPrototypeOf||function(a,t){return a.__proto__=t,a},ge(i,n)}function gt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ie(i,n,e){return gt()?Ie=Reflect.construct:Ie=function(t,r,s){var o=[null];o.push.apply(o,r);var u=Function.bind.apply(t,o),f=new u;return s&&ge(f,s.prototype),f},Ie.apply(null,arguments)}function hn(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function Ge(i){var n=typeof Map=="function"?new Map:void 0;return Ge=function(a){if(a===null||!hn(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(a))return n.get(a);n.set(a,t)}function t(){return Ie(a,arguments,F(this).constructor)}return t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),ge(t,a)},Ge(i)}function q(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function dt(i,n){return n&&(typeof n=="object"||typeof n=="function")?n:q(i)}function I(i){var n=gt();return function(){var a=F(i),t;if(n){var r=F(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return dt(this,t)}}function pn(i,n){for(;!Object.prototype.hasOwnProperty.call(i,n)&&(i=F(i),i!==null););return i}function Q(i,n,e){return typeof Reflect!="undefined"&&Reflect.get?Q=Reflect.get:Q=function(t,r,s){var o=pn(t,r);if(!!o){var u=Object.getOwnPropertyDescriptor(o,r);return u.get?u.get.call(s):u.value}},Q(i,n,e||i)}function de(i,n){return yt(i)||dn(i,n)||He(i,n)||wt()}function ye(i){return yt(i)||gn(i)||He(i)||wt()}function yt(i){if(Array.isArray(i))return i}function gn(i){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(i))return Array.from(i)}function dn(i,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(i)))){var e=[],a=!0,t=!1,r=void 0;try{for(var s=i[Symbol.iterator](),o;!(a=(o=s.next()).done)&&(e.push(o.value),!(n&&e.length===n));a=!0);}catch(u){t=!0,r=u}finally{try{!a&&s.return!=null&&s.return()}finally{if(t)throw r}}return e}}function He(i,n){if(!!i){if(typeof i=="string")return mt(i,n);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return mt(i,n)}}function mt(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,a=new Array(n);e<n;e++)a[e]=i[e];return a}function wt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(i,n){var e;if(typeof Symbol=="undefined"||i[Symbol.iterator]==null){if(Array.isArray(i)||(e=He(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var a=0,t=function(){};return{s:t,n:function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}},e:function(u){throw u},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,s=!1,o;return{s:function(){e=i[Symbol.iterator]()},n:function(){var u=e.next();return r=u.done,u},e:function(u){s=!0,o=u},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(s)throw o}}}}var R={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},p={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},Te="tag:yaml.org,2002:",re={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function bt(i){for(var n=[0],e=i.indexOf(`
|
|
4
|
-
`);e!==-1;)e+=1,n.push(e),e=i.indexOf(`
|
|
5
|
-
`,e);return n}function St(i){var n,e;return typeof i=="string"?(n=bt(i),e=i):(Array.isArray(i)&&(i=i[0]),i&&i.context&&(i.lineStarts||(i.lineStarts=bt(i.context.src)),n=i.lineStarts,e=i.context.src)),{lineStarts:n,src:e}}function ze(i,n){if(typeof i!="number"||i<0)return null;var e=St(n),a=e.lineStarts,t=e.src;if(!a||!t||i>t.length)return null;for(var r=0;r<a.length;++r){var s=a[r];if(i<s)return{line:r,col:i-a[r-1]+1};if(i===s)return{line:r+1,col:1}}var o=a.length;return{line:o,col:i-a[o-1]+1}}function yn(i,n){var e=St(n),a=e.lineStarts,t=e.src;if(!a||!(i>=1)||i>a.length)return null;for(var r=a[i-1],s=a[i];s&&s>r&&t[s-1]===`
|
|
6
|
-
`;)--s;return t.slice(r,s)}function mn(i,n){var e=i.start,a=i.end,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:80,r=yn(e.line,n);if(!r)return null;var s=e.col;if(r.length>t)if(s<=t-10)r=r.substr(0,t-1)+"\u2026";else{var o=Math.round(t/2);r.length>s+o&&(r=r.substr(0,s+o-1)+"\u2026"),s-=r.length-t,r="\u2026"+r.substr(1-t)}var u=1,f="";a&&(a.line===e.line&&s+(a.col-e.col)<=t+1?u=a.col-e.col:(u=Math.min(r.length+1,t)-s,f="\u2026"));var l=s>1?" ".repeat(s-1):"",c="^".repeat(u);return"".concat(r,`
|
|
7
|
-
`).concat(l).concat(c).concat(f)}var C=function(){function i(n,e){N(this,i),this.start=n,this.end=e||n}return A(i,[{key:"isEmpty",value:function(){return typeof this.start!="number"||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,a){var t=this.start,r=this.end;if(e.length===0||r<=e[0])return this.origStart=t,this.origEnd=r,a;for(var s=a;s<e.length&&!(e[s]>t);)++s;this.origStart=t+s;for(var o=s;s<e.length&&!(e[s]>=r);)++s;return this.origEnd=r+s,o}}],[{key:"copy",value:function(e){return new i(e.start,e.end)}}]),i}(),y=function(){function i(n,e,a){N(this,i),Object.defineProperty(this,"context",{value:a||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=e||[],this.type=n,this.value=null}return A(i,[{key:"getPropValue",value:function(e,a,t){if(!this.context)return null;var r=this.context.src,s=this.props[e];return s&&r[s.start]===a?r.slice(s.start+(t?1:0),s.end):null}},{key:"anchor",get:function(){for(var e=0;e<this.props.length;++e){var a=this.getPropValue(e,R.ANCHOR,!0);if(a!=null)return a}return null}},{key:"comment",get:function(){for(var e=[],a=0;a<this.props.length;++a){var t=this.getPropValue(a,R.COMMENT,!0);t!=null&&e.push(t)}return e.length>0?e.join(`
|
|
8
|
-
`):null}},{key:"commentHasRequiredWhitespace",value:function(e){var a=this.context.src;if(this.header&&e===this.header.end||!this.valueRange)return!1;var t=this.valueRange.end;return e!==t||i.atBlank(a,t-1)}},{key:"hasComment",get:function(){if(this.context){for(var e=this.context.src,a=0;a<this.props.length;++a)if(e[this.props[a].start]===R.COMMENT)return!0}return!1}},{key:"hasProps",get:function(){if(this.context){for(var e=this.context.src,a=0;a<this.props.length;++a)if(e[this.props[a].start]!==R.COMMENT)return!0}return!1}},{key:"includesTrailingLines",get:function(){return!1}},{key:"jsonLike",get:function(){var e=[p.FLOW_MAP,p.FLOW_SEQ,p.QUOTE_DOUBLE,p.QUOTE_SINGLE];return e.indexOf(this.type)!==-1}},{key:"rangeAsLinePos",get:function(){if(!(!this.range||!this.context)){var e=ze(this.range.start,this.context.root);if(!!e){var a=ze(this.range.end,this.context.root);return{start:e,end:a}}}}},{key:"rawValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,a=e.start,t=e.end;return this.context.src.slice(a,t)}},{key:"tag",get:function(){for(var e=0;e<this.props.length;++e){var a=this.getPropValue(e,R.TAG,!1);if(a!=null){if(a[1]==="<")return{verbatim:a.slice(2,-1)};var t=a.match(/^(.*!)([^!]*)$/),r=de(t,3);r[0];var s=r[1],o=r[2];return{handle:s,suffix:o}}}return null}},{key:"valueRangeContainsNewline",get:function(){if(!this.valueRange||!this.context)return!1;for(var e=this.valueRange,a=e.start,t=e.end,r=this.context.src,s=a;s<t;++s)if(r[s]===`
|
|
9
|
-
`)return!0;return!1}},{key:"parseComment",value:function(e){var a=this.context.src;if(a[e]===R.COMMENT){var t=i.endOfLine(a,e+1),r=new C(e,t);return this.props.push(r),t}return e}},{key:"setOrigRanges",value:function(e,a){return this.range&&(a=this.range.setOrigRange(e,a)),this.valueRange&&this.valueRange.setOrigRange(e,a),this.props.forEach(function(t){return t.setOrigRange(e,a)}),a}},{key:"toString",value:function(){var e=this.context.src,a=this.range,t=this.value;if(t!=null)return t;var r=e.slice(a.start,a.end);return i.addStringTerminator(e,a.end,r)}}],[{key:"addStringTerminator",value:function(e,a,t){if(t[t.length-1]===`
|
|
10
|
-
`)return t;var r=i.endOfWhiteSpace(e,a);return r>=e.length||e[r]===`
|
|
11
|
-
`?t+`
|
|
12
|
-
`:t}},{key:"atDocumentBoundary",value:function(e,a,t){var r=e[a];if(!r)return!0;var s=e[a-1];if(s&&s!==`
|
|
13
|
-
`)return!1;if(t){if(r!==t)return!1}else if(r!==R.DIRECTIVES_END&&r!==R.DOCUMENT_END)return!1;var o=e[a+1],u=e[a+2];if(o!==r||u!==r)return!1;var f=e[a+3];return!f||f===`
|
|
14
|
-
`||f===" "||f===" "}},{key:"endOfIdentifier",value:function(e,a){for(var t=e[a],r=t==="<",s=r?[`
|
|
15
|
-
`," "," ",">"]:[`
|
|
16
|
-
`," "," ","[","]","{","}",","];t&&s.indexOf(t)===-1;)t=e[a+=1];return r&&t===">"&&(a+=1),a}},{key:"endOfIndent",value:function(e,a){for(var t=e[a];t===" ";)t=e[a+=1];return a}},{key:"endOfLine",value:function(e,a){for(var t=e[a];t&&t!==`
|
|
17
|
-
`;)t=e[a+=1];return a}},{key:"endOfWhiteSpace",value:function(e,a){for(var t=e[a];t===" "||t===" ";)t=e[a+=1];return a}},{key:"startOfLine",value:function(e,a){var t=e[a-1];if(t===`
|
|
18
|
-
`)return a;for(;t&&t!==`
|
|
19
|
-
`;)t=e[a-=1];return a+1}},{key:"endOfBlockIndent",value:function(e,a,t){var r=i.endOfIndent(e,t);if(r>t+a)return r;var s=i.endOfWhiteSpace(e,r),o=e[s];return!o||o===`
|
|
20
|
-
`?s:null}},{key:"atBlank",value:function(e,a,t){var r=e[a];return r===`
|
|
21
|
-
`||r===" "||r===" "||t&&!r}},{key:"nextNodeIsIndented",value:function(e,a,t){return!e||a<0?!1:a>0?!0:t&&e==="-"}},{key:"normalizeOffset",value:function(e,a){var t=e[a];return t?t!==`
|
|
22
|
-
`&&e[a-1]===`
|
|
23
|
-
`?a-1:i.endOfWhiteSpace(e,a):a}},{key:"foldNewline",value:function(e,a,t){for(var r=0,s=!1,o="",u=e[a+1];u===" "||u===" "||u===`
|
|
24
|
-
`;){switch(u){case`
|
|
25
|
-
`:r=0,a+=1,o+=`
|
|
26
|
-
`;break;case" ":r<=t&&(s=!0),a=i.endOfWhiteSpace(e,a+2)-1;break;case" ":r+=1,a+=1;break}u=e[a+1]}return o||(o=" "),u&&r<=t&&(s=!0),{fold:o,offset:a,error:s}}}]),i}(),fe=function(i){M(e,i);var n=I(e);function e(a,t,r){var s;if(N(this,e),!r||!(t instanceof y))throw new Error("Invalid arguments for new ".concat(a));return s=n.call(this),s.name=a,s.message=r,s.source=t,s}return A(e,[{key:"makePretty",value:function(){if(!!this.source){this.nodeType=this.source.type;var t=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new C(this.offset,this.offset+1);var r=t&&ze(this.offset,t);if(r){var s={line:r.line,col:r.col+1};this.linePos={start:r,end:s}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var o=this.linePos.start,u=o.line,f=o.col;this.message+=" at line ".concat(u,", column ").concat(f);var l=t&&mn(this.linePos,t);l&&(this.message+=`:
|
|
27
|
-
|
|
28
|
-
`.concat(l,`
|
|
29
|
-
`))}delete this.source}}}]),e}(Ge(Error)),me=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLReferenceError",a,t)}return e}(fe),k=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLSemanticError",a,t)}return e}(fe),$=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLSyntaxError",a,t)}return e}(fe),le=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLWarning",a,t)}return e}(fe),Ot=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var t=this.valueRange,r=t.start,s=t.end,o=this.context.src,u=o[s-1];r<s&&(u===`
|
|
30
|
-
`||u===" "||u===" ");)u=o[--s-1];for(var f="",l=r;l<s;++l){var c=o[l];if(c===`
|
|
31
|
-
`){var v=y.foldNewline(o,l,-1),h=v.fold,g=v.offset;f+=h,l=g}else if(c===" "||c===" "){for(var d=l,w=o[l+1];l<s&&(w===" "||w===" ");)l+=1,w=o[l+1];w!==`
|
|
32
|
-
`&&(f+=l>d?o.slice(d,l+1):c)}else f+=c}var m=o[r];switch(m){case" ":{var b="Plain value cannot start with a tab character",S=[new k(this,b)];return{errors:S,str:f}}case"@":case"`":{var P="Plain value cannot start with reserved character ".concat(m),_=[new k(this,P)];return{errors:_,str:f}}default:return f}}},{key:"parseBlockValue",value:function(t){for(var r=this.context,s=r.indent,o=r.inFlow,u=r.src,f=t,l=t,c=u[f];c===`
|
|
33
|
-
`&&!y.atDocumentBoundary(u,f+1);c=u[f]){var v=y.endOfBlockIndent(u,s,f+1);if(v===null||u[v]==="#")break;u[v]===`
|
|
34
|
-
`?f=v:(l=e.endOfLine(u,v,o),f=l)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=l,l}},{key:"parse",value:function(t,r){this.context=t;var s=t.inFlow,o=t.src,u=r,f=o[u];return f&&f!=="#"&&f!==`
|
|
35
|
-
`&&(u=e.endOfLine(o,r,s)),this.valueRange=new C(r,u),u=y.endOfWhiteSpace(o,u),u=this.parseComment(u),(!this.hasComment||this.valueRange.isEmpty())&&(u=this.parseBlockValue(u)),u}}],[{key:"endOfLine",value:function(t,r,s){for(var o=t[r],u=r;o&&o!==`
|
|
36
|
-
`&&!(s&&(o==="["||o==="]"||o==="{"||o==="}"||o===","));){var f=t[u+1];if(o===":"&&(!f||f===`
|
|
37
|
-
`||f===" "||f===" "||s&&f===",")||(o===" "||o===" ")&&f==="#")break;u+=1,o=f}return u}}]),e}(y),we=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.call(this,p.BLANK_LINE)}return A(e,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(t,r){return this.context=t,this.range=new C(r,r+1),r+1}}]),e}(y),Ze=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.node=null,r}return A(e,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=t.atLineStart,f=t.lineStart;!u&&this.type===p.SEQ_ITEM&&(this.error=new k(this,"Sequence items must not have preceding content on the same line"));for(var l=u?r-f:t.indent,c=y.endOfWhiteSpace(o,r+1),v=o[c],h=v==="#",g=[],d=null;v===`
|
|
38
|
-
`||v==="#";){if(v==="#"){var w=y.endOfLine(o,c+1);g.push(new C(c,w)),c=w}else{u=!0,f=c+1;var m=y.endOfWhiteSpace(o,f);o[m]===`
|
|
39
|
-
`&&g.length===0&&(d=new we,f=d.parse({src:o},f)),c=y.endOfIndent(o,f)}v=o[c]}if(y.nextNodeIsIndented(v,c-(f+l),this.type!==p.SEQ_ITEM)?this.node=s({atLineStart:u,inCollection:!1,indent:l,lineStart:f,parent:this},c):v&&f>r+1&&(c=f-1),this.node){if(d){var b=t.parent.items||t.parent.contents;b&&b.push(d)}g.length&&Array.prototype.push.apply(this.props,g),c=this.node.range.end}else if(h){var S=g[0];this.props.push(S),c=S.end}else c=y.endOfLine(o,r+1);var P=this.node?this.node.valueRange.end:c;return this.valueRange=new C(r,P),c}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.node?this.node.setOrigRanges(t,r):r}},{key:"toString",value:function(){var t=this.context.src,r=this.node,s=this.range,o=this.value;if(o!=null)return o;var u=r?t.slice(s.start,r.range.start)+String(r):t.slice(s.start,s.end);return y.addStringTerminator(t,s.end,u)}}]),e}(y),be=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.call(this,p.COMMENT)}return A(e,[{key:"parse",value:function(t,r){this.context=t;var s=this.parseComment(r);return this.range=new C(r,s),s}}]),e}(y);function Xe(i){for(var n=i;n instanceof Ze;)n=n.node;if(!(n instanceof kt))return null;for(var e=n.items.length,a=-1,t=e-1;t>=0;--t){var r=n.items[t];if(r.type===p.COMMENT){var s=r.context,o=s.indent,u=s.lineStart;if(o>0&&r.range.start>=u+o)break;a=t}else if(r.type===p.BLANK_LINE)a=t;else break}if(a===-1)return null;for(var f=n.items.splice(a,e-a),l=f[0].range.start;n.range.end=l,n.valueRange&&n.valueRange.end>l&&(n.valueRange.end=l),n!==i;)n=n.context.parent;return f}var kt=function(i){M(e,i);var n=I(e);function e(a){var t;N(this,e),t=n.call(this,a.type===p.SEQ_ITEM?p.SEQ:p.MAP);for(var r=a.props.length-1;r>=0;--r)if(a.props[r].start<a.context.lineStart){t.props=a.props.slice(0,r+1),a.props=a.props.slice(r+1);var s=a.props[0]||a.valueRange;a.range.start=s.start;break}t.items=[a];var o=Xe(a);return o&&Array.prototype.push.apply(t.items,o),t}return A(e,[{key:"includesTrailingLines",get:function(){return this.items.length>0}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=y.startOfLine(o,r),f=this.items[0];f.context.parent=this,this.valueRange=C.copy(f.valueRange);var l=f.range.start-f.context.lineStart,c=r;c=y.normalizeOffset(o,c);for(var v=o[c],h=y.endOfWhiteSpace(o,u)===c,g=!1;v;){for(;v===`
|
|
40
|
-
`||v==="#";){if(h&&v===`
|
|
41
|
-
`&&!g){var d=new we;if(c=d.parse({src:o},c),this.valueRange.end=c,c>=o.length){v=null;break}this.items.push(d),c-=1}else if(v==="#"){if(c<u+l&&!e.nextContentHasIndent(o,c,l))return c;var w=new be;if(c=w.parse({indent:l,lineStart:u,src:o},c),this.items.push(w),this.valueRange.end=c,c>=o.length){v=null;break}}if(u=c+1,c=y.endOfIndent(o,u),y.atBlank(o,c)){var m=y.endOfWhiteSpace(o,c),b=o[m];(!b||b===`
|
|
42
|
-
`||b==="#")&&(c=m)}v=o[c],h=!0}if(!v)break;if(c!==u+l&&(h||v!==":")){if(c<u+l){u>r&&(c=u);break}else if(!this.error){var S="All collection items must start at the same column";this.error=new $(this,S)}}if(f.type===p.SEQ_ITEM){if(v!=="-"){u>r&&(c=u);break}}else if(v==="-"&&!this.error){var P=o[c+1];if(!P||P===`
|
|
43
|
-
`||P===" "||P===" "){var _="A collection cannot be both a mapping and a sequence";this.error=new $(this,_)}}var O=s({atLineStart:h,inCollection:!0,indent:l,lineStart:u,parent:this},c);if(!O)return c;if(this.items.push(O),this.valueRange.end=O.valueRange.end,c=y.normalizeOffset(o,O.range.end),v=o[c],h=!1,g=O.includesTrailingLines,v){for(var B=c-1,j=o[B];j===" "||j===" ";)j=o[--B];j===`
|
|
44
|
-
`&&(u=B+1,h=!0)}var V=Xe(O);V&&Array.prototype.push.apply(this.items,V)}return c}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.items.forEach(function(s){r=s.setOrigRanges(t,r)}),r}},{key:"toString",value:function(){var t=this.context.src,r=this.items,s=this.range,o=this.value;if(o!=null)return o;for(var u=t.slice(s.start,r[0].range.start)+String(r[0]),f=1;f<r.length;++f){var l=r[f],c=l.context,v=c.atLineStart,h=c.indent;if(v)for(var g=0;g<h;++g)u+=" ";u+=String(l)}return y.addStringTerminator(t,s.end,u)}}],[{key:"nextContentHasIndent",value:function(t,r,s){var o=y.endOfLine(t,r)+1;r=y.endOfWhiteSpace(t,o);var u=t[r];return u?r>=o+s?!0:u!=="#"&&u!==`
|
|
45
|
-
`?!1:e.nextContentHasIndent(t,r,s):!1}}]),e}(y),wn=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this,p.DIRECTIVE),a.name=null,a}return A(e,[{key:"parameters",get:function(){var t=this.rawValue;return t?t.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(t){for(var r=this.context.src,s=t,o=r[s];o&&o!==`
|
|
46
|
-
`&&o!==" "&&o!==" ";)o=r[s+=1];return this.name=r.slice(t,s),s}},{key:"parseParameters",value:function(t){for(var r=this.context.src,s=t,o=r[s];o&&o!==`
|
|
47
|
-
`&&o!=="#";)o=r[s+=1];return this.valueRange=new C(t,s),s}},{key:"parse",value:function(t,r){this.context=t;var s=this.parseName(r+1);return s=this.parseParameters(s),s=this.parseComment(s),this.range=new C(r,s),s}}]),e}(y),bn=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this,p.DOCUMENT),a.directives=null,a.contents=null,a.directivesEndMarker=null,a.documentEndMarker=null,a}return A(e,[{key:"parseDirectives",value:function(t){var r=this.context.src;this.directives=[];for(var s=!0,o=!1,u=t;!y.atDocumentBoundary(r,u,R.DIRECTIVES_END);)switch(u=e.startCommentOrEndBlankLine(r,u),r[u]){case`
|
|
48
|
-
`:if(s){var f=new we;u=f.parse({src:r},u),u<r.length&&this.directives.push(f)}else u+=1,s=!0;break;case"#":{var l=new be;u=l.parse({src:r},u),this.directives.push(l),s=!1}break;case"%":{var c=new wn;u=c.parse({parent:this,src:r},u),this.directives.push(c),o=!0,s=!1}break;default:return o?this.error=new k(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),u}return r[u]?(this.directivesEndMarker=new C(u,u+3),u+3):(o?this.error=new k(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),u)}},{key:"parseContents",value:function(t){var r=this.context,s=r.parseNode,o=r.src;this.contents||(this.contents=[]);for(var u=t;o[u-1]==="-";)u-=1;var f=y.endOfWhiteSpace(o,t),l=u===t;for(this.valueRange=new C(f);!y.atDocumentBoundary(o,f,R.DOCUMENT_END);){switch(o[f]){case`
|
|
49
|
-
`:if(l){var c=new we;f=c.parse({src:o},f),f<o.length&&this.contents.push(c)}else f+=1,l=!0;u=f;break;case"#":{var v=new be;f=v.parse({src:o},f),this.contents.push(v),l=!1}break;default:{var h=y.endOfIndent(o,f),g={atLineStart:l,indent:-1,inFlow:!1,inCollection:!1,lineStart:u,parent:this},d=s(g,h);if(!d)return this.valueRange.end=h;this.contents.push(d),f=d.range.end,l=!1;var w=Xe(d);w&&Array.prototype.push.apply(this.contents,w)}}f=e.startCommentOrEndBlankLine(o,f)}if(this.valueRange.end=f,o[f]&&(this.documentEndMarker=new C(f,f+3),f+=3,o[f])){if(f=y.endOfWhiteSpace(o,f),o[f]==="#"){var m=new be;f=m.parse({src:o},f),this.contents.push(m)}switch(o[f]){case`
|
|
50
|
-
`:f+=1;break;case void 0:break;default:this.error=new $(this,"Document end marker line cannot have a non-comment suffix")}}return f}},{key:"parse",value:function(t,r){t.root=this,this.context=t;var s=t.src,o=s.charCodeAt(r)===65279?r+1:r;return o=this.parseDirectives(o),o=this.parseContents(o),o}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.directives.forEach(function(s){r=s.setOrigRanges(t,r)}),this.directivesEndMarker&&(r=this.directivesEndMarker.setOrigRange(t,r)),this.contents.forEach(function(s){r=s.setOrigRanges(t,r)}),this.documentEndMarker&&(r=this.documentEndMarker.setOrigRange(t,r)),r}},{key:"toString",value:function(){var t=this.contents,r=this.directives,s=this.value;if(s!=null)return s;var o=r.join("");return t.length>0&&((r.length>0||t[0].type===p.COMMENT)&&(o+=`---
|
|
51
|
-
`),o+=t.join("")),o[o.length-1]!==`
|
|
52
|
-
`&&(o+=`
|
|
53
|
-
`),o}}],[{key:"startCommentOrEndBlankLine",value:function(t,r){var s=y.endOfWhiteSpace(t,r),o=t[s];return o==="#"||o===`
|
|
54
|
-
`?s:r}}]),e}(y),Sn=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=y.endOfIdentifier(s,r+1);return this.valueRange=new C(r+1,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}]),e}(y),ae={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},On=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.blockIndent=null,r.chomping=ae.CLIP,r.header=null,r}return A(e,[{key:"includesTrailingLines",get:function(){return this.chomping===ae.KEEP}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=this.valueRange,r=t.start,s=t.end,o=this.context,u=o.indent,f=o.src;if(this.valueRange.isEmpty())return"";for(var l=null,c=f[s-1];c===`
|
|
55
|
-
`||c===" "||c===" ";){if(s-=1,s<=r){if(this.chomping===ae.KEEP)break;return""}c===`
|
|
56
|
-
`&&(l=s),c=f[s-1]}var v=s+1;l&&(this.chomping===ae.KEEP?(v=l,s=this.valueRange.end):s=l);for(var h=u+this.blockIndent,g=this.type===p.BLOCK_FOLDED,d=!0,w="",m="",b=!1,S=r;S<s;++S){for(var P=0;P<h&&f[S]===" ";++P)S+=1;var _=f[S];if(_===`
|
|
57
|
-
`)m===`
|
|
58
|
-
`?w+=`
|
|
59
|
-
`:m=`
|
|
60
|
-
`;else{var O=y.endOfLine(f,S),B=f.slice(S,O);S=O,g&&(_===" "||_===" ")&&S<v?(m===" "?m=`
|
|
61
|
-
`:!b&&!d&&m===`
|
|
62
|
-
`&&(m=`
|
|
63
|
-
|
|
64
|
-
`),w+=m+B,m=O<s&&f[O]||"",b=!0):(w+=m+B,m=g&&S<v?" ":`
|
|
65
|
-
`,b=!1),d&&B!==""&&(d=!1)}}return this.chomping===ae.STRIP?w:w+`
|
|
66
|
-
`}},{key:"parseBlockHeader",value:function(t){for(var r=this.context.src,s=t+1,o="";;){var u=r[s];switch(u){case"-":this.chomping=ae.STRIP;break;case"+":this.chomping=ae.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o+=u;break;default:return this.blockIndent=Number(o)||null,this.header=new C(t,s),s}s+=1}}},{key:"parseBlockValue",value:function(t){for(var r=this.context,s=r.indent,o=r.src,u=!!this.blockIndent,f=t,l=t,c=1,v=o[f];v===`
|
|
67
|
-
`&&(f+=1,!y.atDocumentBoundary(o,f));v=o[f]){var h=y.endOfBlockIndent(o,s,f);if(h===null)break;var g=o[h],d=h-(f+s);if(this.blockIndent){if(g&&g!==`
|
|
68
|
-
`&&d<this.blockIndent){if(o[h]==="#")break;if(!this.error){var m=u?"explicit indentation indicator":"first line",b="Block scalars must not be less indented than their ".concat(m);this.error=new k(this,b)}}}else if(o[h]!==`
|
|
69
|
-
`){if(d<c){var w="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new k(this,w)}this.blockIndent=d}else d>c&&(c=d);o[h]===`
|
|
70
|
-
`?f=h:f=l=y.endOfLine(o,h)}return this.chomping!==ae.KEEP&&(f=o[l]?l+1:l),this.valueRange=new C(t+1,f),f}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=this.parseBlockHeader(r);return o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o=this.parseBlockValue(o),o}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.header?this.header.setOrigRange(t,r):r}}]),e}(y),kn=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.items=null,r}return A(e,[{key:"prevNodeIsJsonLike",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.items.length,r=this.items[t-1];return!!r&&(r.jsonLike||r.type===p.COMMENT&&this.prevNodeIsJsonLike(t-1))}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=t.indent,f=t.lineStart,l=o[r];this.items=[{char:l,offset:r}];var c=y.endOfWhiteSpace(o,r+1);for(l=o[c];l&&l!=="]"&&l!=="}";){switch(l){case`
|
|
71
|
-
`:{f=c+1;var v=y.endOfWhiteSpace(o,f);if(o[v]===`
|
|
72
|
-
`){var h=new we;f=h.parse({src:o},f),this.items.push(h)}if(c=y.endOfIndent(o,f),c<=f+u&&(l=o[c],c<f+u||l!=="]"&&l!=="}")){var g="Insufficient indentation in flow collection";this.error=new k(this,g)}}break;case",":this.items.push({char:l,offset:c}),c+=1;break;case"#":{var d=new be;c=d.parse({src:o},c),this.items.push(d)}break;case"?":case":":{var w=o[c+1];if(w===`
|
|
73
|
-
`||w===" "||w===" "||w===","||l===":"&&this.prevNodeIsJsonLike()){this.items.push({char:l,offset:c}),c+=1;break}}default:{var m=s({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:f,parent:this},c);if(!m)return this.valueRange=new C(r,c),c;this.items.push(m),c=y.normalizeOffset(o,m.range.end)}}c=y.endOfWhiteSpace(o,c),l=o[c]}return this.valueRange=new C(r,c+1),l&&(this.items.push({char:l,offset:c}),c=y.endOfWhiteSpace(o,c+1),c=this.parseComment(c)),c}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.items.forEach(function(s){if(s instanceof y)r=s.setOrigRanges(t,r);else if(t.length===0)s.origOffset=s.offset;else{for(var o=r;o<t.length&&!(t[o]>s.offset);)++o;s.origOffset=s.offset+o,r=o}}),r}},{key:"toString",value:function(){var t=this.context.src,r=this.items,s=this.range,o=this.value;if(o!=null)return o;var u=r.filter(function(c){return c instanceof y}),f="",l=s.start;return u.forEach(function(c){var v=t.slice(l,c.range.start);l=c.range.end,f+=v+String(c),f[f.length-1]===`
|
|
74
|
-
`&&t[l-1]!==`
|
|
75
|
-
`&&t[l]===`
|
|
76
|
-
`&&(l+=1)}),f+=t.slice(l,s.end),y.addStringTerminator(t,s.end,f)}}]),e}(y),En=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=[],r=this.valueRange,s=r.start,o=r.end,u=this.context,f=u.indent,l=u.src;l[o-1]!=='"'&&t.push(new $(this,'Missing closing "quote'));for(var c="",v=s+1;v<o-1;++v){var h=l[v];if(h===`
|
|
77
|
-
`){y.atDocumentBoundary(l,v+1)&&t.push(new k(this,"Document boundary indicators are not allowed within string values"));var g=y.foldNewline(l,v,f),d=g.fold,w=g.offset,m=g.error;c+=d,v=w,m&&t.push(new k(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(h==="\\")switch(v+=1,l[v]){case"0":c+="\0";break;case"a":c+="\x07";break;case"b":c+="\b";break;case"e":c+="\x1B";break;case"f":c+="\f";break;case"n":c+=`
|
|
78
|
-
`;break;case"r":c+="\r";break;case"t":c+=" ";break;case"v":c+="\v";break;case"N":c+="\x85";break;case"_":c+="\xA0";break;case"L":c+="\u2028";break;case"P":c+="\u2029";break;case" ":c+=" ";break;case'"':c+='"';break;case"/":c+="/";break;case"\\":c+="\\";break;case" ":c+=" ";break;case"x":c+=this.parseCharCode(v+1,2,t),v+=2;break;case"u":c+=this.parseCharCode(v+1,4,t),v+=4;break;case"U":c+=this.parseCharCode(v+1,8,t),v+=8;break;case`
|
|
79
|
-
`:for(;l[v+1]===" "||l[v+1]===" ";)v+=1;break;default:t.push(new $(this,"Invalid escape sequence ".concat(l.substr(v-1,2)))),c+="\\"+l[v]}else if(h===" "||h===" "){for(var b=v,S=l[v+1];S===" "||S===" ";)v+=1,S=l[v+1];S!==`
|
|
80
|
-
`&&(c+=v>b?l.slice(b,v+1):h)}else c+=h}return t.length>0?{errors:t,str:c}:c}},{key:"parseCharCode",value:function(t,r,s){var o=this.context.src,u=o.substr(t,r),f=u.length===r&&/^[0-9a-fA-F]+$/.test(u),l=f?parseInt(u,16):NaN;return isNaN(l)?(s.push(new $(this,"Invalid escape sequence ".concat(o.substr(t-2,r+2)))),o.substr(t-2,r+2)):String.fromCodePoint(l)}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=e.endOfQuote(s,r+1);return this.valueRange=new C(r,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}],[{key:"endOfQuote",value:function(t,r){for(var s=t[r];s&&s!=='"';)r+=s==="\\"?2:1,s=t[r];return r+1}}]),e}(y),Nn=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=[],r=this.valueRange,s=r.start,o=r.end,u=this.context,f=u.indent,l=u.src;l[o-1]!=="'"&&t.push(new $(this,"Missing closing 'quote"));for(var c="",v=s+1;v<o-1;++v){var h=l[v];if(h===`
|
|
81
|
-
`){y.atDocumentBoundary(l,v+1)&&t.push(new k(this,"Document boundary indicators are not allowed within string values"));var g=y.foldNewline(l,v,f),d=g.fold,w=g.offset,m=g.error;c+=d,v=w,m&&t.push(new k(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(h==="'")c+=h,v+=1,l[v]!=="'"&&t.push(new $(this,"Unescaped single quote? This should not happen."));else if(h===" "||h===" "){for(var b=v,S=l[v+1];S===" "||S===" ";)v+=1,S=l[v+1];S!==`
|
|
82
|
-
`&&(c+=v>b?l.slice(b,v+1):h)}else c+=h}return t.length>0?{errors:t,str:c}:c}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=e.endOfQuote(s,r+1);return this.valueRange=new C(r,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}],[{key:"endOfQuote",value:function(t,r){for(var s=t[r];s;)if(s==="'"){if(t[r+1]!=="'")break;s=t[r+=2]}else s=t[r+=1];return r+1}}]),e}(y);function Ln(i,n){switch(i){case p.ALIAS:return new Sn(i,n);case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:return new On(i,n);case p.FLOW_MAP:case p.FLOW_SEQ:return new kn(i,n);case p.MAP_KEY:case p.MAP_VALUE:case p.SEQ_ITEM:return new Ze(i,n);case p.COMMENT:case p.PLAIN:return new Ot(i,n);case p.QUOTE_DOUBLE:return new En(i,n);case p.QUOTE_SINGLE:return new Nn(i,n);default:return null}}var An=function(){function i(){var n=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.atLineStart,r=a.inCollection,s=a.inFlow,o=a.indent,u=a.lineStart,f=a.parent;N(this,i),x(this,"parseNode",function(l,c){if(y.atDocumentBoundary(n.src,c))return null;var v=new i(n,l),h=v.parseProps(c),g=h.props,d=h.type,w=h.valueStart,m=Ln(d,g),b=m.parse(v,w);if(m.range=new C(c,b),b<=c&&(m.error=new Error("Node#parse consumed no characters"),m.error.parseEnd=b,m.error.source=m,m.range.end=c+1),v.nodeStartsCollection(m)){!m.error&&!v.atLineStart&&v.parent.type===p.DOCUMENT&&(m.error=new $(m,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var S=new kt(m);return b=S.parse(new i(v),b),S.range=new C(c,b),S}return m}),this.atLineStart=t!=null?t:e.atLineStart||!1,this.inCollection=r!=null?r:e.inCollection||!1,this.inFlow=s!=null?s:e.inFlow||!1,this.indent=o!=null?o:e.indent,this.lineStart=u!=null?u:e.lineStart,this.parent=f!=null?f:e.parent||{},this.root=e.root,this.src=e.src}return A(i,[{key:"nodeStartsCollection",value:function(e){var a=this.inCollection,t=this.inFlow,r=this.src;if(a||t)return!1;if(e instanceof Ze)return!0;var s=e.range.end;return r[s]===`
|
|
83
|
-
`||r[s-1]===`
|
|
84
|
-
`?!1:(s=y.endOfWhiteSpace(r,s),r[s]===":")}},{key:"parseProps",value:function(e){var a=this.inFlow,t=this.parent,r=this.src,s=[],o=!1;e=this.atLineStart?y.endOfIndent(r,e):y.endOfWhiteSpace(r,e);for(var u=r[e];u===R.ANCHOR||u===R.COMMENT||u===R.TAG||u===`
|
|
85
|
-
`;){if(u===`
|
|
86
|
-
`){var f=e,l=void 0;do l=f+1,f=y.endOfIndent(r,l);while(r[f]===`
|
|
87
|
-
`);var c=f-(l+this.indent),v=t.type===p.SEQ_ITEM&&t.context.atLineStart;if(r[f]!=="#"&&!y.nextNodeIsIndented(r[f],c,!v))break;this.atLineStart=!0,this.lineStart=l,o=!1,e=f}else if(u===R.COMMENT){var h=y.endOfLine(r,e+1);s.push(new C(e,h)),e=h}else{var g=y.endOfIdentifier(r,e+1);u===R.TAG&&r[g]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(r.slice(e+1,g+13))&&(g=y.endOfIdentifier(r,g+5)),s.push(new C(e,g)),o=!0,e=y.endOfWhiteSpace(r,g)}u=r[e]}o&&u===":"&&y.atBlank(r,e+1,!0)&&(e-=1);var d=i.parseType(r,e,a);return{props:s,type:d,valueStart:e}}}],[{key:"parseType",value:function(e,a,t){switch(e[a]){case"*":return p.ALIAS;case">":return p.BLOCK_FOLDED;case"|":return p.BLOCK_LITERAL;case"{":return p.FLOW_MAP;case"[":return p.FLOW_SEQ;case"?":return!t&&y.atBlank(e,a+1,!0)?p.MAP_KEY:p.PLAIN;case":":return!t&&y.atBlank(e,a+1,!0)?p.MAP_VALUE:p.PLAIN;case"-":return!t&&y.atBlank(e,a+1,!0)?p.SEQ_ITEM:p.PLAIN;case'"':return p.QUOTE_DOUBLE;case"'":return p.QUOTE_SINGLE;default:return p.PLAIN}}}]),i}();function et(i){var n=[];i.indexOf("\r")!==-1&&(i=i.replace(/\r\n?/g,function(s,o){return s.length>1&&n.push(o),`
|
|
88
|
-
`}));var e=[],a=0;do{var t=new bn,r=new An({src:i});a=t.parse(r,a),e.push(t)}while(a<i.length);return e.setOrigRanges=function(){if(n.length===0)return!1;for(var s=1;s<n.length;++s)n[s]-=s;for(var o=0,u=0;u<e.length;++u)o=e[u].setOrigRanges(n,o);return n.splice(0,n.length),!0},e.toString=function(){return e.join(`...
|
|
89
|
-
`)},e}function Mn(i,n,e){if(!e)return i;var a=e.replace(/[\s\S]^/gm,"$&".concat(n,"#"));return"#".concat(a,`
|
|
90
|
-
`).concat(n).concat(i)}function ce(i,n,e){return e?e.indexOf(`
|
|
91
|
-
`)===-1?"".concat(i," #").concat(e):"".concat(i,`
|
|
92
|
-
`)+e.replace(/^/gm,"".concat(n||"","#")):i}var U=function i(){N(this,i)};function H(i,n,e){if(Array.isArray(i))return i.map(function(r,s){return H(r,String(s),e)});if(i&&typeof i.toJSON=="function"){var a=e&&e.anchors&&e.anchors.get(i);a&&(e.onCreate=function(r){a.res=r,delete e.onCreate});var t=i.toJSON(n,e);return a&&e.onCreate&&e.onCreate(t),t}return(!e||!e.keep)&&typeof i=="bigint"?Number(i):i}var L=function(i){M(e,i);var n=I(e);function e(a){var t;return N(this,e),t=n.call(this),t.value=a,t}return A(e,[{key:"toJSON",value:function(t,r){return r&&r.keep?this.value:H(this.value,t,r)}},{key:"toString",value:function(){return String(this.value)}}]),e}(U);function Et(i,n,e){for(var a=e,t=n.length-1;t>=0;--t){var r=n[t];if(Number.isInteger(r)&&r>=0){var s=[];s[r]=a,a=s}else{var o={};Object.defineProperty(o,r,{value:a,writable:!0,enumerable:!0,configurable:!0}),a=o}}return i.createNode(a,!1)}var Se=function(n){return n==null||J(n)==="object"&&n[Symbol.iterator]().next().done},W=function(i){M(e,i);var n=I(e);function e(a){var t;return N(this,e),t=n.call(this),x(q(t),"items",[]),t.schema=a,t}return A(e,[{key:"addIn",value:function(t,r){if(Se(t))this.add(r);else{var s=ye(t),o=s[0],u=s.slice(1),f=this.get(o,!0);if(f instanceof e)f.addIn(u,r);else if(f===void 0&&this.schema)this.set(o,Et(this.schema,u,r));else throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(u))}}},{key:"deleteIn",value:function(t){var r=ye(t),s=r[0],o=r.slice(1);if(o.length===0)return this.delete(s);var u=this.get(s,!0);if(u instanceof e)return u.deleteIn(o);throw new Error("Expected YAML collection at ".concat(s,". Remaining path: ").concat(o))}},{key:"getIn",value:function(t,r){var s=ye(t),o=s[0],u=s.slice(1),f=this.get(o,!0);return u.length===0?!r&&f instanceof L?f.value:f:f instanceof e?f.getIn(u,r):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every(function(t){if(!t||t.type!=="PAIR")return!1;var r=t.value;return r==null||r instanceof L&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}},{key:"hasIn",value:function(t){var r=ye(t),s=r[0],o=r.slice(1);if(o.length===0)return this.has(s);var u=this.get(s,!0);return u instanceof e?u.hasIn(o):!1}},{key:"setIn",value:function(t,r){var s=ye(t),o=s[0],u=s.slice(1);if(u.length===0)this.set(o,r);else{var f=this.get(o,!0);if(f instanceof e)f.setIn(u,r);else if(f===void 0&&this.schema)this.set(o,Et(this.schema,u,r));else throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(u))}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(t,r,s,o){var u=this,f=r.blockItem,l=r.flowChars,c=r.isMap,v=r.itemIndent,h=t,g=h.indent,d=h.indentStep,w=h.stringify,m=this.type===p.FLOW_MAP||this.type===p.FLOW_SEQ||t.inFlow;m&&(v+=d);var b=c&&this.hasAllNullValues();t=Object.assign({},t,{allNullValues:b,indent:v,inFlow:m,type:null});var S=!1,P=!1,_=this.items.reduce(function(G,D,kr){var qe;D&&(!S&&D.spaceBefore&&G.push({type:"comment",str:""}),D.commentBefore&&D.commentBefore.match(/^.*$/gm).forEach(function(Er){G.push({type:"comment",str:"#".concat(Er)})}),D.comment&&(qe=D.comment),m&&(!S&&D.spaceBefore||D.commentBefore||D.comment||D.key&&(D.key.commentBefore||D.key.comment)||D.value&&(D.value.commentBefore||D.value.comment))&&(P=!0)),S=!1;var Me=w(D,t,function(){return qe=null},function(){return S=!0});return m&&!P&&Me.includes(`
|
|
93
|
-
`)&&(P=!0),m&&kr<u.items.length-1&&(Me+=","),Me=ce(Me,v,qe),S&&(qe||m)&&(S=!1),G.push({type:"item",str:Me}),G},[]),O;if(_.length===0)O=l.start+l.end;else if(m){var B=l.start,j=l.end,V=_.map(function(G){return G.str});if(P||V.reduce(function(G,D){return G+D.length+2},2)>e.maxFlowStringSingleLineLength){O=B;var Y=T(V),Z;try{for(Y.s();!(Z=Y.n()).done;){var Je=Z.value;O+=Je?`
|
|
94
|
-
`.concat(d).concat(g).concat(Je):`
|
|
95
|
-
`}}catch(G){Y.e(G)}finally{Y.f()}O+=`
|
|
96
|
-
`.concat(g).concat(j)}else O="".concat(B," ").concat(V.join(" ")," ").concat(j)}else{var ln=_.map(f);O=ln.shift();var Ve=T(ln),cn;try{for(Ve.s();!(cn=Ve.n()).done;){var vn=cn.value;O+=vn?`
|
|
97
|
-
`.concat(g).concat(vn):`
|
|
98
|
-
`}}catch(G){Ve.e(G)}finally{Ve.f()}}return this.comment?(O+=`
|
|
99
|
-
`+this.comment.replace(/^/gm,"".concat(g,"#")),s&&s()):S&&o&&o(),O}}]),e}(U);x(W,"maxFlowStringSingleLineLength",60);function _e(i){var n=i instanceof L?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),Number.isInteger(n)&&n>=0?n:null}var z=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"add",value:function(t){this.items.push(t)}},{key:"delete",value:function(t){var r=_e(t);if(typeof r!="number")return!1;var s=this.items.splice(r,1);return s.length>0}},{key:"get",value:function(t,r){var s=_e(t);if(typeof s=="number"){var o=this.items[s];return!r&&o instanceof L?o.value:o}}},{key:"has",value:function(t){var r=_e(t);return typeof r=="number"&&r<this.items.length}},{key:"set",value:function(t,r){var s=_e(t);if(typeof s!="number")throw new Error("Expected a valid index, not ".concat(t,"."));this.items[s]=r}},{key:"toJSON",value:function(t,r){var s=[];r&&r.onCreate&&r.onCreate(s);var o=0,u=T(this.items),f;try{for(u.s();!(f=u.n()).done;){var l=f.value;s.push(H(l,String(o++),r))}}catch(c){u.e(c)}finally{u.f()}return s}},{key:"toString",value:function(t,r,s){return t?Q(F(e.prototype),"toString",this).call(this,t,{blockItem:function(u){return u.type==="comment"?u.str:"- ".concat(u.str)},flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(t.indent||"")+" "},r,s):JSON.stringify(this)}}]),e}(W),In=function(n,e,a){return e===null?"":J(e)!=="object"?String(e):n instanceof U&&a&&a.doc?n.toString({anchors:Object.create(null),doc:a.doc,indent:"",indentStep:a.indentStep,inFlow:!0,inStringifyKey:!0,stringify:a.stringify}):JSON.stringify(e)},E=function(i){M(e,i);var n=I(e);function e(a){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return N(this,e),t=n.call(this),t.key=a,t.value=r,t.type=e.Type.PAIR,t}return A(e,[{key:"commentBefore",get:function(){return this.key instanceof U?this.key.commentBefore:void 0},set:function(t){if(this.key==null&&(this.key=new L(null)),this.key instanceof U)this.key.commentBefore=t;else{var r="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(r)}}},{key:"addToJSMap",value:function(t,r){var s=H(this.key,"",t);if(r instanceof Map){var o=H(this.value,s,t);r.set(s,o)}else if(r instanceof Set)r.add(s);else{var u=In(this.key,s,t),f=H(this.value,u,t);u in r?Object.defineProperty(r,u,{value:f,writable:!0,enumerable:!0,configurable:!0}):r[u]=f}return r}},{key:"toJSON",value:function(t,r){var s=r&&r.mapAsMap?new Map:{};return this.addToJSMap(r,s)}},{key:"toString",value:function(t,r,s){if(!t||!t.doc)return JSON.stringify(this);var o=t.doc.options,u=o.indent,f=o.indentSeq,l=o.simpleKeys,c=this.key,v=this.value,h=c instanceof U&&c.comment;if(l){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(c instanceof W){var g="With simple keys, collection cannot be used as a key value";throw new Error(g)}}var d=!l&&(!c||h||(c instanceof U?c instanceof W||c.type===p.BLOCK_FOLDED||c.type===p.BLOCK_LITERAL:J(c)==="object")),w=t,m=w.doc,b=w.indent,S=w.indentStep,P=w.stringify;t=Object.assign({},t,{implicitKey:!d,indent:b+S});var _=!1,O=P(c,t,function(){return h=null},function(){return _=!0});if(O=ce(O,t.indent,h),!d&&O.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.allNullValues&&!l)return this.comment?(O=ce(O,t.indent,this.comment),r&&r()):_&&!h&&s&&s(),t.inFlow&&!d?O:"? ".concat(O);O=d?"? ".concat(O,`
|
|
100
|
-
`).concat(b,":"):"".concat(O,":"),this.comment&&(O=ce(O,t.indent,this.comment),r&&r());var B="",j=null;if(v instanceof U){if(v.spaceBefore&&(B=`
|
|
101
|
-
`),v.commentBefore){var V=v.commentBefore.replace(/^/gm,"".concat(t.indent,"#"));B+=`
|
|
102
|
-
`.concat(V)}j=v.comment}else v&&J(v)==="object"&&(v=m.schema.createNode(v,!0));t.implicitKey=!1,!d&&!this.comment&&v instanceof L&&(t.indentAtStart=O.length+1),_=!1,!f&&u>=2&&!t.inFlow&&!d&&v instanceof z&&v.type!==p.FLOW_SEQ&&!v.tag&&!m.anchors.getName(v)&&(t.indent=t.indent.substr(2));var Y=P(v,t,function(){return j=null},function(){return _=!0}),Z=" ";if(B||this.comment)Z="".concat(B,`
|
|
103
|
-
`).concat(t.indent);else if(!d&&v instanceof W){var Je=Y[0]==="["||Y[0]==="{";(!Je||Y.includes(`
|
|
104
|
-
`))&&(Z=`
|
|
105
|
-
`.concat(t.indent))}else Y[0]===`
|
|
106
|
-
`&&(Z="");return _&&!j&&s&&s(),ce(O+Z+Y,t.indent,j)}}]),e}(U);x(E,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Tn=function i(n,e){if(n instanceof X){var a=e.get(n.source);return a.count*a.aliasCount}else if(n instanceof W){var t=0,r=T(n.items),s;try{for(r.s();!(s=r.n()).done;){var o=s.value,u=i(o,e);u>t&&(t=u)}}catch(c){r.e(c)}finally{r.f()}return t}else if(n instanceof E){var f=i(n.key,e),l=i(n.value,e);return Math.max(f,l)}return 1},X=function(i){M(e,i);var n=I(e);function e(a){var t;return N(this,e),t=n.call(this),t.source=a,t.type=p.ALIAS,t}return A(e,[{key:"tag",set:function(t){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(t,r){if(!r)return H(this.source,t,r);var s=r.anchors,o=r.maxAliasCount,u=s.get(this.source);if(!u||u.res===void 0){var f="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new me(this.cstNode,f):new ReferenceError(f)}if(o>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Tn(this.source,s)),u.count*u.aliasCount>o)){var l="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new me(this.cstNode,l):new ReferenceError(l)}return u.res}},{key:"toString",value:function(t){return e.stringify(this,t)}}],[{key:"stringify",value:function(t,r){var s=t.range,o=t.source,u=r.anchors,f=r.doc,l=r.implicitKey,c=r.inStringifyKey,v=Object.keys(u).find(function(g){return u[g]===o});if(!v&&c&&(v=f.anchors.getName(o)||f.anchors.newName()),v)return"*".concat(v).concat(l?" ":"");var h=f.anchors.getName(o)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(h," [").concat(s,"]"))}}]),e}(U);x(X,"default",!0);function oe(i,n){var e=n instanceof L?n.value:n,a=T(i),t;try{for(a.s();!(t=a.n()).done;){var r=t.value;if(r instanceof E&&(r.key===n||r.key===e||r.key&&r.key.value===e))return r}}catch(s){a.e(s)}finally{a.f()}}var K=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"add",value:function(t,r){t?t instanceof E||(t=new E(t.key||t,t.value)):t=new E(t);var s=oe(this.items,t.key),o=this.schema&&this.schema.sortMapEntries;if(s)if(r)s.value=t.value;else throw new Error("Key ".concat(t.key," already set"));else if(o){var u=this.items.findIndex(function(f){return o(t,f)<0});u===-1?this.items.push(t):this.items.splice(u,0,t)}else this.items.push(t)}},{key:"delete",value:function(t){var r=oe(this.items,t);if(!r)return!1;var s=this.items.splice(this.items.indexOf(r),1);return s.length>0}},{key:"get",value:function(t,r){var s=oe(this.items,t),o=s&&s.value;return!r&&o instanceof L?o.value:o}},{key:"has",value:function(t){return!!oe(this.items,t)}},{key:"set",value:function(t,r){this.add(new E(t,r),!0)}},{key:"toJSON",value:function(t,r,s){var o=s?new s:r&&r.mapAsMap?new Map:{};r&&r.onCreate&&r.onCreate(o);var u=T(this.items),f;try{for(u.s();!(f=u.n()).done;){var l=f.value;l.addToJSMap(r,o)}}catch(c){u.e(c)}finally{u.f()}return o}},{key:"toString",value:function(t,r,s){if(!t)return JSON.stringify(this);var o=T(this.items),u;try{for(o.s();!(u=o.n()).done;){var f=u.value;if(!(f instanceof E))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(f)," instead"))}}catch(l){o.e(l)}finally{o.f()}return Q(F(e.prototype),"toString",this).call(this,t,{blockItem:function(c){return c.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:t.indent||""},r,s)}}]),e}(W),Nt="<<",Lt=function(i){M(e,i);var n=I(e);function e(a){var t;if(N(this,e),a instanceof E){var r=a.value;r instanceof z||(r=new z,r.items.push(a.value),r.range=a.value.range),t=n.call(this,a.key,r),t.range=a.range}else t=n.call(this,new L(Nt),new z);return t.type=E.Type.MERGE_PAIR,dt(t)}return A(e,[{key:"addToJSMap",value:function(t,r){var s=T(this.value.items),o;try{for(s.s();!(o=s.n()).done;){var u=o.value.source;if(!(u instanceof K))throw new Error("Merge sources must be maps");var f=u.toJSON(null,t,Map),l=T(f),c;try{for(l.s();!(c=l.n()).done;){var v=de(c.value,2),h=v[0],g=v[1];r instanceof Map?r.has(h)||r.set(h,g):r instanceof Set?r.add(h):Object.prototype.hasOwnProperty.call(r,h)||Object.defineProperty(r,h,{value:g,writable:!0,enumerable:!0,configurable:!0})}}catch(d){l.e(d)}finally{l.f()}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"toString",value:function(t,r){var s=this.value;if(s.items.length>1)return Q(F(e.prototype),"toString",this).call(this,t,r);this.value=s.items[0];var o=Q(F(e.prototype),"toString",this).call(this,t,r);return this.value=s,o}}]),e}(E),Oe={defaultType:p.BLOCK_LITERAL,lineWidth:76},ee={trueStr:"true",falseStr:"false"},ie={asBigInt:!1},ve={nullStr:"null"},te={defaultType:p.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function tt(i,n,e){var a=T(n),t;try{for(a.s();!(t=a.n()).done;){var r=t.value,s=r.format,o=r.test,u=r.resolve;if(o){var f=i.match(o);if(f){var l=u.apply(null,f);return l instanceof L||(l=new L(l)),s&&(l.format=s),l}}}}catch(c){a.e(c)}finally{a.f()}return e&&(i=e(i)),new L(i)}var At="flow",nt="block",Pe="quoted",Mt=function(n,e){for(var a=n[e+1];a===" "||a===" ";){do a=n[e+=1];while(a&&a!==`
|
|
107
|
-
`);a=n[e+1]}return e};function Ce(i,n,e,a){var t=a.indentAtStart,r=a.lineWidth,s=r===void 0?80:r,o=a.minContentWidth,u=o===void 0?20:o,f=a.onFold,l=a.onOverflow;if(!s||s<0)return i;var c=Math.max(1+u,1+s-n.length);if(i.length<=c)return i;var v=[],h={},g=s-n.length;typeof t=="number"&&(t>s-Math.max(2,u)?v.push(0):g=s-t);var d=void 0,w=void 0,m=!1,b=-1,S=-1,P=-1;e===nt&&(b=Mt(i,b),b!==-1&&(g=b+c));for(var _;_=i[b+=1];){if(e===Pe&&_==="\\"){switch(S=b,i[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}P=b}if(_===`
|
|
108
|
-
`)e===nt&&(b=Mt(i,b)),g=b+c,d=void 0;else{if(_===" "&&w&&w!==" "&&w!==`
|
|
109
|
-
`&&w!==" "){var O=i[b+1];O&&O!==" "&&O!==`
|
|
110
|
-
`&&O!==" "&&(d=b)}if(b>=g)if(d)v.push(d),g=d+c,d=void 0;else if(e===Pe){for(;w===" "||w===" ";)w=_,_=i[b+=1],m=!0;var B=b>P+1?b-2:S-1;if(h[B])return i;v.push(B),h[B]=!0,g=B+c,d=void 0}else m=!0}w=_}if(m&&l&&l(),v.length===0)return i;f&&f();for(var j=i.slice(0,v[0]),V=0;V<v.length;++V){var Y=v[V],Z=v[V+1]||i.length;Y===0?j=`
|
|
111
|
-
`.concat(n).concat(i.slice(0,Z)):(e===Pe&&h[Y]&&(j+="".concat(i[Y],"\\")),j+=`
|
|
112
|
-
`.concat(n).concat(i.slice(Y+1,Z)))}return j}var rt=function(n){var e=n.indentAtStart;return e?Object.assign({indentAtStart:e},te.fold):te.fold},Re=function(n){return/^(%|---|\.\.\.)/m.test(n)};function _n(i,n,e){if(!n||n<0)return!1;var a=n-e,t=i.length;if(t<=a)return!1;for(var r=0,s=0;r<t;++r)if(i[r]===`
|
|
113
|
-
`){if(r-s>a)return!0;if(s=r+1,t-s<=a)return!1}return!0}function ue(i,n){var e=n.implicitKey,a=te.doubleQuoted,t=a.jsonEncoding,r=a.minMultiLineLength,s=JSON.stringify(i);if(t)return s;for(var o=n.indent||(Re(i)?" ":""),u="",f=0,l=0,c=s[l];c;c=s[++l])if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n"&&(u+=s.slice(f,l)+"\\ ",l+=1,f=l,c="\\"),c==="\\")switch(s[l+1]){case"u":{u+=s.slice(f,l);var v=s.substr(l+2,4);switch(v){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:v.substr(0,2)==="00"?u+="\\x"+v.substr(2):u+=s.substr(l,6)}l+=5,f=l+1}break;case"n":if(e||s[l+2]==='"'||s.length<r)l+=1;else{for(u+=s.slice(f,l)+`
|
|
114
|
-
|
|
115
|
-
`;s[l+2]==="\\"&&s[l+3]==="n"&&s[l+4]!=='"';)u+=`
|
|
116
|
-
`,l+=2;u+=o,s[l+2]===" "&&(u+="\\"),l+=1,f=l+1}break;default:l+=1}return u=f?u+s.slice(f):s,e?u:Ce(u,o,Pe,rt(n))}function It(i,n){if(n.implicitKey){if(/\n/.test(i))return ue(i,n)}else if(/[ \t]\n|\n[ \t]/.test(i))return ue(i,n);var e=n.indent||(Re(i)?" ":""),a="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
117
|
-
`.concat(e))+"'";return n.implicitKey?a:Ce(a,e,At,rt(n))}function Be(i,n,e,a){var t=i.comment,r=i.type,s=i.value;if(/\n[\t ]+$/.test(s)||/^\s*$/.test(s))return ue(s,n);var o=n.indent||(n.forceBlockIndent||Re(s)?" ":""),u=o?"2":"1",f=r===p.BLOCK_FOLDED?!1:r===p.BLOCK_LITERAL?!0:!_n(s,te.fold.lineWidth,o.length),l=f?"|":">";if(!s)return l+`
|
|
118
|
-
`;var c="",v="";if(s=s.replace(/[\n\t ]*$/,function(g){var d=g.indexOf(`
|
|
119
|
-
`);return d===-1?l+="-":(s===g||d!==g.length-1)&&(l+="+",a&&a()),v=g.replace(/\n$/,""),""}).replace(/^[\n ]*/,function(g){g.indexOf(" ")!==-1&&(l+=u);var d=g.match(/ +$/);return d?(c=g.slice(0,-d[0].length),d[0]):(c=g,"")}),v&&(v=v.replace(/\n+(?!\n|$)/g,"$&".concat(o))),c&&(c=c.replace(/\n+/g,"$&".concat(o))),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),e&&e()),!s)return"".concat(l).concat(u,`
|
|
120
|
-
`).concat(o).concat(v);if(f)return s=s.replace(/\n+/g,"$&".concat(o)),"".concat(l,`
|
|
121
|
-
`).concat(o).concat(c).concat(s).concat(v);s=s.replace(/\n+/g,`
|
|
122
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(o));var h=Ce("".concat(c).concat(s).concat(v),o,nt,te.fold);return"".concat(l,`
|
|
123
|
-
`).concat(o).concat(h)}function Pn(i,n,e,a){var t=i.comment,r=i.type,s=i.value,o=n.actualString,u=n.implicitKey,f=n.indent,l=n.inFlow;if(u&&/[\n[\]{},]/.test(s)||l&&/[[\]{},]/.test(s))return ue(s,n);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return u||l||s.indexOf(`
|
|
124
|
-
`)===-1?s.indexOf('"')!==-1&&s.indexOf("'")===-1?It(s,n):ue(s,n):Be(i,n,e,a);if(!u&&!l&&r!==p.PLAIN&&s.indexOf(`
|
|
125
|
-
`)!==-1)return Be(i,n,e,a);if(f===""&&Re(s))return n.forceBlockIndent=!0,Be(i,n,e,a);var c=s.replace(/\n+/g,`$&
|
|
126
|
-
`.concat(f));if(o){var v=n.doc.schema.tags,h=tt(c,v,v.scalarFallback).value;if(typeof h!="string")return ue(s,n)}var g=u?c:Ce(c,f,At,rt(n));return t&&!l&&(g.indexOf(`
|
|
127
|
-
`)!==-1||t.indexOf(`
|
|
128
|
-
`)!==-1)?(e&&e(),Mn(g,f,t)):g}function at(i,n,e,a){var t=te.defaultType,r=n.implicitKey,s=n.inFlow,o=i,u=o.type,f=o.value;typeof f!="string"&&(f=String(f),i=Object.assign({},i,{value:f}));var l=function(h){switch(h){case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:return Be(i,n,e,a);case p.QUOTE_DOUBLE:return ue(f,n);case p.QUOTE_SINGLE:return It(f,n);case p.PLAIN:return Pn(i,n,e,a);default:return null}};(u!==p.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(f)||(r||s)&&(u===p.BLOCK_FOLDED||u===p.BLOCK_LITERAL))&&(u=p.QUOTE_DOUBLE);var c=l(u);if(c===null&&(c=l(t),c===null))throw new Error("Unsupported default string type ".concat(t));return c}function ne(i){var n=i.format,e=i.minFractionDigits,a=i.tag,t=i.value;if(typeof t=="bigint")return String(t);if(!isFinite(t))return isNaN(t)?".nan":t<0?"-.inf":".inf";var r=JSON.stringify(t);if(!n&&e&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(r)){var s=r.indexOf(".");s<0&&(s=r.length,r+=".");for(var o=e-(r.length-s-1);o-- >0;)r+="0"}return r}function Tt(i,n){var e,a;switch(n.type){case p.FLOW_MAP:e="}",a="flow map";break;case p.FLOW_SEQ:e="]",a="flow sequence";break;default:i.push(new k(n,"Not a flow collection!?"));return}for(var t,r=n.items.length-1;r>=0;--r){var s=n.items[r];if(!s||s.type!==p.COMMENT){t=s;break}}if(t&&t.char!==e){var o="Expected ".concat(a," to end with ").concat(e),u;typeof t.offset=="number"?(u=new k(n,o),u.offset=t.offset+1):(u=new k(t,o),t.range&&t.range.end&&(u.offset=t.range.end-t.range.start)),i.push(u)}}function _t(i,n){var e=n.context.src[n.range.start-1];if(e!==`
|
|
129
|
-
`&&e!==" "&&e!==" "){var a="Comments must be separated from other tokens by white space characters";i.push(new k(n,a))}}function Pt(i,n){var e=String(n),a=e.substr(0,8)+"..."+e.substr(-8);return new k(i,'The "'.concat(a,'" key is too long'))}function Ct(i,n){var e=T(n),a;try{for(e.s();!(a=e.n()).done;){var t=a.value,r=t.afterKey,s=t.before,o=t.comment,u=i.items[s];u?(r&&u.value&&(u=u.value),o===void 0?(r||!u.commentBefore)&&(u.spaceBefore=!0):u.commentBefore?u.commentBefore+=`
|
|
130
|
-
`+o:u.commentBefore=o):o!==void 0&&(i.comment?i.comment+=`
|
|
131
|
-
`+o:i.comment=o)}}catch(f){e.e(f)}finally{e.f()}}function ke(i,n){var e=n.strValue;return e?typeof e=="string"?e:(e.errors.forEach(function(a){a.source||(a.source=n),i.errors.push(a)}),e.str):""}function Cn(i,n){var e=n.tag,a=e.handle,t=e.suffix,r=i.tagPrefixes.find(function(u){return u.handle===a});if(!r){var s=i.getDefaults().tagPrefixes;if(s&&(r=s.find(function(u){return u.handle===a})),!r)throw new k(n,"The ".concat(a," tag handle is non-default and was not declared."))}if(!t)throw new k(n,"The ".concat(a," tag has no suffix."));if(a==="!"&&(i.version||i.options.version)==="1.0"){if(t[0]==="^")return i.warnings.push(new le(n,"YAML 1.0 ^ tag expansion is not supported")),t;if(/[:/]/.test(t)){var o=t.match(/^([a-z0-9-]+)\/(.*)/i);return o?"tag:".concat(o[1],".yaml.org,2002:").concat(o[2]):"tag:".concat(t)}}return r.prefix+decodeURIComponent(t)}function Rn(i,n){var e=n.tag,a=n.type,t=!1;if(e){var r=e.handle,s=e.suffix,o=e.verbatim;if(o){if(o!=="!"&&o!=="!!")return o;var u="Verbatim tags aren't resolved, so ".concat(o," is invalid.");i.errors.push(new k(n,u))}else if(r==="!"&&!s)t=!0;else try{return Cn(i,n)}catch(f){i.errors.push(f)}}switch(a){case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:case p.QUOTE_DOUBLE:case p.QUOTE_SINGLE:return re.STR;case p.FLOW_MAP:case p.MAP:return re.MAP;case p.FLOW_SEQ:case p.SEQ:return re.SEQ;case p.PLAIN:return t?re.STR:null;default:return null}}function Rt(i,n,e){var a=i.schema.tags,t=[],r=T(a),s;try{for(r.s();!(s=r.n()).done;){var o=s.value;if(o.tag===e)if(o.test)t.push(o);else{var u=o.resolve(i,n);return u instanceof W?u:new L(u)}}}catch(l){r.e(l)}finally{r.f()}var f=ke(i,n);return typeof f=="string"&&t.length>0?tt(f,t,a.scalarFallback):null}function Bn(i){var n=i.type;switch(n){case p.FLOW_MAP:case p.MAP:return re.MAP;case p.FLOW_SEQ:case p.SEQ:return re.SEQ;default:return re.STR}}function Dn(i,n,e){try{var a=Rt(i,n,e);if(a)return e&&n.tag&&(a.tag=e),a}catch(u){return u.source||(u.source=n),i.errors.push(u),null}try{var t=Bn(n);if(!t)throw new Error("The tag ".concat(e," is unavailable"));var r="The tag ".concat(e," is unavailable, falling back to ").concat(t);i.warnings.push(new le(n,r));var s=Rt(i,n,t);return s.tag=e,s}catch(u){var o=new me(n,u.message);return o.stack=u.stack,i.errors.push(o),null}}var Fn=function(n){if(!n)return!1;var e=n.type;return e===p.MAP_KEY||e===p.MAP_VALUE||e===p.SEQ_ITEM};function Wn(i,n){var e={before:[],after:[]},a=!1,t=!1,r=Fn(n.context.parent)?n.context.parent.props.concat(n.props):n.props,s=T(r),o;try{for(s.s();!(o=s.n()).done;){var u=o.value,f=u.start,l=u.end;switch(n.context.src[f]){case R.COMMENT:{if(!n.commentHasRequiredWhitespace(f)){var c="Comments must be separated from other tokens by white space characters";i.push(new k(n,c))}var v=n.header,h=n.valueRange,g=h&&(f>h.start||v&&f>v.start)?e.after:e.before;g.push(n.context.src.slice(f+1,l));break}case R.ANCHOR:if(a){var d="A node can have at most one anchor";i.push(new k(n,d))}a=!0;break;case R.TAG:if(t){var w="A node can have at most one tag";i.push(new k(n,w))}t=!0;break}}}catch(m){s.e(m)}finally{s.f()}return{comments:e,hasAnchor:a,hasTag:t}}function jn(i,n){var e=i.anchors,a=i.errors,t=i.schema;if(n.type===p.ALIAS){var r=n.rawValue,s=e.getNode(r);if(!s){var o="Aliased anchor not found: ".concat(r);return a.push(new me(n,o)),null}var u=new X(s);return e._cstAliases.push(u),u}var f=Rn(i,n);if(f)return Dn(i,n,f);if(n.type!==p.PLAIN){var l="Failed to resolve ".concat(n.type," node here");return a.push(new $(n,l)),null}try{var c=ke(i,n);return tt(c,t.tags,t.tags.scalarFallback)}catch(v){return v.source||(v.source=n),a.push(v),null}}function se(i,n){if(!n)return null;n.error&&i.errors.push(n.error);var e=Wn(i.errors,n),a=e.comments,t=e.hasAnchor,r=e.hasTag;if(t){var s=i.anchors,o=n.anchor,u=s.getNode(o);u&&(s.map[s.newName(o)]=u),s.map[o]=n}if(n.type===p.ALIAS&&(t||r)){var f="An alias node must not specify any properties";i.errors.push(new k(n,f))}var l=jn(i,n);if(l){l.range=[n.range.start,n.range.end],i.options.keepCstNodes&&(l.cstNode=n),i.options.keepNodeTypes&&(l.type=n.type);var c=a.before.join(`
|
|
132
|
-
`);c&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,`
|
|
133
|
-
`).concat(c):c);var v=a.after.join(`
|
|
134
|
-
`);v&&(l.comment=l.comment?"".concat(l.comment,`
|
|
135
|
-
`).concat(v):v)}return n.resolved=l}function Bt(i,n){if(n.type!==p.MAP&&n.type!==p.FLOW_MAP){var e="A ".concat(n.type," node cannot be resolved as a mapping");return i.errors.push(new $(n,e)),null}var a=n.type===p.FLOW_MAP?Qn(i,n):Yn(i,n),t=a.comments,r=a.items,s=new K;s.items=r,Ct(s,t);for(var o=!1,u=0;u<r.length;++u){var f=r[u].key;if(f instanceof W&&(o=!0),i.schema.merge&&f&&f.value===Nt){r[u]=new Lt(r[u]);var l=r[u].value.items,c=null;l.some(function(w){if(w instanceof X){var m=w.source.type;return m===p.MAP||m===p.FLOW_MAP?!1:c="Merge nodes aliases can only point to maps"}return c="Merge nodes can only have Alias nodes as values"}),c&&i.errors.push(new k(n,c))}else for(var v=u+1;v<r.length;++v){var h=r[v].key;if(f===h||f&&h&&Object.prototype.hasOwnProperty.call(f,"value")&&f.value===h.value){var g='Map keys must be unique; "'.concat(f,'" is repeated');i.errors.push(new k(n,g));break}}}if(o&&!i.options.mapAsMap){var d="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";i.warnings.push(new le(n,d))}return n.resolved=s,s}var xn=function(n){var e=n.context,a=e.lineStart,t=e.node,r=e.src,s=n.props;if(s.length===0)return!1;var o=s[0].start;if(t&&o>t.valueRange.start||r[o]!==R.COMMENT)return!1;for(var u=a;u<o;++u)if(r[u]===`
|
|
136
|
-
`)return!1;return!0};function $n(i,n){if(!!xn(i)){var e=i.getPropValue(0,R.COMMENT,!0),a=!1,t=n.value.commentBefore;if(t&&t.startsWith(e))n.value.commentBefore=t.substr(e.length+1),a=!0;else{var r=n.value.comment;!i.node&&r&&r.startsWith(e)&&(n.value.comment=r.substr(e.length+1),a=!0)}a&&(n.comment=e)}}function Yn(i,n){for(var e=[],a=[],t=void 0,r=null,s=0;s<n.items.length;++s){var o=n.items[s];switch(o.type){case p.BLANK_LINE:e.push({afterKey:!!t,before:a.length});break;case p.COMMENT:e.push({afterKey:!!t,before:a.length,comment:o.comment});break;case p.MAP_KEY:t!==void 0&&a.push(new E(t)),o.error&&i.errors.push(o.error),t=se(i,o.node),r=null;break;case p.MAP_VALUE:{if(t===void 0&&(t=null),o.error&&i.errors.push(o.error),!o.context.atLineStart&&o.node&&o.node.type===p.MAP&&!o.node.context.atLineStart){var u="Nested mappings are not allowed in compact mappings";i.errors.push(new k(o.node,u))}var f=o.node;if(!f&&o.props.length>0){f=new Ot(p.PLAIN,[]),f.context={parent:o,src:o.context.src};var l=o.range.start+1;if(f.range={start:l,end:l},f.valueRange={start:l,end:l},typeof o.range.origStart=="number"){var c=o.range.origStart+1;f.range.origStart=f.range.origEnd=c,f.valueRange.origStart=f.valueRange.origEnd=c}}var v=new E(t,se(i,f));$n(o,v),a.push(v),t&&typeof r=="number"&&o.range.start>r+1024&&i.errors.push(Pt(n,t)),t=void 0,r=null}break;default:t!==void 0&&a.push(new E(t)),t=se(i,o),r=o.range.start,o.error&&i.errors.push(o.error);e:for(var h=s+1;;++h){var g=n.items[h];switch(g&&g.type){case p.BLANK_LINE:case p.COMMENT:continue e;case p.MAP_VALUE:break e;default:{var d="Implicit map keys need to be followed by map values";i.errors.push(new k(o,d));break e}}}if(o.valueRangeContainsNewline){var w="Implicit map keys need to be on a single line";i.errors.push(new k(o,w))}}}return t!==void 0&&a.push(new E(t)),{comments:e,items:a}}function Qn(i,n){for(var e=[],a=[],t=void 0,r=!1,s="{",o=0;o<n.items.length;++o){var u=n.items[o];if(typeof u.char=="string"){var f=u.char,l=u.offset;if(f==="?"&&t===void 0&&!r){r=!0,s=":";continue}if(f===":"){if(t===void 0&&(t=null),s===":"){s=",";continue}}else if(r&&(t===void 0&&f!==","&&(t=null),r=!1),t!==void 0&&(a.push(new E(t)),t=void 0,f===",")){s=":";continue}if(f==="}"){if(o===n.items.length-1)continue}else if(f===s){s=":";continue}var c="Flow map contains an unexpected ".concat(f),v=new $(n,c);v.offset=l,i.errors.push(v)}else u.type===p.BLANK_LINE?e.push({afterKey:!!t,before:a.length}):u.type===p.COMMENT?(_t(i.errors,u),e.push({afterKey:!!t,before:a.length,comment:u.comment})):t===void 0?(s===","&&i.errors.push(new k(u,"Separator , missing in flow map")),t=se(i,u)):(s!==","&&i.errors.push(new k(u,"Indicator : missing in flow map entry")),a.push(new E(t,se(i,u))),t=void 0,r=!1)}return Tt(i.errors,n),t!==void 0&&a.push(new E(t)),{comments:e,items:a}}function Dt(i,n){if(n.type!==p.SEQ&&n.type!==p.FLOW_SEQ){var e="A ".concat(n.type," node cannot be resolved as a sequence");return i.errors.push(new $(n,e)),null}var a=n.type===p.FLOW_SEQ?Kn(i,n):Un(i,n),t=a.comments,r=a.items,s=new z;if(s.items=r,Ct(s,t),!i.options.mapAsMap&&r.some(function(u){return u instanceof E&&u.key instanceof W})){var o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";i.warnings.push(new le(n,o))}return n.resolved=s,s}function Un(i,n){for(var e=[],a=[],t=0;t<n.items.length;++t){var r=n.items[t];switch(r.type){case p.BLANK_LINE:e.push({before:a.length});break;case p.COMMENT:e.push({comment:r.comment,before:a.length});break;case p.SEQ_ITEM:if(r.error&&i.errors.push(r.error),a.push(se(i,r.node)),r.hasProps){var s="Sequence items cannot have tags or anchors before the - indicator";i.errors.push(new k(r,s))}break;default:r.error&&i.errors.push(r.error),i.errors.push(new $(r,"Unexpected ".concat(r.type," node in sequence")))}}return{comments:e,items:a}}function Kn(i,n){for(var e=[],a=[],t=!1,r=void 0,s=null,o="[",u=null,f=0;f<n.items.length;++f){var l=n.items[f];if(typeof l.char=="string"){var c=l.char,v=l.offset;if(c!==":"&&(t||r!==void 0)&&(t&&r===void 0&&(r=o?a.pop():null),a.push(new E(r)),t=!1,r=void 0,s=null),c===o)o=null;else if(!o&&c==="?")t=!0;else if(o!=="["&&c===":"&&r===void 0){if(o===","){if(r=a.pop(),r instanceof E){var h="Chaining flow sequence pairs is invalid",g=new k(n,h);g.offset=v,i.errors.push(g)}if(!t&&typeof s=="number"){var d=l.range?l.range.start:l.offset;d>s+1024&&i.errors.push(Pt(n,r));for(var w=u.context.src,m=s;m<d;++m)if(w[m]===`
|
|
137
|
-
`){var b="Implicit keys of flow sequence pairs need to be on a single line";i.errors.push(new k(u,b));break}}}else r=null;s=null,t=!1,o=null}else if(o==="["||c!=="]"||f<n.items.length-1){var S="Flow sequence contains an unexpected ".concat(c),P=new $(n,S);P.offset=v,i.errors.push(P)}}else if(l.type===p.BLANK_LINE)e.push({before:a.length});else if(l.type===p.COMMENT)_t(i.errors,l),e.push({comment:l.comment,before:a.length});else{if(o){var _="Expected a ".concat(o," in flow sequence");i.errors.push(new k(l,_))}var O=se(i,l);r===void 0?(a.push(O),u=l):(a.push(new E(r,O)),r=void 0),s=l.range.start,o=","}}return Tt(i.errors,n),r!==void 0&&a.push(new E(r)),{comments:e,items:a}}var Ee=pe(48834).Buffer,De=pe(34406),Ft={identify:function(n){return n instanceof Uint8Array},default:!1,tag:"tag:yaml.org,2002:binary",resolve:function(n,e){var a=ke(n,e);if(typeof Ee=="function")return Ee.from(a,"base64");if(typeof atob=="function"){for(var t=atob(a.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length),s=0;s<t.length;++s)r[s]=t.charCodeAt(s);return r}else{var o="This environment does not support reading binary tags; either Buffer or atob is required";return n.errors.push(new me(e,o)),null}},options:Oe,stringify:function(n,e,a,t){var r=n.comment,s=n.type,o=n.value,u;if(typeof Ee=="function")u=o instanceof Ee?o.toString("base64"):Ee.from(o.buffer).toString("base64");else if(typeof btoa=="function"){for(var f="",l=0;l<o.length;++l)f+=String.fromCharCode(o[l]);u=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(s||(s=Oe.defaultType),s===p.QUOTE_DOUBLE)o=u;else{for(var c=Oe.lineWidth,v=Math.ceil(u.length/c),h=new Array(v),g=0,d=0;g<v;++g,d+=c)h[g]=u.substr(d,c);o=h.join(s===p.BLOCK_LITERAL?`
|
|
138
|
-
`:" ")}return at({comment:r,type:s,value:o},e,a,t)}};function Wt(i,n){for(var e=Dt(i,n),a=0;a<e.items.length;++a){var t=e.items[a];if(!(t instanceof E)){if(t instanceof K){if(t.items.length>1){var r="Each pair must have its own sequence indicator";throw new k(n,r)}var s=t.items[0]||new E;t.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(t.commentBefore,`
|
|
139
|
-
`).concat(s.commentBefore):t.commentBefore),t.comment&&(s.comment=s.comment?"".concat(t.comment,`
|
|
140
|
-
`).concat(s.comment):t.comment),t=s}e.items[a]=t instanceof E?t:new E(t)}}return e}function jt(i,n,e){var a=new z(i);a.tag="tag:yaml.org,2002:pairs";var t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=r.value,o=void 0,u=void 0;if(Array.isArray(s))if(s.length===2)o=s[0],u=s[1];else throw new TypeError("Expected [key, value] tuple: ".concat(s));else if(s&&s instanceof Object){var f=Object.keys(s);if(f.length===1)o=f[0],u=s[o];else throw new TypeError("Expected { key: value } tuple: ".concat(s))}else o=s;var l=i.createPair(o,u,e);a.items.push(l)}}catch(c){t.e(c)}finally{t.f()}return a}var xt={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Wt,createNode:jt},Fe=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this),x(q(a),"add",K.prototype.add.bind(q(a))),x(q(a),"delete",K.prototype.delete.bind(q(a))),x(q(a),"get",K.prototype.get.bind(q(a))),x(q(a),"has",K.prototype.has.bind(q(a))),x(q(a),"set",K.prototype.set.bind(q(a))),a.tag=e.tag,a}return A(e,[{key:"toJSON",value:function(t,r){var s=new Map;r&&r.onCreate&&r.onCreate(s);var o=T(this.items),u;try{for(o.s();!(u=o.n()).done;){var f=u.value,l=void 0,c=void 0;if(f instanceof E?(l=H(f.key,"",r),c=H(f.value,l,r)):l=H(f,"",r),s.has(l))throw new Error("Ordered maps must not include duplicate keys");s.set(l,c)}}catch(v){o.e(v)}finally{o.f()}return s}}]),e}(z);x(Fe,"tag","tag:yaml.org,2002:omap");function Jn(i,n){var e=Wt(i,n),a=[],t=T(e.items),r;try{for(t.s();!(r=t.n()).done;){var s=r.value.key;if(s instanceof L)if(a.includes(s.value)){var o="Ordered maps must not include duplicate keys";throw new k(n,o)}else a.push(s.value)}}catch(u){t.e(u)}finally{t.f()}return Object.assign(new Fe,e)}function Vn(i,n,e){var a=jt(i,n,e),t=new Fe;return t.items=a.items,t}var $t={identify:function(n){return n instanceof Map},nodeClass:Fe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Jn,createNode:Vn},We=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this),a.tag=e.tag,a}return A(e,[{key:"add",value:function(t){var r=t instanceof E?t:new E(t),s=oe(this.items,r.key);s||this.items.push(r)}},{key:"get",value:function(t,r){var s=oe(this.items,t);return!r&&s instanceof E?s.key instanceof L?s.key.value:s.key:s}},{key:"set",value:function(t,r){if(typeof r!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(J(r)));var s=oe(this.items,t);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new E(t))}},{key:"toJSON",value:function(t,r){return Q(F(e.prototype),"toJSON",this).call(this,t,r,Set)}},{key:"toString",value:function(t,r,s){if(!t)return JSON.stringify(this);if(this.hasAllNullValues())return Q(F(e.prototype),"toString",this).call(this,t,r,s);throw new Error("Set items must all have null values")}}]),e}(K);x(We,"tag","tag:yaml.org,2002:set");function qn(i,n){var e=Bt(i,n);if(!e.hasAllNullValues())throw new k(n,"Set items must all have null values");return Object.assign(new We,e)}function Gn(i,n,e){var a=new We,t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=r.value;a.items.push(i.createPair(s,null,e))}}catch(o){t.e(o)}finally{t.f()}return a}var Yt={identify:function(n){return n instanceof Set},nodeClass:We,default:!1,tag:"tag:yaml.org,2002:set",resolve:qn,createNode:Gn},it=function(n,e){var a=e.split(":").reduce(function(t,r){return t*60+Number(r)},0);return n==="-"?-a:a},Qt=function(n){var e=n.value;if(isNaN(e)||!isFinite(e))return ne(e);var a="";e<0&&(a="-",e=Math.abs(e));var t=[e%60];return e<60?t.unshift(0):(e=Math.round((e-t[0])/60),t.unshift(e%60),e>=60&&(e=Math.round((e-t[0])/60),t.unshift(e))),a+t.map(function(r){return r<10?"0"+String(r):String(r)}).join(":").replace(/000000\d*$/,"")},Ut={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(n,e,a){return it(e,a.replace(/_/g,""))},stringify:Qt},Kt={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(n,e,a){return it(e,a.replace(/_/g,""))},stringify:Qt},Jt={identify:function(n){return n instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(n,e,a,t,r,s,o,u,f){u&&(u=(u+"00").substr(1,3));var l=Date.UTC(e,a-1,t,r||0,s||0,o||0,u||0);if(f&&f!=="Z"){var c=it(f[0],f.slice(1));Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:function(n){var e=n.value;return e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function st(i){var n=typeof De!="undefined"&&De.env||{};return i?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!n.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!n.YAML_SILENCE_WARNINGS}function ot(i,n){if(st(!1)){var e=typeof De!="undefined"&&De.emitWarning;e?e(i,n):console.warn(n?"".concat(n,": ").concat(i):i)}}function Nr(i){if(st(!0)){var n=i.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");ot("The endpoint 'yaml/".concat(n,"' will be removed in a future release."),"DeprecationWarning")}}var Vt={};function Hn(i,n){if(!Vt[i]&&st(!0)){Vt[i]=!0;var e="The option '".concat(i,"' will be removed in a future release");e+=n?", use '".concat(n,"' instead."):".",ot(e,"DeprecationWarning")}}function zn(i,n,e){var a=new K(i);if(n instanceof Map){var t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=de(r.value,2),o=s[0],u=s[1];a.items.push(i.createPair(o,u,e))}}catch(v){t.e(v)}finally{t.f()}}else if(n&&J(n)==="object")for(var f=0,l=Object.keys(n);f<l.length;f++){var c=l[f];a.items.push(i.createPair(c,n[c],e))}return typeof i.sortMapEntries=="function"&&a.items.sort(i.sortMapEntries),a}var Ne={createNode:zn,default:!0,nodeClass:K,tag:"tag:yaml.org,2002:map",resolve:Bt};function Zn(i,n,e){var a=new z(i);if(n&&n[Symbol.iterator]){var t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=r.value,o=i.createNode(s,e.wrapScalars,null,e);a.items.push(o)}}catch(u){t.e(u)}finally{t.f()}}return a}var je={createNode:Zn,default:!0,nodeClass:z,tag:"tag:yaml.org,2002:seq",resolve:Dt},Xn={identify:function(n){return typeof n=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:ke,stringify:function(n,e,a,t){return e=Object.assign({actualString:!0},e),at(n,e,a,t)},options:te},ut=[Ne,je,Xn],xe=function(n){return typeof n=="bigint"||Number.isInteger(n)},ft=function(n,e,a){return ie.asBigInt?BigInt(n):parseInt(e,a)};function qt(i,n,e){var a=i.value;return xe(a)&&a>=0?e+a.toString(n):ne(i)}var Gt={identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ve,stringify:function(){return ve.nullStr}},Ht={identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(n){return n[0]==="t"||n[0]==="T"},options:ee,stringify:function(n){var e=n.value;return e?ee.trueStr:ee.falseStr}},zt={identify:function(n){return xe(n)&&n>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(n,e){return ft(n,e,8)},options:ie,stringify:function(n){return qt(n,8,"0o")}},Zt={identify:xe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(n){return ft(n,n,10)},options:ie,stringify:ne},Xt={identify:function(n){return xe(n)&&n>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(n,e){return ft(n,e,16)},options:ie,stringify:function(n){return qt(n,16,"0x")}},en={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(n,e){return e?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:ne},tn={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(n){return parseFloat(n)},stringify:function(n){var e=n.value;return Number(e).toExponential()}},nn={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(n,e,a){var t=e||a,r=new L(parseFloat(n));return t&&t[t.length-1]==="0"&&(r.minFractionDigits=t.length),r},stringify:ne},er=ut.concat([Gt,Ht,zt,Zt,Xt,en,tn,nn]),rn=function(n){return typeof n=="bigint"||Number.isInteger(n)},$e=function(n){var e=n.value;return JSON.stringify(e)},an=[Ne,je,{identify:function(n){return typeof n=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:ke,stringify:$e},{identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:$e},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(n){return n==="true"},stringify:$e},{identify:rn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(n){return ie.asBigInt?BigInt(n):parseInt(n,10)},stringify:function(n){var e=n.value;return rn(e)?e.toString():JSON.stringify(e)}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(n){return parseFloat(n)},stringify:$e}];an.scalarFallback=function(i){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(i)))};var sn=function(n){var e=n.value;return e?ee.trueStr:ee.falseStr},Le=function(n){return typeof n=="bigint"||Number.isInteger(n)};function Ye(i,n,e){var a=n.replace(/_/g,"");if(ie.asBigInt){switch(e){case 2:a="0b".concat(a);break;case 8:a="0o".concat(a);break;case 16:a="0x".concat(a);break}var t=BigInt(a);return i==="-"?BigInt(-1)*t:t}var r=parseInt(a,e);return i==="-"?-1*r:r}function lt(i,n,e){var a=i.value;if(Le(a)){var t=a.toString(n);return a<0?"-"+e+t.substr(1):e+t}return ne(i)}var tr=ut.concat([{identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ve,stringify:function(){return ve.nullStr}},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:ee,stringify:sn},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:ee,stringify:sn},{identify:Le,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(n,e,a){return Ye(e,a,2)},stringify:function(n){return lt(n,2,"0b")}},{identify:Le,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(n,e,a){return Ye(e,a,8)},stringify:function(n){return lt(n,8,"0")}},{identify:Le,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(n,e,a){return Ye(e,a,10)},stringify:ne},{identify:Le,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(n,e,a){return Ye(e,a,16)},stringify:function(n){return lt(n,16,"0x")}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(n,e){return e?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:ne},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(n){return parseFloat(n.replace(/_/g,""))},stringify:function(n){var e=n.value;return Number(e).toExponential()}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(n,e){var a=new L(parseFloat(n.replace(/_/g,"")));if(e){var t=e.replace(/_/g,"");t[t.length-1]==="0"&&(a.minFractionDigits=t.length)}return a},stringify:ne}],Ft,$t,xt,Yt,Ut,Kt,Jt),nr={core:er,failsafe:ut,json:an,yaml11:tr},rr={binary:Ft,bool:Ht,float:nn,floatExp:tn,floatNaN:en,floatTime:Kt,int:Zt,intHex:Xt,intOct:zt,intTime:Ut,map:Ne,null:Gt,omap:$t,pairs:xt,seq:je,set:Yt,timestamp:Jt};function ar(i,n,e){if(n){var a=e.filter(function(r){return r.tag===n}),t=a.find(function(r){return!r.format})||a[0];if(!t)throw new Error("Tag ".concat(n," not found"));return t}return e.find(function(r){return(r.identify&&r.identify(i)||r.class&&i instanceof r.class)&&!r.format})}function ir(i,n,e){if(i instanceof U)return i;var a=e.defaultPrefix,t=e.onTagObj,r=e.prevObjects,s=e.schema,o=e.wrapScalars;n&&n.startsWith("!!")&&(n=a+n.slice(2));var u=ar(i,n,s.tags);if(!u){if(typeof i.toJSON=="function"&&(i=i.toJSON()),!i||J(i)!=="object")return o?new L(i):i;u=i instanceof Map?Ne:i[Symbol.iterator]?je:Ne}t&&(t(u),delete e.onTagObj);var f={value:void 0,node:void 0};if(i&&J(i)==="object"&&r){var l=r.get(i);if(l){var c=new X(l);return e.aliasNodes.push(c),c}f.value=i,r.set(i,f)}return f.node=u.createNode?u.createNode(e.schema,i,e):o?new L(i):i,n&&f.node instanceof U&&(f.node.tag=n),f.node}function sr(i,n,e,a){var t=i[a.replace(/\W/g,"")];if(!t){var r=Object.keys(i).map(function(h){return JSON.stringify(h)}).join(", ");throw new Error('Unknown schema "'.concat(a,'"; use one of ').concat(r))}if(Array.isArray(e)){var s=T(e),o;try{for(s.s();!(o=s.n()).done;){var u=o.value;t=t.concat(u)}}catch(h){s.e(h)}finally{s.f()}}else typeof e=="function"&&(t=e(t.slice()));for(var f=0;f<t.length;++f){var l=t[f];if(typeof l=="string"){var c=n[l];if(!c){var v=Object.keys(n).map(function(h){return JSON.stringify(h)}).join(", ");throw new Error('Unknown custom tag "'.concat(l,'"; use one of ').concat(v))}t[f]=c}}return t}var or=function(n,e){return n.key<e.key?-1:n.key>e.key?1:0},Ae=function(){function i(n){var e=n.customTags,a=n.merge,t=n.schema,r=n.sortMapEntries,s=n.tags;N(this,i),this.merge=!!a,this.name=t,this.sortMapEntries=r===!0?or:r||null,!e&&s&&Hn("tags","customTags"),this.tags=sr(nr,rr,e||s,t)}return A(i,[{key:"createNode",value:function(e,a,t,r){var s={defaultPrefix:i.defaultPrefix,schema:this,wrapScalars:a},o=r?Object.assign(r,s):s;return ir(e,t,o)}},{key:"createPair",value:function(e,a,t){t||(t={wrapScalars:!0});var r=this.createNode(e,t.wrapScalars,null,t),s=this.createNode(a,t.wrapScalars,null,t);return new E(r,s)}}]),i}();x(Ae,"defaultPrefix",Te),x(Ae,"defaultTags",re);var Qe={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},ur={get binary(){return Oe},set binary(i){Object.assign(Oe,i)},get bool(){return ee},set bool(i){Object.assign(ee,i)},get int(){return ie},set int(i){Object.assign(ie,i)},get null(){return ve},set null(i){Object.assign(ve,i)},get str(){return te},set str(i){Object.assign(te,i)}},on={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Te},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Te}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Te}]}};function un(i,n){if((i.version||i.options.version)==="1.0"){var e=n.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];var a=n.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return a?"!".concat(a[1],"/").concat(a[2]):"!".concat(n.replace(/^tag:/,""))}var t=i.tagPrefixes.find(function(o){return n.indexOf(o.prefix)===0});if(!t){var r=i.getDefaults().tagPrefixes;t=r&&r.find(function(o){return n.indexOf(o.prefix)===0})}if(!t)return n[0]==="!"?n:"!<".concat(n,">");var s=n.substr(t.prefix.length).replace(/[!,[\]{}]/g,function(o){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[o]});return t.handle+s}function fr(i,n){if(n instanceof X)return X;if(n.tag){var e=i.filter(function(o){return o.tag===n.tag});if(e.length>0)return e.find(function(o){return o.format===n.format})||e[0]}var a,t;if(n instanceof L){t=n.value;var r=i.filter(function(o){return o.identify&&o.identify(t)||o.class&&t instanceof o.class});a=r.find(function(o){return o.format===n.format})||r.find(function(o){return!o.format})}else t=n,a=i.find(function(o){return o.nodeClass&&t instanceof o.nodeClass});if(!a){var s=t&&t.constructor?t.constructor.name:J(t);throw new Error("Tag not resolved for ".concat(s," value"))}return a}function lr(i,n,e){var a=e.anchors,t=e.doc,r=[],s=t.anchors.getName(i);return s&&(a[s]=i,r.push("&".concat(s))),i.tag?r.push(un(t,i.tag)):n.default||r.push(un(t,n.tag)),r.join(" ")}function Ue(i,n,e,a){var t=n.doc,r=t.anchors,s=t.schema,o;if(!(i instanceof U)){var u={aliasNodes:[],onTagObj:function(w){return o=w},prevObjects:new Map};i=s.createNode(i,!0,null,u);var f=T(u.aliasNodes),l;try{for(f.s();!(l=f.n()).done;){var c=l.value;c.source=c.source.node;var v=r.getName(c.source);v||(v=r.newName(),r.map[v]=c.source)}}catch(d){f.e(d)}finally{f.f()}}if(i instanceof E)return i.toString(n,e,a);o||(o=fr(s.tags,i));var h=lr(i,o,n);h.length>0&&(n.indentAtStart=(n.indentAtStart||0)+h.length+1);var g=typeof o.stringify=="function"?o.stringify(i,n,e,a):i instanceof L?at(i,n,e,a):i.toString(n,e,a);return h?i instanceof L||g[0]==="{"||g[0]==="["?"".concat(h," ").concat(g):"".concat(h,`
|
|
141
|
-
`).concat(n.indent).concat(g):g}var cr=function(){function i(n){N(this,i),x(this,"map",Object.create(null)),this.prefix=n}return A(i,[{key:"createAlias",value:function(e,a){return this.setAnchor(e,a),new X(e)}},{key:"createMergePair",value:function(){for(var e=this,a=new Lt,t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return a.value.items=r.map(function(o){if(o instanceof X){if(o.source instanceof K)return o}else if(o instanceof K)return e.createAlias(o);throw new Error("Merge sources must be Map nodes or their Aliases")}),a}},{key:"getName",value:function(e){var a=this.map;return Object.keys(a).find(function(t){return a[t]===e})}},{key:"getNames",value:function(){return Object.keys(this.map)}},{key:"getNode",value:function(e){return this.map[e]}},{key:"newName",value:function(e){e||(e=this.prefix);for(var a=Object.keys(this.map),t=1;;++t){var r="".concat(e).concat(t);if(!a.includes(r))return r}}},{key:"resolveNodes",value:function(){var e=this.map,a=this._cstAliases;Object.keys(e).forEach(function(t){e[t]=e[t].resolved}),a.forEach(function(t){t.source=t.source.resolved}),delete this._cstAliases}},{key:"setAnchor",value:function(e,a){if(e!=null&&!i.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(a&&/[\x00-\x19\s,[\]{}]/.test(a))throw new Error("Anchor names must not contain whitespace or control characters");var t=this.map,r=e&&Object.keys(t).find(function(s){return t[s]===e});if(r)if(a)r!==a&&(delete t[r],t[a]=e);else return r;else{if(!a){if(!e)return null;a=this.newName()}t[a]=e}return a}}],[{key:"validAnchorNode",value:function(e){return e instanceof L||e instanceof z||e instanceof K}}]),i}(),vr=function i(n,e){if(n&&J(n)==="object"){var a=n.tag;n instanceof W?(a&&(e[a]=!0),n.items.forEach(function(t){return i(t,e)})):n instanceof E?(i(n.key,e),i(n.value,e)):n instanceof L&&a&&(e[a]=!0)}return e},hr=function(n){return Object.keys(vr(n,{}))};function pr(i,n){var e={before:[],after:[]},a=void 0,t=!1,r=T(n),s;try{for(r.s();!(s=r.n()).done;){var o=s.value;if(o.valueRange){if(a!==void 0){var u="Document contains trailing content not separated by a ... or --- line";i.errors.push(new $(o,u));break}var f=se(i,o);t&&(f.spaceBefore=!0,t=!1),a=f}else if(o.comment!==null){var l=a===void 0?e.before:e.after;l.push(o.comment)}else o.type===p.BLANK_LINE&&(t=!0,a===void 0&&e.before.length>0&&!i.commentBefore&&(i.commentBefore=e.before.join(`
|
|
142
|
-
`),e.before=[]))}}catch(h){r.e(h)}finally{r.f()}if(i.contents=a||null,!a)i.comment=e.before.concat(e.after).join(`
|
|
143
|
-
`)||null;else{var c=e.before.join(`
|
|
144
|
-
`);if(c){var v=a instanceof W&&a.items[0]?a.items[0]:a;v.commentBefore=v.commentBefore?"".concat(c,`
|
|
145
|
-
`).concat(v.commentBefore):c}i.comment=e.after.join(`
|
|
146
|
-
`)||null}}function gr(i,n){var e=i.tagPrefixes,a=de(n.parameters,2),t=a[0],r=a[1];if(!t||!r){var s="Insufficient parameters given for %TAG directive";throw new k(n,s)}if(e.some(function(u){return u.handle===t})){var o="The %TAG directive must only be given at most once per handle in the same document.";throw new k(n,o)}return{handle:t,prefix:r}}function dr(i,n){var e=de(n.parameters,1),a=e[0];if(n.name==="YAML:1.0"&&(a="1.0"),!a){var t="Insufficient parameters given for %YAML directive";throw new k(n,t)}if(!on[a]){var r=i.version||i.options.version,s="Document will be parsed as YAML ".concat(r," rather than YAML ").concat(a);i.warnings.push(new le(n,s))}return a}function yr(i,n,e){var a=[],t=!1,r=T(n),s;try{for(r.s();!(s=r.n()).done;){var o=s.value,u=o.comment,f=o.name;switch(f){case"TAG":try{i.tagPrefixes.push(gr(i,o))}catch(h){i.errors.push(h)}t=!0;break;case"YAML":case"YAML:1.0":if(i.version){var l="The %YAML directive must only be given at most once per document.";i.errors.push(new k(o,l))}try{i.version=dr(i,o)}catch(h){i.errors.push(h)}t=!0;break;default:if(f){var c="YAML only supports %TAG and %YAML directives, and not %".concat(f);i.warnings.push(new le(o,c))}}u&&a.push(u)}}catch(h){r.e(h)}finally{r.f()}if(e&&!t&&(i.version||e.version||i.options.version)==="1.1"){var v=function(g){var d=g.handle,w=g.prefix;return{handle:d,prefix:w}};i.tagPrefixes=e.tagPrefixes.map(v),i.version=e.version}i.commentBefore=a.join(`
|
|
147
|
-
`)||null}function he(i){if(i instanceof W)return!0;throw new Error("Expected a YAML collection as document contents")}var ct=function(){function i(n){N(this,i),this.anchors=new cr(n.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=n,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return A(i,[{key:"add",value:function(e){return he(this.contents),this.contents.add(e)}},{key:"addIn",value:function(e,a){he(this.contents),this.contents.addIn(e,a)}},{key:"delete",value:function(e){return he(this.contents),this.contents.delete(e)}},{key:"deleteIn",value:function(e){return Se(e)?this.contents==null?!1:(this.contents=null,!0):(he(this.contents),this.contents.deleteIn(e))}},{key:"getDefaults",value:function(){return i.defaults[this.version]||i.defaults[this.options.version]||{}}},{key:"get",value:function(e,a){return this.contents instanceof W?this.contents.get(e,a):void 0}},{key:"getIn",value:function(e,a){return Se(e)?!a&&this.contents instanceof L?this.contents.value:this.contents:this.contents instanceof W?this.contents.getIn(e,a):void 0}},{key:"has",value:function(e){return this.contents instanceof W?this.contents.has(e):!1}},{key:"hasIn",value:function(e){return Se(e)?this.contents!==void 0:this.contents instanceof W?this.contents.hasIn(e):!1}},{key:"set",value:function(e,a){he(this.contents),this.contents.set(e,a)}},{key:"setIn",value:function(e,a){Se(e)?this.contents=a:(he(this.contents),this.contents.setIn(e,a))}},{key:"setSchema",value:function(e,a){if(!(!e&&!a&&this.schema)){typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(a)&&(this.options.customTags=a);var t=Object.assign({},this.getDefaults(),this.options);this.schema=new Ae(t)}}},{key:"parse",value:function(e,a){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");var t=e.directives,r=t===void 0?[]:t,s=e.contents,o=s===void 0?[]:s,u=e.directivesEndMarker,f=e.error,l=e.valueRange;if(f&&(f.source||(f.source=this),this.errors.push(f)),yr(this,r,a),u&&(this.directivesEndMarker=!0),this.range=l?[l.start,l.end]:null,this.setSchema(),this.anchors._cstAliases=[],pr(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var c=T(this.errors),v;try{for(c.s();!(v=c.n()).done;){var h=v.value;h instanceof fe&&h.makePretty()}}catch(m){c.e(m)}finally{c.f()}var g=T(this.warnings),d;try{for(g.s();!(d=g.n()).done;){var w=d.value;w instanceof fe&&w.makePretty()}}catch(m){g.e(m)}finally{g.f()}}return this}},{key:"listNonDefaultTags",value:function(){return hr(this.contents).filter(function(e){return e.indexOf(Ae.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(e,a){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(a){var t=this.tagPrefixes.find(function(r){return r.handle===e});t?t.prefix=a:this.tagPrefixes.push({handle:e,prefix:a})}else this.tagPrefixes=this.tagPrefixes.filter(function(r){return r.handle!==e})}},{key:"toJSON",value:function(e,a){var t=this,r=this.options,s=r.keepBlobsInJSON,o=r.mapAsMap,u=r.maxAliasCount,f=s&&(typeof e!="string"||!(this.contents instanceof L)),l={doc:this,indentStep:" ",keep:f,mapAsMap:f&&!!o,maxAliasCount:u,stringify:Ue},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map(function(b){return[t.anchors.map[b],{alias:[],aliasCount:0,count:1}]})));var v=H(this.contents,e,l);if(typeof a=="function"&&l.anchors){var h=T(l.anchors.values()),g;try{for(h.s();!(g=h.n()).done;){var d=g.value,w=d.count,m=d.res;a(m,w)}}catch(b){h.e(b)}finally{h.f()}}return v}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var a=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(a))}this.setSchema();var t=[],r=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),t.push(s),r=!0}var o=this.listNonDefaultTags();this.tagPrefixes.forEach(function(h){var g=h.handle,d=h.prefix;o.some(function(w){return w.indexOf(d)===0})&&(t.push("%TAG ".concat(g," ").concat(d)),r=!0)}),(r||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));var u={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Ue},f=!1,l=null;if(this.contents){this.contents instanceof U&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),u.forceBlockIndent=!!this.comment,l=this.contents.comment);var c=l?null:function(){return f=!0},v=Ue(this.contents,u,function(){return l=null},c);t.push(ce(v,"",l))}else this.contents!==void 0&&t.push(Ue(this.contents,u));return this.comment&&((!f||l)&&t[t.length-1]!==""&&t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join(`
|
|
148
|
-
`)+`
|
|
149
|
-
`}}]),i}();x(ct,"defaults",on);function mr(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,e=arguments.length>2?arguments[2]:void 0;e===void 0&&typeof n=="string"&&(e=n,n=!0);var a=Object.assign({},ct.defaults[Qe.version],Qe),t=new Ae(a);return t.createNode(i,n,e)}var Ke=function(i){M(e,i);var n=I(e);function e(a){return N(this,e),n.call(this,Object.assign({},Qe,a))}return e}(ct);function wr(i,n){var e=[],a,t=T(et(i)),r;try{for(t.s();!(r=t.n()).done;){var s=r.value,o=new Ke(n);o.parse(s,a),e.push(o),a=o}}catch(u){t.e(u)}finally{t.f()}return e}function fn(i,n){var e=et(i),a=new Ke(n).parse(e[0]);if(e.length>1){var t="Source contains multiple documents; please use YAML.parseAllDocuments()";a.errors.unshift(new k(e[1],t))}return a}function br(i,n){var e=fn(i,n);if(e.warnings.forEach(function(a){return ot(a)}),e.errors.length>0)throw e.errors[0];return e.toJSON()}function Sr(i,n){var e=new Ke(n);return e.contents=i,String(e)}var Or={createNode:mr,defaultOptions:Qe,Document:Ke,parse:br,parseAllDocuments:wr,parseCST:et,parseDocument:fn,scalarOptions:ur,stringify:Sr}}}]);})();
|
|
150
|
-
|
|
151
|
-
//# sourceMappingURL=module-yaml.63d08f2d.js.map
|