pnpm 12.15.0 → 12.16.0
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 +189 -0
- package/README.md +4 -4
- package/bin/pnpm.mjs +11 -233
- package/dist/node_modules/.pnpm-workspace-state-v1.json +97 -269
- package/dist/node_modules/confbox/LICENSE +27 -0
- package/dist/node_modules/confbox/dist/_chunks/_format.d.mts +22 -0
- package/dist/node_modules/confbox/dist/_chunks/_format.mjs +1 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/detect-indent.mjs +1 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/ini.mjs +3 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/js-yaml.d.mts +33 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +38 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/json5.mjs +14 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +11 -0
- package/dist/node_modules/confbox/dist/_chunks/libs/strip-json-comments.mjs +4 -0
- package/dist/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +1 -0
- package/dist/node_modules/confbox/dist/index.d.mts +7 -0
- package/dist/node_modules/confbox/dist/index.mjs +1 -0
- package/dist/node_modules/confbox/dist/ini.d.mts +59 -0
- package/dist/node_modules/confbox/dist/ini.mjs +1 -0
- package/dist/node_modules/confbox/dist/json.d.mts +25 -0
- package/dist/node_modules/confbox/dist/json.mjs +1 -0
- package/dist/node_modules/confbox/dist/json5.d.mts +55 -0
- package/dist/node_modules/confbox/dist/json5.mjs +1 -0
- package/dist/node_modules/confbox/dist/jsonc.d.mts +29 -0
- package/dist/node_modules/confbox/dist/jsonc.mjs +1 -0
- package/dist/node_modules/confbox/dist/toml.d.mts +20 -0
- package/dist/node_modules/confbox/dist/toml.mjs +1 -0
- package/dist/node_modules/confbox/dist/yaml.d.mts +101 -0
- package/dist/node_modules/confbox/dist/yaml.mjs +1 -0
- package/dist/node_modules/confbox/package.json +68 -0
- package/dist/node_modules/get-pnpm/lib/corepack.js +79 -0
- package/dist/node_modules/get-pnpm/lib/downloadExecutable.js +10 -4
- package/dist/node_modules/get-pnpm/lib/extractTarballMember.js +45 -35
- package/dist/node_modules/get-pnpm/lib/index.js +3 -219
- package/dist/node_modules/get-pnpm/lib/install.js +293 -0
- package/dist/node_modules/get-pnpm/lib/npmConfig.js +280 -0
- package/dist/node_modules/get-pnpm/lib/npmSigningKeys.js +2 -6
- package/dist/node_modules/get-pnpm/lib/platformPackageName.js +11 -7
- package/dist/node_modules/get-pnpm/lib/pnpmConfig.js +297 -0
- package/dist/node_modules/get-pnpm/lib/projectPin.js +201 -0
- package/dist/node_modules/get-pnpm/lib/registry.js +265 -41
- package/dist/node_modules/get-pnpm/lib/resolveVersion.js +19 -2
- package/dist/node_modules/get-pnpm/lib/sameFileContents.js +31 -27
- package/dist/node_modules/get-pnpm/lib/shadowingPnpm.js +174 -0
- package/dist/node_modules/get-pnpm/lib/undoHint.js +12 -0
- package/dist/node_modules/get-pnpm/package.json +20 -14
- package/package.json +15 -15
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var e=Symbol(`NOT_RESOLVED`);function t(e,t){return{tagName:e,nodeKind:`scalar`,implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify,represent:t.represent??(e=>String(e)),representTagName:t.representTagName??(()=>e)}}function n(e,t){let n=t.finalize===void 0;return{tagName:e,nodeKind:`sequence`,implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(e=>e),carrierIsResult:n,identify:t.identify,represent:t.represent??(e=>e),representTagName:t.representTagName??(()=>e)}}function r(e,t){let n=t.finalize===void 0;return{tagName:e,nodeKind:`mapping`,implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(e=>e),carrierIsResult:n,identify:t.identify,represent:t.represent??(e=>e),representTagName:t.representTagName??(()=>e)}}var i=t(`tag:yaml.org,2002:str`,{resolve:e=>e,identify:e=>typeof e==`string`}),a=[``,`~`,`null`,`Null`,`NULL`],o=t(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:t=>a.indexOf(t)===-1?e:null,identify:e=>e===null,represent:()=>`null`}),s=t(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[`n`],resolve:(t,n)=>t===`null`||n&&t===``?null:e,identify:e=>e===null,represent:()=>`null`}),c=[``,`~`,`null`,`Null`,`NULL`],l=t(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:t=>c.indexOf(t)===-1?e:null,identify:e=>e===null,represent:()=>`null`}),u=[`true`,`True`,`TRUE`],d=[`false`,`False`,`FALSE`],f=t(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`T`,`f`,`F`],resolve:t=>u.indexOf(t)!==-1||d.indexOf(t)===-1&&e,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),p=[`true`],m=[`false`],h=t(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`f`],resolve:t=>p.indexOf(t)!==-1||m.indexOf(t)===-1&&e,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),ee=[`true`,`True`,`TRUE`,`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`],te=[`false`,`False`,`FALSE`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],ne=t(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`y`,`Y`,`n`,`N`,`t`,`T`,`f`,`F`,`o`,`O`],resolve:t=>ee.indexOf(t)!==-1||te.indexOf(t)===-1&&e,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),re=RegExp(`^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$`),ie=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function ae(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function oe(t,n){if(n){if(!ie.test(t))return e}else if(!re.test(t))return e;let r=ae(t);return Number.isFinite(r)?r:e}var se=t(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:oe,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),ce=RegExp(`^-?(?:0|[1-9][0-9]*)$`),le=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function ue(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function de(t,n){if(n){if(!le.test(t))return e}else if(!ce.test(t))return e;let r=ue(t);return Number.isFinite(r)?r:e}var fe=t(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:de,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),pe=RegExp(`^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$`);function me(e){let t=e.replace(/_/g,``),n=1;if((t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`))return n*parseInt(t.slice(2),2);if(t.startsWith(`0x`))return n*parseInt(t.slice(2),16);if(t.includes(`:`)){let e=0;for(let n of t.split(`:`))e=e*60+Number(n);return n*e}return t!==`0`&&t[0]===`0`?n*parseInt(t,8):n*parseInt(t,10)}function he(t){if(!pe.test(t))return e;let n=me(t);return Number.isFinite(n)?n:e}var ge=t(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:he,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),_e=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),ve=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ye(t){if(!_e.test(t))return e;let n=t.toLowerCase(),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=r*parseFloat(n);return Number.isFinite(i)||ve.test(t)?i:e}function be(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var xe=t(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:ye,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:be}),Se=RegExp(`^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$`),Ce=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function we(t,n){if(n){if(!Ce.test(t))return e;let n=t.toLowerCase(),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=r*parseFloat(n);return Number.isFinite(i)?i:e}if(!Se.test(t))return e;let r=Number(t);return Number.isFinite(r)?r:e}function Te(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var Ee=t(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:we,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Te}),De=RegExp(`^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),Oe=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ke(t){if(!De.test(t))return e;let n=t.toLowerCase().replace(/_/g,``),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=0;if(n.includes(`:`)){for(let e of n.split(`:`))i=i*60+Number(e);i*=r}else i=r*parseFloat(n);return Number.isFinite(i)||Oe.test(t)?i:e}function Ae(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var je=t(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:ke,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Ae}),Me=t(`tag:yaml.org,2002:merge`,{implicit:!0,implicitFirstChars:[`<`],resolve:(t,n)=>t===`<<`||n&&t===``?`<<`:e,identify:()=>!1}),Ne=/^[A-Za-z0-9+/]*={0,2}$/;function Pe(t){let n=t.replace(/\s/g,``);if(n.length%4!=0||!Ne.test(n))return e;let r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return i}function Fe(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Ie=t(`tag:yaml.org,2002:binary`,{resolve:Pe,identify:e=>Object.prototype.toString.call(e)===`[object Uint8Array]`,represent:Fe}),Le=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),Re=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function ze(e,t,n,r=0,i=0,a=0,o=0){let s=new Date(Date.UTC(e,t,n,r,i,a,o));return s.setUTCFullYear(e,t,n),s}function Be(t){let n=Le.exec(t);if(n===null&&(n=Re.exec(t)),n===null)return e;let r=+n[1],i=n[2]-1,a=+n[3];if(!n[4]){let t=ze(r,i,a);return t.getUTCFullYear()!==r||t.getUTCMonth()!==i||t.getUTCDate()!==a?e:t}let o=+n[4],s=+n[5],c=+n[6],l=0;if(o>23||s>59||c>59)return e;if(n[7]){let e=n[7].slice(0,3);for(;e.length<3;)e+=`0`;l=+e}let u=ze(r,i,a,o,s,c,l);if(u.getUTCFullYear()!==r||u.getUTCMonth()!==i||u.getUTCDate()!==a)return e;if(n[9]){let t=+n[10],r=+(n[11]||0);if(t>23||r>59)return e;let i=(t*60+r)*6e4;u.setTime(u.getTime()-(n[9]===`-`?-i:i))}return u}var Ve=t(`tag:yaml.org,2002:timestamp`,{implicit:!0,implicitFirstChars:[...`0123456789`],resolve:Be,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),He=n(`tag:yaml.org,2002:seq`,{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function g(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ue(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var We=n(`tag:yaml.org,2002:omap`,{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return`cannot resolve an ordered map item`;n=t.keys().next().value}else if(g(t)){let e=Object.keys(t);if(e.length!==1)return`cannot resolve an ordered map item`;n=e[0]}else return`cannot resolve an ordered map item`;return e.seen.has(n)?`duplicate key in ordered map`:(e.seen.add(n),e.list.push(t),``)},finalize:e=>e.list,identify:()=>!1}),Ge=n(`tag:yaml.org,2002:pairs`,{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size===1?(e.push(t.entries().next().value),``):`cannot resolve a pairs item`;if(Object.prototype.toString.call(t)!==`[object Object]`)return`cannot resolve a pairs item`;let n=t,r=Object.keys(n);return r.length===1?(e.push([r[0],n[r[0]]]),``):`cannot resolve a pairs item`},identify:()=>!1}),Ke=r(`tag:yaml.org,2002:map`,{create:()=>({}),identify:g,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(typeof t==`object`&&t)return`object-based map does not support complex keys`;let r=String(t);return r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``},has:(e,t)=>typeof t==`object`&&t?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),qe=r(`tag:yaml.org,2002:set`,{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{let t=new Map;for(let n of e)t.set(n,null);return t},addPair:(e,t,n)=>n===null?(e.add(t),``):`cannot resolve a set item`,has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function Je(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Ye(){return{scalar:[],sequence:[],mapping:[]}}function Xe(e){let t=[];for(let n of e){let e=t.length;for(let r=0;r<t.length;r++){let i=t[r];if(i.nodeKind===n.nodeKind&&i.tagName===n.tagName&&i.matchByTagPrefix===n.matchByTagPrefix){e=r;break}}t[e]=n}return t}var _=class t{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=Xe(e),n=[],r=Je(),i=Ye();for(let e of t){if(e.nodeKind===`scalar`&&e.implicit){if(e.matchByTagPrefix)throw Error(`Implicit scalar tags cannot match by tag prefix`);n.push(e)}switch(e.nodeKind){case`scalar`:e.matchByTagPrefix?i.scalar.push(e):r.scalar[e.tagName]=e;break;case`sequence`:e.matchByTagPrefix?i.sequence.push(e):r.sequence[e.tagName]=e;break;case`mapping`:e.matchByTagPrefix?i.mapping.push(e):r.mapping[e.tagName]=e}}let a=n.filter(e=>e.implicitFirstChars===null),o=new Set;for(let e of n)if(e.implicitFirstChars!==null)for(let t of e.implicitFirstChars)o.add(t);let s=new Map;for(let e of o)s.set(e,n.filter(t=>t.implicitFirstChars===null||t.implicitFirstChars.indexOf(e)!==-1));let c=r.scalar[`tag:yaml.org,2002:str`];if(!c)throw Error(`schema does not define the default scalar tag (tag:yaml.org,2002:str)`);this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=s,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=c,this.defaultSequenceTag=r.sequence[`tag:yaml.org,2002:seq`],this.defaultMappingTag=r.mapping[`tag:yaml.org,2002:map`],this.exact=r,this.prefix=i}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let t of this.prefix.scalar)if(e.startsWith(t.tagName))return t}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let t of this.prefix.sequence)if(e.startsWith(t.tagName))return t}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let t of this.prefix.mapping)if(e.startsWith(t.tagName))return t}resolveImplicitScalarTag(t){let n=this.implicitScalarByFirstChar.get(t.charAt(0))??this.implicitScalarAnyFirstChar;for(let r of n){let n=r.resolve(t,!1,r.tagName);if(n!==e)return{value:n,tag:r}}let r=this.defaultScalarTag;return{value:r.resolve(t,!1,r.tagName),tag:r}}withTags(...e){let n=[];for(let t of e)n=n.concat(t);return new t([...this.tags,...n])}},Ze=new _([i,He,Ke]);new _([...Ze.tags,s,h,fe,Ee]);var Qe=new _([...Ze.tags,o,f,se,xe]),$e=new _([...Ze.tags,l,ne,ge,je,Ve,Me,Ie,We,Ge,qe]).withTags({...ge,resolve:(t,n,r)=>{let i=ge.resolve(t,n,r);return i===e?se.resolve(t,n,r):i}},{...je,resolve:(t,n,r)=>{let i=je.resolve(t,n,r);return i===e?xe.resolve(t,n,r):i}});r(`tag:yaml.org,2002:map`,{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),``),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||g(e),represent:e=>{if(e instanceof Map)return e;let t=new Map,n=e;for(let e of Object.keys(n))t.set(e,n[e]);return t}});function et(e){if(Array.isArray(e)){let t=Array.prototype.slice.call(e);for(let e=0;e<t.length;e++){if(Array.isArray(t[e]))return null;typeof t[e]==`object`&&Object.prototype.toString.call(t[e])===`[object Object]`&&(t[e]=`[object Object]`)}return String(t)}return typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`?`[object Object]`:String(e)}r(`tag:yaml.org,2002:map`,{create:()=>({}),identify:g,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{let r=et(t);return r===null?`nested arrays are not supported inside keys`:(r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``)},has:(e,t)=>{let n=et(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var tt={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function nt(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function rt(e,t){return` `.repeat(Math.max(t-e.length,0))+e}function it(e,t){if(!e.buffer)return null;let n={...tt,...t},r=/\r?\n|\r|\0/g,i=[0],a=[],o,s=-1;for(;o=r.exec(e.buffer);)a.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let c=``,l=Math.min(e.line+n.linesAfter,a.length).toString().length,u=n.maxLength-(n.indent+l+3);for(let t=1;t<=n.linesBefore&&!(s-t<0);t++){let r=nt(e.buffer,i[s-t],a[s-t],e.position-(i[s]-i[s-t]),u);c=`${` `.repeat(n.indent)}${rt((e.line-t+1).toString(),l)} | ${r.str}\n${c}`}let d=nt(e.buffer,i[s],a[s],e.position,u);c+=`${` `.repeat(n.indent)}${rt((e.line+1).toString(),l)} | ${d.str}\n`,c+=`${`-`.repeat(n.indent+l+3+d.pos)}^\n`;for(let t=1;t<=n.linesAfter&&!(s+t>=a.length);t++){let r=nt(e.buffer,i[s+t],a[s+t],e.position-(i[s]-i[s+t]),u);c+=`${` `.repeat(n.indent)}${rt((e.line+t+1).toString(),l)} | ${r.str}\n`}return c.replace(/\n$/,``)}function at(e,t){let n=``;return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`\n\n${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var v=class e extends Error{reason;mark;constructor(e,t){super(),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=at(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${at(this,e)}`}static throwAt(t,n,r,i=``){let a=0,o=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e);n===10?(a++,o=e+1):n===13&&(a++,t.charCodeAt(e+1)===10&&e++,o=e+1)}let s={name:i,buffer:t,position:n,line:a,column:n-o};throw s.snippet=it(s),new e(r,s)}},y={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},b={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},x={BLOCK:1,FLOW:2},S={CLIP:1,STRIP:2,KEEP:3},ot=-1;function st(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`
|
|
2
|
+
`;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`
`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}var ct=Array(256),lt=Array(256);for(let e=0;e<256;e++)ct[e]=+!!st(e),lt[e]=st(e);function ut(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function dt(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function ft(e){return e===120?2:e===117?4:8}function C(e,t,n){let r=0;for(;t<n;){let n=e.charCodeAt(t);if(n===10)r++,t++;else if(n===13)r++,t++,e.charCodeAt(t)===10&&t++;else if(n===32||n===9)t++;else break}return{position:t,breaks:r}}function pt(e){return e===1?` `:`
|
|
3
|
+
`.repeat(e-1)}function mt(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===10||t===13){r+=e.slice(a,o);let t=C(e,i,n);r+=pt(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,o)}function ht(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===39)r+=e.slice(a,i)+`'`,i+=2,a=o=i;else if(t===10||t===13){r+=e.slice(a,o);let t=C(e,i,n);r+=pt(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,n)}function gt(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===92){r+=e.slice(a,i),i++;let t=e.charCodeAt(i);if(t===10||t===13)i=C(e,i,n).position;else if(t<256&&ct[t])r+=lt[t],i++;else{let n=ft(t),a=0;for(;n>0;n--){i++;let t=dt(e.charCodeAt(i));a=(a<<4)+t}r+=ut(a),i++}a=o=i}else if(t===10||t===13){r+=e.slice(a,o);let t=C(e,i,n);r+=pt(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,n)}function _t(e,t,n,r,i,a){let o=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,`
|
|
4
|
+
`),c=s===``?[]:(s.endsWith(`
|
|
5
|
+
`)?s.slice(0,-1):s).split(`
|
|
6
|
+
`),l=``,u=!1,d=0,f=!1;for(let e of c){let t=0;for(;t<o&&e.charCodeAt(t)===32;)t++;if(r<0||t>=e.length){d++;continue}let n=e.slice(o),i=n.charCodeAt(0);a?i===32||i===9?(f=!0,l+=`
|
|
7
|
+
`.repeat(u?1+d:d)):f?(f=!1,l+=`
|
|
8
|
+
`.repeat(d+1)):d===0?u&&(l+=` `):l+=`
|
|
9
|
+
`.repeat(d):l+=`
|
|
10
|
+
`.repeat(u?1+d:d),l+=n,u=!0,d=0}return i===S.KEEP?l+=`
|
|
11
|
+
`.repeat(u?1+d:d):i!==S.STRIP&&u&&(l+=`
|
|
12
|
+
`),l}function vt(e,t){if(t.valueStart===ot)return``;let{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case b.SINGLE_QUOTED:return ht(e,n,r);case b.DOUBLE_QUOTED:return gt(e,n,r);case b.LITERAL_BLOCK:return _t(e,n,r,t.indent,t.chomping,!1);case b.FOLDED_BLOCK:return _t(e,n,r,t.indent,t.chomping,!0);default:return mt(e,n,r)}}var yt=Object.assign(Object.create(null),{"!":`!`,"!!":`tag:yaml.org,2002:`});function bt(e){return encodeURI(e).replace(/!/g,`%21`)}function xt(e,t){if(e.startsWith(`!<`)&&e.endsWith(`>`))return decodeURIComponent(e.slice(2,-1));let n=e.indexOf(`!`,1),r=n===-1?`!`:e.slice(0,n+1),i=t?.[r]??yt[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}function St(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${bt(t)}`):t.slice(0,18)===`tag:yaml.org,2002:`?`!!${bt(t.slice(18))}`:`!<${bt(t)}>`}var w=-1,Ct=`tag:yaml.org,2002:merge`,wt={filename:``,schema:Qe,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Tt(e){return`tagStart`in e&&e.tagStart!==w?e.tagStart:`anchorStart`in e&&e.anchorStart!==w?e.anchorStart:`valueStart`in e&&e.valueStart!==w?e.valueStart:`start`in e?e.start:0}function T(e,t){v.throwAt(e.source,e.position,t,e.filename)}function Et(e,t,n,r){try{return n.finalize(r)}catch(n){if(n instanceof v)throw n;v.throwAt(e.source,t,n instanceof Error?n.message:String(n),e.filename)}}function Dt(t,n){let r=vt(t.source,n),i=n.tagStart===w?``:t.source.slice(n.tagStart,n.tagEnd),a=t.schema.defaultScalarTag;if(i!==``){if(i===`!`)return{value:r,tag:a};let n=xt(i,t.tagHandlers),o=t.schema.lookupScalarTag(n);if(o){let i=o.resolve(r,!0,n);return i===e&&T(t,`cannot resolve a node with !<${n}> explicit tag`),{value:i,tag:o}}let s=t.schema.lookupMappingTag(n)??t.schema.lookupSequenceTag(n);if(s){r!==``&&T(t,`cannot resolve a node with !<${n}> explicit tag`);let e=s.create(n);return{value:s.carrierIsResult?e:Et(t,t.position,s,e),tag:s}}T(t,`unknown scalar tag !<${n}>`)}return n.style===b.PLAIN?t.schema.resolveImplicitScalarTag(r):{value:a.resolve(r,!1,a.tagName),tag:a}}function Ot(e,t,n){let r=t.tagStart===w?``:e.source.slice(t.tagStart,t.tagEnd);return r===``||r===`!`?n:xt(r,e.tagHandlers)}function kt(e){return e.nodeKind===`mapping`}function At(e){e.totalMergeKeys++,e.maxTotalMergeKeys!==-1&&e.totalMergeKeys>e.maxTotalMergeKeys&&T(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`)}function jt(e,t,n,r){At(e);for(let i of r.keys(n)){if(At(e),t.tag.has(t.value,i))continue;let a=t.tag.addPair(t.value,i,r.get(n,i));a&&T(e,a),t.overridable??=new Set,t.overridable.add(i)}}function Mt(e,t,n,r){if(e.position=t.keyPosition,kt(r))jt(e,t,n,r);else if(r.nodeKind===`sequence`&&Array.isArray(n)){n.length>100&&T(e,`abnormal merge sequence size`);for(let r of n){let n=e.nodeTags.get(r);n||T(e,`cannot merge mappings; the provided source object is unacceptable`),jt(e,t,r,n)}}else T(e,`cannot merge mappings; the provided source object is unacceptable`)}function Nt(e,t,n,r,i){if(e.position=t.keyPosition,t.keyIsMerge){Mt(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&T(e,`duplicated mapping key`);let a=t.tag.addPair(t.value,n,r);a&&T(e,a),t.overridable?.delete(n)}function Pt(e,t,n){let r=e.frames[e.frames.length-1];if(r.kind===`document`)r.value=t,r.hasValue=!0;else if(r.kind===`sequence`){kt(n)&&e.nodeTags.set(t,n);let i=r.tag.addItem(r.value,t,r.index++);i&&T(e,i)}else if(r.hasKey){let i=r.key;r.key=void 0,r.hasKey=!1,Nt(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0,r.keyIsMerge=n.tagName===Ct}function Ft(e,t,n,r,i){if(t.anchorStart!==w){let a={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),a),a}return null}function It(e,t){let n={...wt,...t,events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,nodeTags:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;n.eventIndex<n.events.length;){let e=n.events[n.eventIndex++];switch(n.position=Tt(e),e.type){case y.DOCUMENT:n.anchors=new Map,n.nodeTags=new Map,n.aliasCount=0,n.tagHandlers=Object.create(null);for(let t of e.directives)t.kind===`tag`&&(n.tagHandlers[t.handle]=t.prefix);n.frames.push({kind:`document`,position:n.position,value:void 0,hasValue:!1});break;case y.SCALAR:{let{value:t,tag:r}=Dt(n,e);Ft(n,e,t,r,!0),Pt(n,t,r);break}case y.SEQUENCE:{let t=Ot(n,e,`tag:yaml.org,2002:seq`),r=n.schema.lookupSequenceTag(t);r||T(n,`unknown sequence tag !<${t}>`);let i=r.create(t),a=Ft(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`sequence`,position:n.position,value:i,tag:r,anchor:a,index:0});break}case y.MAPPING:{let t=Ot(n,e,`tag:yaml.org,2002:map`),r=n.schema.lookupMappingTag(t);r||T(n,`unknown mapping tag !<${t}>`);let i=r.create(t),a=Ft(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`mapping`,position:n.position,value:i,tag:r,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,keyIsMerge:!1,overridable:null});break}case y.ALIAS:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&T(n,`aliases exceeded maxAliases (${n.maxAliases})`);let t=n.source.slice(e.anchorStart,e.anchorEnd),r=n.anchors.get(t);r||T(n,`unidentified alias "${t}"`),r.isValueFinal||T(n,`recursive alias "${t}" is not supported for tag ${r.tag.tagName} because it uses finalize()`),Pt(n,r.value,r.tag);break}case y.POP:{let e=n.frames.pop();if(e.kind===`mapping`&&e.hasKey&&(n.position=e.keyPosition,T(n,`incomplete mapping pair in event stream`)),e.kind===`document`)n.documents.push(e.value);else{let t=e.tag.carrierIsResult?e.value:Et(n,e.position,e.tag,e.value);e.anchor&&(e.anchor.value=t,e.anchor.isValueFinal=!0),Pt(n,t,e.tag)}break}}}return n.documents}var E=-1,Lt=Object.prototype.hasOwnProperty,D=1,Rt=2,zt=3,O=4,Bt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vt=/[,\[\]{}]/,Ht=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Ut=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,Wt=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Gt=RegExp(`^(?:${Ut})*$`),Kt=RegExp(`^(?:${Wt})+$`),qt=RegExp(`^(?:!(?:${Ut})*|${Wt}(?:${Ut})*)$`),Jt={filename:``,maxDepth:100};function Yt(e,t,n){e.events.push({type:y.DOCUMENT,explicitStart:t,explicitEnd:n,directives:e.directives})}function Xt(e,t,n,r,i,a,o){e.events.push({type:y.SEQUENCE,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function Zt(e,t,n,r,i,a,o){e.events.push({type:y.MAPPING,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function Qt(e,t){e.events.splice(t.eventsLength,0,{type:y.MAPPING,start:t.position,anchorStart:E,anchorEnd:E,tagStart:E,tagEnd:E,style:x.FLOW})}function k(e,t,n,r,i,a,o,s,c=S.CLIP,l=-1,u=!1){e.events.push({type:y.SCALAR,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:a,tagEnd:o,style:s,chomping:c,indent:l,fast:u})}function $t(e,t,n){e.events.push({type:y.ALIAS,anchorStart:t,anchorEnd:n})}function A(e){e.events.push({type:y.POP})}function j(e){k(e,E,E,E,E,E,E,b.PLAIN)}function en(){return{anchorStart:E,anchorEnd:E,tagStart:E,tagEnd:E}}function M(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function N(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function P(e,t){v.throwAt(e.input.slice(0,e.length),e.position,t,e.filename)}function F(e){return e===10||e===13}function I(e){return e===9||e===32}function L(e){return I(e)||F(e)}function R(e){return e===0||L(e)}function z(e){return e===44||e===91||e===93||e===123||e===125}function tn(e){return e>=48&&e<=57?e-48:-1}function nn(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}function rn(e){return e===120?2:e===117?4:e===85?8:0}function an(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function B(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function V(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||L(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;I(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!F(r)&&r!==0);if(!F(r))break;for(B(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function H(e,t=e.position){let n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){let n=e.input.charCodeAt(t+3);return n===0||L(n)}return!1}function on(e){e.position===e.lineStart&&e.input.charCodeAt(e.position)===65279&&(e.position++,e.lineStart=e.position)}function sn(e){if(e.position!==e.lineStart)return!1;if(H(e))return!0;if(e.input.charCodeAt(e.position)!==65279)return!1;let t=M(e);on(e),V(e,!0);let n=e.input.charCodeAt(e.position),r=e.position===e.lineStart&&(n===37||n===45&&H(e));return N(e,t),r}function cn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!F(t);)t=e.input.charCodeAt(++e.position)}function ln(e,t,n){Bt.test(e.input.slice(t,n))&&P(e,`the stream contains non-printable characters`)}function un(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==E&&P(e,`duplication of a tag property`);let r=e.position,i=!1,a=!1,o=`!`,s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(a=!0,o=`!!`,s=e.input.charCodeAt(++e.position));let c=e.position,l;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&P(e,`unexpected end of the stream within a verbatim tag`),l=e.input.slice(c,e.position),e.position++}else{for(;s!==0&&!L(s)&&!(n&&z(s));)s===33&&(a?P(e,`tag suffix cannot contain exclamation marks`):(o=e.input.slice(c-1,e.position+1),Ht.test(o)||P(e,`named tag handle cannot contain such characters`),a=!0,c=e.position+1)),s=e.input.charCodeAt(++e.position);l=e.input.slice(c,e.position),Vt.test(l)&&P(e,`tag suffix cannot contain flow indicator characters`)}return l&&!(i?Gt.test(l):Kt.test(l))&&P(e,`tag name cannot contain such characters: ${l}`),!i&&o!==`!`&&o!==`!!`&&!Lt.call(e.tagHandlers,o)&&P(e,`undeclared tag handle "${o}"`),t.tagStart=r,t.tagEnd=e.position,!0}function dn(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==E&&P(e,`duplication of an anchor property`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!L(e.input.charCodeAt(e.position))&&!z(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&P(e,`name of an anchor node must contain at least one character`),t.anchorStart=n,t.anchorEnd=e.position,!0}function fn(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==E||t.tagStart!==E)&&P(e,`alias node should not have any properties`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!L(e.input.charCodeAt(e.position))&&!z(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&P(e,`name of an alias node must contain at least one character`),$t(e,n,e.position),!0}function pn(e,t){V(e,!1),e.lineIndent<t&&P(e,`deficient indentation`)}function mn(e,t,n){if(e.input.charCodeAt(e.position)!==39)return!1;e.position++;let r=e.position,i=!0;for(;e.input.charCodeAt(e.position)!==0;){let a=e.input.charCodeAt(e.position);if(a===39){if(e.input.charCodeAt(e.position+1)===39){i=!1,e.position+=2;continue}let t=e.position;return e.position++,k(e,r,t,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,b.SINGLE_QUOTED,S.CLIP,-1,i),!0}F(a)?(i=!1,pn(e,t)):e.position===e.lineStart&&H(e)?P(e,`unexpected end of the document within a single quoted scalar`):a!==9&&a<32?P(e,`expected valid JSON character`):e.position++}P(e,`unexpected end of the stream within a single quoted scalar`)}function hn(e,t,n){if(e.input.charCodeAt(e.position)!==34)return!1;e.position++;let r=e.position,i=!0;for(;e.input.charCodeAt(e.position)!==0;){let a=e.input.charCodeAt(e.position);if(a===34){let t=e.position;return e.position++,k(e,r,t,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,b.DOUBLE_QUOTED,S.CLIP,-1,i),!0}if(a===92){i=!1;let n=e.input.charCodeAt(++e.position);if(F(n))pn(e,t);else if(an(n))e.position++;else{let t=rn(n);for(t===0&&P(e,`unknown escape sequence`);t-->0;)e.position++,nn(e.input.charCodeAt(e.position))<0&&P(e,`expected hexadecimal character`);e.position++}}else F(a)?(i=!1,pn(e,t)):e.position===e.lineStart&&H(e)?P(e,`unexpected end of the document within a double quoted scalar`):a!==9&&a<32?P(e,`expected valid JSON character`):e.position++}P(e,`unexpected end of the stream within a double quoted scalar`)}function gn(e,t,n){let r=e.input.charCodeAt(e.position),i=S.CLIP,a=-1,o=!1;if(r!==124&&r!==62)return!1;let s=r===124?b.LITERAL_BLOCK:b.FOLDED_BLOCK;for(e.position++;e.input.charCodeAt(e.position)!==0;){let n=e.input.charCodeAt(e.position),r=tn(n);if(n===43||n===45)i!==S.CLIP&&P(e,`repeat of a chomping mode identifier`),i=n===43?S.KEEP:S.STRIP,e.position++;else if(r>=0)r===0&&P(e,`bad explicit indentation width of a block scalar; it cannot be less than one`),o&&P(e,`repeat of an indentation width identifier`),a=t+r-1,o=!0,e.position++;else break}let c=!1;for(;I(e.input.charCodeAt(e.position));)c=!0,e.position++;c&&e.input.charCodeAt(e.position)===35&&cn(e),F(e.input.charCodeAt(e.position))?B(e):e.input.charCodeAt(e.position)!==0&&P(e,`a line break is expected`);let l=o?a:-1,u=0,d=e.position,f=e.position;for(;e.input.charCodeAt(e.position)!==0;){let n=e.position,r=0;for(;e.input.charCodeAt(n+r)===32;)r++;let i=e.input.charCodeAt(n+r);if(i===0){l>=0?r>l&&(f=n+r):r>0&&(f=n+r);break}if(sn(e))break;if(!o&&l===-1&&F(i)&&(u=Math.max(u,r)),!o&&l===-1&&!F(i)&&(i===9&&r<t&&(e.position=n+r,P(e,`tab characters must not be used in indentation`)),r<u&&(e.position=n+r,P(e,`bad indentation of a mapping entry`))),l===-1&&i!==0&&!F(i)&&r<t){e.lineIndent=r,e.position=n+r;break}!o&&i!==0&&!F(i)&&l===-1&&(l=r);let a=l===-1?t+1:l;if(i!==0&&!F(i)&&r<a){e.lineIndent=r,e.position=n+r;break}cn(e),f=e.position,F(e.input.charCodeAt(e.position))&&(B(e),f=e.position)}return ln(e,d,f),k(e,d,f,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,s,i,l),!0}function _n(e,t){let n=e.input.charCodeAt(e.position),r=t===D;if(n===0||L(n)||n===35||n===38||n===42||n===33||n===124||n===62||n===39||n===34||n===37||n===64||n===96||r&&z(n))return!1;if(n===63||n===45){let t=e.input.charCodeAt(e.position+1);if(R(t)||r&&z(t))return!1}return!0}function vn(e,t,n,r){if(!_n(e,n))return!1;let i=e.position,a=e.position,o=e.input.charCodeAt(e.position),s=n===D,c=!1;for(;o!==0&&!sn(e);){if(o===58){let t=e.input.charCodeAt(e.position+1);if(R(t)||s&&z(t))break}else if(o===35){if(L(e.input.charCodeAt(e.position-1)))break}else if(s&&z(o))break;else if(F(o)){let n=e.position,r=e.line,i=e.lineStart,a=e.lineIndent;if(V(e,!1),e.lineIndent>=t){c=!0,o=e.input.charCodeAt(e.position);continue}e.position=n,e.line=r,e.lineStart=i,e.lineIndent=a;break}I(o)||(a=e.position+1),o=e.input.charCodeAt(++e.position)}return a!==i&&(ln(e,i,a),k(e,i,a,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,b.PLAIN,S.CLIP,-1,!c),!0)}function U(e,t){let n=e.line;V(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&P(e,`deficient indentation`)}function yn(e,t,n){let r=e.input.charCodeAt(e.position),i=r===123,a=e.position,o=!0;if(r!==91&&r!==123)return!1;let s=i?125:93;for(i?Zt(e,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,x.FLOW):Xt(e,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,x.FLOW),e.position++;e.input.charCodeAt(e.position)!==0;){U(e,t);let n=e.input.charCodeAt(e.position);if(n===s)return e.position++,A(e),!0;o?n===44&&P(e,`expected the node content, but found ','`):P(e,`missed comma between flow collection entries`);let r=!1,a=!1;n===63&&L(e.input.charCodeAt(e.position+1))&&(r=a=!0,e.position+=1,U(e,t));let c=e.line,l=M(e),u=G(e,t,D,!1,!0);U(e,t),n=e.input.charCodeAt(e.position),(i||a||e.line===c)&&n===58?(r=!0,e.position++,U(e,t),i||Qt(e,l),u||j(e),G(e,t,D,!1,!0)||j(e),U(e,t),i||A(e)):i&&r?(u||j(e),j(e)):i?j(e):r&&(Qt(e,l),u||j(e),j(e),A(e)),n=e.input.charCodeAt(e.position),n===44?(o=!0,e.position++):o=!1}P(e,`unexpected end of the stream within a flow collection`)}function bn(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!R(e.input.charCodeAt(e.position+1)))return!1;for(Xt(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,x.BLOCK);e.input.charCodeAt(e.position)===45&&R(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,P(e,`tab characters must not be used in indentation`));let n=e.line;e.position++;let r=V(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&R(e.input.charCodeAt(e.position+1))&&P(e,`bad indentation of a sequence entry`),r&&e.lineIndent<=t?j(e):G(e,t,zt,!1,!0),V(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&P(e,`bad indentation of a sequence entry`),e.line===n&&e.input.charCodeAt(e.position)===45&&R(e.input.charCodeAt(e.position+1))&&P(e,`bad indentation of a sequence entry`)}return A(e),!0}function W(e,t,n,r){let i=!1,a=!1,o=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let c=e.input.charCodeAt(e.position);for(;c!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,P(e,`tab characters must not be used in indentation`));let l=e.input.charCodeAt(e.position+1),u=e.line;if((c===63||c===58)&&R(l))o||=(Zt(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,x.BLOCK),!0),c===63?(i&&j(e),a=!0,i=!0):i?i=!1:(j(e),a=!0,i=!1),e.position+=1,s=!0;else{i&&=(j(e),!1);let t=M(e);if(!G(e,n,Rt,!1,!0))break;if(e.line===u){for(c=e.input.charCodeAt(e.position);I(c);)c=e.input.charCodeAt(++e.position);if(c===58){if(c=e.input.charCodeAt(++e.position),R(c)||P(e,`a whitespace character is expected after the key-value separator within a block mapping`),!o){for(N(e,t),Zt(e,t.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,x.BLOCK),o=!0,G(e,n,Rt,!1,!0),c=e.input.charCodeAt(e.position);I(c);)c=e.input.charCodeAt(++e.position);e.position++}a=!0,i=!1,s=!1}else if(a)P(e,`expected ':' after a mapping key`);else return r.anchorStart!==E||r.tagStart!==E?(N(e,t),!1):!0}else if(a)P(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return r.anchorStart!==E||r.tagStart!==E?(N(e,t),!1):!0}if(G(e,t,O,!0,s)&&(s=!1),i||(s&&=(j(e),!1)),V(e,!0),c=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&c!==0)P(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return a?(i&&j(e),o&&A(e),!0):!1}function G(e,t,n,r,i,a=!0){e.depth>=e.maxDepth&&P(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let o=1,s=!1,c=!1,l=null,u=en(),d=n===O||n===zt,f=d,p=d;if(r&&V(e,!0)&&(s=!0,o=e.lineIndent>t?1:e.lineIndent===t?0:-1),o===1)for(;;){let r=e.input.charCodeAt(e.position),i=M(e);if(s&&o!==1&&(r===33||r===38))break;if(s&&p&&(u.tagStart!==E||u.anchorStart!==E)&&(r===33||r===38)){let n=M(e),r=t+1;if(W(e,e.position-e.lineStart,r,u)&&e.events[n.eventsLength]?.type===y.MAPPING)return e.depth--,!0;N(e,n)}if(s&&(r===33&&u.tagStart!==E||r===38&&u.anchorStart!==E)||!un(e,u,n===D)&&!dn(e,u))break;l===null&&(l=i),V(e,!0)?(s=!0,f=p,o=e.lineIndent>t?1:e.lineIndent===t?0:-1):f=!1}if(f&&=s||i,o===1||n===O){let r=n===D||n===Rt?t:t+1,i=e.position-e.lineStart;if(o===1){if(f&&(bn(e,i,u)||W(e,i,r,u))||yn(e,r,u))c=!0;else{let t=e.input.charCodeAt(e.position);if(l!==null&&a&&p&&!f&&t!==124&&t!==62){let t=M(e),n=l.position-l.lineStart;N(e,l),W(e,n,r,en())&&e.events[t.eventsLength]?.type===y.MAPPING?c=!0:N(e,t)}!c&&(d&&gn(e,r,u)||mn(e,r,u)||hn(e,r,u)||fn(e,u)||vn(e,r,n,u))&&(c=!0)}}else o===0&&(c=f&&bn(e,i,u))}return d&&=!c,!c&&(u.anchorStart!==E||u.tagStart!==E||d)&&(k(e,E,E,u.anchorStart,u.anchorEnd,u.tagStart,u.tagEnd,b.PLAIN),c=!0),e.depth--,c||u.anchorStart!==E||u.tagStart!==E}function xn(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!L(e.input.charCodeAt(e.position));)e.position++;let n=e.input.slice(t,e.position),r=[];for(n.length===0&&P(e,`directive name must not be less than one character in length`);e.input.charCodeAt(e.position)!==0&&!F(e.input.charCodeAt(e.position));){for(;I(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||F(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!L(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(t,e.position))}if(F(e.input.charCodeAt(e.position))&&B(e),n===`YAML`){e.directives.some(e=>e.kind===`yaml`)&&P(e,`duplication of %YAML directive`),r.length!==1&&P(e,`YAML directive accepts exactly one argument`);let t=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);t===null&&P(e,`ill-formed argument of the YAML directive`),parseInt(t[1],10)!==1&&P(e,`unacceptable YAML version of the document`),e.directives.push({kind:`yaml`,version:r[0]})}else if(n===`TAG`){r.length!==2&&P(e,`TAG directive accepts exactly two arguments`);let[t,n]=r;Ht.test(t)||P(e,`ill-formed tag handle (first argument) of the TAG directive`),Lt.call(e.tagHandlers,t)&&P(e,`there is a previously declared suffix for "${t}" tag handle`),qt.test(n)||P(e,`ill-formed tag prefix (second argument) of the TAG directive`),e.tagHandlers[t]=n,e.directives.push({kind:`tag`,handle:t,prefix:n})}return!0}function Sn(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(V(e,!0);xn(e);)t=!0,V(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&R(e.input.charCodeAt(e.position+3))){n=!0;let t=e.line;e.position+=3,V(e,!0),i=e.line>t}else t&&P(e,`directives end mark is expected`);let a=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&H(e)){e.position+=3,V(e,!0);return}if(Yt(e,n,!1),G(e,e.lineIndent-1,O,!1,i,i)||j(e),V(e,!0),e.position===e.lineStart&&H(e)&&(r=e.input.charCodeAt(e.position)===46,r)){let t=e.line;e.position+=3,V(e,!0),e.line===t&&e.position<e.length&&P(e,`end of the stream or a document separator is expected`)}let o=e.events[a];o?.type===y.DOCUMENT&&(o.explicitEnd=r),A(e),!r&&e.position<e.length&&!sn(e)&&P(e,`end of the stream or a document separator is expected`)}function Cn(e,t){let n=e.length,r={...Jt,...t,input:`${e}\0`,length:n,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},i=e.indexOf(`\0`);for(i!==-1&&v.throwAt(e,i,`null byte is not allowed in input`,r.filename);r.position<r.length&&(on(r),V(r,!0),!(r.position>=r.length));){let e=r.position;Sn(r),r.position===e&&P(r,`can not read a document`)}return r.events}var wn={...Jt,...wt};function Tn(e,t={}){let n={...wn,...t},r=String(e),i=Object.keys(Jt),a=Object.keys(wt);return It(Cn(r,Ue(n,i)),{...Ue(n,a),source:r})}function En(e,t){let n=Tn(e,t);if(n.length===0)throw new v(`expected a document, but the input is empty`);if(n.length===1)return n[0];throw new v(`expected a single document in the stream, but found more`)}var K=Symbol(`INVALID`);function Dn(e){let t=new Set([e.defaultScalarTag,e.defaultSequenceTag,e.defaultMappingTag].filter(e=>e!==void 0)),n=e.implicitScalarTags,r=e.tags.filter(e=>!(e.nodeKind===`scalar`&&e.implicit)&&!t.has(e)),i=e.tags.filter(e=>t.has(e));return[...n.map(e=>({tag:e,implicitTag:!0})),...r.map(e=>({tag:e,implicitTag:!1})),...i.map(e=>({tag:e,implicitTag:!0}))]}function On(e,t){for(let n=0,r=e.representTypes.length;n<r;n+=1){let{tag:r,implicitTag:i}=e.representTypes[n];if(r.identify(t)){let e;return e=r.matchByTagPrefix?r.representTagName(t):r.tagName,{tag:r,tagName:e,implicitTag:i}}}return null}function q(e,t){if(!e.noRefs&&typeof t==`object`&&t){let n=e.refs.get(t);if(n)return n.anchor===void 0&&(n.anchor=`ref_${e.refCounter++}`),{kind:`alias`,anchor:n.anchor}}let n=On(e,t);if(!n){if(t===void 0||e.skipInvalid)return K;throw new v(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`)}let{tag:r,tagName:i,implicitTag:a}=n,o=a?i:St(i);if(r.nodeKind===`scalar`)return{kind:`scalar`,tag:o,tagged:!a,style:b.PLAIN,value:r.represent(t)};if(r.nodeKind===`sequence`){let n=r.represent(t),i={kind:`sequence`,tag:o,tagged:!a,style:x.BLOCK,items:[]};e.noRefs||e.refs.set(t,i);for(let t=0,r=n.length;t<r;t+=1){let r=q(e,n[t]);r===K&&n[t]===void 0&&(r=q(e,null)),r!==K&&i.items.push(r)}return i}let s=r.represent(t),c={kind:`mapping`,tag:o,tagged:!a,style:x.BLOCK,items:[]};e.noRefs||e.refs.set(t,c);for(let[t,n]of s){let r=q(e,t);if(r===K)continue;let i=q(e,n);i!==K&&c.items.push({key:r,value:i})}return c}function kn(e,t,n={}){let r=q({representTypes:Dn(t),noRefs:n.noRefs??!1,skipInvalid:n.skipInvalid??!1,refs:new Map,refCounter:0},e);return[{contents:r===K?null:r,directives:[]}]}var An=Symbol(`visit:break`),jn=Symbol(`visit:skip`);function J(e,t,n){let r=t(e,n);if(r===An)return!0;if(r===jn)return!1;let i=n.depth+1;switch(e.kind){case`sequence`:for(let n of e.items)if(J(n,t,{depth:i,parent:e,isKey:!1}))return!0;break;case`mapping`:for(let{key:n,value:r}of e.items)if(J(n,t,{depth:i,parent:e,isKey:!0})||J(r,t,{depth:i,parent:e,isKey:!1}))return!0}return!1}function Mn(e,t){for(let n of e)if(n.contents&&J(n.contents,t,{depth:0,parent:null,isKey:!1}))return}function Y(e,t){return!!(e&1<<t)}var Nn={applyQuoteFlowKeysOption:Fn,doubleQuoteForInvisibles:In,doubleQuoteWhitespaceOnly:Ln,applyForceQuotesOption:Rn,tryLongOrMultilineAsBlock:zn,quoteInvalidPlain:Bn,fallbackToDoubleQuoted:Vn};function Pn(e){return e.presenterOptions.quoteStyle===`single`&&Y(e.allowedStylesMask,b.SINGLE_QUOTED)?b.SINGLE_QUOTED:b.DOUBLE_QUOTED}function Fn(e){e.presenterOptions.quoteFlowKeys&&(!e.isKey||!e.flowOnly||e.style!==b.PLAIN||(e.style=b.DOUBLE_QUOTED))}function In(e){e.style===b.PLAIN&&/[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(e.node.value)&&(e.style=b.DOUBLE_QUOTED)}function Ln(e){e.style===b.PLAIN&&/^\s+$/.test(e.node.value)&&(e.style=b.DOUBLE_QUOTED)}function Rn(e){e.presenterOptions.forceQuotes&&(e.isKey||e.style!==b.PLAIN||(e.style=e.node.value.includes(`
|
|
13
|
+
`)?b.DOUBLE_QUOTED:Pn(e)))}function zn(e){if(e.style!==b.PLAIN||e.isKey)return;let t=e.node.value,n=t.indexOf(`
|
|
14
|
+
`)!==-1;if(!Y(e.allowedStylesMask,b.LITERAL_BLOCK)){n&&(e.style=b.DOUBLE_QUOTED);return}let r=e.presenterOptions.lineWidth;if(r===-1){n&&(e.style=b.LITERAL_BLOCK);return}let i=Math.max(Math.min(r,40),r-e.shiftOfContent),a=0,o=!1;for(;a<=t.length;){let e=t.length,n=t.indexOf(`
|
|
15
|
+
`,a);n!==-1&&(e=n);let r=t.slice(a,e);if(r.length>i&&r[0]!==` `&&/ [^ \t]/.test(r)&&(o=!0),n===-1)break;a=n+1}o?e.style=b.FOLDED_BLOCK:n&&(e.style=b.LITERAL_BLOCK)}function Bn(e){e.style===b.PLAIN&&!Y(e.allowedStylesMask,b.PLAIN)&&(e.style=Pn(e))}function Vn(e){Y(e.allowedStylesMask,e.style)||(e.style=b.DOUBLE_QUOTED)}function X(e,t){return e|1<<t}var Hn=`[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]`,Un=`[\\n\\r]`,Wn=`\\uFEFF`,Gn=`[ \\t]`,Kn=`(?:(?!(?:${Un}|${Wn}))${Hn})`,Z=`(?:(?!${Gn})${Kn})`,qn=`[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]`,Jn=`[-?:,\\[\\]{}#&*!|>'"%@\`]`,Yn=`[,\\[\\]{}]`,Xn=Z,Zn=`(?:(?!${Yn})${Z})`,Qn=`(?:(?:(?!${Jn})${Z})|[?:-](?=${Xn}))`,$n=`(?:(?:(?!${Jn})${Z})|[?:-](?=${Zn}))`,er=`(?:(?:(?![:#])${Xn})|:(?=${Xn}))#*`,tr=`(?:(?:(?![:#])${Zn})|:(?=${Zn}))#*`,nr=`(?:${Gn}*${er})*`,rr=`(?:${Gn}*${tr})*`,ir=`${Qn}#*${nr}`,ar=`${$n}#*${rr}`,or=ir,sr=ar,cr=`\\n+${er}${nr}`,lr=`\\n+${tr}${rr}`,ur=`${ir}(?:${cr})*`,dr=`${ar}(?:${lr})*`,fr=RegExp(`^(?:${ur})$`,`u`),pr=RegExp(`^(?:${dr})$`,`u`),mr=RegExp(`^(?:${or})$`,`u`),hr=RegExp(`^(?:${sr})$`,`u`),gr=RegExp(`^(?:${qn})*$`,`u`),_r=RegExp(`^(?:${qn}|\\n)*$`,`u`),vr=RegExp(`^(?:${Kn}|\\n)*$`,`u`),yr=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/,br=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;function xr(e){let t=e.node.value;if(t!==``){if(!(e.isKey?e.flowOnly?hr:mr:e.flowOnly?pr:fr).test(t)||e.shiftOfFirstLine===0&&yr.test(t))return!1;if(e.shiftOfContent===0){let e=t.indexOf(`
|
|
16
|
+
`);if(e!==-1){let n=t.slice(e+1);if(br.test(n))return!1}}}let n=e.presenterOptions.schema.resolveImplicitScalarTag(t).tag.tagName;return!(!e.node.tagged&&n!==e.node.tag||!e.node.tagged&&t===`=`&&n===e.presenterOptions.schema.defaultScalarTag.tagName)}function Sr(e){let t=e.node.value;if(!(e.isKey?gr:_r).test(t)||/[ \t]\n|\n[ \t]/.test(t))return!1;if(!e.isKey&&e.shiftOfContent===0){let e=t.indexOf(`
|
|
17
|
+
`);if(e!==-1&&br.test(t.slice(e+1)))return!1}return!0}function Cr(e){if(e.flowOnly||!vr.test(e.node.value))return!1;let t=e.shiftOfContent-e.shiftOfParent;return!(t<1||t>9&&/^\n* /.test(e.node.value)||e.shiftOfContent===0&&br.test(e.node.value))}function wr(e){let t=X(0,b.DOUBLE_QUOTED);xr(e)&&(t=X(t,b.PLAIN)),Sr(e)&&(t=X(t,b.SINGLE_QUOTED)),Cr(e)&&(t=X(X(t,b.LITERAL_BLOCK),b.FOLDED_BLOCK)),e.allowedStylesMask=t}function Tr(e){switch(e.style){case b.PLAIN:return Er(e);case b.SINGLE_QUOTED:return Dr(e);case b.LITERAL_BLOCK:return Or(e);case b.FOLDED_BLOCK:return kr(e);case b.DOUBLE_QUOTED:return Ar(e)}}function Er(e){return jr(e.node.value,e.shiftOfContent)}function Dr(e){return`'${jr(e.node.value,e.shiftOfContent).replace(/'/g,`''`)}'`}function Or(e){let t=e.node.value;return`|`+Pr(t,e.shiftOfParent,e.shiftOfContent)+Fr(Mr(t,e.shiftOfContent))}function kr(e){let t=e.node.value,n=e.presenterOptions.lineWidth,r=1/0;return n!==-1&&(r=Math.max(Math.min(n,40),n-e.shiftOfContent)),`>`+Pr(t,e.shiftOfParent,e.shiftOfContent)+Fr(Mr(Rr(t,r),e.shiftOfContent))}function Ar(e){return`"${Vr(e.node.value)}"`}function jr(e,t){let n=e.indexOf(`
|
|
18
|
+
`);if(n===-1)return e;let r=` `.repeat(t),i=e.slice(0,n),a=/(\n+)([^\n]*)/g;a.lastIndex=n;let o;for(;o=a.exec(e);){let e=o[1].length,t=o[2];i+=`
|
|
19
|
+
`.repeat(e+1)+r+t}return i}function Mr(e,t){let n=` `.repeat(t),r=0,i=``,a=e.length;for(;r<a;){let t,o=e.indexOf(`
|
|
20
|
+
`,r);o===-1?(t=e.slice(r),r=a):(t=e.slice(r,o+1),r=o+1),t.length&&t!==`
|
|
21
|
+
`&&(i+=n),i+=t}return i}function Nr(e){return/^\n* /.test(e)}function Pr(e,t,n){let r=Nr(e)?String(n-t):``,i=e[e.length-1]===`
|
|
22
|
+
`;return`${r}${i&&(e[e.length-2]===`
|
|
23
|
+
`||e===`
|
|
24
|
+
`)?`+`:i?``:`-`}\n`}function Fr(e){return e[e.length-1]===`
|
|
25
|
+
`?e.slice(0,-1):e}function Ir(e){return e===` `||e===` `}function Lr(e,t){if(e===``||Ir(e[0]))return e;let n=/ [^ \t]/g,r,i=0,a,o=0,s=0,c=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`\n${e.slice(i,a)}`,i=a+1),o=s;return c+=`
|
|
26
|
+
`,e.length-i>t&&o>i?c+=`${e.slice(i,o)}\n${e.slice(o+1)}`:c+=e.slice(i),c.slice(1)}function Rr(e,t){let n=/(\n+)([^\n]*)/g,r=e.indexOf(`
|
|
27
|
+
`);r===-1&&(r=e.length),n.lastIndex=r;let i=Lr(e.slice(0,r),t),a=e[0]===`
|
|
28
|
+
`||Ir(e[0]),o,s;for(;s=n.exec(e);){let e=s[1],n=s[2];o=n!==``&&Ir(n[0]),i+=e+(!a&&!o&&n!==``?`
|
|
29
|
+
`:``)+Lr(n,t),a=o}return i}var zr=/["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;function Br(e){switch(e){case`\0`:return`\\0`;case`\x07`:return`\\a`;case`\b`:return`\\b`;case` `:return`\\t`;case`
|
|
30
|
+
`:return`\\n`;case`\v`:return`\\v`;case`\f`:return`\\f`;case`\r`:return`\\r`;case`\x1B`:return`\\e`;case`"`:return`\\"`;case`\\`:return`\\\\`;case`
`:return`\\N`;case`\xA0`:return`\\_`;case`\u2028`:return`\\L`;case`\u2029`:return`\\P`}let t=e.charCodeAt(0),n=t.toString(16).toUpperCase();return t<=255?`\\x${`0`.repeat(2-n.length)}${n}`:`\\u${`0`.repeat(4-n.length)}${n}`}function Vr(e){return e.replace(zr,Br)}var Q=10,Hr={indent:2,seqNoIndent:!1,seqInlineFirst:!0,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:`single`,forceQuotes:!1,scalarStyleRules:Object.keys(Nn).map(e=>Reflect.get(Nn,e)),tagBeforeAnchor:!1};function Ur(e){return e.tagged?e.tag:St(e.tag)}function Wr(e){let t={...Hr,...e};return t.flowSkipColonSpace&&(t.quoteFlowKeys=!0),{...t,defaultScalarTagName:t.schema.defaultScalarTag.tagName,openEnded:!1}}function Gr(e,t){return`\n${` `.repeat(e.indent*t)}`}function Kr(e,t,n,r,i,a){return{node:t,parent:n,level:r,isKey:i,flowOnly:a,shiftOfParent:r===0?-1:e.indent*(r-1),shiftOfContent:e.indent*Math.max(1,r),shiftOfFirstLine:r===0?0:e.indent*r,presenterOptions:e,allowedStylesMask:0,style:t.style}}function qr(e,t,n){let r=``;for(let i=0,a=n.items.length;i<a;i+=1){let a=$(e,t,n.items[i],n,{}).text;i>0&&(r+=`,${e.flowSkipCommaSpace?``:` `}`),r+=a}let i=e.flowBracketPadding&&n.items.length>0?` `:``;return`[${i}${r}${i}]`}function Jr(e,t,n,r){let i=``;for(let a=0,o=n.items.length;a<o;a+=1){let o=$(e,t+1,n.items[a],n,{block:!0,compact:e.seqInlineFirst,isblockseq:!0}).text;(!r||i!==``)&&(i+=Gr(e,t)),o===``||Q===o.charCodeAt(0)?i+=`-`:i+=`- `,i+=o}return i}function Yr(e,t,n){let r=``;for(let{key:i,value:a}of n.items){let o=``;r!==``&&(o+=`,${e.flowSkipCommaSpace?``:` `}`);let s=$(e,t,i,n,{iskey:!0}),c=s.text,l=$(e,t,a,n,{}).text,u=e.flowSkipColonSpace||l===``?``:` `,d=i.kind===`scalar`&&s.noBody&&(i.tagged||i.anchor!==void 0),f=i.kind===`alias`||d?` `:``;o+=`${c}${f}:${u}${l}`,r+=o}let i=e.flowBracketPadding&&r!==``?` `:``;return`{${i}${r}${i}}`}function Xr(e,t,n,r){let i=``;for(let a=0,o=n.items.length;a<o;a+=1){let o=``;(!r||i!==``)&&(o+=Gr(e,t));let{key:s,value:c}=n.items[a],l=(s.kind===`mapping`||s.kind===`sequence`)&&s.style===x.BLOCK&&s.items.length!==0||s.kind===`scalar`&&(s.style===b.LITERAL_BLOCK||s.style===b.FOLDED_BLOCK),u=l?$(e,t+1,s,n,{block:!0,compact:!0,isblockseq:!Zr(e,s,t+1)}):$(e,t+1,s,n,{block:!0,compact:!0,iskey:!0}),d=u.text,f=s.kind===`scalar`&&s.value.indexOf(`
|
|
31
|
+
`)!==-1,p=d.length>1024&&/^[\s\S]{1025}/u.test(d),m=l||f||p;m&&(d&&Q===d.charCodeAt(0)?o+=`?`:o+=`? `),o+=d,m&&(o+=Gr(e,t));let h=$(e,t+1,c,n,{block:!0,compact:m,isblockseq:m&&!Zr(e,c,t+1)}).text,ee=s.kind===`scalar`&&u.noBody&&(s.tagged||s.anchor!==void 0),te=!m&&(s.kind===`alias`||ee)?` `:``;h===``||Q===h.charCodeAt(0)?o+=`${te}:`:o+=`${te}: `,o+=h,i+=o}return i}function Zr(e,t,n){return t.kind===`alias`||t.tagged||t.anchor!==void 0||e.indent<2&&n>0}function $(e,t,n,r,i){if(n.kind===`alias`)return e.openEnded=!1,{text:`*${n.anchor}`,noBody:!1};let{block:a=!1,iskey:o=!1,isblockseq:s=!1}=i,c=i.compact??!1,l=n.anchor!==void 0;Zr(e,n,t)&&(c=!1);let u,d=n.tagged,f=a&&(n.kind===`mapping`||n.kind===`sequence`)&&n.style===x.BLOCK&&n.items.length!==0;if(n.kind===`mapping`)u=f?Xr(e,t,n,c):Yr(e,t,n);else if(n.kind===`sequence`)u=f?e.seqNoIndent&&!s&&t>0?Jr(e,t-1,n,c):Jr(e,t,n,c):qr(e,t,n);else{let i=Kr(e,n,r,t,o,!a);wr(i);for(let t of e.scalarStyleRules)t(i);u=Tr(i),e.openEnded=(i.style===b.LITERAL_BLOCK||i.style===b.FOLDED_BLOCK)&&(n.value===`
|
|
32
|
+
`||n.value.endsWith(`
|
|
33
|
+
|
|
34
|
+
`)),d=n.tagged||u===``&&i.flowOnly&&r?.kind===`sequence`&&!l||i.style!==b.PLAIN&&n.tag!==e.defaultScalarTagName}(n.kind===`mapping`||n.kind===`sequence`)&&!f&&(e.openEnded=!1),f&&c&&t>0&&e.indent>2&&(u=`${` `.repeat(e.indent-2)}${u}`);let p=u===``,m=u;if(d||l){let t=[],r=d?Ur(n):null,i=l?`&${n.anchor}`:null;e.tagBeforeAnchor?(r!==null&&t.push(r),i!==null&&t.push(i)):(i!==null&&t.push(i),r!==null&&t.push(r));let a=u===``||u.charCodeAt(0)===Q?``:` `;m=`${t.join(` `)}${a}${u}`}return{text:m,noBody:p}}function Qr(e){return(e.kind===`sequence`||e.kind===`mapping`)&&e.style===x.BLOCK&&e.items.length!==0&&!e.tagged&&e.anchor===void 0}function $r(e){let t=``;for(let n of e.directives){if(n.kind===`yaml`){t+=`%YAML ${n.version}\n`;continue}let{handle:e,prefix:r}=n;t+=`%TAG ${e} ${r}\n`}return t}function ei(e,t){let n=Wr(t),r=``,i=!1;for(let t=0;t<e.length;t+=1){let a=e[t];n.openEnded=!1;let o=$r(a),s=o!==``,c=a.explicitStart||s||t>0&&!i;if(r+=o,a.contents===null)c&&(r+=`---
|
|
35
|
+
`);else if(c){let e=$(n,0,a.contents,null,{block:!0,compact:!0}).text,t=e===``?``:s||Qr(a.contents)?`
|
|
36
|
+
`:` `;r+=`---${t}${e}\n`}else r+=$(n,0,a.contents,null,{block:!0,compact:!0}).text+`
|
|
37
|
+
`;i=a.explicitEnd||n.openEnded,i&&(r+=`...
|
|
38
|
+
`)}return r}var ti={...Hr,schema:$e,skipInvalid:!1,noRefs:!1,flowLevel:-1,sortKeys:!1,transform:()=>{}};function ni(e,t){let n=String(e),r=String(t);return n<r?-1:+(n>r)}function ri(e,t={}){let n={...ti,...t},r=kn(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});if(n.flowLevel>=0&&Mn(r,(e,t)=>{if(!(t.depth<n.flowLevel))return(e.kind===`sequence`||e.kind===`mapping`)&&(e.style=x.FLOW),jn}),n.sortKeys){let e=n.sortKeys===!0?ni:n.sortKeys;Mn(r,t=>{t.kind===`mapping`&&t.items.sort((t,n)=>e(t.key.kind===`scalar`?t.key.value:``,n.key.kind===`scalar`?n.key.value:``))})}return n.transform(r),ei(r,{...Ue(n,Object.keys(Hr)),schema:n.schema})}y.DOCUMENT,y.SEQUENCE,y.MAPPING,y.SCALAR,y.ALIAS,y.POP,b.PLAIN,b.SINGLE_QUOTED,b.DOUBLE_QUOTED,b.LITERAL_BLOCK,b.FOLDED_BLOCK,x.BLOCK,x.FLOW,S.CLIP,S.STRIP,S.KEEP;export{v as YAMLException,ri as dump,En as load};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{__commonJSMin as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{t.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,t.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,t.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/})),n=e(((e,n)=>{let r=t();n.exports={isSpaceSeparator(e){return typeof e==`string`&&r.Space_Separator.test(e)},isIdStartChar(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||r.ID_Start.test(e))},isIdContinueChar(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||r.ID_Continue.test(e))},isDigit(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}}})),r=e(((e,t)=>{let r=n(),i,a,o,s,c,l,u,d,f;t.exports=function(e,t){i=String(e),a=`start`,o=[],s=0,c=1,l=0,u=void 0,d=void 0,f=void 0;do u=y(),O[a]();while(u.type!==`eof`);return typeof t==`function`?p({"":f},``,t):f};function p(e,t,n){let r=e[t];if(typeof r==`object`&&r){if(Array.isArray(r))for(let e=0;e<r.length;e++){let t=String(e),i=p(r,t,n);i===void 0?delete r[t]:Object.defineProperty(r,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let e in r){let t=p(r,e,n);t===void 0?delete r[e]:Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}}return n.call(e,t,r)}let m,h,g,_,v;function y(){for(m=`default`,h=``,g=!1,_=1;;){v=b();let e=S[m]();if(e)return e}}function b(){if(i[s])return String.fromCodePoint(i.codePointAt(s))}function x(){let e=b();return e===`
|
|
2
|
+
`?(c++,l=0):e?l+=e.length:l++,e&&(s+=e.length),e}let S={default(){switch(v){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
3
|
+
`:case`\r`:case`\u2028`:case`\u2029`:x();return;case`/`:x(),m=`comment`;return;case void 0:return x(),C(`eof`)}if(r.isSpaceSeparator(v)){x();return}return S[a]()},comment(){switch(v){case`*`:x(),m=`multiLineComment`;return;case`/`:x(),m=`singleLineComment`;return}throw j(x())},multiLineComment(){switch(v){case`*`:x(),m=`multiLineCommentAsterisk`;return;case void 0:throw j(x())}x()},multiLineCommentAsterisk(){switch(v){case`*`:x();return;case`/`:x(),m=`default`;return;case void 0:throw j(x())}x(),m=`multiLineComment`},singleLineComment(){switch(v){case`
|
|
4
|
+
`:case`\r`:case`\u2028`:case`\u2029`:x(),m=`default`;return;case void 0:return x(),C(`eof`)}x()},value(){switch(v){case`{`:case`[`:return C(`punctuator`,x());case`n`:return x(),w(`ull`),C(`null`,null);case`t`:return x(),w(`rue`),C(`boolean`,!0);case`f`:return x(),w(`alse`),C(`boolean`,!1);case`-`:case`+`:x()===`-`&&(_=-1),m=`sign`;return;case`.`:h=x(),m=`decimalPointLeading`;return;case`0`:h=x(),m=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:h=x(),m=`decimalInteger`;return;case`I`:return x(),w(`nfinity`),C(`numeric`,1/0);case`N`:return x(),w(`aN`),C(`numeric`,NaN);case`"`:case`'`:g=x()===`"`,h=``,m=`string`;return}throw j(x())},identifierNameStartEscape(){if(v!==`u`)throw j(x());x();let e=D();switch(e){case`$`:case`_`:break;default:if(!r.isIdStartChar(e))throw N()}h+=e,m=`identifierName`},identifierName(){switch(v){case`$`:case`_`:case``:case``:h+=x();return;case`\\`:x(),m=`identifierNameEscape`;return}if(r.isIdContinueChar(v)){h+=x();return}return C(`identifier`,h)},identifierNameEscape(){if(v!==`u`)throw j(x());x();let e=D();switch(e){case`$`:case`_`:case``:case``:break;default:if(!r.isIdContinueChar(e))throw N()}h+=e,m=`identifierName`},sign(){switch(v){case`.`:h=x(),m=`decimalPointLeading`;return;case`0`:h=x(),m=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:h=x(),m=`decimalInteger`;return;case`I`:return x(),w(`nfinity`),C(`numeric`,_*(1/0));case`N`:return x(),w(`aN`),C(`numeric`,NaN)}throw j(x())},zero(){switch(v){case`.`:h+=x(),m=`decimalPoint`;return;case`e`:case`E`:h+=x(),m=`decimalExponent`;return;case`x`:case`X`:h+=x(),m=`hexadecimal`;return}return C(`numeric`,_*0)},decimalInteger(){switch(v){case`.`:h+=x(),m=`decimalPoint`;return;case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},decimalPointLeading(){if(r.isDigit(v)){h+=x(),m=`decimalFraction`;return}throw j(x())},decimalPoint(){switch(v){case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x(),m=`decimalFraction`;return}return C(`numeric`,_*Number(h))},decimalFraction(){switch(v){case`e`:case`E`:h+=x(),m=`decimalExponent`;return}if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},decimalExponent(){switch(v){case`+`:case`-`:h+=x(),m=`decimalExponentSign`;return}if(r.isDigit(v)){h+=x(),m=`decimalExponentInteger`;return}throw j(x())},decimalExponentSign(){if(r.isDigit(v)){h+=x(),m=`decimalExponentInteger`;return}throw j(x())},decimalExponentInteger(){if(r.isDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},hexadecimal(){if(r.isHexDigit(v)){h+=x(),m=`hexadecimalInteger`;return}throw j(x())},hexadecimalInteger(){if(r.isHexDigit(v)){h+=x();return}return C(`numeric`,_*Number(h))},string(){switch(v){case`\\`:x(),h+=T();return;case`"`:if(g)return x(),C(`string`,h);h+=x();return;case`'`:if(!g)return x(),C(`string`,h);h+=x();return;case`
|
|
5
|
+
`:case`\r`:throw j(x());case`\u2028`:case`\u2029`:P(v);break;case void 0:throw j(x())}h+=x()},start(){switch(v){case`{`:case`[`:return C(`punctuator`,x())}m=`value`},beforePropertyName(){switch(v){case`$`:case`_`:h=x(),m=`identifierName`;return;case`\\`:x(),m=`identifierNameStartEscape`;return;case`}`:return C(`punctuator`,x());case`"`:case`'`:g=x()===`"`,m=`string`;return}if(r.isIdStartChar(v)){h+=x(),m=`identifierName`;return}throw j(x())},afterPropertyName(){if(v===`:`)return C(`punctuator`,x());throw j(x())},beforePropertyValue(){m=`value`},afterPropertyValue(){switch(v){case`,`:case`}`:return C(`punctuator`,x())}throw j(x())},beforeArrayValue(){if(v===`]`)return C(`punctuator`,x());m=`value`},afterArrayValue(){switch(v){case`,`:case`]`:return C(`punctuator`,x())}throw j(x())},end(){throw j(x())}};function C(e,t){return{type:e,value:t,line:c,column:l}}function w(e){for(let t of e){if(b()!==t)throw j(x());x()}}function T(){switch(b()){case`b`:return x(),`\b`;case`f`:return x(),`\f`;case`n`:return x(),`
|
|
6
|
+
`;case`r`:return x(),`\r`;case`t`:return x(),` `;case`v`:return x(),`\v`;case`0`:if(x(),r.isDigit(b()))throw j(x());return`\0`;case`x`:return x(),E();case`u`:return x(),D();case`
|
|
7
|
+
`:case`\u2028`:case`\u2029`:return x(),``;case`\r`:return x(),b()===`
|
|
8
|
+
`&&x(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw j(x());case void 0:throw j(x())}return x()}function E(){let e=``,t=b();if(!r.isHexDigit(t)||(e+=x(),t=b(),!r.isHexDigit(t)))throw j(x());return e+=x(),String.fromCodePoint(parseInt(e,16))}function D(){let e=``,t=4;for(;t-->0;){let t=b();if(!r.isHexDigit(t))throw j(x());e+=x()}return String.fromCodePoint(parseInt(e,16))}let O={start(){if(u.type===`eof`)throw M();k()},beforePropertyName(){switch(u.type){case`identifier`:case`string`:d=u.value,a=`afterPropertyName`;return;case`punctuator`:A();return;case`eof`:throw M()}},afterPropertyName(){if(u.type===`eof`)throw M();a=`beforePropertyValue`},beforePropertyValue(){if(u.type===`eof`)throw M();k()},beforeArrayValue(){if(u.type===`eof`)throw M();if(u.type===`punctuator`&&u.value===`]`){A();return}k()},afterPropertyValue(){if(u.type===`eof`)throw M();switch(u.value){case`,`:a=`beforePropertyName`;return;case`}`:A()}},afterArrayValue(){if(u.type===`eof`)throw M();switch(u.value){case`,`:a=`beforeArrayValue`;return;case`]`:A()}},end(){}};function k(){let e;switch(u.type){case`punctuator`:switch(u.value){case`{`:e={};break;case`[`:e=[]}break;case`null`:case`boolean`:case`numeric`:case`string`:e=u.value}if(f===void 0)f=e;else{let t=o[o.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,d,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)o.push(e),a=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{let e=o[o.length-1];a=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}}function A(){o.pop();let e=o[o.length-1];a=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function j(e){return I(e===void 0?`JSON5: invalid end of input at ${c}:${l}`:`JSON5: invalid character '${F(e)}' at ${c}:${l}`)}function M(){return I(`JSON5: invalid end of input at ${c}:${l}`)}function N(){return l-=5,I(`JSON5: invalid identifier character at ${c}:${l}`)}function P(e){console.warn(`JSON5: '${F(e)}' in strings is not valid ECMAScript; consider escaping`)}function F(e){let t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){let t=e.charCodeAt(0).toString(16);return`\\x`+(`00`+t).substring(t.length)}return e}function I(e){let t=SyntaxError(e);return t.lineNumber=c,t.columnNumber=l,t}})),i=e(((e,t)=>{let r=n();t.exports=function(e,t,n){let i=[],a=``,o,s,c=``,l;if(typeof t==`object`&&t&&!Array.isArray(t)&&(n=t.space,l=t.quote,t=t.replacer),typeof t==`function`)s=t;else if(Array.isArray(t)){o=[];for(let e of t){let t;typeof e==`string`?t=e:(typeof e==`number`||e instanceof String||e instanceof Number)&&(t=String(e)),t!==void 0&&o.indexOf(t)<0&&o.push(t)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n==`number`?n>0&&(n=Math.min(10,Math.floor(n)),c=` `.substr(0,n)):typeof n==`string`&&(c=n.substr(0,10)),u(``,{"":e});function u(e,t){let n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),s&&(n=s.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return d(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?m(n):f(n)}function d(e){let t={"'":.1,'"':.2},n={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},i=``;for(let a=0;a<e.length;a++){let o=e[a];switch(o){case`'`:case`"`:t[o]++,i+=o;continue;case`\0`:if(r.isDigit(e[a+1])){i+=`\\x00`;continue}}if(n[o]){i+=n[o];continue}if(o<` `){let e=o.charCodeAt(0).toString(16);i+=`\\x`+(`00`+e).substring(e.length);continue}i+=o}let a=l||Object.keys(t).reduce((e,n)=>t[e]<t[n]?e:n);return i=i.replace(new RegExp(a,`g`),n[a]),a+i+a}function f(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=o||Object.keys(e),r=[];for(let t of n){let n=u(t,e);if(n!==void 0){let e=p(t)+`:`;c!==``&&(e+=` `),e+=n,r.push(e)}}let s;if(r.length===0)s=`{}`;else{let e;if(c===``)e=r.join(`,`),s=`{`+e+`}`;else{let n=`,
|
|
9
|
+
`+a;e=r.join(n),s=`{
|
|
10
|
+
`+a+e+`,
|
|
11
|
+
`+t+`}`}}return i.pop(),a=t,s}function p(e){if(e.length===0)return d(e,!0);let t=String.fromCodePoint(e.codePointAt(0));if(!r.isIdStartChar(t))return d(e,!0);for(let n=t.length;n<e.length;n++)if(!r.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return d(e,!0);return e}function m(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=[];for(let t=0;t<e.length;t++){let r=u(String(t),e);n.push(r===void 0?`null`:r)}let r;if(n.length===0)r=`[]`;else if(c===``)r=`[`+n.join(`,`)+`]`;else{let e=`,
|
|
12
|
+
`+a,i=n.join(e);r=`[
|
|
13
|
+
`+a+i+`,
|
|
14
|
+
`+t+`]`}return i.pop(),a=t,r}}}));export{r as require_parse,i as require_stringify};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
let e=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var t=class t extends Date{#e=!1;#t=!1;#n=null;constructor(t){let n=!0,r=!0,i=`Z`;if(typeof t==`string`){let a=t.match(e);a?(a[1]||(n=!1,t=`0000-01-01T${t}`),r=!!a[2],r&&t[10]===` `&&(t=t.replace(` `,`T`)),a[2]&&+a[2]>23?t=``:(i=a[3]||null,t=t.toUpperCase(),!i&&r&&(t+=`Z`))):t=``}super(t),isNaN(this.getTime())||(this.#e=n,this.#t=r,this.#n=i)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(e,n=`Z`){let r=new t(e);return r.#n=n,r}static wrapAsLocalDateTime(e){let n=new t(e);return n.#n=null,n}static wrapAsLocalDate(e){let n=new t(e);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(e){let n=new t(e);return n.#e=!1,n.#n=null,n}};function n(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function r(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
|
2
|
+
`,e===t&&(i+=` `.repeat(a+n+2),i+=`^
|
|
3
|
+
`))}return i}var i=class extends Error{line;column;codeblock;constructor(e,t){let[i,a]=n(t.toml,t.ptr),o=r(t.toml,i,a);super(`Invalid TOML document: ${e}\n\n${o}`,t),this.line=i,this.column=a,this.codeblock=o}};function a(e,t=0){let n=e.indexOf(`
|
|
4
|
+
`,t);return e.charCodeAt(n-1)===13&&n--,n}function o(e){for(;e.p<e.s.length;e.p++){let t=e.s.charCodeAt(e.p);if(t===10)break;if(t===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}if(t<32&&t!==9||t===127)throw new i(`control characters are not allowed in comments`,{toml:e.s,ptr:e.p})}}function s(e,t,n){let r;for(;;){for(;(r=e.s.charCodeAt(e.p))===32||r===9||!t&&(r===10||r===13&&e.s.charCodeAt(e.p+1)===10);)e.p++;if(n||r!==35)break;o(e)}}function c(e,t,n){let r=e.p;if(!n){r=a(e.s,r),e.p=r<0?e.s.length:r;return}for(;e.p<e.s.length;e.p++){let r=e.s.charCodeAt(e.p);if(r===35)o(e);else if(r===n||r===t)return}throw new i(`cannot find end of structure`,{toml:e.s,ptr:r})}let l=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,u=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,d=/^[+-]?0[0-9_]/;function f(e){let t=e.p,n=e.s.charCodeAt(e.p++),r=n,a=n===39,o=n===e.s.charCodeAt(e.p)&&n===e.s.charCodeAt(e.p+1);o&&((n=e.s.charCodeAt(e.p+=2))===10?e.p++:n===13&&e.s.charCodeAt(e.p+1)===10&&(e.p+=2));let s=``,c=e.p,l=0;for(;e.p<e.s.length;e.p++)if(n=e.s.charCodeAt(e.p),o&&(n===10||n===13&&e.s.charCodeAt(e.p+1)===10))l&&=3;else if(n<32&&n!==9||n===127)throw new i(`control characters are not allowed in strings`,{toml:e.s,ptr:e.p});else if((!l||l===3)&&n===r&&(!o||e.s.charCodeAt(e.p+1)===r&&e.s.charCodeAt(e.p+2)===r))return o&&(e.s.charCodeAt(e.p+3)===r&&e.p++,e.s.charCodeAt(e.p+3)===r&&e.p++),l||(s+=e.s.slice(c,e.p)),e.p+=o?3:1,s;else if(!l)!a&&n===92&&(s+=e.s.slice(c,c=e.p),l=1);else if(l===1){if(n===120||n===117||n===85){let t=0,r=n===120?2:n===117?4:8;for(let n=0;n<r;n++,e.p++){let n=e.s.charCodeAt(e.p+1),r=n>=48&&n<=57?n-48:n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:-1;if(r<0)throw new i(`invalid non-hex character in unicode escape`,{toml:e.s,ptr:e.p+1});t=t<<4|r}if(t<0||t>1114111||t>=55296&&t<=57343)throw new i(`invalid unicode escape`,{toml:e.s,ptr:e.p});s+=String.fromCodePoint(t),c=e.p+1,l=0}else if(n===32||n===9)l=2;else{if(n===98)s+=`\b`;else if(n===116)s+=` `;else if(n===110)s+=`
|
|
5
|
+
`;else if(n===102)s+=`\f`;else if(n===114)s+=`\r`;else if(n===101)s+=`\x1B`;else if(n===34)s+=`"`;else if(n===92)s+=`\\`;else throw new i(`unrecognized escape sequence`,{toml:e.s,ptr:e.p});c=e.p+1,l=0}}else if(n!==32&&n!==9){if(l===2)throw new i(`invalid escape: only line-ending whitespace may be escaped`,{toml:e.s,ptr:c});l=+(!a&&n===92),c=e.p}throw new i(`unfinished string`,{toml:e.s,ptr:t})}function p(e,t,n){let r=e.s.slice(t,n),i=r.indexOf(`#`);return i>0&&(o({s:r,p:i,d:0}),r=r.slice(0,i)),r.trimEnd()}function m(e,n,r){let a=e.p,o={toml:e.s,ptr:a};c(e,44,r);let s=p(e,a,e.p);if(!s)throw new i(`incomplete declaration: value expected`,o);if(s===`-inf`)return-1/0;if(s===`inf`||s===`+inf`)return 1/0;if(s===`nan`||s===`+nan`||s===`-nan`)return NaN;if(s===`-0`)return n?0n:0;let f=l.test(s);if(f||u.test(s)){if(d.test(s))throw new i(`leading zeroes are not allowed`,o);s=s.replace(/_/g,``);let e=+s;if(isNaN(e))throw new i(`invalid number`,o);if(f){if((f=!Number.isSafeInteger(e))&&!n)throw new i(`integer value cannot be represented losslessly`,o);(f||n===!0)&&(e=BigInt(s))}return e}let m=new t(s);if(!m.isValid())throw new i(`invalid value`,o);return m}function h(e,t,n){let r=e.p,a=e.s.charCodeAt(r);if(a===91||a===123){if(!e.d--)throw new i(`document contains excessively nested structures. aborting.`,{toml:e.s,ptr:r});let t=a===91?y(e,n):v(e,n);return e.d++,t}if(a===34||a===39)return f(e);if(a===116){if(e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)throw new i(`invalid value`,{toml:e.s,ptr:r});return e.p++,!0}if(a===102){if(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)throw new i(`invalid value`,{toml:e.s,ptr:r});return e.p++,!1}return m(e,n,t)}let g=/^[a-zA-Z0-9-_]+[ \t]*$/;function _(e,t=`=`){let n=e.p,r=n-1,o=[],c=e.s.indexOf(t,n);if(c<0)throw new i(`incomplete key-value: cannot find end of key`,{toml:e.s,ptr:n});do{let s=e.s.charCodeAt(e.p=++r);if(s!==32&&s!==9){if(s===34||s===39){if(s===e.s.charCodeAt(e.p+1)&&s===e.s.charCodeAt(e.p+2))throw new i(`multiline strings are not allowed in keys`,{toml:e.s,ptr:e.p});let l=f(e);r=e.s.indexOf(`.`,e.p);let u=e.s.slice(e.p,r<0||r>c?c:r),d=a(u);if(d>-1)throw new i(`newlines are not allowed in keys`,{toml:e.s,ptr:d});if(u.trimStart())throw new i(`found extra tokens after the string part`,{toml:e.s,ptr:e.p});if(c<e.p&&(c=e.s.indexOf(t,e.p),c<0))throw new i(`incomplete key-value: cannot find end of key`,{toml:e.s,ptr:n});o.push(l)}else{r=e.s.indexOf(`.`,e.p);let t=e.s.slice(e.p,r<0||r>c?c:r);if(!g.test(t))throw new i(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e.s,ptr:e.p});o.push(t.trimEnd())}}}while(r+1&&r<c);return e.p=c+1,s(e,!0,!0),o}function v(e,t){let n={},r=new Set,a;for(e.p++;e.p<e.s.length;){if(s(e),(a=e.s.charCodeAt(e.p))===125)return e.p++,n;let o,c=n,l=!1,u=e.p,d=_(e);for(let t=0;t<d.length;t++){if(t&&(c=l?c[o]:c[o]={}),o=d[t],(l=Object.hasOwn(c,o))&&(typeof c[o]!=`object`||r.has(c[o])))throw new i(`trying to redefine an already defined value`,{toml:e.s,ptr:u});!l&&o===`__proto__`&&Object.defineProperty(c,o,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new i(`trying to redefine an already defined value`,{toml:e.s,ptr:e.p});let f=h(e,125,t);if(r.add(c[o]=f),s(e),(a=e.s.charCodeAt(e.p++))===125)return n;if(a!==44)throw new i(`expected comma or end of structure`,{toml:e.s,ptr:e.p-1})}throw new i(`unfinished table encountered`,{toml:e.s,ptr:e.p})}function y(e,t){let n=[],r;for(e.p++;e.p<e.s.length;){if(s(e),(r=e.s.charCodeAt(e.p))===93)return e.p++,n;if(n.push(h(e,93,t)),s(e),(r=e.s.charCodeAt(e.p++))===93)return n;if(r!==44)throw new i(`expected comma or end of structure`,{toml:e.s,ptr:e.p-1})}throw new i(`unfinished array encountered`,{toml:e.s,ptr:e.p})}function b(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&(r!==1||c.t!==3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function x(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={s:e,p:0,d:t},a={},o={},c,l=a,u=o;for(s(r);r.p<e.length;){if(e.charCodeAt(r.p)===91){let t=e.charCodeAt(++r.p)===91;c=r.p+=+t;let n=_(r,`]`);if(t){if(e.charCodeAt(r.p-1)!==93)throw new i(`expected end of table declaration`,{toml:e,ptr:r.p-1});r.p++}let s=b(n,a,o,t?2:1);if(!s)throw new i(`trying to redefine an already defined table or value`,{toml:e,ptr:c});u=s[2],l=s[1]}else{c=r.p;let t=b(_(r),l,u,0);if(!t)throw new i(`trying to redefine an already defined table or value`,{toml:e,ptr:c});t[1][t[0]]=h(r,void 0,n)}if(s(r,!0),r.p<e.length&&(c=e.charCodeAt(r.p))!==10&&c!==13)throw new i(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:r.p});s(r)}return a}let S=/^[a-z0-9-_]+$/i;function C(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(typeof e?.getUTCDate==`function`&&e instanceof Date)return`date`;if(globalThis.Temporal&&typeof e?.since==`function`&&(e instanceof Temporal.Instant||e instanceof Temporal.PlainDate||e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainTime||e instanceof Temporal.ZonedDateTime))return`temporal`}return t}function w(e){for(let t=0;t<e.length;t++)if(C(e[t])!==`object`)return!1;return e.length!=0}function T(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function E(e){return e.toString({calendarName:`never`,timeZoneName:`never`})}function D(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);switch(t){case`number`:if(isNaN(e))return`nan`;if(e===1/0)return`inf`;if(e===-1/0)return`-inf`;if(Number.isInteger(e)&&(r||!Number.isSafeInteger(e)))return e.toFixed(1);case`bigint`:case`boolean`:return e.toString();case`string`:return T(e);case`date`:if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString();case`object`:return O(e,n,r);case`array`:return k(e,n,r);case`temporal`:return E(e)}}function O(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=S.test(o)?o:T(o),i+=` = `,i+=D(e[o],C(e[o]),t-1,n)}return i+` }`}function k(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=D(e[i],C(e[i]),t-1,n)}return r+` ]`}function A(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
|
|
6
|
+
`}[[${t}]]\n`,i+=j(0,e[a],t,n,r);return i}function j(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=C(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=S.test(c)?c:T(c);if(e===`array`&&w(t[c]))o+=(o&&`
|
|
7
|
+
`)+A(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
|
|
8
|
+
`)+j(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=D(t[c],e,r,i),a+=`
|
|
9
|
+
`}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function M(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(C(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=j(0,e,``,t,n);return r[r.length-1]===`
|
|
10
|
+
`?r:r+`
|
|
11
|
+
`}export{x as parse,M as stringify};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e=Symbol(`singleComment`),t=Symbol(`multiComment`),n=()=>``,r=(e,t,n)=>e.slice(t,n).replace(/[^ \t\r\n]/g,` `),i=(e,t)=>{let n=t-1,r=0;for(;e[n]===`\\`;)--n,r+=1;return!!(r%2)};function a(a,{whitespace:o=!0,trailingCommas:s=!1}={}){if(typeof a!=`string`)throw TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof a}\``);let c=o?r:n,l=!1,u=!1,d=0,f=``,p=``,m=-1;for(let n=0;n<a.length;n++){let r=a[n],o=a[n+1];if(!u&&r===`"`&&(i(a,n)||(l=!l)),!l){if(!u&&r+o===`//`)f+=a.slice(d,n),d=n,u=e,n++;else if(u===e&&r+o===`\r
|
|
2
|
+
`){n++,u=!1,f+=c(a,d,n),d=n;continue}else if(u===e&&r===`
|
|
3
|
+
`)u=!1,f+=c(a,d,n),d=n;else if(!u&&r+o===`/*`){f+=a.slice(d,n),d=n,u=t,n++;continue}else if(u===t&&r+o===`*/`){n++,u=!1,f+=c(a,d,n+1),d=n+1;continue}else s&&!u&&(m===-1?r===`,`&&(p+=f+a.slice(d,n),f=``,d=n,m=n):r===`}`||r===`]`?(f+=a.slice(d,n),p+=c(f,0,1)+f.slice(1),f=``,d=n,m=-1):r!==` `&&r!==` `&&r!==`\r`&&r!==`
|
|
4
|
+
`&&(f+=a.slice(d,n),d=n,m=-1))}}let h=u===e?c(a,d):a.slice(d);return p+f+h}export{a as stripJsonComments};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{o as __commonJSMin,c as __toESM};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSON5ParseOptions, JSON5StringifyOptions, parseJSON5, stringifyJSON5 } from "./json5.mjs";
|
|
2
|
+
import { JSONCParseOptions, parseJSONC, stringifyJSONC } from "./jsonc.mjs";
|
|
3
|
+
import { YAMLParseOptions, YAMLStringifyOptions, parseYAML, stringifyYAML } from "./yaml.mjs";
|
|
4
|
+
import { JSONParseOptions, JSONStringifyOptions, parseJSON, stringifyJSON } from "./json.mjs";
|
|
5
|
+
import { parseTOML, stringifyTOML } from "./toml.mjs";
|
|
6
|
+
import { INIParseOptions, INIStringifyOptions, parseINI, stringifyINI } from "./ini.mjs";
|
|
7
|
+
export { type INIParseOptions, type INIStringifyOptions, type JSON5ParseOptions, type JSON5StringifyOptions, type JSONCParseOptions, type JSONParseOptions, type JSONStringifyOptions, type YAMLParseOptions, type YAMLStringifyOptions, parseINI, parseJSON, parseJSON5, parseJSONC, parseTOML, parseYAML, stringifyINI, stringifyJSON, stringifyJSON5, stringifyJSONC, stringifyTOML, stringifyYAML };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseJSON5 as e,stringifyJSON5 as t}from"./json5.mjs";import{parseJSON as n,stringifyJSON as r}from"./json.mjs";import{parseJSONC as i,stringifyJSONC as a}from"./jsonc.mjs";import{parseYAML as o,stringifyYAML as s}from"./yaml.mjs";import{parseTOML as c,stringifyTOML as l}from"./toml.mjs";import{parseINI as u,stringifyINI as d}from"./ini.mjs";export{u as parseINI,n as parseJSON,e as parseJSON5,i as parseJSONC,c as parseTOML,o as parseYAML,d as stringifyINI,r as stringifyJSON,t as stringifyJSON5,a as stringifyJSONC,l as stringifyTOML,s as stringifyYAML};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts an [INI](https://www.ini.org/ini-en.html) string into an object.
|
|
3
|
+
*
|
|
4
|
+
* **Note:** Style and indentation are not preserved currently.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseINI<T = unknown>(text: string, options?: INIParseOptions): T;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a JavaScript value to an [INI](https://www.ini.org/ini-en.html) string.
|
|
9
|
+
*
|
|
10
|
+
* **Note:** Style and indentation are not preserved currently.
|
|
11
|
+
*/
|
|
12
|
+
export declare function stringifyINI(value: any, options?: INIStringifyOptions): string;
|
|
13
|
+
export interface INIParseOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Whether to append `[]` to array keys.
|
|
16
|
+
*
|
|
17
|
+
* Some parsers treat duplicate names by themselves as arrays.
|
|
18
|
+
*/
|
|
19
|
+
bracketedArray?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface INIStringifyOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Whether to insert spaces before & after `=` character.
|
|
24
|
+
* Enabled by default.
|
|
25
|
+
*/
|
|
26
|
+
whitespace?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to align the `=` character for each section.
|
|
29
|
+
*/
|
|
30
|
+
align?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Identifier to use for global items
|
|
33
|
+
* and to prepend to all other sections.
|
|
34
|
+
*/
|
|
35
|
+
section?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to sort all sections & their keys alphabetically.
|
|
38
|
+
*/
|
|
39
|
+
sort?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to insert a newline after each section header.
|
|
42
|
+
*/
|
|
43
|
+
newline?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Which platforms line-endings should be used.
|
|
46
|
+
*
|
|
47
|
+
* win32 -> CR+LF
|
|
48
|
+
* other -> LF
|
|
49
|
+
*
|
|
50
|
+
* Default is the current platform
|
|
51
|
+
*/
|
|
52
|
+
platform?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to append `[]` to array keys.
|
|
55
|
+
*
|
|
56
|
+
* Some parsers treat duplicate names by themselves as arrays
|
|
57
|
+
*/
|
|
58
|
+
bracketedArray?: boolean;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stripBOM as e}from"./_chunks/_format.mjs";import{require_ini as t}from"./_chunks/libs/ini.mjs";var n=t();function r(t,r){return(0,n.parse)(e(t),r)}function i(e,t){return(0,n.stringify)(e,{whitespace:!0,...t})}export{r as parseINI,i as stringifyINI};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a [JSON](https://www.json.org/json-en.html) string into an object.
|
|
4
|
+
*
|
|
5
|
+
* Indentation status is auto-detected and preserved when stringifying back using `stringifyJSON`
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseJSON<T = unknown>(text: string, options?: JSONParseOptions): T;
|
|
8
|
+
/**
|
|
9
|
+
* Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.
|
|
10
|
+
*
|
|
11
|
+
* Indentation status is auto detected and preserved when using value from parseJSON.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stringifyJSON(value: any, options?: JSONStringifyOptions): string;
|
|
14
|
+
export interface JSONParseOptions extends FormatOptions {
|
|
15
|
+
/**
|
|
16
|
+
* A function that transforms the results. This function is called for each member of the object.
|
|
17
|
+
*/
|
|
18
|
+
reviver?: (this: any, key: string, value: any) => any;
|
|
19
|
+
}
|
|
20
|
+
export interface JSONStringifyOptions extends FormatOptions {
|
|
21
|
+
/**
|
|
22
|
+
* A function that transforms the results. This function is called for each member of the object.
|
|
23
|
+
*/
|
|
24
|
+
replacer?: (this: any, key: string, value: any) => any;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getFormat as e,storeFormat as t,stripBOM as n}from"./_chunks/_format.mjs";function r(e,r){let i=JSON.parse(n(e),r?.reviver);return t(e,i,r),i}function i(t,n){let r=e(t,n),i=JSON.stringify(t,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{r as parseJSON,i as stringifyJSON};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a [JSON5](https://json5.org/) string into an object.
|
|
4
|
+
*
|
|
5
|
+
* @template T The type of the return value.
|
|
6
|
+
* @param text The string to parse as JSON5.
|
|
7
|
+
* @param options Parsing options.
|
|
8
|
+
* @returns The JavaScript value converted from the JSON5 string.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseJSON5<T = unknown>(text: string, options?: JSON5ParseOptions): T;
|
|
11
|
+
/**
|
|
12
|
+
* Converts a JavaScript value to a [JSON5](https://json5.org/) string.
|
|
13
|
+
*
|
|
14
|
+
* @param value
|
|
15
|
+
* @param options
|
|
16
|
+
* @returns The JSON string converted from the JavaScript value.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stringifyJSON5(value: any, options?: JSON5StringifyOptions): string;
|
|
19
|
+
export interface JSON5ParseOptions extends FormatOptions {
|
|
20
|
+
/**
|
|
21
|
+
* A function that alters the behavior of the parsing process, or an array of
|
|
22
|
+
* String and Number objects that serve as a allowlist for selecting/filtering
|
|
23
|
+
* the properties of the value object to be included in the resulting
|
|
24
|
+
* JavaScript object. If this value is null or not provided, all properties of
|
|
25
|
+
* the object are included in the resulting JavaScript object.
|
|
26
|
+
*/
|
|
27
|
+
reviver?: (this: any, key: string, value: any) => any;
|
|
28
|
+
}
|
|
29
|
+
export interface JSON5StringifyOptions extends FormatOptions {
|
|
30
|
+
/**
|
|
31
|
+
* A function that alters the behavior of the stringification process, or an
|
|
32
|
+
* array of String and Number objects that serve as a allowlist for
|
|
33
|
+
* selecting/filtering the properties of the value object to be included in
|
|
34
|
+
* the JSON5 string. If this value is null or not provided, all properties
|
|
35
|
+
* of the object are included in the resulting JSON5 string.
|
|
36
|
+
*/
|
|
37
|
+
replacer?: ((this: any, key: string, value: any) => any) | null;
|
|
38
|
+
/**
|
|
39
|
+
* A String or Number object that's used to insert white space into the
|
|
40
|
+
* output JSON5 string for readability purposes. If this is a Number, it
|
|
41
|
+
* indicates the number of space characters to use as white space; this
|
|
42
|
+
* number is capped at 10 (if it is greater, the value is just 10). Values
|
|
43
|
+
* less than 1 indicate that no space should be used. If this is a String,
|
|
44
|
+
* the string (or the first 10 characters of the string, if it's longer than
|
|
45
|
+
* that) is used as white space. If this parameter is not provided (or is
|
|
46
|
+
* null), no white space is used. If white space is used, trailing commas
|
|
47
|
+
* will be used in objects and arrays.
|
|
48
|
+
*/
|
|
49
|
+
space?: string | number | null;
|
|
50
|
+
/**
|
|
51
|
+
* A String representing the quote character to use when serializing
|
|
52
|
+
* strings.
|
|
53
|
+
*/
|
|
54
|
+
quote?: string | null;
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__toESM as e}from"./_chunks/rolldown-runtime.mjs";import{getFormat as t,storeFormat as n,stripBOM as r}from"./_chunks/_format.mjs";import{require_parse as i,require_stringify as a}from"./_chunks/libs/json5.mjs";var o=e(i(),1),s=e(a(),1);function c(e,t){let i=(0,o.default)(r(e),t?.reviver);return n(e,i,t),i}function l(e,n){let r=t(e,n),i=(0,s.default)(e,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{c as parseJSON5,l as stringifyJSON5};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Converts a [JSONC](https://github.com/microsoft/node-jsonc-parser) string into an object.
|
|
5
|
+
*
|
|
6
|
+
* @NOTE On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
7
|
+
*
|
|
8
|
+
* @NOTE Comments and trailing commas are not preserved after parsing.
|
|
9
|
+
*
|
|
10
|
+
* @template T The type of the return value.
|
|
11
|
+
* @param text The string to parse as JSONC.
|
|
12
|
+
* @param options Parsing options.
|
|
13
|
+
* @returns The JavaScript value converted from the JSONC string.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseJSONC<T = unknown>(text: string, options?: JSONCParseOptions): T;
|
|
16
|
+
/**
|
|
17
|
+
* Converts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.
|
|
18
|
+
*
|
|
19
|
+
* @NOTE Comments and trailing commas are not preserved in the output.
|
|
20
|
+
*
|
|
21
|
+
* @param value
|
|
22
|
+
* @param options
|
|
23
|
+
* @returns The JSON string converted from the JavaScript value.
|
|
24
|
+
*/
|
|
25
|
+
export declare function stringifyJSONC(value: any, options?: JSONCStringifyOptions): string;
|
|
26
|
+
export interface JSONCParseOptions extends FormatOptions {
|
|
27
|
+
allowTrailingComma?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface JSONCStringifyOptions extends FormatOptions {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{storeFormat as e,stripBOM as t}from"./_chunks/_format.mjs";import{stripJsonComments as n}from"./_chunks/libs/strip-json-comments.mjs";import{stringifyJSON as r}from"./json.mjs";function i(r,i){let a=JSON.parse(n(t(r),{trailingCommas:i?.allowTrailingComma}));return e(r,a,i),a}function a(e,t){return r(e,t)}export{i as parseJSONC,a as stringifyJSONC};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a [TOML](https://toml.io/) string into an object.
|
|
3
|
+
*
|
|
4
|
+
* @NOTE Comments and indentation is not preserved after parsing.
|
|
5
|
+
*
|
|
6
|
+
* @template T The type of the return value.
|
|
7
|
+
* @param text The TOML string to parse.
|
|
8
|
+
* @returns The JavaScript value converted from the TOML string.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseTOML<T = unknown>(text: string): T;
|
|
11
|
+
/**
|
|
12
|
+
* Converts a JavaScript value to a [TOML](https://toml.io/) string.
|
|
13
|
+
*
|
|
14
|
+
* @NOTE Comments and indentation is not preserved in the output.
|
|
15
|
+
*
|
|
16
|
+
* @param value
|
|
17
|
+
* @param options
|
|
18
|
+
* @returns The YAML string converted from the JavaScript value.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stringifyTOML(value: any): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getFormat as e,storeFormat as t,stripBOM as n}from"./_chunks/_format.mjs";import{parse as r,stringify as i}from"./_chunks/libs/smol-toml.mjs";function a(e){let i=r(n(e));return t(e,i,{preserveIndentation:!1}),i}function o(t){let n=e(t,{preserveIndentation:!1}),r=i(t);return n.whitespace.start+r+n.whitespace.end}export{a as parseTOML,o as stringifyTOML};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
import { YAMLException } from "./_chunks/libs/js-yaml.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Converts a [YAML](https://yaml.org/) string into an object.
|
|
5
|
+
*
|
|
6
|
+
* @NOTE This function does **not** understand multi-document or empty sources, it throws exception on those.
|
|
7
|
+
*
|
|
8
|
+
* @NOTE Comments are not preserved after parsing.
|
|
9
|
+
*
|
|
10
|
+
* @NOTE Parsing uses the YAML 1.2 core schema. Tags outside of it (`!!timestamp`, `!!merge`,
|
|
11
|
+
* `!!binary`, `!!omap`, `!!pairs` and `!!set`) are not resolved, so timestamps are returned as
|
|
12
|
+
* strings and `<<` merge keys are kept as-is. Opt back in by installing `js-yaml` alongside
|
|
13
|
+
* confbox and passing a schema:
|
|
14
|
+
* `parseYAML(text, { schema: CORE_SCHEMA.withTags(mergeTag, timestampTag) })`.
|
|
15
|
+
*
|
|
16
|
+
* @template T The type of the return value.
|
|
17
|
+
* @param text The YAML string to parse.
|
|
18
|
+
* @param options Parsing options.
|
|
19
|
+
* @returns The JavaScript value converted from the YAML string.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseYAML<T = unknown>(text: string, options?: YAMLParseOptions): T;
|
|
22
|
+
/**
|
|
23
|
+
* Converts a JavaScript value to a [YAML](https://yaml.org/) string.
|
|
24
|
+
*
|
|
25
|
+
* @NOTE Comments are not preserved in the output.
|
|
26
|
+
*
|
|
27
|
+
* @param value
|
|
28
|
+
* @param options
|
|
29
|
+
* @returns The YAML string converted from the JavaScript value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function stringifyYAML(value: any, options?: YAMLStringifyOptions): string;
|
|
32
|
+
export interface YAMLParseOptions extends FormatOptions {
|
|
33
|
+
/** File path used in error messages. */
|
|
34
|
+
filename?: string;
|
|
35
|
+
/** Maximum nesting depth for collections. Aliases are not taken into account. (default: 100) */
|
|
36
|
+
maxDepth?: number;
|
|
37
|
+
/** Schema to use. (default: `CORE_SCHEMA`) */
|
|
38
|
+
schema?: any;
|
|
39
|
+
/** Enables compatibility with `JSON.parse` behavior. Duplicate keys in a mapping override values instead of throwing an error. (default: false) */
|
|
40
|
+
json?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Maximum total number of keys processed by merge (`<<`) across one load call.
|
|
43
|
+
* Each member of a merge sequence also counts as one key. Set to `-1` to disable the limit. (default: 10000)
|
|
44
|
+
*/
|
|
45
|
+
maxTotalMergeKeys?: number;
|
|
46
|
+
/** Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject all aliases, or to `-1` for no limit. (default: -1) */
|
|
47
|
+
maxAliases?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface YAMLStringifyOptions extends FormatOptions {
|
|
50
|
+
/** Indentation width in spaces. (default: 2) */
|
|
51
|
+
indent?: number;
|
|
52
|
+
/** Does not add an indentation level to array elements when enabled. (default: false) */
|
|
53
|
+
seqNoIndent?: boolean;
|
|
54
|
+
/** Allows a nested collection to start on the same line after `-`. (default: true) */
|
|
55
|
+
seqInlineFirst?: boolean;
|
|
56
|
+
/** Preferred line width for folding. Unbreakable and more-indented lines may exceed it. Set to `-1` for unlimited width. (default: 80) */
|
|
57
|
+
lineWidth?: number;
|
|
58
|
+
/** Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`. (default: false) */
|
|
59
|
+
flowBracketPadding?: boolean;
|
|
60
|
+
/** Omits the space after commas in flow collections: `[1, 2]` becomes `[1,2]`. (default: false) */
|
|
61
|
+
flowSkipCommaSpace?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Omits the space after `:` in flow mappings: `{"a": 1}` becomes `{"a":1}`.
|
|
64
|
+
*
|
|
65
|
+
* This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single plain scalar instead of a mapping entry. (default: false)
|
|
66
|
+
*/
|
|
67
|
+
flowSkipColonSpace?: boolean;
|
|
68
|
+
/** Quotes flow mapping keys: `{a: 1}` becomes `{"a": 1}`. (default: false) */
|
|
69
|
+
quoteFlowKeys?: boolean;
|
|
70
|
+
/** Quoting style to use when a string needs quotes. (default: `single`) */
|
|
71
|
+
quoteStyle?: "single" | "double";
|
|
72
|
+
/** Quotes all non-key strings using `quoteStyle`. (default: false) */
|
|
73
|
+
forceQuotes?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Customizes how strings are rendered as plain, quoted, literal, or folded scalars.
|
|
76
|
+
* Rules are applied in array order; providing this option replaces the default rules.
|
|
77
|
+
*/
|
|
78
|
+
scalarStyleRules?: readonly ((layout: any) => void)[];
|
|
79
|
+
/** Prints an explicit tag before an anchor: `&ref_0 !!set` becomes `!!set &ref_0`. (default: false) */
|
|
80
|
+
tagBeforeAnchor?: boolean;
|
|
81
|
+
/** Schema to use. (default: `DUMP_SCHEMA`) */
|
|
82
|
+
schema?: any;
|
|
83
|
+
/**
|
|
84
|
+
* Skips invalid types instead of throwing. Invalid mapping pairs and sequence items are skipped;
|
|
85
|
+
* `undefined` sequence items are serialized as `null`. (default: false)
|
|
86
|
+
*/
|
|
87
|
+
skipInvalid?: boolean;
|
|
88
|
+
/** Inlines duplicate objects instead of converting them into references. (default: false) */
|
|
89
|
+
noRefs?: boolean;
|
|
90
|
+
/** Nesting level at which collections switch from block to flow style. Set to `-1` to never switch automatically. (default: -1) */
|
|
91
|
+
flowLevel?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Sorts mapping keys when `true`. A function can be provided to define the sort order. (default: false)
|
|
94
|
+
*
|
|
95
|
+
* @deprecated Use `transform` to reorder mapping items.
|
|
96
|
+
*/
|
|
97
|
+
sortKeys?: boolean | ((a: any, b: any) => number);
|
|
98
|
+
/** Mutates the generated AST before it is rendered. */
|
|
99
|
+
transform?: (documents: any[]) => void;
|
|
100
|
+
}
|
|
101
|
+
export { YAMLException };
|