embedoc 0.13.4 → 0.14.1
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/cli-contract.yaml +1 -1
- package/dist/embedoc.bundle.mjs +999 -0
- package/dist/embedoc.bundle.mjs.map +7 -0
- package/dist/generated/contract.d.ts +3 -0
- package/dist/generated/contract.d.ts.map +1 -0
- package/dist/generated/contract.js +5 -0
- package/dist/generated/contract.js.map +1 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/program.d.ts.map +1 -1
- package/dist/generated/program.js +86 -0
- package/dist/generated/program.js.map +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1,999 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
var Cm=Object.create;var os=Object.defineProperty;var Am=Object.getOwnPropertyDescriptor;var km=Object.getOwnPropertyNames;var Om=Object.getPrototypeOf,Pm=Object.prototype.hasOwnProperty;var re=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var $=(t,e)=>()=>(t&&(e=t(t=0)),e);var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Im=(t,e)=>{for(var r in e)os(t,r,{get:e[r],enumerable:!0})},Lm=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of km(e))!Pm.call(t,i)&&i!==r&&os(t,i,{get:()=>e[i],enumerable:!(n=Am(e,i))||n.enumerable});return t};var yn=(t,e,r)=>(r=t!=null?Cm(Om(t)):{},Lm(e||!t||!t.__esModule?os(r,"default",{value:t,enumerable:!0}):r,t));var ic=w((UE,vs)=>{var An=process||{},rc=An.argv||[],Cn=An.env||{},Q0=!(Cn.NO_COLOR||rc.includes("--no-color"))&&(!!Cn.FORCE_COLOR||rc.includes("--color")||An.platform==="win32"||(An.stdout||{}).isTTY&&Cn.TERM!=="dumb"||!!Cn.CI),X0=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+Z0(i,e,r,s)+e:t+i+e},Z0=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},nc=(t=Q0)=>{let e=t?X0:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};vs.exports=nc();vs.exports.createColors=nc});var Er=w(Ts=>{var Nn=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},Ds=class extends Nn{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ts.CommanderError=Nn;Ts.InvalidArgumentError=Ds});var Fn=w(Fs=>{var{InvalidArgumentError:$_}=Er(),Ns=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new $_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Y_(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Fs.Argument=Ns;Fs.humanReadableArgName=Y_});var qs=w(Bs=>{var{humanReadableArgName:J_}=Fn(),Ms=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,s)=>i.name().localeCompare(s.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?r.push(n):n.long&&!s?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>J_(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function s(u,f){return r.formatItem(u,n,f,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let l=r.visibleArguments(e).map(u=>s(r.styleArgumentTerm(r.argumentTerm(u)),r.styleArgumentDescription(r.argumentDescription(u))));l.length>0&&(o=o.concat([r.styleTitle("Arguments:"),...l,""]));let c=r.visibleOptions(e).map(u=>s(r.styleOptionTerm(r.optionTerm(u)),r.styleOptionDescription(r.optionDescription(u))));if(c.length>0&&(o=o.concat([r.styleTitle("Options:"),...c,""])),r.showGlobalOptions){let u=r.visibleGlobalOptions(e).map(f=>s(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));u.length>0&&(o=o.concat([r.styleTitle("Global Options:"),...u,""]))}let h=r.visibleCommands(e).map(u=>s(r.styleSubcommandTerm(r.subcommandTerm(u)),r.styleSubcommandDescription(r.subcommandDescription(u))));return h.length>0&&(o=o.concat([r.styleTitle("Commands:"),...h,""])),o.join(`
|
|
5
|
+
`)}displayWidth(e){return Ac(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),l=2,h=(this.helpWidth??80)-r-l-2,u;return h<this.minWidthToWrap||i.preformatted(n)?u=n:u=i.boxWrap(n,h).replace(/\n/g,`
|
|
6
|
+
`+" ".repeat(r+l)),o+a+" ".repeat(l)+u.replace(/\n/g,`
|
|
7
|
+
${o}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(i);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(h=>{let u=this.displayWidth(h);if(c+u<=r){l.push(h),c+=u;return}s.push(l.join(""));let f=h.trimStart();l=[f],c=this.displayWidth(f)}),s.push(l.join(""))}),s.join(`
|
|
8
|
+
`)}};function Ac(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Bs.Help=Ms;Bs.stripColor=Ac});var Us=w(Ws=>{var{InvalidArgumentError:K_}=Er(),Hs=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Q_(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new K_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?kc(this.name().replace(/^no-/,"")):kc(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},js=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return r.negate===(s===e)}};function kc(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function Q_(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,s=t.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(e=s.shift()),i.test(s[0])&&(r=s.shift()),!e&&n.test(s[0])&&(e=s.shift()),!e&&i.test(s[0])&&(e=r,r=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${t}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|
9
|
+
- a short flag is a single dash and a single character
|
|
10
|
+
- either use a single dash and a single character (for a short flag)
|
|
11
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
|
|
12
|
+
- too many short flags`):i.test(o)?new Error(`${a}
|
|
13
|
+
- too many long flags`):new Error(`${a}
|
|
14
|
+
- unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}Ws.Option=Hs;Ws.DualOptions=js});var Pc=w(Oc=>{function X_(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let s=1;t[i-1]===e[n-1]?s=0:s=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+s),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function Z_(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=X_(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),r&&(n=n.map(o=>`--${o}`)),n.length>1?`
|
|
15
|
+
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
16
|
+
(Did you mean ${n[0]}?)`:""}Oc.suggestSimilar=Z_});var Dc=w(Ys=>{var ey=re("node:events").EventEmitter,Vs=re("node:child_process"),Ke=re("node:path"),Mn=re("node:fs"),D=re("node:process"),{Argument:ty,humanReadableArgName:ry}=Fn(),{CommanderError:Gs}=Er(),{Help:ny,stripColor:iy}=qs(),{Option:Ic,DualOptions:sy}=Us(),{suggestSimilar:Lc}=Pc(),zs=class t extends ey{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>D.stdout.write(r),writeErr:r=>D.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>D.stdout.isTTY?D.stdout.columns:void 0,getErrHelpWidth:()=>D.stderr.isTTY?D.stderr.columns:void 0,getOutHasColors:()=>$s()??(D.stdout.isTTY&&D.stdout.hasColors?.()),getErrHasColors:()=>$s()??(D.stderr.isTTY&&D.stderr.hasColors?.()),stripColor:r=>iy(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new ny,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
17
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new ty(e,r)}argument(e,r,n,i){let s=this.createArgument(e,r);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=r??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
18
|
+
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new Gs(e,r,n)),D.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new Ic(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
19
|
+
- already used by option '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),s=r(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+r,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,r,n,i,s){if(typeof r=="object"&&r instanceof Ic)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,c)=>{let h=a.exec(l);return h?h[0]:c},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){D.versions?.electron&&(r.from="electron");let i=D.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=D.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":D.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
20
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,r,n){if(Mn.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
|
|
21
|
+
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
22
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
23
|
+
- ${i}`;throw new Error(s)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(h,u){let f=Ke.resolve(h,u);if(Mn.existsSync(f))return f;if(i.includes(Ke.extname(u)))return;let p=i.find(m=>Mn.existsSync(`${f}${m}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let h;try{h=Mn.realpathSync(this._scriptPath)}catch{h=this._scriptPath}a=Ke.resolve(Ke.dirname(h),a)}if(a){let h=s(a,o);if(!h&&!e._executableFile&&this._scriptPath){let u=Ke.basename(this._scriptPath,Ke.extname(this._scriptPath));u!==this._name&&(h=s(a,`${u}-${e._name}`))}o=h||o}n=i.includes(Ke.extname(o));let l;D.platform!=="win32"?n?(r.unshift(o),r=Rc(D.execArgv).concat(r),l=Vs.spawn(D.argv[0],r,{stdio:"inherit"})):l=Vs.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=Rc(D.execArgv).concat(r),l=Vs.spawn(D.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{D.on(u,()=>{l.killed===!1&&l.exitCode===null&&l.kill(u)})});let c=this._exitCallback;l.on("close",h=>{h=h??1,c?c(new Gs(h,"commander.executeSubCommandAsync","(close)")):D.exit(h)}),l.on("error",h=>{if(h.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(h.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)D.exit(1);else{let u=new Gs(1,"commander.executeSubCommandAsync","(error)");u.nestedError=h,c(u)}}),this.runningCommand=l}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),s}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,a)}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){i===n&&i.push(l),i.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let h=s.shift();h===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,h)}else if(c.optional){let h=null;s.length>0&&!o(s[0])&&(h=s.shift()),this.emit(`option:${c.name()}`,h)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),h=this._findOption(l.slice(0,c));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,l.slice(c+1));continue}}if(o(l)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){n.push(l),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(l),s.length>0&&i.push(...s);break}i.push(l)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
|
|
24
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
25
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
26
|
+
`),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in D.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,D.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new sy(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(u=>u.negate&&a===u.attributeName()),h=this.options.find(u=>!u.negate&&a===u.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:h||o},i=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=Lc(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=Lc(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
27
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>ry(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Ke.basename(e,Ke.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,s;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:s}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(r&&(s=r(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=Number(D.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
28
|
+
Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
|
|
29
|
+
`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Rc(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],i=s[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function $s(){if(D.env.NO_COLOR||D.env.FORCE_COLOR==="0"||D.env.FORCE_COLOR==="false")return!1;if(D.env.FORCE_COLOR||D.env.CLICOLOR_FORCE!==void 0)return!0}Ys.Command=zs;Ys.useColor=$s});var Mc=w(Oe=>{var{Argument:Tc}=Fn(),{Command:Js}=Dc(),{CommanderError:oy,InvalidArgumentError:Nc}=Er(),{Help:ay}=qs(),{Option:Fc}=Us();Oe.program=new Js;Oe.createCommand=t=>new Js(t);Oe.createOption=(t,e)=>new Fc(t,e);Oe.createArgument=(t,e)=>new Tc(t,e);Oe.Command=Js;Oe.Option=Fc;Oe.Argument=Tc;Oe.Help=ay;Oe.CommanderError=oy;Oe.InvalidArgumentError=Nc;Oe.InvalidOptionArgumentError=Nc});var no,Jc,wy,Kc=$(()=>{no=(t,e,r)=>{let n=t instanceof RegExp?Jc(t,r):t,i=e instanceof RegExp?Jc(e,r):e,s=n!==null&&i!=null&&wy(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},Jc=(t,e)=>{let r=e.match(t);return r?r[0]:null},wy=(t,e,r)=>{let n,i,s,o,a,l=r.indexOf(t),c=r.indexOf(e,l+1),h=l;if(l>=0&&c>0){if(t===e)return[l,c];for(n=[],s=r.length;h>=0&&!a;){if(h===l)n.push(h),l=r.indexOf(t,h+1);else if(n.length===1){let u=n.pop();u!==void 0&&(a=[u,c])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=c),c=r.indexOf(e,h+1);h=l<c&&l>=0?l:c}n.length&&o!==void 0&&(a=[s,o])}return a}});function io(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function Ly(t){return t.replace(Cy,Qc).replace(Ay,Xc).replace(ky,so).replace(Oy,Zc).replace(Py,eu)}function Ry(t){return t.replace(by,"\\").replace(vy,"{").replace(xy,"}").replace(Sy,",").replace(Ey,".")}function tu(t){if(!t)return[""];let e=[],r=no("{","}",t);if(!r)return t.split(",");let{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";let a=tu(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function ru(t,e={}){if(!t)return[];let{max:r=Iy}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Cr(Ly(t),r,!0).map(Ry)}function Dy(t){return"{"+t+"}"}function Ty(t){return/^-?0\d/.test(t)}function Ny(t,e){return t<=e}function Fy(t,e){return t>=e}function Cr(t,e,r){let n=[],i=no("{","}",t);if(!i)return[t];let s=i.pre,o=i.post.length?Cr(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<o.length&&a<e;a++){let l=s+"{"+i.body+"}"+o[a];n.push(l)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=a||l,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+so+i.post,Cr(t,e,!0)):[t];let u;if(c)u=i.body.split(/\.\./);else if(u=tu(i.body),u.length===1&&u[0]!==void 0&&(u=Cr(u[0],e,!1).map(Dy),u.length===1))return o.map(p=>i.pre+u[0]+p);let f;if(c&&u[0]!==void 0&&u[1]!==void 0){let p=io(u[0]),m=io(u[1]),d=Math.max(u[0].length,u[1].length),_=u.length===3&&u[2]!==void 0?Math.max(Math.abs(io(u[2])),1):1,g=Ny;m<p&&(_*=-1,g=Fy);let b=u.some(Ty);f=[];for(let v=p;g(v,m)&&f.length<e;v+=_){let S;if(l)S=String.fromCharCode(v),S==="\\"&&(S="");else if(S=String(v),b){let k=d-S.length;if(k>0){let R=new Array(k+1).join("0");v<0?S="-"+R+S.slice(1):S=R+S}}f.push(S)}}else{f=[];for(let p=0;p<u.length;p++)f.push.apply(f,Cr(u[p],e,!1))}for(let p=0;p<f.length;p++)for(let m=0;m<o.length&&n.length<e;m++){let d=s+f[p]+o[m];(!r||c||d)&&n.push(d)}}return n}var Qc,Xc,so,Zc,eu,by,vy,xy,Sy,Ey,Cy,Ay,ky,Oy,Py,Iy,nu=$(()=>{Kc();Qc="\0SLASH"+Math.random()+"\0",Xc="\0OPEN"+Math.random()+"\0",so="\0CLOSE"+Math.random()+"\0",Zc="\0COMMA"+Math.random()+"\0",eu="\0PERIOD"+Math.random()+"\0",by=new RegExp(Qc,"g"),vy=new RegExp(Xc,"g"),xy=new RegExp(so,"g"),Sy=new RegExp(Zc,"g"),Ey=new RegExp(eu,"g"),Cy=/\\\\/g,Ay=/\\{/g,ky=/\\}/g,Oy=/\\,/g,Py=/\\\./g,Iy=1e5});var Ar,iu=$(()=>{Ar=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}});var My,kr,By,su,ou,au=$(()=>{My={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},kr=t=>t.replace(/[[\]\\-]/g,"\\$&"),By=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),su=t=>t.join(""),ou=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,o=!1,a=!1,l=!1,c=!1,h=r,u="";e:for(;s<t.length;){let d=t.charAt(s);if((d==="!"||d==="^")&&s===r+1){c=!0,s++;continue}if(d==="]"&&o&&!l){h=s+1;break}if(o=!0,d==="\\"&&!l){l=!0,s++;continue}if(d==="["&&!l){for(let[_,[g,y,b]]of Object.entries(My))if(t.startsWith(_,s)){if(u)return["$.",!1,t.length-r,!0];s+=_.length,b?i.push(g):n.push(g),a=a||y;continue e}}if(l=!1,u){d>u?n.push(kr(u)+"-"+kr(d)):d===u&&n.push(kr(d)),u="",s++;continue}if(t.startsWith("-]",s+1)){n.push(kr(d+"-")),s+=2;continue}if(t.startsWith("-",s+1)){u=d,s+=2;continue}n.push(kr(d)),s++}if(h<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let d=n[0].length===2?n[0].slice(-1):n[0];return[By(d),!1,h-r,!1]}let f="["+(c?"^":"")+su(n)+"]",p="["+(c?"":"^")+su(i)+"]";return[n.length&&i.length?"("+f+"|"+p+")":n.length?f:p,a,h-r,!0]}});var Pe,Un=$(()=>{Pe=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")});var ye,qy,oo,lu,Hy,jy,Wy,cu,Uy,Vn,Vy,Gy,zy,$y,ao,uu,hu,Yy,vt,lo=$(()=>{au();Un();qy=new Set(["!","?","+","*","@"]),oo=t=>qy.has(t),lu=t=>oo(t.type),Hy=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),jy=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Wy=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),cu=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Uy="(?!(?:^|/)\\.\\.?(?:$|/))",Vn="(?!\\.)",Vy=new Set(["[","."]),Gy=new Set(["..","."]),zy=new Set("().*{}+?[]^$\\!"),$y=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ao="[^/]",uu=ao+"*?",hu=ao+"+?",Yy=0,vt=class{type;#e;#n;#i=!1;#t=[];#o;#S;#y;#h=!1;#a;#f;#u=!1;id=++Yy;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,r,n={}){this.type=e,e&&(this.#n=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#h&&this.#y.push(this),this.#S=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#f=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let r=e,n=r.#o;for(;n;){for(let i=r.#S+1;!n.type&&i<n.#t.length;i++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof ye&&r.#o===this))throw new Error("invalid part: "+r);this.#t.push(r)}}toJSON(){let e=this.type===null?this.#t.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#t.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let e=this.#o;for(let r=0;r<this.#S;r++){let n=e.#t[r];if(!(n instanceof ye&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#S===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new ye(this.type,e);for(let n of this.#t)r.copyIn(n);return r}static#s(e,r,n,i,s){let o=i.maxExtglobRecursion??2,a=!1,l=!1,c=-1,h=!1;if(r.type===null){let d=n,_="";for(;d<e.length;){let g=e.charAt(d++);if(a||g==="\\"){a=!a,_+=g;continue}if(l){d===c+1?(g==="^"||g==="!")&&(h=!0):g==="]"&&!(d===c+2&&h)&&(l=!1),_+=g;continue}else if(g==="["){l=!0,c=d,h=!1,_+=g;continue}if(!i.noext&&oo(g)&&e.charAt(d)==="("&&s<=o){r.push(_),_="";let b=new ye(g,r);d=ye.#s(e,b,d,i,s+1),r.push(b);continue}_+=g}return r.push(_),d}let u=n+1,f=new ye(null,r),p=[],m="";for(;u<e.length;){let d=e.charAt(u++);if(a||d==="\\"){a=!a,m+=d;continue}if(l){u===c+1?(d==="^"||d==="!")&&(h=!0):d==="]"&&!(u===c+2&&h)&&(l=!1),m+=d;continue}else if(d==="["){l=!0,c=u,h=!1,m+=d;continue}if(!i.noext&&oo(d)&&e.charAt(u)==="("&&(s<=o||r&&r.#d(d))){let g=r&&r.#d(d)?0:1;f.push(m),m="";let y=new ye(d,f);f.push(y),u=ye.#s(e,y,u,i,s+g);continue}if(d==="|"){f.push(m),m="",p.push(f),f=new ye(null,r);continue}if(d===")")return m===""&&r.#t.length===0&&(r.#u=!0),f.push(m),m="",r.push(...p,f),u;m+=d}return r.type=null,r.#n=void 0,r.#t=[e.substring(n-1)],u}#w(e){return this.#v(e,jy)}#v(e,r=Hy){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#d(n.type,r)}#d(e,r=Wy){return!!r.get(this.type)?.includes(e)}#m(e,r){let n=e.#t[0],i=new ye(null,n,this.options);i.#t.push(""),n.push(i),this.#A(e,r)}#A(e,r){let n=e.#t[0];this.#t.splice(r,1,...n.#t);for(let i of n.#t)typeof i=="object"&&(i.#o=this);this.#f=void 0}#g(e){return!!cu.get(this.type)?.has(e)}#x(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let r=e.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#g(r.type)}#E(e){let r=cu.get(this.type),n=e.#t[0],i=r?.get(n.type);if(!i)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=i,this.#f=void 0,this.#u=!1}static fromGlob(e,r={}){let n=new ye(null,void 0,r);return ye.#s(e,n,0,r,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#a}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&(this.#p(),this.#c()),!lu(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(p=>typeof p!="string"),c=this.#t.map(p=>{let[m,d,_,g]=typeof p=="string"?ye.#b(p,this.#n,l):p.toRegExpSource(e);return this.#n=this.#n||_,this.#i=this.#i||g,m}).join(""),h="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Gy.has(this.#t[0]))){let m=Vy,d=r&&m.has(c.charAt(0))||c.startsWith("\\.")&&m.has(c.charAt(2))||c.startsWith("\\.\\.")&&m.has(c.charAt(4)),_=!r&&!e&&m.has(c.charAt(0));h=d?Uy:_?Vn:""}let u="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(u="(?:$|\\/)"),[h+c+u,Pe(c),this.#n=!!this.#n,this.#i]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),c=this;return c.#t=[l],c.type=null,c.#n=void 0,[l,Pe(this.toString()),!1,!1]}let o=!n||e||r||!Vn?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!r?Vn:"")+hu;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Vn:"")+uu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+s+l}return[a,Pe(s),this.#n=!!this.#n,this.#i]}#p(){if(lu(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#t.length;n++){let i=this.#t[n];typeof i=="object"&&(i.#p(),this.#v(i)?(r=!1,this.#A(i,n)):this.#w(i)?(r=!1,this.#m(i,n)):this.#x(i)&&(r=!1,this.#E(i)))}}while(!r&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#p();this.#f=void 0}#_(e){return this.#t.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=r.toRegExpSource(e);return this.#i=this.#i||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(e,r,n=!1){let i=!1,s="",o=!1,a=!1;for(let l=0;l<e.length;l++){let c=e.charAt(l);if(i){i=!1,s+=(zy.has(c)?"\\":"")+c;continue}if(c==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?hu:uu,r=!0;continue}else a=!1;if(c==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(c==="["){let[h,u,f,p]=ou(e,l);if(f){s+=h,o=o||u,l+=f-1,r=r||p;continue}}if(c==="?"){s+=ao,r=!0;continue}s+=$y(c)}return[s,Pe(e),!!r,o]}};ye=vt});var xt,co=$(()=>{xt=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")});var ue,Jy,Ky,Qy,Xy,Zy,ew,tw,rw,nw,iw,sw,ow,aw,lw,cw,uw,hw,fw,du,mu,gu,fu,pw,H,dw,mw,gw,_w,yw,Ie,ww,_u,bw,vw,pu,xw,ve,at=$(()=>{nu();iu();lo();co();Un();lo();co();Un();ue=(t,e,r={})=>(Ar(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ve(e,r).match(t)),Jy=/^\*+([^+@!?*[(]*)$/,Ky=t=>e=>!e.startsWith(".")&&e.endsWith(t),Qy=t=>e=>e.endsWith(t),Xy=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Zy=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ew=/^\*+\.\*+$/,tw=t=>!t.startsWith(".")&&t.includes("."),rw=t=>t!=="."&&t!==".."&&t.includes("."),nw=/^\.\*+$/,iw=t=>t!=="."&&t!==".."&&t.startsWith("."),sw=/^\*+$/,ow=t=>t.length!==0&&!t.startsWith("."),aw=t=>t.length!==0&&t!=="."&&t!=="..",lw=/^\?+([^+@!?*[(]*)?$/,cw=([t,e=""])=>{let r=du([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},uw=([t,e=""])=>{let r=mu([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},hw=([t,e=""])=>{let r=mu([t]);return e?n=>r(n)&&n.endsWith(e):r},fw=([t,e=""])=>{let r=du([t]);return e?n=>r(n)&&n.endsWith(e):r},du=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},mu=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},gu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",fu={win32:{sep:"\\"},posix:{sep:"/"}},pw=gu==="win32"?fu.win32.sep:fu.posix.sep;ue.sep=pw;H=Symbol("globstar **");ue.GLOBSTAR=H;dw="[^/]",mw=dw+"*?",gw="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_w="(?:(?!(?:\\/|^)\\.).)*?",yw=(t,e={})=>r=>ue(r,t,e);ue.filter=yw;Ie=(t,e={})=>Object.assign({},t,e),ww=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ue;let e=ue;return Object.assign((n,i,s={})=>e(n,i,Ie(t,s)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,Ie(t,s))}static defaults(i){return e.defaults(Ie(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,o={}){super(i,s,Ie(t,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,Ie(t,s))}},unescape:(n,i={})=>e.unescape(n,Ie(t,i)),escape:(n,i={})=>e.escape(n,Ie(t,i)),filter:(n,i={})=>e.filter(n,Ie(t,i)),defaults:n=>e.defaults(Ie(t,n)),makeRe:(n,i={})=>e.makeRe(n,Ie(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,Ie(t,i)),match:(n,i,s={})=>e.match(n,i,Ie(t,s)),sep:e.sep,GLOBSTAR:H})};ue.defaults=ww;_u=(t,e={})=>(Ar(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:ru(t,{max:e.braceExpandMax}));ue.braceExpand=_u;bw=(t,e={})=>new ve(t,e).makeRe();ue.makeRe=bw;vw=(t,e,r={})=>{let n=new ve(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};ue.match=vw;pu=/[?*]|[+@!]\(.*?\)|\[|\]/,xw=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ve=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){Ar(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||gu,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!pu.test(s[2]))&&!pu.test(s[3]),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(c)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1],l=n[i+2],c=n[i+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);let h=n.slice(0);h[i]="**",e.push(h),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let i=0,s=0,o=[],a="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])o.push(a==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])o.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])o.push(r[s]),s++;else if(e[i]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[i]),i++,s++}else if(r[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",o.push(r[s]),i++,s++}else return!1;return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let i=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),c=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),h=!c&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),u=l?3:a?0:void 0,f=h?3:c?0:void 0;if(typeof u=="number"&&typeof f=="number"){let[p,m]=[e[u],r[f]];p.toLowerCase()===m.toLowerCase()&&(r[f]=p,s=f,i=u)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(H)?this.#e(e,r,n,i,s):this.#i(e,r,n,i,s)}#e(e,r,n,i,s){let o=r.indexOf(H,s),a=r.lastIndexOf(H),[l,c,h]=n?[r.slice(s,o),r.slice(o+1),[]]:[r.slice(s,o),r.slice(o+1,a),r.slice(a+1)];if(l.length){let y=e.slice(i,i+l.length);if(!this.#i(y,l,n,0,0))return!1;i+=l.length,s+=l.length}let u=0;if(h.length){if(h.length+i>e.length)return!1;let y=e.length-h.length;if(this.#i(e,h,n,y,0))u=h.length;else{if(e[e.length-1]!==""||i+h.length===e.length||(y--,!this.#i(e,h,n,y,0)))return!1;u=h.length+1}}if(!c.length){let y=!!u;for(let b=i;b<e.length-u;b++){let v=String(e[b]);if(y=!0,v==="."||v===".."||!this.options.dot&&v.startsWith("."))return!1}return n||y}let f=[[[],0]],p=f[0],m=0,d=[0];for(let y of c)y===H?(d.push(m),p=[[],0],f.push(p)):(p[0].push(y),m++);let _=f.length-1,g=e.length-u;for(let y of f)y[1]=g-(d[_--]+y[0].length);return!!this.#n(e,f,i,0,n,0,!!u)}#n(e,r,n,i,s,o,a){let l=r[i];if(!l){for(let u=n;u<e.length;u++){a=!0;let f=e[u];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1}return a}let[c,h]=l;for(;n<=h;){if(this.#i(e.slice(0,n+c.length),c,s,n,0)&&o<this.maxGlobstarRecursion){let p=this.#n(e,r,n+c.length,i+1,s,o+1,a);if(p!==!1)return p}let f=e[n];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1;n++}return s||null}#i(e,r,n,i,s){let o,a,l,c;for(o=i,a=s,c=e.length,l=r.length;o<c&&a<l;o++,a++){this.debug("matchOne loop");let h=r[a],u=e[o];if(this.debug(r,h,u),h===!1||h===H)return!1;let f;if(typeof h=="string"?(f=u===h,this.debug("string match",h,u,f)):(f=h.test(u),this.debug("pattern match",h,u,f)),!f)return!1}if(o===c&&a===l)return!0;if(o===c)return n;if(a===l)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return _u(this.pattern,this.options)}parse(e){Ar(e);let r=this.options;if(e==="**")return H;if(e==="")return"";let n,i=null;(n=e.match(sw))?i=r.dot?aw:ow:(n=e.match(Jy))?i=(r.nocase?r.dot?Zy:Xy:r.dot?Qy:Ky)(n[1]):(n=e.match(lw))?i=(r.nocase?r.dot?uw:cw:r.dot?hw:fw)(n):(n=e.match(ew))?i=r.dot?rw:tw:(n=e.match(nw))&&(i=iw);let s=vt.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?mw:r.dot?gw:_w,i=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let c=l.map(u=>{if(u instanceof RegExp)for(let f of u.flags.split(""))i.add(f);return typeof u=="string"?xw(u):u===H?H:u._src});c.forEach((u,f)=>{let p=c[f+1],m=c[f-1];u!==H||m===H||(m===void 0?p!==void 0&&p!==H?c[f+1]="(?:\\/|"+n+"\\/)?"+p:c[f]=n:p===void 0?c[f-1]=m+"(?:\\/|\\/"+n+")?":p!==H&&(c[f-1]=m+"(?:\\/|\\/"+n+"\\/)"+p,c[f+1]=H))});let h=c.filter(u=>u!==H);if(this.partial&&h.length>=1){let u=[];for(let f=1;f<=h.length;f++)u.push(h.slice(0,f).join("/"));return"(?:"+u.join("|")+")"}return h.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a of s){let l=i;if(n.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ue.defaults(e).Minimatch}};ue.AST=vt;ue.Minimatch=ve;ue.escape=xt;ue.unescape=Pe});import{tracingChannel as Sw,channel as Ew}from"node:diagnostics_channel";var Z,Or,Cw,uo,wu,yu,Aw,kw,lt,bu,Gn,Ow,Ir,xu=$(()=>{Z=Ew("lru-cache:metrics"),Or=Sw("lru-cache"),Cw=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,uo=()=>Z.hasSubscribers||Or.hasSubscribers,wu=new Set,yu=typeof process=="object"&&process?process:{},Aw=(t,e,r,n)=>{typeof yu.emitWarning=="function"?yu.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},kw=t=>!wu.has(t),lt=t=>!!t&&t===Math.floor(t)&&t>0&&isFinite(t),bu=t=>lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Gn:null:null,Gn=class extends Array{constructor(t){super(t),this.fill(0)}},Ow=class Pr{heap;length;static#e=!1;static create(e){let r=bu(e);if(!r)return[];Pr.#e=!0;let n=new Pr(e,r);return Pr.#e=!1,n}constructor(e,r){if(!Pr.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Ir=class vu{#e;#n;#i;#t;#o;#S;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#f;#u;#c;#s;#w;#v;#d;#m;#A;#g;#x;#E;#p;#_;#b;#O;#r;#L;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#p,autopurgeTimers:e.#_,sizes:e.#x,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#w,prev:e.#v,get head(){return e.#d},get tail(){return e.#m},free:e.#A,isBackgroundFetch:r=>e.#l(r),backgroundFetch:(r,n,i,s)=>e.#M(r,n,i,s),moveToTail:r=>e.#Y(r),indexes:r=>e.#P(r),rindexes:r=>e.#I(r),isStale:r=>e.#C(r)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#S}get memoMethod(){return this.#y}get dispose(){return this.#i}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:h,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:p,maxSize:m=0,maxEntrySize:d=0,sizeCalculation:_,fetchMethod:g,memoMethod:y,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:R,backgroundFetchSize:me=1,perf:ge}=e;if(this.backgroundFetchSize=me,ge!==void 0&&typeof ge?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=ge??Cw,r!==0&&!lt(r))throw new TypeError("max option must be a nonnegative integer");let Q=r?bu(r):Array;if(!Q)throw new Error("invalid max value: "+r);if(this.#e=r,this.#n=m,this.maxEntrySize=d||this.#n,this.sizeCalculation=_,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=y,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#O=!!g,this.#u=new Map,this.#c=Array.from({length:r}).fill(void 0),this.#s=Array.from({length:r}).fill(void 0),this.#w=new Q(r),this.#v=new Q(r),this.#d=0,this.#m=0,this.#A=Ow.create(r),this.#a=0,this.#f=0,typeof c=="function"&&(this.#i=c),typeof h=="function"&&(this.#t=h),typeof u=="function"?(this.#o=u,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#b=!!this.#i,this.#L=!!this.#t,this.#r=!!this.#o,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!R,this.maxEntrySize!==0){if(this.#n!==0&&!lt(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=lt(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#R()}if(this.#e===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){let P="LRU_CACHE_UNBOUNDED";kw(P)&&(wu.add(P),Aw("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,vu))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#R(){let e=new Gn(this.#e),r=new Gn(this.#e);this.#p=e,this.#E=r;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=n,this.#q=(a,l,c=this.#h.now())=>{r[a]=l!==0?c:0,e[a]=l,i(a,l)},this.#k=a=>{r[a]=e[a]!==0?this.#h.now():0,i(a,e[a])};let i=this.ttlAutopurge?(a,l)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),l&&l!==0&&n){let c=setTimeout(()=>{this.#C(a)&&this.#B(this.#c[a],"expire")},l+1);c.unref&&c.unref(),n[a]=c}}:()=>{};this.#D=(a,l)=>{if(e[l]){let c=e[l],h=r[l];if(!c||!h)return;a.ttl=c,a.start=h,a.now=s||o();let u=a.now-h;a.remainingTTL=c-u}};let s=0,o=()=>{let a=this.#h.now();if(this.ttlResolution>0){s=a;let l=setTimeout(()=>s=0,this.ttlResolution);l.unref&&l.unref()}return a};this.getRemainingTTL=a=>{let l=this.#u.get(a);if(l===void 0)return 0;let c=e[l],h=r[l];if(!c||!h)return 1/0;let u=(s||o())-h;return c-u},this.#C=a=>{let l=r[a],c=e[a];return!!c&&!!l&&(s||o())-l>c}}#k=()=>{};#D=()=>{};#q=()=>{};#C=()=>!1;#V(){let e=new Gn(this.#e);this.#f=0,this.#x=e,this.#N=r=>{this.#f-=e[r],e[r]=0},this.#H=(r,n,i,s)=>{if(!lt(i)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,r),!lt(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#T=(r,n,i)=>{if(e[r]=n,this.#n){let s=this.#n-e[r];for(;this.#f>s;)this.#U(!0)}this.#f+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#N=e=>{};#T=(e,r,n)=>{};#H=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#m;this.#j(r)&&((e||!this.#C(r))&&(yield r),r!==this.#d);)r=this.#v[r]}*#I({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#d;this.#j(r)&&((e||!this.#C(r))&&(yield r),r!==this.#m);)r=this.#w[r]}#j(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#P())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#I())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#P()){let r=this.#c[e];r!==void 0&&!this.#l(this.#s[e])&&(yield r)}}*rkeys(){for(let e of this.#I()){let r=this.#c[e];r!==void 0&&!this.#l(this.#s[e])&&(yield r)}}*values(){for(let e of this.#P())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#I())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#P()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#c[n],this))return this.#$(this.#c[n],r)}}forEach(e,r=this){for(let n of this.#P()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#c[n],this)}}rforEach(e,r=this){for(let n of this.#I()){let i=this.#s[n],s=this.#l(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let r of this.#I({allowStale:!0}))this.#C(r)&&(this.#B(this.#c[r],"expire"),e=!0);return e}info(e){let r=this.#u.get(e);if(r===void 0)return;let n=this.#s[r],i=this.#l(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#p&&this.#E){let o=this.#p[r],a=this.#E[r];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#P({allowStale:!0})){let n=this.#c[r],i=this.#s[r],s=this.#l(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#p&&this.#E){o.ttl=this.#p[r];let a=this.#h.now()-this.#E[r];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[r]),e.unshift([n,o])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#h.now()-i}this.#F(r,n.value,n)}}set(e,r,n={}){let{status:i=Z.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,r!==void 0&&(i.value=r),i.cache=this);let s=this.#F(e,r,n);return i&&Z.hasSubscribers&&Z.publish(i),s}#F(e,r,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:c}=n,h=this.#l(r);if(r===void 0)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:u=this.noUpdateTTL}=n;c&&!h&&(c.value=r);let f=this.#H(e,r,n.size||0,l,c);if(this.maxEntrySize&&f>this.maxEntrySize)return this.#B(e,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let p=this.#a===0?void 0:this.#u.get(e);if(p===void 0)p=this.#a===0?this.#m:this.#A.length!==0?this.#A.pop():this.#a===this.#e?this.#U(!1):this.#a,this.#c[p]=e,this.#s[p]=r,this.#u.set(e,p),this.#w[this.#m]=p,this.#v[p]=this.#m,this.#m=p,this.#a++,this.#T(p,f,c),c&&(c.set="add"),u=!1,this.#L&&!h&&this.#t?.(r,e,"add");else{this.#Y(p);let m=this.#s[p];if(r!==m){if(!a)if(this.#l(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=m;d!==void 0&&d!==r&&(this.#b&&this.#i?.(d,e,"set"),this.#r&&this.#g?.push([d,e,"set"]))}else this.#b&&this.#i?.(m,e,"set"),this.#r&&this.#g?.push([m,e,"set"]);if(this.#N(p),this.#T(p,f,c),this.#s[p]=r,!h){let d=m&&this.#l(m)?m.__staleWhileFetching:m,_=d===void 0?"add":r!==d?"replace":"update";c&&(c.set=_,d!==void 0&&(c.oldValue=d)),this.#L&&this.onInsert?.(r,e,_)}}else h||(c&&(c.set="update"),this.#L&&this.onInsert?.(r,e,"update"))}if(s!==0&&!this.#p&&this.#R(),this.#p&&(u||this.#q(p,s,o),c&&this.#D(c,p)),!a&&this.#r&&this.#g){let m=this.#g,d;for(;d=m?.shift();)this.#o?.(...d)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#d];if(this.#U(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#r&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#o?.(...r)}}}#U(e){let r=this.#d,n=this.#c[r],i=this.#s[r],s=this.#l(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#b||this.#r)&&o!==void 0&&(this.#b&&this.#i?.(o,n,"evict"),this.#r&&this.#g?.push([o,n,"evict"])),this.#N(r),this.#_?.[r]&&(clearTimeout(this.#_[r]),this.#_[r]=void 0),e&&(this.#c[r]=void 0,this.#s[r]=void 0,this.#A.push(r)),this.#a===1?(this.#d=this.#m=0,this.#A.length=0):this.#d=this.#w[r],this.#u.delete(n),this.#a--,r}has(e,r={}){let{status:n=Z.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#J(e,r);return Z.hasSubscribers&&Z.publish(n),i}#J(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(s))i&&(i.has="stale",this.#D(i,s));else return n&&this.#k(s),i&&(i.has="hit",this.#D(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{status:n=uo()?{}:void 0}=r;n&&(n.op="peek",n.key=e,n.cache=this),r.status=n;let i=this.#G(e,r);return Z.hasSubscribers&&Z.publish(n),i}#G(e,r){let{status:n,allowStale:i=this.allowStale}=r,s=this.#u.get(e);if(s===void 0||!i&&this.#C(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#M(e,r,n,i){let s=r===void 0?void 0:this.#s[r];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},c=(d,_=!1)=>{let{aborted:g}=o.signal,y=n.ignoreFetchAbort&&d!==void 0,b=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&d!==void 0);if(n.status&&(g&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,y&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),g&&!y&&!_)return u(o.signal.reason,b);let v=p,S=this.#s[r];return(S===p||S===void 0&&y&&_)&&(d===void 0?v.__staleWhileFetching!==void 0?this.#s[r]=v.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#F(e,d,l.options,v))),d},h=d=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),u(d,!1)),u=(d,_)=>{let{aborted:g}=o.signal,y=g&&n.allowStaleOnFetchAbort,b=y||n.allowStaleOnFetchRejection,v=b||n.noDeleteOnFetchRejection,S=p;if(this.#s[r]===p&&(!v||!_&&S.__staleWhileFetching===void 0?this.#B(e,"fetch"):y||(this.#s[r]=S.__staleWhileFetching)),b)return n.status&&S.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw d},f=(d,_)=>{let g=this.#S?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=y=>c(y,!0)))}),g&&g instanceof Promise?g.then(y=>d(y===void 0?void 0:y),_):g!==void 0&&d(g)};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(c,h),m=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.#F(e,m,{...l.options,status:void 0}),r=this.#u.get(e)):this.#s[r]=m,m}#l(e){if(!this.#O)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController}fetch(e,r={}){let n=Or.hasSubscribers,{status:i=uo()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#z(e,r);return i&&n&&(i.trace=!0,Or.tracePromise(()=>s,i).catch(()=>{})),s}async#z(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:d,forceRefresh:_=!1,status:g,signal:y}=r;if(g&&(g.op="fetch",g.key=e,_&&(g.forceRefresh=!0),g.cache=this),!this.#O)return g&&(g.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:g});let b={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:y},v=this.#u.get(e);if(v===void 0){g&&(g.fetch="miss");let S=this.#M(e,v,b,d);return S.__returned=S}else{let S=this.#s[v];if(this.#l(S)){let ge=n&&S.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",ge&&(g.returnedStale=!0)),ge?S.__staleWhileFetching:S.__returned=S}let k=this.#C(v);if(!_&&!k)return g&&(g.fetch="hit"),this.#Y(v),i&&this.#k(v),g&&this.#D(g,v),S;let R=this.#M(e,v,b,d),me=R.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=k?"stale":"refresh",me&&k&&(g.returnedStale=!0)),me?R.__staleWhileFetching:R.__returned=R}}forceFetch(e,r={}){let n=Or.hasSubscribers,{status:i=uo()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#W(e,r);return i&&n&&(i.trace=!0,Or.tracePromise(()=>s,i).catch(()=>{})),s}async#W(e,r={}){let n=await this.#z(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let{status:n=Z.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="memo",n.key=e,r.context&&(n.context=r.context),n.cache=this);let i=this.#X(e,r);return n&&(n.value=i),Z.hasSubscribers&&Z.publish(n),i}#X(e,r={}){let n=this.#y;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...a}=r;s&&o&&(s.forceRefresh=!0);let l=this.#$(e,a),c=o||l===void 0;if(s&&(s.memo=c?"miss":"hit",c||(s.value=l)),!c)return l;let h=n(e,l,{options:a,context:i});return s&&(s.value=h),this.#F(e,h,a),h}get(e,r={}){let{status:n=Z.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#$(e,r);return n&&(i!==void 0&&(n.value=i),Z.hasSubscribers&&Z.publish(n)),i}#$(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#s[a],c=this.#l(l);return o&&this.#D(o,a),this.#C(a)?c?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#B(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=c?"fetching":"hit"),this.#Y(a),i&&this.#k(a),c?l.__staleWhileFetching:l)}#K(e,r){this.#v[r]=e,this.#w[e]=r}#Y(e){e!==this.#m&&(e===this.#d?this.#d=this.#w[e]:this.#K(this.#v[e],this.#w[e]),this.#K(this.#m,e),this.#m=e)}delete(e){return this.#B(e,"delete")}#B(e,r){Z.hasSubscribers&&Z.publish({op:"delete",delete:r,key:e,cache:this});let n=!1;if(this.#a!==0){let i=this.#u.get(e);if(i!==void 0)if(this.#_?.[i]&&(clearTimeout(this.#_?.[i]),this.#_[i]=void 0),n=!0,this.#a===1)this.#Q(r);else{this.#N(i);let s=this.#s[i];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#r)&&(this.#b&&this.#i?.(s,e,r),this.#r&&this.#g?.push([s,e,r])),this.#u.delete(e),this.#c[i]=void 0,this.#s[i]=void 0,i===this.#m)this.#m=this.#v[i];else if(i===this.#d)this.#d=this.#w[i];else{let o=this.#v[i];this.#w[o]=this.#w[i];let a=this.#w[i];this.#v[a]=this.#v[i]}this.#a--,this.#A.push(i)}}if(this.#r&&this.#g?.length){let i=this.#g,s;for(;s=i?.shift();)this.#o?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let r of this.#I({allowStale:!0})){let n=this.#s[r];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#c[r];this.#b&&this.#i?.(n,i,e),this.#r&&this.#g?.push([n,i,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#p&&this.#E){this.#p.fill(0),this.#E.fill(0);for(let r of this.#_??[])r!==void 0&&clearTimeout(r);this.#_?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#d=0,this.#m=0,this.#A.length=0,this.#f=0,this.#a=0,this.#r&&this.#g){let r=this.#g,n;for(;n=r?.shift();)this.#o?.(...n)}}}});import{EventEmitter as yo}from"node:events";import ku from"node:stream";import{StringDecoder as Pw}from"node:string_decoder";var Su,Iw,Lw,Rw,Qe,Xe,ct,zn,Lr,$n,Eu,Yn,Cu,Me,Gt,Y,Rr,zt,J,he,K,ho,Jn,ie,j,fo,po,Au,mo,je,go,Kn,Dr,St,xe,Tr,Dw,Tw,Nw,Fw,Qn,_o,Mw,Bw,ut,wo=$(()=>{Su=typeof process=="object"&&process?process:{stdout:null,stderr:null},Iw=t=>!!t&&typeof t=="object"&&(t instanceof ut||t instanceof ku||Lw(t)||Rw(t)),Lw=t=>!!t&&typeof t=="object"&&t instanceof yo&&typeof t.pipe=="function"&&t.pipe!==ku.Writable.prototype.pipe,Rw=t=>!!t&&typeof t=="object"&&t instanceof yo&&typeof t.write=="function"&&typeof t.end=="function",Qe=Symbol("EOF"),Xe=Symbol("maybeEmitEnd"),ct=Symbol("emittedEnd"),zn=Symbol("emittingEnd"),Lr=Symbol("emittedError"),$n=Symbol("closed"),Eu=Symbol("read"),Yn=Symbol("flush"),Cu=Symbol("flushChunk"),Me=Symbol("encoding"),Gt=Symbol("decoder"),Y=Symbol("flowing"),Rr=Symbol("paused"),zt=Symbol("resume"),J=Symbol("buffer"),he=Symbol("pipes"),K=Symbol("bufferLength"),ho=Symbol("bufferPush"),Jn=Symbol("bufferShift"),ie=Symbol("objectMode"),j=Symbol("destroyed"),fo=Symbol("error"),po=Symbol("emitData"),Au=Symbol("emitEnd"),mo=Symbol("emitEnd2"),je=Symbol("async"),go=Symbol("abort"),Kn=Symbol("aborted"),Dr=Symbol("signal"),St=Symbol("dataListeners"),xe=Symbol("discarded"),Tr=t=>Promise.resolve().then(t),Dw=t=>t(),Tw=t=>t==="end"||t==="finish"||t==="prefinish",Nw=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Fw=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Qn=class{src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[zt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},_o=class extends Qn{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=i=>this.dest.emit("error",i),e.on("error",this.proxyErrors)}},Mw=t=>!!t.objectMode,Bw=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",ut=class extends yo{[Y]=!1;[Rr]=!1;[he]=[];[J]=[];[ie];[Me];[je];[Gt];[Qe]=!1;[ct]=!1;[zn]=!1;[$n]=!1;[Lr]=null;[K]=0;[j]=!1;[Dr];[Kn]=!1;[St]=0;[xe]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Mw(r)?(this[ie]=!0,this[Me]=null):Bw(r)?(this[Me]=r.encoding,this[ie]=!1):(this[ie]=!1,this[Me]=null),this[je]=!!r.async,this[Gt]=this[Me]?new Pw(this[Me]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[J]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[he]});let{signal:n}=r;n&&(this[Dr]=n,n.aborted?this[go]():n.addEventListener("abort",()=>this[go]()))}get bufferLength(){return this[K]}get encoding(){return this[Me]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ie]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[je]}set async(e){this[je]=this[je]||!!e}[go](){this[Kn]=!0,this.emit("abort",this[Dr]?.reason),this.destroy(this[Dr]?.reason)}get aborted(){return this[Kn]}set aborted(e){}write(e,r,n){if(this[Kn])return!1;if(this[Qe])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[je]?Tr:Dw;if(!this[ie]&&!Buffer.isBuffer(e)){if(Fw(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Nw(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ie]?(this[Y]&&this[K]!==0&&this[Yn](!0),this[Y]?this.emit("data",e):this[ho](e),this[K]!==0&&this.emit("readable"),n&&i(n),this[Y]):e.length?(typeof e=="string"&&!(r===this[Me]&&!this[Gt]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Me]&&(e=this[Gt].write(e)),this[Y]&&this[K]!==0&&this[Yn](!0),this[Y]?this.emit("data",e):this[ho](e),this[K]!==0&&this.emit("readable"),n&&i(n),this[Y]):(this[K]!==0&&this.emit("readable"),n&&i(n),this[Y])}read(e){if(this[j])return null;if(this[xe]=!1,this[K]===0||e===0||e&&e>this[K])return this[Xe](),null;this[ie]&&(e=null),this[J].length>1&&!this[ie]&&(this[J]=[this[Me]?this[J].join(""):Buffer.concat(this[J],this[K])]);let r=this[Eu](e||null,this[J][0]);return this[Xe](),r}[Eu](e,r){if(this[ie])this[Jn]();else{let n=r;e===n.length||e===null?this[Jn]():typeof n=="string"?(this[J][0]=n.slice(e),r=n.slice(0,e),this[K]-=e):(this[J][0]=n.subarray(e),r=n.subarray(0,e),this[K]-=e)}return this.emit("data",r),!this[J].length&&!this[Qe]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[Qe]=!0,this.writable=!1,(this[Y]||!this[Rr])&&this[Xe](),this}[zt](){this[j]||(!this[St]&&!this[he].length&&(this[xe]=!0),this[Rr]=!1,this[Y]=!0,this.emit("resume"),this[J].length?this[Yn]():this[Qe]?this[Xe]():this.emit("drain"))}resume(){return this[zt]()}pause(){this[Y]=!1,this[Rr]=!0,this[xe]=!1}get destroyed(){return this[j]}get flowing(){return this[Y]}get paused(){return this[Rr]}[ho](e){this[ie]?this[K]+=1:this[K]+=e.length,this[J].push(e)}[Jn](){return this[ie]?this[K]-=1:this[K]-=this[J][0].length,this[J].shift()}[Yn](e=!1){do;while(this[Cu](this[Jn]())&&this[J].length);!e&&!this[J].length&&!this[Qe]&&this.emit("drain")}[Cu](e){return this.emit("data",e),this[Y]}pipe(e,r){if(this[j])return e;this[xe]=!1;let n=this[ct];return r=r||{},e===Su.stdout||e===Su.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[he].push(r.proxyErrors?new _o(this,e,r):new Qn(this,e,r)),this[je]?Tr(()=>this[zt]()):this[zt]()),e}unpipe(e){let r=this[he].find(n=>n.dest===e);r&&(this[he].length===1?(this[Y]&&this[St]===0&&(this[Y]=!1),this[he]=[]):this[he].splice(this[he].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[xe]=!1,this[St]++,!this[he].length&&!this[Y]&&this[zt]();else if(e==="readable"&&this[K]!==0)super.emit("readable");else if(Tw(e)&&this[ct])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Lr]){let i=r;this[je]?Tr(()=>i.call(this,this[Lr])):i.call(this,this[Lr])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[St]=this.listeners("data").length,this[St]===0&&!this[xe]&&!this[he].length&&(this[Y]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[St]=0,!this[xe]&&!this[he].length&&(this[Y]=!1)),r}get emittedEnd(){return this[ct]}[Xe](){!this[zn]&&!this[ct]&&!this[j]&&this[J].length===0&&this[Qe]&&(this[zn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[$n]&&this.emit("close"),this[zn]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==j&&this[j])return!1;if(e==="data")return!this[ie]&&!n?!1:this[je]?(Tr(()=>this[po](n)),!0):this[po](n);if(e==="end")return this[Au]();if(e==="close"){if(this[$n]=!0,!this[ct]&&!this[j])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Lr]=n,super.emit(fo,n);let s=!this[Dr]||this.listeners("error").length?super.emit("error",n):!1;return this[Xe](),s}else if(e==="resume"){let s=super.emit("resume");return this[Xe](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...r);return this[Xe](),i}[po](e){for(let n of this[he])n.dest.write(e)===!1&&this.pause();let r=this[xe]?!1:super.emit("data",e);return this[Xe](),r}[Au](){return this[ct]?!1:(this[ct]=!0,this.readable=!1,this[je]?(Tr(()=>this[mo]()),!0):this[mo]())}[mo](){if(this[Gt]){let r=this[Gt].end();if(r){for(let n of this[he])n.dest.write(r);this[xe]||super.emit("data",r)}}for(let r of this[he])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ie]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[ie]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[ie])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Me]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(j,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[xe]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Qe])return r();let s,o,a=u=>{this.off("data",l),this.off("end",c),this.off(j,h),r(),o(u)},l=u=>{this.off("error",a),this.off("end",c),this.off(j,h),this.pause(),s({value:u,done:!!this[Qe]})},c=()=>{this.off("error",a),this.off("data",l),this.off(j,h),r(),s({done:!0,value:void 0})},h=()=>a(new Error("stream destroyed"));return new Promise((u,f)=>{o=f,s=u,this.once(j,h),this.once("error",a),this.once("end",c),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[xe]=!1;let e=!1,r=()=>(this.pause(),this.off(fo,r),this.off(j,r),this.off("end",r),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return r();let i=this.read();return i===null?r():{done:!1,value:i}};return this.once("end",r),this.once(fo,r),this.once(j,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[j])return e?this.emit("error",e):this.emit(j),this;this[j]=!0,this[xe]=!0,this[J].length=0,this[K]=0;let r=this;return typeof r.close=="function"&&!this[$n]&&r.close(),e?this.emit("error",e):this.emit(j),this}static get isStream(){return Iw}}});import{posix as qw,win32 as xo}from"node:path";import{fileURLToPath as Hw}from"node:url";import{lstatSync as jw,readdir as Ww,readdirSync as Uw,readlinkSync as Vw,realpathSync as Gw}from"fs";import*as zw from"node:fs";import{lstat as Yw,readdir as Jw,readlink as Kw,realpath as Qw}from"node:fs/promises";var $w,Fr,Ru,Du,Xw,Zw,Re,Tu,Nu,We,Fu,Mu,Et,Bu,Le,Nr,bo,Ou,Mr,Be,Xn,ei,Pu,eb,vo,Iu,Br,Lu,Zn,ti,So,qu,se,ri,ni,ii,$t,Yt,qr,FA,Hu,ju=$(()=>{xu();wo();$w=Gw.native,Fr={lstatSync:jw,readdir:Ww,readdirSync:Uw,readlinkSync:Vw,realpathSync:$w,promises:{lstat:Yw,readdir:Jw,readlink:Kw,realpath:Qw}},Ru=t=>!t||t===Fr||t===zw?Fr:{...Fr,...t,promises:{...Fr.promises,...t.promises||{}}},Du=/^\\\\\?\\([a-z]:)\\?$/i,Xw=t=>t.replace(/\//g,"\\").replace(Du,"$1\\"),Zw=/[\\\/]/,Re=0,Tu=1,Nu=2,We=4,Fu=6,Mu=8,Et=10,Bu=12,Le=15,Nr=~Le,bo=16,Ou=32,Mr=64,Be=128,Xn=256,ei=512,Pu=Mr|Be|ei,eb=1023,vo=t=>t.isFile()?Mu:t.isDirectory()?We:t.isSymbolicLink()?Et:t.isCharacterDevice()?Nu:t.isBlockDevice()?Fu:t.isSocket()?Bu:t.isFIFO()?Tu:Re,Iu=new Ir({max:2**12}),Br=t=>{let e=Iu.get(t);if(e)return e;let r=t.normalize("NFKD");return Iu.set(t,r),r},Lu=new Ir({max:2**12}),Zn=t=>{let e=Lu.get(t);if(e)return e;let r=Br(t.toLowerCase());return Lu.set(t,r),r},ti=class extends Ir{constructor(){super({max:256})}},So=class extends Ir{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},qu=Symbol("PathScurry setAsCwd"),se=class{name;root;roots;parent;nocase;isCWD=!1;#e;#n;get dev(){return this.#n}#i;get mode(){return this.#i}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#w;get ctimeMs(){return this.#w}#v;get birthtimeMs(){return this.#v}#d;get atime(){return this.#d}#m;get mtime(){return this.#m}#A;get ctime(){return this.#A}#g;get birthtime(){return this.#g}#x;#E;#p;#_;#b;#O;#r;#L;#R;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=Re,n,i,s,o,a){this.name=e,this.#x=s?Zn(e):Br(e),this.#r=r&eb,this.nocase=s,this.roots=i,this.root=n||this,this.#L=o,this.#p=a.fullpath,this.#b=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=Ru(a.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#L}resolve(e){if(!e)return this;let r=this.getRootString(e),i=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#D(i):this.#D(i)}#D(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#L.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#L.set(this,r),this.#r&=~bo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?Zn(e):Br(e);for(let l of n)if(l.#x===i)return l;let s=this.parent?this.sep:"",o=this.#p?this.#p+s+e:void 0,a=this.newChild(e,Re,{...r,parent:this,fullpath:o});return this.canReaddir()||(a.#r|=Be),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#b!==void 0)return this.#b;let e=this.name,r=this.parent;if(!r)return this.#b=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=i}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#_=`//?/${i}`:this.#_=i}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#r&Le)===Re}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Le)===Mu}isDirectory(){return(this.#r&Le)===We}isCharacterDevice(){return(this.#r&Le)===Nu}isBlockDevice(){return(this.#r&Le)===Fu}isFIFO(){return(this.#r&Le)===Tu}isSocket(){return(this.#r&Le)===Bu}isSymbolicLink(){return(this.#r&Et)===Et}lstatCached(){return this.#r&Ou?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let e=this.#r&Le;return!(e!==Re&&e!==Et||this.#r&Xn||this.#r&Be)}calledReaddir(){return!!(this.#r&bo)}isENOENT(){return!!(this.#r&Be)}isNamed(e){return this.nocase?this.#x===Zn(e):this.#x===Br(e)}async readlink(){let e=this.#R;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(r);if(n)return this.#R=n}catch(r){this.#I(r.code);return}}readlinkSync(){let e=this.#R;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(r);if(n)return this.#R=n}catch(r){this.#I(r.code);return}}#q(e){this.#r|=bo;for(let r=e.provisional;r<e.length;r++){let n=e[r];n&&n.#C()}}#C(){this.#r&Be||(this.#r=(this.#r|Be)&Nr,this.#V())}#V(){let e=this.children();e.provisional=0;for(let r of e)r.#C()}#N(){this.#r|=ei,this.#T()}#T(){if(this.#r&Mr)return;let e=this.#r;(e&Le)===We&&(e&=Nr),this.#r=e|Mr,this.#V()}#H(e=""){e==="ENOTDIR"||e==="EPERM"?this.#T():e==="ENOENT"?this.#C():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#T():e==="ENOENT"&&this.#C()}#I(e=""){let r=this.#r;r|=Xn,e==="ENOENT"&&(r|=Be),(e==="EINVAL"||e==="UNKNOWN")&&(r&=Nr),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#T()}#j(e,r){return this.#U(e,r)||this.#F(e,r)}#F(e,r){let n=vo(e),i=this.newChild(e.name,n,{parent:this}),s=i.#r&Le;return s!==We&&s!==Et&&s!==Re&&(i.#r|=Mr),r.unshift(i),r.provisional++,i}#U(e,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?Zn(e.name):Br(e.name))===i.#x)return this.#J(e,i,n,r)}}#J(e,r,n,i){let s=r.name;return r.#r=r.#r&Nr|vo(e),s!==e.name&&(r.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if((this.#r&Be)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#r&Be)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#G(e){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:c,dev:h,gid:u,ino:f,mode:p,mtime:m,mtimeMs:d,nlink:_,rdev:g,size:y,uid:b}=e;this.#d=r,this.#c=n,this.#g=i,this.#v=s,this.#h=o,this.#u=a,this.#A=l,this.#w=c,this.#n=h,this.#S=u,this.#a=f,this.#i=p,this.#m=m,this.#s=d,this.#t=_,this.#y=g,this.#f=y,this.#o=b;let v=vo(e);this.#r=this.#r&Nr|v|Ou,v!==Re&&v!==We&&v!==Et&&(this.#r|=Mr)}#M=[];#l=!1;#z(e){this.#l=!1;let r=this.#M.slice();this.#M.length=0,r.forEach(n=>n(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#M.push(e),this.#l)return;this.#l=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#H(s.code),n.provisional=0;else{for(let a of o)this.#j(a,n);this.#q(n)}this.#z(n.slice(0,n.provisional))})}#W;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#W)await this.#W;else{let n=()=>{};this.#W=new Promise(i=>n=i);try{for(let i of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#j(i,e);this.#q(e)}catch(i){this.#H(i.code),e.provisional=0}this.#W=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#j(n,e);this.#q(e)}catch(n){this.#H(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&Pu)return!1;let e=Le&this.#r;return e===Re||e===We||e===Et}shouldWalk(e,r){return(this.#r&We)===We&&!(this.#r&Pu)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((ei|Xn|Be)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#k)return this.#k;if(!((ei|Xn|Be)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#N()}}[qu](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#b=n.join(this.sep),i.#O=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!r.has(i);)i.#b=void 0,i.#O=void 0,i=i.parent}},ri=class t extends se{sep="\\";splitSep=Zw;constructor(e,r=Re,n,i,s,o,a){super(e,r,n,i,s,o,a)}newChild(e,r=Re,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return xo.parse(e).root}getRoot(e){if(e=Xw(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new $t(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Du,"$1\\"),e===r}},ni=class t extends se{splitSep="/";sep="/";constructor(e,r=Re,n,i,s,o,a){super(e,r,n,i,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Re,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},ii=class{root;rootPath;roots;cwd;#e;#n;#i;nocase;#t;constructor(e=process.cwd(),r,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=Fr}={}){this.#t=Ru(o),(e instanceof URL||e.startsWith("file://"))&&(e=Hw(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new ti,this.#n=new ti,this.#i=new So(s);let l=a.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let c=this.root,h=l.length-1,u=r.sep,f=this.rootPath,p=!1;for(let m of l){let d=h--;c=c.child(m,{relative:new Array(d).fill("..").join(u),relativePosix:new Array(d).fill("..").join("/"),fullpath:f+=(p?"":u)+m}),p=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#i}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let n=this.#e.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#e.set(r,i),i}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let n=this.#n.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#n.set(r,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set,c=(u,f)=>{l.add(u),u.readdirCB((p,m)=>{if(p)return f(p);let d=m.length;if(!d)return f();let _=()=>{--d===0&&f()};for(let g of m)(!s||s(g))&&a.push(n?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(y=>y?.isUnknown()?y.lstat():y).then(y=>y?.shouldWalk(l,o)?c(y,_):_()):g.shouldWalk(l,o)?c(g,_):_()},!0)},h=e;return new Promise((u,f)=>{c(h,p=>{if(p)return f(p);u(a)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let h=c.readdirSync();for(let u of h){(!s||s(u))&&a.push(n?u:u.fullpath());let f=u;if(u.isSymbolicLink()){if(!(i&&(f=u.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(l,o)&&l.add(f)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let l of a){let c=l.readdirSync();for(let h of c){(!s||s(h))&&(yield n?h:h.fullpath());let u=h;if(h.isSymbolicLink()){if(!(i&&(u=h.realpathSync())))continue;u.isUnknown()&&u.lstatSync()}u.shouldWalk(a,o)&&a.add(u)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=new ut({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let l=new Set,c=[e],h=0,u=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let m=(_,g,y=!1)=>{if(_)return a.emit("error",_);if(i&&!y){let b=[];for(let v of g)v.isSymbolicLink()&&b.push(v.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(b.length){Promise.all(b).then(()=>m(null,g,!0));return}}for(let b of g)b&&(!s||s(b))&&(a.write(n?b:b.fullpath())||(f=!0));h--;for(let b of g){let v=b.realpathCached()||b;v.shouldWalk(l,o)&&c.push(v)}f&&!a.flowing?a.once("drain",u):d||u()},d=!0;p.readdirCB(m,!0),d=!1}};return u(),a}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof se||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=r,a=new ut({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let c=[e],h=0,u=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){h===0&&a.end();return}h++,l.add(p);let m=p.readdirSync();for(let d of m)(!s||s(d))&&(a.write(n?d:d.fullpath())||(f=!0));h--;for(let d of m){let _=d;if(d.isSymbolicLink()){if(!(i&&(_=d.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,o)&&c.push(_)}}f&&!a.flowing&&a.once("drain",u)};return u(),a}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[qu](r)}},$t=class extends ii{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,xo,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return xo.parse(e).root.toUpperCase()}newRoot(e){return new ri(this.rootPath,We,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Yt=class extends ii{sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,qw,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new ni(this.rootPath,We,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},qr=class extends Yt{constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}},FA=process.platform==="win32"?ri:ni,Hu=process.platform==="win32"?$t:process.platform==="darwin"?qr:Yt});var tb,rb,Jt,Eo=$(()=>{at();tb=t=>t.length>=1,rb=t=>t.length>=1,Jt=class t{#e;#n;#i;length;#t;#o;#S;#y;#h;#a;#f=!0;constructor(e,r,n,i){if(!tb(e))throw new TypeError("empty pattern list");if(!rb(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#n=r,this.#i=n,this.#t=i,this.#i===0){if(this.isUNC()){let[s,o,a,l,...c]=this.#e,[h,u,f,p,...m]=this.#n;c[0]===""&&(c.shift(),m.shift());let d=[s,o,a,l,""].join("/"),_=[h,u,f,p,""].join("/");this.#e=[d,...c],this.#n=[_,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#n;o[0]===""&&(o.shift(),l.shift());let c=s+"/",h=a+"/";this.#e=[c,...o],this.#n=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#i]}isString(){return typeof this.#e[this.#i]=="string"}isGlobstar(){return this.#e[this.#i]===H}isRegExp(){return this.#e[this.#i]instanceof RegExp}globString(){return this.#S=this.#S||(this.#i===0?this.isAbsolute()?this.#n[0]+this.#n.slice(1).join("/"):this.#n.join("/"):this.#n.slice(this.#i).join("/"))}hasMore(){return this.length>this.#i+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#n,this.#i+1,this.#t),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#t==="win32"&&this.#i===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#i===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#i===0?e:""}checkFollowGlobstar(){return!(this.#i===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#i===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var nb,Ct,Co=$(()=>{at();Eo();nb=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ct=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:i,noglobstar:s,platform:o=nb}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let r=new ve(e,this.mmopts);for(let n=0;n<r.set.length;n++){let i=r.set[n],s=r.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Jt(i,s,0,this.platform),a=new ve(o.globString(),this.mmopts),l=s[s.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(a):this.relative.push(a),l&&(c?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let r=e.fullpath(),n=`${r}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(r)||o.match(n))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}}});var Ao,ko,Oo,Hr,Wu=$(()=>{at();Ao=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}},ko=class{store=new Map;add(e,r,n){let i=(r?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Oo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Hr=class t{hasWalkedCache;matches=new ko;subwalks=new Oo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Ao}processPatterns(e,r){this.patterns=r;let n=r.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let u=s.rest();if(u)s=u;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,c,h=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)i=i.resolve(l),s=c,h=!0;if(l=s.pattern(),c=s.rest(),h){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let u=l===".."||l===""||l===".";this.matches.add(i.resolve(l),a,u);continue}else if(l===H){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let u=c?.pattern(),f=c?.rest();if(!c||(u===""||u===".")&&!f)this.matches.add(i,a,u===""||u===".");else if(u===".."){let p=i.parent||i;f?this.hasWalkedCache.hasWalked(p,f)||this.subwalks.add(p,f):this.matches.add(p,a,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),i=this.child();for(let s of r)for(let o of n){let a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===H?i.testGlobstar(s,o,c,a):l instanceof RegExp?i.testRegExp(s,l,c,a):i.testString(s,l,c,a)}return i}testGlobstar(e,r,n,i){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,r,n,i){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,r,n,i){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}}});var ib,si,jr,Wr,Uu=$(()=>{wo();Co();Wu();ib=(t,e)=>typeof t=="string"?new Ct([t],e):Array.isArray(t)?new Ct(t,e):t,si=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#n;#i;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#i=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#n=ib(n.ignore??[],n),!this.includeChildMatches&&typeof this.#n.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#n?.ignored?.(e)}#o(e){return!!this.#n?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#t(e))return;if(!this.includeChildMatches&&this.#n?.add){let s=`${e.relativePosix()}/**`;this.#n.add(s)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#i:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#i)?"."+this.#i:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,r,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,r)}matchSync(e,r,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,r)}walkCB(e,r,n){this.signal?.aborted&&n(),this.walkCB2(e,r,new Hr(this.opts),n)}walkCB2(e,r,n,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,i));return}n.processPatterns(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,n,o):a.readdirCB((c,h)=>this.walkCB3(a,h,n,o),!0)}o()}walkCB3(e,r,n,i){n=n.filterEntries(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let[a,l]of n.subwalks.entries())s++,this.walkCB2(a,l,n.child(),o);o()}walkCBSync(e,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,r,new Hr(this.opts),n)}walkCB2Sync(e,r,n,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,i));return}n.processPatterns(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,n,o)}o()}walkCB3Sync(e,r,n,i){n=n.filterEntries(e,r);let s=1,o=()=>{--s===0&&i()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let[a,l]of n.subwalks.entries())s++,this.walkCB2Sync(a,l,n.child(),o);o()}},jr=class extends si{matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Wr=class extends si{results;constructor(e,r,n){super(e,r,n),this.results=new ut({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as sb}from"node:url";var ob,De,Po=$(()=>{at();ju();Eo();Uu();ob=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",De=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=sb(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||ob,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?$t:r.platform==="darwin"?qr:r.platform?Yt:Hu;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new ve(l,i)),[o,a]=s.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=o.map((l,c)=>{let h=a[c];if(!h)throw new Error("invalid pattern object");return new Jt(l,h,0,this.platform)})}async walk(){return[...await new jr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new jr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Wr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Wr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var oi,Io=$(()=>{at();oi=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new ve(r,e).hasMagic())return!0;return!1}});var Ku={};Im(Ku,{Glob:()=>De,Ignore:()=>Ct,escape:()=>xt,glob:()=>Ze,globIterate:()=>Do,globIterateSync:()=>Vr,globStream:()=>Lo,globStreamSync:()=>Ur,globSync:()=>Ro,hasMagic:()=>oi,iterate:()=>Yu,iterateSync:()=>$u,stream:()=>zu,streamSync:()=>Gu,sync:()=>Ju,unescape:()=>Pe});function Ur(t,e={}){return new De(t,e).streamSync()}function Lo(t,e={}){return new De(t,e).stream()}function Ro(t,e={}){return new De(t,e).walkSync()}async function Vu(t,e={}){return new De(t,e).walk()}function Vr(t,e={}){return new De(t,e).iterateSync()}function Do(t,e={}){return new De(t,e).iterate()}var Gu,zu,$u,Yu,Ju,Ze,Gr=$(()=>{at();Po();Io();at();Po();Io();Co();Gu=Ur,zu=Object.assign(Lo,{sync:Ur}),$u=Vr,Yu=Object.assign(Do,{sync:Vr}),Ju=Object.assign(Ro,{stream:Ur,iterate:Vr}),Ze=Object.assign(Vu,{glob:Vu,globSync:Ro,sync:Ju,globStream:Lo,stream:zu,globStreamSync:Ur,streamSync:Gu,globIterate:Do,iterate:Yu,globIterateSync:Vr,iterateSync:$u,Glob:De,hasMagic:oi,escape:xt,unescape:Pe});Ze.glob=Ze});var Yr=w((Ck,Zu)=>{var hb=Object.prototype.toString;Zu.exports=function(e){if(e===void 0)return"undefined";if(e===null)return"null";var r=typeof e;if(r==="boolean")return"boolean";if(r==="string")return"string";if(r==="number")return"number";if(r==="symbol")return"symbol";if(r==="function")return gb(e)?"generatorfunction":"function";if(fb(e))return"array";if(wb(e))return"buffer";if(yb(e))return"arguments";if(db(e))return"date";if(pb(e))return"error";if(mb(e))return"regexp";switch(Xu(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(_b(e))return"generator";switch(r=hb.call(e),r){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Xu(t){return typeof t.constructor=="function"?t.constructor.name:null}function fb(t){return Array.isArray?Array.isArray(t):t instanceof Array}function pb(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function db(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function mb(t){return t instanceof RegExp?!0:typeof t.flags=="string"&&typeof t.ignoreCase=="boolean"&&typeof t.multiline=="boolean"&&typeof t.global=="boolean"}function gb(t,e){return Xu(t)==="GeneratorFunction"}function _b(t){return typeof t.throw=="function"&&typeof t.return=="function"&&typeof t.next=="function"}function yb(t){try{if(typeof t.length=="number"&&typeof t.callee=="function")return!0}catch(e){if(e.message.indexOf("callee")!==-1)return!0}return!1}function wb(t){return t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}});var th=w((Ak,eh)=>{"use strict";eh.exports=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")}});var ih=w((kk,nh)=>{"use strict";var rh=th();nh.exports=function(e){rh(e)||(e={});for(var r=arguments.length,n=1;n<r;n++){var i=arguments[n];rh(i)&&bb(e,i)}return e};function bb(t,e){for(var r in e)vb(e,r)&&(t[r]=e[r])}function vb(t,e){return Object.prototype.hasOwnProperty.call(t,e)}});var ah=w((Ok,oh)=>{"use strict";var xb=Yr(),Sb=ih();oh.exports=function(t,e){typeof e=="function"&&(e={parse:e});var r=Cb(t),n={section_delimiter:"---",parse:kb},i=Sb({},n,e),s=i.section_delimiter,o=r.content.split(/\r?\n/),a=null,l=sh(),c=[],h=[];function u(g){r.content=g,a=[],c=[]}function f(g){h.length&&(l.key=Ab(h[0],s),l.content=g,i.parse(l,a),a.push(l),l=sh(),c=[],h=[])}for(var p=0;p<o.length;p++){var m=o[p],d=h.length,_=m.trim();if(Eb(_,s)){if(_.length===3&&p!==0){if(d===0||d===2){c.push(m);continue}h.push(_),l.data=c.join(`
|
|
30
|
+
`),c=[];continue}a===null&&u(c.join(`
|
|
31
|
+
`)),d===2&&f(c.join(`
|
|
32
|
+
`)),h.push(_);continue}c.push(m)}return a===null?u(c.join(`
|
|
33
|
+
`)):f(c.join(`
|
|
34
|
+
`)),r.sections=a,r};function Eb(t,e){return!(t.slice(0,e.length)!==e||t.charAt(e.length+1)===e.slice(-1))}function Cb(t){if(xb(t)!=="object"&&(t={content:t}),typeof t.content!="string"&&!Ob(t.content))throw new TypeError("expected a buffer or string");return t.content=t.content.toString(),t.sections=[],t}function Ab(t,e){return t?t.slice(e.length).trim():""}function sh(){return{key:"",data:"",content:""}}function kb(t){return t}function Ob(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"?t.constructor.isBuffer(t):!1}});var kt=w((Pk,At)=>{"use strict";function lh(t){return typeof t>"u"||t===null}function Pb(t){return typeof t=="object"&&t!==null}function Ib(t){return Array.isArray(t)?t:lh(t)?[]:[t]}function Lb(t,e){var r,n,i,s;if(e)for(s=Object.keys(e),r=0,n=s.length;r<n;r+=1)i=s[r],t[i]=e[i];return t}function Rb(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function Db(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}At.exports.isNothing=lh;At.exports.isObject=Pb;At.exports.toArray=Ib;At.exports.repeat=Rb;At.exports.isNegativeZero=Db;At.exports.extend=Lb});var Kt=w((Ik,ch)=>{"use strict";function Jr(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Jr.prototype=Object.create(Error.prototype);Jr.prototype.constructor=Jr;Jr.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};ch.exports=Jr});var fh=w((Lk,hh)=>{"use strict";var uh=kt();function No(t,e,r,n,i){this.name=t,this.buffer=e,this.position=r,this.line=n,this.column=i}No.prototype.getSnippet=function(e,r){var n,i,s,o,a;if(!this.buffer)return null;for(e=e||4,r=r||75,n="",i=this.position;i>0&&`\0\r
|
|
35
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>r/2-1){n=" ... ",i+=5;break}for(s="",o=this.position;o<this.buffer.length&&`\0\r
|
|
36
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>r/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),uh.repeat(" ",e)+n+a+s+`
|
|
37
|
+
`+uh.repeat(" ",e+this.position-i+n.length)+"^"};No.prototype.toString=function(e){var r,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(n+=`:
|
|
38
|
+
`+r)),n};hh.exports=No});var z=w((Rk,dh)=>{"use strict";var ph=Kt(),Tb=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Nb=["scalar","sequence","mapping"];function Fb(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function Mb(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Tb.indexOf(r)===-1)throw new ph('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Fb(e.styleAliases||null),Nb.indexOf(this.kind)===-1)throw new ph('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}dh.exports=Mb});var Ot=w((Dk,gh)=>{"use strict";var mh=kt(),li=Kt(),Bb=z();function Fo(t,e,r){var n=[];return t.include.forEach(function(i){r=Fo(i,e,r)}),t[e].forEach(function(i){r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&n.push(o)}),r.push(i)}),r.filter(function(i,s){return n.indexOf(s)===-1})}function qb(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function n(i){t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function Qt(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new li("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Fo(this,"implicit",[]),this.compiledExplicit=Fo(this,"explicit",[]),this.compiledTypeMap=qb(this.compiledImplicit,this.compiledExplicit)}Qt.DEFAULT=null;Qt.create=function(){var e,r;switch(arguments.length){case 1:e=Qt.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new li("Wrong number of arguments for Schema.create function")}if(e=mh.toArray(e),r=mh.toArray(r),!e.every(function(n){return n instanceof Qt}))throw new li("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(n){return n instanceof Bb}))throw new li("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Qt({include:e,explicit:r})};gh.exports=Qt});var yh=w((Tk,_h)=>{"use strict";var Hb=z();_h.exports=new Hb("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var bh=w((Nk,wh)=>{"use strict";var jb=z();wh.exports=new jb("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var xh=w((Fk,vh)=>{"use strict";var Wb=z();vh.exports=new Wb("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var ci=w((Mk,Sh)=>{"use strict";var Ub=Ot();Sh.exports=new Ub({explicit:[yh(),bh(),xh()]})});var Ch=w((Bk,Eh)=>{"use strict";var Vb=z();function Gb(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function zb(){return null}function $b(t){return t===null}Eh.exports=new Vb("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gb,construct:zb,predicate:$b,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var kh=w((qk,Ah)=>{"use strict";var Yb=z();function Jb(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Kb(t){return t==="true"||t==="True"||t==="TRUE"}function Qb(t){return Object.prototype.toString.call(t)==="[object Boolean]"}Ah.exports=new Yb("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Jb,construct:Kb,predicate:Qb,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var Ph=w((Hk,Oh)=>{"use strict";var Xb=kt(),Zb=z();function ev(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function tv(t){return 48<=t&&t<=55}function rv(t){return 48<=t&&t<=57}function nv(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!ev(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}for(;r<e;r++)if(i=t[r],i!=="_"){if(!tv(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(i===":")break;if(!rv(t.charCodeAt(r)))return!1;n=!0}return!n||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function iv(t){var e=t,r=1,n,i,s=[];return e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0"?0:n==="0"?e[1]==="b"?r*parseInt(e.slice(2),2):e[1]==="x"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(":")!==-1?(e.split(":").forEach(function(o){s.unshift(parseInt(o,10))}),e=0,i=1,s.forEach(function(o){e+=o*i,i*=60}),r*e):r*parseInt(e,10)}function sv(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Xb.isNegativeZero(t)}Oh.exports=new Zb("tag:yaml.org,2002:int",{kind:"scalar",resolve:nv,construct:iv,predicate:sv,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Rh=w((jk,Lh)=>{"use strict";var Ih=kt(),ov=z(),av=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lv(t){return!(t===null||!av.test(t)||t[t.length-1]==="_")}function cv(t){var e,r,n,i;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){i.unshift(parseFloat(s,10))}),e=0,n=1,i.forEach(function(s){e+=s*n,n*=60}),r*e):r*parseFloat(e,10)}var uv=/^[-+]?[0-9]+e/;function hv(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ih.isNegativeZero(t))return"-0.0";return r=t.toString(10),uv.test(r)?r.replace("e",".e"):r}function fv(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ih.isNegativeZero(t))}Lh.exports=new ov("tag:yaml.org,2002:float",{kind:"scalar",resolve:lv,construct:cv,predicate:fv,represent:hv,defaultStyle:"lowercase"})});var Mo=w((Wk,Dh)=>{"use strict";var pv=Ot();Dh.exports=new pv({include:[ci()],implicit:[Ch(),kh(),Ph(),Rh()]})});var Bo=w((Uk,Th)=>{"use strict";var dv=Ot();Th.exports=new dv({include:[Mo()]})});var Bh=w((Vk,Mh)=>{"use strict";var mv=z(),Nh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Fh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function gv(t){return t===null?!1:Nh.exec(t)!==null||Fh.exec(t)!==null}function _v(t){var e,r,n,i,s,o,a,l=0,c=null,h,u,f;if(e=Nh.exec(t),e===null&&(e=Fh.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],u=+(e[11]||0),c=(h*60+u)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,n,i,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function yv(t){return t.toISOString()}Mh.exports=new mv("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gv,construct:_v,instanceOf:Date,represent:yv})});var Hh=w((Gk,qh)=>{"use strict";var wv=z();function bv(t){return t==="<<"||t===null}qh.exports=new wv("tag:yaml.org,2002:merge",{kind:"scalar",resolve:bv})});var Uh=w((zk,Wh)=>{"use strict";var Pt;try{jh=re,Pt=jh("buffer").Buffer}catch{}var jh,vv=z(),qo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
39
|
+
\r`;function xv(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=qo;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function Sv(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=qo,o=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),Pt?Pt.from?Pt.from(a):new Pt(a):a}function Ev(t){var e="",r=0,n,i,s=t.length,o=qo;for(n=0;n<s;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function Cv(t){return Pt&&Pt.isBuffer(t)}Wh.exports=new vv("tag:yaml.org,2002:binary",{kind:"scalar",resolve:xv,construct:Sv,predicate:Cv,represent:Ev})});var Gh=w((Yk,Vh)=>{"use strict";var Av=z(),kv=Object.prototype.hasOwnProperty,Ov=Object.prototype.toString;function Pv(t){if(t===null)return!0;var e=[],r,n,i,s,o,a=t;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],o=!1,Ov.call(i)!=="[object Object]")return!1;for(s in i)if(kv.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function Iv(t){return t!==null?t:[]}Vh.exports=new Av("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Pv,construct:Iv})});var $h=w((Jk,zh)=>{"use strict";var Lv=z(),Rv=Object.prototype.toString;function Dv(t){if(t===null)return!0;var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],Rv.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function Tv(t){if(t===null)return[];var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}zh.exports=new Lv("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Dv,construct:Tv})});var Jh=w((Kk,Yh)=>{"use strict";var Nv=z(),Fv=Object.prototype.hasOwnProperty;function Mv(t){if(t===null)return!0;var e,r=t;for(e in r)if(Fv.call(r,e)&&r[e]!==null)return!1;return!0}function Bv(t){return t!==null?t:{}}Yh.exports=new Nv("tag:yaml.org,2002:set",{kind:"mapping",resolve:Mv,construct:Bv})});var Xt=w((Qk,Kh)=>{"use strict";var qv=Ot();Kh.exports=new qv({include:[Bo()],implicit:[Bh(),Hh()],explicit:[Uh(),Gh(),$h(),Jh()]})});var Xh=w((Xk,Qh)=>{"use strict";var Hv=z();function jv(){return!0}function Wv(){}function Uv(){return""}function Vv(t){return typeof t>"u"}Qh.exports=new Hv("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:jv,construct:Wv,predicate:Vv,represent:Uv})});var ef=w((Zk,Zh)=>{"use strict";var Gv=z();function zv(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),n="";return!(e[0]==="/"&&(r&&(n=r[1]),n.length>3||e[e.length-n.length-1]!=="/"))}function $v(t){var e=t,r=/\/([gim]*)$/.exec(t),n="";return e[0]==="/"&&(r&&(n=r[1]),e=e.slice(1,e.length-n.length-1)),new RegExp(e,n)}function Yv(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function Jv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}Zh.exports=new Gv("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:zv,construct:$v,predicate:Jv,represent:Yv})});var nf=w((eO,rf)=>{"use strict";var ui;try{tf=re,ui=tf("esprima")}catch{typeof window<"u"&&(ui=window.esprima)}var tf,Kv=z();function Qv(t){if(t===null)return!1;try{var e="("+t+")",r=ui.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Xv(t){var e="("+t+")",r=ui.parse(e,{range:!0}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(s){n.push(s.name)}),i=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(n,e.slice(i[0]+1,i[1]-1)):new Function(n,"return "+e.slice(i[0],i[1]))}function Zv(t){return t.toString()}function ex(t){return Object.prototype.toString.call(t)==="[object Function]"}rf.exports=new Kv("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Qv,construct:Xv,predicate:ex,represent:Zv})});var Kr=w((rO,of)=>{"use strict";var sf=Ot();of.exports=sf.DEFAULT=new sf({include:[Xt()],explicit:[Xh(),ef(),nf()]})});var Af=w((nO,Qr)=>{"use strict";var et=kt(),pf=Kt(),tx=fh(),df=Xt(),rx=Kr(),ft=Object.prototype.hasOwnProperty,hi=1,mf=2,gf=3,fi=4,Ho=1,nx=2,af=3,ix=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,sx=/[\x85\u2028\u2029]/,ox=/[,\[\]\{\}]/,_f=/^(?:!|!!|![a-z\-]+!)$/i,yf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function lf(t){return Object.prototype.toString.call(t)}function Ue(t){return t===10||t===13}function Lt(t){return t===9||t===32}function we(t){return t===9||t===32||t===10||t===13}function Zt(t){return t===44||t===91||t===93||t===123||t===125}function ax(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function lx(t){return t===120?2:t===117?4:t===85?8:0}function cx(t){return 48<=t&&t<=57?t-48:-1}function cf(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
40
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function ux(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function wf(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var bf=new Array(256),vf=new Array(256);for(It=0;It<256;It++)bf[It]=cf(It)?1:0,vf[It]=cf(It);var It;function hx(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||rx,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function xf(t,e){return new pf(e,new tx(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function C(t,e){throw xf(t,e)}function pi(t,e){t.onWarning&&t.onWarning.call(null,xf(t,e))}var uf={YAML:function(e,r,n){var i,s,o;e.version!==null&&C(e,"duplication of %YAML directive"),n.length!==1&&C(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&C(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&C(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&pi(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&C(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],_f.test(i)||C(e,"ill-formed tag handle (first argument) of the TAG directive"),ft.call(e.tagMap,i)&&C(e,'there is a previously declared suffix for "'+i+'" tag handle'),yf.test(s)||C(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=s}};function ht(t,e,r,n){var i,s,o,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||C(t,"expected valid JSON character");else ix.test(a)&&C(t,"the stream contains non-printable characters");t.result+=a}}function hf(t,e,r,n){var i,s,o,a;for(et.isObject(r)||C(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)s=i[o],ft.call(e,s)||(wf(e,s,r[s]),n[s]=!0)}function er(t,e,r,n,i,s,o,a){var l,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,c=i.length;l<c;l+=1)Array.isArray(i[l])&&C(t,"nested arrays are not supported inside keys"),typeof i=="object"&&lf(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&lf(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)hf(t,e,s[l],r);else hf(t,e,s,r);else!t.json&&!ft.call(r,i)&&ft.call(e,i)&&(t.line=o||t.line,t.position=a||t.position,C(t,"duplicated mapping key")),wf(e,i,s),delete r[i];return e}function jo(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):C(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function U(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Lt(i);)i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Ue(i))for(jo(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&pi(t,"deficient indentation"),n}function di(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||we(r)))}function Wo(t,e){e===1?t.result+=" ":e>1&&(t.result+=et.repeat(`
|
|
41
|
+
`,e-1))}function fx(t,e,r){var n,i,s,o,a,l,c,h,u=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),we(p)||Zt(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),we(i)||r&&Zt(i)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),we(i)||r&&Zt(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),we(n))break}else{if(t.position===t.lineStart&&di(t)||r&&Zt(p))break;if(Ue(p))if(l=t.line,c=t.lineStart,h=t.lineIndent,U(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=h;break}}a&&(ht(t,s,o,!1),Wo(t,t.line-l),s=o=t.position,a=!1),Lt(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return ht(t,s,o,!1),t.result?!0:(t.kind=u,t.result=f,!1)}function px(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ht(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Ue(r)?(ht(t,n,i,!0),Wo(t,U(t,!1,e)),n=i=t.position):t.position===t.lineStart&&di(t)?C(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);C(t,"unexpected end of the stream within a single quoted scalar")}function dx(t,e){var r,n,i,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ht(t,r,t.position,!0),t.position++,!0;if(a===92){if(ht(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Ue(a))U(t,!1,e);else if(a<256&&bf[a])t.result+=vf[a],t.position++;else if((o=lx(a))>0){for(i=o,s=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=ax(a))>=0?s=(s<<4)+o:C(t,"expected hexadecimal character");t.result+=ux(s),t.position++}else C(t,"unknown escape sequence");r=n=t.position}else Ue(a)?(ht(t,r,n,!0),Wo(t,U(t,!1,e)),r=n=t.position):t.position===t.lineStart&&di(t)?C(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}C(t,"unexpected end of the stream within a double quoted scalar")}function mx(t,e){var r=!0,n,i=t.tag,s,o=t.anchor,a,l,c,h,u,f={},p,m,d,_;if(_=t.input.charCodeAt(t.position),_===91)l=93,u=!1,s=[];else if(_===123)l=125,u=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),_=t.input.charCodeAt(++t.position);_!==0;){if(U(t,!0,e),_=t.input.charCodeAt(t.position),_===l)return t.position++,t.tag=i,t.anchor=o,t.kind=u?"mapping":"sequence",t.result=s,!0;r||C(t,"missed comma between flow collection entries"),m=p=d=null,c=h=!1,_===63&&(a=t.input.charCodeAt(t.position+1),we(a)&&(c=h=!0,t.position++,U(t,!0,e))),n=t.line,tr(t,e,hi,!1,!0),m=t.tag,p=t.result,U(t,!0,e),_=t.input.charCodeAt(t.position),(h||t.line===n)&&_===58&&(c=!0,_=t.input.charCodeAt(++t.position),U(t,!0,e),tr(t,e,hi,!1,!0),d=t.result),u?er(t,s,f,m,p,d):c?s.push(er(t,null,f,m,p,d)):s.push(p),U(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(r=!0,_=t.input.charCodeAt(++t.position)):r=!1}C(t,"unexpected end of the stream within a flow collection")}function gx(t,e){var r,n,i=Ho,s=!1,o=!1,a=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)Ho===i?i=u===43?af:nx:C(t,"repeat of a chomping mode identifier");else if((h=cx(u))>=0)h===0?C(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?C(t,"repeat of an indentation width identifier"):(a=e+h-1,o=!0);else break;if(Lt(u)){do u=t.input.charCodeAt(++t.position);while(Lt(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!Ue(u)&&u!==0)}for(;u!==0;){for(jo(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Ue(u)){l++;continue}if(t.lineIndent<a){i===af?t.result+=et.repeat(`
|
|
42
|
+
`,s?1+l:l):i===Ho&&s&&(t.result+=`
|
|
43
|
+
`);break}for(n?Lt(u)?(c=!0,t.result+=et.repeat(`
|
|
44
|
+
`,s?1+l:l)):c?(c=!1,t.result+=et.repeat(`
|
|
45
|
+
`,l+1)):l===0?s&&(t.result+=" "):t.result+=et.repeat(`
|
|
46
|
+
`,l):t.result+=et.repeat(`
|
|
47
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=t.position;!Ue(u)&&u!==0;)u=t.input.charCodeAt(++t.position);ht(t,r,t.position,!1)}return!0}function ff(t,e){var r,n=t.tag,i=t.anchor,s=[],o,a=!1,l;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&!(l!==45||(o=t.input.charCodeAt(t.position+1),!we(o)));){if(a=!0,t.position++,U(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,tr(t,e,gf,!1,!0),s.push(t.result),U(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)C(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function _x(t,e,r){var n,i,s,o,a=t.tag,l=t.anchor,c={},h={},u=null,f=null,p=null,m=!1,d=!1,_;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),_=t.input.charCodeAt(t.position);_!==0;){if(n=t.input.charCodeAt(t.position+1),s=t.line,o=t.position,(_===63||_===58)&&we(n))_===63?(m&&(er(t,c,h,u,f,null),u=f=p=null),d=!0,m=!0,i=!0):m?(m=!1,i=!0):C(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=n;else if(tr(t,r,mf,!1,!0))if(t.line===s){for(_=t.input.charCodeAt(t.position);Lt(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),we(_)||C(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(er(t,c,h,u,f,null),u=f=p=null),d=!0,m=!1,i=!1,u=t.tag,f=t.result;else if(d)C(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=a,t.anchor=l,!0}else if(d)C(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=a,t.anchor=l,!0;else break;if((t.line===s||t.lineIndent>e)&&(tr(t,e,fi,!0,i)&&(m?f=t.result:p=t.result),m||(er(t,c,h,u,f,p,s,o),u=f=p=null),U(t,!0,-1),_=t.input.charCodeAt(t.position)),t.lineIndent>e&&_!==0)C(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&er(t,c,h,u,f,null),d&&(t.tag=a,t.anchor=l,t.kind="mapping",t.result=c),d}function yx(t){var e,r=!1,n=!1,i,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&C(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):C(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!we(o);)o===33&&(n?C(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),_f.test(i)||C(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),ox.test(s)&&C(t,"tag suffix cannot contain flow indicator characters")}return s&&!yf.test(s)&&C(t,"tag name cannot contain such characters: "+s),r?t.tag=s:ft.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:C(t,'undeclared tag handle "'+i+'"'),!0}function wx(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&C(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!we(r)&&!Zt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&C(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function bx(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!we(n)&&!Zt(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&C(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),ft.call(t.anchorMap,r)||C(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],U(t,!0,-1),!0}function tr(t,e,r,n,i){var s,o,a,l=1,c=!1,h=!1,u,f,p,m,d;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=fi===r||gf===r,n&&U(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;yx(t)||wx(t);)U(t,!0,-1)?(c=!0,a=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=c||i),(l===1||fi===r)&&(hi===r||mf===r?m=e:m=e+1,d=t.position-t.lineStart,l===1?a&&(ff(t,d)||_x(t,d,m))||mx(t,m)?h=!0:(o&&gx(t,m)||px(t,m)||dx(t,m)?h=!0:bx(t)?(h=!0,(t.tag!==null||t.anchor!==null)&&C(t,"alias node should not have any properties")):fx(t,m,hi===r)&&(h=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(h=a&&ff(t,d))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&C(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u<f;u+=1)if(p=t.implicitTypes[u],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else ft.call(t.typeMap[t.kind||"fallback"],t.tag)?(p=t.typeMap[t.kind||"fallback"][t.tag],t.result!==null&&p.kind!==t.kind&&C(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result)?(t.result=p.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):C(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):C(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function vx(t){var e=t.position,r,n,i,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(o=t.input.charCodeAt(t.position))!==0&&(U(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!we(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&C(t,"directive name must not be less than one character in length");o!==0;){for(;Lt(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Ue(o));break}if(Ue(o))break;for(r=t.position;o!==0&&!we(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&jo(t),ft.call(uf,n)?uf[n](t,n,i):pi(t,'unknown document directive "'+n+'"')}if(U(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,U(t,!0,-1)):s&&C(t,"directives end mark is expected"),tr(t,t.lineIndent-1,fi,!1,!0),U(t,!0,-1),t.checkLineBreaks&&sx.test(t.input.slice(e,t.position))&&pi(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&di(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,U(t,!0,-1));return}if(t.position<t.length-1)C(t,"end of the stream or a document separator is expected");else return}function Sf(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
48
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new hx(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,C(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)vx(r);return r.documents}function Ef(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Sf(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function Cf(t,e){var r=Sf(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new pf("expected a single document in the stream, but found more")}}function xx(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),Ef(t,e,et.extend({schema:df},r))}function Sx(t,e){return Cf(t,et.extend({schema:df},e))}Qr.exports.loadAll=Ef;Qr.exports.load=Cf;Qr.exports.safeLoadAll=xx;Qr.exports.safeLoad=Sx});var Jf=w((iO,zo)=>{"use strict";var Zr=kt(),en=Kt(),Ex=Kr(),Cx=Xt(),Tf=Object.prototype.toString,Nf=Object.prototype.hasOwnProperty,Ax=9,Xr=10,kx=13,Ox=32,Px=33,Ix=34,Ff=35,Lx=37,Rx=38,Dx=39,Tx=42,Mf=44,Nx=45,Bf=58,Fx=61,Mx=62,Bx=63,qx=64,qf=91,Hf=93,Hx=96,jf=123,jx=124,Wf=125,oe={};oe[0]="\\0";oe[7]="\\a";oe[8]="\\b";oe[9]="\\t";oe[10]="\\n";oe[11]="\\v";oe[12]="\\f";oe[13]="\\r";oe[27]="\\e";oe[34]='\\"';oe[92]="\\\\";oe[133]="\\N";oe[160]="\\_";oe[8232]="\\L";oe[8233]="\\P";var Wx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Ux(t,e){var r,n,i,s,o,a,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,s=n.length;i<s;i+=1)o=n[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&Nf.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}function kf(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new en("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Zr.repeat("0",n-e.length)+e}function Vx(t){this.schema=t.schema||Ex,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Zr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ux(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Of(t,e){for(var r=Zr.repeat(" ",e),n=0,i=-1,s="",o,a=t.length;n<a;)i=t.indexOf(`
|
|
49
|
+
`,n),i===-1?(o=t.slice(n),n=a):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
|
|
50
|
+
`&&(s+=r),s+=o;return s}function Uo(t,e){return`
|
|
51
|
+
`+Zr.repeat(" ",t.indent*e)}function Gx(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function Go(t){return t===Ox||t===Ax}function rr(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function zx(t){return rr(t)&&!Go(t)&&t!==65279&&t!==kx&&t!==Xr}function Pf(t,e){return rr(t)&&t!==65279&&t!==Mf&&t!==qf&&t!==Hf&&t!==jf&&t!==Wf&&t!==Bf&&(t!==Ff||e&&zx(e))}function $x(t){return rr(t)&&t!==65279&&!Go(t)&&t!==Nx&&t!==Bx&&t!==Bf&&t!==Mf&&t!==qf&&t!==Hf&&t!==jf&&t!==Wf&&t!==Ff&&t!==Rx&&t!==Tx&&t!==Px&&t!==jx&&t!==Fx&&t!==Mx&&t!==Dx&&t!==Ix&&t!==Lx&&t!==qx&&t!==Hx}function Uf(t){var e=/^\n* /;return e.test(t)}var Vf=1,Gf=2,zf=3,$f=4,mi=5;function Yx(t,e,r,n,i){var s,o,a,l=!1,c=!1,h=n!==-1,u=-1,f=$x(t.charCodeAt(0))&&!Go(t.charCodeAt(t.length-1));if(e)for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),!rr(o))return mi;a=s>0?t.charCodeAt(s-1):null,f=f&&Pf(o,a)}else{for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),o===Xr)l=!0,h&&(c=c||s-u-1>n&&t[u+1]!==" ",u=s);else if(!rr(o))return mi;a=s>0?t.charCodeAt(s-1):null,f=f&&Pf(o,a)}c=c||h&&s-u-1>n&&t[u+1]!==" "}return!l&&!c?f&&!i(t)?Vf:Gf:r>9&&Uf(t)?mi:c?$f:zf}function Jx(t,e,r,n){t.dump=(function(){if(e.length===0)return"''";if(!t.noCompatMode&&Wx.indexOf(e)!==-1)return"'"+e+"'";var i=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),o=n||t.flowLevel>-1&&r>=t.flowLevel;function a(l){return Gx(t,l)}switch(Yx(e,o,t.indent,s,a)){case Vf:return e;case Gf:return"'"+e.replace(/'/g,"''")+"'";case zf:return"|"+If(e,t.indent)+Lf(Of(e,i));case $f:return">"+If(e,t.indent)+Lf(Of(Kx(e,s),i));case mi:return'"'+Qx(e,s)+'"';default:throw new en("impossible error: invalid scalar style")}})()}function If(t,e){var r=Uf(t)?String(e):"",n=t[t.length-1]===`
|
|
52
|
+
`,i=n&&(t[t.length-2]===`
|
|
53
|
+
`||t===`
|
|
54
|
+
`),s=i?"+":n?"":"-";return r+s+`
|
|
55
|
+
`}function Lf(t){return t[t.length-1]===`
|
|
56
|
+
`?t.slice(0,-1):t}function Kx(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var c=t.indexOf(`
|
|
57
|
+
`);return c=c!==-1?c:t.length,r.lastIndex=c,Rf(t.slice(0,c),e)})(),i=t[0]===`
|
|
58
|
+
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",n+=a+(!i&&!s&&l!==""?`
|
|
59
|
+
`:"")+Rf(l,e),i=s}return n}function Rf(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,l="";n=r.exec(t);)a=n.index,a-i>e&&(s=o>i?o:a,l+=`
|
|
60
|
+
`+t.slice(i,s),i=s+1),o=a;return l+=`
|
|
61
|
+
`,t.length-i>e&&o>i?l+=t.slice(i,o)+`
|
|
62
|
+
`+t.slice(o+1):l+=t.slice(i),l.slice(1)}function Qx(t){for(var e="",r,n,i,s=0;s<t.length;s++){if(r=t.charCodeAt(s),r>=55296&&r<=56319&&(n=t.charCodeAt(s+1),n>=56320&&n<=57343)){e+=kf((r-55296)*1024+n-56320+65536),s++;continue}i=oe[r],e+=!i&&rr(r)?t[s]:i||kf(r)}return e}function Xx(t,e,r){var n="",i=t.tag,s,o;for(s=0,o=r.length;s<o;s+=1)Rt(t,e,r[s],!1,!1)&&(s!==0&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function Zx(t,e,r,n){var i="",s=t.tag,o,a;for(o=0,a=r.length;o<a;o+=1)Rt(t,e+1,r[o],!0,!0)&&((!n||o!==0)&&(i+=Uo(t,e)),t.dump&&Xr===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function e1(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,l,c,h;for(o=0,a=s.length;o<a;o+=1)h="",o!==0&&(h+=", "),t.condenseFlow&&(h+='"'),l=s[o],c=r[l],Rt(t,e,l,!1,!1)&&(t.dump.length>1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rt(t,e,c,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function t1(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,l,c,h,u,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new en("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!n||a!==0)&&(f+=Uo(t,e)),c=o[a],h=r[c],Rt(t,e+1,c,!0,!0,!0)&&(u=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,u&&(t.dump&&Xr===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=Uo(t,e)),Rt(t,e+1,h,!0,u)&&(t.dump&&Xr===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=s,t.dump=i||"{}"}function Df(t,e,r){var n,i,s,o,a,l;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(t.tag=r?a.tag:"?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,Tf.call(a.represent)==="[object Function]")n=a.represent(e,l);else if(Nf.call(a.represent,l))n=a.represent[l](e,l);else throw new en("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Rt(t,e,r,n,i,s){t.tag=null,t.dump=r,Df(t,r,!1)||Df(t,r,!0);var o=Tf.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=t.duplicates.indexOf(r),c=l!==-1),(t.tag!==null&&t.tag!=="?"||c||t.indent!==2&&e>0)&&(i=!1),c&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(a&&c&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(t1(t,e,t.dump,i),c&&(t.dump="&ref_"+l+t.dump)):(e1(t,e,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object Array]"){var h=t.noArrayIndent&&e>0?e-1:e;n&&t.dump.length!==0?(Zx(t,h,t.dump,i),c&&(t.dump="&ref_"+l+t.dump)):(Xx(t,h,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump))}else if(o==="[object String]")t.tag!=="?"&&Jx(t,t.dump,e,s);else{if(t.skipInvalid)return!1;throw new en("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function r1(t,e){var r=[],n=[],i,s;for(Vo(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function Vo(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)Vo(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)Vo(t[n[i]],e,r)}function Yf(t,e){e=e||{};var r=new Vx(e);return r.noRefs||r1(t,r),Rt(r,0,t,!0,!0)?r.dump+`
|
|
63
|
+
`:""}function n1(t,e){return Yf(t,Zr.extend({schema:Cx},e))}zo.exports.dump=Yf;zo.exports.safeDump=n1});var Qf=w((sO,B)=>{"use strict";var gi=Af(),Kf=Jf();function _i(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}B.exports.Type=z();B.exports.Schema=Ot();B.exports.FAILSAFE_SCHEMA=ci();B.exports.JSON_SCHEMA=Mo();B.exports.CORE_SCHEMA=Bo();B.exports.DEFAULT_SAFE_SCHEMA=Xt();B.exports.DEFAULT_FULL_SCHEMA=Kr();B.exports.load=gi.load;B.exports.loadAll=gi.loadAll;B.exports.safeLoad=gi.safeLoad;B.exports.safeLoadAll=gi.safeLoadAll;B.exports.dump=Kf.dump;B.exports.safeDump=Kf.safeDump;B.exports.YAMLException=Kt();B.exports.MINIMAL_SCHEMA=ci();B.exports.SAFE_SCHEMA=Xt();B.exports.DEFAULT_SCHEMA=Kr();B.exports.scan=_i("scan");B.exports.parse=_i("parse");B.exports.compose=_i("compose");B.exports.addConstructor=_i("addConstructor")});var Zf=w((oO,Xf)=>{"use strict";var i1=Qf();Xf.exports=i1});var $o=w((exports,module)=>{"use strict";var yaml=Zf(),engines=exports=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)};engines.json={parse:JSON.parse.bind(JSON),stringify:function(t,e){let r=Object.assign({replacer:null,space:2},e);return JSON.stringify(t,r.replacer,r.space)}};engines.javascript={parse:function parse(str,options,wrap){try{return wrap!==!1&&(str=`(function() {
|
|
64
|
+
return `+str.trim()+`;
|
|
65
|
+
}());`),eval(str)||{}}catch(t){if(wrap!==!1&&/(unexpected|identifier)/i.test(t.message))return parse(str,options,!1);throw new SyntaxError(t)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}});var tp=w((aO,ep)=>{"use strict";ep.exports=function(t){return typeof t=="string"&&t.charAt(0)==="\uFEFF"?t.slice(1):t}});var yi=w(tt=>{"use strict";var rp=tp(),np=Yr();tt.define=function(t,e,r){Reflect.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})};tt.isBuffer=function(t){return np(t)==="buffer"};tt.isObject=function(t){return np(t)==="object"};tt.toBuffer=function(t){return typeof t=="string"?Buffer.from(t):t};tt.toString=function(t){if(tt.isBuffer(t))return rp(String(t));if(typeof t!="string")throw new TypeError("expected input to be a string or buffer");return rp(t)};tt.arrayify=function(t){return t?Array.isArray(t)?t:[t]:[]};tt.startsWith=function(t,e,r){return typeof r!="number"&&(r=e.length),t.slice(0,r)===e}});var tn=w((cO,ip)=>{"use strict";var s1=$o(),o1=yi();ip.exports=function(t){let e=Object.assign({},t);return e.delimiters=o1.arrayify(e.delims||e.delimiters||"---"),e.delimiters.length===1&&e.delimiters.push(e.delimiters[0]),e.language=(e.language||e.lang||"yaml").toLowerCase(),e.engines=Object.assign({},s1,e.parsers,e.engines),e}});var Yo=w((uO,sp)=>{"use strict";sp.exports=function(t,e){let r=e.engines[t]||e.engines[a1(t)];if(typeof r>"u")throw new Error('gray-matter engine "'+t+'" is not registered');return typeof r=="function"&&(r={parse:r}),r};function a1(t){switch(t.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return t}}});var Jo=w((hO,op)=>{"use strict";var l1=Yr(),c1=Yo(),u1=tn();op.exports=function(t,e,r){if(e==null&&r==null)switch(l1(t)){case"object":e=t.data,r={};break;case"string":return t;default:throw new TypeError("expected file to be a string or object")}let n=t.content,i=u1(r);if(e==null){if(!i.data)return t;e=i.data}let s=t.language||i.language,o=c1(s,i);if(typeof o.stringify!="function")throw new TypeError('expected "'+s+'.stringify" to be a function');e=Object.assign({},t.data,e);let a=i.delimiters[0],l=i.delimiters[1],c=o.stringify(e,r).trim(),h="";return c!=="{}"&&(h=nr(a)+nr(c)+nr(l)),typeof t.excerpt=="string"&&t.excerpt!==""&&n.indexOf(t.excerpt.trim())===-1&&(h+=nr(t.excerpt)+nr(l)),h+nr(n)};function nr(t){return t.slice(-1)!==`
|
|
66
|
+
`?t+`
|
|
67
|
+
`:t}});var lp=w((fO,ap)=>{"use strict";var h1=tn();ap.exports=function(t,e){let r=h1(e);if(t.data==null&&(t.data={}),typeof r.excerpt=="function")return r.excerpt(t,r);let n=t.data.excerpt_separator||r.excerpt_separator;if(n==null&&(r.excerpt===!1||r.excerpt==null))return t;let i=typeof r.excerpt=="string"?r.excerpt:n||r.delimiters[0],s=t.content.indexOf(i);return s!==-1&&(t.excerpt=t.content.slice(0,s)),t}});var hp=w((pO,up)=>{"use strict";var cp=Yr(),f1=Jo(),ir=yi();up.exports=function(t){return cp(t)!=="object"&&(t={content:t}),cp(t.data)!=="object"&&(t.data={}),t.contents&&t.content==null&&(t.content=t.contents),ir.define(t,"orig",ir.toBuffer(t.content)),ir.define(t,"language",t.language||""),ir.define(t,"matter",t.matter||""),ir.define(t,"stringify",function(e,r){return r&&r.language&&(t.language=r.language),f1(t,e,r)}),t.content=ir.toString(t.content),t.isEmpty=!1,t.excerpt="",t}});var pp=w((dO,fp)=>{"use strict";var p1=Yo(),d1=tn();fp.exports=function(t,e,r){let n=d1(r),i=p1(t,n);if(typeof i.parse!="function")throw new TypeError('expected "'+t+'.parse" to be a function');return i.parse(e,n)}});var _p=w((mO,gp)=>{"use strict";var m1=re("fs"),g1=ah(),Ko=tn(),_1=Jo(),dp=lp(),y1=$o(),w1=hp(),b1=pp(),mp=yi();function fe(t,e){if(t==="")return{data:{},content:t,excerpt:"",orig:t};let r=w1(t),n=fe.cache[r.content];if(!e){if(n)return r=Object.assign({},n),r.orig=n.orig,r;fe.cache[r.content]=r}return v1(r,e)}function v1(t,e){let r=Ko(e),n=r.delimiters[0],i=`
|
|
68
|
+
`+r.delimiters[1],s=t.content;r.language&&(t.language=r.language);let o=n.length;if(!mp.startsWith(s,n,o))return dp(t,r),t;if(s.charAt(o)===n.slice(-1))return t;s=s.slice(o);let a=s.length,l=fe.language(s,r);l.name&&(t.language=l.name,s=s.slice(l.raw.length));let c=s.indexOf(i);return c===-1&&(c=a),t.matter=s.slice(0,c),t.matter.replace(/^\s*#[^\n]+/gm,"").trim()===""?(t.isEmpty=!0,t.empty=t.content,t.data={}):t.data=b1(t.language,t.matter,r),c===a?t.content="":(t.content=s.slice(c+i.length),t.content[0]==="\r"&&(t.content=t.content.slice(1)),t.content[0]===`
|
|
69
|
+
`&&(t.content=t.content.slice(1))),dp(t,r),(r.sections===!0||typeof r.section=="function")&&g1(t,r.section),t}fe.engines=y1;fe.stringify=function(t,e,r){return typeof t=="string"&&(t=fe(t,r)),_1(t,e,r)};fe.read=function(t,e){let r=m1.readFileSync(t,"utf8"),n=fe(r,e);return n.path=t,n};fe.test=function(t,e){return mp.startsWith(t,Ko(e).delimiters[0])};fe.language=function(t,e){let n=Ko(e).delimiters[0];fe.test(t)&&(t=t.slice(n.length));let i=t.slice(0,t.search(/\r?\n/));return{raw:i,name:i?i.trim():""}};fe.cache={};fe.clearCache=function(){fe.cache={}};gp.exports=fe});var pe=w(Se=>{"use strict";Se.__esModule=!0;Se.extend=Pp;Se.indexOf=M1;Se.escapeExpression=B1;Se.isEmpty=q1;Se.createFrame=H1;Se.blockParams=j1;Se.appendContextPath=W1;var D1={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},T1=/[&<>"'`=]/g,N1=/[&<>"'`=]/;function F1(t){return D1[t]}function Pp(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var ra=Object.prototype.toString;Se.toString=ra;var ta=function(e){return typeof e=="function"};ta(/x/)&&(Se.isFunction=ta=function(t){return typeof t=="function"&&ra.call(t)==="[object Function]"});Se.isFunction=ta;var Ip=Array.isArray||function(t){return t&&typeof t=="object"?ra.call(t)==="[object Array]":!1};Se.isArray=Ip;function M1(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function B1(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return N1.test(t)?t.replace(T1,F1):t}function q1(t){return!t&&t!==0?!0:!!(Ip(t)&&t.length===0)}function H1(t){var e=Pp({},t);return e._parent=t,e}function j1(t,e){return t.path=e,t}function W1(t,e){return(t?t+".":"")+e}});var Ee=w((Si,Lp)=>{"use strict";Si.__esModule=!0;var na=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ia(t,e){var r=e&&e.loc,n=void 0,i=void 0,s=void 0,o=void 0;r&&(n=r.start.line,i=r.end.line,s=r.start.column,o=r.end.column,t+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,t),l=0;l<na.length;l++)this[na[l]]=a[na[l]];Error.captureStackTrace&&Error.captureStackTrace(this,ia);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=s,this.endColumn=o))}catch{}}ia.prototype=new Error;Si.default=ia;Lp.exports=Si.default});var Dp=w((Ei,Rp)=>{"use strict";Ei.__esModule=!0;var sa=pe();Ei.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(sa.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var s=sa.createFrame(r.data);s.contextPath=sa.appendContextPath(r.data.contextPath,r.name),r={data:s}}return i(e,r)})};Rp.exports=Ei.default});var Np=w((Ci,Tp)=>{"use strict";Ci.__esModule=!0;function U1(t){return t&&t.__esModule?t:{default:t}}var rn=pe(),V1=Ee(),G1=U1(V1);Ci.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new G1.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,s=0,o="",a=void 0,l=void 0;r.data&&r.ids&&(l=rn.appendContextPath(r.data.contextPath,r.ids[0])+"."),rn.isFunction(e)&&(e=e.call(this)),r.data&&(a=rn.createFrame(r.data));function c(m,d,_){a&&(a.key=m,a.index=d,a.first=d===0,a.last=!!_,l&&(a.contextPath=l+m)),o=o+n(e[m],{data:a,blockParams:rn.blockParams([e[m],m],[l+m,null])})}if(e&&typeof e=="object")if(rn.isArray(e))for(var h=e.length;s<h;s++)s in e&&c(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var u=[],f=e[Symbol.iterator](),p=f.next();!p.done;p=f.next())u.push(p.value);e=u;for(var h=e.length;s<h;s++)c(s,s,s===e.length-1)}else(function(){var m=void 0;Object.keys(e).forEach(function(d){m!==void 0&&c(m,s-1),m=d,s++}),m!==void 0&&c(m,s-1,!0)})();return s===0&&(o=i(this)),o})};Tp.exports=Ci.default});var Mp=w((Ai,Fp)=>{"use strict";Ai.__esModule=!0;function z1(t){return t&&t.__esModule?t:{default:t}}var $1=Ee(),Y1=z1($1);Ai.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Y1.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Fp.exports=Ai.default});var jp=w((ki,Hp)=>{"use strict";ki.__esModule=!0;function J1(t){return t&&t.__esModule?t:{default:t}}var Bp=pe(),K1=Ee(),qp=J1(K1);ki.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new qp.default("#if requires exactly one argument");return Bp.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Bp.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new qp.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Hp.exports=ki.default});var Up=w((Oi,Wp)=>{"use strict";Oi.__esModule=!0;Oi.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};Wp.exports=Oi.default});var Gp=w((Pi,Vp)=>{"use strict";Pi.__esModule=!0;Pi.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Vp.exports=Pi.default});var $p=w((Ii,zp)=>{"use strict";Ii.__esModule=!0;function Q1(t){return t&&t.__esModule?t:{default:t}}var nn=pe(),X1=Ee(),Z1=Q1(X1);Ii.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new Z1.default("#with requires exactly one argument");nn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(nn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=nn.createFrame(r.data),i.contextPath=nn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:nn.blockParams([e],[i&&i.contextPath])})})};zp.exports=Ii.default});var oa=w(Li=>{"use strict";Li.__esModule=!0;Li.registerDefaultHelpers=d2;Li.moveHelperToHooks=m2;function Dt(t){return t&&t.__esModule?t:{default:t}}var e2=Dp(),t2=Dt(e2),r2=Np(),n2=Dt(r2),i2=Mp(),s2=Dt(i2),o2=jp(),a2=Dt(o2),l2=Up(),c2=Dt(l2),u2=Gp(),h2=Dt(u2),f2=$p(),p2=Dt(f2);function d2(t){t2.default(t),n2.default(t),s2.default(t),a2.default(t),c2.default(t),h2.default(t),p2.default(t)}function m2(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Jp=w((Ri,Yp)=>{"use strict";Ri.__esModule=!0;var g2=pe();Ri.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var s=e;return r.partials||(r.partials={},s=function(o,a){var l=n.partials;n.partials=g2.extend({},l,r.partials);var c=e(o,a);return n.partials=l,c}),r.partials[i.args[0]]=i.fn,s})};Yp.exports=Ri.default});var Kp=w(aa=>{"use strict";aa.__esModule=!0;aa.registerDefaultDecorators=b2;function _2(t){return t&&t.__esModule?t:{default:t}}var y2=Jp(),w2=_2(y2);function b2(t){w2.default(t)}});var la=w((Di,Qp)=>{"use strict";Di.__esModule=!0;var v2=pe(),sr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=v2.indexOf(sr.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=sr.lookupLevel(e),typeof console<"u"&&sr.lookupLevel(sr.level)<=e){var r=sr.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];console[r].apply(console,i)}}};Di.default=sr;Qp.exports=Di.default});var ca=w(sn=>{"use strict";sn.__esModule=!0;sn.createProtoAccessControl=C2;sn.resultIsAllowed=A2;sn.resetLoggedProperties=O2;function x2(t){return t&&t.__esModule?t:{default:t}}var Xp=pe(),S2=la(),E2=x2(S2),Ti=Object.create(null);function C2(t){var e=Object.create(null);e.__proto__=!1,Xp.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Xp.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function A2(t,e,r){return Zp(typeof t=="function"?e.methods:e.properties,r)}function Zp(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(k2(e),!1)}function k2(t){Ti[t]!==!0&&(Ti[t]=!0,E2.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
70
|
+
You can add a runtime option to disable the check or this warning:
|
|
71
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function O2(){Object.keys(Ti).forEach(function(t){delete Ti[t]})}});var Fi=w(Ve=>{"use strict";Ve.__esModule=!0;Ve.HandlebarsEnvironment=fa;function ed(t){return t&&t.__esModule?t:{default:t}}var Tt=pe(),P2=Ee(),ua=ed(P2),I2=oa(),L2=Kp(),R2=la(),Ni=ed(R2),D2=ca(),T2="4.7.9";Ve.VERSION=T2;var N2=8;Ve.COMPILER_REVISION=N2;var F2=7;Ve.LAST_COMPATIBLE_COMPILER_REVISION=F2;var M2={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Ve.REVISION_CHANGES=M2;var ha="[object Object]";function fa(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},I2.registerDefaultHelpers(this),L2.registerDefaultDecorators(this)}fa.prototype={constructor:fa,logger:Ni.default,log:Ni.default.log,registerHelper:function(e,r){if(Tt.toString.call(e)===ha){if(r)throw new ua.default("Arg not supported with multiple helpers");Tt.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Tt.toString.call(e)===ha)Tt.extend(this.partials,e);else{if(typeof r>"u")throw new ua.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Tt.toString.call(e)===ha){if(r)throw new ua.default("Arg not supported with multiple decorators");Tt.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){D2.resetLoggedProperties()}};var B2=Ni.default.log;Ve.log=B2;Ve.createFrame=Tt.createFrame;Ve.logger=Ni.default});var rd=w((Mi,td)=>{"use strict";Mi.__esModule=!0;function pa(t){this.string=t}pa.prototype.toString=pa.prototype.toHTML=function(){return""+this.string};Mi.default=pa;td.exports=Mi.default});var nd=w(da=>{"use strict";da.__esModule=!0;da.wrapHelper=q2;function q2(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var cd=w(pt=>{"use strict";pt.__esModule=!0;pt.checkRevision=G2;pt.template=z2;pt.wrapProgram=Bi;pt.resolvePartial=$2;pt.invokePartial=Y2;pt.noop=ad;function H2(t){return t&&t.__esModule?t:{default:t}}function j2(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var W2=pe(),or=j2(W2),U2=Ee(),rt=H2(U2),nt=Fi(),id=oa(),V2=nd(),sd=ca();function G2(t){var e=t&&t[0]||1,r=nt.COMPILER_REVISION;if(!(e>=nt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=nt.COMPILER_REVISION))if(e<nt.LAST_COMPATIBLE_COMPILER_REVISION){var n=nt.REVISION_CHANGES[r],i=nt.REVISION_CHANGES[e];throw new rt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new rt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function z2(t,e){if(!e)throw new rt.default("No environment passed to template");if(!t||!t.main)throw new rt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(o,a,l){l.hash&&(a=or.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,o,a,l);if(c==null&&e.compile&&(l.partials[l.name]=e.compile(o,t.compilerOptions,e),c=l.partials[l.name](a,l)),c!=null){if(l.indent){for(var h=c.split(`
|
|
72
|
+
`),u=0,f=h.length;u<f&&!(!h[u]&&u+1===f);u++)h[u]=l.indent+h[u];c=h.join(`
|
|
73
|
+
`)}return c}else throw new rt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,c){if(!a||!(l in a))throw new rt.default('"'+l+'" not defined in '+a,{loc:c});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)||sd.resultIsAllowed(c,i.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,h=0;h<c;h++){var u=a[h]&&i.lookupProperty(a[h],l);if(u!=null)return u}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:or.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,c,h,u){var f=this.programs[a],p=this.fn(a);return l||u||h||c?f=Bi(this,a,p,l,c,h,u):f||(f=this.programs[a]=Bi(this,a,p)),f},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var c=a||l;return a&&l&&a!==l&&(c=or.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;s._setup(a),!a.partial&&t.useData&&(l=J2(o,l));var c=void 0,h=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=o!=a.depths[0]?[o].concat(a.depths):a.depths:c=[o]);function u(f){return""+t.main(i,f,i.helpers,i.partials,l,h,c)}return u=ld(t.main,u,i,a.depths||[],l,h),u(o,a)}return s.isTop=!0,s._setup=function(o){if(o.partial)i.protoAccessControl=o.protoAccessControl,i.helpers=o.helpers,i.partials=o.partials,i.decorators=o.decorators,i.hooks=o.hooks;else{var a={};od(a,e.helpers,i),od(a,o.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=or.extend({},e.decorators,o.decorators)),i.hooks={},i.protoAccessControl=sd.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;id.moveHelperToHooks(i,"helperMissing",l),id.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(o,a,l,c){if(t.useBlockParams&&!l)throw new rt.default("must pass block params");if(t.useDepths&&!c)throw new rt.default("must pass parent depths");return Bi(i,o,t[o],a,0,l,c)},s}function Bi(t,e,r,n,i,s,o){function a(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=o;return o&&l!=o[0]&&!(l===t.nullContext&&o[0]===null)&&(h=[l].concat(o)),r(t,l,t.helpers,t.partials,c.data||n,s&&[c.blockParams].concat(s),h)}return a=ld(r,a,t,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=i||0,a}function $2(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=qi(r.partials,t)):r.name==="@partial-block"?t=qi(r.data,"partial-block"):t=qi(r.partials,r.name),t}function Y2(t,e,r){var n=qi(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==ad&&(function(){r.data=nt.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=nt.createFrame(l.data),l.data["partial-block"]=n,s(a,l)},s.partials&&(r.partials=or.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new rt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function ad(){return""}function qi(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function J2(t,e){return(!e||!("root"in e))&&(e=e?nt.createFrame(e):{},e.root=t),e}function ld(t,e,r,n,i,s){if(t.decorator){var o={};e=t.decorator(e,o,r,n&&n[0],i,s,n),or.extend(e,o)}return e}function od(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=K2(i,r)})}function K2(t,e){var r=e.lookupProperty;return V2.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var ma=w((Hi,ud)=>{"use strict";Hi.__esModule=!0;Hi.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};ud.exports=Hi.default});var md=w((ji,dd)=>{"use strict";ji.__esModule=!0;function _a(t){return t&&t.__esModule?t:{default:t}}function ya(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Q2=Fi(),hd=ya(Q2),X2=rd(),Z2=_a(X2),eS=Ee(),tS=_a(eS),rS=pe(),ga=ya(rS),nS=cd(),fd=ya(nS),iS=ma(),sS=_a(iS);function pd(){var t=new hd.HandlebarsEnvironment;return ga.extend(t,hd),t.SafeString=Z2.default,t.Exception=tS.default,t.Utils=ga,t.escapeExpression=ga.escapeExpression,t.VM=fd,t.template=function(e){return fd.template(e,t)},t}var on=pd();on.create=pd;sS.default(on);on.default=on;ji.default=on;dd.exports=ji.default});var wa=w((Wi,_d)=>{"use strict";Wi.__esModule=!0;var gd={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!gd.helpers.scopedId(e)&&!e.depth}}};Wi.default=gd;_d.exports=Wi.default});var wd=w((Ui,yd)=>{"use strict";Ui.__esModule=!0;var oS=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,s,o,a,l,c,h){var u=c.length-1;switch(l){case 1:return c[u-1];case 2:this.$=a.prepareProgram(c[u]);break;case 3:this.$=c[u];break;case 4:this.$=c[u];break;case 5:this.$=c[u];break;case 6:this.$=c[u];break;case 7:this.$=c[u];break;case 8:this.$=c[u];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[u]),strip:a.stripFlags(c[u],c[u]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[u],value:c[u],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[u-2],c[u-1],c[u],this._$);break;case 12:this.$={path:c[u-3],params:c[u-2],hash:c[u-1]};break;case 13:this.$=a.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],!1,this._$);break;case 14:this.$=a.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],!0,this._$);break;case 15:this.$={open:c[u-5],path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:a.stripFlags(c[u-5],c[u])};break;case 16:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:a.stripFlags(c[u-5],c[u])};break;case 17:this.$={path:c[u-4],params:c[u-3],hash:c[u-2],blockParams:c[u-1],strip:a.stripFlags(c[u-5],c[u])};break;case 18:this.$={strip:a.stripFlags(c[u-1],c[u-1]),program:c[u]};break;case 19:var f=a.prepareBlock(c[u-2],c[u-1],c[u],c[u],!1,this._$),p=a.prepareProgram([f],c[u-1].loc);p.chained=!0,this.$={strip:c[u-2].strip,program:p,chain:!0};break;case 20:this.$=c[u];break;case 21:this.$={path:c[u-1],strip:a.stripFlags(c[u-2],c[u])};break;case 22:this.$=a.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],a.stripFlags(c[u-4],c[u]),this._$);break;case 23:this.$=a.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],a.stripFlags(c[u-4],c[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[u-3],params:c[u-2],hash:c[u-1],indent:"",strip:a.stripFlags(c[u-4],c[u]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[u-2],c[u-1],c[u],this._$);break;case 26:this.$={path:c[u-3],params:c[u-2],hash:c[u-1],strip:a.stripFlags(c[u-4],c[u])};break;case 27:this.$=c[u];break;case 28:this.$=c[u];break;case 29:this.$={type:"SubExpression",path:c[u-3],params:c[u-2],hash:c[u-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[u],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[u-2]),value:c[u],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[u-1]);break;case 33:this.$=c[u];break;case 34:this.$=c[u];break;case 35:this.$={type:"StringLiteral",value:c[u],original:c[u],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[u]),original:Number(c[u]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[u]==="true",original:c[u]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=c[u];break;case 41:this.$=c[u];break;case 42:this.$=a.preparePath(!0,c[u],this._$);break;case 43:this.$=a.preparePath(!1,c[u],this._$);break;case 44:c[u-2].push({part:a.id(c[u]),original:c[u],separator:c[u-1]}),this.$=c[u-2];break;case 45:this.$=[{part:a.id(c[u]),original:c[u]}];break;case 46:this.$=[];break;case 47:c[u-1].push(c[u]);break;case 48:this.$=[];break;case 49:c[u-1].push(c[u]);break;case 50:this.$=[];break;case 51:c[u-1].push(c[u]);break;case 58:this.$=[];break;case 59:c[u-1].push(c[u]);break;case 64:this.$=[];break;case 65:c[u-1].push(c[u]);break;case 70:this.$=[];break;case 71:c[u-1].push(c[u]);break;case 78:this.$=[];break;case 79:c[u-1].push(c[u]);break;case 82:this.$=[];break;case 83:c[u-1].push(c[u]);break;case 86:this.$=[];break;case 87:c[u-1].push(c[u]);break;case 90:this.$=[];break;case 91:c[u-1].push(c[u]);break;case 94:this.$=[];break;case 95:c[u-1].push(c[u]);break;case 98:this.$=[c[u]];break;case 99:c[u-1].push(c[u]);break;case 100:this.$=[c[u]];break;case 101:c[u-1].push(c[u]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,s){throw new Error(i)},parse:function(i){var s=this,o=[0],a=[null],l=[],c=this.table,h="",u=0,f=0,p=0,m=2,d=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var _=this.lexer.yylloc;l.push(_);var g=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function y(ke){o.length=o.length-2*ke,a.length=a.length-ke,l.length=l.length-ke}function b(){var ke;return ke=s.lexer.lex()||1,typeof ke!="number"&&(ke=s.symbols_[ke]||ke),ke}for(var v,S,k,R,me,ge,Q={},P,le,O,T;;){if(k=o[o.length-1],this.defaultActions[k]?R=this.defaultActions[k]:((v===null||typeof v>"u")&&(v=b()),R=c[k]&&c[k][v]),typeof R>"u"||!R.length||!R[0]){var Ae="";if(!p){T=[];for(P in c[k])this.terminals_[P]&&P>2&&T.push("'"+this.terminals_[P]+"'");this.lexer.showPosition?Ae="Parse error on line "+(u+1)+`:
|
|
74
|
+
`+this.lexer.showPosition()+`
|
|
75
|
+
Expecting `+T.join(", ")+", got '"+(this.terminals_[v]||v)+"'":Ae="Parse error on line "+(u+1)+": Unexpected "+(v==1?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(Ae,{text:this.lexer.match,token:this.terminals_[v]||v,line:this.lexer.yylineno,loc:_,expected:T})}}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+v);switch(R[0]){case 1:o.push(v),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),o.push(R[1]),v=null,S?(v=S,S=null):(f=this.lexer.yyleng,h=this.lexer.yytext,u=this.lexer.yylineno,_=this.lexer.yylloc,p>0&&p--);break;case 2:if(le=this.productions_[R[1]][1],Q.$=a[a.length-le],Q._$={first_line:l[l.length-(le||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(le||1)].first_column,last_column:l[l.length-1].last_column},g&&(Q._$.range=[l[l.length-(le||1)].range[0],l[l.length-1].range[1]]),ge=this.performAction.call(Q,h,f,u,this.yy,R[1],a,l),typeof ge<"u")return ge;le&&(o=o.slice(0,-1*le*2),a=a.slice(0,-1*le),l=l.slice(0,-1*le)),o.push(this.productions_[R[1]][0]),a.push(Q.$),l.push(Q._$),O=c[o[o.length-2]][o[o.length-1]],o.push(O);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(s,o){if(this.yy.parser)this.yy.parser.parseError(s,o);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o-1),this.offset-=o;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-o]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
76
|
+
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,a,l,c,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),f=0;f<u.length&&(a=this._input.match(this.rules[u[f]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,l=f,!this.options.flex)));f++);return o?(h=o[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],s=this.performAction.call(this,this.yy,this,u[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
77
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s<"u"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return n.options={},n.performAction=function(s,o,a,l){function c(u,f){return o.yytext=o.yytext.substring(u,o.yyleng-f+u)}var h=l;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),o.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(c(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(o.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return o.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.yytext=c(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();Ui.default=oS;yd.exports=Ui.default});var $i=w((zi,xd)=>{"use strict";zi.__esModule=!0;function aS(t){return t&&t.__esModule?t:{default:t}}var lS=Ee(),ba=aS(lS);function Vi(){this.parents=[]}Vi.prototype={constructor:Vi,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Vi.prototype[n.type])throw new ba.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new ba.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new ba.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Gi,Decorator:Gi,BlockStatement:bd,DecoratorBlock:bd,PartialStatement:vd,PartialBlockStatement:function(e){vd.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Gi,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function Gi(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function bd(t){Gi.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function vd(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}zi.default=Vi;xd.exports=zi.default});var Ed=w((Yi,Sd)=>{"use strict";Yi.__esModule=!0;function cS(t){return t&&t.__esModule?t:{default:t}}var uS=$i(),hS=cS(uS);function Ge(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Ge.prototype=new hS.default;Ge.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,s=n.length;i<s;i++){var o=n[i],a=this.accept(o);if(a){var l=va(n,i,r),c=xa(n,i,r),h=a.openStandalone&&l,u=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Nt(n,i,!0),a.open&&dt(n,i,!0),e&&f&&(Nt(n,i),dt(n,i)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&h&&(Nt((o.program||o.inverse).body),dt(n,i)),e&&u&&(Nt(n,i),dt((o.inverse||o.program).body))}}return t};Ge.prototype.BlockStatement=Ge.prototype.DecoratorBlock=Ge.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var s={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:xa(e.body),closeStandalone:va((n||e).body)};if(t.openStrip.close&&Nt(e.body,null,!0),r){var o=t.inverseStrip;o.open&&dt(e.body,null,!0),o.close&&Nt(n.body,null,!0),t.closeStrip.open&&dt(i.body,null,!0),!this.options.ignoreStandalone&&va(e.body)&&xa(n.body)&&(dt(e.body),Nt(n.body))}else t.closeStrip.open&&dt(e.body,null,!0);return s};Ge.prototype.Decorator=Ge.prototype.MustacheStatement=function(t){return t.strip};Ge.prototype.PartialStatement=Ge.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function va(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function xa(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Nt(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function dt(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}Yi.default=Ge;Sd.exports=Yi.default});var Cd=w(Te=>{"use strict";Te.__esModule=!0;Te.SourceLocation=dS;Te.id=mS;Te.stripFlags=gS;Te.stripComment=_S;Te.preparePath=yS;Te.prepareMustache=wS;Te.prepareRawBlock=bS;Te.prepareBlock=vS;Te.prepareProgram=xS;Te.preparePartialBlock=SS;function fS(t){return t&&t.__esModule?t:{default:t}}var pS=Ee(),Sa=fS(pS);function Ea(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Sa.default(t.path.original+" doesn't match "+e,r)}}function dS(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function mS(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function gS(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function _S(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function yS(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],s=0,o=0,a=e.length;o<a;o++){var l=e[o].part,c=e[o].original!==l;if(n+=(e[o].separator||"")+l,!c&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new Sa.default("Invalid path: "+n,{loc:r});l===".."&&s++}else i.push(l)}return{type:"PathExpression",data:t,depth:s,parts:i,original:n,loc:r}}function wS(t,e,r,n,i,s){var o=n.charAt(3)||n.charAt(2),a=o!=="{"&&o!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(s)}}function bS(t,e,r,n){Ea(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function vS(t,e,r,n,i,s){n&&n.path&&Ea(t,n);var o=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(o)throw new Sa.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:o?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(s)}}function xS(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function SS(t,e,r,n){return Ea(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var kd=w(ln=>{"use strict";ln.__esModule=!0;ln.parseWithoutProcessing=Ad;ln.parse=RS;function ES(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function ka(t){return t&&t.__esModule?t:{default:t}}var CS=wd(),Ca=ka(CS),AS=Ed(),kS=ka(AS),OS=Cd(),PS=ES(OS),IS=Ee(),an=ka(IS),LS=pe();ln.parser=Ca.default;var Ji={};LS.extend(Ji,PS);function Ad(t,e){if(t.type==="Program")return DS(t),t;Ca.default.yy=Ji,Ji.locInfo=function(n){return new Ji.SourceLocation(e&&e.srcName,n)};var r=Ca.default.parse(t);return r}function RS(t,e){var r=Ad(t,e),n=new kS.default(e);return n.accept(r)}function DS(t){Aa(t)}function Aa(t){if(t!=null){if(Array.isArray(t)){t.forEach(Aa);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!TS(t.depth))throw new an.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new an.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<t.parts.length;e++)if(typeof t.parts[e]!="string")throw new an.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new an.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new an.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Aa(t[r])})}}}function TS(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Ld=w(fn=>{"use strict";fn.__esModule=!0;fn.Compiler=Oa;fn.precompile=BS;fn.compile=qS;function Pd(t){return t&&t.__esModule?t:{default:t}}var NS=Ee(),un=Pd(NS),hn=pe(),FS=wa(),cn=Pd(FS),MS=[].slice;function Oa(){}Oa.prototype={compiler:Oa,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],s=e.opcodes[n];if(i.opcode!==s.opcode||!Id(i.args,s.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=hn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new un.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Od(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new un.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,s=e.name.type==="SubExpression";s&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",s,i,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Od(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,s=i.parts[0],o=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",s,o)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),s=e.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new un.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",i.length,s.original,cn.default.helpers.simpleId(s))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=cn.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:MS.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=cn.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&cn.default.helpers.helperExpression(e),s=!n&&(i||r);if(s&&!i){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?i=!0:a.knownHelpersOnly&&(s=!1)}return i?"helper":s?"ambiguous":"simple"},pushParams:function(e){for(var r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!cn.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var s=e.params;return this.pushParams(s),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),s},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],s=i&&hn.indexOf(i,e);if(i&&s>=0)return[r,s]}}};function BS(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new un.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function qS(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new un.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=hn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var o=r.parse(t,e),a=new r.Compiler().compile(o,e),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}function s(o,a){return n||(n=i()),n.call(this,o,a)}return s._setup=function(o){return n||(n=i()),n._setup(o)},s._child=function(o,a,l,c){return n||(n=i()),n._child(o,a,l,c)},s}function Id(t,e){if(t===e)return!0;if(hn.isArray(t)&&hn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Id(t[r],e[r]))return!1;return!0}}function Od(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var Dd=w(Pa=>{var Rd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Pa.encode=function(t){if(0<=t&&t<Rd.length)return Rd[t];throw new TypeError("Must be between 0 and 63: "+t)};Pa.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,l=47,c=26,h=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+c:s<=t&&t<=o?t-s+h:t==a?62:t==l?63:-1}});var Ra=w(La=>{var Td=Dd(),Ia=5,Nd=1<<Ia,Fd=Nd-1,Md=Nd;function HS(t){return t<0?(-t<<1)+1:(t<<1)+0}function jS(t){var e=(t&1)===1,r=t>>1;return e?-r:r}La.encode=function(e){var r="",n,i=HS(e);do n=i&Fd,i>>>=Ia,i>0&&(n|=Md),r+=Td.encode(n);while(i>0);return r};La.decode=function(e,r,n){var i=e.length,s=0,o=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Td.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&Md),l&=Fd,s=s+(l<<o),o+=Ia}while(a);n.value=jS(s),n.rest=r}});var cr=w(ae=>{function WS(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}ae.getArg=WS;var Bd=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,US=/^data:.+\,.+$/;function pn(t){var e=t.match(Bd);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}ae.urlParse=pn;function ar(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}ae.urlGenerate=ar;function Da(t){var e=t,r=pn(t);if(r){if(!r.path)return t;e=r.path}for(var n=ae.isAbsolute(e),i=e.split(/\/+/),s,o=0,a=i.length-1;a>=0;a--)s=i[a],s==="."?i.splice(a,1):s===".."?o++:o>0&&(s===""?(i.splice(a+1,o),o=0):(i.splice(a,2),o--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,ar(r)):e}ae.normalize=Da;function qd(t,e){t===""&&(t="."),e===""&&(e=".");var r=pn(e),n=pn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),ar(r);if(r||e.match(US))return e;if(n&&!n.host&&!n.path)return n.host=e,ar(n);var i=e.charAt(0)==="/"?e:Da(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,ar(n)):i}ae.join=qd;ae.isAbsolute=function(t){return t.charAt(0)==="/"||Bd.test(t)};function VS(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}ae.relative=VS;var Hd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function jd(t){return t}function GS(t){return Wd(t)?"$"+t:t}ae.toSetString=Hd?jd:GS;function zS(t){return Wd(t)?t.slice(1):t}ae.fromSetString=Hd?jd:zS;function Wd(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function $S(t,e,r){var n=lr(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:lr(t.name,e.name)}ae.compareByOriginalPositions=$S;function YS(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=lr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:lr(t.name,e.name)}ae.compareByGeneratedPositionsDeflated=YS;function lr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function JS(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=lr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:lr(t.name,e.name)}ae.compareByGeneratedPositionsInflated=JS;function KS(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}ae.parseSourceMapInput=KS;function QS(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=pn(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=qd(ar(n),e)}return Da(e)}ae.computeSourceURL=QS});var Fa=w(Ud=>{var Ta=cr(),Na=Object.prototype.hasOwnProperty,Ft=typeof Map<"u";function it(){this._array=[],this._set=Ft?new Map:Object.create(null)}it.fromArray=function(e,r){for(var n=new it,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};it.prototype.size=function(){return Ft?this._set.size:Object.getOwnPropertyNames(this._set).length};it.prototype.add=function(e,r){var n=Ft?e:Ta.toSetString(e),i=Ft?this.has(e):Na.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Ft?this._set.set(e,s):this._set[n]=s)};it.prototype.has=function(e){if(Ft)return this._set.has(e);var r=Ta.toSetString(e);return Na.call(this._set,r)};it.prototype.indexOf=function(e){if(Ft){var r=this._set.get(e);if(r>=0)return r}else{var n=Ta.toSetString(e);if(Na.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};it.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};it.prototype.toArray=function(){return this._array.slice()};Ud.ArraySet=it});var zd=w(Gd=>{var Vd=cr();function XS(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||Vd.compareByGeneratedPositionsInflated(t,e)<=0}function Ki(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ki.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Ki.prototype.add=function(e){XS(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ki.prototype.toArray=function(){return this._sorted||(this._array.sort(Vd.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Gd.MappingList=Ki});var Ma=w($d=>{var dn=Ra(),V=cr(),Qi=Fa().ArraySet,ZS=zd().MappingList;function Ne(t){t||(t={}),this._file=V.getArg(t,"file",null),this._sourceRoot=V.getArg(t,"sourceRoot",null),this._skipValidation=V.getArg(t,"skipValidation",!1),this._sources=new Qi,this._names=new Qi,this._mappings=new ZS,this._sourcesContents=null}Ne.prototype._version=3;Ne.fromSourceMap=function(e){var r=e.sourceRoot,n=new Ne({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var s={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(s.source=i.source,r!=null&&(s.source=V.relative(r,s.source)),s.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(s.name=i.name)),n.addMapping(s)}),e.sources.forEach(function(i){var s=i;r!==null&&(s=V.relative(r,i)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(i);o!=null&&n.setSourceContent(i,o)}),n};Ne.prototype.addMapping=function(e){var r=V.getArg(e,"generated"),n=V.getArg(e,"original",null),i=V.getArg(e,"source",null),s=V.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,s),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s})};Ne.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=V.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[V.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[V.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ne.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=V.relative(s,i));var o=new Qi,a=new Qi;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,n!=null&&(l.source=V.join(n,l.source)),s!=null&&(l.source=V.relative(s,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var h=l.source;h!=null&&!o.has(h)&&o.add(h);var u=l.name;u!=null&&!a.has(u)&&a.add(u)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var c=e.sourceContentFor(l);c!=null&&(n!=null&&(l=V.join(n,l)),s!=null&&(l=V.relative(s,l)),this.setSourceContent(l,c))},this)};Ne.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};Ne.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",l,c,h,u,f=this._mappings.toArray(),p=0,m=f.length;p<m;p++){if(c=f[p],l="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)l+=";",r++;else if(p>0){if(!V.compareByGeneratedPositionsInflated(c,f[p-1]))continue;l+=","}l+=dn.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),l+=dn.encode(u-o),o=u,l+=dn.encode(c.originalLine-1-i),i=c.originalLine-1,l+=dn.encode(c.originalColumn-n),n=c.originalColumn,c.name!=null&&(h=this._names.indexOf(c.name),l+=dn.encode(h-s),s=h)),a+=l}return a};Ne.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=V.relative(r,n));var i=V.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Ne.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Ne.prototype.toString=function(){return JSON.stringify(this.toJSON())};$d.SourceMapGenerator=Ne});var Yd=w(Mt=>{Mt.GREATEST_LOWER_BOUND=1;Mt.LEAST_UPPER_BOUND=2;function Ba(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?Ba(o,e,r,n,i,s):s==Mt.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?Ba(t,o,r,n,i,s):s==Mt.LEAST_UPPER_BOUND?o:t<0?-1:t}Mt.search=function(e,r,n,i){if(r.length===0)return-1;var s=Ba(-1,r.length,e,r,n,i||Mt.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var Kd=w(Jd=>{function qa(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function eE(t,e){return Math.round(t+Math.random()*(e-t))}function Ha(t,e,r,n){if(r<n){var i=eE(r,n),s=r-1;qa(t,i,n);for(var o=t[n],a=r;a<n;a++)e(t[a],o)<=0&&(s+=1,qa(t,s,a));qa(t,s+1,a);var l=s+1;Ha(t,e,r,l-1),Ha(t,e,l+1,n)}}Jd.quickSort=function(t,e){Ha(t,e,0,t.length-1)}});var Xd=w(Xi=>{var x=cr(),ja=Yd(),ur=Fa().ArraySet,tE=Ra(),mn=Kd().quickSort;function N(t,e){var r=t;return typeof t=="string"&&(r=x.parseSourceMapInput(t)),r.sections!=null?new qe(r,e):new ee(r,e)}N.fromSourceMap=function(t,e){return ee.fromSourceMap(t,e)};N.prototype._version=3;N.prototype.__generatedMappings=null;Object.defineProperty(N.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});N.prototype.__originalMappings=null;Object.defineProperty(N.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});N.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};N.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};N.GENERATED_ORDER=1;N.ORIGINAL_ORDER=2;N.GREATEST_LOWER_BOUND=1;N.LEAST_UPPER_BOUND=2;N.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||N.GENERATED_ORDER,o;switch(s){case N.GENERATED_ORDER:o=this._generatedMappings;break;case N.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(l){var c=l.source===null?null:this._sources.at(l.source);return c=x.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};N.prototype.allGeneratedPositionsFor=function(e){var r=x.getArg(e,"line"),n={source:x.getArg(e,"source"),originalLine:r,originalColumn:x.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,ja.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:x.getArg(o,"generatedLine",null),column:x.getArg(o,"generatedColumn",null),lastColumn:x.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var l=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==l;)i.push({line:x.getArg(o,"generatedLine",null),column:x.getArg(o,"generatedColumn",null),lastColumn:x.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};Xi.SourceMapConsumer=N;function ee(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var n=x.getArg(r,"version"),i=x.getArg(r,"sources"),s=x.getArg(r,"names",[]),o=x.getArg(r,"sourceRoot",null),a=x.getArg(r,"sourcesContent",null),l=x.getArg(r,"mappings"),c=x.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=x.normalize(o)),i=i.map(String).map(x.normalize).map(function(h){return o&&x.isAbsolute(o)&&x.isAbsolute(h)?x.relative(o,h):h}),this._names=ur.fromArray(s.map(String),!0),this._sources=ur.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(h){return x.computeSourceURL(o,h,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=c}ee.prototype=Object.create(N.prototype);ee.prototype.consumer=N;ee.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=x.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};ee.fromSourceMap=function(e,r){var n=Object.create(ee.prototype),i=n._names=ur.fromArray(e._names.toArray(),!0),s=n._sources=ur.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(p){return x.computeSourceURL(n.sourceRoot,p,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],c=0,h=o.length;c<h;c++){var u=o[c],f=new Qd;f.generatedLine=u.generatedLine,f.generatedColumn=u.generatedColumn,u.source&&(f.source=s.indexOf(u.source),f.originalLine=u.originalLine,f.originalColumn=u.originalColumn,u.name&&(f.name=i.indexOf(u.name)),l.push(f)),a.push(f)}return mn(n.__originalMappings,x.compareByOriginalPositions),n};ee.prototype._version=3;Object.defineProperty(ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Qd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ee.prototype._parseMappings=function(e,r){for(var n=1,i=0,s=0,o=0,a=0,l=0,c=e.length,h=0,u={},f={},p=[],m=[],d,_,g,y,b;h<c;)if(e.charAt(h)===";")n++,h++,i=0;else if(e.charAt(h)===",")h++;else{for(d=new Qd,d.generatedLine=n,y=h;y<c&&!this._charIsMappingSeparator(e,y);y++);if(_=e.slice(h,y),g=u[_],g)h+=_.length;else{for(g=[];h<y;)tE.decode(e,h,f),b=f.value,h=f.rest,g.push(b);if(g.length===2)throw new Error("Found a source, but no line and column");if(g.length===3)throw new Error("Found a source and line, but no column");u[_]=g}d.generatedColumn=i+g[0],i=d.generatedColumn,g.length>1&&(d.source=a+g[1],a+=g[1],d.originalLine=s+g[2],s=d.originalLine,d.originalLine+=1,d.originalColumn=o+g[3],o=d.originalColumn,g.length>4&&(d.name=l+g[4],l+=g[4])),m.push(d),typeof d.originalLine=="number"&&p.push(d)}mn(m,x.compareByGeneratedPositionsDeflated),this.__generatedMappings=m,mn(p,x.compareByOriginalPositions),this.__originalMappings=p};ee.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return ja.search(e,r,s,o)};ee.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};ee.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",x.compareByGeneratedPositionsDeflated,x.getArg(e,"bias",N.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=x.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=x.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=x.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:x.getArg(i,"originalLine",null),column:x.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ee.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=x.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=x.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};ee.prototype.generatedPositionFor=function(e){var r=x.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:x.getArg(e,"line"),originalColumn:x.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",x.compareByOriginalPositions,x.getArg(e,"bias",N.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:x.getArg(s,"generatedLine",null),column:x.getArg(s,"generatedColumn",null),lastColumn:x.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Xi.BasicSourceMapConsumer=ee;function qe(t,e){var r=t;typeof t=="string"&&(r=x.parseSourceMapInput(t));var n=x.getArg(r,"version"),i=x.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ur,this._names=new ur;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=x.getArg(o,"offset"),l=x.getArg(a,"line"),c=x.getArg(a,"column");if(l<s.line||l===s.line&&c<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new N(x.getArg(o,"map"),e)}})}qe.prototype=Object.create(N.prototype);qe.prototype.constructor=N;qe.prototype._version=3;Object.defineProperty(qe.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});qe.prototype.originalPositionFor=function(e){var r={generatedLine:x.getArg(e,"line"),generatedColumn:x.getArg(e,"column")},n=ja.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};qe.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};qe.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s)return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};qe.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(x.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};qe.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],l=i.consumer._sources.at(a.source);l=x.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var h={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(h),typeof h.originalLine=="number"&&this.__originalMappings.push(h)}mn(this.__generatedMappings,x.compareByGeneratedPositionsDeflated),mn(this.__originalMappings,x.compareByOriginalPositions)};Xi.IndexedSourceMapConsumer=qe});var em=w(Zd=>{var rE=Ma().SourceMapGenerator,Zi=cr(),nE=/(\r?\n)/,iE=10,hr="$$$isSourceNode$$$";function Ce(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[hr]=!0,n!=null&&this.add(n)}Ce.fromStringWithSourceMap=function(e,r,n){var i=new Ce,s=e.split(nE),o=0,a=function(){var f=m(),p=m()||"";return f+p;function m(){return o<s.length?s[o++]:void 0}},l=1,c=0,h=null;return r.eachMapping(function(f){if(h!==null)if(l<f.generatedLine)u(h,a()),l++,c=0;else{var p=s[o]||"",m=p.substr(0,f.generatedColumn-c);s[o]=p.substr(f.generatedColumn-c),c=f.generatedColumn,u(h,m),h=f;return}for(;l<f.generatedLine;)i.add(a()),l++;if(c<f.generatedColumn){var p=s[o]||"";i.add(p.substr(0,f.generatedColumn)),s[o]=p.substr(f.generatedColumn),c=f.generatedColumn}h=f},this),o<s.length&&(h&&u(h,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(f){var p=r.sourceContentFor(f);p!=null&&(n!=null&&(f=Zi.join(n,f)),i.setSourceContent(f,p))}),i;function u(f,p){if(f===null||f.source===void 0)i.add(p);else{var m=n?Zi.join(n,f.source):f.source;i.add(new Ce(f.originalLine,f.originalColumn,m,p,f.name))}}};Ce.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[hr]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Ce.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[hr]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Ce.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[hr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Ce.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Ce.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[hr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Ce.prototype.setSourceContent=function(e,r){this.sourceContents[Zi.toSetString(e)]=r};Ce.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][hr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Zi.fromSetString(i[r]),this.sourceContents[i[r]])};Ce.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Ce.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new rE(e),i=!1,s=null,o=null,a=null,l=null;return this.walk(function(c,h){r.code+=c,h.source!==null&&h.line!==null&&h.column!==null?((s!==h.source||o!==h.line||a!==h.column||l!==h.name)&&n.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:r.line,column:r.column},name:h.name}),s=h.source,o=h.line,a=h.column,l=h.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var u=0,f=c.length;u<f;u++)c.charCodeAt(u)===iE?(r.line++,r.column=0,u+1===f?(s=null,i=!1):i&&n.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:r.line,column:r.column},name:h.name})):r.column++}),this.walkSourceContents(function(c,h){n.setSourceContent(c,h)}),{code:r.code,map:n}};Zd.SourceNode=Ce});var tm=w(es=>{es.SourceMapGenerator=Ma().SourceMapGenerator;es.SourceMapConsumer=Xd().SourceMapConsumer;es.SourceNode=em().SourceNode});var sm=w((ts,im)=>{"use strict";ts.__esModule=!0;var Ua=pe(),Bt=void 0;try{(typeof define!="function"||!define.amd)&&(rm=tm(),Bt=rm.SourceNode)}catch{}var rm;Bt||(Bt=function(t,e,r,n){this.src="",n&&this.add(n)},Bt.prototype={add:function(e){Ua.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Ua.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Wa(t,e,r){if(Ua.isArray(t)){for(var n=[],i=0,s=t.length;i<s;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function nm(t){this.srcFile=t,this.source=[]}nm.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
|
|
78
|
+
`])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new Bt(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Bt?e:(e=Wa(e,this,r),new Bt(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var o=Wa(e[s],r);o!=="undefined"&&n.push([r.quotedString(s),":",o])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Wa(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};ts.default=nm;im.exports=ts.default});var um=w((rs,cm)=>{"use strict";rs.__esModule=!0;function lm(t){return t&&t.__esModule?t:{default:t}}var om=Fi(),sE=Ee(),Va=lm(sE),oE=pe(),aE=sm(),am=lm(aE);function fr(t){this.value=t}function pr(){}pr.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=om.COMPILER_REVISION,r=om.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return oE.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,o=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=s.length;l<c;l++)o=s[l],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Va.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
79
|
+
`]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
80
|
+
`),this.decorators.push(`}
|
|
81
|
+
`),this.decorators=this.decorators.merge()));var h=this.createFunctionContext(i);if(this.isChild)return h;var u={compiler:this.compilerInfo(),main:h};this.decorators&&(u.main_d=this.decorators,u.useDecorators=!0);var f=this.context,p=f.programs,m=f.decorators;for(l=0,c=p.length;l<c;l++)u[l]=p[l],m[l]&&(u[l+"_d"]=m[l],u.useDecorators=!0);return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),i?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),r.srcName?(u=u.toStringWithSourceMap({file:r.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new am.default(this.options.srcName),this.decorators=new am.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var s=0;Object.keys(this.aliases).forEach(function(l){var c=r.aliases[l];c.children&&c.referenceCount>1&&(n+=", alias"+ ++s+"="+l,c.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(n);return e?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),`) {
|
|
82
|
+
`,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,s=void 0,o=void 0,a=void 0;return this.source.each(function(l){l.appendToBuffer?(o?l.prepend(" + "):o=l,a=l):(o&&(s?o.prepend("buffer += "):i=!0,a.add(";"),o=a=void 0),s=!0,r||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
|
|
83
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
84
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
86
|
+
return parent[propertyName];
|
|
87
|
+
}
|
|
88
|
+
return undefined
|
|
89
|
+
}
|
|
90
|
+
`.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var s=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(lE(this.options.strict&&s,this,r,n,e));return}for(var a=r.length,l=function(h){o.replaceStack(function(u){var f=o.nameLookup(u,r[h],e);return i?[" && ",f]:[" != null ? ",f," : ",u]})},c=n;c<a;c++)l(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),s=this.setupHelper(e,r),o=[];n&&o.push(s.name),o.push(i),this.options.strict||o.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(o,"||"),")"],l=this.source.functionCall(a,"call",s.callParams);this.push(l)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),o=["(","(helper = ",s," || ",n,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",o,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],s=this.setupParams(r,1,i);e&&(r=this.popStack(),delete s.name),n&&(s.indent=JSON.stringify(n)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),i.push(s),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[e]=n),i&&(o.types[e]=i),s&&(o.ids[e]=s),o.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:pr,compileChildren:function(e,r){for(var n=e.children,i=void 0,s=void 0,o=0,a=n.length;o<a;o++){i=n[o],s=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=s.compile(i,r,this.context,!this.precompile),this.context.decorators[c]=s.decorators,this.context.environments[c]=i,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof fr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new fr(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,s=void 0;if(!this.isInline())throw new Va.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof fr)n=[o.value],r=["(",n],s=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",o,")"],n=this.topStack()}var l=e.call(this,n);s||this.popStack(),i&&this.stackSlot--,this.push(r.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof fr)this.compileStack.push(i);else{var s=this.incrStack();this.pushSource([s," = ",i,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof fr)return n.value;if(!r){if(!this.stackSlot)throw new Va.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof fr?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],s=this.setupHelperArgs(r,e,i,n),o=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:s,name:o,callParams:[a].concat(i)}},setupParams:function(e,r,n){var i={},s=[],o=[],a=[],l=!n,c=void 0;l&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var h=this.popStack(),u=this.popStack();(u||h)&&(i.fn=u||"container.noop",i.inverse=h||"container.noop");for(var f=r;f--;)c=this.popStack(),n[f]=c,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(o[f]=this.popStack(),s[f]=this.popStack());return l&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(o),i.contexts=this.source.generateArray(s)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,r,n,i){var s=this.setupParams(e,r,n);return s.loc=JSON.stringify(this.source.currentLocation),s=this.objectLiteral(s),i?(this.useRegister("options"),n.push("options"),["options=",s]):n?(n.push(s),""):s}};(function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=pr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();pr.isValidJavaScriptVariableName=function(t){return!pr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function lE(t,e,r,n,i){var s=e.popStack(),o=r.length;t&&o--;for(var a=n;a<o;a++)s=e.nameLookup(s,r[a],i);return t?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(r[o]),", ",JSON.stringify(e.source.currentLocation)," )"]:s}rs.default=pr;cm.exports=rs.default});var pm=w((ns,fm)=>{"use strict";ns.__esModule=!0;function gn(t){return t&&t.__esModule?t:{default:t}}var cE=md(),uE=gn(cE),hE=wa(),fE=gn(hE),Ga=kd(),za=Ld(),pE=um(),dE=gn(pE),mE=$i(),gE=gn(mE),_E=ma(),yE=gn(_E),wE=uE.default.create;function hm(){var t=wE();return t.compile=function(e,r){return za.compile(e,r,t)},t.precompile=function(e,r){return za.precompile(e,r,t)},t.AST=fE.default,t.Compiler=za.Compiler,t.JavaScriptCompiler=dE.default,t.Parser=Ga.parser,t.parse=Ga.parse,t.parseWithoutProcessing=Ga.parseWithoutProcessing,t}var dr=hm();dr.create=hm;yE.default(dr);dr.Visitor=gE.default;dr.default=dr;ns.default=dr;fm.exports=ns.default});var dm=w(is=>{"use strict";is.__esModule=!0;is.print=SE;is.PrintVisitor=q;function bE(t){return t&&t.__esModule?t:{default:t}}var vE=$i(),xE=bE(vE);function SE(t){return new q().accept(t)}function q(){this.padding=0}q.prototype=new xE.default;q.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
91
|
+
`,e};q.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};q.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};q.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};q.prototype.BlockStatement=q.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};q.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};q.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};q.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};q.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};q.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,s=e.length;i<s;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};q.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};q.prototype.StringLiteral=function(t){return'"'+t.value+'"'};q.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};q.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};q.prototype.UndefinedLiteral=function(){return"UNDEFINED"};q.prototype.NullLiteral=function(){return"NULL"};q.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};q.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var ym=w((KO,_m)=>{var ss=pm().default,gm=dm();ss.PrintVisitor=gm.PrintVisitor;ss.print=gm.print;_m.exports=ss;function mm(t,e){var r=re("fs"),n=r.readFileSync(e,"utf8");t.exports=ss.compile(n)}typeof re<"u"&&re.extensions&&(re.extensions[".handlebars"]=mm,re.extensions[".hbs"]=mm)});import{readFile as xm,writeFile as bm,access as ME,mkdir as BE}from"node:fs/promises";import{resolve as $e,relative as Ya}from"node:path";import{pathToFileURL as Sm}from"node:url";function dl(t){return typeof t>"u"||t===null}function Rm(t){return typeof t=="object"&&t!==null}function Dm(t){return Array.isArray(t)?t:dl(t)?[]:[t]}function Tm(t,e){var r,n,i,s;if(e)for(s=Object.keys(e),r=0,n=s.length;r<n;r+=1)i=s[r],t[i]=e[i];return t}function Nm(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function Fm(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Mm=dl,Bm=Rm,qm=Dm,Hm=Nm,jm=Fm,Wm=Tm,G={isNothing:Mm,isObject:Bm,toArray:qm,repeat:Hm,isNegativeZero:jm,extend:Wm};function ml(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
92
|
+
|
|
93
|
+
`+t.mark.snippet),n+" "+r):n}function yr(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ml(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}yr.prototype=Object.create(Error.prototype);yr.prototype.constructor=yr;yr.prototype.toString=function(e){return this.name+": "+ml(this,e)};var ce=yr;function as(t,e,r,n,i){var s="",o="",a=Math.floor(i/2)-1;return n-e>a&&(s=" ... ",e=n-a+s.length),r-n>a&&(o=" ...",r=n+a-o.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+s.length}}function ls(t,e){return G.repeat(" ",e-t.length)+t}function Um(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,o=-1;s=r.exec(t.buffer);)i.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var a="",l,c,h=Math.min(t.line+e.linesAfter,i.length).toString().length,u=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)c=as(t.buffer,n[o-l],i[o-l],t.position-(n[o]-n[o-l]),u),a=G.repeat(" ",e.indent)+ls((t.line-l+1).toString(),h)+" | "+c.str+`
|
|
94
|
+
`+a;for(c=as(t.buffer,n[o],i[o],t.position,u),a+=G.repeat(" ",e.indent)+ls((t.line+1).toString(),h)+" | "+c.str+`
|
|
95
|
+
`,a+=G.repeat("-",e.indent+h+3+c.pos)+`^
|
|
96
|
+
`,l=1;l<=e.linesAfter&&!(o+l>=i.length);l++)c=as(t.buffer,n[o+l],i[o+l],t.position-(n[o]-n[o+l]),u),a+=G.repeat(" ",e.indent)+ls((t.line+l+1).toString(),h)+" | "+c.str+`
|
|
97
|
+
`;return a.replace(/\n$/,"")}var Vm=Um,Gm=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],zm=["scalar","sequence","mapping"];function $m(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function Ym(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Gm.indexOf(r)===-1)throw new ce('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=$m(e.styleAliases||null),zm.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var X=Ym;function Za(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=o)}),r[i]=n}),r}function Jm(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function us(t){return this.extend(t)}us.prototype.extend=function(e){var r=[],n=[];if(e instanceof X)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new ce("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof X))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ce("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ce("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof X))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(us.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Za(i,"implicit"),i.compiledExplicit=Za(i,"explicit"),i.compiledTypeMap=Jm(i.compiledImplicit,i.compiledExplicit),i};var gl=us,_l=new X("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),yl=new X("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),wl=new X("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),bl=new gl({explicit:[_l,yl,wl]});function Km(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Qm(){return null}function Xm(t){return t===null}var vl=new X("tag:yaml.org,2002:null",{kind:"scalar",resolve:Km,construct:Qm,predicate:Xm,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Zm(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function eg(t){return t==="true"||t==="True"||t==="TRUE"}function tg(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var xl=new X("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Zm,construct:eg,predicate:tg,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function rg(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function ng(t){return 48<=t&&t<=55}function ig(t){return 48<=t&&t<=57}function sg(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!rg(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!ng(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!ig(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function og(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function ag(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!G.isNegativeZero(t)}var Sl=new X("tag:yaml.org,2002:int",{kind:"scalar",resolve:sg,construct:og,predicate:ag,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),lg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function cg(t){return!(t===null||!lg.test(t)||t[t.length-1]==="_")}function ug(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var hg=/^[-+]?[0-9]+e/;function fg(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(G.isNegativeZero(t))return"-0.0";return r=t.toString(10),hg.test(r)?r.replace("e",".e"):r}function pg(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||G.isNegativeZero(t))}var El=new X("tag:yaml.org,2002:float",{kind:"scalar",resolve:cg,construct:ug,predicate:pg,represent:fg,defaultStyle:"lowercase"}),Cl=bl.extend({implicit:[vl,xl,Sl,El]}),Al=Cl,kl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ol=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function dg(t){return t===null?!1:kl.exec(t)!==null||Ol.exec(t)!==null}function mg(t){var e,r,n,i,s,o,a,l=0,c=null,h,u,f;if(e=kl.exec(t),e===null&&(e=Ol.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],u=+(e[11]||0),c=(h*60+u)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,n,i,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function gg(t){return t.toISOString()}var Pl=new X("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:dg,construct:mg,instanceOf:Date,represent:gg});function _g(t){return t==="<<"||t===null}var Il=new X("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_g}),ms=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
98
|
+
\r`;function yg(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=ms;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function wg(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=ms,o=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function bg(t){var e="",r=0,n,i,s=t.length,o=ms;for(n=0;n<s;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function vg(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Ll=new X("tag:yaml.org,2002:binary",{kind:"scalar",resolve:yg,construct:wg,predicate:vg,represent:bg}),xg=Object.prototype.hasOwnProperty,Sg=Object.prototype.toString;function Eg(t){if(t===null)return!0;var e=[],r,n,i,s,o,a=t;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],o=!1,Sg.call(i)!=="[object Object]")return!1;for(s in i)if(xg.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function Cg(t){return t!==null?t:[]}var Rl=new X("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Eg,construct:Cg}),Ag=Object.prototype.toString;function kg(t){if(t===null)return!0;var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],Ag.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function Og(t){if(t===null)return[];var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}var Dl=new X("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:kg,construct:Og}),Pg=Object.prototype.hasOwnProperty;function Ig(t){if(t===null)return!0;var e,r=t;for(e in r)if(Pg.call(r,e)&&r[e]!==null)return!1;return!0}function Lg(t){return t!==null?t:{}}var Tl=new X("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ig,construct:Lg}),gs=Al.extend({implicit:[Pl,Il],explicit:[Ll,Rl,Dl,Tl]}),ot=Object.prototype.hasOwnProperty,wn=1,Nl=2,Fl=3,bn=4,cs=1,Rg=2,el=3,Dg=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Tg=/[\x85\u2028\u2029]/,Ng=/[,\[\]\{\}]/,Ml=/^(?:!|!!|![a-z\-]+!)$/i,Bl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function tl(t){return Object.prototype.toString.call(t)}function He(t){return t===10||t===13}function yt(t){return t===9||t===32}function _e(t){return t===9||t===32||t===10||t===13}function Ht(t){return t===44||t===91||t===93||t===123||t===125}function Fg(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Mg(t){return t===120?2:t===117?4:t===85?8:0}function Bg(t){return 48<=t&&t<=57?t-48:-1}function rl(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
99
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function qg(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function ql(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var Hl=new Array(256),jl=new Array(256);for(_t=0;_t<256;_t++)Hl[_t]=rl(_t)?1:0,jl[_t]=rl(_t);var _t;function Hg(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||gs,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wl(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Vm(r),new ce(e,r)}function E(t,e){throw Wl(t,e)}function vn(t,e){t.onWarning&&t.onWarning.call(null,Wl(t,e))}var nl={YAML:function(e,r,n){var i,s,o;e.version!==null&&E(e,"duplication of %YAML directive"),n.length!==1&&E(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&E(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&E(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&vn(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&E(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],Ml.test(i)||E(e,"ill-formed tag handle (first argument) of the TAG directive"),ot.call(e.tagMap,i)&&E(e,'there is a previously declared suffix for "'+i+'" tag handle'),Bl.test(s)||E(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{E(e,"tag prefix is malformed: "+s)}e.tagMap[i]=s}};function st(t,e,r,n){var i,s,o,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||E(t,"expected valid JSON character");else Dg.test(a)&&E(t,"the stream contains non-printable characters");t.result+=a}}function il(t,e,r,n){var i,s,o,a;for(G.isObject(r)||E(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)s=i[o],ot.call(e,s)||(ql(e,s,r[s]),n[s]=!0)}function jt(t,e,r,n,i,s,o,a,l){var c,h;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,h=i.length;c<h;c+=1)Array.isArray(i[c])&&E(t,"nested arrays are not supported inside keys"),typeof i=="object"&&tl(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&tl(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)il(t,e,s[c],r);else il(t,e,s,r);else!t.json&&!ot.call(r,i)&&ot.call(e,i)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,E(t,"duplicated mapping key")),ql(e,i,s),delete r[i];return e}function _s(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):E(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function W(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;yt(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(He(i))for(_s(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&vn(t,"deficient indentation"),n}function En(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||_e(r)))}function ys(t,e){e===1?t.result+=" ":e>1&&(t.result+=G.repeat(`
|
|
100
|
+
`,e-1))}function jg(t,e,r){var n,i,s,o,a,l,c,h,u=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),_e(p)||Ht(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),_e(i)||r&&Ht(i)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),_e(i)||r&&Ht(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),_e(n))break}else{if(t.position===t.lineStart&&En(t)||r&&Ht(p))break;if(He(p))if(l=t.line,c=t.lineStart,h=t.lineIndent,W(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=h;break}}a&&(st(t,s,o,!1),ys(t,t.line-l),s=o=t.position,a=!1),yt(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return st(t,s,o,!1),t.result?!0:(t.kind=u,t.result=f,!1)}function Wg(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(st(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else He(r)?(st(t,n,i,!0),ys(t,W(t,!1,e)),n=i=t.position):t.position===t.lineStart&&En(t)?E(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);E(t,"unexpected end of the stream within a single quoted scalar")}function Ug(t,e){var r,n,i,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return st(t,r,t.position,!0),t.position++,!0;if(a===92){if(st(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),He(a))W(t,!1,e);else if(a<256&&Hl[a])t.result+=jl[a],t.position++;else if((o=Mg(a))>0){for(i=o,s=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=Fg(a))>=0?s=(s<<4)+o:E(t,"expected hexadecimal character");t.result+=qg(s),t.position++}else E(t,"unknown escape sequence");r=n=t.position}else He(a)?(st(t,r,n,!0),ys(t,W(t,!1,e)),r=n=t.position):t.position===t.lineStart&&En(t)?E(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}E(t,"unexpected end of the stream within a double quoted scalar")}function Vg(t,e){var r=!0,n,i,s,o=t.tag,a,l=t.anchor,c,h,u,f,p,m=Object.create(null),d,_,g,y;if(y=t.input.charCodeAt(t.position),y===91)h=93,p=!1,a=[];else if(y===123)h=125,p=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);y!==0;){if(W(t,!0,e),y=t.input.charCodeAt(t.position),y===h)return t.position++,t.tag=o,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=a,!0;r?y===44&&E(t,"expected the node content, but found ','"):E(t,"missed comma between flow collection entries"),_=d=g=null,u=f=!1,y===63&&(c=t.input.charCodeAt(t.position+1),_e(c)&&(u=f=!0,t.position++,W(t,!0,e))),n=t.line,i=t.lineStart,s=t.position,Wt(t,e,wn,!1,!0),_=t.tag,d=t.result,W(t,!0,e),y=t.input.charCodeAt(t.position),(f||t.line===n)&&y===58&&(u=!0,y=t.input.charCodeAt(++t.position),W(t,!0,e),Wt(t,e,wn,!1,!0),g=t.result),p?jt(t,a,m,_,d,g,n,i,s):u?a.push(jt(t,null,m,_,d,g,n,i,s)):a.push(d),W(t,!0,e),y=t.input.charCodeAt(t.position),y===44?(r=!0,y=t.input.charCodeAt(++t.position)):r=!1}E(t,"unexpected end of the stream within a flow collection")}function Gg(t,e){var r,n,i=cs,s=!1,o=!1,a=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)cs===i?i=u===43?el:Rg:E(t,"repeat of a chomping mode identifier");else if((h=Bg(u))>=0)h===0?E(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?E(t,"repeat of an indentation width identifier"):(a=e+h-1,o=!0);else break;if(yt(u)){do u=t.input.charCodeAt(++t.position);while(yt(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!He(u)&&u!==0)}for(;u!==0;){for(_s(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),He(u)){l++;continue}if(t.lineIndent<a){i===el?t.result+=G.repeat(`
|
|
101
|
+
`,s?1+l:l):i===cs&&s&&(t.result+=`
|
|
102
|
+
`);break}for(n?yt(u)?(c=!0,t.result+=G.repeat(`
|
|
103
|
+
`,s?1+l:l)):c?(c=!1,t.result+=G.repeat(`
|
|
104
|
+
`,l+1)):l===0?s&&(t.result+=" "):t.result+=G.repeat(`
|
|
105
|
+
`,l):t.result+=G.repeat(`
|
|
106
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=t.position;!He(u)&&u!==0;)u=t.input.charCodeAt(++t.position);st(t,r,t.position,!1)}return!0}function sl(t,e){var r,n=t.tag,i=t.anchor,s=[],o,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,E(t,"tab characters must not be used in indentation")),!(l!==45||(o=t.input.charCodeAt(t.position+1),!_e(o))));){if(a=!0,t.position++,W(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Wt(t,e,Fl,!1,!0),s.push(t.result),W(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)E(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function zg(t,e,r){var n,i,s,o,a,l,c=t.tag,h=t.anchor,u={},f=Object.create(null),p=null,m=null,d=null,_=!1,g=!1,y;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=u),y=t.input.charCodeAt(t.position);y!==0;){if(!_&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,E(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),s=t.line,(y===63||y===58)&&_e(n))y===63?(_&&(jt(t,u,f,p,m,null,o,a,l),p=m=d=null),g=!0,_=!0,i=!0):_?(_=!1,i=!0):E(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=n;else{if(o=t.line,a=t.lineStart,l=t.position,!Wt(t,r,Nl,!1,!0))break;if(t.line===s){for(y=t.input.charCodeAt(t.position);yt(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),_e(y)||E(t,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(jt(t,u,f,p,m,null,o,a,l),p=m=d=null),g=!0,_=!1,i=!1,p=t.tag,m=t.result;else if(g)E(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=h,!0}else if(g)E(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=h,!0}if((t.line===s||t.lineIndent>e)&&(_&&(o=t.line,a=t.lineStart,l=t.position),Wt(t,e,bn,!0,i)&&(_?m=t.result:d=t.result),_||(jt(t,u,f,p,m,d,o,a,l),p=m=d=null),W(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&y!==0)E(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return _&&jt(t,u,f,p,m,null,o,a,l),g&&(t.tag=c,t.anchor=h,t.kind="mapping",t.result=u),g}function $g(t){var e,r=!1,n=!1,i,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&E(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):E(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!_e(o);)o===33&&(n?E(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),Ml.test(i)||E(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),Ng.test(s)&&E(t,"tag suffix cannot contain flow indicator characters")}s&&!Bl.test(s)&&E(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{E(t,"tag name is malformed: "+s)}return r?t.tag=s:ot.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:E(t,'undeclared tag handle "'+i+'"'),!0}function Yg(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&E(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!_e(r)&&!Ht(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&E(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Jg(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!_e(n)&&!Ht(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&E(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),ot.call(t.anchorMap,r)||E(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],W(t,!0,-1),!0}function Wt(t,e,r,n,i){var s,o,a,l=1,c=!1,h=!1,u,f,p,m,d,_;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=bn===r||Fl===r,n&&W(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;$g(t)||Yg(t);)W(t,!0,-1)?(c=!0,a=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=c||i),(l===1||bn===r)&&(wn===r||Nl===r?d=e:d=e+1,_=t.position-t.lineStart,l===1?a&&(sl(t,_)||zg(t,_,d))||Vg(t,d)?h=!0:(o&&Gg(t,d)||Wg(t,d)||Ug(t,d)?h=!0:Jg(t)?(h=!0,(t.tag!==null||t.anchor!==null)&&E(t,"alias node should not have any properties")):jg(t,d,wn===r)&&(h=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(h=a&&sl(t,_))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&E(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u<f;u+=1)if(m=t.implicitTypes[u],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(ot.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],u=0,f=p.length;u<f;u+=1)if(t.tag.slice(0,p[u].tag.length)===p[u].tag){m=p[u];break}m||E(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&E(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):E(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function Kg(t){var e=t.position,r,n,i,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(W(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!_e(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&E(t,"directive name must not be less than one character in length");o!==0;){for(;yt(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!He(o));break}if(He(o))break;for(r=t.position;o!==0&&!_e(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&_s(t),ot.call(nl,n)?nl[n](t,n,i):vn(t,'unknown document directive "'+n+'"')}if(W(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,W(t,!0,-1)):s&&E(t,"directives end mark is expected"),Wt(t,t.lineIndent-1,bn,!1,!0),W(t,!0,-1),t.checkLineBreaks&&Tg.test(t.input.slice(e,t.position))&&vn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&En(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,W(t,!0,-1));return}if(t.position<t.length-1)E(t,"end of the stream or a document separator is expected");else return}function Ul(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
107
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Hg(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,E(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Kg(r);return r.documents}function Qg(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Ul(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function Xg(t,e){var r=Ul(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new ce("expected a single document in the stream, but found more")}}var Zg=Qg,e0=Xg,Vl={loadAll:Zg,load:e0},Gl=Object.prototype.toString,zl=Object.prototype.hasOwnProperty,ws=65279,t0=9,wr=10,r0=13,n0=32,i0=33,s0=34,hs=35,o0=37,a0=38,l0=39,c0=42,$l=44,u0=45,xn=58,h0=61,f0=62,p0=63,d0=64,Yl=91,Jl=93,m0=96,Kl=123,g0=124,Ql=125,ne={};ne[0]="\\0";ne[7]="\\a";ne[8]="\\b";ne[9]="\\t";ne[10]="\\n";ne[11]="\\v";ne[12]="\\f";ne[13]="\\r";ne[27]="\\e";ne[34]='\\"';ne[92]="\\\\";ne[133]="\\N";ne[160]="\\_";ne[8232]="\\L";ne[8233]="\\P";var _0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],y0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function w0(t,e){var r,n,i,s,o,a,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,s=n.length;i<s;i+=1)o=n[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&zl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}function b0(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+G.repeat("0",n-e.length)+e}var v0=1,br=2;function x0(t){this.schema=t.schema||gs,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=G.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=w0(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?br:v0,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ol(t,e){for(var r=G.repeat(" ",e),n=0,i=-1,s="",o,a=t.length;n<a;)i=t.indexOf(`
|
|
108
|
+
`,n),i===-1?(o=t.slice(n),n=a):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
|
|
109
|
+
`&&(s+=r),s+=o;return s}function fs(t,e){return`
|
|
110
|
+
`+G.repeat(" ",t.indent*e)}function S0(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function Sn(t){return t===n0||t===t0}function vr(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==ws||65536<=t&&t<=1114111}function al(t){return vr(t)&&t!==ws&&t!==r0&&t!==wr}function ll(t,e,r){var n=al(t),i=n&&!Sn(t);return(r?n:n&&t!==$l&&t!==Yl&&t!==Jl&&t!==Kl&&t!==Ql)&&t!==hs&&!(e===xn&&!i)||al(e)&&!Sn(e)&&t===hs||e===xn&&i}function E0(t){return vr(t)&&t!==ws&&!Sn(t)&&t!==u0&&t!==p0&&t!==xn&&t!==$l&&t!==Yl&&t!==Jl&&t!==Kl&&t!==Ql&&t!==hs&&t!==a0&&t!==c0&&t!==i0&&t!==g0&&t!==h0&&t!==f0&&t!==l0&&t!==s0&&t!==o0&&t!==d0&&t!==m0}function C0(t){return!Sn(t)&&t!==xn}function _r(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function Xl(t){var e=/^\n* /;return e.test(t)}var Zl=1,ps=2,ec=3,tc=4,qt=5;function A0(t,e,r,n,i,s,o,a){var l,c=0,h=null,u=!1,f=!1,p=n!==-1,m=-1,d=E0(_r(t,0))&&C0(_r(t,t.length-1));if(e||o)for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=_r(t,l),!vr(c))return qt;d=d&&ll(c,h,a),h=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=_r(t,l),c===wr)u=!0,p&&(f=f||l-m-1>n&&t[m+1]!==" ",m=l);else if(!vr(c))return qt;d=d&&ll(c,h,a),h=c}f=f||p&&l-m-1>n&&t[m+1]!==" "}return!u&&!f?d&&!o&&!i(t)?Zl:s===br?qt:ps:r>9&&Xl(t)?qt:o?s===br?qt:ps:f?tc:ec}function k0(t,e,r,n,i){t.dump=(function(){if(e.length===0)return t.quotingType===br?'""':"''";if(!t.noCompatMode&&(_0.indexOf(e)!==-1||y0.test(e)))return t.quotingType===br?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),a=n||t.flowLevel>-1&&r>=t.flowLevel;function l(c){return S0(t,c)}switch(A0(e,a,t.indent,o,l,t.quotingType,t.forceQuotes&&!n,i)){case Zl:return e;case ps:return"'"+e.replace(/'/g,"''")+"'";case ec:return"|"+cl(e,t.indent)+ul(ol(e,s));case tc:return">"+cl(e,t.indent)+ul(ol(O0(e,o),s));case qt:return'"'+P0(e)+'"';default:throw new ce("impossible error: invalid scalar style")}})()}function cl(t,e){var r=Xl(t)?String(e):"",n=t[t.length-1]===`
|
|
111
|
+
`,i=n&&(t[t.length-2]===`
|
|
112
|
+
`||t===`
|
|
113
|
+
`),s=i?"+":n?"":"-";return r+s+`
|
|
114
|
+
`}function ul(t){return t[t.length-1]===`
|
|
115
|
+
`?t.slice(0,-1):t}function O0(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var c=t.indexOf(`
|
|
116
|
+
`);return c=c!==-1?c:t.length,r.lastIndex=c,hl(t.slice(0,c),e)})(),i=t[0]===`
|
|
117
|
+
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",n+=a+(!i&&!s&&l!==""?`
|
|
118
|
+
`:"")+hl(l,e),i=s}return n}function hl(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,l="";n=r.exec(t);)a=n.index,a-i>e&&(s=o>i?o:a,l+=`
|
|
119
|
+
`+t.slice(i,s),i=s+1),o=a;return l+=`
|
|
120
|
+
`,t.length-i>e&&o>i?l+=t.slice(i,o)+`
|
|
121
|
+
`+t.slice(o+1):l+=t.slice(i),l.slice(1)}function P0(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=_r(t,i),n=ne[r],!n&&vr(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||b0(r);return e}function I0(t,e,r){var n="",i=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(Je(t,e,a,!1,!1)||typeof a>"u"&&Je(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function fl(t,e,r,n){var i="",s=t.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],t.replacer&&(l=t.replacer.call(r,String(o),l)),(Je(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&Je(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=fs(t,e)),t.dump&&wr===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function L0(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,l,c,h;for(o=0,a=s.length;o<a;o+=1)h="",n!==""&&(h+=", "),t.condenseFlow&&(h+='"'),l=s[o],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),Je(t,e,l,!1,!1)&&(t.dump.length>1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Je(t,e,c,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function R0(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,l,c,h,u,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new ce("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!n||i!=="")&&(f+=fs(t,e)),c=o[a],h=r[c],t.replacer&&(h=t.replacer.call(r,c,h)),Je(t,e+1,c,!0,!0,!0)&&(u=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,u&&(t.dump&&wr===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=fs(t,e)),Je(t,e+1,h,!0,u)&&(t.dump&&wr===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=s,t.dump=i||"{}"}function pl(t,e,r){var n,i,s,o,a,l;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,Gl.call(a.represent)==="[object Function]")n=a.represent(e,l);else if(zl.call(a.represent,l))n=a.represent[l](e,l);else throw new ce("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Je(t,e,r,n,i,s,o){t.tag=null,t.dump=r,pl(t,r,!1)||pl(t,r,!0);var a=Gl.call(t.dump),l=n,c;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=a==="[object Object]"||a==="[object Array]",u,f;if(h&&(u=t.duplicates.indexOf(r),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(i=!1),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(h&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(R0(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(L0(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?fl(t,e-1,t.dump,i):fl(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(I0(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&k0(t,t.dump,e,s,l);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new ce("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function D0(t,e){var r=[],n=[],i,s;for(ds(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function ds(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)ds(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)ds(t[n[i]],e,r)}function T0(t,e){e=e||{};var r=new x0(e);r.noRefs||D0(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Je(r,0,n,!0,!0)?r.dump+`
|
|
122
|
+
`:""}var N0=T0,F0={dump:N0};function bs(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var M0=X,B0=gl,q0=bl,H0=Cl,j0=Al,W0=gs,U0=Vl.load,V0=Vl.loadAll,G0=F0.dump,z0=ce,$0={binary:Ll,float:El,map:wl,null:vl,pairs:Dl,set:Tl,timestamp:Pl,bool:xl,int:Sl,merge:Il,omap:Rl,seq:yl,str:_l},Y0=bs("safeLoad","load"),J0=bs("safeLoadAll","loadAll"),K0=bs("safeDump","dump"),wt={Type:M0,Schema:B0,FAILSAFE_SCHEMA:q0,JSON_SCHEMA:H0,CORE_SCHEMA:j0,DEFAULT_SCHEMA:W0,load:U0,loadAll:V0,dump:G0,YAMLException:z0,types:$0,safeLoad:Y0,safeLoadAll:J0,safeDump:K0};var A=yn(ic(),1);import{stat as P_}from"fs";import{stat as I_,readdir as L_}from"fs/promises";import{EventEmitter as R_}from"events";import*as I from"path";import{stat as e_,lstat as sc,readdir as t_,realpath as r_}from"node:fs/promises";import{Readable as n_}from"node:stream";import{resolve as oc,relative as i_,join as s_,sep as o_}from"node:path";var be={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},xs={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:be.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(xs);var uc="READDIRP_RECURSIVE_ERROR",a_=new Set(["ENOENT","EPERM","EACCES","ELOOP",uc]),ac=[be.DIR_TYPE,be.EVERYTHING_TYPE,be.FILE_DIR_TYPE,be.FILE_TYPE],l_=new Set([be.DIR_TYPE,be.EVERYTHING_TYPE,be.FILE_DIR_TYPE]),c_=new Set([be.EVERYTHING_TYPE,be.FILE_DIR_TYPE,be.FILE_TYPE]),u_=t=>a_.has(t.code),h_=process.platform==="win32",lc=t=>!0,cc=t=>{if(t===void 0)return lc;if(typeof t=="function")return t;if(typeof t=="string"){let e=t.trim();return r=>r.basename===e}if(Array.isArray(t)){let e=t.map(r=>r.trim());return r=>e.some(n=>r.basename===n)}return lc},Ss=class extends n_{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let r={...xs,...e},{root:n,type:i}=r;this._fileFilter=cc(r.fileFilter),this._directoryFilter=cc(r.directoryFilter);let s=r.lstat?sc:e_;h_?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=r.depth??xs.depth,this._wantsDir=i?l_.has(i):!1,this._wantsFile=i?c_.has(i):!1,this._wantsEverything=i===be.EVERYTHING_TYPE,this._root=oc(n),this._isDirent=!r.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let r=this.parent,n=r&&r.files;if(n&&n.length>0){let{path:i,depth:s}=r,o=n.splice(0,e).map(l=>this._formatEntry(l,i)),a=await Promise.all(o);for(let l of a){if(!l)continue;if(this.destroyed)return;let c=await this._getEntryType(l);c==="directory"&&this._directoryFilter(l)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(l.fullPath,s+1)),this._wantsDir&&(this.push(l),e--)):(c==="file"||this._includeAsFile(l))&&this._fileFilter(l)&&this._wantsFile&&(this.push(l),e--)}}else{let i=this.parents.pop();if(!i){this.push(null);break}if(this.parent=await i,this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=!1}}}async _exploreDir(e,r){let n;try{n=await t_(e,this._rdOptions)}catch(i){this._onError(i)}return{files:n,depth:r,path:e}}async _formatEntry(e,r){let n,i=this._isDirent?e.name:e;try{let s=oc(s_(r,i));n={path:i_(this._root,s),fullPath:s,basename:i},n[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(s){this._onError(s);return}return n}_onError(e){u_(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";let r=e[this._statsProp];if(r.isFile())return"file";if(r.isDirectory())return"directory";if(r&&r.isSymbolicLink()){let n=e.fullPath;try{let i=await r_(n),s=await sc(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;if(n.startsWith(i)&&n.substr(o,1)===o_){let a=new Error(`Circular symlink detected: "${n}" points to "${i}"`);return a.code=uc,this._onError(a)}return"directory"}}catch(i){return this._onError(i),""}}}_includeAsFile(e){let r=e&&e[this._statsProp];return r&&this._wantsEverything&&!r.isDirectory()}};function hc(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=be.FILE_DIR_TYPE),r&&(e.type=r),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!ac.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${ac.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new Ss(e)}import{watchFile as f_,unwatchFile as fc,watch as p_}from"fs";import{open as d_,stat as dc,lstat as m_,realpath as Es}from"fs/promises";import*as F from"path";import{type as g_}from"os";var __="data",ks="end",mc="close",Ln=()=>{};var Rn=process.platform,Os=Rn==="win32",y_=Rn==="darwin",w_=Rn==="linux",b_=Rn==="freebsd",gc=g_()==="OS400",M={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Fe=M,v_="watch",x_={lstat:m_,stat:dc},bt="listeners",kn="errHandlers",Ut="rawEmitters",S_=[bt,kn,Ut],E_=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),C_=t=>E_.has(F.extname(t).slice(1).toLowerCase()),As=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},xr=(t,e,r)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(r)},A_=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},Sr=(t,e,r)=>{let n=t[e];n instanceof Set?n.delete(r):n===r&&delete t[e]},_c=t=>t instanceof Set?t.size===0:!t,On=new Map;function pc(t,e,r,n,i){let s=(o,a)=>{r(t),i(o,a,{watchedPath:t}),a&&t!==a&&Pn(F.resolve(t,a),bt,F.join(t,a))};try{return p_(t,{persistent:e.persistent},s)}catch(o){n(o);return}}var Pn=(t,e,r,n,i)=>{let s=On.get(t);s&&As(s[e],o=>{o(r,n,i)})},k_=(t,e,r,n)=>{let{listener:i,errHandler:s,rawEmitter:o}=n,a=On.get(e),l;if(!r.persistent)return l=pc(t,r,i,s,o),l?l.close.bind(l):void 0;if(a)xr(a,bt,i),xr(a,kn,s),xr(a,Ut,o);else{if(l=pc(t,r,Pn.bind(null,e,bt),s,Pn.bind(null,e,Ut)),!l)return;l.on(Fe.ERROR,async c=>{let h=Pn.bind(null,e,kn);if(a&&(a.watcherUnusable=!0),Os&&c.code==="EPERM")try{await(await d_(t,"r")).close(),h(c)}catch{}else h(c)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:l},On.set(e,a)}return()=>{Sr(a,bt,i),Sr(a,kn,s),Sr(a,Ut,o),_c(a.listeners)&&(a.watcher.close(),On.delete(e),S_.forEach(A_(a)),a.watcher=void 0,Object.freeze(a))}},Cs=new Map,O_=(t,e,r,n)=>{let{listener:i,rawEmitter:s}=n,o=Cs.get(e),a=o&&o.options;return a&&(a.persistent<r.persistent||a.interval>r.interval)&&(fc(e),o=void 0),o?(xr(o,bt,i),xr(o,Ut,s)):(o={listeners:i,rawEmitters:s,options:r,watcher:f_(e,r,(l,c)=>{As(o.rawEmitters,u=>{u(Fe.CHANGE,e,{curr:l,prev:c})});let h=l.mtimeMs;(l.size!==c.size||h>c.mtimeMs||h===0)&&As(o.listeners,u=>u(t,l))})},Cs.set(e,o)),()=>{Sr(o,bt,i),Sr(o,Ut,s),_c(o.listeners)&&(Cs.delete(e),fc(e),o.options=o.watcher=void 0,Object.freeze(o))}},In=class{constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let n=this.fsw.options,i=F.dirname(e),s=F.basename(e);this.fsw._getWatchedDir(i).add(s);let a=F.resolve(e),l={persistent:n.persistent};r||(r=Ln);let c;if(n.usePolling){let h=n.interval!==n.binaryInterval;l.interval=h&&C_(s)?n.binaryInterval:n.interval,c=O_(e,a,l,{listener:r,rawEmitter:this.fsw._emitRaw})}else c=k_(e,a,l,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return c}_handleFile(e,r,n){if(this.fsw.closed)return;let i=F.dirname(e),s=F.basename(e),o=this.fsw._getWatchedDir(i),a=r;if(o.has(s))return;let l=async(h,u)=>{if(this.fsw._throttle(v_,e,5)){if(!u||u.mtimeMs===0)try{let f=await dc(e);if(this.fsw.closed)return;let p=f.atimeMs,m=f.mtimeMs;if((!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(Fe.CHANGE,e,f),(y_||w_||b_)&&a.ino!==f.ino){this.fsw._closeFile(h),a=f;let d=this._watchWithNodeFs(e,l);d&&this.fsw._addPathCloser(h,d)}else a=f}catch{this.fsw._remove(i,s)}else if(o.has(s)){let f=u.atimeMs,p=u.mtimeMs;(!f||f<=p||p!==a.mtimeMs)&&this.fsw._emit(Fe.CHANGE,e,u),a=u}}},c=this._watchWithNodeFs(e,l);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Fe.ADD,e,0))return;this.fsw._emit(Fe.ADD,e,r)}return c}async _handleSymlink(e,r,n,i){if(this.fsw.closed)return;let s=e.fullPath,o=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await Es(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(i)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Fe.CHANGE,n,e.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Fe.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,r,n,i,s,o,a){if(e=F.join(e,""),a=this.fsw._throttle("readdir",e,1e3),!a)return;let l=this.fsw._getWatchedDir(n.path),c=new Set,h=this.fsw._readdirp(e,{fileFilter:u=>n.filterPath(u),directoryFilter:u=>n.filterDir(u)});if(h)return h.on(__,async u=>{if(this.fsw.closed){h=void 0;return}let f=u.path,p=F.join(e,f);if(c.add(f),!(u.stats.isSymbolicLink()&&await this._handleSymlink(u,e,p,f))){if(this.fsw.closed){h=void 0;return}(f===i||!i&&!l.has(f))&&(this.fsw._incrReadyCount(),p=F.join(s,F.relative(s,p)),this._addToNodeFs(p,r,n,o+1))}}).on(Fe.ERROR,this._boundHandleError),new Promise((u,f)=>{if(!h)return f();h.once(ks,()=>{if(this.fsw.closed){h=void 0;return}let p=a?a.clear():!1;u(void 0),l.getChildren().filter(m=>m!==e&&!c.has(m)).forEach(m=>{this.fsw._remove(e,m)}),h=void 0,p&&this._handleRead(e,!1,n,i,s,o,a)})})}async _handleDir(e,r,n,i,s,o,a){let l=this.fsw._getWatchedDir(F.dirname(e)),c=l.has(F.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!c&&this.fsw._emit(Fe.ADD_DIR,e,r),l.add(F.basename(e)),this.fsw._getWatchedDir(e);let h,u,f=this.fsw.options.depth;if((f==null||i<=f)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,o,s,e,i,h),this.fsw.closed))return;u=this._watchWithNodeFs(e,(p,m)=>{m&&m.mtimeMs===0||this._handleRead(p,!1,o,s,e,i,h)})}return u}async _addToNodeFs(e,r,n,i,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(e);n&&(a.filterPath=l=>n.filterPath(l),a.filterDir=l=>n.filterDir(l));try{let l=await x_[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,l))return o(),!1;let c=this.fsw.options.followSymlinks,h;if(l.isDirectory()){let u=F.resolve(e),f=c?await Es(e):e;if(this.fsw.closed||(h=await this._handleDir(a.watchPath,l,r,i,s,a,f),this.fsw.closed))return;u!==f&&f!==void 0&&this.fsw._symlinkPaths.set(u,f)}else if(l.isSymbolicLink()){let u=c?await Es(e):e;if(this.fsw.closed)return;let f=F.dirname(a.watchPath);if(this.fsw._getWatchedDir(f).add(a.watchPath),this.fsw._emit(Fe.ADD,a.watchPath,l),h=await this._handleDir(f,l,r,i,e,a,u),this.fsw.closed)return;u!==void 0&&this.fsw._symlinkPaths.set(F.resolve(e),u)}else h=this._handleFile(a.watchPath,l,r);return o(),h&&this.fsw._addPathCloser(e,h),!1}catch(l){if(this.fsw._handleError(l))return o(),e}}};var Ps="/",D_="//",Sc=".",T_="..",N_="string",F_=/\\/g,yc=/\/\//,M_=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,B_=/^\.[/\\]/;function Dn(t){return Array.isArray(t)?t:[t]}var Is=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);function q_(t){return typeof t=="function"?t:typeof t=="string"?e=>t===e:t instanceof RegExp?e=>t.test(e):typeof t=="object"&&t!==null?e=>{if(t.path===e)return!0;if(t.recursive){let r=I.relative(t.path,e);return r?!r.startsWith("..")&&!I.isAbsolute(r):!1}return!1}:()=>!1}function H_(t){if(typeof t!="string")throw new Error("string expected");t=I.normalize(t),t=t.replace(/\\/g,"/");let e=!1;t.startsWith("//")&&(e=!0);let r=/\/\//;for(;t.match(r);)t=t.replace(r,"/");return e&&(t="/"+t),t}function wc(t,e,r){let n=H_(e);for(let i=0;i<t.length;i++){let s=t[i];if(s(n,r))return!0}return!1}function j_(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let n=Dn(t).map(i=>q_(i));return e==null?(i,s)=>wc(n,i,s):wc(n,e)}var bc=t=>{let e=Dn(t).flat();if(!e.every(r=>typeof r===N_))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Ec)},vc=t=>{let e=t.replace(F_,Ps),r=!1;for(e.startsWith(D_)&&(r=!0);e.match(yc);)e=e.replace(yc,Ps);return r&&(e=Ps+e),e},Ec=t=>vc(I.normalize(vc(t))),xc=(t="")=>e=>typeof e=="string"?Ec(I.isAbsolute(e)?e:I.join(t,e)):e,W_=(t,e)=>I.isAbsolute(t)?t:I.join(e,t),U_=Object.freeze(new Set),Ls=class{constructor(e,r){this.path=e,this._removeWatcher=r,this.items=new Set}add(e){let{items:r}=this;r&&e!==Sc&&e!==T_&&r.add(e)}async remove(e){let{items:r}=this;if(!r||(r.delete(e),r.size>0))return;let n=this.path;try{await L_(n)}catch{this._removeWatcher&&this._removeWatcher(I.dirname(n),I.basename(n))}}has(e){let{items:r}=this;if(r)return r.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=Ln,this.items=U_,Object.freeze(this)}},V_="stat",G_="lstat",Rs=class{constructor(e,r,n){this.fsw=n;let i=e;this.path=e=e.replace(B_,""),this.watchPath=i,this.fullWatchPath=I.resolve(i),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?V_:G_}entryPath(e){return I.join(this.watchPath,I.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:r}=e;if(r&&r.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,r)&&this.fsw._hasReadPermissions(r)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},Tn=class extends R_{constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let r=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},i={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?Dn(e.ignored):Dn([]),awaitWriteFinish:r===!0?n:typeof r=="object"?{...n,...r}:!1};gc&&(i.usePolling=!0),i.atomic===void 0&&(i.atomic=!i.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let l=s.toLowerCase();l==="false"||l==="0"?i.usePolling=!1:l==="true"||l==="1"?i.usePolling=!0:i.usePolling=!!l}let o=process.env.CHOKIDAR_INTERVAL;o&&(i.interval=Number.parseInt(o,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=Ln,this._readyEmitted=!0,process.nextTick(()=>this.emit(M.READY)))},this._emitRaw=(...l)=>this.emit(M.RAW,...l),this._boundRemove=this._remove.bind(this),this.options=i,this._nodeFsHandler=new In(this),Object.freeze(i)}_addIgnoredPath(e){if(Is(e)){for(let r of this._ignoredPaths)if(Is(r)&&r.path===e.path&&r.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let r of this._ignoredPaths)Is(r)&&r.path===e&&this._ignoredPaths.delete(r)}add(e,r,n){let{cwd:i}=this.options;this.closed=!1,this._closePromise=void 0;let s=bc(e);return i&&(s=s.map(o=>W_(o,i))),s.forEach(o=>{this._removeIgnoredPath(o)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=s.length,Promise.all(s.map(async o=>{let a=await this._nodeFsHandler._addToNodeFs(o,!n,void 0,0,r);return a&&this._emitReady(),a})).then(o=>{this.closed||o.forEach(a=>{a&&this.add(I.dirname(a),I.basename(r||a))})}),this}unwatch(e){if(this.closed)return this;let r=bc(e),{cwd:n}=this.options;return r.forEach(i=>{!I.isAbsolute(i)&&!this._closers.has(i)&&(n&&(i=I.join(n,i)),i=I.resolve(i)),this._closePath(i),this._addIgnoredPath(i),this._watched.has(i)&&this._addIgnoredPath({path:i,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(r=>r.forEach(n=>{let i=n();i instanceof Promise&&e.push(i)})),this._streams.forEach(r=>r.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(r=>r.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((r,n)=>{let s=(this.options.cwd?I.relative(this.options.cwd,n):n)||Sc;e[s]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==M.ERROR&&this.emit(M.ALL,e,...r)}async _emit(e,r,n){if(this.closed)return;let i=this.options;Os&&(r=I.normalize(r)),i.cwd&&(r=I.relative(i.cwd,r));let s=[r];n!=null&&s.push(n);let o=i.awaitWriteFinish,a;if(o&&(a=this._pendingWrites.get(r)))return a.lastChange=new Date,this;if(i.atomic){if(e===M.UNLINK)return this._pendingUnlinks.set(r,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((l,c)=>{this.emit(...l),this.emit(M.ALL,...l),this._pendingUnlinks.delete(c)})},typeof i.atomic=="number"?i.atomic:100),this;e===M.ADD&&this._pendingUnlinks.has(r)&&(e=M.CHANGE,this._pendingUnlinks.delete(r))}if(o&&(e===M.ADD||e===M.CHANGE)&&this._readyEmitted){let l=(c,h)=>{c?(e=M.ERROR,s[0]=c,this.emitWithAll(e,s)):h&&(s.length>1?s[1]=h:s.push(h),this.emitWithAll(e,s))};return this._awaitWriteFinish(r,o.stabilityThreshold,e,l),this}if(e===M.CHANGE&&!this._throttle(M.CHANGE,r,50))return this;if(i.alwaysStat&&n===void 0&&(e===M.ADD||e===M.ADD_DIR||e===M.CHANGE)){let l=i.cwd?I.join(i.cwd,r):r,c;try{c=await I_(l)}catch{}if(!c||this.closed)return;s.push(c)}return this.emitWithAll(e,s),this}_handleError(e){let r=e&&e.code;return e&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")&&this.emit(M.ERROR,e),e||this.closed}_throttle(e,r,n){this._throttled.has(e)||this._throttled.set(e,new Map);let i=this._throttled.get(e);if(!i)throw new Error("invalid throttle");let s=i.get(r);if(s)return s.count++,!1;let o,a=()=>{let c=i.get(r),h=c?c.count:0;return i.delete(r),clearTimeout(o),c&&clearTimeout(c.timeoutObject),h};o=setTimeout(a,n);let l={timeoutObject:o,clear:a,count:0};return i.set(r,l),l}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,r,n,i){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let o=s.pollInterval,a,l=e;this.options.cwd&&!I.isAbsolute(e)&&(l=I.join(this.options.cwd,e));let c=new Date,h=this._pendingWrites;function u(f){P_(l,(p,m)=>{if(p||!h.has(e)){p&&p.code!=="ENOENT"&&i(p);return}let d=Number(new Date);f&&m.size!==f.size&&(h.get(e).lastChange=d);let _=h.get(e);d-_.lastChange>=r?(h.delete(e),i(void 0,m)):a=setTimeout(u,o,m)})}h.has(e)||(h.set(e,{lastChange:c,cancelWait:()=>(h.delete(e),clearTimeout(a),n)}),a=setTimeout(u,o))}_isIgnored(e,r){if(this.options.atomic&&M_.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(xc(n)),a=[...[...this._ignoredPaths].map(xc(n)),...s];this._userIgnored=j_(a,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new Rs(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=I.resolve(e);return this._watched.has(r)||this._watched.set(r,new Ls(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,n){let i=I.join(e,r),s=I.resolve(i);if(n=n??(this._watched.has(i)||this._watched.has(s)),!this._throttle("remove",i,100))return;!n&&this._watched.size===1&&this.add(e,r,!0),this._getWatchedDir(i).getChildren().forEach(f=>this._remove(i,f));let l=this._getWatchedDir(e),c=l.has(r);l.remove(r),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let h=i;if(this.options.cwd&&(h=I.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(h)&&this._pendingWrites.get(h).cancelWait()===M.ADD)return;this._watched.delete(i),this._watched.delete(s);let u=n?M.UNLINK_DIR:M.UNLINK;c&&!this._isIgnored(i)&&this._emit(u,i),this._closePath(i)}_closePath(e){this._closeFile(e);let r=I.dirname(e);this._getWatchedDir(r).remove(I.basename(e))}_closeFile(e){let r=this._closers.get(e);r&&(r.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,r){if(!r)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(r)}_readdirp(e,r){if(this.closed)return;let n={type:M.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},i=hc(e,n);return this._streams.add(i),i.once(mc,()=>{i=void 0}),i.once(ks,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};function z_(t,e={}){let r=new Tn(e);return r.add(t),r}var Cc={watch:z_,FSWatcher:Tn};import{tsImport as Em}from"tsx/esm/api";var Bc=yn(Mc(),1),{program:hC,createCommand:fC,createArgument:pC,createOption:dC,CommanderError:mC,InvalidArgumentError:gC,InvalidOptionArgumentError:_C,Command:qc,Argument:yC,Option:wC,Help:bC}=Bc.default;var Hc=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
|
|
123
|
+
cli_contracts: 0.1.0
|
|
124
|
+
|
|
125
|
+
info:
|
|
126
|
+
title: embedoc CLI
|
|
127
|
+
version: 0.14.1
|
|
128
|
+
description: >-
|
|
129
|
+
In-place document generator that auto-updates marker blocks in documents
|
|
130
|
+
and source code while preserving manually edited sections. Supports
|
|
131
|
+
multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable
|
|
132
|
+
TypeScript renderers, Handlebars file generation, and incremental builds
|
|
133
|
+
with dependency tracking.
|
|
134
|
+
license:
|
|
135
|
+
name: MIT
|
|
136
|
+
contact:
|
|
137
|
+
name: foo-ogawa
|
|
138
|
+
url: https://github.com/foo-ogawa/embedoc
|
|
139
|
+
|
|
140
|
+
artifact_slots:
|
|
141
|
+
config:
|
|
142
|
+
direction: read
|
|
143
|
+
description: embedoc.config.yaml configuration
|
|
144
|
+
documents:
|
|
145
|
+
direction: readwrite
|
|
146
|
+
description: Target documents with @embedoc marker blocks
|
|
147
|
+
templates:
|
|
148
|
+
direction: read
|
|
149
|
+
description: Handlebars templates for file generation
|
|
150
|
+
datasources:
|
|
151
|
+
direction: read
|
|
152
|
+
description: Datasource files (SQLite, CSV, JSON, YAML)
|
|
153
|
+
generated-files:
|
|
154
|
+
direction: write
|
|
155
|
+
description: Files generated by Handlebars templates
|
|
156
|
+
|
|
157
|
+
command_sets:
|
|
158
|
+
embedoc:
|
|
159
|
+
summary: In-place document generator with marker-based embedding.
|
|
160
|
+
executable: embedoc
|
|
161
|
+
|
|
162
|
+
global_options:
|
|
163
|
+
- name: version
|
|
164
|
+
aliases: [V]
|
|
165
|
+
description: Print version and exit.
|
|
166
|
+
schema:
|
|
167
|
+
type: boolean
|
|
168
|
+
|
|
169
|
+
- name: help
|
|
170
|
+
aliases: [h]
|
|
171
|
+
description: Show help and exit.
|
|
172
|
+
schema:
|
|
173
|
+
type: boolean
|
|
174
|
+
|
|
175
|
+
commands:
|
|
176
|
+
# \u2500\u2500 init \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
177
|
+
init:
|
|
178
|
+
summary: Initialize embedoc in the current project.
|
|
179
|
+
description: >-
|
|
180
|
+
Creates starter configuration and directory structure:
|
|
181
|
+
embedoc.config.yaml, .embedoc/renderers/index.ts,
|
|
182
|
+
.embedoc/datasources/index.ts, and .embedoc/templates/.
|
|
183
|
+
If package.json exists, adds embedoc:build, embedoc:watch,
|
|
184
|
+
and embedoc:generate npm scripts.
|
|
185
|
+
usage:
|
|
186
|
+
- embedoc init
|
|
187
|
+
- embedoc init --force
|
|
188
|
+
|
|
189
|
+
options:
|
|
190
|
+
- name: force
|
|
191
|
+
aliases: [f]
|
|
192
|
+
description: Overwrite existing files.
|
|
193
|
+
schema:
|
|
194
|
+
type: boolean
|
|
195
|
+
default: false
|
|
196
|
+
|
|
197
|
+
exits:
|
|
198
|
+
'0':
|
|
199
|
+
description: Initialization succeeded.
|
|
200
|
+
stdout:
|
|
201
|
+
format: text
|
|
202
|
+
files:
|
|
203
|
+
- path: embedoc.config.yaml
|
|
204
|
+
required: false
|
|
205
|
+
media_type: application/yaml
|
|
206
|
+
encoding: utf-8
|
|
207
|
+
description: Configuration file.
|
|
208
|
+
- path: .embedoc/renderers/index.ts
|
|
209
|
+
required: false
|
|
210
|
+
media_type: text/x-typescript
|
|
211
|
+
encoding: utf-8
|
|
212
|
+
description: Renderer registration file.
|
|
213
|
+
- path: .embedoc/datasources/index.ts
|
|
214
|
+
required: false
|
|
215
|
+
media_type: text/x-typescript
|
|
216
|
+
encoding: utf-8
|
|
217
|
+
description: Custom datasource registration file.
|
|
218
|
+
- path: .embedoc/templates/.gitkeep
|
|
219
|
+
required: false
|
|
220
|
+
description: Templates directory placeholder.
|
|
221
|
+
|
|
222
|
+
'1':
|
|
223
|
+
description: Initialization failed (write error).
|
|
224
|
+
stderr:
|
|
225
|
+
format: text
|
|
226
|
+
|
|
227
|
+
x-agent:
|
|
228
|
+
risk_level: low
|
|
229
|
+
requires_confirmation: false
|
|
230
|
+
idempotent: true
|
|
231
|
+
side_effects:
|
|
232
|
+
- file_write
|
|
233
|
+
- directory_create
|
|
234
|
+
|
|
235
|
+
# \u2500\u2500 build \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
236
|
+
build:
|
|
237
|
+
summary: Build documents by replacing markers with rendered content.
|
|
238
|
+
description: >-
|
|
239
|
+
Loads configuration, initializes datasources, loads TypeScript
|
|
240
|
+
renderers, and processes all target files (or specific files if
|
|
241
|
+
provided). Each @embedoc marker block is re-rendered and the
|
|
242
|
+
content between start/end markers is replaced in-place.
|
|
243
|
+
usage:
|
|
244
|
+
- embedoc build
|
|
245
|
+
- embedoc build --config embedoc.config.yaml
|
|
246
|
+
- embedoc build ./docs/tables/users.md
|
|
247
|
+
- embedoc build --dry-run --verbose
|
|
248
|
+
|
|
249
|
+
arguments:
|
|
250
|
+
- name: files
|
|
251
|
+
description: Specific file paths to process. If omitted, processes all targets from config.
|
|
252
|
+
schema:
|
|
253
|
+
type: array
|
|
254
|
+
items:
|
|
255
|
+
type: string
|
|
256
|
+
variadic: true
|
|
257
|
+
file:
|
|
258
|
+
mode: readWrite
|
|
259
|
+
exists: true
|
|
260
|
+
|
|
261
|
+
options:
|
|
262
|
+
- name: config
|
|
263
|
+
aliases: [c]
|
|
264
|
+
description: Path to config file (YAML or JSON).
|
|
265
|
+
value_name: path
|
|
266
|
+
schema:
|
|
267
|
+
type: string
|
|
268
|
+
default: embedoc.config.yaml
|
|
269
|
+
file:
|
|
270
|
+
mode: read
|
|
271
|
+
exists: true
|
|
272
|
+
media_type: application/yaml
|
|
273
|
+
encoding: utf-8
|
|
274
|
+
|
|
275
|
+
- name: dry-run
|
|
276
|
+
aliases: [d]
|
|
277
|
+
description: Preview changes without writing files.
|
|
278
|
+
schema:
|
|
279
|
+
type: boolean
|
|
280
|
+
default: false
|
|
281
|
+
|
|
282
|
+
- name: verbose
|
|
283
|
+
aliases: [v]
|
|
284
|
+
description: Enable verbose output.
|
|
285
|
+
schema:
|
|
286
|
+
type: boolean
|
|
287
|
+
default: false
|
|
288
|
+
|
|
289
|
+
exits:
|
|
290
|
+
'0':
|
|
291
|
+
description: Build succeeded. All markers were processed without errors.
|
|
292
|
+
stdout:
|
|
293
|
+
format: text
|
|
294
|
+
|
|
295
|
+
'1':
|
|
296
|
+
description: Build failed (config not found, datasource error, or marker processing error).
|
|
297
|
+
stderr:
|
|
298
|
+
format: text
|
|
299
|
+
|
|
300
|
+
x-agent:
|
|
301
|
+
risk_level: medium
|
|
302
|
+
requires_confirmation: false
|
|
303
|
+
idempotent: true
|
|
304
|
+
side_effects:
|
|
305
|
+
- file_write
|
|
306
|
+
safe_dry_run_option: --dry-run
|
|
307
|
+
recommended_before_use:
|
|
308
|
+
- Ensure embedoc.config.yaml exists (run init if needed).
|
|
309
|
+
- Verify datasource files are accessible.
|
|
310
|
+
|
|
311
|
+
# \u2500\u2500 generate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
312
|
+
generate:
|
|
313
|
+
summary: Generate new files from datasource records using Handlebars templates.
|
|
314
|
+
description: >-
|
|
315
|
+
Reads datasource records and generates new files using Handlebars
|
|
316
|
+
templates defined in the generators config. Requires either
|
|
317
|
+
--datasource to process a specific datasource or --all to process
|
|
318
|
+
all datasources that have generators configured. Optionally filter
|
|
319
|
+
by generator template name with --generator.
|
|
320
|
+
usage:
|
|
321
|
+
- embedoc generate --datasource tables
|
|
322
|
+
- embedoc generate --all
|
|
323
|
+
- embedoc generate --datasource tables --generator table_doc.hbs
|
|
324
|
+
- embedoc generate --all --dry-run --verbose
|
|
325
|
+
|
|
326
|
+
options:
|
|
327
|
+
- name: config
|
|
328
|
+
aliases: [c]
|
|
329
|
+
description: Path to config file (YAML or JSON).
|
|
330
|
+
value_name: path
|
|
331
|
+
schema:
|
|
332
|
+
type: string
|
|
333
|
+
default: embedoc.config.yaml
|
|
334
|
+
file:
|
|
335
|
+
mode: read
|
|
336
|
+
exists: true
|
|
337
|
+
media_type: application/yaml
|
|
338
|
+
encoding: utf-8
|
|
339
|
+
|
|
340
|
+
- name: datasource
|
|
341
|
+
aliases: [s]
|
|
342
|
+
description: Specific datasource to process.
|
|
343
|
+
value_name: name
|
|
344
|
+
schema:
|
|
345
|
+
type: string
|
|
346
|
+
|
|
347
|
+
- name: generator
|
|
348
|
+
aliases: [g]
|
|
349
|
+
description: Specific generator template to use.
|
|
350
|
+
value_name: name
|
|
351
|
+
schema:
|
|
352
|
+
type: string
|
|
353
|
+
|
|
354
|
+
- name: all
|
|
355
|
+
aliases: [a]
|
|
356
|
+
description: Process all datasources that have generators configured.
|
|
357
|
+
schema:
|
|
358
|
+
type: boolean
|
|
359
|
+
default: false
|
|
360
|
+
|
|
361
|
+
- name: dry-run
|
|
362
|
+
aliases: [d]
|
|
363
|
+
description: Preview generation without writing files.
|
|
364
|
+
schema:
|
|
365
|
+
type: boolean
|
|
366
|
+
default: false
|
|
367
|
+
|
|
368
|
+
- name: verbose
|
|
369
|
+
aliases: [v]
|
|
370
|
+
description: Enable verbose output.
|
|
371
|
+
schema:
|
|
372
|
+
type: boolean
|
|
373
|
+
default: false
|
|
374
|
+
|
|
375
|
+
exits:
|
|
376
|
+
'0':
|
|
377
|
+
description: Generation succeeded.
|
|
378
|
+
stdout:
|
|
379
|
+
format: text
|
|
380
|
+
|
|
381
|
+
'1':
|
|
382
|
+
description: >-
|
|
383
|
+
Generation failed (missing --datasource/--all, config not found,
|
|
384
|
+
datasource error, or template error).
|
|
385
|
+
stderr:
|
|
386
|
+
format: text
|
|
387
|
+
|
|
388
|
+
x-agent:
|
|
389
|
+
risk_level: medium
|
|
390
|
+
requires_confirmation: false
|
|
391
|
+
idempotent: true
|
|
392
|
+
side_effects:
|
|
393
|
+
- file_write
|
|
394
|
+
safe_dry_run_option: --dry-run
|
|
395
|
+
recommended_before_use:
|
|
396
|
+
- Ensure embedoc.config.yaml exists with generators configured.
|
|
397
|
+
- Verify datasource files are accessible.
|
|
398
|
+
- Ensure Handlebars templates exist in templates_dir.
|
|
399
|
+
|
|
400
|
+
# \u2500\u2500 watch \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
401
|
+
watch:
|
|
402
|
+
summary: Watch files and rebuild on changes with dependency tracking.
|
|
403
|
+
description: >-
|
|
404
|
+
Monitors target files, renderers, and datasource files for changes.
|
|
405
|
+
When a change is detected, rebuilds only affected documents using
|
|
406
|
+
the dependency graph. Renderer changes trigger a full renderer
|
|
407
|
+
reload and dependency graph rebuild. Runs until interrupted with
|
|
408
|
+
SIGINT (Ctrl+C).
|
|
409
|
+
usage:
|
|
410
|
+
- embedoc watch
|
|
411
|
+
- embedoc watch --config embedoc.config.yaml
|
|
412
|
+
- embedoc watch --verbose
|
|
413
|
+
- embedoc watch --debug-deps
|
|
414
|
+
|
|
415
|
+
options:
|
|
416
|
+
- name: config
|
|
417
|
+
aliases: [c]
|
|
418
|
+
description: Path to config file (YAML or JSON).
|
|
419
|
+
value_name: path
|
|
420
|
+
schema:
|
|
421
|
+
type: string
|
|
422
|
+
default: embedoc.config.yaml
|
|
423
|
+
file:
|
|
424
|
+
mode: read
|
|
425
|
+
exists: true
|
|
426
|
+
media_type: application/yaml
|
|
427
|
+
encoding: utf-8
|
|
428
|
+
|
|
429
|
+
- name: verbose
|
|
430
|
+
aliases: [v]
|
|
431
|
+
description: Enable verbose rebuild output.
|
|
432
|
+
schema:
|
|
433
|
+
type: boolean
|
|
434
|
+
default: false
|
|
435
|
+
|
|
436
|
+
- name: debug-deps
|
|
437
|
+
description: Print dependency graph at startup for debugging.
|
|
438
|
+
schema:
|
|
439
|
+
type: boolean
|
|
440
|
+
default: false
|
|
441
|
+
|
|
442
|
+
signals:
|
|
443
|
+
SIGINT:
|
|
444
|
+
description: Gracefully stops the watcher, closes datasources, and exits.
|
|
445
|
+
|
|
446
|
+
exits:
|
|
447
|
+
'0':
|
|
448
|
+
description: Watcher stopped gracefully (via SIGINT).
|
|
449
|
+
stdout:
|
|
450
|
+
format: text
|
|
451
|
+
|
|
452
|
+
'1':
|
|
453
|
+
description: Watch failed (config not found or initialization error).
|
|
454
|
+
stderr:
|
|
455
|
+
format: text
|
|
456
|
+
|
|
457
|
+
x-agent:
|
|
458
|
+
risk_level: medium
|
|
459
|
+
requires_confirmation: false
|
|
460
|
+
idempotent: true
|
|
461
|
+
side_effects:
|
|
462
|
+
- file_write
|
|
463
|
+
recommended_before_use:
|
|
464
|
+
- Ensure embedoc.config.yaml exists (run init if needed).
|
|
465
|
+
- Verify datasource files are accessible.
|
|
466
|
+
`,jc=`{
|
|
467
|
+
"cli_contracts": "0.1.0",
|
|
468
|
+
"info": {
|
|
469
|
+
"title": "embedoc CLI",
|
|
470
|
+
"version": "0.14.1",
|
|
471
|
+
"description": "In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.",
|
|
472
|
+
"license": {
|
|
473
|
+
"name": "MIT"
|
|
474
|
+
},
|
|
475
|
+
"contact": {
|
|
476
|
+
"name": "foo-ogawa",
|
|
477
|
+
"url": "https://github.com/foo-ogawa/embedoc"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"artifact_slots": {
|
|
481
|
+
"config": {
|
|
482
|
+
"direction": "read",
|
|
483
|
+
"description": "embedoc.config.yaml configuration"
|
|
484
|
+
},
|
|
485
|
+
"documents": {
|
|
486
|
+
"direction": "readwrite",
|
|
487
|
+
"description": "Target documents with @embedoc marker blocks"
|
|
488
|
+
},
|
|
489
|
+
"templates": {
|
|
490
|
+
"direction": "read",
|
|
491
|
+
"description": "Handlebars templates for file generation"
|
|
492
|
+
},
|
|
493
|
+
"datasources": {
|
|
494
|
+
"direction": "read",
|
|
495
|
+
"description": "Datasource files (SQLite, CSV, JSON, YAML)"
|
|
496
|
+
},
|
|
497
|
+
"generated-files": {
|
|
498
|
+
"direction": "write",
|
|
499
|
+
"description": "Files generated by Handlebars templates"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"command_sets": {
|
|
503
|
+
"embedoc": {
|
|
504
|
+
"summary": "In-place document generator with marker-based embedding.",
|
|
505
|
+
"executable": "embedoc",
|
|
506
|
+
"global_options": [
|
|
507
|
+
{
|
|
508
|
+
"name": "version",
|
|
509
|
+
"aliases": [
|
|
510
|
+
"V"
|
|
511
|
+
],
|
|
512
|
+
"description": "Print version and exit.",
|
|
513
|
+
"schema": {
|
|
514
|
+
"type": "boolean"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "help",
|
|
519
|
+
"aliases": [
|
|
520
|
+
"h"
|
|
521
|
+
],
|
|
522
|
+
"description": "Show help and exit.",
|
|
523
|
+
"schema": {
|
|
524
|
+
"type": "boolean"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"commands": {
|
|
529
|
+
"init": {
|
|
530
|
+
"summary": "Initialize embedoc in the current project.",
|
|
531
|
+
"description": "Creates starter configuration and directory structure: embedoc.config.yaml, .embedoc/renderers/index.ts, .embedoc/datasources/index.ts, and .embedoc/templates/. If package.json exists, adds embedoc:build, embedoc:watch, and embedoc:generate npm scripts.",
|
|
532
|
+
"usage": [
|
|
533
|
+
"embedoc init",
|
|
534
|
+
"embedoc init --force"
|
|
535
|
+
],
|
|
536
|
+
"options": [
|
|
537
|
+
{
|
|
538
|
+
"name": "force",
|
|
539
|
+
"aliases": [
|
|
540
|
+
"f"
|
|
541
|
+
],
|
|
542
|
+
"description": "Overwrite existing files.",
|
|
543
|
+
"schema": {
|
|
544
|
+
"type": "boolean",
|
|
545
|
+
"default": false
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"exits": {
|
|
550
|
+
"0": {
|
|
551
|
+
"description": "Initialization succeeded.",
|
|
552
|
+
"stdout": {
|
|
553
|
+
"format": "text"
|
|
554
|
+
},
|
|
555
|
+
"files": [
|
|
556
|
+
{
|
|
557
|
+
"path": "embedoc.config.yaml",
|
|
558
|
+
"required": false,
|
|
559
|
+
"media_type": "application/yaml",
|
|
560
|
+
"encoding": "utf-8",
|
|
561
|
+
"description": "Configuration file."
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"path": ".embedoc/renderers/index.ts",
|
|
565
|
+
"required": false,
|
|
566
|
+
"media_type": "text/x-typescript",
|
|
567
|
+
"encoding": "utf-8",
|
|
568
|
+
"description": "Renderer registration file."
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"path": ".embedoc/datasources/index.ts",
|
|
572
|
+
"required": false,
|
|
573
|
+
"media_type": "text/x-typescript",
|
|
574
|
+
"encoding": "utf-8",
|
|
575
|
+
"description": "Custom datasource registration file."
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"path": ".embedoc/templates/.gitkeep",
|
|
579
|
+
"required": false,
|
|
580
|
+
"description": "Templates directory placeholder."
|
|
581
|
+
}
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
"1": {
|
|
585
|
+
"description": "Initialization failed (write error).",
|
|
586
|
+
"stderr": {
|
|
587
|
+
"format": "text"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"x-agent": {
|
|
592
|
+
"risk_level": "low",
|
|
593
|
+
"requires_confirmation": false,
|
|
594
|
+
"idempotent": true,
|
|
595
|
+
"side_effects": [
|
|
596
|
+
"file_write",
|
|
597
|
+
"directory_create"
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"build": {
|
|
602
|
+
"summary": "Build documents by replacing markers with rendered content.",
|
|
603
|
+
"description": "Loads configuration, initializes datasources, loads TypeScript renderers, and processes all target files (or specific files if provided). Each @embedoc marker block is re-rendered and the content between start/end markers is replaced in-place.",
|
|
604
|
+
"usage": [
|
|
605
|
+
"embedoc build",
|
|
606
|
+
"embedoc build --config embedoc.config.yaml",
|
|
607
|
+
"embedoc build ./docs/tables/users.md",
|
|
608
|
+
"embedoc build --dry-run --verbose"
|
|
609
|
+
],
|
|
610
|
+
"arguments": [
|
|
611
|
+
{
|
|
612
|
+
"name": "files",
|
|
613
|
+
"description": "Specific file paths to process. If omitted, processes all targets from config.",
|
|
614
|
+
"schema": {
|
|
615
|
+
"type": "array",
|
|
616
|
+
"items": {
|
|
617
|
+
"type": "string"
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
"variadic": true,
|
|
621
|
+
"file": {
|
|
622
|
+
"mode": "readWrite",
|
|
623
|
+
"exists": true
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
"options": [
|
|
628
|
+
{
|
|
629
|
+
"name": "config",
|
|
630
|
+
"aliases": [
|
|
631
|
+
"c"
|
|
632
|
+
],
|
|
633
|
+
"description": "Path to config file (YAML or JSON).",
|
|
634
|
+
"value_name": "path",
|
|
635
|
+
"schema": {
|
|
636
|
+
"type": "string",
|
|
637
|
+
"default": "embedoc.config.yaml"
|
|
638
|
+
},
|
|
639
|
+
"file": {
|
|
640
|
+
"mode": "read",
|
|
641
|
+
"exists": true,
|
|
642
|
+
"media_type": "application/yaml",
|
|
643
|
+
"encoding": "utf-8"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"name": "dry-run",
|
|
648
|
+
"aliases": [
|
|
649
|
+
"d"
|
|
650
|
+
],
|
|
651
|
+
"description": "Preview changes without writing files.",
|
|
652
|
+
"schema": {
|
|
653
|
+
"type": "boolean",
|
|
654
|
+
"default": false
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "verbose",
|
|
659
|
+
"aliases": [
|
|
660
|
+
"v"
|
|
661
|
+
],
|
|
662
|
+
"description": "Enable verbose output.",
|
|
663
|
+
"schema": {
|
|
664
|
+
"type": "boolean",
|
|
665
|
+
"default": false
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
"exits": {
|
|
670
|
+
"0": {
|
|
671
|
+
"description": "Build succeeded. All markers were processed without errors.",
|
|
672
|
+
"stdout": {
|
|
673
|
+
"format": "text"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"1": {
|
|
677
|
+
"description": "Build failed (config not found, datasource error, or marker processing error).",
|
|
678
|
+
"stderr": {
|
|
679
|
+
"format": "text"
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
"x-agent": {
|
|
684
|
+
"risk_level": "medium",
|
|
685
|
+
"requires_confirmation": false,
|
|
686
|
+
"idempotent": true,
|
|
687
|
+
"side_effects": [
|
|
688
|
+
"file_write"
|
|
689
|
+
],
|
|
690
|
+
"safe_dry_run_option": "--dry-run",
|
|
691
|
+
"recommended_before_use": [
|
|
692
|
+
"Ensure embedoc.config.yaml exists (run init if needed).",
|
|
693
|
+
"Verify datasource files are accessible."
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"generate": {
|
|
698
|
+
"summary": "Generate new files from datasource records using Handlebars templates.",
|
|
699
|
+
"description": "Reads datasource records and generates new files using Handlebars templates defined in the generators config. Requires either --datasource to process a specific datasource or --all to process all datasources that have generators configured. Optionally filter by generator template name with --generator.",
|
|
700
|
+
"usage": [
|
|
701
|
+
"embedoc generate --datasource tables",
|
|
702
|
+
"embedoc generate --all",
|
|
703
|
+
"embedoc generate --datasource tables --generator table_doc.hbs",
|
|
704
|
+
"embedoc generate --all --dry-run --verbose"
|
|
705
|
+
],
|
|
706
|
+
"options": [
|
|
707
|
+
{
|
|
708
|
+
"name": "config",
|
|
709
|
+
"aliases": [
|
|
710
|
+
"c"
|
|
711
|
+
],
|
|
712
|
+
"description": "Path to config file (YAML or JSON).",
|
|
713
|
+
"value_name": "path",
|
|
714
|
+
"schema": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"default": "embedoc.config.yaml"
|
|
717
|
+
},
|
|
718
|
+
"file": {
|
|
719
|
+
"mode": "read",
|
|
720
|
+
"exists": true,
|
|
721
|
+
"media_type": "application/yaml",
|
|
722
|
+
"encoding": "utf-8"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "datasource",
|
|
727
|
+
"aliases": [
|
|
728
|
+
"s"
|
|
729
|
+
],
|
|
730
|
+
"description": "Specific datasource to process.",
|
|
731
|
+
"value_name": "name",
|
|
732
|
+
"schema": {
|
|
733
|
+
"type": "string"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "generator",
|
|
738
|
+
"aliases": [
|
|
739
|
+
"g"
|
|
740
|
+
],
|
|
741
|
+
"description": "Specific generator template to use.",
|
|
742
|
+
"value_name": "name",
|
|
743
|
+
"schema": {
|
|
744
|
+
"type": "string"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"name": "all",
|
|
749
|
+
"aliases": [
|
|
750
|
+
"a"
|
|
751
|
+
],
|
|
752
|
+
"description": "Process all datasources that have generators configured.",
|
|
753
|
+
"schema": {
|
|
754
|
+
"type": "boolean",
|
|
755
|
+
"default": false
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "dry-run",
|
|
760
|
+
"aliases": [
|
|
761
|
+
"d"
|
|
762
|
+
],
|
|
763
|
+
"description": "Preview generation without writing files.",
|
|
764
|
+
"schema": {
|
|
765
|
+
"type": "boolean",
|
|
766
|
+
"default": false
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "verbose",
|
|
771
|
+
"aliases": [
|
|
772
|
+
"v"
|
|
773
|
+
],
|
|
774
|
+
"description": "Enable verbose output.",
|
|
775
|
+
"schema": {
|
|
776
|
+
"type": "boolean",
|
|
777
|
+
"default": false
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
],
|
|
781
|
+
"exits": {
|
|
782
|
+
"0": {
|
|
783
|
+
"description": "Generation succeeded.",
|
|
784
|
+
"stdout": {
|
|
785
|
+
"format": "text"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"1": {
|
|
789
|
+
"description": "Generation failed (missing --datasource/--all, config not found, datasource error, or template error).",
|
|
790
|
+
"stderr": {
|
|
791
|
+
"format": "text"
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
"x-agent": {
|
|
796
|
+
"risk_level": "medium",
|
|
797
|
+
"requires_confirmation": false,
|
|
798
|
+
"idempotent": true,
|
|
799
|
+
"side_effects": [
|
|
800
|
+
"file_write"
|
|
801
|
+
],
|
|
802
|
+
"safe_dry_run_option": "--dry-run",
|
|
803
|
+
"recommended_before_use": [
|
|
804
|
+
"Ensure embedoc.config.yaml exists with generators configured.",
|
|
805
|
+
"Verify datasource files are accessible.",
|
|
806
|
+
"Ensure Handlebars templates exist in templates_dir."
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
"watch": {
|
|
811
|
+
"summary": "Watch files and rebuild on changes with dependency tracking.",
|
|
812
|
+
"description": "Monitors target files, renderers, and datasource files for changes. When a change is detected, rebuilds only affected documents using the dependency graph. Renderer changes trigger a full renderer reload and dependency graph rebuild. Runs until interrupted with SIGINT (Ctrl+C).",
|
|
813
|
+
"usage": [
|
|
814
|
+
"embedoc watch",
|
|
815
|
+
"embedoc watch --config embedoc.config.yaml",
|
|
816
|
+
"embedoc watch --verbose",
|
|
817
|
+
"embedoc watch --debug-deps"
|
|
818
|
+
],
|
|
819
|
+
"options": [
|
|
820
|
+
{
|
|
821
|
+
"name": "config",
|
|
822
|
+
"aliases": [
|
|
823
|
+
"c"
|
|
824
|
+
],
|
|
825
|
+
"description": "Path to config file (YAML or JSON).",
|
|
826
|
+
"value_name": "path",
|
|
827
|
+
"schema": {
|
|
828
|
+
"type": "string",
|
|
829
|
+
"default": "embedoc.config.yaml"
|
|
830
|
+
},
|
|
831
|
+
"file": {
|
|
832
|
+
"mode": "read",
|
|
833
|
+
"exists": true,
|
|
834
|
+
"media_type": "application/yaml",
|
|
835
|
+
"encoding": "utf-8"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "verbose",
|
|
840
|
+
"aliases": [
|
|
841
|
+
"v"
|
|
842
|
+
],
|
|
843
|
+
"description": "Enable verbose rebuild output.",
|
|
844
|
+
"schema": {
|
|
845
|
+
"type": "boolean",
|
|
846
|
+
"default": false
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "debug-deps",
|
|
851
|
+
"description": "Print dependency graph at startup for debugging.",
|
|
852
|
+
"schema": {
|
|
853
|
+
"type": "boolean",
|
|
854
|
+
"default": false
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
"signals": {
|
|
859
|
+
"SIGINT": {
|
|
860
|
+
"description": "Gracefully stops the watcher, closes datasources, and exits."
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"exits": {
|
|
864
|
+
"0": {
|
|
865
|
+
"description": "Watcher stopped gracefully (via SIGINT).",
|
|
866
|
+
"stdout": {
|
|
867
|
+
"format": "text"
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"1": {
|
|
871
|
+
"description": "Watch failed (config not found or initialization error).",
|
|
872
|
+
"stderr": {
|
|
873
|
+
"format": "text"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"x-agent": {
|
|
878
|
+
"risk_level": "medium",
|
|
879
|
+
"requires_confirmation": false,
|
|
880
|
+
"idempotent": true,
|
|
881
|
+
"side_effects": [
|
|
882
|
+
"file_write"
|
|
883
|
+
],
|
|
884
|
+
"recommended_before_use": [
|
|
885
|
+
"Ensure embedoc.config.yaml exists (run init if needed).",
|
|
886
|
+
"Verify datasource files are accessible."
|
|
887
|
+
]
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}`;function Wc(t,e){let r=new qc;return r.name("embedoc").version(e,"-V, --version").description("In-place document generator with marker-based embedding."),r.command("init").description("Initialize embedoc in the current project.").option("-f, --force","Overwrite existing files.",!1).action(async(n,i)=>{await t.init(n,i.optsWithGlobals())}),r.command("build").description("Build documents by replacing markers with rendered content.").argument("[files...]","Specific file paths to process. If omitted, processes all targets from config.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-d, --dry-run","Preview changes without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,i,s)=>{await t.build(n,i,s.optsWithGlobals())}),r.command("generate").description("Generate new files from datasource records using Handlebars templates.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-s, --datasource <name>","Specific datasource to process.").option("-g, --generator <name>","Specific generator template to use.").option("-a, --all","Process all datasources that have generators configured.",!1).option("-d, --dry-run","Preview generation without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,i)=>{await t.generate(n,i.optsWithGlobals())}),r.command("watch").description("Watch files and rebuild on changes with dependency tracking.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-v, --verbose","Enable verbose rebuild output.",!1).option("--debug-deps","Print dependency graph at startup for debugging.",!1).action(async(n,i)=>{await t.watch(n,i.optsWithGlobals())}),r.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(n,i,s)=>{n.length===0&&!i.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
|
|
894
|
+
`),process.exit(2));let o=i.format||"yaml",a=JSON.parse(jc),l=i.all?[]:n;if(l.length===0)if(o==="json"){let c={};i.includeMeta&&(c._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:a.cli_contracts??"0.1.0",commands:["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"]}),Object.assign(c,a),process.stdout.write(JSON.stringify(c,null,2)+`
|
|
895
|
+
`)}else{let c=[];if(c.push("# embedoc extract"),c.push("# source: embedded"),c.push("# type: cli-contracts/command-extract"),i.includeMeta){c.push("---"),c.push("source: embedded"),c.push("type: cli-contracts/command-extract"),c.push("extractedAt: "+new Date().toISOString()),c.push("spec_version: "+(a.cli_contracts??"0.1.0")),c.push("commands:");for(let h of["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"])c.push(" - "+h)}c.push("---"),c.push(Hc),process.stdout.write(c.join(`
|
|
896
|
+
`)+`
|
|
897
|
+
`)}else{let c={cli_contracts:a.cli_contracts,info:a.info,command_sets:{}},h=c.command_sets;for(let[u,f]of Object.entries(a.command_sets??{})){let p=f.commands;if(!p)continue;let m={};for(let[d,_]of Object.entries(p)){let g=u+"."+d;l.some(y=>y===d||y===g||d.startsWith(y+"."))&&(m[d]=_)}if(Object.keys(m).length>0){let d={...f};d.commands=m,h[u]=d}}a.components&&(c.components=a.components),process.stdout.write(JSON.stringify(c,null,2)+`
|
|
898
|
+
`)}process.exit(0)}),r}import ly from"better-sqlite3";var Bn=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');this.db=new ly(e.path,{readonly:!0}),this.queryString=e.query}async query(e,r=[]){try{return this.db.prepare(e).all(...r)}catch(n){let i=n instanceof Error?n.message:String(n);throw new Error(`SQLite query failed: ${i}`)}}async getAll(){if(!this.queryString)throw new Error("No query defined for this datasource. Use query() method instead.");return this.query(this.queryString)}async close(){this.db.close()}};function Ks(t){return new Bn(t)}import{readFile as gy}from"node:fs/promises";var L=class t extends Error{constructor(e,r,n,...i){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let s of i)for(let o in s){let a=s[o];this[o]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var Uc=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var qn=function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let i=t[r];if(i==null||i===!1)e[r]={disabled:!0};else if(typeof i=="string")e[r]={name:i};else if(Uc(i)){if(typeof i.name!="string")throw new L("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${r}`,"when column is an object literal"]);e[r]=i}else throw new L("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${r}`])}return e};var Qs=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},Xs=Qs;var cy=12,uy=13,hy=10,fy=32,py=9,Vc=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new Xs(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new Xs(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([uy],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([hy],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([cy],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([fy],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([py],"utf8").toString(),t.encoding)]}};var Gc=function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})};var Zs=function(t){let e={};for(let n in t)e[Gc(n)]=t[n];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new L("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new L("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new L("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(n){let i=Date.parse(n);return isNaN(i)?n:new Date(i)};else if(typeof e.cast_date!="function")throw new L("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=qn(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new L("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new L("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new L("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new L("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new L("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let r=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new L("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);if(e.delimiter=e.delimiter.map(function(n){if(n==null||n===!1)return Buffer.from(",",e.encoding);if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new L("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);return n}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new L("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new L("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new L("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(n,i){if(typeof n!="string"&&!Buffer.isBuffer(n))throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(n)}`],e);if(n.length===0)throw new L("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(n)}`],e);return typeof n=="string"&&(n=Buffer.from(n,e.encoding)),n}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e};var zc=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},dy=13,my=10,Vt={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},$c=function(t={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=Zs(t);return{info:e,original_options:t,options:r,state:Vc(r),__needMoreData:function(n,i,s){if(s)return!1;let{encoding:o,escape:a,quote:l}=this.options,{quoting:c,needMoreDataSize:h,recordDelimiterMaxLength:u}=this.state,f=i-n-1,p=Math.max(h,u===0?Buffer.from(`\r
|
|
899
|
+
`,o).length:u,c?(a===null?0:a.length)+l.length:0,c?l.length+u:0);return f<p},parse:function(n,i,s,o){let{bom:a,comment_no_infix:l,encoding:c,from_line:h,ltrim:u,max_record_size:f,raw:p,relax_quotes:m,rtrim:d,skip_empty_lines:_,to:g,to_line:y}=this.options,{comment:b,escape:v,quote:S,record_delimiter:k}=this.options,{bomSkipped:R,previousBuf:me,rawBuffer:ge,escapeIsQuote:Q}=this.state,P;if(me===void 0)if(n===void 0){o();return}else P=n;else me!==void 0&&n===void 0?P=me:P=Buffer.concat([me,n]);if(R===!1)if(a===!1)this.state.bomSkipped=!0;else if(P.length<3){if(i===!1){this.state.previousBuf=P;return}}else{for(let T in Vt)if(Vt[T].compare(P,0,Vt[T].length)===0){let Ae=Vt[T].length;this.state.bufBytesStart+=Ae,P=P.slice(Ae),this.options=Zs({...this.original_options,encoding:T}),{comment:b,escape:v,quote:S}=this.options;break}this.state.bomSkipped=!0}let le=P.length,O;for(O=0;O<le&&!this.__needMoreData(O,le,i);O++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),y!==-1&&this.info.lines>y){this.state.stop=!0,o();return}this.state.quoting===!1&&k.length===0&&this.__autoDiscoverRecordDelimiter(P,O)&&(k=this.options.record_delimiter);let T=P[O];if(p===!0&&ge.append(T),(T===dy||T===my)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(v!==null&&this.state.quoting===!0&&this.__isEscape(P,O,T)&&O+v.length<le)if(Q){if(this.__isQuote(P,O+v.length)){this.state.escaping=!0,O+=v.length-1;continue}}else{this.state.escaping=!0,O+=v.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(P,O))if(this.state.quoting===!0){let te=P[O+S.length],mt=d&&this.__isCharTrimable(P,O+S.length),Ye=b!==null&&this.__compareBytes(b,P,O+S.length,te),gt=this.__isDelimiter(P,O+S.length,te),_n=k.length===0?this.__autoDiscoverRecordDelimiter(P,O+S.length):this.__isRecordDelimiter(te,P,O+S.length);if(v!==null&&this.__isEscape(P,O,T)&&this.__isQuote(P,O+v.length))O+=v.length-1;else if(!te||gt||_n||Ye||mt){this.state.quoting=!1,this.state.wasQuoting=!0,O+=S.length-1;continue}else if(m===!1){let Xa=this.__error(new L("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(te)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Xa!==void 0)return Xa}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(S),O+=S.length-1}else if(this.state.field.length!==0){if(m===!1){let te=this.__infoField(),mt=Object.keys(Vt).map(gt=>Vt[gt].equals(this.state.field.toString())?gt:!1).filter(Boolean)[0],Ye=this.__error(new L("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(te.column)} at line ${te.lines}, value is ${JSON.stringify(this.state.field.toString(c))}`,mt?`(${mt} bom)`:void 0],this.options,te,{field:this.state.field}));if(Ye!==void 0)return Ye}}else{this.state.quoting=!0,O+=S.length-1;continue}if(this.state.quoting===!1){let te=this.__isRecordDelimiter(T,P,O);if(te!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=h){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),O+=te-1;continue}if(_===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,O+=te-1;continue}this.info.bytes=this.state.bufBytesStart+O;let gt=this.__onField();if(gt!==void 0)return gt;this.info.bytes=this.state.bufBytesStart+O+te;let _n=this.__onRecord(s);if(_n!==void 0)return _n;if(g!==-1&&this.info.records>=g){this.state.stop=!0,o();return}}this.state.commenting=!1,O+=te-1;continue}if(this.state.commenting)continue;if(b!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(b,P,O,T)!==0){this.state.commenting=!0;continue}let mt=this.__isDelimiter(P,O,T);if(mt!==0){this.info.bytes=this.state.bufBytesStart+O;let Ye=this.__onField();if(Ye!==void 0)return Ye;O+=mt-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new L("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Ae=u===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(P,O),ke=d===!1||this.state.wasQuoting===!1;if(Ae===!0&&ke===!0)this.state.field.append(T);else{if(d===!0&&!this.__isCharTrimable(P,O))return this.__error(new L("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));Ae===!1&&(O+=this.__isCharTrimable(P,O)-1);continue}}if(i===!0)if(this.state.quoting===!0){let T=this.__error(new L("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(T!==void 0)return T}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+O;let T=this.__onField();if(T!==void 0)return T;let Ae=this.__onRecord(s);if(Ae!==void 0)return Ae}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=O,this.state.previousBuf=P.slice(O);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(n){let{columns:i,group_columns_by_name:s,encoding:o,info:a,from:l,relax_column_count:c,relax_column_count_less:h,relax_column_count_more:u,raw:f,skip_records_with_empty_values:p}=this.options,{enabled:m,record:d}=this.state;if(m===!1)return this.__resetRecord();let _=d.length;if(i===!0){if(p===!0&&zc(d)){this.__resetRecord();return}return this.__firstLineToColumns(d)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=_),_!==this.state.expectedRecordLength){let g=i===!1?new L("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${_} on line ${this.info.lines}`],this.options,this.__infoField(),{record:d}):new L("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${_} on line ${this.info.lines}`],this.options,this.__infoField(),{record:d});if(c===!0||h===!0&&_<this.state.expectedRecordLength||u===!0&&_>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=g;else{let y=this.__error(g);if(y)return y}}if(p===!0&&zc(d)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,l===1||this.info.records>=l){let{objname:g}=this.options;if(i!==!1){let y={};for(let b=0,v=d.length;b<v;b++)i[b]===void 0||i[b].disabled||(s===!0&&y[i[b].name]!==void 0?Array.isArray(y[i[b].name])?y[i[b].name]=y[i[b].name].concat(d[b]):y[i[b].name]=[y[i[b].name],d[b]]:y[i[b].name]=d[b]);if(f===!0||a===!0){let b=Object.assign({record:y},f===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),v=this.__push(g===void 0?b:[y[g],b],n);if(v)return v}else{let b=this.__push(g===void 0?y:[y[g],y],n);if(b)return b}}else if(f===!0||a===!0){let y=Object.assign({record:d},f===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),b=this.__push(g===void 0?y:[d[g],y],n);if(b)return b}else{let y=this.__push(g===void 0?d:[d[g],d],n);if(y)return y}}this.__resetRecord()},__firstLineToColumns:function(n){let{firstLineToHeaders:i}=this.state;try{let s=i===void 0?n:i.call(null,n);if(!Array.isArray(s))return this.__error(new L("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));let o=qn(s);this.state.expectedRecordLength=o.length,this.options.columns=o,this.__resetRecord();return}catch(s){return s}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:n,encoding:i,rtrim:s,max_record_size:o}=this.options,{enabled:a,wasQuoting:l}=this.state;if(a===!1)return this.__resetField();let c=this.state.field.toString(i);if(s===!0&&l===!1&&(c=c.trimRight()),n===!0){let[h,u]=this.__cast(c);if(h!==void 0)return h;c=u}this.state.record.push(c),o!==0&&typeof c=="string"&&(this.state.record_length+=c.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(n,i){let{on_record:s}=this.options;if(s!==void 0){let o=this.__infoRecord();try{n=s.call(null,n,o)}catch(a){return a}if(n==null)return}i(n)},__cast:function(n){let{columns:i,relax_column_count:s}=this.options;if(Array.isArray(i)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let a=this.__infoField();return[void 0,this.state.castField.call(null,n,a)]}catch(a){return[a]}if(this.__isFloat(n))return[void 0,parseFloat(n)];if(this.options.cast_date!==!1){let a=this.__infoField();return[void 0,this.options.cast_date.call(null,n,a)]}return[void 0,n]},__isCharTrimable:function(n,i){return((o,a)=>{let{timchars:l}=this.state;e:for(let c=0;c<l.length;c++){let h=l[c];for(let u=0;u<h.length;u++)if(h[u]!==o[a+u])continue e;return h.length}return 0})(n,i)},__isFloat:function(n){return n-parseFloat(n)+1>=0},__compareBytes:function(n,i,s,o){if(n[0]!==o)return 0;let a=n.length;for(let l=1;l<a;l++)if(n[l]!==i[s+l])return 0;return a},__isDelimiter:function(n,i,s){let{delimiter:o,ignore_last_delimiters:a}=this.options;if(a===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(a!==!1&&typeof a=="number"&&this.state.record.length===a-1)return 0;e:for(let l=0;l<o.length;l++){let c=o[l];if(c[0]===s){for(let h=1;h<c.length;h++)if(c[h]!==n[i+h])continue e;return c.length}}return 0},__isRecordDelimiter:function(n,i,s){let{record_delimiter:o}=this.options,a=o.length;e:for(let l=0;l<a;l++){let c=o[l],h=c.length;if(c[0]===n){for(let u=1;u<h;u++)if(c[u]!==i[s+u])continue e;return c.length}}return 0},__isEscape:function(n,i,s){let{escape:o}=this.options;if(o===null)return!1;let a=o.length;if(o[0]===s){for(let l=0;l<a;l++)if(o[l]!==n[i+l])return!1;return!0}return!1},__isQuote:function(n,i){let{quote:s}=this.options;if(s===null)return!1;let o=s.length;for(let a=0;a<o;a++)if(s[a]!==n[i+a])return!1;return!0},__autoDiscoverRecordDelimiter:function(n,i){let{encoding:s}=this.options,o=[Buffer.from(`\r
|
|
900
|
+
`,s),Buffer.from(`
|
|
901
|
+
`,s),Buffer.from("\r",s)];e:for(let a=0;a<o.length;a++){let l=o[a].length;for(let c=0;c<l;c++)if(o[a][c]!==n[i+c])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(n){let{encoding:i,raw:s,skip_records_with_error:o}=this.options,a=typeof n=="string"?new Error(n):n;if(o){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(a,s?this.state.rawBuffer.toString(i):void 0);return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:n===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:n}=this.options,i=Array.isArray(n);return{...this.__infoRecord(),column:i===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Yc=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],n=$c(e),i=l=>{n.options.objname===void 0?r.push(l):r[l[0]]=l[1]},s=()=>{},o=n.parse(t,!1,i,s);if(o!==void 0)throw o;let a=n.parse(void 0,!0,i,s);if(a!==void 0)throw a;return r};var Hn=class{type="csv";data=null;filePath;encoding;constructor(e){if(!e.path)throw new Error('CSV datasource requires "path" configuration');this.filePath=e.path,this.encoding=e.encoding??"utf-8"}async loadData(){if(this.data!==null)return this.data;let e=await gy(this.filePath,{encoding:this.encoding}),r=Yc(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=r,this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>String(a[s??""])===String(o))}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function eo(t){return new Hn(t)}import{readFile as _y}from"node:fs/promises";var jn=class{type="json";data=null;filePath;constructor(e){if(!e.path)throw new Error('JSON datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await _y(this.filePath,{encoding:"utf-8"}),r=JSON.parse(e);if(Array.isArray(r))this.data=r;else if(typeof r=="object"&&r!==null)this.data=[r];else throw new Error("JSON file must contain an array or object");return this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function to(t){return new jn(t)}import{readFile as yy}from"node:fs/promises";var Wn=class{type="yaml";data=null;filePath;constructor(e){if(!e.path)throw new Error('YAML datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await yy(this.filePath,{encoding:"utf-8"}),r=wt.load(e);if(Array.isArray(r))this.data=r;else if(typeof r=="object"&&r!==null)this.data=[r];else throw new Error("YAML file must contain an array or object");return this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function ro(t){return new Wn(t)}Gr();import{stat as ab}from"node:fs/promises";import{basename as Qu,dirname as lb,extname as cb}from"node:path";var ai=class{type="glob";data=null;pattern;constructor(e){if(!e.pattern)throw new Error('Glob datasource requires "pattern" configuration');this.pattern=e.pattern}async loadData(){if(this.data!==null)return this.data;let e=await Ze(this.pattern,{nodir:!0}),r=[];for(let n of e)try{let i=await ab(n),s=cb(n);r.push({path:n,name:Qu(n),basename:Qu(n,s),ext:s.slice(1),dir:lb(n),size:i.size,mtime:i.mtime.toISOString()})}catch{continue}return this.data=r,this.data}async query(e,r=[]){let n=await this.loadData(),i=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(i&&r.length>0){let s=i[1],o=r[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function To(t){return new ai(t)}async function ub(t,e){if(e&&t.type in e)return e[t.type].create(t);switch(t.type){case"sqlite":return Ks(t);case"csv":return eo(t);case"json":return to(t);case"yaml":return ro(t);case"glob":return To(t);default:throw new Error(`Unknown datasource type: "${t.type}". Register custom types in datasources_dir.`)}}async function zr(t,e){let r={};if(t.datasources)for(let[n,i]of Object.entries(t.datasources))r[n]=await ub(i,e);return r}async function $r(t){for(let e of Object.values(t))await e.close()}Gr();import{readFile as O1,writeFile as P1}from"node:fs/promises";var wp=yn(_p(),1),x1={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function bp(t){let e={},r=/(\w+)=["']([^"']*)["']/g,n;for(;(n=r.exec(t))!==null;){let i=n[1],s=n[2];i&&s!==void 0&&(e[i]=s)}return e}function bi(t){let e=(0,wp.default)(t),r="";Object.keys(e.data).length>0&&e.matter&&(r=`---
|
|
902
|
+
${e.matter.trim()}
|
|
903
|
+
---
|
|
904
|
+
`);let n=e.content.replace(/^\n+/,"");return{data:e.data,content:n,raw:r}}function vi(t,e){let r=[],{start:n,end:i}=e,s=wi(n),o=i?wi(i):"",a;i?a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${o}`,"g"):a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let l;i?l=new RegExp(`${s}\\s*@embedoc:end\\s*${o}`):l=new RegExp(`${s}\\s*@embedoc:end\\s*$`,"m");let c;for(;(c=a.exec(t))!==null;){let h=c.index,u=c[0],f=c[1],p=c[2]?.trim()??"",m=h+u.length,d=t.slice(m),_=l.exec(d);if(_){let g=_[0],y=m+_.index+g.length,b=d.slice(0,_.index);f&&r.push({startIndex:h,endIndex:y,templateName:f,params:bp(p),existingContent:b,startMarkerLine:u,endMarkerLine:g})}}return r}function xi(t,e){let n={...x1,...e}[t];if(!n)throw new Error(`Unknown comment style: ${t}`);return n}function yp(t,e){return t.slice(0,e).split(`
|
|
905
|
+
`).length}function vp(t,e){let r=[],{start:n,end:i}=e,s=wi(n),o=i?wi(i):"",a,l;i?(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*${o})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${o}`,"g"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*${o}`)):(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*$`,"m"));let c;for(;(c=a.exec(t))!==null;){let h=c.index,u=c[0],f=c[1],p=c[2]?.trim()??"";if(!f||f==="end")continue;let d=bp(p).format??"yaml",_=h+u.length,g=t.slice(_);l.lastIndex=0;let y=l.exec(g);if(y){let b=g.slice(0,y.index),v=yp(t,h),S=yp(t,_+y.index+y[0].length);r.push({name:f,format:d,content:b,startLine:v,endLine:S,byteSize:Buffer.byteLength(b,"utf-8")})}}return r}function wi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xp(t){return t==null?"":String(t).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function Sp(){return{table(t,e){if(t.length===0)return"";let r=[],n="| "+t.map(xp).join(" | ")+" |";r.push(n);let i="| "+t.map(()=>"---").join(" | ")+" |";r.push(i);for(let s of e){let a="| "+t.map((l,c)=>xp(s[c])).join(" | ")+" |";r.push(a)}return r.join(`
|
|
906
|
+
`)},list(t,e=!1){return t.map((r,n)=>`${e?`${n+1}.`:"-"} ${r}`).join(`
|
|
907
|
+
`)},codeBlock(t,e=""){return"```"+e+`
|
|
908
|
+
`+t+"\n```"},link(t,e){return`[${t}](${e})`},heading(t,e=1){return`${"#".repeat(Math.min(Math.max(e,1),6))} ${t}`},bold(t){return`**${t}**`},italic(t){return`*${t}*`},checkbox(t){return t?"\u2714":""}}}import Ep from"node:path";var Xo=["^```\\w*\\s*\\n?","\\n?```\\s*$"],S1={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","js","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:Xo};function Ap(t){return t.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function Zo(t,e){let r=Ap(e),n=t;for(let i of r){if(n==null)return;n=n[i]}return n}function kp(t,e,r){let n=Ap(e);if(n.length===0)return;let i=t;for(let o=0;o<n.length-1;o++){let a=n[o],l=n[o+1];if(typeof a=="number")throw new Error(`Array index in middle of path not supported: ${e}`);a in i||(i[a]=typeof l=="number"?[]:{}),i=i[a]}let s=n[n.length-1];i[s]=r}function E1(t){let e=t.indexOf(".");return e===-1?t:t.slice(0,e)}function C1(t,e){let r=t.trim();for(let n of e){let i=new RegExp(n);r=r.replace(i,"")}return r.trim()}function Cp(t,e,r={},n){let{stripCodeFences:i=!0,stripPatterns:s}=r,o=t;i&&(o=C1(o,s??Xo));let a=o.trim();switch(e){case"yaml":return wt.load(a,{schema:wt.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return A1(a);case"table":return k1(a);case"text":return a;default:{let l=n?.[e];return l?l(a):a}}}function A1(t){let e=t.split(`
|
|
909
|
+
`).filter(s=>s.trim().length>0);if(e.length===0)return[];let r=e[0];if(!r)return[];let n=r.split(",").map(s=>s.trim()),i=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split(",").map(c=>c.trim()),l={};n.forEach((c,h)=>{l[c]=a[h]??""}),i.push(l)}return i}function k1(t){let e=t.split(`
|
|
910
|
+
`).map(s=>s.trim()).filter(s=>s.length>0&&!s.match(/^\|[-:| ]+\|$/));if(e.length===0)return[];let r=e[0];if(!r)return[];let n=r.split("|").map(s=>s.trim()).filter(s=>s.length>0),i=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split("|").map(h=>h.trim()),l=o.startsWith("|")?a.slice(1,-1):a,c={};n.forEach((h,u)=>{c[h]=l[u]??""}),i.push(c)}return i}var Qo=class{type="inline";format;documentPath;startLine;endLine;byteSize;data;_isObject;_locations;constructor(e,r,n,i,s,o,a=[]){this.data=e,this.format=r,this.documentPath=n,this.startLine=i,this.endLine=s,this.byteSize=o,this._isObject=!Array.isArray(e)&&typeof e=="object"&&e!==null,this._locations=[...a].sort((l,c)=>l.propertyPath===""?-1:c.propertyPath===""?1:l.propertyPath.localeCompare(c.propertyPath))}async query(e,r){return Array.isArray(this.data)?this.data:[this.data]}async getAll(){return Array.isArray(this.data)?this.data:[this.data]}getRawData(){return this.data}async get(e){return Zo(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,r){if(!this._isObject)throw new Error("Cannot merge into array datasource");kp(this.data,e,r)}getMeta(e="",r){let n=this._locations.find(i=>i.propertyPath===e);return n?this._buildLocation(n,r):null}getAllMeta(e){return this._locations.map(r=>this._buildLocation(r,e))}get locations(){return this._locations}_buildLocation(e,r){let n=this.documentPath;if(r){let i=Ep.dirname(r);n=Ep.relative(i,this.documentPath),n=n.replace(/\\/g,"/"),!n.startsWith(".")&&!n.startsWith("/")&&(n="./"+n)}return{propertyPath:e.propertyPath,absolutePath:this.documentPath,relativePath:n,startLine:e.startLine,endLine:e.endLine,contentStartLine:e.startLine+1,contentEndLine:e.endLine-1,format:e.format}}};function Op(t,e,r={},n){let i={...S1,...r},s=new Map,o={stripCodeFences:i.stripCodeFences,stripPatterns:r.stripPatterns??Xo},a=new Map;for(let l of t){if(l.byteSize>i.maxBytes)throw new Error(`Inline datasource "${l.name}" exceeds max size (${l.byteSize} > ${i.maxBytes} bytes)`);if(!(n!=null&&l.format in n)&&!i.allowedFormats.includes(l.format))throw new Error(`Inline datasource "${l.name}" uses disallowed format "${l.format}"`);let h=E1(l.name);a.has(h)||a.set(h,[]),a.get(h).push(l)}for(let[l,c]of a){let h=c.find(g=>g.name===l),u,f="yaml",p=0,m=0,d=0,_=[];h?(u=Cp(h.content,h.format,o,n),f=h.format,p=h.startLine,m=h.endLine,d=h.byteSize,_.push({propertyPath:"",startLine:h.startLine,endLine:h.endLine,format:h.format})):u={};for(let g of c)if(g.name!==l&&g.name.startsWith(l+".")){let y=g.name.slice(l.length+1),b=Cp(g.content,g.format,o,n);(typeof u!="object"||u===null)&&(u={}),kp(u,y,b),_.push({propertyPath:y,startLine:g.startLine,endLine:g.endLine,format:g.format}),(p===0||g.startLine<p)&&(p=g.startLine),g.endLine>m&&(m=g.endLine),d+=g.byteSize}s.set(l,new Qo(u,f,e,p,m,d,_))}return s}function I1(t,e,r){let n={};for(let[i,s]of Object.entries(t))n[i]=s.replace(/\$\{(\w+(?:\.\w+|\[\d+\])*)\}/g,(o,a)=>{let l=a.split("."),c=l[0];if(!c)return"";let h=r.get(c);if(h){let f=l.slice(1).join(".");if(f){let m=Zo(h.data,f);return m!=null?String(m):""}let p=h.data;return p!=null?String(p):""}let u=e;for(let f of l){if(u==null)return"";if(typeof u=="object")u=u[f];else return""}return u!=null?String(u):""});return n}async function L1(t,e,r,n,i,s,o=!1,a){let l={filePath:t,success:!0,markersUpdated:0,changed:!1};try{let c=xi(r.comment_style,s.comment_styles),{data:h,content:u,raw:f}=bi(e),p=f?f.split(`
|
|
911
|
+
`).length-1:0,m=vp(u,c);for(let k of m)k.startLine+=p,k.endLine+=p;let d=Op(m,t,s.inline_datasource,a),_={...i};for(let[k,R]of d){if(k in _){let me=s.inline_datasource?.conflictPolicy??"warn";if(me==="error")throw new Error(`Inline datasource "${k}" conflicts with external datasource (conflict_policy: error)`);if(me==="prefer_external")continue;console.warn(`Warning: Inline datasource "${k}" overrides external datasource in ${t}`)}_[k]=R}let g=vi(u,c);if(g.length===0&&m.length===0)return l;let y=Sp(),b=u,v=[...g].sort((k,R)=>R.startIndex-k.startIndex);for(let k of v){let R=n[k.templateName];if(!R){console.warn(`Warning: Unknown embed "${k.templateName}" in ${t}`);continue}let ge={params:I1(k.params,h,d),frontmatter:h,datasources:_,markdown:y,filePath:t,existingContent:k.existingContent},Q=await R.render(ge);if(Q.content===null||Q.content===void 0)continue;let le=k.params.inline==="true"?k.startMarkerLine+Q.content+k.endMarkerLine:k.startMarkerLine+`
|
|
912
|
+
`+Q.content+`
|
|
913
|
+
`+k.endMarkerLine;b=b.slice(0,k.startIndex)+le+b.slice(k.endIndex),l.markersUpdated++}let S=f+b;if(S!==e&&(l.changed=!0,!o)){let R=(s.output?.line_ending??"lf")==="crlf"?S.replace(/\n/g,`\r
|
|
914
|
+
`):S;await P1(t,R,{encoding:s.output?.encoding??"utf-8"})}for(let k of d.values())await k.close()}catch(c){l.success=!1,l.error=c instanceof Error?c:new Error(String(c))}return l}async function R1(t){return await Ze(t.pattern,{ignore:t.exclude??[],nodir:!0})}async function ea(t,e,r,n={}){let i=Date.now(),s=[];for(let a of t.targets){let l;n.specificFiles&&n.specificFiles.length>0?l=n.specificFiles.filter(c=>c.endsWith(a.pattern.split("*").pop()??"")):l=await R1(a);for(let c of l){n.verbose&&console.log(`Processing: ${c}`);try{let h=await O1(c,{encoding:"utf-8"}),u=await L1(c,h,a,e,r,t,n.dryRun,n.customInlineFormats);s.push(u),n.verbose&&u.markersUpdated>0&&console.log(` Updated ${u.markersUpdated} marker(s)${u.changed?" (changed)":" (no changes)"}`)}catch(h){s.push({filePath:c,success:!1,markersUpdated:0,changed:!1,error:h instanceof Error?h:new Error(String(h))}),n.verbose&&console.error(` Error: ${h}`)}}}let o=Date.now()-i;return{totalFiles:s.length,successFiles:s.filter(a=>a.success).length,failedFiles:s.filter(a=>!a.success).length,totalMarkersUpdated:s.reduce((a,l)=>a+l.markersUpdated,0),results:s,duration:o}}var de=yn(ym(),1);import{readFile as EE,writeFile as CE,mkdir as AE,access as kE}from"node:fs/promises";import{dirname as OE,join as PE}from"node:path";function IE(){de.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),de.default.registerHelper("datetime",()=>new Date().toISOString()),de.default.registerHelper("eq",(t,e)=>t===e),de.default.registerHelper("ne",(t,e)=>t!==e),de.default.registerHelper("gt",(t,e)=>t>e),de.default.registerHelper("lt",(t,e)=>t<e),de.default.registerHelper("and",(...t)=>(t.pop(),t.every(Boolean))),de.default.registerHelper("or",(...t)=>(t.pop(),t.some(Boolean))),de.default.registerHelper("json",t=>JSON.stringify(t,null,2)),de.default.registerHelper("uppercase",t=>String(t??"").toUpperCase()),de.default.registerHelper("lowercase",t=>String(t??"").toLowerCase()),de.default.registerHelper("capitalize",t=>{let e=String(t??"");return e.charAt(0).toUpperCase()+e.slice(1)}),de.default.registerHelper("replace",(t,e,r)=>String(t??"").replace(new RegExp(e,"g"),r))}IE();async function LE(t,e){let r=await EE(t,{encoding:"utf-8"});return de.default.compile(r)(e)}function RE(t,e){return t.replace(/\{([^}]+)\}/g,(r,n)=>{let i=e[n];return i!=null?String(i):""})}async function DE(t){try{return await kE(t),!0}catch{return!1}}async function TE(t,e,r,n,i=!1){let s=RE(e.output_path,t),o={filePath:s,success:!0,skipped:!1};try{if(await DE(s)&&!e.overwrite)return o.skipped=!0,o;let l=PE(r,e.template),c=await LE(l,t);if(!i){await AE(OE(s),{recursive:!0});let u=(n.output?.line_ending??"lf")==="crlf"?c.replace(/\n/g,`\r
|
|
915
|
+
`):c;await CE(s,u,{encoding:n.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}async function NE(t,e,r,n,i={}){let s=[];if(!e.generators||e.generators.length===0)return i.verbose&&console.log(`No generators defined for datasource: ${t}`),s;let o=n.templates_dir??".embedoc/templates",a=await r.getAll();i.verbose&&console.log(`Found ${a.length} records in datasource: ${t}`);for(let l of e.generators)if(!(i.generatorName&&l.template!==i.generatorName)){i.verbose&&console.log(` Generator: ${l.template}`);for(let c of a){let h=await TE(c,l,o,n,i.dryRun);s.push(h),i.verbose&&(h.skipped?console.log(` Skipped (exists): ${h.filePath}`):h.success?console.log(` Generated: ${h.filePath}`):console.log(` Failed: ${h.filePath} - ${h.error?.message}`))}}return s}async function wm(t,e,r={}){let n=[];if(!t.datasources)return n;for(let[i,s]of Object.entries(t.datasources)){if(r.datasourceName&&i!==r.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[i];if(!o){r.verbose&&console.warn(`Datasource not initialized: ${i}`);continue}r.verbose&&console.log(`
|
|
916
|
+
Processing datasource: ${i}`);let a=await NE(i,s,o,t,r);n.push(...a)}return n}Gr();import{readFile as FE}from"node:fs/promises";import{resolve as ze,relative as $a}from"node:path";var mr=class{nodes=new Map;config;renderersDir;embeds;constructor(e,r){this.config=e,this.embeds=r,this.renderersDir=ze(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,r){let n=ze(r),i=this.nodes.get(n);return i||(i={type:e,path:n,dependsOn:new Set,dependedBy:new Set},this.nodes.set(n,i)),i}addDependency(e,r){let n=this.nodes.get(ze(e)),i=this.nodes.get(ze(r));n&&i&&(n.dependsOn.add(i.path),i.dependedBy.add(n.path))}async analyzeDocument(e,r){let n=ze(e),i=this.getOrCreateNode("document",n);try{let s=await FE(n,{encoding:"utf-8"}),o=xi(r.comment_style,this.config.comment_styles),{content:a}=bi(s),l=vi(a,o),c=new Set(l.map(h=>h.templateName));for(let h of c){let u=this.embeds[h];if(u){let f=`embed:${h}`,p=this.getOrCreateNode("embed",f);if(i.dependsOn.add(p.path),p.dependedBy.add(i.path),u.dependsOn)for(let m of u.dependsOn){let d=this.config.datasources?.[m];if(d?.path){let _=ze(d.path),g=this.getOrCreateNode("datasource",_);p.dependsOn.add(g.path),g.dependedBy.add(p.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let r=await Ze(e.pattern,{ignore:e.exclude??[],nodir:!0});for(let n of r)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let r=ze(e),n=new Set,i=this.nodes.get(r);if(!i){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===r){i=a;break}}if(!i&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let l=`embed:${a}`;if(i=this.nodes.get(ze(l)),!i){let c=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");i=this.nodes.get(ze(`embed:${c}`))}}}if(!i)return this.nodes.get(r)?.type==="document"?[r]:[];let s=new Set,o=[i];for(;o.length>0;){let a=o.shift();if(!s.has(a.path)){s.add(a.path),a.type==="document"&&n.add(a.path);for(let l of a.dependedBy){let c=this.nodes.get(l);c&&!s.has(l)&&o.push(c)}}}return Array.from(n)}getWatchPaths(){let e=[];if(this.config.datasources)for(let r of Object.values(this.config.datasources))r.path&&e.push(ze(r.path));return e.push(this.renderersDir),e}dump(){console.log(`
|
|
917
|
+
=== Dependency Graph ===`);for(let[e,r]of this.nodes){if(console.log(`
|
|
918
|
+
[${r.type}] ${$a(process.cwd(),e)}`),r.dependsOn.size>0){console.log(" depends on:");for(let n of r.dependsOn)console.log(` - ${$a(process.cwd(),n)}`)}if(r.dependedBy.size>0){console.log(" depended by:");for(let n of r.dependedBy)console.log(` - ${$a(process.cwd(),n)}`)}}}};var qE={version:"0.14.1"};async function Ja(t){let e=$e(t),r=await xm(e,{encoding:"utf-8"});return t.endsWith(".json")?JSON.parse(r):wt.load(r)}async function gr(t){try{return await ME(t),!0}catch{return!1}}function vm(t){return t.renderers_dir?t.renderers_dir:t.embeds_dir?(console.warn(A.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),t.embeds_dir):".embedoc/renderers"}async function Ka(t){let e=$e(t,"index.ts"),r=$e(t,"index.js");try{if(await gr(e)){let n=await Em(e,import.meta.url);return n.embeds??n.default?.embeds??{}}return await gr(r)?(await import(Sm(r).href)).embeds??{}:{}}catch(n){let i=n instanceof Error?n.message:String(n);return console.warn(A.default.yellow(`Warning: Could not load renderers from ${t}: ${i}`)),{}}}async function Qa(t){let e=$e(t,"index.ts"),r=$e(t,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let i;return await gr(e)?i=await Em(e,import.meta.url):await gr(r)&&(i=await import(Sm(r).href)),i?{datasourceTypes:i.datasourceTypes??i.default?.datasourceTypes??{},inlineFormats:i.inlineFormats??i.default?.inlineFormats??{}}:n}catch(i){let s=i instanceof Error?i.message:String(i);return console.warn(A.default.yellow(`Warning: Could not load custom datasources from ${t}: ${s}`)),n}}var HE={init:async t=>{try{console.log(A.default.cyan(`\u{1F4C1} Initializing embedoc...
|
|
919
|
+
`));let e=[],r=[],n=async(l,c)=>{let h=$e(l);if(!t.force&&await gr(h)){r.push(l);return}let u=h.substring(0,h.lastIndexOf("/"));await BE(u,{recursive:!0}),await bm(h,c,{encoding:"utf-8"}),e.push(l)};await n("embedoc.config.yaml",`version: "1.0"
|
|
920
|
+
|
|
921
|
+
targets:
|
|
922
|
+
- pattern: "./docs/**/*.md"
|
|
923
|
+
comment_style: html
|
|
924
|
+
exclude:
|
|
925
|
+
- "**/node_modules/**"
|
|
926
|
+
- "**/.git/**"
|
|
927
|
+
|
|
928
|
+
datasources: {}
|
|
929
|
+
# example_db:
|
|
930
|
+
# type: sqlite
|
|
931
|
+
# path: "./data/example.db"
|
|
932
|
+
# example_csv:
|
|
933
|
+
# type: csv
|
|
934
|
+
# path: "./data/example.csv"
|
|
935
|
+
`),await n(".embedoc/renderers/index.ts",`/**
|
|
936
|
+
* embedoc renderers
|
|
937
|
+
*
|
|
938
|
+
* Export your custom renderers here.
|
|
939
|
+
* Each key becomes a marker name: <!--@embedoc:key_name ...-->
|
|
940
|
+
*/
|
|
941
|
+
|
|
942
|
+
// import myRenderer from './my_renderer.ts';
|
|
943
|
+
|
|
944
|
+
export const embeds = {
|
|
945
|
+
// my_renderer: myRenderer,
|
|
946
|
+
};
|
|
947
|
+
`),await n(".embedoc/datasources/index.ts",`/**
|
|
948
|
+
* embedoc custom datasources and inline format parsers
|
|
949
|
+
*
|
|
950
|
+
* datasourceTypes: register custom datasource types usable in embedoc.config.yaml
|
|
951
|
+
* inlineFormats: register custom parsers for @embedoc-data format="xxx" markers
|
|
952
|
+
*/
|
|
953
|
+
|
|
954
|
+
// import type { CustomDatasourceDefinition, InlineFormatParser } from 'embedoc';
|
|
955
|
+
// import myDatasource from './my_datasource.ts';
|
|
956
|
+
|
|
957
|
+
export const datasourceTypes = {
|
|
958
|
+
// my_datasource: myDatasource,
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
export const inlineFormats = {
|
|
962
|
+
// toml: (content: string) => parseToml(content),
|
|
963
|
+
};
|
|
964
|
+
`),await n(".embedoc/templates/.gitkeep","");let a=$e("package.json");if(await gr(a)){let l=await xm(a,{encoding:"utf-8"}),c=JSON.parse(l),h=c.scripts??{},u=!1,f=[["embedoc:build","embedoc build"],["embedoc:watch","embedoc watch"],["embedoc:generate","embedoc generate --all"]];for(let[p,m]of f)p in h||(h[p]=m,u=!0);if(u){c.scripts=h,await bm(a,JSON.stringify(c,null,2)+`
|
|
965
|
+
`,{encoding:"utf-8"}),console.log(A.default.green(" Updated package.json scripts:"));for(let[p,m]of f)l.includes(`"${p}"`)||console.log(A.default.gray(` "${p}": "${m}"`));console.log("")}}if(e.length>0){console.log(A.default.green(" Created:"));for(let l of e)console.log(A.default.gray(` ${l}`))}if(r.length>0){console.log(A.default.yellow(" Skipped (already exists):"));for(let l of r)console.log(A.default.gray(` ${l}`))}console.log(""),console.log(A.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(A.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(A.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(A.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(A.default.red("\u274C Init failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}},build:async(t,e)=>{let r=Date.now();try{console.log(A.default.cyan("\u{1F527} Loading configuration..."));let n=await Ja(e.config??"embedoc.config.yaml"),i=n.datasources_dir??".embedoc/datasources",s=await Qa(i);console.log(A.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await zr(n,s.datasourceTypes);console.log(A.default.cyan("\u{1F4DD} Loading renderers..."));let a=vm(n),l=await Ka(a);console.log(A.default.cyan("\u{1F504} Processing files..."));let c=await ea(n,l,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:t.length>0?t:void 0,customInlineFormats:s.inlineFormats});await $r(o);let h=Date.now()-r;console.log(""),console.log(A.default.green("\u2705 Build completed!")),console.log(` Files processed: ${c.totalFiles}`),console.log(` Markers updated: ${c.totalMarkersUpdated}`),console.log(` Success: ${c.successFiles}`),c.failedFiles>0&&console.log(A.default.red(` Failed: ${c.failedFiles}`)),console.log(` Duration: ${h}ms`),e.dryRun&&console.log(A.default.yellow(`
|
|
966
|
+
(Dry run - no files were modified)`));for(let u of c.results)!u.success&&u.error&&(console.error(A.default.red(`
|
|
967
|
+
Error in ${u.filePath}:`)),console.error(` ${u.error.message}`));process.exit(c.failedFiles>0?1:0)}catch(n){console.error(A.default.red("\u274C Build failed:")),console.error(n instanceof Error?n.message:String(n)),process.exit(1)}},generate:async t=>{let e=Date.now();try{!t.datasource&&!t.all&&(console.error(A.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(A.default.cyan("\u{1F527} Loading configuration..."));let r=await Ja(t.config??"embedoc.config.yaml"),n=r.datasources_dir??".embedoc/datasources",i=await Qa(n);console.log(A.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await zr(r,i.datasourceTypes);console.log(A.default.cyan("\u{1F4C4} Generating files..."));let o=await wm(r,s,{dryRun:t.dryRun,verbose:t.verbose,datasourceName:t.datasource,generatorName:t.generator});await $r(s);let a=Date.now()-e,l=o.filter(u=>u.success&&!u.skipped).length,c=o.filter(u=>u.skipped).length,h=o.filter(u=>!u.success).length;console.log(""),console.log(A.default.green("\u2705 Generation completed!")),console.log(` Generated: ${l}`),console.log(` Skipped (existing): ${c}`),h>0&&console.log(A.default.red(` Failed: ${h}`)),console.log(` Duration: ${a}ms`),t.dryRun&&console.log(A.default.yellow(`
|
|
968
|
+
(Dry run - no files were created)`));for(let u of o)!u.success&&u.error&&(console.error(A.default.red(`
|
|
969
|
+
Error for ${u.filePath}:`)),console.error(` ${u.error.message}`));process.exit(h>0?1:0)}catch(r){console.error(A.default.red("\u274C Generation failed:")),console.error(r instanceof Error?r.message:String(r)),process.exit(1)}},watch:async t=>{try{console.log(A.default.cyan("\u{1F527} Loading configuration..."));let e=await Ja(t.config??"embedoc.config.yaml"),r=e.datasources_dir??".embedoc/datasources",n=await Qa(r);console.log(A.default.cyan("\u{1F4E6} Initializing datasources..."));let i=await zr(e,n.datasourceTypes);console.log(A.default.cyan("\u{1F4DD} Loading renderers..."));let s=$e(vm(e)),o=await Ka(s);console.log(A.default.cyan("\u{1F517} Building dependency graph..."));let a=new mr(e,o);await a.build(),t.debugDeps&&a.dump();let l=e.targets.map(d=>d.pattern),c=a.getWatchPaths();console.log(A.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${l.join(", ")}`),c.length>0&&console.log(` Additional paths: ${c.map(d=>Ya(process.cwd(),d)).join(", ")}`);let h=Cc.watch([...l,...c],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),u=null,f=new Map,p=async()=>{let d=new Map(f);f.clear();let _=!1;for(let[y]of d)if(y.startsWith(s)&&y.endsWith(".ts")){console.log(A.default.yellow(`
|
|
970
|
+
\u{1F504} Renderer changed: ${Ya(process.cwd(),y)}`)),console.log(A.default.cyan(" Reloading renderers..."));try{o=await Ka(s),_=!0}catch(b){console.error(A.default.red(" Failed to reload renderers:"),b);return}}_&&(console.log(A.default.cyan(" Rebuilding dependency graph...")),a=new mr(e,o),await a.build());let g=new Set;for(let[y]of d){let b=a.getAffectedDocuments(y);for(let v of b)g.add(v)}if(g.size===0)for(let[y]of d){let b=$e(y);for(let v of e.targets){let{glob:S}=await Promise.resolve().then(()=>(Gr(),Ku));if((await S(v.pattern,{absolute:!0})).includes(b)){g.add(b);break}}}if(g.size===0){console.log(A.default.gray(`
|
|
971
|
+
No affected documents found`));return}console.log(A.default.yellow(`
|
|
972
|
+
\u{1F4DD} Rebuilding ${g.size} document(s)...`));for(let y of g)console.log(A.default.gray(` - ${Ya(process.cwd(),y)}`));try{await $r(i),i=await zr(e,n.datasourceTypes);let y=await ea(e,o,i,{verbose:t.verbose,specificFiles:Array.from(g),customInlineFormats:n.inlineFormats});y.totalMarkersUpdated>0?console.log(A.default.green(` \u2705 Updated ${y.totalMarkersUpdated} marker(s)`)):console.log(A.default.gray(" No markers updated")),a=new mr(e,o),await a.build()}catch(y){console.error(A.default.red(" \u274C Error:"),y)}},m=d=>_=>{f.set($e(_),d),u&&clearTimeout(u),u=setTimeout(p,200)};h.on("change",m("change")),h.on("add",m("add")),process.on("SIGINT",async()=>{console.log(A.default.cyan(`
|
|
973
|
+
|
|
974
|
+
\u{1F44B} Stopping watch...`)),await h.close(),await $r(i),process.exit(0)})}catch(e){console.error(A.default.red("\u274C Watch failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}}};Wc(HE,qE.version).parse();
|
|
975
|
+
/*! Bundled license information:
|
|
976
|
+
|
|
977
|
+
is-extendable/index.js:
|
|
978
|
+
(*!
|
|
979
|
+
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
980
|
+
*
|
|
981
|
+
* Copyright (c) 2015, Jon Schlinkert.
|
|
982
|
+
* Licensed under the MIT License.
|
|
983
|
+
*)
|
|
984
|
+
|
|
985
|
+
strip-bom-string/index.js:
|
|
986
|
+
(*!
|
|
987
|
+
* strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
|
|
988
|
+
*
|
|
989
|
+
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
990
|
+
* Released under the MIT License.
|
|
991
|
+
*)
|
|
992
|
+
|
|
993
|
+
js-yaml/dist/js-yaml.mjs:
|
|
994
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
995
|
+
|
|
996
|
+
chokidar/esm/index.js:
|
|
997
|
+
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
998
|
+
*/
|
|
999
|
+
//# sourceMappingURL=embedoc.bundle.mjs.map
|