view-contracts 0.3.0 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,52 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __banner_createRequire } from 'module';
3
3
  const require = __banner_createRequire(import.meta.url);
4
- var Ol=Object.create;var eo=Object.defineProperty;var Pl=Object.getOwnPropertyDescriptor;var Il=Object.getOwnPropertyNames;var Tl=Object.getPrototypeOf,Rl=Object.prototype.hasOwnProperty;var Ce=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var D=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Ll=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Il(e))!Rl.call(n,i)&&i!==t&&eo(n,i,{get:()=>e[i],enumerable:!(r=Pl(e,i))||r.enumerable});return n};var to=(n,e,t)=>(t=n!=null?Ol(Tl(n)):{},Ll(e||!n||!n.__esModule?eo(t,"default",{value:n,enumerable:!0}):t,n));var Pt=D(br=>{var un=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},wr=class extends un{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};br.CommanderError=un;br.InvalidArgumentError=wr});var pn=D(Sr=>{var{InvalidArgumentError:Nl}=Pt(),xr=class{constructor(e,t){switch(this.description=t||"",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.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Nl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ml(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}Sr.Argument=xr;Sr.humanReadableArgName=Ml});var Ar=D(kr=>{var{humanReadableArgName:Dl}=pn(),Cr=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 t=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((i,o)=>i.name().localeCompare(o.name())),t}compareOptions(e,t){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),o=r.long&&e._findOption(r.long);!i&&!o?t.push(r):r.long&&!o?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>Dl(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,t,r){return t.length===0?[]:[r.styleTitle(e),...t,""]}groupItems(e,t,r){let i=new Map;return e.forEach(o=>{let a=r(o);i.has(a)||i.set(a,[])}),t.forEach(o=>{let a=r(o);i.has(a)||i.set(a,[]),i.get(a).push(o)}),i}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth??80;function o(u,d){return t.formatItem(u,r,d,t)}let a=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],l=t.commandDescription(e);l.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(l),i),""]));let p=t.visibleArguments(e).map(u=>o(t.styleArgumentTerm(t.argumentTerm(u)),t.styleArgumentDescription(t.argumentDescription(u))));if(a=a.concat(this.formatItemList("Arguments:",p,t)),this.groupItems(e.options,t.visibleOptions(e),u=>u.helpGroupHeading??"Options:").forEach((u,d)=>{let v=u.map(C=>o(t.styleOptionTerm(t.optionTerm(C)),t.styleOptionDescription(t.optionDescription(C))));a=a.concat(this.formatItemList(d,v,t))}),t.showGlobalOptions){let u=t.visibleGlobalOptions(e).map(d=>o(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));a=a.concat(this.formatItemList("Global Options:",u,t))}return this.groupItems(e.commands,t.visibleCommands(e),u=>u.helpGroup()||"Commands:").forEach((u,d)=>{let v=u.map(C=>o(t.styleSubcommandTerm(t.subcommandTerm(C)),t.styleSubcommandDescription(t.subcommandDescription(C))));a=a.concat(this.formatItemList(d,v,t))}),a.join(`
5
- `)}displayWidth(e){return no(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).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(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).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,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,i){let a=" ".repeat(2);if(!r)return a+e;let l=e.padEnd(t+e.length-i.displayWidth(e)),p=2,h=(this.helpWidth??80)-t-p-2,u;return h<this.minWidthToWrap||i.preformatted(r)?u=r:u=i.boxWrap(r,h).replace(/\n/g,`
6
- `+" ".repeat(t+p)),a+l+" ".repeat(p)+u.replace(/\n/g,`
7
- ${a}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(a=>{let l=a.match(i);if(l===null){o.push("");return}let p=[l.shift()],c=this.displayWidth(p[0]);l.forEach(h=>{let u=this.displayWidth(h);if(c+u<=t){p.push(h),c+=u;return}o.push(p.join(""));let d=h.trimStart();p=[d],c=this.displayWidth(d)}),o.push(p.join(""))}),o.join(`
8
- `)}};function no(n){let e=/\x1b\[\d*(;\d*)*m/g;return n.replace(e,"")}kr.Help=Cr;kr.stripColor=no});var Ir=D(Pr=>{var{InvalidArgumentError:Vl}=Pt(),Er=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Fl(e);this.short=r.shortFlag,this.long=r.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,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),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}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Vl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ro(this.name().replace(/^no-/,"")):ro(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Or=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return t.negate===(o===e)}};function ro(n){return n.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Fl(n){let e,t,r=/^-[^-]$/,i=/^--[^-]/,o=n.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(t=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=t,t=o.shift()),o[0].startsWith("-")){let a=o[0],l=`option creation failed due to '${a}' in option flags '${n}'`;throw/^-[^-][^-]/.test(a)?new Error(`${l}
4
+ var xg=Object.create;var Vl=Object.defineProperty;var Pg=Object.getOwnPropertyDescriptor;var Og=Object.getOwnPropertyNames;var Ag=Object.getPrototypeOf,Rg=Object.prototype.hasOwnProperty;var ot=(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 w=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Ig=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Og(e))!Rg.call(t,i)&&i!==r&&Vl(t,i,{get:()=>e[i],enumerable:!(n=Pg(e,i))||n.enumerable});return t};var io=(t,e,r)=>(r=t!=null?xg(Ag(t)):{},Ig(e||!t||!t.__esModule?Vl(r,"default",{value:t,enumerable:!0}):r,t));var on=w(oo=>{var _i=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}},so=class extends _i{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};oo.CommanderError=_i;oo.InvalidArgumentError=so});var wi=w(co=>{var{InvalidArgumentError:Tg}=on(),ao=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.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}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 Tg(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ng(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}co.Argument=ao;co.humanReadableArgName=Ng});var fo=w(uo=>{var{humanReadableArgName:Mg}=wi(),lo=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=>Mg(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=[];if(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){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return 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}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[])}),r.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[]),i.get(o).push(s)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function s(f,h){return r.formatItem(f,n,h,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(f=>s(r.styleArgumentTerm(r.argumentTerm(f)),r.styleArgumentDescription(r.argumentDescription(f))));if(o=o.concat(this.formatItemList("Arguments:",l,r)),this.groupItems(e.options,r.visibleOptions(e),f=>f.helpGroupHeading??"Options:").forEach((f,h)=>{let m=f.map(g=>s(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));o=o.concat(this.formatItemList(h,m,r))}),r.showGlobalOptions){let f=r.visibleGlobalOptions(e).map(h=>s(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));o=o.concat(this.formatItemList("Global Options:",f,r))}return this.groupItems(e.commands,r.visibleCommands(e),f=>f.helpGroup()||"Commands:").forEach((f,h)=>{let m=f.map(g=>s(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));o=o.concat(this.formatItemList(h,m,r))}),o.join(`
5
+ `)}displayWidth(e){return Fl(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,d=(this.helpWidth??80)-r-l-2,f;return d<this.minWidthToWrap||i.preformatted(n)?f=n:f=i.boxWrap(n,d).replace(/\n/g,`
6
+ `+" ".repeat(r+l)),o+a+" ".repeat(l)+f.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()],u=this.displayWidth(l[0]);a.forEach(d=>{let f=this.displayWidth(d);if(u+f<=r){l.push(d),u+=f;return}s.push(l.join(""));let h=d.trimStart();l=[h],u=this.displayWidth(h)}),s.push(l.join(""))}),s.join(`
8
+ `)}};function Fl(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}uo.Help=lo;uo.stripColor=Fl});var go=w(mo=>{var{InvalidArgumentError:Lg}=on(),po=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=jg(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,this.helpGroupHeading=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}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Lg(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Hl(this.name().replace(/^no-/,"")):Hl(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ho=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 Hl(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function jg(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
9
  - a short flag is a single dash and a single character
10
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')`):r.test(a)?new Error(`${l}
12
- - too many short flags`):i.test(a)?new Error(`${l}
13
- - too many long flags`):new Error(`${l}
14
- - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${n}'.`);return{shortFlag:e,longFlag:t}}Pr.Option=Er;Pr.DualOptions=Or});var oo=D(io=>{function Bl(n,e){if(Math.abs(n.length-e.length)>3)return Math.max(n.length,e.length);let t=[];for(let r=0;r<=n.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=n.length;i++){let o=1;n[i-1]===e[r-1]?o=0:o=1,t[i][r]=Math.min(t[i-1][r]+1,t[i][r-1]+1,t[i-1][r-1]+o),i>1&&r>1&&n[i-1]===e[r-2]&&n[i-2]===e[r-1]&&(t[i][r]=Math.min(t[i][r],t[i-2][r-2]+1))}return t[n.length][e.length]}function $l(n,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=n.startsWith("--");t&&(n=n.slice(2),e=e.map(a=>a.slice(2)));let r=[],i=3,o=.4;return e.forEach(a=>{if(a.length<=1)return;let l=Bl(n,a),p=Math.max(n.length,a.length);(p-l)/p>o&&(l<i?(i=l,r=[a]):l===i&&r.push(a))}),r.sort((a,l)=>a.localeCompare(l)),t&&(r=r.map(a=>`--${a}`)),r.length>1?`
15
- (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
- (Did you mean ${r[0]}?)`:""}io.suggestSimilar=$l});var co=D(Mr=>{var Hl=Ce("node:events").EventEmitter,Tr=Ce("node:child_process"),Be=Ce("node:path"),fn=Ce("node:fs"),H=Ce("node:process"),{Argument:jl,humanReadableArgName:ql}=pn(),{CommanderError:Rr}=Pt(),{Help:Gl,stripColor:Wl}=Ar(),{Option:so,DualOptions:Ul}=Ir(),{suggestSimilar:ao}=oo(),Lr=class n extends Hl{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:t=>H.stdout.write(t),writeErr:t=>H.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>H.stdout.isTTY?H.stdout.columns:void 0,getErrHelpWidth:()=>H.stderr.isTTY?H.stderr.columns:void 0,getOutHasColors:()=>Nr()??(H.stdout.isTTY&&H.stdout.hasColors?.()),getErrHasColors:()=>Nr()??(H.stderr.isTTY&&H.stderr.hasColors?.()),stripColor:t=>Wl(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}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 t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let i=t,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,a,l]=e.match(/([^ ]+) *(.*)/),p=this.createCommand(a);return i&&(p.description(i),p._executableHandler=!0),o.isDefault&&(this._defaultCommandName=p._name),p._hidden=!!(o.noHelp||o.hidden),p._executableFile=o.executableFile||null,l&&p.arguments(l),this._registerCommand(p),p.parent=this,p.copyInheritedSettings(this),i?this:p}createCommand(e){return new n(e)}createHelp(){return Object.assign(new Gl,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...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,t){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 t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new jl(e,t)}argument(e,t,r,i){let o=this.createArgument(e,t);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.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,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let r=e??"help [command]",[,i,o]=r.match(/([^ ]+) *(.*)/),a=t??"display help for command",l=this.createCommand(i);return l.helpOption(!1),o&&l.arguments(o),a&&l.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=l,(e||t)&&this._initCommandGroup(l),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(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,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
- Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new Rr(e,t,r)),H.exit(e)}action(e){let t=r=>{let i=this.registeredArguments.length,o=r.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=t,this}createOption(e,t){return new so(e,t)}_callParseArg(e,t,r,i){try{return e.parseArg(t,r)}catch(o){if(o.code==="commander.invalidArgument"){let a=`${i} ${o.message}`;this.error(a,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=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 '${r}'
19
- - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),r=t(e).find(i=>this._findCommand(i));if(r){let i=t(this._findCommand(r)).join("|"),o=t(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(o,a,l)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let p=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,p,a):o!==null&&e.variadic&&(o=e._collectValue(o,p)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,l)};return this.on("option:"+t,o=>{let a=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,a,"cli")}),e.envVar&&this.on("optionEnv:"+t,o=>{let a=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,a,"env")}),this}_optionEx(e,t,r,i,o){if(typeof t=="object"&&t instanceof so)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(t,r);if(a.makeOptionMandatory(!!e.mandatory),typeof i=="function")a.default(o).argParser(i);else if(i instanceof RegExp){let l=i;i=(p,c)=>{let h=l.exec(p);return h?h[0]:c},a.default(o).argParser(i)}else a.default(i);return this.addOption(a)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:!0},e,t,r,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,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){H.versions?.electron&&(t.from="electron");let i=H.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=H.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":H.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),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,t,r){if(fn.existsSync(e))return;let i=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
- - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
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}}mo.Option=po;mo.DualOptions=ho});var Ul=w(Bl=>{function Dg(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 qg(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=Dg(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]}?)`:""}Bl.suggestSimilar=qg});var Kl=w(bo=>{var Vg=ot("node:events").EventEmitter,yo=ot("node:child_process"),xt=ot("node:path"),bi=ot("node:fs"),ie=ot("node:process"),{Argument:Fg,humanReadableArgName:Hg}=wi(),{CommanderError:vo}=on(),{Help:Bg,stripColor:Ug}=fo(),{Option:Gl,DualOptions:Gg}=go(),{suggestSimilar:zl}=Ul(),_o=class t extends Vg{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=>ie.stdout.write(r),writeErr:r=>ie.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>ie.stdout.isTTY?ie.stdout.columns:void 0,getErrHelpWidth:()=>ie.stderr.isTTY?ie.stderr.columns:void 0,getOutHasColors:()=>wo()??(ie.stdout.isTTY&&ie.stdout.hasColors?.()),getErrHasColors:()=>wo()??(ie.stderr.isTTY&&ie.stderr.hasColors?.()),stripColor:r=>Ug(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}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 Bg,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...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 Fg(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?.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,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,s]=n.match(/([^ ]+) *(.*)/),o=r??"display help for command",a=this.createCommand(i);return a.helpOption(!1),s&&a.arguments(s),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(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 vo(e,r,n)),ie.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 Gl(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._initOptionGroup(e),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._initCommandGroup(e),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._collectValue(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 Gl)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,u)=>{let d=a.exec(l);return d?d[0]:u},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){ie.versions?.electron&&(r.from="electron");let i=ie.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=ie.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":ie.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(bi.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
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(o)}_executeSubCommand(e,t){t=t.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(h,u){let d=Be.resolve(h,u);if(fn.existsSync(d))return d;if(i.includes(Be.extname(u)))return;let v=i.find(C=>fn.existsSync(`${d}${C}`));if(v)return`${d}${v}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=fn.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=Be.resolve(Be.dirname(h),l)}if(l){let h=o(l,a);if(!h&&!e._executableFile&&this._scriptPath){let u=Be.basename(this._scriptPath,Be.extname(this._scriptPath));u!==this._name&&(h=o(l,`${u}-${e._name}`))}a=h||a}r=i.includes(Be.extname(a));let p;H.platform!=="win32"?r?(t.unshift(a),t=lo(H.execArgv).concat(t),p=Tr.spawn(H.argv[0],t,{stdio:"inherit"})):p=Tr.spawn(a,t,{stdio:"inherit"}):(this._checkForMissingExecutable(a,l,e._name),t.unshift(a),t=lo(H.execArgv).concat(t),p=Tr.spawn(H.execPath,t,{stdio:"inherit"})),p.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{H.on(u,()=>{p.killed===!1&&p.exitCode===null&&p.kill(u)})});let c=this._exitCallback;p.on("close",h=>{h=h??1,c?c(new Rr(h,"commander.executeSubCommandAsync","(close)")):H.exit(h)}),p.on("error",h=>{if(h.code==="ENOENT")this._checkForMissingExecutable(a,l,e._name);else if(h.code==="EACCES")throw new Error(`'${a}' not executable`);if(!c)H.exit(1);else{let u=new Rr(1,"commander.executeSubCommandAsync","(error)");u.nestedError=h,c(u)}}),this.runningCommand=p}_dispatchSubcommand(e,t,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(r));else return i._parseCommand(t,r)}),o}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==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=(r,i,o)=>{let a=i;if(i!==null&&r.parseArg){let l=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;a=this._callParseArg(r,i,o,l)}return a};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,i)=>{let o=r.defaultValue;r.variadic?i<this.args.length?(o=this.args.slice(i),r.parseArg&&(o=o.reduce((a,l)=>e(r,l,a),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),t[i]=o}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[t]!==void 0).forEach(o=>{o._lifeCycleHooks[t].forEach(a=>{i.push({hookedCommand:o,callback:a})})}),t==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,t))}),i}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(o,e,t)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):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(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(o=>r.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],i=t;function o(h){return h.length>1&&h[0]==="-"}let a=h=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(h)?!this._getCommandAndAncestors().some(u=>u.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):!1,l=null,p=null,c=0;for(;c<e.length||p;){let h=p??e[c++];if(p=null,h==="--"){i===r&&i.push(h),i.push(...e.slice(c));break}if(l&&(!o(h)||a(h))){this.emit(`option:${l.name()}`,h);continue}if(l=null,o(h)){let u=this._findOption(h);if(u){if(u.required){let d=e[c++];d===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,d)}else if(u.optional){let d=null;c<e.length&&(!o(e[c])||a(e[c]))&&(d=e[c++]),this.emit(`option:${u.name()}`,d)}else this.emit(`option:${u.name()}`);l=u.variadic?u:null;continue}}if(h.length>2&&h[0]==="-"&&h[1]!=="-"){let u=this._findOption(`-${h[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,h.slice(2)):(this.emit(`option:${u.name()}`),p=`-${h.slice(2)}`);continue}}if(/^--[^=]+=/.test(h)){let u=h.indexOf("="),d=this._findOption(h.slice(0,u));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,h.slice(u+1));continue}}if(i===t&&o(h)&&!(this.commands.length===0&&a(h))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(h)){t.push(h),r.push(...e.slice(c));break}else if(this._getHelpCommand()&&h===this._getHelpCommand().name()){t.push(h,...e.slice(c));break}else if(this._defaultCommandName){r.push(h,...e.slice(c));break}}if(this._passThroughOptions){i.push(h,...e.slice(c));break}i.push(h)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(s)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(d,f){let h=xt.resolve(d,f);if(bi.existsSync(h))return h;if(i.includes(xt.extname(f)))return;let m=i.find(g=>bi.existsSync(`${h}${g}`));if(m)return`${h}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=bi.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=xt.resolve(xt.dirname(d),a)}if(a){let d=s(a,o);if(!d&&!e._executableFile&&this._scriptPath){let f=xt.basename(this._scriptPath,xt.extname(this._scriptPath));f!==this._name&&(d=s(a,`${f}-${e._name}`))}o=d||o}n=i.includes(xt.extname(o));let l;ie.platform!=="win32"?n?(r.unshift(o),r=Wl(ie.execArgv).concat(r),l=yo.spawn(ie.argv[0],r,{stdio:"inherit"})):l=yo.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=Wl(ie.execArgv).concat(r),l=yo.spawn(ie.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{ie.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let u=this._exitCallback;l.on("close",d=>{d=d??1,u?u(new vo(d,"commander.executeSubCommandAsync","(close)")):ie.exit(d)}),l.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(d.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)ie.exit(1);else{let f=new vo(1,"commander.executeSubCommandAsync","(error)");f.nestedError=d,u(f)}}),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?.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?.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;function s(d){return d.length>1&&d[0]==="-"}let o=d=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(d)?!this._getCommandAndAncestors().some(f=>f.options.map(h=>h.short).some(h=>/^-\d$/.test(h))):!1,a=null,l=null,u=0;for(;u<e.length||l;){let d=l??e[u++];if(l=null,d==="--"){i===n&&i.push(d),i.push(...e.slice(u));break}if(a&&(!s(d)||o(d))){this.emit(`option:${a.name()}`,d);continue}if(a=null,s(d)){let f=this._findOption(d);if(f){if(f.required){let h=e[u++];h===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,h)}else if(f.optional){let h=null;u<e.length&&(!s(e[u])||o(e[u]))&&(h=e[u++]),this.emit(`option:${f.name()}`,h)}else this.emit(`option:${f.name()}`);a=f.variadic?f:null;continue}}if(d.length>2&&d[0]==="-"&&d[1]!=="-"){let f=this._findOption(`-${d[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,d.slice(2)):(this.emit(`option:${f.name()}`),l=`-${d.slice(2)}`);continue}}if(/^--[^=]+=/.test(d)){let f=d.indexOf("="),h=this._findOption(d.slice(0,f));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,d.slice(f+1));continue}}if(i===r&&s(d)&&!(this.commands.length===0&&o(d))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(d)){r.push(d),n.push(...e.slice(u));break}else if(this._getHelpCommand()&&d===this._getHelpCommand().name()){r.push(d,...e.slice(u));break}else if(this._defaultCommandName){n.push(d,...e.slice(u));break}}if(this._passThroughOptions){i.push(d,...e.slice(u));break}i.push(d)}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
24
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
25
25
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
26
- `),this.outputHelp({error:!0}));let r=t||{},i=r.exitCode||1,o=r.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in H.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,H.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ul(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=a=>{let l=a.attributeName(),p=this.getOptionValue(l),c=this.options.find(u=>u.negate&&l===u.attributeName()),h=this.options.find(u=>!u.negate&&l===u.attributeName());return c&&(c.presetArg===void 0&&p===!1||c.presetArg!==void 0&&p===c.presetArg)?c:h||a},i=a=>{let l=r(a),p=l.attributeName();return this.getOptionValueSource(p)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},o=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let a=o.createHelp().visibleOptions(o).filter(l=>l.long).map(l=>l.long);i=i.concat(a),o=o.parent}while(o&&!o._enablePositionalOptions);t=ao(e,i)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),t=ao(e,i)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let i=this.createOption(t,r);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,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>ql(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Be.basename(e,Be.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=t.formatHelp(this,t);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,r,i,o;return t?(r=l=>this._outputConfiguration.writeErr(l),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=l=>this._outputConfiguration.writeOut(l),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:t,write:l=>(i||(l=this._outputConfiguration.stripColor(l)),r(l)),hasColors:i,helpWidth:o}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(t&&(o=t(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(H.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
- Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let a;typeof t=="function"?a=t({error:o.error,command:o.command}):a=t,a&&o.write(`${a}
29
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function lo(n){return n.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?t=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=o[1],r=o[3],i=o[4]),t&&i!=="0"?`${t}=${r}:${parseInt(i)+1}`:e})}function Nr(){if(H.env.NO_COLOR||H.env.FORCE_COLOR==="0"||H.env.FORCE_COLOR==="false")return!1;if(H.env.FORCE_COLOR||H.env.CLICOLOR_FORCE!==void 0)return!0}Mr.Command=Lr;Mr.useColor=Nr});var ho=D(_e=>{var{Argument:uo}=pn(),{Command:Dr}=co(),{CommanderError:Jl,InvalidArgumentError:po}=Pt(),{Help:Yl}=Ar(),{Option:fo}=Ir();_e.program=new Dr;_e.createCommand=n=>new Dr(n);_e.createOption=(n,e)=>new fo(n,e);_e.createArgument=(n,e)=>new uo(n,e);_e.Command=Dr;_e.Option=fo;_e.Argument=uo;_e.Help=Yl;_e.CommanderError=Jl;_e.InvalidArgumentError=po;_e.InvalidOptionArgumentError=po});var ce=D(de=>{"use strict";de.__esModule=!0;de.extend=ws;de.indexOf=bu;de.escapeExpression=xu;de.isEmpty=Su;de.createFrame=Cu;de.blockParams=ku;de.appendContextPath=Au;var vu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},_u=/[&<>"'`=]/g,yu=/[&<>"'`=]/;function wu(n){return vu[n]}function ws(n){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(n[t]=arguments[e][t]);return n}var ni=Object.prototype.toString;de.toString=ni;var ti=function(e){return typeof e=="function"};ti(/x/)&&(de.isFunction=ti=function(n){return typeof n=="function"&&ni.call(n)==="[object Function]"});de.isFunction=ti;var bs=Array.isArray||function(n){return n&&typeof n=="object"?ni.call(n)==="[object Array]":!1};de.isArray=bs;function bu(n,e){for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function xu(n){if(typeof n!="string"){if(n&&n.toHTML)return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n}return yu.test(n)?n.replace(_u,wu):n}function Su(n){return!n&&n!==0?!0:!!(bs(n)&&n.length===0)}function Cu(n){var e=ws({},n);return e._parent=n,e}function ku(n,e){return n.path=e,n}function Au(n,e){return(n?n+".":"")+e}});var me=D((On,xs)=>{"use strict";On.__esModule=!0;var ri=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ii(n,e){var t=e&&e.loc,r=void 0,i=void 0,o=void 0,a=void 0;t&&(r=t.start.line,i=t.end.line,o=t.start.column,a=t.end.column,n+=" - "+r+":"+o);for(var l=Error.prototype.constructor.call(this,n),p=0;p<ri.length;p++)this[ri[p]]=l[ri[p]];Error.captureStackTrace&&Error.captureStackTrace(this,ii);try{t&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}ii.prototype=new Error;On.default=ii;xs.exports=On.default});var Cs=D((Pn,Ss)=>{"use strict";Pn.__esModule=!0;var oi=ce();Pn.default=function(n){n.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse,i=t.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(oi.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),n.helpers.each(e,t)):r(this);if(t.data&&t.ids){var o=oi.createFrame(t.data);o.contextPath=oi.appendContextPath(t.data.contextPath,t.name),t={data:o}}return i(e,t)})};Ss.exports=Pn.default});var As=D((In,ks)=>{"use strict";In.__esModule=!0;function Eu(n){return n&&n.__esModule?n:{default:n}}var Vt=ce(),Ou=me(),Pu=Eu(Ou);In.default=function(n){n.registerHelper("each",function(e,t){if(!t)throw new Pu.default("Must pass iterator to #each");var r=t.fn,i=t.inverse,o=0,a="",l=void 0,p=void 0;t.data&&t.ids&&(p=Vt.appendContextPath(t.data.contextPath,t.ids[0])+"."),Vt.isFunction(e)&&(e=e.call(this)),t.data&&(l=Vt.createFrame(t.data));function c(C,L,K){l&&(l.key=C,l.index=L,l.first=L===0,l.last=!!K,p&&(l.contextPath=p+C)),a=a+r(e[C],{data:l,blockParams:Vt.blockParams([e[C],C],[p+C,null])})}if(e&&typeof e=="object")if(Vt.isArray(e))for(var h=e.length;o<h;o++)o in e&&c(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var u=[],d=e[Symbol.iterator](),v=d.next();!v.done;v=d.next())u.push(v.value);e=u;for(var h=e.length;o<h;o++)c(o,o,o===e.length-1)}else(function(){var C=void 0;Object.keys(e).forEach(function(L){C!==void 0&&c(C,o-1),C=L,o++}),C!==void 0&&c(C,o-1,!0)})();return o===0&&(a=i(this)),a})};ks.exports=In.default});var Os=D((Tn,Es)=>{"use strict";Tn.__esModule=!0;function Iu(n){return n&&n.__esModule?n:{default:n}}var Tu=me(),Ru=Iu(Tu);Tn.default=function(n){n.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Ru.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Es.exports=Tn.default});var Rs=D((Rn,Ts)=>{"use strict";Rn.__esModule=!0;function Lu(n){return n&&n.__esModule?n:{default:n}}var Ps=ce(),Nu=me(),Is=Lu(Nu);Rn.default=function(n){n.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Is.default("#if requires exactly one argument");return Ps.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Ps.isEmpty(e)?t.inverse(this):t.fn(this)}),n.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Is.default("#unless requires exactly one argument");return n.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Ts.exports=Rn.default});var Ns=D((Ln,Ls)=>{"use strict";Ln.__esModule=!0;Ln.default=function(n){n.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;t.hash.level!=null?i=t.hash.level:t.data&&t.data.level!=null&&(i=t.data.level),e[0]=i,n.log.apply(n,e)})};Ls.exports=Ln.default});var Ds=D((Nn,Ms)=>{"use strict";Nn.__esModule=!0;Nn.default=function(n){n.registerHelper("lookup",function(e,t,r){return e&&r.lookupProperty(e,t)})};Ms.exports=Nn.default});var Fs=D((Mn,Vs)=>{"use strict";Mn.__esModule=!0;function Mu(n){return n&&n.__esModule?n:{default:n}}var Ft=ce(),Du=me(),Vu=Mu(Du);Mn.default=function(n){n.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Vu.default("#with requires exactly one argument");Ft.isFunction(e)&&(e=e.call(this));var r=t.fn;if(Ft.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&(i=Ft.createFrame(t.data),i.contextPath=Ft.appendContextPath(t.data.contextPath,t.ids[0])),r(e,{data:i,blockParams:Ft.blockParams([e],[i&&i.contextPath])})})};Vs.exports=Mn.default});var si=D(Dn=>{"use strict";Dn.__esModule=!0;Dn.registerDefaultHelpers=Xu;Dn.moveHelperToHooks=Zu;function Ze(n){return n&&n.__esModule?n:{default:n}}var Fu=Cs(),Bu=Ze(Fu),$u=As(),Hu=Ze($u),ju=Os(),qu=Ze(ju),Gu=Rs(),Wu=Ze(Gu),Uu=Ns(),Ju=Ze(Uu),Yu=Ds(),Ku=Ze(Yu),zu=Fs(),Qu=Ze(zu);function Xu(n){Bu.default(n),Hu.default(n),qu.default(n),Wu.default(n),Ju.default(n),Ku.default(n),Qu.default(n)}function Zu(n,e,t){n.helpers[e]&&(n.hooks[e]=n.helpers[e],t||(n.helpers[e]=void 0))}});var $s=D((Vn,Bs)=>{"use strict";Vn.__esModule=!0;var ep=ce();Vn.default=function(n){n.registerDecorator("inline",function(e,t,r,i){var o=e;return t.partials||(t.partials={},o=function(a,l){var p=r.partials;r.partials=ep.extend({},p,t.partials);var c=e(a,l);return r.partials=p,c}),t.partials[i.args[0]]=i.fn,o})};Bs.exports=Vn.default});var Hs=D(ai=>{"use strict";ai.__esModule=!0;ai.registerDefaultDecorators=ip;function tp(n){return n&&n.__esModule?n:{default:n}}var np=$s(),rp=tp(np);function ip(n){rp.default(n)}});var li=D((Fn,js)=>{"use strict";Fn.__esModule=!0;var op=ce(),ht={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=op.indexOf(ht.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=ht.lookupLevel(e),typeof console<"u"&&ht.lookupLevel(ht.level)<=e){var t=ht.methodMap[e];console[t]||(t="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[t].apply(console,i)}}};Fn.default=ht;js.exports=Fn.default});var ci=D(Bt=>{"use strict";Bt.__esModule=!0;Bt.createProtoAccessControl=cp;Bt.resultIsAllowed=up;Bt.resetLoggedProperties=fp;function sp(n){return n&&n.__esModule?n:{default:n}}var qs=ce(),ap=li(),lp=sp(ap),Bn=Object.create(null);function cp(n){var e=Object.create(null);e.__proto__=!1,qs.extend(e,n.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,qs.extend(t,n.allowedProtoMethods),{properties:{whitelist:e,defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:n.allowProtoMethodsByDefault}}}function up(n,e,t){return Gs(typeof n=="function"?e.methods:e.properties,t)}function Gs(n,e){return n.whitelist[e]!==void 0?n.whitelist[e]===!0:n.defaultValue!==void 0?n.defaultValue:(pp(e),!1)}function pp(n){Bn[n]!==!0&&(Bn[n]=!0,lp.default.log("error",'Handlebars: Access has been denied to resolve the property "'+n+`" because it is not an "own property" of its parent.
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 ie.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()}`,ie.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Gg(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),u=this.options.find(f=>f.negate&&a===f.attributeName()),d=this.options.find(f=>!f.negate&&a===f.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:d||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=zl(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=zl(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=>Hg(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)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=xt.basename(e,xt.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===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(ie.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 Wl(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 wo(){if(ie.env.NO_COLOR||ie.env.FORCE_COLOR==="0"||ie.env.FORCE_COLOR==="false")return!1;if(ie.env.FORCE_COLOR||ie.env.CLICOLOR_FORCE!==void 0)return!0}bo.Command=_o;bo.useColor=wo});var Ql=w(Ge=>{var{Argument:Jl}=wi(),{Command:So}=Kl(),{CommanderError:zg,InvalidArgumentError:Yl}=on(),{Help:Wg}=fo(),{Option:Xl}=go();Ge.program=new So;Ge.createCommand=t=>new So(t);Ge.createOption=(t,e)=>new Xl(t,e);Ge.createArgument=(t,e)=>new Jl(t,e);Ge.Command=So;Ge.Option=Xl;Ge.Argument=Jl;Ge.Help=Wg;Ge.CommanderError=zg;Ge.InvalidArgumentError=Yl;Ge.InvalidOptionArgumentError=Yl});var pn=w(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.regexpCode=re.getEsmExportName=re.getProperty=re.safeStringify=re.stringify=re.strConcat=re.addCodeArg=re.str=re._=re.nil=re._Code=re.Name=re.IDENTIFIER=re._CodeOrName=void 0;var fn=class{};re._CodeOrName=fn;re.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Yt=class extends fn{constructor(e){if(super(),!re.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};re.Name=Yt;var ze=class extends fn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Yt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};re._Code=ze;re.nil=new ze("");function ju(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Oo(r,e[n]),r.push(t[++n]);return new ze(r)}re._=ju;var Po=new ze("+");function Du(t,...e){let r=[dn(t[0])],n=0;for(;n<e.length;)r.push(Po),Oo(r,e[n]),r.push(Po,dn(t[++n]));return Py(r),new ze(r)}re.str=Du;function Oo(t,e){e instanceof ze?t.push(...e._items):e instanceof Yt?t.push(e):t.push(Ry(e))}re.addCodeArg=Oo;function Py(t){let e=1;for(;e<t.length-1;){if(t[e]===Po){let r=Oy(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oy(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Yt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Yt))return`"${t}${e.slice(1)}`}function Ay(t,e){return e.emptyStr()?t:t.emptyStr()?e:Du`${t}${e}`}re.strConcat=Ay;function Ry(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:dn(Array.isArray(t)?t.join(","):t)}function Iy(t){return new ze(dn(t))}re.stringify=Iy;function dn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}re.safeStringify=dn;function Ty(t){return typeof t=="string"&&re.IDENTIFIER.test(t)?new ze(`.${t}`):ju`[${t}]`}re.getProperty=Ty;function Ny(t){if(typeof t=="string"&&re.IDENTIFIER.test(t))return new ze(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}re.getEsmExportName=Ny;function My(t){return new ze(t.toString())}re.regexpCode=My});var Io=w(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.ValueScope=Le.ValueScopeName=Le.Scope=Le.varKinds=Le.UsedValueState=void 0;var Me=pn(),Ao=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ci;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ci||(Le.UsedValueState=Ci={}));Le.varKinds={const:new Me.Name("const"),let:new Me.Name("let"),var:new Me.Name("var")};var ki=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Me.Name?e:this.name(e)}name(e){return new Me.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Le.Scope=ki;var xi=class extends Me.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Me._)`.${new Me.Name(r)}[${n}]`}};Le.ValueScopeName=xi;var Ly=(0,Me._)`\n`,Ro=class extends ki{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ly:Me.nil}}get(){return this._scope}name(e){return new xi(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let d=a.get(o);if(d)return d}else a=this._values[s]=new Map;a.set(o,i);let l=this._scope[s]||(this._scope[s]=[]),u=l.length;return l[u]=r.ref,i.setValue(r,{property:s,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Me._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let s=Me.nil;for(let o in e){let a=e[o];if(!a)continue;let l=n[o]=n[o]||new Map;a.forEach(u=>{if(l.has(u))return;l.set(u,Ci.Started);let d=r(u);if(d){let f=this.opts.es5?Le.varKinds.var:Le.varKinds.const;s=(0,Me._)`${s}${f} ${u} = ${d};${this.opts._n}`}else if(d=i?.(u))s=(0,Me._)`${s}${d}${this.opts._n}`;else throw new Ao(u);l.set(u,Ci.Completed)})}return s}};Le.ValueScope=Ro});var W=w(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.or=J.and=J.not=J.CodeGen=J.operators=J.varKinds=J.ValueScopeName=J.ValueScope=J.Scope=J.Name=J.regexpCode=J.stringify=J.getProperty=J.nil=J.strConcat=J.str=J._=void 0;var ee=pn(),at=Io(),jt=pn();Object.defineProperty(J,"_",{enumerable:!0,get:function(){return jt._}});Object.defineProperty(J,"str",{enumerable:!0,get:function(){return jt.str}});Object.defineProperty(J,"strConcat",{enumerable:!0,get:function(){return jt.strConcat}});Object.defineProperty(J,"nil",{enumerable:!0,get:function(){return jt.nil}});Object.defineProperty(J,"getProperty",{enumerable:!0,get:function(){return jt.getProperty}});Object.defineProperty(J,"stringify",{enumerable:!0,get:function(){return jt.stringify}});Object.defineProperty(J,"regexpCode",{enumerable:!0,get:function(){return jt.regexpCode}});Object.defineProperty(J,"Name",{enumerable:!0,get:function(){return jt.Name}});var Ri=Io();Object.defineProperty(J,"Scope",{enumerable:!0,get:function(){return Ri.Scope}});Object.defineProperty(J,"ValueScope",{enumerable:!0,get:function(){return Ri.ValueScope}});Object.defineProperty(J,"ValueScopeName",{enumerable:!0,get:function(){return Ri.ValueScopeName}});Object.defineProperty(J,"varKinds",{enumerable:!0,get:function(){return Ri.varKinds}});J.operators={GT:new ee._Code(">"),GTE:new ee._Code(">="),LT:new ee._Code("<"),LTE:new ee._Code("<="),EQ:new ee._Code("==="),NEQ:new ee._Code("!=="),NOT:new ee._Code("!"),OR:new ee._Code("||"),AND:new ee._Code("&&"),ADD:new ee._Code("+")};var Ot=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},To=class extends Ot{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?at.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Sr(this.rhs,e,r)),this}get names(){return this.rhs instanceof ee._CodeOrName?this.rhs.names:{}}},Pi=class extends Ot{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ee.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Sr(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ee.Name?{}:{...this.lhs.names};return Ai(e,this.rhs)}},No=class extends Pi{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Mo=class extends Ot{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Lo=class extends Ot{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},jo=class extends Ot{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Do=class extends Ot{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Sr(this.code,e,r),this}get names(){return this.code instanceof ee._CodeOrName?this.code.names:{}}},hn=class extends Ot{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(e,r)||(jy(e,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Zt(e,r.names),{})}},At=class extends hn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},qo=class extends hn{},br=class extends At{};br.kind="else";var Xt=class t extends At{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new br(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(qu(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Sr(this.condition,e,r),this}get names(){let e=super.names;return Ai(e,this.condition),this.else&&Zt(e,this.else.names),e}};Xt.kind="if";var Qt=class extends At{};Qt.kind="for";var Vo=class extends Qt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Sr(this.iteration,e,r),this}get names(){return Zt(super.names,this.iteration.names)}},Fo=class extends Qt{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?at.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Ai(super.names,this.from);return Ai(e,this.to)}},Oi=class extends Qt{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Sr(this.iterable,e,r),this}get names(){return Zt(super.names,this.iterable.names)}},mn=class extends At{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};mn.kind="func";var gn=class extends hn{render(e){return"return "+super.render(e)}};gn.kind="return";var Ho=class extends At{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Zt(e,this.catch.names),this.finally&&Zt(e,this.finally.names),e}},yn=class extends At{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};yn.kind="catch";var vn=class extends At{render(e){return"finally"+super.render(e)}};vn.kind="finally";var Bo=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
30
+ `:""},this._extScope=e,this._scope=new at.Scope({parent:e}),this._nodes=[new qo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new To(e,s,n)),s}const(e,r,n){return this._def(at.varKinds.const,e,r,n)}let(e,r,n){return this._def(at.varKinds.let,e,r,n)}var(e,r,n){return this._def(at.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Pi(e,r,n))}add(e,r){return this._leafNode(new No(e,J.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ee.nil&&this._leafNode(new Do(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ee.addCodeArg)(r,i));return r.push("}"),new ee._Code(r)}if(e,r,n){if(this._blockNode(new Xt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Xt(e))}else(){return this._elseNode(new br)}endIf(){return this._endBlockNode(Xt,br)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Vo(e),r)}forRange(e,r,n,i,s=this.opts.es5?at.varKinds.var:at.varKinds.let){let o=this._scope.toName(e);return this._for(new Fo(s,o,r,n),()=>i(o))}forOf(e,r,n,i=at.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let o=r instanceof ee.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ee._)`${o}.length`,a=>{this.var(s,(0,ee._)`${o}[${a}]`),n(s)})}return this._for(new Oi("of",i,s,r),()=>n(s))}forIn(e,r,n,i=this.opts.es5?at.varKinds.var:at.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ee._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new Oi("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(Qt)}label(e){return this._leafNode(new Mo(e))}break(e){return this._leafNode(new Lo(e))}return(e){let r=new gn;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(gn)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Ho;if(this._blockNode(i),this.code(e),r){let s=this.name("e");this._currNode=i.catch=new yn(s),r(s)}return n&&(this._currNode=i.finally=new vn,this.code(n)),this._endBlockNode(yn,vn)}throw(e){return this._leafNode(new jo(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ee.nil,n,i){return this._blockNode(new mn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(mn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Xt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};J.CodeGen=Bo;function Zt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Ai(t,e){return e instanceof ee._CodeOrName?Zt(t,e.names):t}function Sr(t,e,r){if(t instanceof ee.Name)return n(t);if(!i(t))return t;return new ee._Code(t._items.reduce((s,o)=>(o instanceof ee.Name&&(o=n(o)),o instanceof ee._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=r[s.str];return o===void 0||e[s.str]!==1?s:(delete e[s.str],o)}function i(s){return s instanceof ee._Code&&s._items.some(o=>o instanceof ee.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function jy(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function qu(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ee._)`!${Uo(t)}`}J.not=qu;var Dy=Vu(J.operators.AND);function qy(...t){return t.reduce(Dy)}J.and=qy;var Vy=Vu(J.operators.OR);function Fy(...t){return t.reduce(Vy)}J.or=Fy;function Vu(t){return(e,r)=>e===ee.nil?r:r===ee.nil?e:(0,ee._)`${Uo(e)} ${t} ${Uo(r)}`}function Uo(t){return t instanceof ee.Name?t:(0,ee._)`(${t})`}});var X=w(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.checkStrictMode=Y.getErrorPath=Y.Type=Y.useFunc=Y.setEvaluated=Y.evaluatedPropsToName=Y.mergeEvaluated=Y.eachItem=Y.unescapeJsonPointer=Y.escapeJsonPointer=Y.escapeFragment=Y.unescapeFragment=Y.schemaRefOrVal=Y.schemaHasRulesButRef=Y.schemaHasRules=Y.checkUnknownRules=Y.alwaysValidSchema=Y.toHash=void 0;var ae=W(),Hy=pn();function By(t){let e={};for(let r of t)e[r]=!0;return e}Y.toHash=By;function Uy(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Bu(t,e),!Uu(e,t.self.RULES.all))}Y.alwaysValidSchema=Uy;function Bu(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let s in e)i[s]||Wu(t,`unknown keyword: "${s}"`)}Y.checkUnknownRules=Bu;function Uu(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Y.schemaHasRules=Uu;function Gy(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Y.schemaHasRulesButRef=Gy;function zy({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ae._)`${r}`}return(0,ae._)`${t}${e}${(0,ae.getProperty)(n)}`}Y.schemaRefOrVal=zy;function Wy(t){return Gu(decodeURIComponent(t))}Y.unescapeFragment=Wy;function Ky(t){return encodeURIComponent(zo(t))}Y.escapeFragment=Ky;function zo(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Y.escapeJsonPointer=zo;function Gu(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Y.unescapeJsonPointer=Gu;function Jy(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Y.eachItem=Jy;function Fu({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let l=o===void 0?s:o instanceof ae.Name?(s instanceof ae.Name?t(i,s,o):e(i,s,o),o):s instanceof ae.Name?(e(i,o,s),s):r(s,o);return a===ae.Name&&!(l instanceof ae.Name)?n(i,l):l}}Y.mergeEvaluated={props:Fu({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ae._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ae._)`${r} || {}`).code((0,ae._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ae._)`${r} || {}`),Wo(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:zu}),items:Fu({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ae._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ae._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function zu(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ae._)`{}`);return e!==void 0&&Wo(t,r,e),r}Y.evaluatedPropsToName=zu;function Wo(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ae._)`${e}${(0,ae.getProperty)(n)}`,!0))}Y.setEvaluated=Wo;var Hu={};function Yy(t,e){return t.scopeValue("func",{ref:e,code:Hu[e.code]||(Hu[e.code]=new Hy._Code(e.code))})}Y.useFunc=Yy;var Go;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Go||(Y.Type=Go={}));function Xy(t,e,r){if(t instanceof ae.Name){let n=e===Go.Num;return r?n?(0,ae._)`"[" + ${t} + "]"`:(0,ae._)`"['" + ${t} + "']"`:n?(0,ae._)`"/" + ${t}`:(0,ae._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ae.getProperty)(t).toString():"/"+zo(t)}Y.getErrorPath=Xy;function Wu(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Y.checkStrictMode=Wu});var We=w(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Ce=W(),Qy={data:new Ce.Name("data"),valCxt:new Ce.Name("valCxt"),instancePath:new Ce.Name("instancePath"),parentData:new Ce.Name("parentData"),parentDataProperty:new Ce.Name("parentDataProperty"),rootData:new Ce.Name("rootData"),dynamicAnchors:new Ce.Name("dynamicAnchors"),vErrors:new Ce.Name("vErrors"),errors:new Ce.Name("errors"),this:new Ce.Name("this"),self:new Ce.Name("self"),scope:new Ce.Name("scope"),json:new Ce.Name("json"),jsonPos:new Ce.Name("jsonPos"),jsonLen:new Ce.Name("jsonLen"),jsonPart:new Ce.Name("jsonPart")};Ko.default=Qy});var _n=w(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.extendErrors=ke.resetErrorsCount=ke.reportExtraError=ke.reportError=ke.keyword$DataError=ke.keywordError=void 0;var te=W(),Ii=X(),Ae=We();ke.keywordError={message:({keyword:t})=>(0,te.str)`must pass "${t}" keyword validation`};ke.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,te.str)`"${t}" keyword must be ${e} ($data)`:(0,te.str)`"${t}" keyword is invalid ($data)`};function Zy(t,e=ke.keywordError,r,n){let{it:i}=t,{gen:s,compositeRule:o,allErrors:a}=i,l=Yu(t,e,r);n??(o||a)?Ku(s,l):Ju(i,(0,te._)`[${l}]`)}ke.reportError=Zy;function ev(t,e=ke.keywordError,r){let{it:n}=t,{gen:i,compositeRule:s,allErrors:o}=n,a=Yu(t,e,r);Ku(i,a),s||o||Ju(n,Ae.default.vErrors)}ke.reportExtraError=ev;function tv(t,e){t.assign(Ae.default.errors,e),t.if((0,te._)`${Ae.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,te._)`${Ae.default.vErrors}.length`,e),()=>t.assign(Ae.default.vErrors,null)))}ke.resetErrorsCount=tv;function rv({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",i,Ae.default.errors,a=>{t.const(o,(0,te._)`${Ae.default.vErrors}[${a}]`),t.if((0,te._)`${o}.instancePath === undefined`,()=>t.assign((0,te._)`${o}.instancePath`,(0,te.strConcat)(Ae.default.instancePath,s.errorPath))),t.assign((0,te._)`${o}.schemaPath`,(0,te.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,te._)`${o}.schema`,r),t.assign((0,te._)`${o}.data`,n))})}ke.extendErrors=rv;function Ku(t,e){let r=t.const("err",e);t.if((0,te._)`${Ae.default.vErrors} === null`,()=>t.assign(Ae.default.vErrors,(0,te._)`[${r}]`),(0,te._)`${Ae.default.vErrors}.push(${r})`),t.code((0,te._)`${Ae.default.errors}++`)}function Ju(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,te._)`new ${t.ValidationError}(${e})`):(r.assign((0,te._)`${n}.errors`,e),r.return(!1))}var er={keyword:new te.Name("keyword"),schemaPath:new te.Name("schemaPath"),params:new te.Name("params"),propertyName:new te.Name("propertyName"),message:new te.Name("message"),schema:new te.Name("schema"),parentSchema:new te.Name("parentSchema")};function Yu(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,te._)`{}`:nv(t,e,r)}function nv(t,e,r={}){let{gen:n,it:i}=t,s=[iv(i,r),sv(t,r)];return ov(t,e,s),n.object(...s)}function iv({errorPath:t},{instancePath:e}){let r=e?(0,te.str)`${t}${(0,Ii.getErrorPath)(e,Ii.Type.Str)}`:t;return[Ae.default.instancePath,(0,te.strConcat)(Ae.default.instancePath,r)]}function sv({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,te.str)`${e}/${t}`;return r&&(i=(0,te.str)`${i}${(0,Ii.getErrorPath)(r,Ii.Type.Str)}`),[er.schemaPath,i]}function ov(t,{params:e,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=t,{opts:l,propertyName:u,topSchemaRef:d,schemaPath:f}=a;n.push([er.keyword,i],[er.params,typeof e=="function"?e(t):e||(0,te._)`{}`]),l.messages&&n.push([er.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([er.schema,o],[er.parentSchema,(0,te._)`${d}${f}`],[Ae.default.data,s]),u&&n.push([er.propertyName,u])}});var Qu=w(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.boolOrEmptySchema=Er.topBoolOrEmptySchema=void 0;var av=_n(),cv=W(),lv=We(),uv={message:"boolean schema is false"};function fv(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Xu(t,!1):typeof r=="object"&&r.$async===!0?e.return(lv.default.data):(e.assign((0,cv._)`${n}.errors`,null),e.return(!0))}Er.topBoolOrEmptySchema=fv;function dv(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Xu(t)):r.var(e,!0)}Er.boolOrEmptySchema=dv;function Xu(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,av.reportError)(i,uv,void 0,e)}});var Jo=w($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.getRules=$r.isJSONType=void 0;var pv=["string","number","integer","boolean","null","object","array"],hv=new Set(pv);function mv(t){return typeof t=="string"&&hv.has(t)}$r.isJSONType=mv;function gv(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}$r.getRules=gv});var Yo=w(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.shouldUseRule=Dt.shouldUseGroup=Dt.schemaHasRulesForType=void 0;function yv({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Zu(t,n)}Dt.schemaHasRulesForType=yv;function Zu(t,e){return e.rules.some(r=>ef(t,r))}Dt.shouldUseGroup=Zu;function ef(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Dt.shouldUseRule=ef});var wn=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.reportTypeError=xe.checkDataTypes=xe.checkDataType=xe.coerceAndCheckDataType=xe.getJSONTypes=xe.getSchemaTypes=xe.DataType=void 0;var vv=Jo(),_v=Yo(),wv=_n(),K=W(),tf=X(),Cr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Cr||(xe.DataType=Cr={}));function bv(t){let e=rf(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}xe.getSchemaTypes=bv;function rf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(vv.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}xe.getJSONTypes=rf;function Sv(t,e){let{gen:r,data:n,opts:i}=t,s=Ev(e,i.coerceTypes),o=e.length>0&&!(s.length===0&&e.length===1&&(0,_v.schemaHasRulesForType)(t,e[0]));if(o){let a=Qo(e,n,i.strictNumbers,Cr.Wrong);r.if(a,()=>{s.length?$v(t,e,s):Zo(t)})}return o}xe.coerceAndCheckDataType=Sv;var nf=new Set(["string","number","integer","boolean","null"]);function Ev(t,e){return e?t.filter(r=>nf.has(r)||e==="array"&&r==="array"):[]}function $v(t,e,r){let{gen:n,data:i,opts:s}=t,o=n.let("dataType",(0,K._)`typeof ${i}`),a=n.let("coerced",(0,K._)`undefined`);s.coerceTypes==="array"&&n.if((0,K._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,K._)`${i}[0]`).assign(o,(0,K._)`typeof ${i}`).if(Qo(e,i,s.strictNumbers),()=>n.assign(a,i))),n.if((0,K._)`${a} !== undefined`);for(let u of r)(nf.has(u)||u==="array"&&s.coerceTypes==="array")&&l(u);n.else(),Zo(t),n.endIf(),n.if((0,K._)`${a} !== undefined`,()=>{n.assign(i,a),Cv(t,a)});function l(u){switch(u){case"string":n.elseIf((0,K._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,K._)`"" + ${i}`).elseIf((0,K._)`${i} === null`).assign(a,(0,K._)`""`);return;case"number":n.elseIf((0,K._)`${o} == "boolean" || ${i} === null
31
+ || (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,K._)`+${i}`);return;case"integer":n.elseIf((0,K._)`${o} === "boolean" || ${i} === null
32
+ || (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,K._)`+${i}`);return;case"boolean":n.elseIf((0,K._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,K._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,K._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,K._)`${o} === "string" || ${o} === "number"
33
+ || ${o} === "boolean" || ${i} === null`).assign(a,(0,K._)`[${i}]`)}}}function Cv({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,K._)`${e} !== undefined`,()=>t.assign((0,K._)`${e}[${r}]`,n))}function Xo(t,e,r,n=Cr.Correct){let i=n===Cr.Correct?K.operators.EQ:K.operators.NEQ,s;switch(t){case"null":return(0,K._)`${e} ${i} null`;case"array":s=(0,K._)`Array.isArray(${e})`;break;case"object":s=(0,K._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=o((0,K._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=o();break;default:return(0,K._)`typeof ${e} ${i} ${t}`}return n===Cr.Correct?s:(0,K.not)(s);function o(a=K.nil){return(0,K.and)((0,K._)`typeof ${e} == "number"`,a,r?(0,K._)`isFinite(${e})`:K.nil)}}xe.checkDataType=Xo;function Qo(t,e,r,n){if(t.length===1)return Xo(t[0],e,r,n);let i,s=(0,tf.toHash)(t);if(s.array&&s.object){let o=(0,K._)`typeof ${e} != "object"`;i=s.null?o:(0,K._)`!${e} || ${o}`,delete s.null,delete s.array,delete s.object}else i=K.nil;s.number&&delete s.integer;for(let o in s)i=(0,K.and)(i,Xo(o,e,r,n));return i}xe.checkDataTypes=Qo;var kv={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,K._)`{type: ${t}}`:(0,K._)`{type: ${e}}`};function Zo(t){let e=xv(t);(0,wv.reportError)(e,kv)}xe.reportTypeError=Zo;function xv(t){let{gen:e,data:r,schema:n}=t,i=(0,tf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var of=w(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.assignDefaults=void 0;var kr=W(),Pv=X();function Ov(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)sf(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,s)=>sf(t,s,i.default))}Ti.assignDefaults=Ov;function sf(t,e,r){let{gen:n,compositeRule:i,data:s,opts:o}=t;if(r===void 0)return;let a=(0,kr._)`${s}${(0,kr.getProperty)(e)}`;if(i){(0,Pv.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,kr._)`${a} === undefined`;o.useDefaults==="empty"&&(l=(0,kr._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,kr._)`${a} = ${(0,kr.stringify)(r)}`)}});var Ke=w(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.validateUnion=oe.validateArray=oe.usePattern=oe.callValidateCode=oe.schemaProperties=oe.allSchemaProperties=oe.noPropertyInData=oe.propertyInData=oe.isOwnProperty=oe.hasPropFunc=oe.reportMissingProp=oe.checkMissingProp=oe.checkReportMissingProp=void 0;var ue=W(),ea=X(),qt=We(),Av=X();function Rv(t,e){let{gen:r,data:n,it:i}=t;r.if(ra(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ue._)`${e}`},!0),t.error()})}oe.checkReportMissingProp=Rv;function Iv({gen:t,data:e,it:{opts:r}},n,i){return(0,ue.or)(...n.map(s=>(0,ue.and)(ra(t,e,s,r.ownProperties),(0,ue._)`${i} = ${s}`)))}oe.checkMissingProp=Iv;function Tv(t,e){t.setParams({missingProperty:e},!0),t.error()}oe.reportMissingProp=Tv;function af(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ue._)`Object.prototype.hasOwnProperty`})}oe.hasPropFunc=af;function ta(t,e,r){return(0,ue._)`${af(t)}.call(${e}, ${r})`}oe.isOwnProperty=ta;function Nv(t,e,r,n){let i=(0,ue._)`${e}${(0,ue.getProperty)(r)} !== undefined`;return n?(0,ue._)`${i} && ${ta(t,e,r)}`:i}oe.propertyInData=Nv;function ra(t,e,r,n){let i=(0,ue._)`${e}${(0,ue.getProperty)(r)} === undefined`;return n?(0,ue.or)(i,(0,ue.not)(ta(t,e,r))):i}oe.noPropertyInData=ra;function cf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}oe.allSchemaProperties=cf;function Mv(t,e){return cf(e).filter(r=>!(0,ea.alwaysValidSchema)(t,e[r]))}oe.schemaProperties=Mv;function Lv({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,l,u){let d=u?(0,ue._)`${t}, ${e}, ${n}${i}`:e,f=[[qt.default.instancePath,(0,ue.strConcat)(qt.default.instancePath,s)],[qt.default.parentData,o.parentData],[qt.default.parentDataProperty,o.parentDataProperty],[qt.default.rootData,qt.default.rootData]];o.opts.dynamicRef&&f.push([qt.default.dynamicAnchors,qt.default.dynamicAnchors]);let h=(0,ue._)`${d}, ${r.object(...f)}`;return l!==ue.nil?(0,ue._)`${a}.call(${l}, ${h})`:(0,ue._)`${a}(${h})`}oe.callValidateCode=Lv;var jv=(0,ue._)`new RegExp`;function Dv({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ue._)`${i.code==="new RegExp"?jv:(0,Av.useFunc)(t,i)}(${r}, ${n})`})}oe.usePattern=Dv;function qv(t){let{gen:e,data:r,keyword:n,it:i}=t,s=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(s,!0),o(()=>e.break()),s;function o(a){let l=e.const("len",(0,ue._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:ea.Type.Num},s),e.if((0,ue.not)(s),a)})}}oe.validateArray=qv;function Vv(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,ea.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let d=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(o,(0,ue._)`${o} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,ue.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}oe.validateUnion=Vv});var ff=w(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.validateKeywordUsage=ht.validSchemaType=ht.funcKeywordCode=ht.macroKeywordCode=void 0;var Re=W(),tr=We(),Fv=Ke(),Hv=_n();function Bv(t,e){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=t,a=e.macro.call(o.self,i,s,o),l=uf(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Re.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ht.macroKeywordCode=Bv;function Uv(t,e){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:l}=t;zv(l,e);let u=!a&&e.compile?e.compile.call(l.self,s,o,l):e.validate,d=uf(n,i,u),f=n.let("valid");t.block$data(f,h),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function h(){if(e.errors===!1)_(),e.modifying&&lf(t),x(()=>t.error());else{let E=e.async?m():g();e.modifying&&lf(t),x(()=>Gv(t,E))}}function m(){let E=n.let("ruleErrs",null);return n.try(()=>_((0,Re._)`await `),V=>n.assign(f,!1).if((0,Re._)`${V} instanceof ${l.ValidationError}`,()=>n.assign(E,(0,Re._)`${V}.errors`),()=>n.throw(V))),E}function g(){let E=(0,Re._)`${d}.errors`;return n.assign(E,null),_(Re.nil),E}function _(E=e.async?(0,Re._)`await `:Re.nil){let V=l.opts.passContext?tr.default.this:tr.default.self,G=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,Re._)`${E}${(0,Fv.callValidateCode)(t,d,V,G)}`,e.modifying)}function x(E){var V;n.if((0,Re.not)((V=e.valid)!==null&&V!==void 0?V:f),E)}}ht.funcKeywordCode=Uv;function lf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Re._)`${n.parentData}[${n.parentDataProperty}]`))}function Gv(t,e){let{gen:r}=t;r.if((0,Re._)`Array.isArray(${e})`,()=>{r.assign(tr.default.vErrors,(0,Re._)`${tr.default.vErrors} === null ? ${e} : ${tr.default.vErrors}.concat(${e})`).assign(tr.default.errors,(0,Re._)`${tr.default.vErrors}.length`),(0,Hv.extendErrors)(t)},()=>t.error())}function zv({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function uf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Re.stringify)(r)})}function Wv(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}ht.validSchemaType=Wv;function Kv({schema:t,opts:e,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[s])){let l=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}ht.validateKeywordUsage=Kv});var pf=w(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;var mt=W(),df=X();function Jv(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,mt._)`${t.schemaPath}${(0,mt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,mt._)`${t.schemaPath}${(0,mt.getProperty)(e)}${(0,mt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,df.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=Jv;function Yv(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:u,dataPathArr:d,opts:f}=e,h=a.let("data",(0,mt._)`${e.data}${(0,mt.getProperty)(r)}`,!0);l(h),t.errorPath=(0,mt.str)`${u}${(0,df.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,mt._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let u=i instanceof mt.Name?i:a.let("data",i,!0);l(u),o!==void 0&&(t.propertyName=o)}s&&(t.dataTypes=s);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Vt.extendSubschemaData=Yv;function Xv(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}Vt.extendSubschemaMode=Xv});var na=w((rx,hf)=>{"use strict";hf.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}});var gf=w((nx,mf)=>{"use strict";var Ft=mf.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Ni(e,n,i,t,"",t)};Ft.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ft.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ft.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ft.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ni(t,e,r,n,i,s,o,a,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,s,o,a,l,u);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in Ft.arrayKeywords)for(var h=0;h<f.length;h++)Ni(t,e,r,f[h],i+"/"+d+"/"+h,s,i,d,n,h)}else if(d in Ft.propsKeywords){if(f&&typeof f=="object")for(var m in f)Ni(t,e,r,f[m],i+"/"+d+"/"+Qv(m),s,i,d,n,m)}else(d in Ft.keywords||t.allKeys&&!(d in Ft.skipKeywords))&&Ni(t,e,r,f,i+"/"+d,s,i,d,n)}r(n,i,s,o,a,l,u)}}function Qv(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var bn=w(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;var Zv=X(),e_=na(),t_=gf(),r_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n_(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ia(t):e?yf(t)<=e:!1}je.inlineRef=n_;var i_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ia(t){for(let e in t){if(i_.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ia)||typeof r=="object"&&ia(r))return!0}return!1}function yf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!r_.has(r)&&(typeof t[r]=="object"&&(0,Zv.eachItem)(t[r],n=>e+=yf(n)),e===1/0))return 1/0}return e}function vf(t,e="",r){r!==!1&&(e=xr(e));let n=t.parse(e);return _f(t,n)}je.getFullPath=vf;function _f(t,e){return t.serialize(e).split("#")[0]+"#"}je._getFullPath=_f;var s_=/#\/?$/;function xr(t){return t?t.replace(s_,""):""}je.normalizeId=xr;function o_(t,e,r){return r=xr(r),t.resolve(e,r)}je.resolveUrl=o_;var a_=/^[a-z_][-a-z0-9._]*$/i;function c_(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=xr(t[r]||e),s={"":i},o=vf(n,i,!1),a={},l=new Set;return t_(t,{allKeys:!0},(f,h,m,g)=>{if(g===void 0)return;let _=o+h,x=s[g];typeof f[r]=="string"&&(x=E.call(this,f[r])),V.call(this,f.$anchor),V.call(this,f.$dynamicAnchor),s[h]=x;function E(G){let j=this.opts.uriResolver.resolve;if(G=xr(x?j(x,G):G),l.has(G))throw d(G);l.add(G);let L=this.refs[G];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?u(f,L.schema,G):G!==xr(_)&&(G[0]==="#"?(u(f,a[G],G),a[G]=f):this.refs[G]=_),G}function V(G){if(typeof G=="string"){if(!a_.test(G))throw new Error(`invalid anchor "${G}"`);E.call(this,`#${G}`)}}}),a;function u(f,h,m){if(h!==void 0&&!e_(f,h))throw d(m)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}je.getSchemaRefs=c_});var $n=w(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.getData=Ht.KeywordCxt=Ht.validateFunctionCode=void 0;var $f=Qu(),wf=wn(),oa=Yo(),Mi=wn(),l_=of(),En=ff(),sa=pf(),q=W(),z=We(),u_=bn(),Rt=X(),Sn=_n();function f_(t){if(xf(t)&&(Pf(t),kf(t))){h_(t);return}Cf(t,()=>(0,$f.topBoolOrEmptySchema)(t))}Ht.validateFunctionCode=f_;function Cf({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},s){i.code.es5?t.func(e,(0,q._)`${z.default.data}, ${z.default.valCxt}`,n.$async,()=>{t.code((0,q._)`"use strict"; ${bf(r,i)}`),p_(t,i),t.code(s)}):t.func(e,(0,q._)`${z.default.data}, ${d_(i)}`,n.$async,()=>t.code(bf(r,i)).code(s))}function d_(t){return(0,q._)`{${z.default.instancePath}="", ${z.default.parentData}, ${z.default.parentDataProperty}, ${z.default.rootData}=${z.default.data}${t.dynamicRef?(0,q._)`, ${z.default.dynamicAnchors}={}`:q.nil}}={}`}function p_(t,e){t.if(z.default.valCxt,()=>{t.var(z.default.instancePath,(0,q._)`${z.default.valCxt}.${z.default.instancePath}`),t.var(z.default.parentData,(0,q._)`${z.default.valCxt}.${z.default.parentData}`),t.var(z.default.parentDataProperty,(0,q._)`${z.default.valCxt}.${z.default.parentDataProperty}`),t.var(z.default.rootData,(0,q._)`${z.default.valCxt}.${z.default.rootData}`),e.dynamicRef&&t.var(z.default.dynamicAnchors,(0,q._)`${z.default.valCxt}.${z.default.dynamicAnchors}`)},()=>{t.var(z.default.instancePath,(0,q._)`""`),t.var(z.default.parentData,(0,q._)`undefined`),t.var(z.default.parentDataProperty,(0,q._)`undefined`),t.var(z.default.rootData,z.default.data),e.dynamicRef&&t.var(z.default.dynamicAnchors,(0,q._)`{}`)})}function h_(t){let{schema:e,opts:r,gen:n}=t;Cf(t,()=>{r.$comment&&e.$comment&&Af(t),__(t),n.let(z.default.vErrors,null),n.let(z.default.errors,0),r.unevaluated&&m_(t),Of(t),S_(t)})}function m_(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,q._)`${r}.evaluated`),e.if((0,q._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,q._)`${t.evaluated}.props`,(0,q._)`undefined`)),e.if((0,q._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,q._)`${t.evaluated}.items`,(0,q._)`undefined`))}function bf(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,q._)`/*# sourceURL=${r} */`:q.nil}function g_(t,e){if(xf(t)&&(Pf(t),kf(t))){y_(t,e);return}(0,$f.boolOrEmptySchema)(t,e)}function kf({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function xf(t){return typeof t.schema!="boolean"}function y_(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Af(t),w_(t),b_(t);let s=n.const("_errs",z.default.errors);Of(t,s),n.var(e,(0,q._)`${s} === ${z.default.errors}`)}function Pf(t){(0,Rt.checkUnknownRules)(t),v_(t)}function Of(t,e){if(t.opts.jtd)return Sf(t,[],!1,e);let r=(0,wf.getSchemaTypes)(t.schema),n=(0,wf.coerceAndCheckDataType)(t,r);Sf(t,r,!n,e)}function v_(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Rt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function __(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Rt.checkStrictMode)(t,"default is ignored in the schema root")}function w_(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,u_.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function b_(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Af({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)t.code((0,q._)`${z.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=(0,q.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,q._)`${z.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function S_(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=t;r.$async?e.if((0,q._)`${z.default.errors} === 0`,()=>e.return(z.default.data),()=>e.throw((0,q._)`new ${i}(${z.default.vErrors})`)):(e.assign((0,q._)`${n}.errors`,z.default.vErrors),s.unevaluated&&E_(t),e.return((0,q._)`${z.default.errors} === 0`))}function E_({gen:t,evaluated:e,props:r,items:n}){r instanceof q.Name&&t.assign((0,q._)`${e}.props`,r),n instanceof q.Name&&t.assign((0,q._)`${e}.items`,n)}function Sf(t,e,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:l,self:u}=t,{RULES:d}=u;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Rt.schemaHasRulesButRef)(s,d))){i.block(()=>If(t,"$ref",d.all.$ref.definition));return}l.jtd||$_(t,e),i.block(()=>{for(let h of d.rules)f(h);f(d.post)});function f(h){(0,oa.shouldUseGroup)(s,h)&&(h.type?(i.if((0,Mi.checkDataType)(h.type,o,l.strictNumbers)),Ef(t,h),e.length===1&&e[0]===h.type&&r&&(i.else(),(0,Mi.reportTypeError)(t)),i.endIf()):Ef(t,h),a||i.if((0,q._)`${z.default.errors} === ${n||0}`))}}function Ef(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,l_.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,oa.shouldUseRule)(n,s)&&If(t,s.keyword,s.definition,e.type)})}function $_(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(C_(t,e),t.opts.allowUnionTypes||k_(t,e),x_(t,t.dataTypes))}function C_(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Rf(t.dataTypes,r)||aa(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),O_(t,e)}}function k_(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&aa(t,"use allowUnionTypes to allow union type keyword")}function x_(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,oa.shouldUseRule)(t.schema,i)){let{type:s}=i.definition;s.length&&!s.some(o=>P_(e,o))&&aa(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function P_(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Rf(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function O_(t,e){let r=[];for(let n of t.dataTypes)Rf(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function aa(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Rt.checkStrictMode)(t,e,t.opts.strictTypes)}var Li=class{constructor(e,r,n){if((0,En.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Rt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Tf(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,En.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",z.default.errors))}result(e,r,n){this.failResult((0,q.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,q.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,q._)`${r} !== undefined && (${(0,q.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Sn.reportExtraError:Sn.reportError)(this,this.def.error,r)}$dataError(){(0,Sn.reportError)(this,this.def.$dataError||Sn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Sn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=q.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=q.nil,r=q.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,q.or)((0,q._)`${i} === undefined`,r)),e!==q.nil&&n.assign(e,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==q.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,q.or)(o(),a());function o(){if(n.length){if(!(r instanceof q.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,q._)`${(0,Mi.checkDataTypes)(l,r,s.opts.strictNumbers,Mi.DataType.Wrong)}`}return q.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,q._)`!${l}(${r})`}return q.nil}}subschema(e,r){let n=(0,sa.getSubschema)(this.it,e);(0,sa.extendSubschemaData)(n,this.it,e),(0,sa.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return g_(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Rt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Rt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,q.Name)),!0}};Ht.KeywordCxt=Li;function If(t,e,r,n){let i=new Li(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,En.funcKeywordCode)(i,r):"macro"in r?(0,En.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,En.funcKeywordCode)(i,r)}var A_=/^\/(?:[^~]|~0|~1)*$/,R_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Tf(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,s;if(t==="")return z.default.rootData;if(t[0]==="/"){if(!A_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,s=z.default.rootData}else{let u=R_.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+u[1];if(i=u[2],i==="#"){if(d>=e)throw new Error(l("property/index",d));return n[e-d]}if(d>e)throw new Error(l("data",d));if(s=r[e-d],!i)return s}let o=s,a=i.split("/");for(let u of a)u&&(s=(0,q._)`${s}${(0,q.getProperty)((0,Rt.unescapeJsonPointer)(u))}`,o=(0,q._)`${o} && ${s}`);return o;function l(u,d){return`Cannot access ${u} ${d} levels up, current level is ${e}`}}Ht.getData=Tf});var ji=w(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var ca=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};la.default=ca});var Cn=w(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});var ua=bn(),fa=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ua.resolveUrl)(e,r,n),this.missingSchema=(0,ua.normalizeId)((0,ua.getFullPath)(e,this.missingRef))}};da.default=fa});var kn=w(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.resolveSchema=Je.getCompilingSchema=Je.resolveRef=Je.compileSchema=Je.SchemaEnv=void 0;var ct=W(),I_=ji(),rr=We(),lt=bn(),Nf=X(),T_=$n(),Pr=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,lt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Je.SchemaEnv=Pr;function ha(t){let e=Mf.call(this,t);if(e)return e;let r=(0,lt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new ct.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;t.$async&&(a=o.scopeValue("Error",{ref:I_.default,code:(0,ct._)`require("ajv/dist/runtime/validation_error").default`}));let l=o.scopeName("validate");t.validateName=l;let u={gen:o,allErrors:this.opts.allErrors,data:rr.default.data,parentData:rr.default.parentData,parentDataProperty:rr.default.parentDataProperty,dataNames:[rr.default.data],dataPathArr:[ct.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ct.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ct.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ct._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,T_.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let f=o.toString();d=`${o.scopeRefs(rr.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${rr.default.self}`,`${rr.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:f,scopeValues:o._values}),this.opts.unevaluated){let{props:g,items:_}=u;m.evaluated={props:g instanceof ct.Name?void 0:g,items:_ instanceof ct.Name?void 0:_,dynamicProps:g instanceof ct.Name,dynamicItems:_ instanceof ct.Name},m.source&&(m.source.evaluated=(0,ct.stringify)(m.evaluated))}return t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(t)}}Je.compileSchema=ha;function N_(t,e,r){var n;r=(0,lt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let s=j_.call(this,t,r);if(s===void 0){let o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new Pr({schema:o,schemaId:a,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=M_.call(this,s)}Je.resolveRef=N_;function M_(t){return(0,lt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:ha.call(this,t)}function Mf(t){for(let e of this._compilations)if(L_(e,t))return e}Je.getCompilingSchema=Mf;function L_(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function j_(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Di.call(this,t,e)}function Di(t,e){let r=this.opts.uriResolver.parse(e),n=(0,lt._getFullPath)(this.opts.uriResolver,r),i=(0,lt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return pa.call(this,r,t);let s=(0,lt.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=Di.call(this,t,o);return typeof a?.schema!="object"?void 0:pa.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||ha.call(this,o),s===(0,lt.normalizeId)(e)){let{schema:a}=o,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,lt.resolveUrl)(this.opts.uriResolver,i,u)),new Pr({schema:a,schemaId:l,root:t,baseId:i})}return pa.call(this,r,o)}}Je.resolveSchema=Di;var D_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function pa(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,Nf.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!D_.has(a)&&u&&(e=(0,lt.resolveUrl)(this.opts.uriResolver,e,u))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Nf.schemaHasRulesButRef)(r,this.RULES)){let a=(0,lt.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=Di.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new Pr({schema:r,schemaId:o,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var Lf=w((lx,q_)=>{q_.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ya=w((ux,Hf)=>{"use strict";var V_=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Df=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),ma=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),qf=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),F_=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function ga(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var H_=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function jf(t){return t.length=0,!0}function B_(t,e,r){if(t.length){let n=ga(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function U_(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=B_;for(let l=0;l<t.length;l++){let u=t[l];if(!(u==="["||u==="]"))if(u===":"){if(s===!0&&(o=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(s=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=jf}else{i.push(u);continue}}return i.length&&(a===jf?r.zone=i.join(""):o?n.push(i.join("")):n.push(ga(i))),r.address=n.join(""),r}function Vf(t){if(G_(t,":")<2)return{host:t,isIPV6:!1};let e=U_(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function G_(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function z_(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var W_={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},K_=/[@/?#:]/g,J_=/[@/?#]/g;function Ff(t,e){let r=e?J_:K_;return r.lastIndex=0,t.replace(r,n=>W_[n])}function Y_(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(ma(i)){let s=i.toUpperCase(),o=String.fromCharCode(parseInt(s,16));e&&qf(o)?r+=o:r+="%"+s,n+=2;continue}}r+=t[n]}return r}function X_(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(ma(n)){let i=n.toUpperCase(),s=String.fromCharCode(parseInt(i,16));s!=="."&&qf(s)?e+=s:e+="%"+i,r+=2;continue}}F_(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Q_(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(ma(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function Z_(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Df(r)){let n=Vf(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Ff(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Hf.exports={nonSimpleDomain:H_,recomposeAuthority:Z_,reescapeHostDelimiters:Ff,normalizePercentEncoding:Y_,normalizePathEncoding:X_,escapePreservingEscapes:Q_,removeDotSegments:z_,isIPv4:Df,isUUID:V_,normalizeIPv6:Vf,stringArrayToHexStripped:ga}});var Wf=w((fx,zf)=>{"use strict";var{isUUID:ew}=ya(),tw=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,rw=["http","https","ws","wss","urn","urn:uuid"];function nw(t){return rw.indexOf(t)!==-1}function va(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Bf(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Uf(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function iw(t){return t.secure=va(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function sw(t){if((t.port===(va(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function ow(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(tw);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,s=_a(i);t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function aw(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,s=_a(i);s&&(t=s.serialize(t,e));let o=t,a=t.nss;return o.path=`${n||e.nid}:${a}`,e.skipEscape=!0,o}function cw(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!ew(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function lw(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Gf={scheme:"http",domainHost:!0,parse:Bf,serialize:Uf},uw={scheme:"https",domainHost:Gf.domainHost,parse:Bf,serialize:Uf},qi={scheme:"ws",domainHost:!0,parse:iw,serialize:sw},fw={scheme:"wss",domainHost:qi.domainHost,parse:qi.parse,serialize:qi.serialize},dw={scheme:"urn",parse:ow,serialize:aw,skipNormalize:!0},pw={scheme:"urn:uuid",parse:cw,serialize:lw,skipNormalize:!0},Vi={http:Gf,https:uw,ws:qi,wss:fw,urn:dw,"urn:uuid":pw};Object.setPrototypeOf(Vi,null);function _a(t){return t&&(Vi[t]||Vi[t.toLowerCase()])||void 0}zf.exports={wsIsSecure:va,SCHEMES:Vi,isValidSchemeName:nw,getSchemeHandler:_a}});var Zf=w((dx,Fi)=>{"use strict";var{normalizeIPv6:hw,removeDotSegments:xn,recomposeAuthority:mw,normalizePercentEncoding:gw,normalizePathEncoding:yw,escapePreservingEscapes:vw,reescapeHostDelimiters:_w,isIPv4:ww,nonSimpleDomain:bw}=ya(),{SCHEMES:Sw,getSchemeHandler:Jf}=Wf();function Ew(t,e){return typeof t=="string"?t=Pw(t,e):typeof t=="object"&&(t=Or(nr(t,e),e)),t}function $w(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Yf(Or(t,n),Or(e,n),n,!0);return n.skipEscape=!0,nr(i,n)}function Yf(t,e,r,n){let i={};return n||(t=Or(nr(t,r),r),e=Or(nr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=xn(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=xn(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=xn(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=xn(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function Cw(t,e,r){let n=Kf(t,r),i=Kf(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function nr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],s=Jf(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=gw(r.path):(r.path=vw(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let o=mw(r);if(o!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(o),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=xn(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var kw=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function xw(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Xf(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,s=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(kw);if(o){n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]);let a=xw(n,o);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(ww(n.host)===!1){let d=hw(n.host);n.host=d.host.toLowerCase(),s=d.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Jf(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&bw(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=_w(unescape(n.host),s))),n.path&&(n.path=yw(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Or(t,e){return Xf(t,e).parsed}function Pw(t,e){return Qf(t,e).normalized}function Qf(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Xf(t,e);return{normalized:n?t:nr(r,e),malformedAuthorityOrPort:n}}function Kf(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Qf(t,e);return n?void 0:r}if(typeof t=="object")return nr(t,e)}var wa={SCHEMES:Sw,normalize:Ew,resolve:$w,resolveComponent:Yf,equal:Cw,serialize:nr,parse:Or};Fi.exports=wa;Fi.exports.default=wa;Fi.exports.fastUri=wa});var td=w(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var ed=Zf();ed.code='require("ajv/dist/runtime/uri").default';ba.default=ed});var ld=w(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.CodeGen=we.Name=we.nil=we.stringify=we.str=we._=we.KeywordCxt=void 0;var Ow=$n();Object.defineProperty(we,"KeywordCxt",{enumerable:!0,get:function(){return Ow.KeywordCxt}});var Ar=W();Object.defineProperty(we,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(we,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(we,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(we,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(we,"Name",{enumerable:!0,get:function(){return Ar.Name}});Object.defineProperty(we,"CodeGen",{enumerable:!0,get:function(){return Ar.CodeGen}});var Aw=ji(),od=Cn(),Rw=Jo(),Pn=kn(),Iw=W(),On=bn(),Hi=wn(),Ea=X(),rd=Lf(),Tw=td(),ad=(t,e)=>new RegExp(t,e);ad.code="new RegExp";var Nw=["removeAdditional","useDefaults","coerceTypes"],Mw=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Lw={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},jw={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},nd=200;function Dw(t){var e,r,n,i,s,o,a,l,u,d,f,h,m,g,_,x,E,V,G,j,L,Q,ne,Mt,nt;let _e=t.strict,Ne=(e=t.code)===null||e===void 0?void 0:e.optimize,Ee=Ne===!0||Ne===void 0?1:Ne||0,it=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ad,st=(i=t.uriResolver)!==null&&i!==void 0?i:Tw.default;return{strictSchema:(o=(s=t.strictSchema)!==null&&s!==void 0?s:_e)!==null&&o!==void 0?o:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:_e)!==null&&l!==void 0?l:!0,strictTypes:(d=(u=t.strictTypes)!==null&&u!==void 0?u:_e)!==null&&d!==void 0?d:"log",strictTuples:(h=(f=t.strictTuples)!==null&&f!==void 0?f:_e)!==null&&h!==void 0?h:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:_e)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Ee,regExp:it}:{optimize:Ee,regExp:it},loopRequired:(_=t.loopRequired)!==null&&_!==void 0?_:nd,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:nd,meta:(E=t.meta)!==null&&E!==void 0?E:!0,messages:(V=t.messages)!==null&&V!==void 0?V:!0,inlineRefs:(G=t.inlineRefs)!==null&&G!==void 0?G:!0,schemaId:(j=t.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:!0,validateSchema:(Q=t.validateSchema)!==null&&Q!==void 0?Q:!0,validateFormats:(ne=t.validateFormats)!==null&&ne!==void 0?ne:!0,unicodeRegExp:(Mt=t.unicodeRegExp)!==null&&Mt!==void 0?Mt:!0,int32range:(nt=t.int32range)!==null&&nt!==void 0?nt:!0,uriResolver:st}}var An=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Dw(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Iw.ValueScope({scope:{},prefixes:Mw,es5:r,lines:n}),this.logger=Uw(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Rw.getRules)(),id.call(this,Lw,e,"NOT SUPPORTED"),id.call(this,jw,e,"DEPRECATED","warn"),this._metaOpts=Hw.call(this),e.formats&&Vw.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Fw.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),qw.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=rd;n==="id"&&(i={...rd},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(d,f){await s.call(this,d.$schema);let h=this._addSchema(d,f);return h.validate||o.call(this,h)}async function s(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function o(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof od.default))throw f;return a.call(this,f),await l.call(this,f.missingSchema),o.call(this,d)}}function a({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function l(d){let f=await u.call(this,d);this.refs[d]||await s.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,r)}async function u(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,n,i);return this}let s;if(typeof e=="object"){let{schemaId:o}=this.opts;if(s=e[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return r=(0,On.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(e){let r;for(;typeof(r=sd.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Pn.SchemaEnv({schema:{},schemaId:n});if(r=Pn.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=sd.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,On.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(zw.call(this,n,r),!r)return(0,Ea.eachItem)(n,s=>Sa.call(this,s)),this;Kw.call(this,r);let i={...r,type:(0,Hi.getJSONTypes)(r.type),schemaType:(0,Hi.getJSONTypes)(r.schemaType)};return(0,Ea.eachItem)(n,i.type.length===0?s=>Sa.call(this,s,i):s=>i.type.forEach(o=>Sa.call(this,s,i,o))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let s=i.split("/").slice(1),o=e;for(let a of s)o=o[a];for(let a in n){let l=n[a];if(typeof l!="object")continue;let{$data:u}=l.definition,d=o[a];u&&d&&(o[a]=cd(d))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof e=="object")o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,On.normalizeId)(o||n);let u=On.getSchemaRefs.call(this,e,n);return l=new Pn.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(l.schema,l),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Pn.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Pn.compileSchema.call(this,e)}finally{this.opts=r}}};An.ValidationError=Aw.default;An.MissingRefError=od.default;we.default=An;function id(t,e,r,n="error"){for(let i in t){let s=i;s in e&&this.logger[n](`${r}: option ${i}. ${t[s]}`)}}function sd(t){return t=(0,On.normalizeId)(t),this.schemas[t]||this.refs[t]}function qw(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Vw(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Fw(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Hw(){let t={...this.opts};for(let e of Nw)delete t[e];return t}var Bw={log(){},warn(){},error(){}};function Uw(t){if(t===!1)return Bw;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Gw=/^[a-z_$][a-z0-9_$:-]*$/i;function zw(t,e){let{RULES:r}=this;if((0,Ea.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Gw.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Sa(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:l})=>l===r);if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Hi.getJSONTypes)(e.type),schemaType:(0,Hi.getJSONTypes)(e.schemaType)}};e.before?Ww.call(this,o,a,e.before):o.rules.push(a),s.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Ww(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Kw(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=cd(e)),t.validateSchema=this.compile(e,!0))}var Jw={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function cd(t){return{anyOf:[t,Jw]}}});var ud=w($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var Yw={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$a.default=Yw});var Gi=w(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.callRef=ir.getValidate=void 0;var Xw=Cn(),fd=Ke(),De=W(),Rr=We(),dd=kn(),Bi=X(),Qw={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:l}=n,{root:u}=s;if((r==="#"||r==="#/")&&i===u.baseId)return f();let d=dd.resolveRef.call(l,u,i,r);if(d===void 0)throw new Xw.default(n.opts.uriResolver,i,r);if(d instanceof dd.SchemaEnv)return h(d);return m(d);function f(){if(s===u)return Ui(t,o,s,s.$async);let g=e.scopeValue("root",{ref:u});return Ui(t,(0,De._)`${g}.validate`,u,u.$async)}function h(g){let _=pd(t,g);Ui(t,_,g,g.$async)}function m(g){let _=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,De.stringify)(g)}:{ref:g}),x=e.name("valid"),E=t.subschema({schema:g,dataTypes:[],schemaPath:De.nil,topSchemaRef:_,errSchemaPath:r},x);t.mergeEvaluated(E),t.ok(x)}}};function pd(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,De._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ir.getValidate=pd;function Ui(t,e,r,n){let{gen:i,it:s}=t,{allErrors:o,schemaEnv:a,opts:l}=s,u=l.passContext?Rr.default.this:De.nil;n?d():f();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,De._)`await ${(0,fd.callValidateCode)(t,e,u)}`),m(e),o||i.assign(g,!0)},_=>{i.if((0,De._)`!(${_} instanceof ${s.ValidationError})`,()=>i.throw(_)),h(_),o||i.assign(g,!1)}),t.ok(g)}function f(){t.result((0,fd.callValidateCode)(t,e,u),()=>m(e),()=>h(e))}function h(g){let _=(0,De._)`${g}.errors`;i.assign(Rr.default.vErrors,(0,De._)`${Rr.default.vErrors} === null ? ${_} : ${Rr.default.vErrors}.concat(${_})`),i.assign(Rr.default.errors,(0,De._)`${Rr.default.vErrors}.length`)}function m(g){var _;if(!s.opts.unevaluated)return;let x=(_=r?.validate)===null||_===void 0?void 0:_.evaluated;if(s.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(s.props=Bi.mergeEvaluated.props(i,x.props,s.props));else{let E=i.var("props",(0,De._)`${g}.evaluated.props`);s.props=Bi.mergeEvaluated.props(i,E,s.props,De.Name)}if(s.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(s.items=Bi.mergeEvaluated.items(i,x.items,s.items));else{let E=i.var("items",(0,De._)`${g}.evaluated.items`);s.items=Bi.mergeEvaluated.items(i,E,s.items,De.Name)}}}ir.callRef=Ui;ir.default=Qw});var hd=w(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var Zw=ud(),e0=Gi(),t0=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Zw.default,e0.default];Ca.default=t0});var md=w(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});var zi=W(),Bt=zi.operators,Wi={maximum:{okStr:"<=",ok:Bt.LTE,fail:Bt.GT},minimum:{okStr:">=",ok:Bt.GTE,fail:Bt.LT},exclusiveMaximum:{okStr:"<",ok:Bt.LT,fail:Bt.GTE},exclusiveMinimum:{okStr:">",ok:Bt.GT,fail:Bt.LTE}},r0={message:({keyword:t,schemaCode:e})=>(0,zi.str)`must be ${Wi[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,zi._)`{comparison: ${Wi[t].okStr}, limit: ${e}}`},n0={keyword:Object.keys(Wi),type:"number",schemaType:"number",$data:!0,error:r0,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,zi._)`${r} ${Wi[e].fail} ${n} || isNaN(${r})`)}};ka.default=n0});var gd=w(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var Rn=W(),i0={message:({schemaCode:t})=>(0,Rn.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Rn._)`{multipleOf: ${t}}`},s0={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:i0,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,s=i.opts.multipleOfPrecision,o=e.let("res"),a=s?(0,Rn._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Rn._)`${o} !== parseInt(${o})`;t.fail$data((0,Rn._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};xa.default=s0});var vd=w(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});function yd(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Pa.default=yd;yd.code='require("ajv/dist/runtime/ucs2length").default'});var _d=w(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var sr=W(),o0=X(),a0=vd(),c0={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,sr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,sr._)`{limit: ${t}}`},l0={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:c0,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,s=e==="maxLength"?sr.operators.GT:sr.operators.LT,o=i.opts.unicode===!1?(0,sr._)`${r}.length`:(0,sr._)`${(0,o0.useFunc)(t.gen,a0.default)}(${r})`;t.fail$data((0,sr._)`${o} ${s} ${n}`)}};Oa.default=l0});var wd=w(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var u0=Ke(),f0=X(),Ir=W(),d0={message:({schemaCode:t})=>(0,Ir.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ir._)`{pattern: ${t}}`},p0={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:d0,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:s,it:o}=t,a=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=o.opts.code,u=l.code==="new RegExp"?(0,Ir._)`new RegExp`:(0,f0.useFunc)(e,l),d=e.let("valid");e.try(()=>e.assign(d,(0,Ir._)`${u}(${s}, ${a}).test(${r})`),()=>e.assign(d,!1)),t.fail$data((0,Ir._)`!${d}`)}else{let l=(0,u0.usePattern)(t,i);t.fail$data((0,Ir._)`!${l}.test(${r})`)}}};Aa.default=p0});var bd=w(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var In=W(),h0={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,In.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,In._)`{limit: ${t}}`},m0={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:h0,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?In.operators.GT:In.operators.LT;t.fail$data((0,In._)`Object.keys(${r}).length ${i} ${n}`)}};Ra.default=m0});var Sd=w(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var Tn=Ke(),Nn=W(),g0=X(),y0={message:({params:{missingProperty:t}})=>(0,Nn.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Nn._)`{missingProperty: ${t}}`},v0={keyword:"required",type:"object",schemaType:"array",$data:!0,error:y0,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:s,it:o}=t,{opts:a}=o;if(!s&&r.length===0)return;let l=r.length>=a.loopRequired;if(o.allErrors?u():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let _ of r)if(m?.[_]===void 0&&!g.has(_)){let x=o.schemaEnv.baseId+o.errSchemaPath,E=`required property "${_}" is not defined at "${x}" (strictRequired)`;(0,g0.checkStrictMode)(o,E,o.opts.strictRequired)}}function u(){if(l||s)t.block$data(Nn.nil,f);else for(let m of r)(0,Tn.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(l||s){let g=e.let("valid",!0);t.block$data(g,()=>h(m,g)),t.ok(g)}else e.if((0,Tn.checkMissingProp)(t,r,m)),(0,Tn.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Tn.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function h(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,Tn.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Nn.not)(g),()=>{t.error(),e.break()})},Nn.nil)}}};Ia.default=v0});var Ed=w(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});var Mn=W(),_0={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Mn.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Mn._)`{limit: ${t}}`},w0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:_0,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Mn.operators.GT:Mn.operators.LT;t.fail$data((0,Mn._)`${r}.length ${i} ${n}`)}};Ta.default=w0});var Ki=w(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var $d=na();$d.code='require("ajv/dist/runtime/equal").default';Na.default=$d});var Cd=w(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Ma=wn(),be=W(),b0=X(),S0=Ki(),E0={message:({params:{i:t,j:e}})=>(0,be.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,be._)`{i: ${t}, j: ${e}}`},$0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:E0,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=t;if(!n&&!i)return;let l=e.let("valid"),u=s.items?(0,Ma.getSchemaTypes)(s.items):[];t.block$data(l,d,(0,be._)`${o} === false`),t.ok(l);function d(){let g=e.let("i",(0,be._)`${r}.length`),_=e.let("j");t.setParams({i:g,j:_}),e.assign(l,!0),e.if((0,be._)`${g} > 1`,()=>(f()?h:m)(g,_))}function f(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function h(g,_){let x=e.name("item"),E=(0,Ma.checkDataTypes)(u,x,a.opts.strictNumbers,Ma.DataType.Wrong),V=e.const("indices",(0,be._)`{}`);e.for((0,be._)`;${g}--;`,()=>{e.let(x,(0,be._)`${r}[${g}]`),e.if(E,(0,be._)`continue`),u.length>1&&e.if((0,be._)`typeof ${x} == "string"`,(0,be._)`${x} += "_"`),e.if((0,be._)`typeof ${V}[${x}] == "number"`,()=>{e.assign(_,(0,be._)`${V}[${x}]`),t.error(),e.assign(l,!1).break()}).code((0,be._)`${V}[${x}] = ${g}`)})}function m(g,_){let x=(0,b0.useFunc)(e,S0.default),E=e.name("outer");e.label(E).for((0,be._)`;${g}--;`,()=>e.for((0,be._)`${_} = ${g}; ${_}--;`,()=>e.if((0,be._)`${x}(${r}[${g}], ${r}[${_}])`,()=>{t.error(),e.assign(l,!1).break(E)})))}}};La.default=$0});var kd=w(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var ja=W(),C0=X(),k0=Ki(),x0={message:"must be equal to constant",params:({schemaCode:t})=>(0,ja._)`{allowedValue: ${t}}`},P0={keyword:"const",$data:!0,error:x0,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,ja._)`!${(0,C0.useFunc)(e,k0.default)}(${r}, ${i})`):t.fail((0,ja._)`${s} !== ${r}`)}};Da.default=P0});var xd=w(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var Ln=W(),O0=X(),A0=Ki(),R0={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Ln._)`{allowedValues: ${t}}`},I0={keyword:"enum",schemaType:"array",$data:!0,error:R0,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:s,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,l,u=()=>l??(l=(0,O0.useFunc)(e,A0.default)),d;if(a||n)d=e.let("valid"),t.block$data(d,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",s);d=(0,Ln.or)(...i.map((g,_)=>h(m,_)))}t.pass(d);function f(){e.assign(d,!1),e.forOf("v",s,m=>e.if((0,Ln._)`${u()}(${r}, ${m})`,()=>e.assign(d,!0).break()))}function h(m,g){let _=i[g];return typeof _=="object"&&_!==null?(0,Ln._)`${u()}(${r}, ${m}[${g}])`:(0,Ln._)`${r} === ${_}`}}};qa.default=I0});var Pd=w(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var T0=md(),N0=gd(),M0=_d(),L0=wd(),j0=bd(),D0=Sd(),q0=Ed(),V0=Cd(),F0=kd(),H0=xd(),B0=[T0.default,N0.default,M0.default,L0.default,j0.default,D0.default,q0.default,V0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},F0.default,H0.default];Va.default=B0});var Ha=w(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.validateAdditionalItems=void 0;var or=W(),Fa=X(),U0={message:({params:{len:t}})=>(0,or.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,or._)`{limit: ${t}}`},G0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:U0,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Fa.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Od(t,n)}};function Od(t,e){let{gen:r,schema:n,data:i,keyword:s,it:o}=t;o.items=!0;let a=r.const("len",(0,or._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,or._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Fa.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,or._)`${a} <= ${e.length}`);r.if((0,or.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,d=>{t.subschema({keyword:s,dataProp:d,dataPropType:Fa.Type.Num},u),o.allErrors||r.if((0,or.not)(u),()=>r.break())})}}jn.validateAdditionalItems=Od;jn.default=G0});var Ba=w(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.validateTuple=void 0;var Ad=W(),Ji=X(),z0=Ke(),W0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Rd(t,"additionalItems",e);r.items=!0,!(0,Ji.alwaysValidSchema)(r,e)&&t.ok((0,z0.validateArray)(t))}};function Rd(t,e,r=t.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=t;d(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ji.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Ad._)`${s}.length`);r.forEach((f,h)=>{(0,Ji.alwaysValidSchema)(a,f)||(n.if((0,Ad._)`${u} > ${h}`,()=>t.subschema({keyword:o,schemaProp:h,dataProp:h},l)),t.ok(l))});function d(f){let{opts:h,errSchemaPath:m}=a,g=r.length,_=g===f.minItems&&(g===f.maxItems||f[e]===!1);if(h.strictTuples&&!_){let x=`"${o}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Ji.checkStrictMode)(a,x,h.strictTuples)}}}Dn.validateTuple=Rd;Dn.default=W0});var Id=w(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var K0=Ba(),J0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,K0.validateTuple)(t,"items")};Ua.default=J0});var Nd=w(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var Td=W(),Y0=X(),X0=Ke(),Q0=Ha(),Z0={message:({params:{len:t}})=>(0,Td.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Td._)`{limit: ${t}}`},e2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Z0,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Y0.alwaysValidSchema)(n,e)&&(i?(0,Q0.validateAdditionalItems)(t,i):t.ok((0,X0.validateArray)(t)))}};Ga.default=e2});var Md=w(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var Ye=W(),Yi=X(),t2={message:({params:{min:t,max:e}})=>e===void 0?(0,Ye.str)`must contain at least ${t} valid item(s)`:(0,Ye.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ye._)`{minContains: ${t}}`:(0,Ye._)`{minContains: ${t}, maxContains: ${e}}`},r2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:t2,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:s}=t,o,a,{minContains:l,maxContains:u}=n;s.opts.next?(o=l===void 0?1:l,a=u):o=1;let d=e.const("len",(0,Ye._)`${i}.length`);if(t.setParams({min:o,max:a}),a===void 0&&o===0){(0,Yi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Yi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Yi.alwaysValidSchema)(s,r)){let _=(0,Ye._)`${d} >= ${o}`;a!==void 0&&(_=(0,Ye._)`${_} && ${d} <= ${a}`),t.pass(_);return}s.items=!0;let f=e.name("valid");a===void 0&&o===1?m(f,()=>e.if(f,()=>e.break())):o===0?(e.let(f,!0),a!==void 0&&e.if((0,Ye._)`${i}.length > 0`,h)):(e.let(f,!1),h()),t.result(f,()=>t.reset());function h(){let _=e.name("_valid"),x=e.let("count",0);m(_,()=>e.if(_,()=>g(x)))}function m(_,x){e.forRange("i",0,d,E=>{t.subschema({keyword:"contains",dataProp:E,dataPropType:Yi.Type.Num,compositeRule:!0},_),x()})}function g(_){e.code((0,Ye._)`${_}++`),a===void 0?e.if((0,Ye._)`${_} >= ${o}`,()=>e.assign(f,!0).break()):(e.if((0,Ye._)`${_} > ${a}`,()=>e.assign(f,!1).break()),o===1?e.assign(f,!0):e.if((0,Ye._)`${_} >= ${o}`,()=>e.assign(f,!0)))}}};za.default=r2});var Xi=w(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.validateSchemaDeps=gt.validatePropertyDeps=gt.error=void 0;var Wa=W(),n2=X(),qn=Ke();gt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Wa.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Wa._)`{property: ${t},
34
+ missingProperty: ${n},
35
+ depsCount: ${e},
36
+ deps: ${r}}`};var i2={keyword:"dependencies",type:"object",schemaType:"object",error:gt.error,code(t){let[e,r]=s2(t);Ld(t,e),jd(t,r)}};function s2({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Ld(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let l=(0,qn.propertyInData)(r,n,o,i.opts.ownProperties);t.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let u of a)(0,qn.checkReportMissingProp)(t,u)}):(r.if((0,Wa._)`${l} && (${(0,qn.checkMissingProp)(t,a,s)})`),(0,qn.reportMissingProp)(t,s),r.else())}}gt.validatePropertyDeps=Ld;function jd(t,e=t.schema){let{gen:r,data:n,keyword:i,it:s}=t,o=r.name("valid");for(let a in e)(0,n2.alwaysValidSchema)(s,e[a])||(r.if((0,qn.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},o);t.mergeValidEvaluated(l,o)},()=>r.var(o,!0)),t.ok(o))}gt.validateSchemaDeps=jd;gt.default=i2});var qd=w(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var Dd=W(),o2=X(),a2={message:"property name must be valid",params:({params:t})=>(0,Dd._)`{propertyName: ${t.propertyName}}`},c2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:a2,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,o2.alwaysValidSchema)(i,r))return;let s=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),e.if((0,Dd.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};Ka.default=c2});var Ya=w(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var Qi=Ke(),ut=W(),l2=We(),Zi=X(),u2={message:"must NOT have additional properties",params:({params:t})=>(0,ut._)`{additionalProperty: ${t.additionalProperty}}`},f2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:u2,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=o;if(o.props=!0,l.removeAdditional!=="all"&&(0,Zi.alwaysValidSchema)(o,r))return;let u=(0,Qi.allSchemaProperties)(n.properties),d=(0,Qi.allSchemaProperties)(n.patternProperties);f(),t.ok((0,ut._)`${s} === ${l2.default.errors}`);function f(){e.forIn("key",i,x=>{!u.length&&!d.length?g(x):e.if(h(x),()=>g(x))})}function h(x){let E;if(u.length>8){let V=(0,Zi.schemaRefOrVal)(o,n.properties,"properties");E=(0,Qi.isOwnProperty)(e,V,x)}else u.length?E=(0,ut.or)(...u.map(V=>(0,ut._)`${x} === ${V}`)):E=ut.nil;return d.length&&(E=(0,ut.or)(E,...d.map(V=>(0,ut._)`${(0,Qi.usePattern)(t,V)}.test(${x})`))),(0,ut.not)(E)}function m(x){e.code((0,ut._)`delete ${i}[${x}]`)}function g(x){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(x);return}if(r===!1){t.setParams({additionalProperty:x}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Zi.alwaysValidSchema)(o,r)){let E=e.name("valid");l.removeAdditional==="failing"?(_(x,E,!1),e.if((0,ut.not)(E),()=>{t.reset(),m(x)})):(_(x,E),a||e.if((0,ut.not)(E),()=>e.break()))}}function _(x,E,V){let G={keyword:"additionalProperties",dataProp:x,dataPropType:Zi.Type.Str};V===!1&&Object.assign(G,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(G,E)}}};Ja.default=f2});var Hd=w(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});var d2=$n(),Vd=Ke(),Xa=X(),Fd=Ya(),p2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Fd.default.code(new d2.KeywordCxt(s,Fd.default,"additionalProperties"));let o=(0,Vd.allSchemaProperties)(r);for(let f of o)s.definedProperties.add(f);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=Xa.mergeEvaluated.props(e,(0,Xa.toHash)(o),s.props));let a=o.filter(f=>!(0,Xa.alwaysValidSchema)(s,r[f]));if(a.length===0)return;let l=e.name("valid");for(let f of a)u(f)?d(f):(e.if((0,Vd.propertyInData)(e,i,f,s.opts.ownProperties)),d(f),s.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(l);function u(f){return s.opts.useDefaults&&!s.compositeRule&&r[f].default!==void 0}function d(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};Qa.default=p2});var zd=w(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var Bd=Ke(),es=W(),Ud=X(),Gd=X(),h2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:s}=t,{opts:o}=s,a=(0,Bd.allSchemaProperties)(r),l=a.filter(_=>(0,Ud.alwaysValidSchema)(s,r[_]));if(a.length===0||l.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=e.name("valid");s.props!==!0&&!(s.props instanceof es.Name)&&(s.props=(0,Gd.evaluatedPropsToName)(e,s.props));let{props:f}=s;h();function h(){for(let _ of a)u&&m(_),s.allErrors?g(_):(e.var(d,!0),g(_),e.if(d))}function m(_){for(let x in u)new RegExp(_).test(x)&&(0,Ud.checkStrictMode)(s,`property ${x} matches pattern ${_} (use allowMatchingProperties)`)}function g(_){e.forIn("key",n,x=>{e.if((0,es._)`${(0,Bd.usePattern)(t,_)}.test(${x})`,()=>{let E=l.includes(_);E||t.subschema({keyword:"patternProperties",schemaProp:_,dataProp:x,dataPropType:Gd.Type.Str},d),s.opts.unevaluated&&f!==!0?e.assign((0,es._)`${f}[${x}]`,!0):!E&&!s.allErrors&&e.if((0,es.not)(d),()=>e.break())})})}}};Za.default=h2});var Wd=w(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var m2=X(),g2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,m2.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};ec.default=g2});var Kd=w(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var y2=Ke(),v2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:y2.validateUnion,error:{message:"must match a schema in anyOf"}};tc.default=v2});var Jd=w(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var ts=W(),_2=X(),w2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ts._)`{passingSchemas: ${t.passing}}`},b2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:w2,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){s.forEach((d,f)=>{let h;(0,_2.alwaysValidSchema)(i,d)?e.var(l,!0):h=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,ts._)`${l} && ${o}`).assign(o,!1).assign(a,(0,ts._)`[${a}, ${f}]`).else(),e.if(l,()=>{e.assign(o,!0),e.assign(a,f),h&&t.mergeEvaluated(h,ts.Name)})})}}};rc.default=b2});var Yd=w(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var S2=X(),E2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((s,o)=>{if((0,S2.alwaysValidSchema)(n,s))return;let a=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(a)})}};nc.default=E2});var Zd=w(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var rs=W(),Qd=X(),$2={message:({params:t})=>(0,rs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,rs._)`{failingKeyword: ${t.ifClause}}`},C2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:$2,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Qd.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Xd(n,"then"),s=Xd(n,"else");if(!i&&!s)return;let o=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&s){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,u("then",d),u("else",d))}else i?e.if(a,u("then")):e.if((0,rs.not)(a),u("else"));t.pass(o,()=>t.error(!0));function l(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function u(d,f){return()=>{let h=t.subschema({keyword:d},a);e.assign(o,a),t.mergeValidEvaluated(h,o),f?e.assign(f,(0,rs._)`${d}`):t.setParams({ifClause:d})}}}};function Xd(t,e){let r=t.schema[e];return r!==void 0&&!(0,Qd.alwaysValidSchema)(t,r)}ic.default=C2});var ep=w(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var k2=X(),x2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,k2.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};sc.default=x2});var tp=w(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var P2=Ha(),O2=Id(),A2=Ba(),R2=Nd(),I2=Md(),T2=Xi(),N2=qd(),M2=Ya(),L2=Hd(),j2=zd(),D2=Wd(),q2=Kd(),V2=Jd(),F2=Yd(),H2=Zd(),B2=ep();function U2(t=!1){let e=[D2.default,q2.default,V2.default,F2.default,H2.default,B2.default,N2.default,M2.default,T2.default,L2.default,j2.default];return t?e.push(O2.default,R2.default):e.push(P2.default,A2.default),e.push(I2.default),e}oc.default=U2});var cc=w(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.dynamicAnchor=void 0;var ac=W(),G2=We(),rp=kn(),z2=Gi(),W2={keyword:"$dynamicAnchor",schemaType:"string",code:t=>np(t,t.schema)};function np(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,ac._)`${G2.default.dynamicAnchors}${(0,ac.getProperty)(e)}`,s=n.errSchemaPath==="#"?n.validateName:K2(t);r.if((0,ac._)`!${i}`,()=>r.assign(i,s))}Vn.dynamicAnchor=np;function K2(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:s,localRefs:o,meta:a}=e.root,{schemaId:l}=n.opts,u=new rp.SchemaEnv({schema:r,schemaId:l,root:i,baseId:s,localRefs:o,meta:a});return rp.compileSchema.call(n,u),(0,z2.getValidate)(t,u)}Vn.default=W2});var lc=w(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.dynamicRef=void 0;var ip=W(),J2=We(),sp=Gi(),Y2={keyword:"$dynamicRef",schemaType:"string",code:t=>op(t,t.schema)};function op(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let s=e.slice(1);if(i.allErrors)o();else{let l=r.let("valid",!1);o(l),t.ok(l)}function o(l){if(i.schemaEnv.root.dynamicAnchors[s]){let u=r.let("_v",(0,ip._)`${J2.default.dynamicAnchors}${(0,ip.getProperty)(s)}`);r.if(u,a(u,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,u){return u?()=>r.block(()=>{(0,sp.callRef)(t,l),r.let(u,!0)}):()=>(0,sp.callRef)(t,l)}}Fn.dynamicRef=op;Fn.default=Y2});var ap=w(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var X2=cc(),Q2=X(),Z2={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,X2.dynamicAnchor)(t,""):(0,Q2.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};uc.default=Z2});var cp=w(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var e1=lc(),t1={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,e1.dynamicRef)(t,t.schema)};fc.default=t1});var lp=w(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var r1=cc(),n1=lc(),i1=ap(),s1=cp(),o1=[r1.default,n1.default,i1.default,s1.default];dc.default=o1});var fp=w(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var up=Xi(),a1={keyword:"dependentRequired",type:"object",schemaType:"object",error:up.error,code:t=>(0,up.validatePropertyDeps)(t)};pc.default=a1});var dp=w(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var c1=Xi(),l1={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,c1.validateSchemaDeps)(t)};hc.default=l1});var pp=w(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var u1=X(),f1={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,u1.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};mc.default=f1});var hp=w(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var d1=fp(),p1=dp(),h1=pp(),m1=[d1.default,p1.default,h1.default];gc.default=m1});var gp=w(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Ut=W(),mp=X(),g1=We(),y1={message:"must NOT have unevaluated properties",params:({params:t})=>(0,Ut._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},v1={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:y1,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:o,props:a}=s;a instanceof Ut.Name?e.if((0,Ut._)`${a} !== true`,()=>e.forIn("key",n,f=>e.if(u(a,f),()=>l(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?l(f):e.if(d(a,f),()=>l(f))),s.props=!0,t.ok((0,Ut._)`${i} === ${g1.default.errors}`);function l(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),o||e.break();return}if(!(0,mp.alwaysValidSchema)(s,r)){let h=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:mp.Type.Str},h),o||e.if((0,Ut.not)(h),()=>e.break())}}function u(f,h){return(0,Ut._)`!${f} || !${f}[${h}]`}function d(f,h){let m=[];for(let g in f)f[g]===!0&&m.push((0,Ut._)`${h} !== ${g}`);return(0,Ut.and)(...m)}}};yc.default=v1});var vp=w(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var ar=W(),yp=X(),_1={message:({params:{len:t}})=>(0,ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ar._)`{limit: ${t}}`},w1={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:_1,code(t){let{gen:e,schema:r,data:n,it:i}=t,s=i.items||0;if(s===!0)return;let o=e.const("len",(0,ar._)`${n}.length`);if(r===!1)t.setParams({len:s}),t.fail((0,ar._)`${o} > ${s}`);else if(typeof r=="object"&&!(0,yp.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,ar._)`${o} <= ${s}`);e.if((0,ar.not)(l),()=>a(l,s)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,o,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:yp.Type.Num},l),i.allErrors||e.if((0,ar.not)(l),()=>e.break())})}}};vc.default=w1});var _p=w(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var b1=gp(),S1=vp(),E1=[b1.default,S1.default];_c.default=E1});var wp=w(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var ye=W(),$1={message:({schemaCode:t})=>(0,ye.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ye._)`{format: ${t}}`},C1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:$1,code(t,e){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=a;if(!l.validateFormats)return;i?h():m();function h(){let g=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),_=r.const("fDef",(0,ye._)`${g}[${o}]`),x=r.let("fType"),E=r.let("format");r.if((0,ye._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>r.assign(x,(0,ye._)`${_}.type || "string"`).assign(E,(0,ye._)`${_}.validate`),()=>r.assign(x,(0,ye._)`"string"`).assign(E,_)),t.fail$data((0,ye.or)(V(),G()));function V(){return l.strictSchema===!1?ye.nil:(0,ye._)`${o} && !${E}`}function G(){let j=d.$async?(0,ye._)`(${_}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,ye._)`${E}(${n})`,L=(0,ye._)`(typeof ${E} == "function" ? ${j} : ${E}.test(${n}))`;return(0,ye._)`${E} && ${E} !== true && ${x} === ${e} && !${L}`}}function m(){let g=f.formats[s];if(!g){V();return}if(g===!0)return;let[_,x,E]=G(g);_===e&&t.pass(j());function V(){if(l.strictSchema===!1){f.logger.warn(L());return}throw new Error(L());function L(){return`unknown format "${s}" ignored in schema at path "${u}"`}}function G(L){let Q=L instanceof RegExp?(0,ye.regexpCode)(L):l.code.formats?(0,ye._)`${l.code.formats}${(0,ye.getProperty)(s)}`:void 0,ne=r.scopeValue("formats",{key:s,ref:L,code:Q});return typeof L=="object"&&!(L instanceof RegExp)?[L.type||"string",L.validate,(0,ye._)`${ne}.validate`]:["string",L,ne]}function j(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,ye._)`await ${E}(${n})`}return typeof x=="function"?(0,ye._)`${E}(${n})`:(0,ye._)`${E}.test(${n})`}}}};wc.default=C1});var bp=w(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var k1=wp(),x1=[k1.default];bc.default=x1});var Sp=w(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.contentVocabulary=Tr.metadataVocabulary=void 0;Tr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Tr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var $p=w(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var P1=hd(),O1=Pd(),A1=tp(),R1=lp(),I1=hp(),T1=_p(),N1=bp(),Ep=Sp(),M1=[R1.default,P1.default,O1.default,(0,A1.default)(!0),N1.default,Ep.metadataVocabulary,Ep.contentVocabulary,I1.default,T1.default];Sc.default=M1});var kp=w(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.DiscrError=void 0;var Cp;(function(t){t.Tag="tag",t.Mapping="mapping"})(Cp||(ns.DiscrError=Cp={}))});var Pp=w($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var Nr=W(),Ec=kp(),xp=kn(),L1=Cn(),j1=X(),D1={message:({params:{discrError:t,tagName:e}})=>t===Ec.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Nr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},q1={keyword:"discriminator",type:"object",schemaType:"object",error:D1,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:s}=t,{oneOf:o}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),u=e.const("tag",(0,Nr._)`${r}${(0,Nr.getProperty)(a)}`);e.if((0,Nr._)`typeof ${u} == "string"`,()=>d(),()=>t.error(!1,{discrError:Ec.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function d(){let m=h();e.if(!1);for(let g in m)e.elseIf((0,Nr._)`${u} === ${g}`),e.assign(l,f(m[g]));e.else(),t.error(!1,{discrError:Ec.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function f(m){let g=e.name("valid"),_=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(_,Nr.Name),g}function h(){var m;let g={},_=E(i),x=!0;for(let j=0;j<o.length;j++){let L=o[j];if(L?.$ref&&!(0,j1.schemaHasRulesButRef)(L,s.self.RULES)){let ne=L.$ref;if(L=xp.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,ne),L instanceof xp.SchemaEnv&&(L=L.schema),L===void 0)throw new L1.default(s.opts.uriResolver,s.baseId,ne)}let Q=(m=L?.properties)===null||m===void 0?void 0:m[a];if(typeof Q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(_||E(L)),V(Q,j)}if(!x)throw new Error(`discriminator: "${a}" must be required`);return g;function E({required:j}){return Array.isArray(j)&&j.includes(a)}function V(j,L){if(j.const)G(j.const,L);else if(j.enum)for(let Q of j.enum)G(Q,L);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function G(j,L){if(typeof j!="string"||j in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[j]=L}}}};$c.default=q1});var Op=w((dP,V1)=>{V1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var Ap=w((pP,F1)=>{F1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Rp=w((hP,H1)=>{H1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var Ip=w((mP,B1)=>{B1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Tp=w((gP,U1)=>{U1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Np=w((yP,G1)=>{G1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Mp=w((vP,z1)=>{z1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var Lp=w((_P,W1)=>{W1.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var jp=w(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var K1=Op(),J1=Ap(),Y1=Rp(),X1=Ip(),Q1=Tp(),Z1=Np(),eb=Mp(),tb=Lp(),rb=["/properties"];function nb(t){return[K1,J1,Y1,X1,Q1,e(this,Z1),eb,e(this,tb)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,rb):n}}Cc.default=nb});var Dp=w((fe,xc)=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.MissingRefError=fe.ValidationError=fe.CodeGen=fe.Name=fe.nil=fe.stringify=fe.str=fe._=fe.KeywordCxt=fe.Ajv2020=void 0;var ib=ld(),sb=$p(),ob=Pp(),ab=jp(),kc="https://json-schema.org/draft/2020-12/schema",Mr=class extends ib.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),sb.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ob.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(ab.default.call(this,e),this.refs["http://json-schema.org/schema"]=kc)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(kc)?kc:void 0)}};fe.Ajv2020=Mr;xc.exports=fe=Mr;xc.exports.Ajv2020=Mr;Object.defineProperty(fe,"__esModule",{value:!0});fe.default=Mr;var cb=$n();Object.defineProperty(fe,"KeywordCxt",{enumerable:!0,get:function(){return cb.KeywordCxt}});var Lr=W();Object.defineProperty(fe,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(fe,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(fe,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(fe,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(fe,"Name",{enumerable:!0,get:function(){return Lr.Name}});Object.defineProperty(fe,"CodeGen",{enumerable:!0,get:function(){return Lr.CodeGen}});var lb=ji();Object.defineProperty(fe,"ValidationError",{enumerable:!0,get:function(){return lb.default}});var ub=Cn();Object.defineProperty(fe,"MissingRefError",{enumerable:!0,get:function(){return ub.default}})});var Te=w(Ve=>{"use strict";Ve.__esModule=!0;Ve.extend=gh;Ve.indexOf=yS;Ve.escapeExpression=vS;Ve.isEmpty=_S;Ve.createFrame=wS;Ve.blockParams=bS;Ve.appendContextPath=SS;var pS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},hS=/[&<>"'`=]/g,mS=/[&<>"'`=]/;function gS(t){return pS[t]}function gh(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 Gc=Object.prototype.toString;Ve.toString=Gc;var Uc=function(e){return typeof e=="function"};Uc(/x/)&&(Ve.isFunction=Uc=function(t){return typeof t=="function"&&Gc.call(t)==="[object Function]"});Ve.isFunction=Uc;var yh=Array.isArray||function(t){return t&&typeof t=="object"?Gc.call(t)==="[object Array]":!1};Ve.isArray=yh;function yS(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function vS(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return mS.test(t)?t.replace(hS,gS):t}function _S(t){return!t&&t!==0?!0:!!(yh(t)&&t.length===0)}function wS(t){var e=gh({},t);return e._parent=t,e}function bS(t,e){return t.path=e,t}function SS(t,e){return(t?t+".":"")+e}});var Fe=w((ps,vh)=>{"use strict";ps.__esModule=!0;var zc=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Wc(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<zc.length;l++)this[zc[l]]=a[zc[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Wc);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{}}Wc.prototype=new Error;ps.default=Wc;vh.exports=ps.default});var wh=w((hs,_h)=>{"use strict";hs.__esModule=!0;var Kc=Te();hs.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(Kc.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=Kc.createFrame(r.data);s.contextPath=Kc.appendContextPath(r.data.contextPath,r.name),r={data:s}}return i(e,r)})};_h.exports=hs.default});var Sh=w((ms,bh)=>{"use strict";ms.__esModule=!0;function ES(t){return t&&t.__esModule?t:{default:t}}var Wn=Te(),$S=Fe(),CS=ES($S);ms.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new CS.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=Wn.appendContextPath(r.data.contextPath,r.ids[0])+"."),Wn.isFunction(e)&&(e=e.call(this)),r.data&&(a=Wn.createFrame(r.data));function u(g,_,x){a&&(a.key=g,a.index=_,a.first=_===0,a.last=!!x,l&&(a.contextPath=l+g)),o=o+n(e[g],{data:a,blockParams:Wn.blockParams([e[g],g],[l+g,null])})}if(e&&typeof e=="object")if(Wn.isArray(e))for(var d=e.length;s<d;s++)s in e&&u(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var f=[],h=e[Symbol.iterator](),m=h.next();!m.done;m=h.next())f.push(m.value);e=f;for(var d=e.length;s<d;s++)u(s,s,s===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(_){g!==void 0&&u(g,s-1),g=_,s++}),g!==void 0&&u(g,s-1,!0)})();return s===0&&(o=i(this)),o})};bh.exports=ms.default});var $h=w((gs,Eh)=>{"use strict";gs.__esModule=!0;function kS(t){return t&&t.__esModule?t:{default:t}}var xS=Fe(),PS=kS(xS);gs.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new PS.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Eh.exports=gs.default});var Ph=w((ys,xh)=>{"use strict";ys.__esModule=!0;function OS(t){return t&&t.__esModule?t:{default:t}}var Ch=Te(),AS=Fe(),kh=OS(AS);ys.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new kh.default("#if requires exactly one argument");return Ch.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Ch.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new kh.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};xh.exports=ys.default});var Ah=w((vs,Oh)=>{"use strict";vs.__esModule=!0;vs.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)})};Oh.exports=vs.default});var Ih=w((_s,Rh)=>{"use strict";_s.__esModule=!0;_s.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Rh.exports=_s.default});var Nh=w((ws,Th)=>{"use strict";ws.__esModule=!0;function RS(t){return t&&t.__esModule?t:{default:t}}var Kn=Te(),IS=Fe(),TS=RS(IS);ws.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new TS.default("#with requires exactly one argument");Kn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Kn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Kn.createFrame(r.data),i.contextPath=Kn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Kn.blockParams([e],[i&&i.contextPath])})})};Th.exports=ws.default});var Jc=w(bs=>{"use strict";bs.__esModule=!0;bs.registerDefaultHelpers=KS;bs.moveHelperToHooks=JS;function cr(t){return t&&t.__esModule?t:{default:t}}var NS=wh(),MS=cr(NS),LS=Sh(),jS=cr(LS),DS=$h(),qS=cr(DS),VS=Ph(),FS=cr(VS),HS=Ah(),BS=cr(HS),US=Ih(),GS=cr(US),zS=Nh(),WS=cr(zS);function KS(t){MS.default(t),jS.default(t),qS.default(t),FS.default(t),BS.default(t),GS.default(t),WS.default(t)}function JS(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Lh=w((Ss,Mh)=>{"use strict";Ss.__esModule=!0;var YS=Te();Ss.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=YS.extend({},l,r.partials);var u=e(o,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,s})};Mh.exports=Ss.default});var jh=w(Yc=>{"use strict";Yc.__esModule=!0;Yc.registerDefaultDecorators=eE;function XS(t){return t&&t.__esModule?t:{default:t}}var QS=Lh(),ZS=XS(QS);function eE(t){ZS.default(t)}});var Xc=w((Es,Dh)=>{"use strict";Es.__esModule=!0;var tE=Te(),Br={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=tE.indexOf(Br.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Br.lookupLevel(e),typeof console<"u"&&Br.lookupLevel(Br.level)<=e){var r=Br.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)}}};Es.default=Br;Dh.exports=Es.default});var Qc=w(Jn=>{"use strict";Jn.__esModule=!0;Jn.createProtoAccessControl=sE;Jn.resultIsAllowed=oE;Jn.resetLoggedProperties=cE;function rE(t){return t&&t.__esModule?t:{default:t}}var qh=Te(),nE=Xc(),iE=rE(nE),$s=Object.create(null);function sE(t){var e=Object.create(null);e.__proto__=!1,qh.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,qh.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function oE(t,e,r){return Vh(typeof t=="function"?e.methods:e.properties,r)}function Vh(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(aE(e),!1)}function aE(t){$s[t]!==!0&&($s[t]=!0,iE.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
30
37
  You can add a runtime option to disable the check or this warning:
31
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function fp(){Object.keys(Bn).forEach(function(n){delete Bn[n]})}});var Hn=D(Ie=>{"use strict";Ie.__esModule=!0;Ie.HandlebarsEnvironment=fi;function Ws(n){return n&&n.__esModule?n:{default:n}}var et=ce(),hp=me(),ui=Ws(hp),dp=si(),mp=Hs(),gp=li(),$n=Ws(gp),vp=ci(),_p="4.7.9";Ie.VERSION=_p;var yp=8;Ie.COMPILER_REVISION=yp;var wp=7;Ie.LAST_COMPATIBLE_COMPILER_REVISION=wp;var bp={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"};Ie.REVISION_CHANGES=bp;var pi="[object Object]";function fi(n,e,t){this.helpers=n||{},this.partials=e||{},this.decorators=t||{},dp.registerDefaultHelpers(this),mp.registerDefaultDecorators(this)}fi.prototype={constructor:fi,logger:$n.default,log:$n.default.log,registerHelper:function(e,t){if(et.toString.call(e)===pi){if(t)throw new ui.default("Arg not supported with multiple helpers");et.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(et.toString.call(e)===pi)et.extend(this.partials,e);else{if(typeof t>"u")throw new ui.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(et.toString.call(e)===pi){if(t)throw new ui.default("Arg not supported with multiple decorators");et.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){vp.resetLoggedProperties()}};var xp=$n.default.log;Ie.log=xp;Ie.createFrame=et.createFrame;Ie.logger=$n.default});var Js=D((jn,Us)=>{"use strict";jn.__esModule=!0;function hi(n){this.string=n}hi.prototype.toString=hi.prototype.toHTML=function(){return""+this.string};jn.default=hi;Us.exports=jn.default});var Ys=D(di=>{"use strict";di.__esModule=!0;di.wrapHelper=Sp;function Sp(n,e){if(typeof n!="function")return n;var t=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),n.apply(this,arguments)};return t}});var ea=D(Je=>{"use strict";Je.__esModule=!0;Je.checkRevision=Pp;Je.template=Ip;Je.wrapProgram=qn;Je.resolvePartial=Tp;Je.invokePartial=Rp;Je.noop=Xs;function Cp(n){return n&&n.__esModule?n:{default:n}}function kp(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Ap=ce(),dt=kp(Ap),Ep=me(),$e=Cp(Ep),He=Hn(),Ks=si(),Op=Ys(),zs=ci();function Pp(n){var e=n&&n[0]||1,t=He.COMPILER_REVISION;if(!(e>=He.LAST_COMPATIBLE_COMPILER_REVISION&&e<=He.COMPILER_REVISION))if(e<He.LAST_COMPATIBLE_COMPILER_REVISION){var r=He.REVISION_CHANGES[t],i=He.REVISION_CHANGES[e];throw new $e.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}else throw new $e.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").")}function Ip(n,e){if(!e)throw new $e.default("No environment passed to template");if(!n||!n.main)throw new $e.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,e.VM.checkRevision(n.compiler);var t=n.compiler&&n.compiler[0]===7;function r(a,l,p){p.hash&&(l=dt.extend({},l,p.hash),p.ids&&(p.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,l,p),p.hooks=this.hooks,p.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,a,l,p);if(c==null&&e.compile&&(p.partials[p.name]=e.compile(a,n.compilerOptions,e),c=p.partials[p.name](l,p)),c!=null){if(p.indent){for(var h=c.split(`
32
- `),u=0,d=h.length;u<d&&!(!h[u]&&u+1===d);u++)h[u]=p.indent+h[u];c=h.join(`
33
- `)}return c}else throw new $e.default("The partial "+p.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(l,p,c){if(!l||!(p in l))throw new $e.default('"'+p+'" not defined in '+l,{loc:c});return i.lookupProperty(l,p)},lookupProperty:function(l,p){var c=l[p];if(c==null||Object.prototype.hasOwnProperty.call(l,p)||zs.resultIsAllowed(c,i.protoAccessControl,p))return c},lookup:function(l,p){for(var c=l.length,h=0;h<c;h++){var u=l[h]&&i.lookupProperty(l[h],p);if(u!=null)return u}},lambda:function(l,p){return typeof l=="function"?l.call(p):l},escapeExpression:dt.escapeExpression,invokePartial:r,fn:function(l){var p=n[l];return p.decorator=n[l+"_d"],p},programs:[],program:function(l,p,c,h,u){var d=this.programs[l],v=this.fn(l);return p||u||h||c?d=qn(this,l,v,p,c,h,u):d||(d=this.programs[l]=qn(this,l,v)),d},data:function(l,p){for(;l&&p--;)l=l._parent;return l},mergeIfNeeded:function(l,p){var c=l||p;return l&&p&&l!==p&&(c=dt.extend({},p,l)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:n.compiler};function o(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=l.data;o._setup(l),!l.partial&&n.useData&&(p=Lp(a,p));var c=void 0,h=n.useBlockParams?[]:void 0;n.useDepths&&(l.depths?c=a!=l.depths[0]?[a].concat(l.depths):l.depths:c=[a]);function u(d){return""+n.main(i,d,i.helpers,i.partials,p,h,c)}return u=Zs(n.main,u,i,l.depths||[],p,h),u(a,l)}return o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var l={};Qs(l,e.helpers,i),Qs(l,a.helpers,i),i.helpers=l,n.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,e.partials)),(n.usePartial||n.useDecorators)&&(i.decorators=dt.extend({},e.decorators,a.decorators)),i.hooks={},i.protoAccessControl=zs.createProtoAccessControl(a);var p=a.allowCallsToHelperMissing||t;Ks.moveHelperToHooks(i,"helperMissing",p),Ks.moveHelperToHooks(i,"blockHelperMissing",p)}},o._child=function(a,l,p,c){if(n.useBlockParams&&!p)throw new $e.default("must pass block params");if(n.useDepths&&!c)throw new $e.default("must pass parent depths");return qn(i,a,n[a],l,0,p,c)},o}function qn(n,e,t,r,i,o,a){function l(p){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=a;return a&&p!=a[0]&&!(p===n.nullContext&&a[0]===null)&&(h=[p].concat(a)),t(n,p,n.helpers,n.partials,c.data||r,o&&[c.blockParams].concat(o),h)}return l=Zs(t,l,n,a,r,o),l.program=e,l.depth=a?a.length:0,l.blockParams=i||0,l}function Tp(n,e,t){return n?!n.call&&!t.name&&(t.name=n,n=Gn(t.partials,n)):t.name==="@partial-block"?n=Gn(t.data,"partial-block"):n=Gn(t.partials,t.name),n}function Rp(n,e,t){var r=Gn(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var i=void 0;if(t.fn&&t.fn!==Xs&&(function(){t.data=He.createFrame(t.data);var o=t.fn;i=t.data["partial-block"]=function(l){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return p.data=He.createFrame(p.data),p.data["partial-block"]=r,o(l,p)},o.partials&&(t.partials=dt.extend({},t.partials,o.partials))})(),n===void 0&&i&&(n=i),n===void 0)throw new $e.default("The partial "+t.name+" could not be found");if(n instanceof Function)return n(e,t)}function Xs(){return""}function Gn(n,e){if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e]}function Lp(n,e){return(!e||!("root"in e))&&(e=e?He.createFrame(e):{},e.root=n),e}function Zs(n,e,t,r,i,o){if(n.decorator){var a={};e=n.decorator(e,a,t,r&&r[0],i,o,r),dt.extend(e,a)}return e}function Qs(n,e,t){e&&Object.keys(e).forEach(function(r){var i=e[r];n[r]=Np(i,t)})}function Np(n,e){var t=e.lookupProperty;return Op.wrapHelper(n,function(r){return r.lookupProperty=t,r})}});var mi=D((Wn,ta)=>{"use strict";Wn.__esModule=!0;Wn.default=function(n){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;n.noConflict=function(){return globalThis.Handlebars===n&&(globalThis.Handlebars=e),n}};ta.exports=Wn.default});var sa=D((Un,oa)=>{"use strict";Un.__esModule=!0;function vi(n){return n&&n.__esModule?n:{default:n}}function _i(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Mp=Hn(),na=_i(Mp),Dp=Js(),Vp=vi(Dp),Fp=me(),Bp=vi(Fp),$p=ce(),gi=_i($p),Hp=ea(),ra=_i(Hp),jp=mi(),qp=vi(jp);function ia(){var n=new na.HandlebarsEnvironment;return gi.extend(n,na),n.SafeString=Vp.default,n.Exception=Bp.default,n.Utils=gi,n.escapeExpression=gi.escapeExpression,n.VM=ra,n.template=function(e){return ra.template(e,n)},n}var $t=ia();$t.create=ia;qp.default($t);$t.default=$t;Un.default=$t;oa.exports=Un.default});var yi=D((Jn,la)=>{"use strict";Jn.__esModule=!0;var aa={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&&!aa.helpers.scopedId(e)&&!e.depth}}};Jn.default=aa;la.exports=Jn.default});var ua=D((Yn,ca)=>{"use strict";Yn.__esModule=!0;var Gp=(function(){var n={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,o,a,l,p,c,h){var u=c.length-1;switch(p){case 1:return c[u-1];case 2:this.$=l.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:l.stripComment(c[u]),strip:l.stripFlags(c[u],c[u]),loc:l.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[u],value:c[u],loc:l.locInfo(this._$)};break;case 11:this.$=l.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.$=l.prepareBlock(c[u-3],c[u-2],c[u-1],c[u],!1,this._$);break;case 14:this.$=l.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:l.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:l.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:l.stripFlags(c[u-5],c[u])};break;case 18:this.$={strip:l.stripFlags(c[u-1],c[u-1]),program:c[u]};break;case 19:var d=l.prepareBlock(c[u-2],c[u-1],c[u],c[u],!1,this._$),v=l.prepareProgram([d],c[u-1].loc);v.chained=!0,this.$={strip:c[u-2].strip,program:v,chain:!0};break;case 20:this.$=c[u];break;case 21:this.$={path:c[u-1],strip:l.stripFlags(c[u-2],c[u])};break;case 22:this.$=l.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],l.stripFlags(c[u-4],c[u]),this._$);break;case 23:this.$=l.prepareMustache(c[u-3],c[u-2],c[u-1],c[u-4],l.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:l.stripFlags(c[u-4],c[u]),loc:l.locInfo(this._$)};break;case 25:this.$=l.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:l.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:l.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[u],loc:l.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:l.id(c[u-2]),value:c[u],loc:l.locInfo(this._$)};break;case 32:this.$=l.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:l.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[u]),original:Number(c[u]),loc:l.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[u]==="true",original:c[u]==="true",loc:l.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:l.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:l.locInfo(this._$)};break;case 40:this.$=c[u];break;case 41:this.$=c[u];break;case 42:this.$=l.preparePath(!0,c[u],this._$);break;case 43:this.$=l.preparePath(!1,c[u],this._$);break;case 44:c[u-2].push({part:l.id(c[u]),original:c[u],separator:c[u-1]}),this.$=c[u-2];break;case 45:this.$=[{part:l.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,o){throw new Error(i)},parse:function(i){var o=this,a=[0],l=[null],p=[],c=this.table,h="",u=0,d=0,v=0,C=2,L=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 K=this.lexer.yylloc;p.push(K);var V=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function G(j){a.length=a.length-2*j,l.length=l.length-j,p.length=p.length-j}function ue(){var j;return j=o.lexer.lex()||1,typeof j!="number"&&(j=o.symbols_[j]||j),j}for(var $,X,z,ne,Qt,Ke,Se={},Oe,fe,qe,Re;;){if(z=a[a.length-1],this.defaultActions[z]?ne=this.defaultActions[z]:(($===null||typeof $>"u")&&($=ue()),ne=c[z]&&c[z][$]),typeof ne>"u"||!ne.length||!ne[0]){var Le="";if(!v){Re=[];for(Oe in c[z])this.terminals_[Oe]&&Oe>2&&Re.push("'"+this.terminals_[Oe]+"'");this.lexer.showPosition?Le="Parse error on line "+(u+1)+`:
38
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function cE(){Object.keys($s).forEach(function(t){delete $s[t]})}});var ks=w(_t=>{"use strict";_t.__esModule=!0;_t.HandlebarsEnvironment=tl;function Fh(t){return t&&t.__esModule?t:{default:t}}var lr=Te(),lE=Fe(),Zc=Fh(lE),uE=Jc(),fE=jh(),dE=Xc(),Cs=Fh(dE),pE=Qc(),hE="4.7.9";_t.VERSION=hE;var mE=8;_t.COMPILER_REVISION=mE;var gE=7;_t.LAST_COMPATIBLE_COMPILER_REVISION=gE;var yE={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"};_t.REVISION_CHANGES=yE;var el="[object Object]";function tl(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},uE.registerDefaultHelpers(this),fE.registerDefaultDecorators(this)}tl.prototype={constructor:tl,logger:Cs.default,log:Cs.default.log,registerHelper:function(e,r){if(lr.toString.call(e)===el){if(r)throw new Zc.default("Arg not supported with multiple helpers");lr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(lr.toString.call(e)===el)lr.extend(this.partials,e);else{if(typeof r>"u")throw new Zc.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(lr.toString.call(e)===el){if(r)throw new Zc.default("Arg not supported with multiple decorators");lr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){pE.resetLoggedProperties()}};var vE=Cs.default.log;_t.log=vE;_t.createFrame=lr.createFrame;_t.logger=Cs.default});var Bh=w((xs,Hh)=>{"use strict";xs.__esModule=!0;function rl(t){this.string=t}rl.prototype.toString=rl.prototype.toHTML=function(){return""+this.string};xs.default=rl;Hh.exports=xs.default});var Uh=w(nl=>{"use strict";nl.__esModule=!0;nl.wrapHelper=_E;function _E(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 Yh=w(Gt=>{"use strict";Gt.__esModule=!0;Gt.checkRevision=CE;Gt.template=kE;Gt.wrapProgram=Ps;Gt.resolvePartial=xE;Gt.invokePartial=PE;Gt.noop=Kh;function wE(t){return t&&t.__esModule?t:{default:t}}function bE(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 SE=Te(),Ur=bE(SE),EE=Fe(),It=wE(EE),Tt=ks(),Gh=Jc(),$E=Uh(),zh=Qc();function CE(t){var e=t&&t[0]||1,r=Tt.COMPILER_REVISION;if(!(e>=Tt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Tt.COMPILER_REVISION))if(e<Tt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Tt.REVISION_CHANGES[r],i=Tt.REVISION_CHANGES[e];throw new It.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 It.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 kE(t,e){if(!e)throw new It.default("No environment passed to template");if(!t||!t.main)throw new It.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=Ur.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 u=e.VM.invokePartial.call(this,o,a,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(o,t.compilerOptions,e),u=l.partials[l.name](a,l)),u!=null){if(l.indent){for(var d=u.split(`
39
+ `),f=0,h=d.length;f<h&&!(!d[f]&&f+1===h);f++)d[f]=l.indent+d[f];u=d.join(`
40
+ `)}return u}else throw new It.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new It.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||zh.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,d=0;d<u;d++){var f=a[d]&&i.lookupProperty(a[d],l);if(f!=null)return f}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,d,f){var h=this.programs[a],m=this.fn(a);return l||f||d||u?h=Ps(this,a,m,l,u,d,f):h||(h=this.programs[a]=Ps(this,a,m)),h},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=Ur.extend({},l,a)),u},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=OE(o,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=o!=a.depths[0]?[o].concat(a.depths):a.depths:u=[o]);function f(h){return""+t.main(i,h,i.helpers,i.partials,l,d,u)}return f=Jh(t.main,f,i,a.depths||[],l,d),f(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={};Wh(a,e.helpers,i),Wh(a,o.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Ur.extend({},e.decorators,o.decorators)),i.hooks={},i.protoAccessControl=zh.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;Gh.moveHelperToHooks(i,"helperMissing",l),Gh.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(o,a,l,u){if(t.useBlockParams&&!l)throw new It.default("must pass block params");if(t.useDepths&&!u)throw new It.default("must pass parent depths");return Ps(i,o,t[o],a,0,l,u)},s}function Ps(t,e,r,n,i,s,o){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=o;return o&&l!=o[0]&&!(l===t.nullContext&&o[0]===null)&&(d=[l].concat(o)),r(t,l,t.helpers,t.partials,u.data||n,s&&[u.blockParams].concat(s),d)}return a=Jh(r,a,t,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=i||0,a}function xE(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Os(r.partials,t)):r.name==="@partial-block"?t=Os(r.data,"partial-block"):t=Os(r.partials,r.name),t}function PE(t,e,r){var n=Os(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!==Kh&&(function(){r.data=Tt.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=Tt.createFrame(l.data),l.data["partial-block"]=n,s(a,l)},s.partials&&(r.partials=Ur.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new It.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Kh(){return""}function Os(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function OE(t,e){return(!e||!("root"in e))&&(e=e?Tt.createFrame(e):{},e.root=t),e}function Jh(t,e,r,n,i,s){if(t.decorator){var o={};e=t.decorator(e,o,r,n&&n[0],i,s,n),Ur.extend(e,o)}return e}function Wh(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=AE(i,r)})}function AE(t,e){var r=e.lookupProperty;return $E.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var il=w((As,Xh)=>{"use strict";As.__esModule=!0;As.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}};Xh.exports=As.default});var rm=w((Rs,tm)=>{"use strict";Rs.__esModule=!0;function ol(t){return t&&t.__esModule?t:{default:t}}function al(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 RE=ks(),Qh=al(RE),IE=Bh(),TE=ol(IE),NE=Fe(),ME=ol(NE),LE=Te(),sl=al(LE),jE=Yh(),Zh=al(jE),DE=il(),qE=ol(DE);function em(){var t=new Qh.HandlebarsEnvironment;return sl.extend(t,Qh),t.SafeString=TE.default,t.Exception=ME.default,t.Utils=sl,t.escapeExpression=sl.escapeExpression,t.VM=Zh,t.template=function(e){return Zh.template(e,t)},t}var Yn=em();Yn.create=em;qE.default(Yn);Yn.default=Yn;Rs.default=Yn;tm.exports=Rs.default});var cl=w((Is,im)=>{"use strict";Is.__esModule=!0;var nm={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&&!nm.helpers.scopedId(e)&&!e.depth}}};Is.default=nm;im.exports=Is.default});var om=w((Ts,sm)=>{"use strict";Ts.__esModule=!0;var VE=(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,u,d){var f=u.length-1;switch(l){case 1:return u[f-1];case 2:this.$=a.prepareProgram(u[f]);break;case 3:this.$=u[f];break;case 4:this.$=u[f];break;case 5:this.$=u[f];break;case 6:this.$=u[f];break;case 7:this.$=u[f];break;case 8:this.$=u[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[f]),strip:a.stripFlags(u[f],u[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[f],value:u[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[f-2],u[f-1],u[f],this._$);break;case 12:this.$={path:u[f-3],params:u[f-2],hash:u[f-1]};break;case 13:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!1,this._$);break;case 14:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!0,this._$);break;case 15:this.$={open:u[f-5],path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 16:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 17:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 18:this.$={strip:a.stripFlags(u[f-1],u[f-1]),program:u[f]};break;case 19:var h=a.prepareBlock(u[f-2],u[f-1],u[f],u[f],!1,this._$),m=a.prepareProgram([h],u[f-1].loc);m.chained=!0,this.$={strip:u[f-2].strip,program:m,chain:!0};break;case 20:this.$=u[f];break;case 21:this.$={path:u[f-1],strip:a.stripFlags(u[f-2],u[f])};break;case 22:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 23:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[f-3],params:u[f-2],hash:u[f-1],indent:"",strip:a.stripFlags(u[f-4],u[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[f-2],u[f-1],u[f],this._$);break;case 26:this.$={path:u[f-3],params:u[f-2],hash:u[f-1],strip:a.stripFlags(u[f-4],u[f])};break;case 27:this.$=u[f];break;case 28:this.$=u[f];break;case 29:this.$={type:"SubExpression",path:u[f-3],params:u[f-2],hash:u[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[f-2]),value:u[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[f-1]);break;case 33:this.$=u[f];break;case 34:this.$=u[f];break;case 35:this.$={type:"StringLiteral",value:u[f],original:u[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[f]),original:Number(u[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[f]==="true",original:u[f]==="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.$=u[f];break;case 41:this.$=u[f];break;case 42:this.$=a.preparePath(!0,u[f],this._$);break;case 43:this.$=a.preparePath(!1,u[f],this._$);break;case 44:u[f-2].push({part:a.id(u[f]),original:u[f],separator:u[f-1]}),this.$=u[f-2];break;case 45:this.$=[{part:a.id(u[f]),original:u[f]}];break;case 46:this.$=[];break;case 47:u[f-1].push(u[f]);break;case 48:this.$=[];break;case 49:u[f-1].push(u[f]);break;case 50:this.$=[];break;case 51:u[f-1].push(u[f]);break;case 58:this.$=[];break;case 59:u[f-1].push(u[f]);break;case 64:this.$=[];break;case 65:u[f-1].push(u[f]);break;case 70:this.$=[];break;case 71:u[f-1].push(u[f]);break;case 78:this.$=[];break;case 79:u[f-1].push(u[f]);break;case 82:this.$=[];break;case 83:u[f-1].push(u[f]);break;case 86:this.$=[];break;case 87:u[f-1].push(u[f]);break;case 90:this.$=[];break;case 91:u[f-1].push(u[f]);break;case 94:this.$=[];break;case 95:u[f-1].push(u[f]);break;case 98:this.$=[u[f]];break;case 99:u[f-1].push(u[f]);break;case 100:this.$=[u[f]];break;case 101:u[f-1].push(u[f]);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=[],u=this.table,d="",f=0,h=0,m=0,g=2,_=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 x=this.lexer.yylloc;l.push(x);var E=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function V(se){o.length=o.length-2*se,a.length=a.length-se,l.length=l.length-se}function G(){var se;return se=s.lexer.lex()||1,typeof se!="number"&&(se=s.symbols_[se]||se),se}for(var j,L,Q,ne,Mt,nt,_e={},Ne,Ee,it,st;;){if(Q=o[o.length-1],this.defaultActions[Q]?ne=this.defaultActions[Q]:((j===null||typeof j>"u")&&(j=G()),ne=u[Q]&&u[Q][j]),typeof ne>"u"||!ne.length||!ne[0]){var bt="";if(!m){st=[];for(Ne in u[Q])this.terminals_[Ne]&&Ne>2&&st.push("'"+this.terminals_[Ne]+"'");this.lexer.showPosition?bt="Parse error on line "+(f+1)+`:
34
41
  `+this.lexer.showPosition()+`
35
- Expecting `+Re.join(", ")+", got '"+(this.terminals_[$]||$)+"'":Le="Parse error on line "+(u+1)+": Unexpected "+($==1?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(Le,{text:this.lexer.match,token:this.terminals_[$]||$,line:this.lexer.yylineno,loc:K,expected:Re})}}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+$);switch(ne[0]){case 1:a.push($),l.push(this.lexer.yytext),p.push(this.lexer.yylloc),a.push(ne[1]),$=null,X?($=X,X=null):(d=this.lexer.yyleng,h=this.lexer.yytext,u=this.lexer.yylineno,K=this.lexer.yylloc,v>0&&v--);break;case 2:if(fe=this.productions_[ne[1]][1],Se.$=l[l.length-fe],Se._$={first_line:p[p.length-(fe||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(fe||1)].first_column,last_column:p[p.length-1].last_column},V&&(Se._$.range=[p[p.length-(fe||1)].range[0],p[p.length-1].range[1]]),Ke=this.performAction.call(Se,h,d,u,this.yy,ne[1],l,p),typeof Ke<"u")return Ke;fe&&(a=a.slice(0,-1*fe*2),l=l.slice(0,-1*fe),p=p.slice(0,-1*fe)),a.push(this.productions_[ne[1]][0]),l.push(Se.$),p.push(Se._$),qe=c[a[a.length-2]][a[a.length-1]],a.push(qe);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,a){if(this.yy.parser)this.yy.parser.parseError(o,a);else throw new Error(o)},setInput:function(o){return this._input=o,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 o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var a=o.length,l=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var p=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-a]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
36
- `+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,l,p,c,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),d=0;d<u.length&&(l=this._input.match(this.rules[u[d]]),!(l&&(!a||l[0].length>a[0].length)&&(a=l,p=d,!this.options.flex)));d++);return a?(h=a[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+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,u[p],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
37
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},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(o){this.begin(o)}};return r.options={},r.performAction=function(o,a,l,p){function c(u,d){return a.yytext=a.yytext.substring(u,a.yyleng-d+u)}var h=p;switch(l){case 0:if(a.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),a.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(a.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 a.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.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 a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},r.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],r.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}},r})();n.lexer=e;function t(){this.yy={}}return t.prototype=n,n.Parser=t,new t})();Yn.default=Gp;ca.exports=Yn.default});var Xn=D((Qn,ha)=>{"use strict";Qn.__esModule=!0;function Wp(n){return n&&n.__esModule?n:{default:n}}var Up=me(),wi=Wp(Up);function Kn(){this.parents=[]}Kn.prototype={constructor:Kn,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!Kn.prototype[r.type])throw new wi.default('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new wi.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(e){if(!this[e.type])throw new wi.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:zn,Decorator:zn,BlockStatement:pa,DecoratorBlock:pa,PartialStatement:fa,PartialBlockStatement:function(e){fa.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:zn,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 zn(n){this.acceptRequired(n,"path"),this.acceptArray(n.params),this.acceptKey(n,"hash")}function pa(n){zn.call(this,n),this.acceptKey(n,"program"),this.acceptKey(n,"inverse")}function fa(n){this.acceptRequired(n,"name"),this.acceptArray(n.params),this.acceptKey(n,"hash")}Qn.default=Kn;ha.exports=Qn.default});var ma=D((Zn,da)=>{"use strict";Zn.__esModule=!0;function Jp(n){return n&&n.__esModule?n:{default:n}}var Yp=Xn(),Kp=Jp(Yp);function Te(){var n=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=n}Te.prototype=new Kp.default;Te.prototype.Program=function(n){var e=!this.options.ignoreStandalone,t=!this.isRootSeen;this.isRootSeen=!0;for(var r=n.body,i=0,o=r.length;i<o;i++){var a=r[i],l=this.accept(a);if(l){var p=bi(r,i,t),c=xi(r,i,t),h=l.openStandalone&&p,u=l.closeStandalone&&c,d=l.inlineStandalone&&p&&c;l.close&&tt(r,i,!0),l.open&&Ye(r,i,!0),e&&d&&(tt(r,i),Ye(r,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&h&&(tt((a.program||a.inverse).body),Ye(r,i)),e&&u&&(tt(r,i),Ye((a.inverse||a.program).body))}}return n};Te.prototype.BlockStatement=Te.prototype.DecoratorBlock=Te.prototype.PartialBlockStatement=function(n){this.accept(n.program),this.accept(n.inverse);var e=n.program||n.inverse,t=n.program&&n.inverse,r=t,i=t;if(t&&t.chained)for(r=t.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:n.openStrip.open,close:n.closeStrip.close,openStandalone:xi(e.body),closeStandalone:bi((r||e).body)};if(n.openStrip.close&&tt(e.body,null,!0),t){var a=n.inverseStrip;a.open&&Ye(e.body,null,!0),a.close&&tt(r.body,null,!0),n.closeStrip.open&&Ye(i.body,null,!0),!this.options.ignoreStandalone&&bi(e.body)&&xi(r.body)&&(Ye(e.body),tt(r.body))}else n.closeStrip.open&&Ye(e.body,null,!0);return o};Te.prototype.Decorator=Te.prototype.MustacheStatement=function(n){return n.strip};Te.prototype.PartialStatement=Te.prototype.CommentStatement=function(n){var e=n.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function bi(n,e,t){e===void 0&&(e=n.length);var r=n[e-1],i=n[e-2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function xi(n,e,t){e===void 0&&(e=-1);var r=n[e+1],i=n[e+2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function tt(n,e,t){var r=n[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!t&&r.rightStripped)){var i=r.value;r.value=r.value.replace(t?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function Ye(n,e,t){var r=n[e==null?n.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!t&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(t?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}Zn.default=Te;da.exports=Zn.default});var ga=D(ye=>{"use strict";ye.__esModule=!0;ye.SourceLocation=Xp;ye.id=Zp;ye.stripFlags=ef;ye.stripComment=tf;ye.preparePath=nf;ye.prepareMustache=rf;ye.prepareRawBlock=of;ye.prepareBlock=sf;ye.prepareProgram=af;ye.preparePartialBlock=lf;function zp(n){return n&&n.__esModule?n:{default:n}}var Qp=me(),Si=zp(Qp);function Ci(n,e){if(e=e.path?e.path.original:e,n.path.original!==e){var t={loc:n.path.loc};throw new Si.default(n.path.original+" doesn't match "+e,t)}}function Xp(n,e){this.source=n,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function Zp(n){return/^\[.*\]$/.test(n)?n.substring(1,n.length-1):n}function ef(n,e){return{open:n.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function tf(n){return n.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function nf(n,e,t){t=this.locInfo(t);for(var r=n?"@":"",i=[],o=0,a=0,l=e.length;a<l;a++){var p=e[a].part,c=e[a].original!==p;if(r+=(e[a].separator||"")+p,!c&&(p===".."||p==="."||p==="this")){if(i.length>0)throw new Si.default("Invalid path: "+r,{loc:t});p===".."&&o++}else i.push(p)}return{type:"PathExpression",data:n,depth:o,parts:i,original:r,loc:t}}function rf(n,e,t,r,i,o){var a=r.charAt(3)||r.charAt(2),l=a!=="{"&&a!=="&",p=/\*/.test(r);return{type:p?"Decorator":"MustacheStatement",path:n,params:e,hash:t,escaped:l,strip:i,loc:this.locInfo(o)}}function of(n,e,t,r){Ci(n,t),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function sf(n,e,t,r,i,o){r&&r.path&&Ci(n,r);var a=/\*/.test(n.open);e.blockParams=n.blockParams;var l=void 0,p=void 0;if(t){if(a)throw new Si.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=r.strip),p=t.strip,l=t.program}return i&&(i=l,l=e,e=i),{type:a?"DecoratorBlock":"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:e,inverse:l,openStrip:n.strip,inverseStrip:p,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function af(n,e){if(!e&&n.length){var t=n[0].loc,r=n[n.length-1].loc;t&&r&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:n,strip:{},loc:e}}function lf(n,e,t,r){return Ci(n,t),{type:"PartialBlockStatement",name:n.path,params:n.params,hash:n.hash,program:e,openStrip:n.strip,closeStrip:t&&t.strip,loc:this.locInfo(r)}}});var _a=D(jt=>{"use strict";jt.__esModule=!0;jt.parseWithoutProcessing=va;jt.parse=vf;function cf(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function Ei(n){return n&&n.__esModule?n:{default:n}}var uf=ua(),ki=Ei(uf),pf=ma(),ff=Ei(pf),hf=ga(),df=cf(hf),mf=me(),Ht=Ei(mf),gf=ce();jt.parser=ki.default;var er={};gf.extend(er,df);function va(n,e){if(n.type==="Program")return _f(n),n;ki.default.yy=er,er.locInfo=function(r){return new er.SourceLocation(e&&e.srcName,r)};var t=ki.default.parse(n);return t}function vf(n,e){var t=va(n,e),r=new ff.default(e);return r.accept(t)}function _f(n){Ai(n)}function Ai(n){if(n!=null){if(Array.isArray(n)){n.forEach(Ai);return}if(typeof n=="object"){if(n.type==="PathExpression"){if(!yf(n.depth))throw new Ht.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(n.parts))throw new Ht.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<n.parts.length;e++)if(typeof n.parts[e]!="string")throw new Ht.default("Invalid AST: PathExpression.parts must only contain strings")}else if(n.type==="NumberLiteral"){if(typeof n.value!="number"||!isFinite(n.value))throw new Ht.default("Invalid AST: NumberLiteral.value must be a number")}else if(n.type==="BooleanLiteral"&&typeof n.value!="boolean")throw new Ht.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(n).forEach(function(t){t!=="loc"&&Ai(n[t])})}}}function yf(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n&&n>=0}});var xa=D(Ut=>{"use strict";Ut.__esModule=!0;Ut.Compiler=Oi;Ut.precompile=Sf;Ut.compile=Cf;function wa(n){return n&&n.__esModule?n:{default:n}}var wf=me(),Gt=wa(wf),Wt=ce(),bf=yi(),qt=wa(bf),xf=[].slice;function Oi(){}Oi.prototype={compiler:Oi,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var r=0;r<t;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!ba(i.args,o.args))return!1}t=this.children.length;for(var r=0;r<t;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=Wt.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler,r=t.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(!this[e.type])throw new Gt.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,r=t.length,i=0;i<r;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){ya(e);var t=e.program,r=e.inverse;t=t&&this.compileProgram(t),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,t,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,r),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new Gt.default("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var a=e.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),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){ya(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,r){var i=e.path,o=i.parts[0],a=t!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,r){var i=this.setupFullMustacheParams(e,t,r),o=e.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new Gt.default("You specified knownHelpersOnly, but used the unknown helper "+a,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,qt.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],r=qt.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):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 t=e.pairs,r=0,i=t.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(t[r].value);for(;r--;)this.opcode("assignToHash",t[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:xf.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=qt.default.helpers.simpleId(e.path),r=t&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&qt.default.helpers.helperExpression(e),o=!r&&(i||t);if(o&&!i){var a=e.path.parts[0],l=this.options;l.knownHelpers[a]?i=!0:l.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var t=0,r=e.length;t<r;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value!=null?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!qt.default.helpers.scopedId(e)&&!e.depth&&(r=this.blockParamIndex(e.parts[0])),r){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,i)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",t),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var t=0,r=this.options.blockParams.length;t<r;t++){var i=this.options.blockParams[t],o=i&&Wt.indexOf(i,e);if(i&&o>=0)return[t,o]}}};function Sf(n,e,t){if(n==null||typeof n!="string"&&n.type!=="Program")throw new Gt.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=t.parse(n,e),i=new t.Compiler().compile(r,e);return new t.JavaScriptCompiler().compile(i,e)}function Cf(n,e,t){if(e===void 0&&(e={}),n==null||typeof n!="string"&&n.type!=="Program")throw new Gt.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);e=Wt.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var a=t.parse(n,e),l=new t.Compiler().compile(a,e),p=new t.JavaScriptCompiler().compile(l,e,void 0,!0);return t.template(p)}function o(a,l){return r||(r=i()),r.call(this,a,l)}return o._setup=function(a){return r||(r=i()),r._setup(a)},o._child=function(a,l,p,c){return r||(r=i()),r._child(a,l,p,c)},o}function ba(n,e){if(n===e)return!0;if(Wt.isArray(n)&&Wt.isArray(e)&&n.length===e.length){for(var t=0;t<n.length;t++)if(!ba(n[t],e[t]))return!1;return!0}}function ya(n){if(!n.path.parts){var e=n.path;n.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var Ca=D(Pi=>{var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Pi.encode=function(n){if(0<=n&&n<Sa.length)return Sa[n];throw new TypeError("Must be between 0 and 63: "+n)};Pi.decode=function(n){var e=65,t=90,r=97,i=122,o=48,a=57,l=43,p=47,c=26,h=52;return e<=n&&n<=t?n-e:r<=n&&n<=i?n-r+c:o<=n&&n<=a?n-o+h:n==l?62:n==p?63:-1}});var Ri=D(Ti=>{var ka=Ca(),Ii=5,Aa=1<<Ii,Ea=Aa-1,Oa=Aa;function kf(n){return n<0?(-n<<1)+1:(n<<1)+0}function Af(n){var e=(n&1)===1,t=n>>1;return e?-t:t}Ti.encode=function(e){var t="",r,i=kf(e);do r=i&Ea,i>>>=Ii,i>0&&(r|=Oa),t+=ka.encode(r);while(i>0);return t};Ti.decode=function(e,t,r){var i=e.length,o=0,a=0,l,p;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(p=ka.decode(e.charCodeAt(t++)),p===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));l=!!(p&Oa),p&=Ea,o=o+(p<<a),a+=Ii}while(l);r.value=Af(o),r.rest=t}});var vt=D(oe=>{function Ef(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}oe.getArg=Ef;var Pa=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Of=/^data:.+\,.+$/;function Jt(n){var e=n.match(Pa);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}oe.urlParse=Jt;function mt(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}oe.urlGenerate=mt;function Li(n){var e=n,t=Jt(n);if(t){if(!t.path)return n;e=t.path}for(var r=oe.isAbsolute(e),i=e.split(/\/+/),o,a=0,l=i.length-1;l>=0;l--)o=i[l],o==="."?i.splice(l,1):o===".."?a++:a>0&&(o===""?(i.splice(l+1,a),a=0):(i.splice(l,2),a--));return e=i.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,mt(t)):e}oe.normalize=Li;function Ia(n,e){n===""&&(n="."),e===""&&(e=".");var t=Jt(e),r=Jt(n);if(r&&(n=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),mt(t);if(t||e.match(Of))return e;if(r&&!r.host&&!r.path)return r.host=e,mt(r);var i=e.charAt(0)==="/"?e:Li(n.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,mt(r)):i}oe.join=Ia;oe.isAbsolute=function(n){return n.charAt(0)==="/"||Pa.test(n)};function Pf(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var r=n.lastIndexOf("/");if(r<0||(n=n.slice(0,r),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}oe.relative=Pf;var Ta=(function(){var n=Object.create(null);return!("__proto__"in n)})();function Ra(n){return n}function If(n){return La(n)?"$"+n:n}oe.toSetString=Ta?Ra:If;function Tf(n){return La(n)?n.slice(1):n}oe.fromSetString=Ta?Ra:Tf;function La(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function Rf(n,e,t){var r=gt(n.source,e.source);return r!==0||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:gt(n.name,e.name)}oe.compareByOriginalPositions=Rf;function Lf(n,e,t){var r=n.generatedLine-e.generatedLine;return r!==0||(r=n.generatedColumn-e.generatedColumn,r!==0||t)||(r=gt(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:gt(n.name,e.name)}oe.compareByGeneratedPositionsDeflated=Lf;function gt(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function Nf(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=gt(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:gt(n.name,e.name)}oe.compareByGeneratedPositionsInflated=Nf;function Mf(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}oe.parseSourceMapInput=Mf;function Df(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var r=Jt(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}e=Ia(mt(r),e)}return Li(e)}oe.computeSourceURL=Df});var Di=D(Na=>{var Ni=vt(),Mi=Object.prototype.hasOwnProperty,nt=typeof Map<"u";function je(){this._array=[],this._set=nt?new Map:Object.create(null)}je.fromArray=function(e,t){for(var r=new je,i=0,o=e.length;i<o;i++)r.add(e[i],t);return r};je.prototype.size=function(){return nt?this._set.size:Object.getOwnPropertyNames(this._set).length};je.prototype.add=function(e,t){var r=nt?e:Ni.toSetString(e),i=nt?this.has(e):Mi.call(this._set,r),o=this._array.length;(!i||t)&&this._array.push(e),i||(nt?this._set.set(e,o):this._set[r]=o)};je.prototype.has=function(e){if(nt)return this._set.has(e);var t=Ni.toSetString(e);return Mi.call(this._set,t)};je.prototype.indexOf=function(e){if(nt){var t=this._set.get(e);if(t>=0)return t}else{var r=Ni.toSetString(e);if(Mi.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};je.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};je.prototype.toArray=function(){return this._array.slice()};Na.ArraySet=je});var Va=D(Da=>{var Ma=vt();function Vf(n,e){var t=n.generatedLine,r=e.generatedLine,i=n.generatedColumn,o=e.generatedColumn;return r>t||r==t&&o>=i||Ma.compareByGeneratedPositionsInflated(n,e)<=0}function tr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}tr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};tr.prototype.add=function(e){Vf(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};tr.prototype.toArray=function(){return this._sorted||(this._array.sort(Ma.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Da.MappingList=tr});var Vi=D(Fa=>{var Yt=Ri(),re=vt(),nr=Di().ArraySet,Ff=Va().MappingList;function we(n){n||(n={}),this._file=re.getArg(n,"file",null),this._sourceRoot=re.getArg(n,"sourceRoot",null),this._skipValidation=re.getArg(n,"skipValidation",!1),this._sources=new nr,this._names=new nr,this._mappings=new Ff,this._sourcesContents=null}we.prototype._version=3;we.fromSourceMap=function(e){var t=e.sourceRoot,r=new we({file:e.file,sourceRoot:t});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=re.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),r.addMapping(o)}),e.sources.forEach(function(i){var o=i;t!==null&&(o=re.relative(t,i)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(i);a!=null&&r.setSourceContent(i,a)}),r};we.prototype.addMapping=function(e){var t=re.getArg(e,"generated"),r=re.getArg(e,"original",null),i=re.getArg(e,"source",null),o=re.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};we.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=re.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[re.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[re.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};we.prototype.applySourceMap=function(e,t,r){var i=t;if(t==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 o=this._sourceRoot;o!=null&&(i=re.relative(o,i));var a=new nr,l=new nr;this._mappings.unsortedForEach(function(p){if(p.source===i&&p.originalLine!=null){var c=e.originalPositionFor({line:p.originalLine,column:p.originalColumn});c.source!=null&&(p.source=c.source,r!=null&&(p.source=re.join(r,p.source)),o!=null&&(p.source=re.relative(o,p.source)),p.originalLine=c.line,p.originalColumn=c.column,c.name!=null&&(p.name=c.name))}var h=p.source;h!=null&&!a.has(h)&&a.add(h);var u=p.name;u!=null&&!l.has(u)&&l.add(u)},this),this._sources=a,this._names=l,e.sources.forEach(function(p){var c=e.sourceContentFor(p);c!=null&&(r!=null&&(p=re.join(r,p)),o!=null&&(p=re.relative(o,p)),this.setSourceContent(p,c))},this)};we.prototype._validateMapping=function(e,t,r,i){if(t&&typeof t.line!="number"&&typeof t.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&&!t&&!r&&!i)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:i}))}};we.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,i=0,o=0,a=0,l="",p,c,h,u,d=this._mappings.toArray(),v=0,C=d.length;v<C;v++){if(c=d[v],p="",c.generatedLine!==t)for(e=0;c.generatedLine!==t;)p+=";",t++;else if(v>0){if(!re.compareByGeneratedPositionsInflated(c,d[v-1]))continue;p+=","}p+=Yt.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(u=this._sources.indexOf(c.source),p+=Yt.encode(u-a),a=u,p+=Yt.encode(c.originalLine-1-i),i=c.originalLine-1,p+=Yt.encode(c.originalColumn-r),r=c.originalColumn,c.name!=null&&(h=this._names.indexOf(c.name),p+=Yt.encode(h-o),o=h)),l+=p}return l};we.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=re.relative(t,r));var i=re.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};we.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};we.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fa.SourceMapGenerator=we});var Ba=D(rt=>{rt.GREATEST_LOWER_BOUND=1;rt.LEAST_UPPER_BOUND=2;function Fi(n,e,t,r,i,o){var a=Math.floor((e-n)/2)+n,l=i(t,r[a],!0);return l===0?a:l>0?e-a>1?Fi(a,e,t,r,i,o):o==rt.LEAST_UPPER_BOUND?e<r.length?e:-1:a:a-n>1?Fi(n,a,t,r,i,o):o==rt.LEAST_UPPER_BOUND?a:n<0?-1:n}rt.search=function(e,t,r,i){if(t.length===0)return-1;var o=Fi(-1,t.length,e,t,r,i||rt.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(t[o],t[o-1],!0)===0;)--o;return o}});var Ha=D($a=>{function Bi(n,e,t){var r=n[e];n[e]=n[t],n[t]=r}function Bf(n,e){return Math.round(n+Math.random()*(e-n))}function $i(n,e,t,r){if(t<r){var i=Bf(t,r),o=t-1;Bi(n,i,r);for(var a=n[r],l=t;l<r;l++)e(n[l],a)<=0&&(o+=1,Bi(n,o,l));Bi(n,o+1,l);var p=o+1;$i(n,e,t,p-1),$i(n,e,p+1,r)}}$a.quickSort=function(n,e){$i(n,e,0,n.length-1)}});var qa=D(rr=>{var T=vt(),Hi=Ba(),_t=Di().ArraySet,$f=Ri(),Kt=Ha().quickSort;function Y(n,e){var t=n;return typeof n=="string"&&(t=T.parseSourceMapInput(n)),t.sections!=null?new Ae(t,e):new ie(t,e)}Y.fromSourceMap=function(n,e){return ie.fromSourceMap(n,e)};Y.prototype._version=3;Y.prototype.__generatedMappings=null;Object.defineProperty(Y.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Y.prototype.__originalMappings=null;Object.defineProperty(Y.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Y.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};Y.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};Y.GENERATED_ORDER=1;Y.ORIGINAL_ORDER=2;Y.GREATEST_LOWER_BOUND=1;Y.LEAST_UPPER_BOUND=2;Y.prototype.eachMapping=function(e,t,r){var i=t||null,o=r||Y.GENERATED_ORDER,a;switch(o){case Y.GENERATED_ORDER:a=this._generatedMappings;break;case Y.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;a.map(function(p){var c=p.source===null?null:this._sources.at(p.source);return c=T.computeSourceURL(l,c,this._sourceMapURL),{source:c,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:this._names.at(p.name)}},this).forEach(e,i)};Y.prototype.allGeneratedPositionsFor=function(e){var t=T.getArg(e,"line"),r={source:T.getArg(e,"source"),originalLine:t,originalColumn:T.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",T.compareByOriginalPositions,Hi.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(e.column===void 0)for(var l=a.originalLine;a&&a.originalLine===l;)i.push({line:T.getArg(a,"generatedLine",null),column:T.getArg(a,"generatedColumn",null),lastColumn:T.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var p=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==p;)i.push({line:T.getArg(a,"generatedLine",null),column:T.getArg(a,"generatedColumn",null),lastColumn:T.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i};rr.SourceMapConsumer=Y;function ie(n,e){var t=n;typeof n=="string"&&(t=T.parseSourceMapInput(n));var r=T.getArg(t,"version"),i=T.getArg(t,"sources"),o=T.getArg(t,"names",[]),a=T.getArg(t,"sourceRoot",null),l=T.getArg(t,"sourcesContent",null),p=T.getArg(t,"mappings"),c=T.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);a&&(a=T.normalize(a)),i=i.map(String).map(T.normalize).map(function(h){return a&&T.isAbsolute(a)&&T.isAbsolute(h)?T.relative(a,h):h}),this._names=_t.fromArray(o.map(String),!0),this._sources=_t.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(h){return T.computeSourceURL(a,h,e)}),this.sourceRoot=a,this.sourcesContent=l,this._mappings=p,this._sourceMapURL=e,this.file=c}ie.prototype=Object.create(Y.prototype);ie.prototype.consumer=Y;ie.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=T.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==n)return t;return-1};ie.fromSourceMap=function(e,t){var r=Object.create(ie.prototype),i=r._names=_t.fromArray(e._names.toArray(),!0),o=r._sources=_t.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(v){return T.computeSourceURL(r.sourceRoot,v,t)});for(var a=e._mappings.toArray().slice(),l=r.__generatedMappings=[],p=r.__originalMappings=[],c=0,h=a.length;c<h;c++){var u=a[c],d=new ja;d.generatedLine=u.generatedLine,d.generatedColumn=u.generatedColumn,u.source&&(d.source=o.indexOf(u.source),d.originalLine=u.originalLine,d.originalColumn=u.originalColumn,u.name&&(d.name=i.indexOf(u.name)),p.push(d)),l.push(d)}return Kt(r.__originalMappings,T.compareByOriginalPositions),r};ie.prototype._version=3;Object.defineProperty(ie.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function ja(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ie.prototype._parseMappings=function(e,t){for(var r=1,i=0,o=0,a=0,l=0,p=0,c=e.length,h=0,u={},d={},v=[],C=[],L,K,V,G,ue;h<c;)if(e.charAt(h)===";")r++,h++,i=0;else if(e.charAt(h)===",")h++;else{for(L=new ja,L.generatedLine=r,G=h;G<c&&!this._charIsMappingSeparator(e,G);G++);if(K=e.slice(h,G),V=u[K],V)h+=K.length;else{for(V=[];h<G;)$f.decode(e,h,d),ue=d.value,h=d.rest,V.push(ue);if(V.length===2)throw new Error("Found a source, but no line and column");if(V.length===3)throw new Error("Found a source and line, but no column");u[K]=V}L.generatedColumn=i+V[0],i=L.generatedColumn,V.length>1&&(L.source=l+V[1],l+=V[1],L.originalLine=o+V[2],o=L.originalLine,L.originalLine+=1,L.originalColumn=a+V[3],a=L.originalColumn,V.length>4&&(L.name=p+V[4],p+=V[4])),C.push(L),typeof L.originalLine=="number"&&v.push(L)}Kt(C,T.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,Kt(v,T.compareByOriginalPositions),this.__originalMappings=v};ie.prototype._findMapping=function(e,t,r,i,o,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Hi.search(e,t,o,a)};ie.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};ie.prototype.originalPositionFor=function(e){var t={generatedLine:T.getArg(e,"line"),generatedColumn:T.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",T.compareByGeneratedPositionsDeflated,T.getArg(e,"bias",Y.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var o=T.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=T.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=T.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:T.getArg(i,"originalLine",null),column:T.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};ie.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ie.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=T.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=T.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')};ie.prototype.generatedPositionFor=function(e){var t=T.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:T.getArg(e,"line"),originalColumn:T.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",T.compareByOriginalPositions,T.getArg(e,"bias",Y.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:T.getArg(o,"generatedLine",null),column:T.getArg(o,"generatedColumn",null),lastColumn:T.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};rr.BasicSourceMapConsumer=ie;function Ae(n,e){var t=n;typeof n=="string"&&(t=T.parseSourceMapInput(n));var r=T.getArg(t,"version"),i=T.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new _t,this._names=new _t;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var l=T.getArg(a,"offset"),p=T.getArg(l,"line"),c=T.getArg(l,"column");if(p<o.line||p===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=l,{generatedOffset:{generatedLine:p+1,generatedColumn:c+1},consumer:new Y(T.getArg(a,"map"),e)}})}Ae.prototype=Object.create(Y.prototype);Ae.prototype.constructor=Y;Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});Ae.prototype.originalPositionFor=function(e){var t={generatedLine:T.getArg(e,"line"),generatedColumn:T.getArg(e,"column")},r=Hi.search(t,this._sections,function(o,a){var l=o.generatedLine-a.generatedOffset.generatedLine;return l||o.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Ae.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Ae.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Ae.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(T.getArg(e,"source"))!==-1){var i=r.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};Ae.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var l=o[a],p=i.consumer._sources.at(l.source);p=T.computeSourceURL(i.consumer.sourceRoot,p,this._sourceMapURL),this._sources.add(p),p=this._sources.indexOf(p);var c=null;l.name&&(c=i.consumer._names.at(l.name),this._names.add(c),c=this._names.indexOf(c));var h={source:p,generatedLine:l.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(i.generatedOffset.generatedLine===l.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(h),typeof h.originalLine=="number"&&this.__originalMappings.push(h)}Kt(this.__generatedMappings,T.compareByGeneratedPositionsDeflated),Kt(this.__originalMappings,T.compareByOriginalPositions)};rr.IndexedSourceMapConsumer=Ae});var Wa=D(Ga=>{var Hf=Vi().SourceMapGenerator,ir=vt(),jf=/(\r?\n)/,qf=10,yt="$$$isSourceNode$$$";function ge(n,e,t,r,i){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=i??null,this[yt]=!0,r!=null&&this.add(r)}ge.fromStringWithSourceMap=function(e,t,r){var i=new ge,o=e.split(jf),a=0,l=function(){var d=C(),v=C()||"";return d+v;function C(){return a<o.length?o[a++]:void 0}},p=1,c=0,h=null;return t.eachMapping(function(d){if(h!==null)if(p<d.generatedLine)u(h,l()),p++,c=0;else{var v=o[a]||"",C=v.substr(0,d.generatedColumn-c);o[a]=v.substr(d.generatedColumn-c),c=d.generatedColumn,u(h,C),h=d;return}for(;p<d.generatedLine;)i.add(l()),p++;if(c<d.generatedColumn){var v=o[a]||"";i.add(v.substr(0,d.generatedColumn)),o[a]=v.substr(d.generatedColumn),c=d.generatedColumn}h=d},this),a<o.length&&(h&&u(h,l()),i.add(o.splice(a).join(""))),t.sources.forEach(function(d){var v=t.sourceContentFor(d);v!=null&&(r!=null&&(d=ir.join(r,d)),i.setSourceContent(d,v))}),i;function u(d,v){if(d===null||d.source===void 0)i.add(v);else{var C=r?ir.join(r,d.source):d.source;i.add(new ge(d.originalLine,d.originalColumn,C,v,d.name))}}};ge.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[yt]||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};ge.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[yt]||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};ge.prototype.walk=function(e){for(var t,r=0,i=this.children.length;r<i;r++)t=this.children[r],t[yt]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};ge.prototype.join=function(e){var t,r,i=this.children.length;if(i>0){for(t=[],r=0;r<i-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};ge.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[yt]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};ge.prototype.setSourceContent=function(e,t){this.sourceContents[ir.toSetString(e)]=t};ge.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][yt]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(ir.fromSetString(i[t]),this.sourceContents[i[t]])};ge.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};ge.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new Hf(e),i=!1,o=null,a=null,l=null,p=null;return this.walk(function(c,h){t.code+=c,h.source!==null&&h.line!==null&&h.column!==null?((o!==h.source||a!==h.line||l!==h.column||p!==h.name)&&r.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:t.line,column:t.column},name:h.name}),o=h.source,a=h.line,l=h.column,p=h.name,i=!0):i&&(r.addMapping({generated:{line:t.line,column:t.column}}),o=null,i=!1);for(var u=0,d=c.length;u<d;u++)c.charCodeAt(u)===qf?(t.line++,t.column=0,u+1===d?(o=null,i=!1):i&&r.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:t.line,column:t.column},name:h.name})):t.column++}),this.walkSourceContents(function(c,h){r.setSourceContent(c,h)}),{code:t.code,map:r}};Ga.SourceNode=ge});var Ua=D(or=>{or.SourceMapGenerator=Vi().SourceMapGenerator;or.SourceMapConsumer=qa().SourceMapConsumer;or.SourceNode=Wa().SourceNode});var za=D((sr,Ka)=>{"use strict";sr.__esModule=!0;var qi=ce(),it=void 0;try{(typeof define!="function"||!define.amd)&&(Ja=Ua(),it=Ja.SourceNode)}catch{}var Ja;it||(it=function(n,e,t,r){this.src="",r&&this.add(r)},it.prototype={add:function(e){qi.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){qi.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function ji(n,e,t){if(qi.isArray(n)){for(var r=[],i=0,o=n.length;i<o;i++)r.push(e.wrap(n[i],t));return r}else if(typeof n=="boolean"||typeof n=="number")return n+"";return n}function Ya(n){this.srcFile=n,this.source=[]}Ya.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,`
38
- `])}),e},each:function(e){for(var t=0,r=this.source.length;t<r;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new it(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof it?e:(e=ji(e,this,t),new it(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,r){return r=this.generateList(r),this.wrap([e,t?"."+t+"(":"(",r,")"])},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 t=this,r=[];Object.keys(e).forEach(function(o){var a=ji(e[o],t);a!=="undefined"&&r.push([t.quotedString(o),":",a])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var t=this.empty(),r=0,i=e.length;r<i;r++)r&&t.add(","),t.add(ji(e[r],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}};sr.default=Ya;Ka.exports=sr.default});var tl=D((ar,el)=>{"use strict";ar.__esModule=!0;function Za(n){return n&&n.__esModule?n:{default:n}}var Qa=Hn(),Gf=me(),Gi=Za(Gf),Wf=ce(),Uf=za(),Xa=Za(Uf);function wt(n){this.value=n}function bt(){}bt.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Qa.COMPILER_REVISION,t=Qa.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,r){return Wf.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,r,i){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!r,this.context=r||{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,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,a=void 0,l=void 0,p=void 0,c=void 0;for(p=0,c=o.length;p<c;p++)a=o[p],this.source.currentLocation=a.loc,l=l||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=l,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Gi.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(),`;
42
+ Expecting `+st.join(", ")+", got '"+(this.terminals_[j]||j)+"'":bt="Parse error on line "+(f+1)+": Unexpected "+(j==1?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(bt,{text:this.lexer.match,token:this.terminals_[j]||j,line:this.lexer.yylineno,loc:x,expected:st})}}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+j);switch(ne[0]){case 1:o.push(j),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),o.push(ne[1]),j=null,L?(j=L,L=null):(h=this.lexer.yyleng,d=this.lexer.yytext,f=this.lexer.yylineno,x=this.lexer.yylloc,m>0&&m--);break;case 2:if(Ee=this.productions_[ne[1]][1],_e.$=a[a.length-Ee],_e._$={first_line:l[l.length-(Ee||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Ee||1)].first_column,last_column:l[l.length-1].last_column},E&&(_e._$.range=[l[l.length-(Ee||1)].range[0],l[l.length-1].range[1]]),nt=this.performAction.call(_e,d,h,f,this.yy,ne[1],a,l),typeof nt<"u")return nt;Ee&&(o=o.slice(0,-1*Ee*2),a=a.slice(0,-1*Ee),l=l.slice(0,-1*Ee)),o.push(this.productions_[ne[1]][0]),a.push(_e.$),l.push(_e._$),it=u[o[o.length-2]][o[o.length-1]],o.push(it);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 u=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=[u[0],u[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()+`
43
+ `+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,a,l,u,d;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),h=0;h<f.length&&(a=this._input.match(this.rules[f[h]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,l=h,!this.options.flex)));h++);return o?(d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.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,f[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.
44
+ `+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 u(f,h){return o.yytext=o.yytext.substring(f,o.yyleng-h+f)}var d=l;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(u(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:(u(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=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.yytext=u(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})();Ts.default=VE;sm.exports=Ts.default});var js=w((Ls,lm)=>{"use strict";Ls.__esModule=!0;function FE(t){return t&&t.__esModule?t:{default:t}}var HE=Fe(),ll=FE(HE);function Ns(){this.parents=[]}Ns.prototype={constructor:Ns,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Ns.prototype[n.type])throw new ll.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 ll.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 ll.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:Ms,Decorator:Ms,BlockStatement:am,DecoratorBlock:am,PartialStatement:cm,PartialBlockStatement:function(e){cm.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ms,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 Ms(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function am(t){Ms.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function cm(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Ls.default=Ns;lm.exports=Ls.default});var fm=w((Ds,um)=>{"use strict";Ds.__esModule=!0;function BE(t){return t&&t.__esModule?t:{default:t}}var UE=js(),GE=BE(UE);function wt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}wt.prototype=new GE.default;wt.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=ul(n,i,r),u=fl(n,i,r),d=a.openStandalone&&l,f=a.closeStandalone&&u,h=a.inlineStandalone&&l&&u;a.close&&ur(n,i,!0),a.open&&zt(n,i,!0),e&&h&&(ur(n,i),zt(n,i)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&d&&(ur((o.program||o.inverse).body),zt(n,i)),e&&f&&(ur(n,i),zt((o.inverse||o.program).body))}}return t};wt.prototype.BlockStatement=wt.prototype.DecoratorBlock=wt.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:fl(e.body),closeStandalone:ul((n||e).body)};if(t.openStrip.close&&ur(e.body,null,!0),r){var o=t.inverseStrip;o.open&&zt(e.body,null,!0),o.close&&ur(n.body,null,!0),t.closeStrip.open&&zt(i.body,null,!0),!this.options.ignoreStandalone&&ul(e.body)&&fl(n.body)&&(zt(e.body),ur(n.body))}else t.closeStrip.open&&zt(e.body,null,!0);return s};wt.prototype.Decorator=wt.prototype.MustacheStatement=function(t){return t.strip};wt.prototype.PartialStatement=wt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function ul(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 fl(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 ur(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 zt(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}}Ds.default=wt;um.exports=Ds.default});var dm=w(Qe=>{"use strict";Qe.__esModule=!0;Qe.SourceLocation=KE;Qe.id=JE;Qe.stripFlags=YE;Qe.stripComment=XE;Qe.preparePath=QE;Qe.prepareMustache=ZE;Qe.prepareRawBlock=e$;Qe.prepareBlock=t$;Qe.prepareProgram=r$;Qe.preparePartialBlock=n$;function zE(t){return t&&t.__esModule?t:{default:t}}var WE=Fe(),dl=zE(WE);function pl(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new dl.default(t.path.original+" doesn't match "+e,r)}}function KE(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 JE(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function YE(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function XE(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function QE(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,u=e[o].original!==l;if(n+=(e[o].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new dl.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 ZE(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 e$(t,e,r,n){pl(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 t$(t,e,r,n,i,s){n&&n.path&&pl(t,n);var o=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(o)throw new dl.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 r$(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 n$(t,e,r,n){return pl(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 hm=w(Qn=>{"use strict";Qn.__esModule=!0;Qn.parseWithoutProcessing=pm;Qn.parse=d$;function i$(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 gl(t){return t&&t.__esModule?t:{default:t}}var s$=om(),hl=gl(s$),o$=fm(),a$=gl(o$),c$=dm(),l$=i$(c$),u$=Fe(),Xn=gl(u$),f$=Te();Qn.parser=hl.default;var qs={};f$.extend(qs,l$);function pm(t,e){if(t.type==="Program")return p$(t),t;hl.default.yy=qs,qs.locInfo=function(n){return new qs.SourceLocation(e&&e.srcName,n)};var r=hl.default.parse(t);return r}function d$(t,e){var r=pm(t,e),n=new a$.default(e);return n.accept(r)}function p$(t){ml(t)}function ml(t){if(t!=null){if(Array.isArray(t)){t.forEach(ml);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!h$(t.depth))throw new Xn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Xn.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 Xn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Xn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Xn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&ml(t[r])})}}}function h$(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var vm=w(ri=>{"use strict";ri.__esModule=!0;ri.Compiler=yl;ri.precompile=v$;ri.compile=_$;function gm(t){return t&&t.__esModule?t:{default:t}}var m$=Fe(),ei=gm(m$),ti=Te(),g$=cl(),Zn=gm(g$),y$=[].slice;function yl(){}yl.prototype={compiler:yl,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||!ym(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=ti.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 ei.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){mm(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 ei.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){mm(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 ei.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,Zn.default.helpers.simpleId(s))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Zn.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:y$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Zn.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Zn.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&&!Zn.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&&ti.indexOf(i,e);if(i&&s>=0)return[r,s]}}};function v$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new ei.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 _$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new ei.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=ti.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,u){return n||(n=i()),n._child(o,a,l,u)},s}function ym(t,e){if(t===e)return!0;if(ti.isArray(t)&&ti.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!ym(t[r],e[r]))return!1;return!0}}function mm(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 wm=w(vl=>{var _m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");vl.encode=function(t){if(0<=t&&t<_m.length)return _m[t];throw new TypeError("Must be between 0 and 63: "+t)};vl.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,l=47,u=26,d=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+d:t==a?62:t==l?63:-1}});var bl=w(wl=>{var bm=wm(),_l=5,Sm=1<<_l,Em=Sm-1,$m=Sm;function w$(t){return t<0?(-t<<1)+1:(t<<1)+0}function b$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}wl.encode=function(e){var r="",n,i=w$(e);do n=i&Em,i>>>=_l,i>0&&(n|=$m),r+=bm.encode(n);while(i>0);return r};wl.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=bm.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&$m),l&=Em,s=s+(l<<o),o+=_l}while(a);n.value=b$(s),n.rest=r}});var Wr=w(Pe=>{function S$(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Pe.getArg=S$;var Cm=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,E$=/^data:.+\,.+$/;function ni(t){var e=t.match(Cm);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Pe.urlParse=ni;function Gr(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}Pe.urlGenerate=Gr;function Sl(t){var e=t,r=ni(t);if(r){if(!r.path)return t;e=r.path}for(var n=Pe.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,Gr(r)):e}Pe.normalize=Sl;function km(t,e){t===""&&(t="."),e===""&&(e=".");var r=ni(e),n=ni(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(E$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:Sl(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Pe.join=km;Pe.isAbsolute=function(t){return t.charAt(0)==="/"||Cm.test(t)};function $$(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)}Pe.relative=$$;var xm=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Pm(t){return t}function C$(t){return Om(t)?"$"+t:t}Pe.toSetString=xm?Pm:C$;function k$(t){return Om(t)?t.slice(1):t}Pe.fromSetString=xm?Pm:k$;function Om(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 x$(t,e,r){var n=zr(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:zr(t.name,e.name)}Pe.compareByOriginalPositions=x$;function P$(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=zr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:zr(t.name,e.name)}Pe.compareByGeneratedPositionsDeflated=P$;function zr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function O$(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=zr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:zr(t.name,e.name)}Pe.compareByGeneratedPositionsInflated=O$;function A$(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Pe.parseSourceMapInput=A$;function R$(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=ni(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=km(Gr(n),e)}return Sl(e)}Pe.computeSourceURL=R$});var Cl=w(Am=>{var El=Wr(),$l=Object.prototype.hasOwnProperty,fr=typeof Map<"u";function Nt(){this._array=[],this._set=fr?new Map:Object.create(null)}Nt.fromArray=function(e,r){for(var n=new Nt,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Nt.prototype.size=function(){return fr?this._set.size:Object.getOwnPropertyNames(this._set).length};Nt.prototype.add=function(e,r){var n=fr?e:El.toSetString(e),i=fr?this.has(e):$l.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(fr?this._set.set(e,s):this._set[n]=s)};Nt.prototype.has=function(e){if(fr)return this._set.has(e);var r=El.toSetString(e);return $l.call(this._set,r)};Nt.prototype.indexOf=function(e){if(fr){var r=this._set.get(e);if(r>=0)return r}else{var n=El.toSetString(e);if($l.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Nt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Nt.prototype.toArray=function(){return this._array.slice()};Am.ArraySet=Nt});var Tm=w(Im=>{var Rm=Wr();function I$(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||Rm.compareByGeneratedPositionsInflated(t,e)<=0}function Vs(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Vs.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Vs.prototype.add=function(e){I$(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Vs.prototype.toArray=function(){return this._sorted||(this._array.sort(Rm.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Im.MappingList=Vs});var kl=w(Nm=>{var ii=bl(),ve=Wr(),Fs=Cl().ArraySet,T$=Tm().MappingList;function Ze(t){t||(t={}),this._file=ve.getArg(t,"file",null),this._sourceRoot=ve.getArg(t,"sourceRoot",null),this._skipValidation=ve.getArg(t,"skipValidation",!1),this._sources=new Fs,this._names=new Fs,this._mappings=new T$,this._sourcesContents=null}Ze.prototype._version=3;Ze.fromSourceMap=function(e){var r=e.sourceRoot,n=new Ze({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=ve.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=ve.relative(r,i)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(i);o!=null&&n.setSourceContent(i,o)}),n};Ze.prototype.addMapping=function(e){var r=ve.getArg(e,"generated"),n=ve.getArg(e,"original",null),i=ve.getArg(e,"source",null),s=ve.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})};Ze.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=ve.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ve.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ve.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ze.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=ve.relative(s,i));var o=new Fs,a=new Fs;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=ve.join(n,l.source)),s!=null&&(l.source=ve.relative(s,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var d=l.source;d!=null&&!o.has(d)&&o.add(d);var f=l.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=ve.join(n,l)),s!=null&&(l=ve.relative(s,l)),this.setSourceContent(l,u))},this)};Ze.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}))}};Ze.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",l,u,d,f,h=this._mappings.toArray(),m=0,g=h.length;m<g;m++){if(u=h[m],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(m>0){if(!ve.compareByGeneratedPositionsInflated(u,h[m-1]))continue;l+=","}l+=ii.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=ii.encode(f-o),o=f,l+=ii.encode(u.originalLine-1-i),i=u.originalLine-1,l+=ii.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=ii.encode(d-s),s=d)),a+=l}return a};Ze.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ve.relative(r,n));var i=ve.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Ze.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};Ze.prototype.toString=function(){return JSON.stringify(this.toJSON())};Nm.SourceMapGenerator=Ze});var Mm=w(dr=>{dr.GREATEST_LOWER_BOUND=1;dr.LEAST_UPPER_BOUND=2;function xl(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?xl(o,e,r,n,i,s):s==dr.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?xl(t,o,r,n,i,s):s==dr.LEAST_UPPER_BOUND?o:t<0?-1:t}dr.search=function(e,r,n,i){if(r.length===0)return-1;var s=xl(-1,r.length,e,r,n,i||dr.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var jm=w(Lm=>{function Pl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function N$(t,e){return Math.round(t+Math.random()*(e-t))}function Ol(t,e,r,n){if(r<n){var i=N$(r,n),s=r-1;Pl(t,i,n);for(var o=t[n],a=r;a<n;a++)e(t[a],o)<=0&&(s+=1,Pl(t,s,a));Pl(t,s+1,a);var l=s+1;Ol(t,e,r,l-1),Ol(t,e,l+1,n)}}Lm.quickSort=function(t,e){Ol(t,e,0,t.length-1)}});var qm=w(Hs=>{var M=Wr(),Al=Mm(),Kr=Cl().ArraySet,M$=bl(),si=jm().quickSort;function de(t,e){var r=t;return typeof t=="string"&&(r=M.parseSourceMapInput(t)),r.sections!=null?new dt(r,e):new Se(r,e)}de.fromSourceMap=function(t,e){return Se.fromSourceMap(t,e)};de.prototype._version=3;de.prototype.__generatedMappings=null;Object.defineProperty(de.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});de.prototype.__originalMappings=null;Object.defineProperty(de.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});de.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};de.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};de.GENERATED_ORDER=1;de.ORIGINAL_ORDER=2;de.GREATEST_LOWER_BOUND=1;de.LEAST_UPPER_BOUND=2;de.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||de.GENERATED_ORDER,o;switch(s){case de.GENERATED_ORDER:o=this._generatedMappings;break;case de.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=M.computeSourceURL(a,u,this._sourceMapURL),{source:u,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)};de.prototype.allGeneratedPositionsFor=function(e){var r=M.getArg(e,"line"),n={source:M.getArg(e,"source"),originalLine:r,originalColumn:M.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",M.compareByOriginalPositions,Al.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:M.getArg(o,"generatedLine",null),column:M.getArg(o,"generatedColumn",null),lastColumn:M.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var l=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==l;)i.push({line:M.getArg(o,"generatedLine",null),column:M.getArg(o,"generatedColumn",null),lastColumn:M.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};Hs.SourceMapConsumer=de;function Se(t,e){var r=t;typeof t=="string"&&(r=M.parseSourceMapInput(t));var n=M.getArg(r,"version"),i=M.getArg(r,"sources"),s=M.getArg(r,"names",[]),o=M.getArg(r,"sourceRoot",null),a=M.getArg(r,"sourcesContent",null),l=M.getArg(r,"mappings"),u=M.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=M.normalize(o)),i=i.map(String).map(M.normalize).map(function(d){return o&&M.isAbsolute(o)&&M.isAbsolute(d)?M.relative(o,d):d}),this._names=Kr.fromArray(s.map(String),!0),this._sources=Kr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return M.computeSourceURL(o,d,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Se.prototype=Object.create(de.prototype);Se.prototype.consumer=de;Se.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=M.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};Se.fromSourceMap=function(e,r){var n=Object.create(Se.prototype),i=n._names=Kr.fromArray(e._names.toArray(),!0),s=n._sources=Kr.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(m){return M.computeSourceURL(n.sourceRoot,m,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,d=o.length;u<d;u++){var f=o[u],h=new Dm;h.generatedLine=f.generatedLine,h.generatedColumn=f.generatedColumn,f.source&&(h.source=s.indexOf(f.source),h.originalLine=f.originalLine,h.originalColumn=f.originalColumn,f.name&&(h.name=i.indexOf(f.name)),l.push(h)),a.push(h)}return si(n.__originalMappings,M.compareByOriginalPositions),n};Se.prototype._version=3;Object.defineProperty(Se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Dm(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Se.prototype._parseMappings=function(e,r){for(var n=1,i=0,s=0,o=0,a=0,l=0,u=e.length,d=0,f={},h={},m=[],g=[],_,x,E,V,G;d<u;)if(e.charAt(d)===";")n++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(_=new Dm,_.generatedLine=n,V=d;V<u&&!this._charIsMappingSeparator(e,V);V++);if(x=e.slice(d,V),E=f[x],E)d+=x.length;else{for(E=[];d<V;)M$.decode(e,d,h),G=h.value,d=h.rest,E.push(G);if(E.length===2)throw new Error("Found a source, but no line and column");if(E.length===3)throw new Error("Found a source and line, but no column");f[x]=E}_.generatedColumn=i+E[0],i=_.generatedColumn,E.length>1&&(_.source=a+E[1],a+=E[1],_.originalLine=s+E[2],s=_.originalLine,_.originalLine+=1,_.originalColumn=o+E[3],o=_.originalColumn,E.length>4&&(_.name=l+E[4],l+=E[4])),g.push(_),typeof _.originalLine=="number"&&m.push(_)}si(g,M.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,si(m,M.compareByOriginalPositions),this.__originalMappings=m};Se.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 Al.search(e,r,s,o)};Se.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}};Se.prototype.originalPositionFor=function(e){var r={generatedLine:M.getArg(e,"line"),generatedColumn:M.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",M.compareByGeneratedPositionsDeflated,M.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=M.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=M.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=M.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:M.getArg(i,"originalLine",null),column:M.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};Se.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Se.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=M.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=M.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.')};Se.prototype.generatedPositionFor=function(e){var r=M.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:M.getArg(e,"line"),originalColumn:M.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,M.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:M.getArg(s,"generatedLine",null),column:M.getArg(s,"generatedColumn",null),lastColumn:M.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Hs.BasicSourceMapConsumer=Se;function dt(t,e){var r=t;typeof t=="string"&&(r=M.parseSourceMapInput(t));var n=M.getArg(r,"version"),i=M.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Kr,this._names=new Kr;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=M.getArg(o,"offset"),l=M.getArg(a,"line"),u=M.getArg(a,"column");if(l<s.line||l===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new de(M.getArg(o,"map"),e)}})}dt.prototype=Object.create(de.prototype);dt.prototype.constructor=de;dt.prototype._version=3;Object.defineProperty(dt.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}});dt.prototype.originalPositionFor=function(e){var r={generatedLine:M.getArg(e,"line"),generatedColumn:M.getArg(e,"column")},n=Al.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}};dt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};dt.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.')};dt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(M.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}};dt.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=M.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var d={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:u};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}si(this.__generatedMappings,M.compareByGeneratedPositionsDeflated),si(this.__originalMappings,M.compareByOriginalPositions)};Hs.IndexedSourceMapConsumer=dt});var Fm=w(Vm=>{var L$=kl().SourceMapGenerator,Bs=Wr(),j$=/(\r?\n)/,D$=10,Jr="$$$isSourceNode$$$";function He(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[Jr]=!0,n!=null&&this.add(n)}He.fromStringWithSourceMap=function(e,r,n){var i=new He,s=e.split(j$),o=0,a=function(){var h=g(),m=g()||"";return h+m;function g(){return o<s.length?s[o++]:void 0}},l=1,u=0,d=null;return r.eachMapping(function(h){if(d!==null)if(l<h.generatedLine)f(d,a()),l++,u=0;else{var m=s[o]||"",g=m.substr(0,h.generatedColumn-u);s[o]=m.substr(h.generatedColumn-u),u=h.generatedColumn,f(d,g),d=h;return}for(;l<h.generatedLine;)i.add(a()),l++;if(u<h.generatedColumn){var m=s[o]||"";i.add(m.substr(0,h.generatedColumn)),s[o]=m.substr(h.generatedColumn),u=h.generatedColumn}d=h},this),o<s.length&&(d&&f(d,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(h){var m=r.sourceContentFor(h);m!=null&&(n!=null&&(h=Bs.join(n,h)),i.setSourceContent(h,m))}),i;function f(h,m){if(h===null||h.source===void 0)i.add(m);else{var g=n?Bs.join(n,h.source):h.source;i.add(new He(h.originalLine,h.originalColumn,g,m,h.name))}}};He.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Jr]||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};He.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Jr]||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};He.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Jr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};He.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};He.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Jr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};He.prototype.setSourceContent=function(e,r){this.sourceContents[Bs.toSetString(e)]=r};He.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Jr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Bs.fromSetString(i[r]),this.sourceContents[i[r]])};He.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};He.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new L$(e),i=!1,s=null,o=null,a=null,l=null;return this.walk(function(u,d){r.code+=u,d.source!==null&&d.line!==null&&d.column!==null?((s!==d.source||o!==d.line||a!==d.column||l!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),s=d.source,o=d.line,a=d.column,l=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var f=0,h=u.length;f<h;f++)u.charCodeAt(f)===D$?(r.line++,r.column=0,f+1===h?(s=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(u,d){n.setSourceContent(u,d)}),{code:r.code,map:n}};Vm.SourceNode=He});var Hm=w(Us=>{Us.SourceMapGenerator=kl().SourceMapGenerator;Us.SourceMapConsumer=qm().SourceMapConsumer;Us.SourceNode=Fm().SourceNode});var zm=w((Gs,Gm)=>{"use strict";Gs.__esModule=!0;var Il=Te(),pr=void 0;try{(typeof define!="function"||!define.amd)&&(Bm=Hm(),pr=Bm.SourceNode)}catch{}var Bm;pr||(pr=function(t,e,r,n){this.src="",n&&this.add(n)},pr.prototype={add:function(e){Il.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Il.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Rl(t,e,r){if(Il.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 Um(t){this.srcFile=t,this.source=[]}Um.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,`
45
+ `])}),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 pr(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 pr?e:(e=Rl(e,this,r),new pr(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=Rl(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(Rl(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Gs.default=Um;Gm.exports=Gs.default});var Xm=w((zs,Ym)=>{"use strict";zs.__esModule=!0;function Jm(t){return t&&t.__esModule?t:{default:t}}var Wm=ks(),q$=Fe(),Tl=Jm(q$),V$=Te(),F$=zm(),Km=Jm(F$);function Yr(t){this.value=t}function Xr(){}Xr.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=Wm.COMPILER_REVISION,r=Wm.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return V$.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,u=void 0;for(l=0,u=s.length;l<u;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 Tl.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(),`;
39
46
  `]),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) {
40
47
  `),this.decorators.push(`}
41
- `),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 d=this.context,v=d.programs,C=d.decorators;for(p=0,c=v.length;p<c;p++)u[p]=v[p],C[p]&&(u[p+"_d"]=C[p],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),t.srcName?(u=u.toStringWithSourceMap({file:t.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new Xa.default(this.options.srcName),this.decorators=new Xa.default(this.options.srcName)},createFunctionContext:function(e){var t=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(p){var c=t.aliases[p];c.children&&c.referenceCount>1&&(r+=", alias"+ ++o+"="+p,c.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var l=this.mergeSource(r);return e?(a.push(l),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
42
- `,l,"}"])},mergeSource:function(e){var t=this.environment.isSimple,r=!this.forceBuffer,i=void 0,o=void 0,a=void 0,l=void 0;return this.source.each(function(p){p.appendToBuffer?(a?p.prepend(" + "):a=p,l=p):(a&&(o?a.prepend("buffer += "):i=!0,l.add(";"),a=l=void 0),o=!0,t||(r=!1))}),r?a?(a.prepend("return "),l.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),l.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
48
+ `),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var f={compiler:this.compilerInfo(),main:d};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var h=this.context,m=h.programs,g=h.decorators;for(l=0,u=m.length;l<u;l++)f[l]=m[l],g[l]&&(f[l+"_d"]=g[l],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new Km.default(this.options.srcName),this.decorators=new Km.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 u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++s+"="+l,u.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(","),`) {
49
+ `,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?"":`;
43
50
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
44
51
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
45
52
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -47,13 +54,13 @@ Expecting `+Re.join(", ")+", got '"+(this.terminals_[$]||$)+"'":Le="Parse error
47
54
  }
48
55
  return undefined
49
56
  }
50
- `.trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(e,0,r);var i=this.popStack();r.splice(1,0,i),this.push(this.source.functionCall(t,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var r=this.topStack();t.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",t),"}"])},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(t){return[" != null ? ",t,' : ""']}),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,t,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,t,r)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,r)},resolvePath:function(e,t,r,i,o){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(Jf(this.options.strict&&o,this,t,r,e));return}for(var l=t.length,p=function(h){a.replaceStack(function(u){var d=a.nameLookup(u,t[h],e);return i?[" && ",d]:[" != null ? ",d," : ",u]})},c=r;c<l;c++)p(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!=="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,t){var r=this.nameLookup("decorators",t,"decorator"),i=this.setupHelperArgs(t,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+t+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,t,r){var i=this.popStack(),o=this.setupHelper(e,t),a=[];r&&a.push(o.name),a.push(i),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var l=["(",this.itemsSeparatedBy(a,"||"),")"],p=this.source.functionCall(l,"call",o.callParams);this.push(p)},itemsSeparatedBy:function(e,t){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(t,e[i]);return r},invokeKnownHelper:function(e,t){var r=this.setupHelper(e,t);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,t),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",o," || ",r,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,t,r){var i=[],o=this.setupParams(t,1,i);e&&(t=this.popStack(),delete o.name),r&&(o.indent=JSON.stringify(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(t):i.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var t=this.popStack(),r=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),r=this.popStack());var a=this.hash;r&&(a.contexts[e]=r),i&&(a.types[e]=i),o&&(a.ids[e]=o),a.values[e]=t},pushId:function(e,t,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):e==="PathExpression"?this.pushString(t):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:bt,compileChildren:function(e,t){for(var r=e.children,i=void 0,o=void 0,a=0,l=r.length;a<l;a++){i=r[a],o=new this.compiler;var p=this.matchExistingProgram(i);if(p==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=o.compile(i,t,this.context,!this.precompile),this.context.decorators[c]=o.decorators,this.context.environments[c]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=p.index,i.name="program"+p.index,this.useDepths=this.useDepths||p.useDepths,this.useBlockParams=this.useBlockParams||p.useBlockParams}},matchExistingProgram:function(e){for(var t=0,r=this.context.environments.length;t<r;t++){var i=this.context.environments[t];if(i&&i.equals(e))return i}},programExpression:function(e){var t=this.environment.children[e],r=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths"),"container.program("+r.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof wt||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new wt(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 t=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Gi.default("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof wt)r=[a.value],t=["(",r],o=!0;else{i=!0;var l=this.incrStack();t=["((",this.push(l)," = ",a,")"],r=this.topStack()}var p=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(t.concat(p,")"))},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 t=0,r=e.length;t<r;t++){var i=e[t];if(i instanceof wt)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),r=(t?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof wt)return r.value;if(!t){if(!this.stackSlot)throw new Gi.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof wt?t.value:t},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 t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,r){var i=[],o=this.setupHelperArgs(t,e,i,r),a=this.nameLookup("helpers",t,"helper"),l=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:a,callParams:[l].concat(i)}},setupParams:function(e,t,r){var i={},o=[],a=[],l=[],p=!r,c=void 0;p&&(r=[]),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 d=t;d--;)c=this.popStack(),r[d]=c,this.trackIds&&(l[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),o[d]=this.popStack());return p&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(l)),this.stringParams&&(i.types=this.source.generateArray(a),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,t,r,i){var o=this.setupParams(e,t,r);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),r.push("options"),["options=",o]):r?(r.push(o),""):o}};(function(){for(var n="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=bt.RESERVED_WORDS={},t=0,r=n.length;t<r;t++)e[n[t]]=!0})();bt.isValidJavaScriptVariableName=function(n){return!bt.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n)};function Jf(n,e,t,r,i){var o=e.popStack(),a=t.length;n&&a--;for(var l=r;l<a;l++)o=e.nameLookup(o,t[l],i);return n?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(t[a]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}ar.default=bt;el.exports=ar.default});var il=D((lr,rl)=>{"use strict";lr.__esModule=!0;function zt(n){return n&&n.__esModule?n:{default:n}}var Yf=sa(),Kf=zt(Yf),zf=yi(),Qf=zt(zf),Wi=_a(),Ui=xa(),Xf=tl(),Zf=zt(Xf),eh=Xn(),th=zt(eh),nh=mi(),rh=zt(nh),ih=Kf.default.create;function nl(){var n=ih();return n.compile=function(e,t){return Ui.compile(e,t,n)},n.precompile=function(e,t){return Ui.precompile(e,t,n)},n.AST=Qf.default,n.Compiler=Ui.Compiler,n.JavaScriptCompiler=Zf.default,n.Parser=Wi.parser,n.parse=Wi.parse,n.parseWithoutProcessing=Wi.parseWithoutProcessing,n}var xt=nl();xt.create=nl;rh.default(xt);xt.Visitor=th.default;xt.default=xt;lr.default=xt;rl.exports=lr.default});var ol=D(cr=>{"use strict";cr.__esModule=!0;cr.print=lh;cr.PrintVisitor=te;function oh(n){return n&&n.__esModule?n:{default:n}}var sh=Xn(),ah=oh(sh);function lh(n){return new te().accept(n)}function te(){this.padding=0}te.prototype=new ah.default;te.prototype.pad=function(n){for(var e="",t=0,r=this.padding;t<r;t++)e+=" ";return e+=n+`
51
- `,e};te.prototype.Program=function(n){var e="",t=n.body,r=void 0,i=void 0;if(n.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=n.blockParams.length;r<i;r++)o+=" "+n.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=t.length;r<i;r++)e+=this.accept(t[r]);return this.padding--,e};te.prototype.MustacheStatement=function(n){return this.pad("{{ "+this.SubExpression(n)+" }}")};te.prototype.Decorator=function(n){return this.pad("{{ DIRECTIVE "+this.SubExpression(n)+" }}")};te.prototype.BlockStatement=te.prototype.DecoratorBlock=function(n){var e="";return e+=this.pad((n.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(n)),n.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--),n.inverse&&(n.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(n.inverse),this.padding--,n.program&&this.padding--),this.padding--,e};te.prototype.PartialStatement=function(n){var e="PARTIAL:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),this.pad("{{> "+e+" }}")};te.prototype.PartialBlockStatement=function(n){var e="PARTIAL BLOCK:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--,this.pad("{{> "+e+" }}")};te.prototype.ContentStatement=function(n){return this.pad("CONTENT[ '"+n.value+"' ]")};te.prototype.CommentStatement=function(n){return this.pad("{{! '"+n.value+"' }}")};te.prototype.SubExpression=function(n){for(var e=n.params,t=[],r=void 0,i=0,o=e.length;i<o;i++)t.push(this.accept(e[i]));return e="["+t.join(", ")+"]",r=n.hash?" "+this.accept(n.hash):"",this.accept(n.path)+" "+e+r};te.prototype.PathExpression=function(n){var e=n.parts.join("/");return(n.data?"@":"")+"PATH:"+e};te.prototype.StringLiteral=function(n){return'"'+n.value+'"'};te.prototype.NumberLiteral=function(n){return"NUMBER{"+n.value+"}"};te.prototype.BooleanLiteral=function(n){return"BOOLEAN{"+n.value+"}"};te.prototype.UndefinedLiteral=function(){return"UNDEFINED"};te.prototype.NullLiteral=function(){return"NULL"};te.prototype.Hash=function(n){for(var e=n.pairs,t=[],r=0,i=e.length;r<i;r++)t.push(this.accept(e[r]));return"HASH{"+t.join(", ")+"}"};te.prototype.HashPair=function(n){return n.key+"="+this.accept(n.value)}});var cl=D((dg,ll)=>{var ur=il().default,al=ol();ur.PrintVisitor=al.PrintVisitor;ur.print=al.print;ll.exports=ur;function sl(n,e){var t=Ce("fs"),r=t.readFileSync(e,"utf8");n.exports=ur.compile(r)}typeof Ce<"u"&&Ce.extensions&&(Ce.extensions[".handlebars"]=sl,Ce.extensions[".hbs"]=sl)});var mo=to(ho(),1),{program:Wh,createCommand:Uh,createArgument:Jh,createOption:Yh,CommanderError:Kh,InvalidArgumentError:zh,InvalidOptionArgumentError:Qh,Command:go,Argument:Xh,Option:Zh,Help:ed}=mo.default;var vo=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
57
+ `.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(H$(this.options.strict&&s,this,r,n,e));return}for(var a=r.length,l=function(d){o.replaceStack(function(f){var h=o.nameLookup(f,r[d],e);return i?[" && ",h]:[" != null ? ",h," : ",f]})},u=n;u<a;u++)l(u)},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:Xr,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 u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=s.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=s.decorators,this.context.environments[u]=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 Yr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Yr(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 Tl.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof Yr)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 Yr)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 Yr)return n.value;if(!r){if(!this.stackSlot)throw new Tl.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 Yr?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,u=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 d=this.popStack(),f=this.popStack();(f||d)&&(i.fn=f||"container.noop",i.inverse=d||"container.noop");for(var h=r;h--;)u=this.popStack(),n[h]=u,this.trackIds&&(a[h]=this.popStack()),this.stringParams&&(o[h]=this.popStack(),s[h]=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=Xr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Xr.isValidJavaScriptVariableName=function(t){return!Xr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function H$(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}zs.default=Xr;Ym.exports=zs.default});var eg=w((Ws,Zm)=>{"use strict";Ws.__esModule=!0;function oi(t){return t&&t.__esModule?t:{default:t}}var B$=rm(),U$=oi(B$),G$=cl(),z$=oi(G$),Nl=hm(),Ml=vm(),W$=Xm(),K$=oi(W$),J$=js(),Y$=oi(J$),X$=il(),Q$=oi(X$),Z$=U$.default.create;function Qm(){var t=Z$();return t.compile=function(e,r){return Ml.compile(e,r,t)},t.precompile=function(e,r){return Ml.precompile(e,r,t)},t.AST=z$.default,t.Compiler=Ml.Compiler,t.JavaScriptCompiler=K$.default,t.Parser=Nl.parser,t.parse=Nl.parse,t.parseWithoutProcessing=Nl.parseWithoutProcessing,t}var Qr=Qm();Qr.create=Qm;Q$.default(Qr);Qr.Visitor=Y$.default;Qr.default=Qr;Ws.default=Qr;Zm.exports=Ws.default});var tg=w(Ks=>{"use strict";Ks.__esModule=!0;Ks.print=nC;Ks.PrintVisitor=ge;function eC(t){return t&&t.__esModule?t:{default:t}}var tC=js(),rC=eC(tC);function nC(t){return new ge().accept(t)}function ge(){this.padding=0}ge.prototype=new rC.default;ge.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
58
+ `,e};ge.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};ge.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ge.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ge.prototype.BlockStatement=ge.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};ge.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+" }}")};ge.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+" }}")};ge.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ge.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ge.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};ge.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ge.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ge.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ge.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ge.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ge.prototype.NullLiteral=function(){return"NULL"};ge.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(", ")+"}"};ge.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var sg=w((mA,ig)=>{var Js=eg().default,ng=tg();Js.PrintVisitor=ng.PrintVisitor;Js.print=ng.print;ig.exports=Js;function rg(t,e){var r=ot("fs"),n=r.readFileSync(e,"utf8");t.exports=Js.compile(n)}typeof ot<"u"&&ot.extensions&&(ot.extensions[".handlebars"]=rg,ot.extensions[".hbs"]=rg)});var Zl=io(Ql(),1),{program:FC,createCommand:HC,createArgument:BC,createOption:UC,CommanderError:GC,InvalidArgumentError:zC,InvalidOptionArgumentError:WC,Command:eu,Argument:KC,Option:JC,Help:YC}=Zl.default;var tu=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
52
59
  cli_contracts: 0.1.0
53
60
 
54
61
  info:
55
62
  title: view-contracts CLI
56
- version: 0.3.0
63
+ version: 0.3.3
57
64
  description: >-
58
65
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
59
66
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -212,48 +219,11 @@ command_sets:
212
219
  description: Lint passed.
213
220
  '1':
214
221
  description: Lint failed.
215
-
216
- catalog.build:
217
- summary: Build static catalog HTML for design review.
218
- description: >-
219
- Renders all registered views with mock ViewModels into a single HTML file
220
- for design review, screenshot baselines, and accessibility checks.
221
- usage:
222
- - view-contracts catalog build
223
- - view-contracts catalog build -c view-contracts.config.yaml
224
- - view-contracts catalog build -o dist/catalog.html
225
- options:
226
- - name: config
227
- aliases: [c]
228
- description: Path to view-contracts.config.yaml (discovered upward from cwd when omitted).
229
- value_name: path
230
- schema:
231
- type: string
232
- - name: output
233
- aliases: [o]
234
- description: Output HTML path (defaults to dist/catalog.html next to bindings).
235
- value_name: path
236
- schema:
237
- type: string
238
- file:
239
- mode: write
240
- media_type: text/html
241
- encoding: utf-8
242
- exits:
243
- '0':
244
- description: Catalog built.
245
- files:
246
- - path: dist/catalog.html
247
- required: false
248
- media_type: text/html
249
- encoding: utf-8
250
- '1':
251
- description: Build failed.
252
- `,_o=`{
222
+ `,ru=`{
253
223
  "cli_contracts": "0.1.0",
254
224
  "info": {
255
225
  "title": "view-contracts CLI",
256
- "version": "0.3.0",
226
+ "version": "0.3.3",
257
227
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
258
228
  },
259
229
  "artifact_slots": {
@@ -479,167 +449,133 @@ command_sets:
479
449
  "description": "Lint failed."
480
450
  }
481
451
  }
482
- },
483
- "catalog.build": {
484
- "summary": "Build static catalog HTML for design review.",
485
- "description": "Renders all registered views with mock ViewModels into a single HTML file for design review, screenshot baselines, and accessibility checks.",
486
- "usage": [
487
- "view-contracts catalog build",
488
- "view-contracts catalog build -c view-contracts.config.yaml",
489
- "view-contracts catalog build -o dist/catalog.html"
490
- ],
491
- "options": [
492
- {
493
- "name": "config",
494
- "aliases": [
495
- "c"
496
- ],
497
- "description": "Path to view-contracts.config.yaml (discovered upward from cwd when omitted).",
498
- "value_name": "path",
499
- "schema": {
500
- "type": "string"
501
- }
502
- },
503
- {
504
- "name": "output",
505
- "aliases": [
506
- "o"
507
- ],
508
- "description": "Output HTML path (defaults to dist/catalog.html next to bindings).",
509
- "value_name": "path",
510
- "schema": {
511
- "type": "string"
512
- },
513
- "file": {
514
- "mode": "write",
515
- "media_type": "text/html",
516
- "encoding": "utf-8"
517
- }
518
- }
519
- ],
520
- "exits": {
521
- "0": {
522
- "description": "Catalog built.",
523
- "files": [
524
- {
525
- "path": "dist/catalog.html",
526
- "required": false,
527
- "media_type": "text/html",
528
- "encoding": "utf-8"
529
- }
530
- ]
531
- },
532
- "1": {
533
- "description": "Build failed."
534
- }
535
- }
536
452
  }
537
453
  }
538
454
  }
539
455
  }
540
- }`;function yo(n,e){let t=new go;t.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),t.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.compile(a,l.optsWithGlobals())});let r=t.command("render");r.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.renderReact(a,l.optsWithGlobals())}),r.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.renderBridge(a,l.optsWithGlobals())}),t.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.build(a,l.optsWithGlobals())});let i=t.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.contractsGenerate(a,l.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(a,l)=>{await n.contractsCheck(a,l.optsWithGlobals())}),t.command("catalog").command("build").description("Build static catalog HTML for design review.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-o, --output <path>","Output HTML path (defaults to dist/catalog.html next to bindings).").action(async(a,l)=>{await n.catalogBuild(a,l.optsWithGlobals())}),t.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(a,l,p)=>{a.length===0&&!l.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
541
- `),process.exit(2));let c=l.format||"yaml",h=JSON.parse(_o),u=l.all?[]:a;if(u.length===0)if(c==="json"){let d={};l.includeMeta&&(d._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:h.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"]}),Object.assign(d,h),process.stdout.write(JSON.stringify(d,null,2)+`
542
- `)}else{let d=[];if(d.push("# view-contracts extract"),d.push("# source: embedded"),d.push("# type: cli-contracts/command-extract"),l.includeMeta){d.push("---"),d.push("source: embedded"),d.push("type: cli-contracts/command-extract"),d.push("extractedAt: "+new Date().toISOString()),d.push("spec_version: "+(h.cli_contracts??"0.1.0")),d.push("commands:");for(let v of["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.catalog.build"])d.push(" - "+v)}d.push("---"),d.push(vo),process.stdout.write(d.join(`
456
+ }`;function nu(t,e){let r=new eu;r.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),r.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.compile(s,o.optsWithGlobals())});let n=r.command("render");n.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.renderReact(s,o.optsWithGlobals())}),n.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.renderBridge(s,o.optsWithGlobals())}),r.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.build(s,o.optsWithGlobals())});let i=r.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.contractsGenerate(s,o.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(s,o)=>{await t.contractsCheck(s,o.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(s,o,a)=>{s.length===0&&!o.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
457
+ `),process.exit(2));let l=o.format||"yaml",u=JSON.parse(ru),d=o.all?[]:s;if(d.length===0)if(l==="json"){let f={};o.includeMeta&&(f._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:u.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check"]}),Object.assign(f,u),process.stdout.write(JSON.stringify(f,null,2)+`
458
+ `)}else{let f=[];if(f.push("# view-contracts extract"),f.push("# source: embedded"),f.push("# type: cli-contracts/command-extract"),o.includeMeta){f.push("---"),f.push("source: embedded"),f.push("type: cli-contracts/command-extract"),f.push("extractedAt: "+new Date().toISOString()),f.push("spec_version: "+(u.cli_contracts??"0.1.0")),f.push("commands:");for(let h of["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check"])f.push(" - "+h)}f.push("---"),f.push(tu),process.stdout.write(f.join(`
543
459
  `)+`
544
- `)}else{let d={cli_contracts:h.cli_contracts,info:h.info,command_sets:{}},v=d.command_sets;for(let[C,L]of Object.entries(h.command_sets??{})){let K=L.commands;if(!K)continue;let V={};for(let[G,ue]of Object.entries(K)){let $=C+"."+G;u.some(X=>X===G||X===$||G.startsWith(X+"."))&&(V[G]=ue)}if(Object.keys(V).length>0){let G={...L};G.commands=V,v[C]=G}}h.components&&(d.components=h.components),process.stdout.write(JSON.stringify(d,null,2)+`
545
- `)}process.exit(0)}),t}import{writeFile as Rh,mkdir as Lh}from"node:fs/promises";import{resolve as ot,dirname as kl}from"node:path";import{spawn as Al}from"node:child_process";import{fileURLToPath as Nh}from"node:url";import{readFile as cc}from"node:fs/promises";import{basename as uc,relative as pc,resolve as fc}from"node:path";import{readFileSync as Zl}from"node:fs";import{dirname as xo,resolve as ec}from"node:path";import O from"typescript";var hn=new Set(["App","Box","Button","Checkbox","Column","Divider","Drawer","Field","Form","Heading","Icon","IconButton","Image","Link","List","ListItem","Modal","Page","Popover","Progress","Radio","Row","SafeArea","ScrollArea","Select","Spacer","Spinner","Stack","Switch","Text","TextArea","TextInput","Tooltip"]);import{readFileSync as Kl}from"node:fs";import{resolve as zl}from"node:path";import U from"typescript";function Vr(n,e){let t=new Map;for(let r of n.statements){if(!U.isImportDeclaration(r)||!r.importClause?.namedBindings||!U.isStringLiteral(r.moduleSpecifier)||!U.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=zl(e,i);for(let a of r.importClause.namedBindings.elements)t.set(a.name.text,o)}return t}function Ql(n){if(!U.isObjectBindingPattern(n.name)||n.name.elements.length===0)return null;let e=n.name.elements[0];return!U.isBindingElement(e)||!U.isIdentifier(e.name)?null:e.name.text}function Xl(n){if(U.isParenthesizedExpression(n))return n.expression;if(U.isJsxElement(n)||U.isJsxSelfClosingElement(n)||U.isJsxFragment(n))return n;if(U.isBlock(n)&&n.statements.length===1){let e=n.statements[0];if(U.isReturnStatement(e)&&e.expression)return U.isParenthesizedExpression(e.expression)?e.expression.expression:e.expression}return null}function wo(n){if(!U.isIdentifier(n.expression)||n.expression.text!=="view"||n.arguments.length!==1)return null;let e=n.arguments[0];if(!U.isArrowFunction(e)&&!U.isFunctionExpression(e))return null;let t="__noop";if(e.parameters.length===1){let i=Ql(e.parameters[0]);if(i)t=i;else if(U.isIdentifier(e.parameters[0].name))t=e.parameters[0].name.text;else return null}else if(e.parameters.length>1)return null;let r=Xl(e.body);return r?{paramName:t,jsxRoot:r}:null}function bo(n,e){let t=Kl(n,"utf-8"),r=U.createSourceFile(n,t,U.ScriptTarget.Latest,!0,U.ScriptKind.TSX),i=null;function o(a){if(U.isVariableStatement(a))for(let l of a.declarationList.declarations){if(!U.isIdentifier(l.name)||l.name.text!==e||!l.initializer||!U.isCallExpression(l.initializer))continue;let p=wo(l.initializer);p&&(i=p)}if(U.isExportAssignment(a)&&a.isExportEquals===!1&&a.expression&&U.isCallExpression(a.expression)){let l=wo(a.expression);l&&e==="default"&&(i=l)}U.forEachChild(a,o)}return o(r),i}var tc=new Set(["Text","Heading"]);function nc(n,e,t){if(tc.has(n)){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),t.warnings.push(`"tone" on <${n}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),t.warnings.push(`"textStyle" on <${n}> is deprecated; use variant instead (mapped automatically)`)}}}function Fr(n){return n.join(".")}function Br(n){if(O.isIdentifier(n))return[n.text];if(O.isPropertyAccessExpression(n)){let e=Br(n.expression);return e?[...e,n.name.text]:null}return null}function rc(n){return typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"}function So(n,e){if(e.length===0)return n;let t=e.join(".");return{kind:"binding",path:n.path?`${n.path}.${t}`:t,scope:n.scope}}function dn(n,e){let t=Br(n);if(!t)return null;if(t[0]in e.propBindings)return So(e.propBindings[t[0]],t.slice(1));if(t[0]===e.vmName)return{kind:"binding",path:Fr(t.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&t[0]===r?{kind:"binding",path:Fr(t.slice(1)),scope:r}:null}function ic(n,e){let t,r={};for(let i of n.properties){if(!O.isPropertyAssignment(i)||!O.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&O.isStringLiteral(i.initializer)){t=i.initializer.text;continue}if(o==="params"&&O.isObjectLiteralExpression(i.initializer))for(let a of i.initializer.properties){if(!O.isPropertyAssignment(a)||!O.isIdentifier(a.name))continue;let l=mn(a.initializer,e);l!==null&&(r[a.name.text]=l)}}return t?Object.keys(r).length>0?{kind:"action",name:t,params:r}:{kind:"action",name:t}:null}function mn(n,e){if(O.isStringLiteral(n)||O.isNoSubstitutionTemplateLiteral(n))return n.text;if(n.kind===O.SyntaxKind.TrueKeyword)return!0;if(n.kind===O.SyntaxKind.FalseKeyword)return!1;if(O.isNumericLiteral(n))return Number(n.text);if(n.kind===O.SyntaxKind.NullKeyword)return null;let t=dn(n,e);if(t)return t;if(O.isObjectLiteralExpression(n)){let r=ic(n,e);if(r)return r;let i={};for(let o of n.properties){if(!O.isPropertyAssignment(o)||!O.isIdentifier(o.name))continue;let a=mn(o.initializer,e);a!==null&&(i[o.name.text]=a)}return{kind:"literal",value:i}}if(O.isArrayLiteralExpression(n)){let r=[];for(let i of n.elements){if(!O.isExpression(i))continue;let o=mn(i,e);o!==null&&r.push(o)}return r}return null}function oc(n){return O.isIdentifier(n)?n.text:O.isPropertyAccessExpression(n)&&O.isIdentifier(n.name)?n.name.text:null}function Co(n){return n.getText()}function ko(n,e){let t=[];for(let r of n){if(O.isJsxText(r)){let i=r.getText().trim();i&&t.push({kind:"text",value:i});continue}if(O.isJsxExpression(r)&&r.expression){let i=dn(r.expression,e);if(i){t.push(i);continue}let o=Ao(r.expression,e);o&&(Array.isArray(o)?t.push(...o):t.push(o));continue}if(O.isJsxElement(r)||O.isJsxSelfClosingElement(r)){let i=It(r,e);i&&t.push(i)}}return t}function sc(n,e){if(n.length===0)return null;let t=n[0];return t in e.propBindings?So(e.propBindings[t],n.slice(1)):t===e.vmName?{kind:"binding",path:Fr(n.slice(1))}:null}function Ao(n,e){if(O.isParenthesizedExpression(n))return Ao(n.expression,e);if(O.isCallExpression(n)&&O.isPropertyAccessExpression(n.expression)){let r=Br(n.expression.expression),i=n.expression.name.text;if(r&&i==="map"&&n.arguments.length>=1){let o=sc(r,e);if(!o)return null;let a=n.arguments[0];if(!O.isArrowFunction(a)&&!O.isFunctionExpression(a))return e.errors.push("map callback must be an arrow function"),null;let l=a.parameters;if(l.length!==1||!O.isIdentifier(l[0].name))return e.errors.push("map callback must have a single item parameter"),null;let p=l[0].name.text,c={...e,scopes:[...e.scopes,p]},h=null,u=O.isParenthesizedExpression(a.body)?a.body.expression:a.body;if(O.isBlock(a.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(O.isJsxElement(u)||O.isJsxSelfClosingElement(u)?h=It(u,c):O.isJsxFragment(u)&&(h=$r(u,c)),!h)return null;let d;if(O.isJsxElement(u)||O.isJsxSelfClosingElement(u)){let v=O.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let C of v.properties)if(!(!O.isJsxAttribute(C)||Co(C.name)!=="key"||!C.initializer)&&O.isJsxExpression(C.initializer)&&C.initializer.expression){let L=dn(C.initializer.expression,c);L&&(d=L)}}return{kind:"map",source:o,item:p,key:d,body:h}}}if(O.isJsxElement(n)||O.isJsxSelfClosingElement(n))return It(n,e);let t=dn(n,e);return t||null}function $r(n,e){return{kind:"fragment",children:ko(n.children,e)}}function ac(n,e,t){let r=t.viewImports.get(n);if(!r)return null;let i=bo(r,n);if(!i)return t.errors.push(`View component "${n}" is imported but has no view() export`),null;let o=Zl(r,"utf-8"),a=O.createSourceFile(r,o,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),l=Vr(a,xo(r)),p=new Map([...t.viewImports,...l]),c={...t.propBindings};for(let[u,d]of Object.entries(e))rc(d)&&(c[u]=d);let h={...t,vmName:i.paramName,propBindings:c,scopes:[],viewImports:p};return O.isJsxElement(i.jsxRoot)||O.isJsxSelfClosingElement(i.jsxRoot)?It(i.jsxRoot,h):O.isJsxFragment(i.jsxRoot)?$r(i.jsxRoot,h):null}function It(n,e){let t=O.isJsxElement(n)?n.openingElement:n,r=oc(t.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let a of t.attributes.properties){if(!O.isJsxAttribute(a))continue;let l=Co(a.name);if(l!=="key"){if(!a.initializer){i[l]=!0;continue}if(O.isStringLiteral(a.initializer)){i[l]=a.initializer.text;continue}if(O.isJsxExpression(a.initializer)&&a.initializer.expression){let p=mn(a.initializer.expression,e);p!==null&&(i[l]=p)}}}if(!e.allowedComponents.has(r)){let a=ac(r,i,e);return a||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}nc(r,i,e);let o=O.isJsxElement(n)?ko(n.children,e):[];return{kind:"component",name:r,props:i,children:o}}function lc(n){let e=null;function t(r){if(O.isCallExpression(r)&&O.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(O.isArrowFunction(r.arguments[0])||O.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let l=r.typeArguments[0];O.isTypeReferenceNode(l)&&O.isIdentifier(l.typeName)&&(o=l.typeName.text)}let a=i.body;if(O.isParenthesizedExpression(a))(O.isJsxElement(a.expression)||O.isJsxSelfClosingElement(a.expression))&&(e={viewModel:o,jsxRoot:a.expression});else if(O.isJsxElement(a)||O.isJsxSelfClosingElement(a))e={viewModel:o,jsxRoot:a};else if(O.isBlock(a)&&a.statements.length===1){let l=a.statements[0];O.isReturnStatement(l)&&l.expression&&(O.isParenthesizedExpression(l.expression)?e={viewModel:o,jsxRoot:l.expression.expression}:e={viewModel:o,jsxRoot:l.expression})}}O.forEachChild(r,t)}return t(n),e}function Eo(n,e,t,r={}){let i=new Set(hn);for(let u of r.allowlistExtra??[])i.add(u);let o=ec(e),a=xo(o),l=O.createSourceFile(o,n,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),p={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Vr(l,a),allowedComponents:i},c=lc(l);if(!c)return{viewModel:"unknown",exportName:t,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let h=O.isJsxElement(c.jsxRoot)||O.isJsxSelfClosingElement(c.jsxRoot)?It(c.jsxRoot,p):O.isJsxFragment(c.jsxRoot)?$r(c.jsxRoot,p):null;return h?{viewModel:c.viewModel,exportName:t,root:h,errors:p.errors,warnings:p.warnings}:(p.errors.push("screen() callback must return a single JSX root element"),{viewModel:c.viewModel,exportName:t,root:{kind:"fragment",children:[]},errors:p.errors,warnings:p.warnings})}async function hc(n,e={}){let t=await cc(n.sourcePath,"utf-8"),r=n.exportName??uc(n.sourcePath,".view.tsx"),i=Eo(t,n.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${n.sourcePath}:
546
- ${i.errors.map(o=>` - ${o}`).join(`
547
- `)}`);for(let o of i.warnings)console.warn(`Warning in ${n.sourcePath}: ${o}`);return{version:1,source:pc(process.cwd(),fc(n.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root}}async function Oo(n,e={}){let t=[];for(let r of n)t.push(await hc(r,e));return t}import{access as Cc,readFile as Yo}from"node:fs/promises";import{dirname as gn,relative as kc,resolve as ee}from"node:path";var dc=Object.create,Po=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,gc=Object.getOwnPropertyNames,vc=Object.getPrototypeOf,_c=Object.prototype.hasOwnProperty,J=(n,e)=>()=>(e||(n((e={exports:{}}).exports,e),n=null),e.exports),yc=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=gc(e),o=0,a=i.length,l;o<a;o++)l=i[o],!_c.call(n,l)&&l!==t&&Po(n,l,{get:(p=>e[p]).bind(null,l),enumerable:!(r=mc(e,l))||r.enumerable});return n},wc=(n,e,t)=>(t=n!=null?dc(vc(n)):{},yc(e||!n||!n.__esModule?Po(t,"default",{value:n,enumerable:!0}):t,n)),Tt=J(((n,e)=>{function t(p){return typeof p>"u"||p===null}function r(p){return typeof p=="object"&&p!==null}function i(p){return Array.isArray(p)?p:t(p)?[]:[p]}function o(p,c){if(c){let h=Object.keys(c);for(let u=0,d=h.length;u<d;u+=1){let v=h[u];p[v]=c[v]}}return p}function a(p,c){let h="";for(let u=0;u<c;u+=1)h+=p;return h}function l(p){return p===0&&Number.NEGATIVE_INFINITY===1/p}e.exports.isNothing=t,e.exports.isObject=r,e.exports.toArray=i,e.exports.repeat=a,e.exports.isNegativeZero=l,e.exports.extend=o})),Rt=J(((n,e)=>{function t(i,o){let a="",l=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(a+='in "'+i.mark.name+'" '),a+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(a+=`
460
+ `)}else{let f={cli_contracts:u.cli_contracts,info:u.info,command_sets:{}},h=f.command_sets;for(let[m,g]of Object.entries(u.command_sets??{})){let _=g.commands;if(!_)continue;let x={};for(let[E,V]of Object.entries(_)){let G=m+"."+E;d.some(j=>j===E||j===G||E.startsWith(j+"."))&&(x[E]=V)}if(Object.keys(x).length>0){let E={...g};E.commands=x,h[m]=E}}u.components&&(f.components=u.components),process.stdout.write(JSON.stringify(f,null,2)+`
461
+ `)}process.exit(0)}),r}import{writeFile as PC,mkdir as OC}from"node:fs/promises";import{resolve as Dl,dirname as AC}from"node:path";import{spawn as RC}from"node:child_process";import{readFile as cy}from"node:fs/promises";import{basename as ly,relative as uy,resolve as fy}from"node:path";import{readFileSync as Qg}from"node:fs";import{dirname as ou,resolve as Zg}from"node:path";import I from"typescript";var vr=new Set(["App","Box","Button","Checkbox","Column","Divider","Drawer","Field","Form","Heading","Icon","IconButton","Image","Link","List","ListItem","Modal","Page","Popover","Progress","Radio","Row","SafeArea","ScrollArea","Select","Spacer","Spinner","Stack","Switch","Text","TextArea","TextInput","Tooltip"]);import{readFileSync as Kg}from"node:fs";import{resolve as Jg}from"node:path";import ce from"typescript";function Eo(t,e){let r=new Map;for(let n of t.statements){if(!ce.isImportDeclaration(n)||!n.importClause?.namedBindings||!ce.isStringLiteral(n.moduleSpecifier)||!ce.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let s=Jg(e,i);for(let o of n.importClause.namedBindings.elements)r.set(o.name.text,s)}return r}function Yg(t){if(!ce.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ce.isBindingElement(e)||!ce.isIdentifier(e.name)?null:e.name.text}function Xg(t){if(ce.isParenthesizedExpression(t))return t.expression;if(ce.isJsxElement(t)||ce.isJsxSelfClosingElement(t)||ce.isJsxFragment(t))return t;if(ce.isBlock(t)&&t.statements.length===1){let e=t.statements[0];if(ce.isReturnStatement(e)&&e.expression)return ce.isParenthesizedExpression(e.expression)?e.expression.expression:e.expression}return null}function iu(t){if(!ce.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ce.isArrowFunction(e)&&!ce.isFunctionExpression(e))return null;let r="__noop";if(e.parameters.length===1){let i=Yg(e.parameters[0]);if(i)r=i;else if(ce.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text;else return null}else if(e.parameters.length>1)return null;let n=Xg(e.body);return n?{paramName:r,jsxRoot:n}:null}function su(t,e){let r=Kg(t,"utf-8"),n=ce.createSourceFile(t,r,ce.ScriptTarget.Latest,!0,ce.ScriptKind.TSX),i=null;function s(o){if(ce.isVariableStatement(o))for(let a of o.declarationList.declarations){if(!ce.isIdentifier(a.name)||a.name.text!==e||!a.initializer||!ce.isCallExpression(a.initializer))continue;let l=iu(a.initializer);l&&(i=l)}if(ce.isExportAssignment(o)&&o.isExportEquals===!1&&o.expression&&ce.isCallExpression(o.expression)){let a=iu(o.expression);a&&e==="default"&&(i=a)}ce.forEachChild(o,s)}return s(n),i}var ey=new Set(["Text","Heading"]);function ty(t,e,r){if(ey.has(t)){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}}function $o(t){return t.join(".")}function _r(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Co(t){if(I.isIdentifier(t))return[t.text];if(I.isPropertyAccessExpression(t)){let e=Co(t.expression);return e?[...e,t.name.text]:null}return null}function ry(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function au(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Si(t,e){let r=Co(t);if(!r)return null;if(r[0]in e.propBindings)return au(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:$o(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:$o(r.slice(1)),scope:n}:null}function ny(t,e){let r,n={};for(let i of t.properties){if(!I.isPropertyAssignment(i)||!I.isIdentifier(i.name))continue;let s=i.name.text;if(s==="name"&&I.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(s==="params"&&I.isObjectLiteralExpression(i.initializer))for(let o of i.initializer.properties){if(!I.isPropertyAssignment(o)||!I.isIdentifier(o.name))continue;let a=Ei(o.initializer,e);a!==null?n[o.name.text]=a:e.errors.push(`Unsupported action param expression for "${o.name.text}": ${_r(o.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function Ei(t,e){if(I.isStringLiteral(t)||I.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===I.SyntaxKind.TrueKeyword)return!0;if(t.kind===I.SyntaxKind.FalseKeyword)return!1;if(I.isNumericLiteral(t))return Number(t.text);if(t.kind===I.SyntaxKind.NullKeyword)return null;let r=Si(t,e);if(r)return r;if(I.isObjectLiteralExpression(t)){let n=ny(t,e);if(n)return n;let i={};for(let s of t.properties){if(!I.isPropertyAssignment(s)||!I.isIdentifier(s.name))continue;let o=Ei(s.initializer,e);o!==null?i[s.name.text]=o:e.errors.push(`Unsupported object literal property "${s.name.text}": ${_r(s.initializer)}`)}return{kind:"literal",value:i}}if(I.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!I.isExpression(i))continue;let s=Ei(i,e);s!==null?n.push(s):e.errors.push(`Unsupported array element expression: ${_r(i)}`)}return n}return null}function iy(t){return I.isIdentifier(t)?t.text:I.isPropertyAccessExpression(t)&&I.isIdentifier(t.name)?t.name.text:null}function cu(t){return t.getText()}function lu(t,e){let r=[];for(let n of t){if(I.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(I.isJsxExpression(n)&&n.expression){let i=Si(n.expression,e);if(i){r.push(i);continue}let s=uu(n.expression,e);s?Array.isArray(s)?r.push(...s):r.push(s):e.errors.push(`Unsupported JSX child expression: ${_r(n.expression)}`);continue}if(I.isJsxElement(n)||I.isJsxSelfClosingElement(n)){let i=an(n,e);i&&r.push(i)}}return r}function sy(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?au(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:$o(t.slice(1))}:null}function uu(t,e){if(I.isParenthesizedExpression(t))return uu(t.expression,e);if(I.isCallExpression(t)&&I.isPropertyAccessExpression(t.expression)){let n=Co(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let s=sy(n,e);if(!s)return null;let o=t.arguments[0];if(!I.isArrowFunction(o)&&!I.isFunctionExpression(o))return e.errors.push("map callback must be an arrow function"),null;let a=o.parameters;if(a.length!==1||!I.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,u={...e,scopes:[...e.scopes,l]},d=null,f=I.isParenthesizedExpression(o.body)?o.body.expression:o.body;if(I.isBlock(o.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(I.isJsxElement(f)||I.isJsxSelfClosingElement(f)?d=an(f,u):I.isJsxFragment(f)&&(d=ko(f,u)),!d)return null;let h;if(I.isJsxElement(f)||I.isJsxSelfClosingElement(f)){let m=I.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let g of m.properties)if(!(!I.isJsxAttribute(g)||cu(g.name)!=="key"||!g.initializer)&&I.isJsxExpression(g.initializer)&&g.initializer.expression){let _=Si(g.initializer.expression,u);_&&(h=_)}}return{kind:"map",source:s,item:l,key:h,body:d}}}if(I.isJsxElement(t)||I.isJsxSelfClosingElement(t))return an(t,e);let r=Si(t,e);return r||null}function ko(t,e){return{kind:"fragment",children:lu(t.children,e)}}function oy(t,e,r){let n=r.viewImports.get(t);if(!n)return null;let i=su(n,t);if(!i)return r.errors.push(`View component "${t}" is imported but has no view() export`),null;let s=Qg(n,"utf-8"),o=I.createSourceFile(n,s,I.ScriptTarget.Latest,!0,I.ScriptKind.TSX),a=Eo(o,ou(n)),l=new Map([...r.viewImports,...a]),u={...r.propBindings};for(let[f,h]of Object.entries(e))ry(h)&&(u[f]=h);let d={...r,vmName:i.paramName,propBindings:u,scopes:[],viewImports:l};return I.isJsxElement(i.jsxRoot)||I.isJsxSelfClosingElement(i.jsxRoot)?an(i.jsxRoot,d):I.isJsxFragment(i.jsxRoot)?ko(i.jsxRoot,d):I.isConditionalExpression(i.jsxRoot)?(r.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):I.isExpression(i.jsxRoot)?(r.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${_r(i.jsxRoot)}`),null):(r.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${I.SyntaxKind[i.jsxRoot.kind]}`),null)}function an(t,e){let r=I.isJsxElement(t)?t.openingElement:t,n=iy(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let o of r.attributes.properties){if(!I.isJsxAttribute(o))continue;let a=cu(o.name);if(a!=="key"){if(!o.initializer){i[a]=!0;continue}if(I.isStringLiteral(o.initializer)){i[a]=o.initializer.text;continue}if(I.isJsxExpression(o.initializer)&&o.initializer.expression){let l=Ei(o.initializer.expression,e);l!==null?i[a]=l:e.errors.push(`Unsupported JSX prop expression for "${a}" on <${n}>: ${_r(o.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let o=oy(n,i,e);return o||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}ty(n,i,e);let s=I.isJsxElement(t)?lu(t.children,e):[];return{kind:"component",name:n,props:i,children:s}}function ay(t){let e=null;function r(n){if(I.isCallExpression(n)&&I.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(I.isArrowFunction(n.arguments[0])||I.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],s="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];I.isTypeReferenceNode(a)&&I.isIdentifier(a.typeName)&&(s=a.typeName.text)}let o=i.body;if(I.isParenthesizedExpression(o))(I.isJsxElement(o.expression)||I.isJsxSelfClosingElement(o.expression))&&(e={viewModel:s,jsxRoot:o.expression});else if(I.isJsxElement(o)||I.isJsxSelfClosingElement(o))e={viewModel:s,jsxRoot:o};else if(I.isBlock(o)&&o.statements.length===1){let a=o.statements[0];I.isReturnStatement(a)&&a.expression&&(I.isParenthesizedExpression(a.expression)?e={viewModel:s,jsxRoot:a.expression.expression}:e={viewModel:s,jsxRoot:a.expression})}}I.forEachChild(n,r)}return r(t),e}function fu(t,e,r,n={}){let i=new Set(vr);for(let f of n.allowlistExtra??[])i.add(f);let s=Zg(e),o=ou(s),a=I.createSourceFile(s,t,I.ScriptTarget.Latest,!0,I.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Eo(a,o),allowedComponents:i},u=ay(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=I.isJsxElement(u.jsxRoot)||I.isJsxSelfClosingElement(u.jsxRoot)?an(u.jsxRoot,l):I.isJsxFragment(u.jsxRoot)?ko(u.jsxRoot,l):null;return d?{viewModel:u.viewModel,exportName:r,root:d,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:u.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function du(t,e){let r=[],n=[],i=s=>{if(s.kind==="component"){!vr.has(s.name)&&!(s.name in e.extensions)&&r.push(`Extension component "${s.name}" is not registered in extensions.yaml`);for(let o of s.children)i(o);return}if(s.kind==="map"){i(s.body);return}if(s.kind==="fragment")for(let o of s.children)i(o)};return i(t),{errors:r,warnings:n}}async function dy(t,e={}){let r=await cy(t.sourcePath,"utf-8"),n=t.exportName??ly(t.sourcePath,".view.tsx"),i=fu(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
462
+ ${i.errors.map(s=>` - ${s}`).join(`
463
+ `)}`);if(e.extensionRegistry){let s=du(i.root,e.extensionRegistry);if(s.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
464
+ ${s.errors.map(o=>` - ${o}`).join(`
465
+ `)}`);i.warnings.push(...s.warnings)}for(let s of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${s}`);return{version:1,source:uy(process.cwd(),fy(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root}}async function pu(t,e={}){let r=[];for(let n of t)r.push(await dy(n,e));return r}import{access as Ey,readFile as Tu}from"node:fs/promises";import{dirname as $i,relative as $y,resolve as he}from"node:path";var py=Object.create,hu=Object.defineProperty,hy=Object.getOwnPropertyDescriptor,my=Object.getOwnPropertyNames,gy=Object.getPrototypeOf,yy=Object.prototype.hasOwnProperty,le=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),vy=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=my(e),s=0,o=i.length,a;s<o;s++)a=i[s],!yy.call(t,a)&&a!==r&&hu(t,a,{get:(l=>e[l]).bind(null,a),enumerable:!(n=hy(e,a))||n.enumerable});return t},_y=(t,e,r)=>(r=t!=null?py(gy(t)):{},vy(e||!t||!t.__esModule?hu(r,"default",{value:t,enumerable:!0}):r,t)),cn=le(((t,e)=>{function r(l){return typeof l>"u"||l===null}function n(l){return typeof l=="object"&&l!==null}function i(l){return Array.isArray(l)?l:r(l)?[]:[l]}function s(l,u){if(u){let d=Object.keys(u);for(let f=0,h=d.length;f<h;f+=1){let m=d[f];l[m]=u[m]}}return l}function o(l,u){let d="";for(let f=0;f<u;f+=1)d+=l;return d}function a(l){return l===0&&Number.NEGATIVE_INFINITY===1/l}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=o,e.exports.isNegativeZero=a,e.exports.extend=s})),ln=le(((t,e)=>{function r(i,s){let o="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(o+='in "'+i.mark.name+'" '),o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet&&(o+=`
548
466
 
549
- `+i.mark.snippet),l+" "+a):l}function r(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(o){return this.name+": "+t(this,o)},e.exports=r})),bc=J(((n,e)=>{var t=Tt();function r(a,l,p,c,h){let u="",d="",v=Math.floor(h/2)-1;return c-l>v&&(u=" ... ",l=c-v+u.length),p-c>v&&(d=" ...",p=c+v-d.length),{str:u+a.slice(l,p).replace(/\t/g,"\u2192")+d,pos:c-l+u.length}}function i(a,l){return t.repeat(" ",l-a.length)+a}function o(a,l){if(l=Object.create(l||null),!a.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);let p=/\r?\n|\r|\0/g,c=[0],h=[],u,d=-1;for(;u=p.exec(a.buffer);)h.push(u.index),c.push(u.index+u[0].length),a.position<=u.index&&d<0&&(d=c.length-2);d<0&&(d=c.length-1);let v="",C=Math.min(a.line+l.linesAfter,h.length).toString().length,L=l.maxLength-(l.indent+C+3);for(let V=1;V<=l.linesBefore&&!(d-V<0);V++){let G=r(a.buffer,c[d-V],h[d-V],a.position-(c[d]-c[d-V]),L);v=t.repeat(" ",l.indent)+i((a.line-V+1).toString(),C)+" | "+G.str+`
550
- `+v}let K=r(a.buffer,c[d],h[d],a.position,L);v+=t.repeat(" ",l.indent)+i((a.line+1).toString(),C)+" | "+K.str+`
551
- `,v+=t.repeat("-",l.indent+C+3+K.pos)+`^
552
- `;for(let V=1;V<=l.linesAfter&&!(d+V>=h.length);V++){let G=r(a.buffer,c[d+V],h[d+V],a.position-(c[d]-c[d+V]),L);v+=t.repeat(" ",l.indent)+i((a.line+V+1).toString(),C)+" | "+G.str+`
553
- `}return v.replace(/\n$/,"")}e.exports=o})),se=J(((n,e)=>{var t=Rt(),r=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(l){let p={};return l!==null&&Object.keys(l).forEach(function(c){l[c].forEach(function(h){p[String(h)]=c})}),p}function a(l,p){if(p=p||{},Object.keys(p).forEach(function(c){if(r.indexOf(c)===-1)throw new t('Unknown option "'+c+'" is met in definition of "'+l+'" YAML type.')}),this.options=p,this.tag=l,this.kind=p.kind||null,this.resolve=p.resolve||function(){return!0},this.construct=p.construct||function(c){return c},this.instanceOf=p.instanceOf||null,this.predicate=p.predicate||null,this.represent=p.represent||null,this.representName=p.representName||null,this.defaultStyle=p.defaultStyle||null,this.multi=p.multi||!1,this.styleAliases=o(p.styleAliases||null),i.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+l+'" YAML type.')}e.exports=a})),Io=J(((n,e)=>{var t=Rt(),r=se();function i(l,p){let c=[];return l[p].forEach(function(h){let u=c.length;c.forEach(function(d,v){d.tag===h.tag&&d.kind===h.kind&&d.multi===h.multi&&(u=v)}),c[u]=h}),c}function o(){let l={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function p(c){c.multi?(l.multi[c.kind].push(c),l.multi.fallback.push(c)):l[c.kind][c.tag]=l.fallback[c.tag]=c}for(let c=0,h=arguments.length;c<h;c+=1)arguments[c].forEach(p);return l}function a(l){return this.extend(l)}a.prototype.extend=function(p){let c=[],h=[];if(p instanceof r)h.push(p);else if(Array.isArray(p))h=h.concat(p);else if(p&&(Array.isArray(p.implicit)||Array.isArray(p.explicit)))p.implicit&&(c=c.concat(p.implicit)),p.explicit&&(h=h.concat(p.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.forEach(function(d){if(!(d instanceof r))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(d){if(!(d instanceof r))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(a.prototype);return u.implicit=(this.implicit||[]).concat(c),u.explicit=(this.explicit||[]).concat(h),u.compiledImplicit=i(u,"implicit"),u.compiledExplicit=i(u,"explicit"),u.compiledTypeMap=o(u.compiledImplicit,u.compiledExplicit),u},e.exports=a})),To=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})})),Ro=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})})),Lo=J(((n,e)=>{e.exports=new(se())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})})),No=J(((n,e)=>{e.exports=new(Io())({explicit:[To(),Ro(),Lo()]})})),Mo=J(((n,e)=>{var t=se();function r(a){if(a===null)return!0;let l=a.length;return l===1&&a==="~"||l===4&&(a==="null"||a==="Null"||a==="NULL")}function i(){return null}function o(a){return a===null}e.exports=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Do=J(((n,e)=>{var t=se();function r(a){if(a===null)return!1;let l=a.length;return l===4&&(a==="true"||a==="True"||a==="TRUE")||l===5&&(a==="false"||a==="False"||a==="FALSE")}function i(a){return a==="true"||a==="True"||a==="TRUE"}function o(a){return Object.prototype.toString.call(a)==="[object Boolean]"}e.exports=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(a){return a?"true":"false"},uppercase:function(a){return a?"TRUE":"FALSE"},camelcase:function(a){return a?"True":"False"}},defaultStyle:"lowercase"})})),Vo=J(((n,e)=>{var t=Tt(),r=se();function i(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function o(u){return u>=48&&u<=55}function a(u){return u>=48&&u<=57}function l(u){if(u===null)return!1;let d=u.length,v=0,C=!1;if(!d)return!1;let L=u[v];if((L==="-"||L==="+")&&(L=u[++v]),L==="0"){if(v+1===d)return!0;if(L=u[++v],L==="b"){for(v++;v<d;v++){if(L=u[v],L!=="0"&&L!=="1")return!1;C=!0}return C&&Number.isFinite(p(u))}if(L==="x"){for(v++;v<d;v++){if(!i(u.charCodeAt(v)))return!1;C=!0}return C&&Number.isFinite(p(u))}if(L==="o"){for(v++;v<d;v++){if(!o(u.charCodeAt(v)))return!1;C=!0}return C&&Number.isFinite(p(u))}}for(;v<d;v++){if(!a(u.charCodeAt(v)))return!1;C=!0}return C?Number.isFinite(p(u)):!1}function p(u){let d=u,v=1,C=d[0];if((C==="-"||C==="+")&&(C==="-"&&(v=-1),d=d.slice(1),C=d[0]),d==="0")return 0;if(C==="0"){if(d[1]==="b")return v*parseInt(d.slice(2),2);if(d[1]==="x")return v*parseInt(d.slice(2),16);if(d[1]==="o")return v*parseInt(d.slice(2),8)}return v*parseInt(d,10)}function c(u){return p(u)}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!t.isNegativeZero(u)}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:l,construct:c,predicate:h,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Fo=J(((n,e)=>{var t=Tt(),r=se(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(u){return u===null||!i.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:o.test(u)}function l(u){let d=u.toLowerCase(),v=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?v===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:v*parseFloat(d,10)}var p=/^[-+]?[0-9]+e/;function c(u,d){if(isNaN(u))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(u))return"-0.0";let v=u.toString(10);return p.test(v)?v.replace("e",".e"):v}function h(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||t.isNegativeZero(u))}e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:l,predicate:h,represent:c,defaultStyle:"lowercase"})})),Bo=J(((n,e)=>{e.exports=No().extend({implicit:[Mo(),Do(),Vo(),Fo()]})})),$o=J(((n,e)=>{e.exports=Bo()})),Ho=J(((n,e)=>{var t=se(),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 o(p){return p===null?!1:r.exec(p)!==null||i.exec(p)!==null}function a(p){let c=0,h=null,u=r.exec(p);if(u===null&&(u=i.exec(p)),u===null)throw new Error("Date resolve error");let d=+u[1],v=+u[2]-1,C=+u[3];if(!u[4])return new Date(Date.UTC(d,v,C));let L=+u[4],K=+u[5],V=+u[6];if(u[7]){for(c=u[7].slice(0,3);c.length<3;)c+="0";c=+c}if(u[9]){let ue=+u[10],$=+(u[11]||0);h=(ue*60+$)*6e4,u[9]==="-"&&(h=-h)}let G=new Date(Date.UTC(d,v,C,L,K,V,c));return h&&G.setTime(G.getTime()-h),G}function l(p){return p.toISOString()}e.exports=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:a,instanceOf:Date,represent:l})})),jo=J(((n,e)=>{var t=se();function r(i){return i==="<<"||i===null}e.exports=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})})),qo=J(((n,e)=>{var t=se(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
554
- \r`;function i(p){if(p===null)return!1;let c=0,h=p.length,u=r;for(let d=0;d<h;d++){let v=u.indexOf(p.charAt(d));if(!(v>64)){if(v<0)return!1;c+=6}}return c%8===0}function o(p){let c=p.replace(/[\r\n=]/g,""),h=c.length,u=r,d=0,v=[];for(let L=0;L<h;L++)L%4===0&&L&&(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)),d=d<<6|u.indexOf(c.charAt(L));let C=h%4*6;return C===0?(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)):C===18?(v.push(d>>10&255),v.push(d>>2&255)):C===12&&v.push(d>>4&255),new Uint8Array(v)}function a(p){let c="",h=0,u=p.length,d=r;for(let C=0;C<u;C++)C%3===0&&C&&(c+=d[h>>18&63],c+=d[h>>12&63],c+=d[h>>6&63],c+=d[h&63]),h=(h<<8)+p[C];let v=u%3;return v===0?(c+=d[h>>18&63],c+=d[h>>12&63],c+=d[h>>6&63],c+=d[h&63]):v===2?(c+=d[h>>10&63],c+=d[h>>4&63],c+=d[h<<2&63],c+=d[64]):v===1&&(c+=d[h>>2&63],c+=d[h<<4&63],c+=d[64],c+=d[64]),c}function l(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}e.exports=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:l,represent:a})})),Go=J(((n,e)=>{var t=se(),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(l){if(l===null)return!0;let p=[],c=l;for(let h=0,u=c.length;h<u;h+=1){let d=c[h],v=!1;if(i.call(d)!=="[object Object]")return!1;let C;for(C in d)if(r.call(d,C))if(!v)v=!0;else return!1;if(!v)return!1;if(p.indexOf(C)===-1)p.push(C);else return!1}return!0}function a(l){return l!==null?l:[]}e.exports=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:a})})),Wo=J(((n,e)=>{var t=se(),r=Object.prototype.toString;function i(a){if(a===null)return!0;let l=a,p=new Array(l.length);for(let c=0,h=l.length;c<h;c+=1){let u=l[c];if(r.call(u)!=="[object Object]")return!1;let d=Object.keys(u);if(d.length!==1)return!1;p[c]=[d[0],u[d[0]]]}return!0}function o(a){if(a===null)return[];let l=a,p=new Array(l.length);for(let c=0,h=l.length;c<h;c+=1){let u=l[c],d=Object.keys(u);p[c]=[d[0],u[d[0]]]}return p}e.exports=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Uo=J(((n,e)=>{var t=se(),r=Object.prototype.hasOwnProperty;function i(a){if(a===null)return!0;let l=a;for(let p in l)if(r.call(l,p)&&l[p]!==null)return!1;return!0}function o(a){return a!==null?a:{}}e.exports=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Hr=J(((n,e)=>{e.exports=$o().extend({implicit:[Ho(),jo()],explicit:[qo(),Go(),Wo(),Uo()]})})),xc=J(((n,e)=>{var t=Tt(),r=Rt(),i=bc(),o=Hr(),a=Object.prototype.hasOwnProperty,l=1,p=2,c=3,h=4,u=1,d=2,v=3,C=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,L=/[\x85\u2028\u2029]/,K=/[,\[\]{}]/,V=/^(?:!|!!|![0-9A-Za-z-]+!)$/,G=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function ue(s){return Object.prototype.toString.call(s)}function $(s){return s===10||s===13}function X(s){return s===9||s===32}function z(s){return s===9||s===32||s===10||s===13}function ne(s){return s===44||s===91||s===93||s===123||s===125}function Qt(s){if(s>=48&&s<=57)return s-48;let m=s|32;return m>=97&&m<=102?m-97+10:-1}function Ke(s){return s===120?2:s===117?4:s===85?8:0}function Se(s){return s>=48&&s<=57?s-48:-1}function Oe(s){switch(s){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
555
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function fe(s){return s<=65535?String.fromCharCode(s):String.fromCharCode((s-65536>>10)+55296,(s-65536&1023)+56320)}function qe(s,m,y){m==="__proto__"?Object.defineProperty(s,m,{configurable:!0,enumerable:!0,writable:!0,value:y}):s[m]=y}var Re=new Array(256),Le=new Array(256);for(let s=0;s<256;s++)Re[s]=Oe(s)?1:0,Le[s]=Oe(s);function j(s,m){this.input=s,this.filename=m.filename||null,this.schema=m.schema||o,this.onWarning=m.onWarning||null,this.legacy=m.legacy||!1,this.json=m.json||!1,this.listener=m.listener||null,this.maxDepth=typeof m.maxDepth=="number"?m.maxDepth:100,this.maxMergeSeqLength=typeof m.maxMergeSeqLength=="number"?m.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Xt(s,m){let y={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return y.snippet=i(y),new r(m,y)}function R(s,m){throw Xt(s,m)}function st(s,m){s.onWarning&&s.onWarning.call(null,Xt(s,m))}function Ne(s,m,y){let x=s.anchorMapTransactions;if(x.length!==0){let _=x[x.length-1];a.call(_,m)||(_[m]={existed:a.call(s.anchorMap,m),value:s.anchorMap[m]})}s.anchorMap[m]=y}function dr(s){s.anchorMapTransactions.push(Object.create(null))}function ze(s){let m=s.anchorMapTransactions.pop(),y=s.anchorMapTransactions;if(y.length===0)return;let x=y[y.length-1],_=Object.keys(m);for(let E=0,f=_.length;E<f;E+=1){let g=_[E];a.call(x,g)||(x[g]=m[g])}}function mr(s){let m=s.anchorMapTransactions.pop(),y=Object.keys(m);for(let x=y.length-1;x>=0;x-=1){let _=m[y[x]];_.existed?s.anchorMap[y[x]]=_.value:delete s.anchorMap[y[x]]}}function kt(s){return{position:s.position,line:s.line,lineStart:s.lineStart,lineIndent:s.lineIndent,firstTabInLine:s.firstTabInLine,tag:s.tag,anchor:s.anchor,kind:s.kind,result:s.result}}function at(s,m){s.position=m.position,s.line=m.line,s.lineStart=m.lineStart,s.lineIndent=m.lineIndent,s.firstTabInLine=m.firstTabInLine,s.tag=m.tag,s.anchor=m.anchor,s.kind=m.kind,s.result=m.result}var Zt={YAML:function(m,y,x){m.version!==null&&R(m,"duplication of %YAML directive"),x.length!==1&&R(m,"YAML directive accepts exactly one argument");let _=/^([0-9]+)\.([0-9]+)$/.exec(x[0]);_===null&&R(m,"ill-formed argument of the YAML directive");let E=parseInt(_[1],10),f=parseInt(_[2],10);E!==1&&R(m,"unacceptable YAML version of the document"),m.version=x[0],m.checkLineBreaks=f<2,f!==1&&f!==2&&st(m,"unsupported YAML version of the document")},TAG:function(m,y,x){let _;x.length!==2&&R(m,"TAG directive accepts exactly two arguments");let E=x[0];_=x[1],V.test(E)||R(m,"ill-formed tag handle (first argument) of the TAG directive"),a.call(m.tagMap,E)&&R(m,'there is a previously declared suffix for "'+E+'" tag handle'),G.test(_)||R(m,"ill-formed tag prefix (second argument) of the TAG directive");try{_=decodeURIComponent(_)}catch{R(m,"tag prefix is malformed: "+_)}m.tagMap[E]=_}};function he(s,m,y,x){if(m<y){let _=s.input.slice(m,y);if(x)for(let E=0,f=_.length;E<f;E+=1){let g=_.charCodeAt(E);g===9||g>=32&&g<=1114111||R(s,"expected valid JSON character")}else C.test(_)&&R(s,"the stream contains non-printable characters");s.result+=_}}function Ge(s,m,y,x){t.isObject(y)||R(s,"cannot merge mappings; the provided source object is unacceptable");let _=Object.keys(y);for(let E=0,f=_.length;E<f;E+=1){let g=_[E];a.call(m,g)||(qe(m,g,y[g]),x[g]=!0)}}function Me(s,m,y,x,_,E,f,g,A){if(Array.isArray(_)){_=Array.prototype.slice.call(_);for(let w=0,b=_.length;w<b;w+=1)Array.isArray(_[w])&&R(s,"nested arrays are not supported inside keys"),typeof _=="object"&&ue(_[w])==="[object Object]"&&(_[w]="[object Object]")}if(typeof _=="object"&&ue(_)==="[object Object]"&&(_="[object Object]"),_=String(_),m===null&&(m={}),x==="tag:yaml.org,2002:merge")if(Array.isArray(E)){E.length>s.maxMergeSeqLength&&R(s,"merge sequence length exceeded maxMergeSeqLength ("+s.maxMergeSeqLength+")");let w=new Set;for(let b=0,k=E.length;b<k;b+=1){let S=E[b];w.has(S)||(w.add(S),Ge(s,m,S,y))}}else Ge(s,m,E,y);else!s.json&&!a.call(y,_)&&a.call(m,_)&&(s.line=f||s.line,s.lineStart=g||s.lineStart,s.position=A||s.position,R(s,"duplicated mapping key")),qe(m,_,E),delete y[_];return m}function lt(s){let m=s.input.charCodeAt(s.position);m===10?s.position++:m===13?(s.position++,s.input.charCodeAt(s.position)===10&&s.position++):R(s,"a line break is expected"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function Z(s,m,y){let x=0,_=s.input.charCodeAt(s.position);for(;_!==0;){for(;X(_);)_===9&&s.firstTabInLine===-1&&(s.firstTabInLine=s.position),_=s.input.charCodeAt(++s.position);if(m&&_===35)do _=s.input.charCodeAt(++s.position);while(_!==10&&_!==13&&_!==0);if($(_))for(lt(s),_=s.input.charCodeAt(s.position),x++,s.lineIndent=0;_===32;)s.lineIndent++,_=s.input.charCodeAt(++s.position);else break}return y!==-1&&x!==0&&s.lineIndent<y&&st(s,"deficient indentation"),x}function ct(s){let m=s.position,y=s.input.charCodeAt(m);return!!((y===45||y===46)&&y===s.input.charCodeAt(m+1)&&y===s.input.charCodeAt(m+2)&&(m+=3,y=s.input.charCodeAt(m),y===0||z(y)))}function De(s,m){m===1?s.result+=" ":m>1&&(s.result+=t.repeat(`
556
- `,m-1))}function en(s,m,y){let x,_,E,f,g,A,w=s.kind,b=s.result,k=s.input.charCodeAt(s.position);if(z(k)||ne(k)||k===35||k===38||k===42||k===33||k===124||k===62||k===39||k===34||k===37||k===64||k===96)return!1;if(k===63||k===45){let S=s.input.charCodeAt(s.position+1);if(z(S)||y&&ne(S))return!1}for(s.kind="scalar",s.result="",x=_=s.position,E=!1;k!==0;){if(k===58){let S=s.input.charCodeAt(s.position+1);if(z(S)||y&&ne(S))break}else if(k===35){if(z(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&ct(s)||y&&ne(k))break;if($(k))if(f=s.line,g=s.lineStart,A=s.lineIndent,Z(s,!1,-1),s.lineIndent>=m){E=!0,k=s.input.charCodeAt(s.position);continue}else{s.position=_,s.line=f,s.lineStart=g,s.lineIndent=A;break}}E&&(he(s,x,_,!1),De(s,s.line-f),x=_=s.position,E=!1),X(k)||(_=s.position+1),k=s.input.charCodeAt(++s.position)}return he(s,x,_,!1),s.result?!0:(s.kind=w,s.result=b,!1)}function tn(s,m){let y,x,_=s.input.charCodeAt(s.position);if(_!==39)return!1;for(s.kind="scalar",s.result="",s.position++,y=x=s.position;(_=s.input.charCodeAt(s.position))!==0;)if(_===39)if(he(s,y,s.position,!0),_=s.input.charCodeAt(++s.position),_===39)y=s.position,s.position++,x=s.position;else return!0;else $(_)?(he(s,y,x,!0),De(s,Z(s,!1,m)),y=x=s.position):s.position===s.lineStart&&ct(s)?R(s,"unexpected end of the document within a single quoted scalar"):(s.position++,X(_)||(x=s.position));R(s,"unexpected end of the stream within a single quoted scalar")}function At(s,m){let y,x,_,E=s.input.charCodeAt(s.position);if(E!==34)return!1;for(s.kind="scalar",s.result="",s.position++,y=x=s.position;(E=s.input.charCodeAt(s.position))!==0;){if(E===34)return he(s,y,s.position,!0),s.position++,!0;if(E===92){if(he(s,y,s.position,!0),E=s.input.charCodeAt(++s.position),$(E))Z(s,!1,m);else if(E<256&&Re[E])s.result+=Le[E],s.position++;else if((_=Ke(E))>0){let f=_,g=0;for(;f>0;f--)E=s.input.charCodeAt(++s.position),(_=Qt(E))>=0?g=(g<<4)+_:R(s,"expected hexadecimal character");s.result+=fe(g),s.position++}else R(s,"unknown escape sequence");y=x=s.position}else $(E)?(he(s,y,x,!0),De(s,Z(s,!1,m)),y=x=s.position):s.position===s.lineStart&&ct(s)?R(s,"unexpected end of the document within a double quoted scalar"):(s.position++,X(E)||(x=s.position))}R(s,"unexpected end of the stream within a double quoted scalar")}function nn(s,m){let y=!0,x,_,E,f=s.tag,g,A=s.anchor,w,b,k,S,I=Object.create(null),P,N,M,B=s.input.charCodeAt(s.position);if(B===91)w=93,S=!1,g=[];else if(B===123)w=125,S=!0,g={};else return!1;for(s.anchor!==null&&Ne(s,s.anchor,g),B=s.input.charCodeAt(++s.position);B!==0;){if(Z(s,!0,m),B=s.input.charCodeAt(s.position),B===w)return s.position++,s.tag=f,s.anchor=A,s.kind=S?"mapping":"sequence",s.result=g,!0;y?B===44&&R(s,"expected the node content, but found ','"):R(s,"missed comma between flow collection entries"),N=P=M=null,b=k=!1,B===63&&z(s.input.charCodeAt(s.position+1))&&(b=k=!0,s.position++,Z(s,!0,m)),x=s.line,_=s.lineStart,E=s.position,Fe(s,m,l,!1,!0),N=s.tag,P=s.result,Z(s,!0,m),B=s.input.charCodeAt(s.position),(k||s.line===x)&&B===58&&(b=!0,B=s.input.charCodeAt(++s.position),Z(s,!0,m),Fe(s,m,l,!1,!0),M=s.result),S?Me(s,g,I,N,P,M,x,_,E):b?g.push(Me(s,null,I,N,P,M,x,_,E)):g.push(P),Z(s,!0,m),B=s.input.charCodeAt(s.position),B===44?(y=!0,B=s.input.charCodeAt(++s.position)):y=!1}R(s,"unexpected end of the stream within a flow collection")}function rn(s,m){let y,x=u,_=!1,E=!1,f=m,g=0,A=!1,w,b=s.input.charCodeAt(s.position);if(b===124)y=!1;else if(b===62)y=!0;else return!1;for(s.kind="scalar",s.result="";b!==0;)if(b=s.input.charCodeAt(++s.position),b===43||b===45)u===x?x=b===43?v:d:R(s,"repeat of a chomping mode identifier");else if((w=Se(b))>=0)w===0?R(s,"bad explicit indentation width of a block scalar; it cannot be less than one"):E?R(s,"repeat of an indentation width identifier"):(f=m+w-1,E=!0);else break;if(X(b)){do b=s.input.charCodeAt(++s.position);while(X(b));if(b===35)do b=s.input.charCodeAt(++s.position);while(!$(b)&&b!==0)}for(;b!==0;){for(lt(s),s.lineIndent=0,b=s.input.charCodeAt(s.position);(!E||s.lineIndent<f)&&b===32;)s.lineIndent++,b=s.input.charCodeAt(++s.position);if(!E&&s.lineIndent>f&&(f=s.lineIndent),$(b)){g++;continue}if(!E&&f===0&&R(s,"missing indentation for block scalar"),s.lineIndent<f){x===v?s.result+=t.repeat(`
557
- `,_?1+g:g):x===u&&_&&(s.result+=`
558
- `);break}y?X(b)?(A=!0,s.result+=t.repeat(`
559
- `,_?1+g:g)):A?(A=!1,s.result+=t.repeat(`
560
- `,g+1)):g===0?_&&(s.result+=" "):s.result+=t.repeat(`
561
- `,g):s.result+=t.repeat(`
562
- `,_?1+g:g),_=!0,E=!0,g=0;let k=s.position;for(;!$(b)&&b!==0;)b=s.input.charCodeAt(++s.position);he(s,k,s.position,!1)}return!0}function Ve(s,m){let y=s.tag,x=s.anchor,_=[],E=!1;if(s.firstTabInLine!==-1)return!1;s.anchor!==null&&Ne(s,s.anchor,_);let f=s.input.charCodeAt(s.position);for(;f!==0&&(s.firstTabInLine!==-1&&(s.position=s.firstTabInLine,R(s,"tab characters must not be used in indentation")),!(f!==45||!z(s.input.charCodeAt(s.position+1))));){if(E=!0,s.position++,Z(s,!0,-1)&&s.lineIndent<=m){_.push(null),f=s.input.charCodeAt(s.position);continue}let g=s.line;if(Fe(s,m,c,!1,!0),_.push(s.result),Z(s,!0,-1),f=s.input.charCodeAt(s.position),(s.line===g||s.lineIndent>m)&&f!==0)R(s,"bad indentation of a sequence entry");else if(s.lineIndent<m)break}return E?(s.tag=y,s.anchor=x,s.kind="sequence",s.result=_,!0):!1}function on(s,m,y){let x,_,E,f,g=s.tag,A=s.anchor,w={},b=Object.create(null),k=null,S=null,I=null,P=!1,N=!1;if(s.firstTabInLine!==-1)return!1;s.anchor!==null&&Ne(s,s.anchor,w);let M=s.input.charCodeAt(s.position);for(;M!==0;){!P&&s.firstTabInLine!==-1&&(s.position=s.firstTabInLine,R(s,"tab characters must not be used in indentation"));let B=s.input.charCodeAt(s.position+1),Q=s.line;if((M===63||M===58)&&z(B))M===63?(P&&(Me(s,w,b,k,S,null,_,E,f),k=S=I=null),N=!0,P=!0,x=!0):P?(P=!1,x=!0):R(s,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),s.position+=1,M=B;else{if(_=s.line,E=s.lineStart,f=s.position,!Fe(s,y,p,!1,!0))break;if(s.line===Q){for(M=s.input.charCodeAt(s.position);X(M);)M=s.input.charCodeAt(++s.position);if(M===58)M=s.input.charCodeAt(++s.position),z(M)||R(s,"a whitespace character is expected after the key-value separator within a block mapping"),P&&(Me(s,w,b,k,S,null,_,E,f),k=S=I=null),N=!0,P=!1,x=!1,k=s.tag,S=s.result;else if(N)R(s,"can not read an implicit mapping pair; a colon is missed");else return s.tag=g,s.anchor=A,!0}else if(N)R(s,"can not read a block mapping entry; a multiline key may not be an implicit key");else return s.tag=g,s.anchor=A,!0}if((s.line===Q||s.lineIndent>m)&&(P&&(_=s.line,E=s.lineStart,f=s.position),Fe(s,m,h,!0,x)&&(P?S=s.result:I=s.result),P||(Me(s,w,b,k,S,I,_,E,f),k=S=I=null),Z(s,!0,-1),M=s.input.charCodeAt(s.position)),(s.line===Q||s.lineIndent>m)&&M!==0)R(s,"bad indentation of a mapping entry");else if(s.lineIndent<m)break}return P&&Me(s,w,b,k,S,null,_,E,f),N&&(s.tag=g,s.anchor=A,s.kind="mapping",s.result=w),N}function gr(s){let m=!1,y=!1,x,_,E=s.input.charCodeAt(s.position);if(E!==33)return!1;s.tag!==null&&R(s,"duplication of a tag property"),E=s.input.charCodeAt(++s.position),E===60?(m=!0,E=s.input.charCodeAt(++s.position)):E===33?(y=!0,x="!!",E=s.input.charCodeAt(++s.position)):x="!";let f=s.position;if(m){do E=s.input.charCodeAt(++s.position);while(E!==0&&E!==62);s.position<s.length?(_=s.input.slice(f,s.position),E=s.input.charCodeAt(++s.position)):R(s,"unexpected end of the stream within a verbatim tag")}else{for(;E!==0&&!z(E);)E===33&&(y?R(s,"tag suffix cannot contain exclamation marks"):(x=s.input.slice(f-1,s.position+1),V.test(x)||R(s,"named tag handle cannot contain such characters"),y=!0,f=s.position+1)),E=s.input.charCodeAt(++s.position);_=s.input.slice(f,s.position),K.test(_)&&R(s,"tag suffix cannot contain flow indicator characters")}_&&!G.test(_)&&R(s,"tag name cannot contain such characters: "+_);try{_=decodeURIComponent(_)}catch{R(s,"tag name is malformed: "+_)}return m?s.tag=_:a.call(s.tagMap,x)?s.tag=s.tagMap[x]+_:x==="!"?s.tag="!"+_:x==="!!"?s.tag="tag:yaml.org,2002:"+_:R(s,'undeclared tag handle "'+x+'"'),!0}function sn(s){let m=s.input.charCodeAt(s.position);if(m!==38)return!1;s.anchor!==null&&R(s,"duplication of an anchor property"),m=s.input.charCodeAt(++s.position);let y=s.position;for(;m!==0&&!z(m)&&!ne(m);)m=s.input.charCodeAt(++s.position);return s.position===y&&R(s,"name of an anchor node must contain at least one character"),s.anchor=s.input.slice(y,s.position),!0}function an(s){let m=s.input.charCodeAt(s.position);if(m!==42)return!1;m=s.input.charCodeAt(++s.position);let y=s.position;for(;m!==0&&!z(m)&&!ne(m);)m=s.input.charCodeAt(++s.position);s.position===y&&R(s,"name of an alias node must contain at least one character");let x=s.input.slice(y,s.position);return a.call(s.anchorMap,x)||R(s,'unidentified alias "'+x+'"'),s.result=s.anchorMap[x],Z(s,!0,-1),!0}function vr(s,m,y,x){let _=kt(s);return dr(s),at(s,m),s.tag=null,s.anchor=null,s.kind=null,s.result=null,on(s,y,x)&&s.kind==="mapping"?(ze(s),!0):(mr(s),at(s,_),!1)}function Fe(s,m,y,x,_){let E,f,g=1,A=!1,w=!1,b=null,k,S,I;s.depth>=s.maxDepth&&R(s,"nesting exceeded maxDepth ("+s.maxDepth+")"),s.depth+=1,s.listener!==null&&s.listener("open",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null;let P=E=f=h===y||c===y;if(x&&Z(s,!0,-1)&&(A=!0,s.lineIndent>m?g=1:s.lineIndent===m?g=0:s.lineIndent<m&&(g=-1)),g===1)for(;;){let N=s.input.charCodeAt(s.position),M=kt(s);if(A&&(N===33&&s.tag!==null||N===38&&s.anchor!==null)||!gr(s)&&!sn(s))break;b===null&&(b=M),Z(s,!0,-1)?(A=!0,f=P,s.lineIndent>m?g=1:s.lineIndent===m?g=0:s.lineIndent<m&&(g=-1)):f=!1}if(f&&(f=A||_),g===1||h===y)if(l===y||p===y?S=m:S=m+1,I=s.position-s.lineStart,g===1)if(f&&(Ve(s,I)||on(s,I,S))||nn(s,S))w=!0;else{let N=s.input.charCodeAt(s.position);b!==null&&P&&!f&&N!==124&&N!==62&&vr(s,b,b.position-b.lineStart,S)||E&&rn(s,S)||tn(s,S)||At(s,S)?w=!0:an(s)?(w=!0,(s.tag!==null||s.anchor!==null)&&R(s,"alias node should not have any properties")):en(s,S,l===y)&&(w=!0,s.tag===null&&(s.tag="?")),s.anchor!==null&&Ne(s,s.anchor,s.result)}else g===0&&(w=f&&Ve(s,I));if(s.tag===null)s.anchor!==null&&Ne(s,s.anchor,s.result);else if(s.tag==="?"){s.result!==null&&s.kind!=="scalar"&&R(s,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+s.kind+'"');for(let N=0,M=s.implicitTypes.length;N<M;N+=1)if(k=s.implicitTypes[N],k.resolve(s.result)){s.result=k.construct(s.result),s.tag=k.tag,s.anchor!==null&&Ne(s,s.anchor,s.result);break}}else if(s.tag!=="!"){if(a.call(s.typeMap[s.kind||"fallback"],s.tag))k=s.typeMap[s.kind||"fallback"][s.tag];else{k=null;let N=s.typeMap.multi[s.kind||"fallback"];for(let M=0,B=N.length;M<B;M+=1)if(s.tag.slice(0,N[M].tag.length)===N[M].tag){k=N[M];break}}k||R(s,"unknown tag !<"+s.tag+">"),s.result!==null&&k.kind!==s.kind&&R(s,"unacceptable node kind for !<"+s.tag+'> tag; it should be "'+k.kind+'", not "'+s.kind+'"'),k.resolve(s.result,s.tag)?(s.result=k.construct(s.result,s.tag),s.anchor!==null&&Ne(s,s.anchor,s.result)):R(s,"cannot resolve a node with !<"+s.tag+"> explicit tag")}return s.listener!==null&&s.listener("close",s),s.depth-=1,s.tag!==null||s.anchor!==null||w}function _r(s){let m=s.position,y=!1,x;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);(x=s.input.charCodeAt(s.position))!==0&&(Z(s,!0,-1),x=s.input.charCodeAt(s.position),!(s.lineIndent>0||x!==37));){y=!0,x=s.input.charCodeAt(++s.position);let _=s.position;for(;x!==0&&!z(x);)x=s.input.charCodeAt(++s.position);let E=s.input.slice(_,s.position),f=[];for(E.length<1&&R(s,"directive name must not be less than one character in length");x!==0;){for(;X(x);)x=s.input.charCodeAt(++s.position);if(x===35){do x=s.input.charCodeAt(++s.position);while(x!==0&&!$(x));break}if($(x))break;for(_=s.position;x!==0&&!z(x);)x=s.input.charCodeAt(++s.position);f.push(s.input.slice(_,s.position))}x!==0&&lt(s),a.call(Zt,E)?Zt[E](s,E,f):st(s,'unknown document directive "'+E+'"')}if(Z(s,!0,-1),s.lineIndent===0&&s.input.charCodeAt(s.position)===45&&s.input.charCodeAt(s.position+1)===45&&s.input.charCodeAt(s.position+2)===45?(s.position+=3,Z(s,!0,-1)):y&&R(s,"directives end mark is expected"),Fe(s,s.lineIndent-1,h,!1,!0),Z(s,!0,-1),s.checkLineBreaks&&L.test(s.input.slice(m,s.position))&&st(s,"non-ASCII line breaks are interpreted as content"),s.documents.push(s.result),s.position===s.lineStart&&ct(s)){s.input.charCodeAt(s.position)===46&&(s.position+=3,Z(s,!0,-1));return}s.position<s.length-1&&R(s,"end of the stream or a document separator is expected")}function ln(s,m){s=String(s),m=m||{},s.length!==0&&(s.charCodeAt(s.length-1)!==10&&s.charCodeAt(s.length-1)!==13&&(s+=`
563
- `),s.charCodeAt(0)===65279&&(s=s.slice(1)));let y=new j(s,m),x=s.indexOf("\0");for(x!==-1&&(y.position=x,R(y,"null byte is not allowed in input")),y.input+="\0";y.input.charCodeAt(y.position)===32;)y.lineIndent+=1,y.position+=1;for(;y.position<y.length-1;)_r(y);return y.documents}function cn(s,m,y){m!==null&&typeof m=="object"&&typeof y>"u"&&(y=m,m=null);let x=ln(s,y);if(typeof m!="function")return x;for(let _=0,E=x.length;_<E;_+=1)m(x[_])}function yr(s,m){let y=ln(s,m);if(y.length!==0){if(y.length===1)return y[0];throw new r("expected a single document in the stream, but found more")}}e.exports.loadAll=cn,e.exports.load=yr})),Sc=J(((n,e)=>{var t=Tt(),r=Rt(),i=Hr(),o=Object.prototype.toString,a=Object.prototype.hasOwnProperty,l=65279,p=9,c=10,h=13,u=32,d=33,v=34,C=35,L=37,K=38,V=39,G=42,ue=44,$=45,X=58,z=61,ne=62,Qt=63,Ke=64,Se=91,Oe=93,fe=96,qe=123,Re=124,Le=125,j={};j[0]="\\0",j[7]="\\a",j[8]="\\b",j[9]="\\t",j[10]="\\n",j[11]="\\v",j[12]="\\f",j[13]="\\r",j[27]="\\e",j[34]='\\"',j[92]="\\\\",j[133]="\\N",j[160]="\\_",j[8232]="\\L",j[8233]="\\P";var Xt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],R=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function st(f,g){if(g===null)return{};let A={},w=Object.keys(g);for(let b=0,k=w.length;b<k;b+=1){let S=w[b],I=String(g[S]);S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2));let P=f.compiledTypeMap.fallback[S];P&&a.call(P.styleAliases,I)&&(I=P.styleAliases[I]),A[S]=I}return A}function Ne(f){let g,A,w=f.toString(16).toUpperCase();if(f<=255)g="x",A=2;else if(f<=65535)g="u",A=4;else if(f<=4294967295)g="U",A=8;else throw new r("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+g+t.repeat("0",A-w.length)+w}var dr=1,ze=2;function mr(f){this.schema=f.schema||i,this.indent=Math.max(1,f.indent||2),this.noArrayIndent=f.noArrayIndent||!1,this.skipInvalid=f.skipInvalid||!1,this.flowLevel=t.isNothing(f.flowLevel)?-1:f.flowLevel,this.styleMap=st(this.schema,f.styles||null),this.sortKeys=f.sortKeys||!1,this.lineWidth=f.lineWidth||80,this.noRefs=f.noRefs||!1,this.noCompatMode=f.noCompatMode||!1,this.condenseFlow=f.condenseFlow||!1,this.quotingType=f.quotingType==='"'?ze:dr,this.forceQuotes=f.forceQuotes||!1,this.replacer=typeof f.replacer=="function"?f.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function kt(f,g){let A=t.repeat(" ",g),w=0,b="",k=f.length;for(;w<k;){let S,I=f.indexOf(`
564
- `,w);I===-1?(S=f.slice(w),w=k):(S=f.slice(w,I+1),w=I+1),S.length&&S!==`
565
- `&&(b+=A),b+=S}return b}function at(f,g){return`
566
- `+t.repeat(" ",f.indent*g)}function Zt(f,g){for(let A=0,w=f.implicitTypes.length;A<w;A+=1)if(f.implicitTypes[A].resolve(g))return!0;return!1}function he(f){return f===u||f===p}function Ge(f){return f>=32&&f<=126||f>=161&&f<=55295&&f!==8232&&f!==8233||f>=57344&&f<=65533&&f!==l||f>=65536&&f<=1114111}function Me(f){return Ge(f)&&f!==l&&f!==h&&f!==c}function lt(f,g,A){let w=Me(f),b=w&&!he(f);return(A?w:w&&f!==ue&&f!==Se&&f!==Oe&&f!==qe&&f!==Le)&&f!==C&&!(g===X&&!b)||Me(g)&&!he(g)&&f===C||g===X&&b}function Z(f){return Ge(f)&&f!==l&&!he(f)&&f!==$&&f!==Qt&&f!==X&&f!==ue&&f!==Se&&f!==Oe&&f!==qe&&f!==Le&&f!==C&&f!==K&&f!==G&&f!==d&&f!==Re&&f!==z&&f!==ne&&f!==V&&f!==v&&f!==L&&f!==Ke&&f!==fe}function ct(f){return!he(f)&&f!==X}function De(f,g){let A=f.charCodeAt(g),w;return A>=55296&&A<=56319&&g+1<f.length&&(w=f.charCodeAt(g+1),w>=56320&&w<=57343)?(A-55296)*1024+w-56320+65536:A}function en(f){return/^\n* /.test(f)}var tn=1,At=2,nn=3,rn=4,Ve=5;function on(f,g,A,w,b,k,S,I){let P,N=0,M=null,B=!1,Q=!1,Zi=w!==-1,Et=-1,Ot=Z(De(f,0))&&ct(De(f,f.length-1));if(g||S)for(P=0;P<f.length;N>=65536?P+=2:P++){if(N=De(f,P),!Ge(N))return Ve;Ot=Ot&&lt(N,M,I),M=N}else{for(P=0;P<f.length;N>=65536?P+=2:P++){if(N=De(f,P),N===c)B=!0,Zi&&(Q=Q||P-Et-1>w&&f[Et+1]!==" ",Et=P);else if(!Ge(N))return Ve;Ot=Ot&&lt(N,M,I),M=N}Q=Q||Zi&&P-Et-1>w&&f[Et+1]!==" "}return!B&&!Q?Ot&&!S&&!b(f)?tn:k===ze?Ve:At:A>9&&en(f)?Ve:S?k===ze?Ve:At:Q?rn:nn}function gr(f,g,A,w,b){f.dump=(function(){if(g.length===0)return f.quotingType===ze?'""':"''";if(!f.noCompatMode&&(Xt.indexOf(g)!==-1||R.test(g)))return f.quotingType===ze?'"'+g+'"':"'"+g+"'";let k=f.indent*Math.max(1,A),S=f.lineWidth===-1?-1:Math.max(Math.min(f.lineWidth,40),f.lineWidth-k),I=w||f.flowLevel>-1&&A>=f.flowLevel;function P(N){return Zt(f,N)}switch(on(g,I,f.indent,S,P,f.quotingType,f.forceQuotes&&!w,b)){case tn:return g;case At:return"'"+g.replace(/'/g,"''")+"'";case nn:return"|"+sn(g,f.indent)+an(kt(g,k));case rn:return">"+sn(g,f.indent)+an(kt(vr(g,S),k));case Ve:return'"'+_r(g,S)+'"';default:throw new r("impossible error: invalid scalar style")}})()}function sn(f,g){let A=en(f)?String(g):"",w=f[f.length-1]===`
567
- `;return A+(w&&(f[f.length-2]===`
568
- `||f===`
569
- `)?"+":w?"":"-")+`
570
- `}function an(f){return f[f.length-1]===`
571
- `?f.slice(0,-1):f}function vr(f,g){let A=/(\n+)([^\n]*)/g,w=(function(){let I=f.indexOf(`
572
- `);return I=I!==-1?I:f.length,A.lastIndex=I,Fe(f.slice(0,I),g)})(),b=f[0]===`
573
- `||f[0]===" ",k,S;for(;S=A.exec(f);){let I=S[1],P=S[2];k=P[0]===" ",w+=I+(!b&&!k&&P!==""?`
574
- `:"")+Fe(P,g),b=k}return w}function Fe(f,g){if(f===""||f[0]===" ")return f;let A=/ [^ ]/g,w,b=0,k,S=0,I=0,P="";for(;w=A.exec(f);)I=w.index,I-b>g&&(k=S>b?S:I,P+=`
575
- `+f.slice(b,k),b=k+1),S=I;return P+=`
576
- `,f.length-b>g&&S>b?P+=f.slice(b,S)+`
577
- `+f.slice(S+1):P+=f.slice(b),P.slice(1)}function _r(f){let g="",A=0;for(let w=0;w<f.length;A>=65536?w+=2:w++){A=De(f,w);let b=j[A];!b&&Ge(A)?(g+=f[w],A>=65536&&(g+=f[w+1])):g+=b||Ne(A)}return g}function ln(f,g,A){let w="",b=f.tag;for(let k=0,S=A.length;k<S;k+=1){let I=A[k];f.replacer&&(I=f.replacer.call(A,String(k),I)),(y(f,g,I,!1,!1)||typeof I>"u"&&y(f,g,null,!1,!1))&&(w!==""&&(w+=","+(f.condenseFlow?"":" ")),w+=f.dump)}f.tag=b,f.dump="["+w+"]"}function cn(f,g,A,w){let b="",k=f.tag;for(let S=0,I=A.length;S<I;S+=1){let P=A[S];f.replacer&&(P=f.replacer.call(A,String(S),P)),(y(f,g+1,P,!0,!0,!1,!0)||typeof P>"u"&&y(f,g+1,null,!0,!0,!1,!0))&&((!w||b!=="")&&(b+=at(f,g)),f.dump&&c===f.dump.charCodeAt(0)?b+="-":b+="- ",b+=f.dump)}f.tag=k,f.dump=b||"[]"}function yr(f,g,A){let w="",b=f.tag,k=Object.keys(A);for(let S=0,I=k.length;S<I;S+=1){let P="";w!==""&&(P+=", "),f.condenseFlow&&(P+='"');let N=k[S],M=A[N];f.replacer&&(M=f.replacer.call(A,N,M)),y(f,g,N,!1,!1)&&(f.dump.length>1024&&(P+="? "),P+=f.dump+(f.condenseFlow?'"':"")+":"+(f.condenseFlow?"":" "),y(f,g,M,!1,!1)&&(P+=f.dump,w+=P))}f.tag=b,f.dump="{"+w+"}"}function s(f,g,A,w){let b="",k=f.tag,S=Object.keys(A);if(f.sortKeys===!0)S.sort();else if(typeof f.sortKeys=="function")S.sort(f.sortKeys);else if(f.sortKeys)throw new r("sortKeys must be a boolean or a function");for(let I=0,P=S.length;I<P;I+=1){let N="";(!w||b!=="")&&(N+=at(f,g));let M=S[I],B=A[M];if(f.replacer&&(B=f.replacer.call(A,M,B)),!y(f,g+1,M,!0,!0,!0))continue;let Q=f.tag!==null&&f.tag!=="?"||f.dump&&f.dump.length>1024;Q&&(f.dump&&c===f.dump.charCodeAt(0)?N+="?":N+="? "),N+=f.dump,Q&&(N+=at(f,g)),y(f,g+1,B,!0,Q)&&(f.dump&&c===f.dump.charCodeAt(0)?N+=":":N+=": ",N+=f.dump,b+=N)}f.tag=k,f.dump=b||"{}"}function m(f,g,A){let w=A?f.explicitTypes:f.implicitTypes;for(let b=0,k=w.length;b<k;b+=1){let S=w[b];if((S.instanceOf||S.predicate)&&(!S.instanceOf||typeof g=="object"&&g instanceof S.instanceOf)&&(!S.predicate||S.predicate(g))){if(A?S.multi&&S.representName?f.tag=S.representName(g):f.tag=S.tag:f.tag="?",S.represent){let I=f.styleMap[S.tag]||S.defaultStyle,P;if(o.call(S.represent)==="[object Function]")P=S.represent(g,I);else if(a.call(S.represent,I))P=S.represent[I](g,I);else throw new r("!<"+S.tag+'> tag resolver accepts not "'+I+'" style');f.dump=P}return!0}}return!1}function y(f,g,A,w,b,k,S){f.tag=null,f.dump=A,m(f,A,!1)||m(f,A,!0);let I=o.call(f.dump),P=w;w&&(w=f.flowLevel<0||f.flowLevel>g);let N=I==="[object Object]"||I==="[object Array]",M,B;if(N&&(M=f.duplicates.indexOf(A),B=M!==-1),(f.tag!==null&&f.tag!=="?"||B||f.indent!==2&&g>0)&&(b=!1),B&&f.usedDuplicates[M])f.dump="*ref_"+M;else{if(N&&B&&!f.usedDuplicates[M]&&(f.usedDuplicates[M]=!0),I==="[object Object]")w&&Object.keys(f.dump).length!==0?(s(f,g,f.dump,b),B&&(f.dump="&ref_"+M+f.dump)):(yr(f,g,f.dump),B&&(f.dump="&ref_"+M+" "+f.dump));else if(I==="[object Array]")w&&f.dump.length!==0?(f.noArrayIndent&&!S&&g>0?cn(f,g-1,f.dump,b):cn(f,g,f.dump,b),B&&(f.dump="&ref_"+M+f.dump)):(ln(f,g,f.dump),B&&(f.dump="&ref_"+M+" "+f.dump));else if(I==="[object String]")f.tag!=="?"&&gr(f,f.dump,g,k,P);else{if(I==="[object Undefined]")return!1;if(f.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+I)}if(f.tag!==null&&f.tag!=="?"){let Q=encodeURI(f.tag[0]==="!"?f.tag.slice(1):f.tag).replace(/!/g,"%21");f.tag[0]==="!"?Q="!"+Q:Q.slice(0,18)==="tag:yaml.org,2002:"?Q="!!"+Q.slice(18):Q="!<"+Q+">",f.dump=Q+" "+f.dump}}return!0}function x(f,g){let A=[],w=[];_(f,A,w);let b=w.length;for(let k=0;k<b;k+=1)g.duplicates.push(A[w[k]]);g.usedDuplicates=new Array(b)}function _(f,g,A){if(f!==null&&typeof f=="object"){let w=g.indexOf(f);if(w!==-1)A.indexOf(w)===-1&&A.push(w);else if(g.push(f),Array.isArray(f))for(let b=0,k=f.length;b<k;b+=1)_(f[b],g,A);else{let b=Object.keys(f);for(let k=0,S=b.length;k<S;k+=1)_(f[b[k]],g,A)}}}function E(f,g){g=g||{};let A=new mr(g);A.noRefs||x(f,A);let w=f;return A.replacer&&(w=A.replacer.call({"":w},"",w)),y(A,0,w,!0,!0)?A.dump+`
578
- `:""}e.exports.dump=E})),Jo=wc(J(((n,e)=>{var t=xc(),r=Sc();function i(o,a){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+a+" instead, which is now safe by default.")}}e.exports.Type=se(),e.exports.Schema=Io(),e.exports.FAILSAFE_SCHEMA=No(),e.exports.JSON_SCHEMA=Bo(),e.exports.CORE_SCHEMA=$o(),e.exports.DEFAULT_SCHEMA=Hr(),e.exports.load=t.load,e.exports.loadAll=t.loadAll,e.exports.dump=r.dump,e.exports.YAMLException=Rt(),e.exports.types={binary:qo(),float:Fo(),map:Lo(),null:Mo(),pairs:Wo(),set:Uo(),timestamp:Ho(),bool:Do(),int:Vo(),merge:jo(),omap:Go(),seq:Ro(),str:To()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:xd,Schema:Sd,FAILSAFE_SCHEMA:Cd,JSON_SCHEMA:kd,CORE_SCHEMA:Ad,DEFAULT_SCHEMA:Ed,load:Od,loadAll:Pd,dump:Id,YAMLException:Td,types:Rd,safeLoad:Ld,safeLoadAll:Nd,safeDump:Md}=Jo.default,Qe=Jo.default;async function Ac(n=process.cwd()){let e=ee(n);for(;;){let t=ee(e,"view-contracts.config.yaml");try{return await Cc(t),t}catch{let r=gn(e);if(r===e)return null;e=r}}}async function We(n){if(n)return ee(n);let e=await Ac();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Xe(n){let e=ee(n),t=await Yo(e,"utf-8"),r=Qe.load(t);return Ec(e,r)}function Ec(n,e){let t=ke(n);return{...e,openapi:ee(t,e.openapi),bindings:ee(t,e.bindings),microContractsConfig:ee(t,e.microContractsConfig),viewsDir:ee(t,e.viewsDir),generated:{contractDir:ee(t,e.generated.contractDir),actions:ee(t,e.generated.actions),bridge:ee(t,e.generated.bridge),reactDir:ee(t,e.generated.reactDir)},componentsModule:e.componentsModule?ee(t,e.componentsModule):void 0,themeModule:e.themeModule?ee(t,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?ee(t,e.design.tokens):void 0,theme:e.design.theme?ee(t,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?ee(t,e.design.extensionsCss):void 0}:void 0}}async function Lt(n){let e=await Yo(ee(n),"utf-8");return Qe.load(e)}function Ko(n,e){return ee(n.generated.reactDir,`${e.screenName}.generated.tsx`)}function ke(n){return gn(ee(n))}function zo(n,e,t){let r=ee(gn(t),"../components/index.ts"),i=kc(gn(ee(t)),r);return i.startsWith(".")||(i=`./${i}`),i.replace(/\.tsx?$/,".js")}import{relative as Oc}from"node:path";function Qo(n,e){return Oc(n,e).split("\\").join("/")}import{resolve as Nc}from"node:path";import{readFileSync as Pc}from"node:fs";import{createRequire as Ic}from"node:module";import{dirname as jr,resolve as Tc}from"node:path";import{fileURLToPath as Rc}from"node:url";var ut;function ae(){if(ut)return ut;let n=Ic(import.meta.url);try{return ut=jr(n.resolve("view-contracts/package.json")),ut}catch{let e=jr(Rc(import.meta.url));for(;;){try{let r=Tc(e,"package.json");if(JSON.parse(Pc(r,"utf8")).name==="view-contracts")return ut=e,ut}catch{}let t=jr(e);if(t===e)break;e=t}throw new Error("view-contracts package root not found")}}import{readFile as Lc}from"node:fs/promises";async function Xo(n){return Qe.load(await Lc(n,"utf-8"))}function Zo(n,e,t){for(let r of n)if(!e.has(r))throw new Error(`${t}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function es(n,e,t){for(let[r,i]of Object.entries(n))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${t}: element "${r}" is missing required "${String(o)}"`)}var Xd=ae();var ts="renderers/react/elements.yaml",qr=null;function Mc(n){Zo(Object.keys(n.elements),hn,ts),es(n.elements,["tag"],ts)}async function ns(n){if(!n&&qr)return qr;let e=n??Nc(ae(),"renderers/react/elements.yaml"),t=await Xo(e);return Mc(t),n||(qr=t),t}var rs=new Set(["align","aspectRatio","axis","contentAlign","direction","fontWeight","gap","headingLevel","height","justify","lineLimit","maxHeight","maxWidth","minHeight","minWidth","padding","scroll","selfAlign","textAlign","textOverflow","textStyle","weight","width","size"]);function F(n){return" ".repeat(n)}function Mt(n,e="vm"){let t=n.scope??e;return n.path?`${t}.${n.path}`:t}function _n(n,e=!1){let t=e?" as ActionDescriptor":"";if(!n.params||Object.keys(n.params).length===0)return`{ name: ${JSON.stringify(n.name)} }${t}`;let r=Object.entries(n.params).map(([i,o])=>`${i}: ${ft(o,0)}`).join(", ");return`{ name: ${JSON.stringify(n.name)}, params: { ${r} } }${t}`}function Gr(n,e,t=!1){if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[
579
- ${n.map(r=>`${F(e+1)}${Gr(r,e+1,t)}`).join(`,
467
+ `+i.mark.snippet),a+" "+o):a}function n(i,s){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(s){return this.name+": "+r(this,s)},e.exports=n})),wy=le(((t,e)=>{var r=cn();function n(o,a,l,u,d){let f="",h="",m=Math.floor(d/2)-1;return u-a>m&&(f=" ... ",a=u-m+f.length),l-u>m&&(h=" ...",l=u+m-h.length),{str:f+o.slice(a,l).replace(/\t/g,"\u2192")+h,pos:u-a+f.length}}function i(o,a){return r.repeat(" ",a-o.length)+o}function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let l=/\r?\n|\r|\0/g,u=[0],d=[],f,h=-1;for(;f=l.exec(o.buffer);)d.push(f.index),u.push(f.index+f[0].length),o.position<=f.index&&h<0&&(h=u.length-2);h<0&&(h=u.length-1);let m="",g=Math.min(o.line+a.linesAfter,d.length).toString().length,_=a.maxLength-(a.indent+g+3);for(let E=1;E<=a.linesBefore&&!(h-E<0);E++){let V=n(o.buffer,u[h-E],d[h-E],o.position-(u[h]-u[h-E]),_);m=r.repeat(" ",a.indent)+i((o.line-E+1).toString(),g)+" | "+V.str+`
468
+ `+m}let x=n(o.buffer,u[h],d[h],o.position,_);m+=r.repeat(" ",a.indent)+i((o.line+1).toString(),g)+" | "+x.str+`
469
+ `,m+=r.repeat("-",a.indent+g+3+x.pos)+`^
470
+ `;for(let E=1;E<=a.linesAfter&&!(h+E>=d.length);E++){let V=n(o.buffer,u[h+E],d[h+E],o.position-(u[h]-u[h+E]),_);m+=r.repeat(" ",a.indent)+i((o.line+E+1).toString(),g)+" | "+V.str+`
471
+ `}return m.replace(/\n$/,"")}e.exports=s})),Oe=le(((t,e)=>{var r=ln(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let l={};return a!==null&&Object.keys(a).forEach(function(u){a[u].forEach(function(d){l[String(d)]=u})}),l}function o(a,l){if(l=l||{},Object.keys(l).forEach(function(u){if(n.indexOf(u)===-1)throw new r('Unknown option "'+u+'" is met in definition of "'+a+'" YAML type.')}),this.options=l,this.tag=a,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(u){return u},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=s(l.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=o})),mu=le(((t,e)=>{var r=ln(),n=Oe();function i(a,l){let u=[];return a[l].forEach(function(d){let f=u.length;u.forEach(function(h,m){h.tag===d.tag&&h.kind===d.kind&&h.multi===d.multi&&(f=m)}),u[f]=d}),u}function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function l(u){u.multi?(a.multi[u.kind].push(u),a.multi.fallback.push(u)):a[u.kind][u.tag]=a.fallback[u.tag]=u}for(let u=0,d=arguments.length;u<d;u+=1)arguments[u].forEach(l);return a}function o(a){return this.extend(a)}o.prototype.extend=function(l){let u=[],d=[];if(l instanceof n)d.push(l);else if(Array.isArray(l))d=d.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(u=u.concat(l.implicit)),l.explicit&&(d=d.concat(l.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.forEach(function(h){if(!(h instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(h){if(!(h instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(u),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},e.exports=o})),gu=le(((t,e)=>{e.exports=new(Oe())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),yu=le(((t,e)=>{e.exports=new(Oe())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),vu=le(((t,e)=>{e.exports=new(Oe())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),_u=le(((t,e)=>{e.exports=new(mu())({explicit:[gu(),yu(),vu()]})})),wu=le(((t,e)=>{var r=Oe();function n(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}function i(){return null}function s(o){return o===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),bu=le(((t,e)=>{var r=Oe();function n(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}function i(o){return o==="true"||o==="True"||o==="TRUE"}function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"})})),Su=le(((t,e)=>{var r=cn(),n=Oe();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function s(f){return f>=48&&f<=55}function o(f){return f>=48&&f<=57}function a(f){if(f===null)return!1;let h=f.length,m=0,g=!1;if(!h)return!1;let _=f[m];if((_==="-"||_==="+")&&(_=f[++m]),_==="0"){if(m+1===h)return!0;if(_=f[++m],_==="b"){for(m++;m<h;m++){if(_=f[m],_!=="0"&&_!=="1")return!1;g=!0}return g&&Number.isFinite(l(f))}if(_==="x"){for(m++;m<h;m++){if(!i(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(f))}if(_==="o"){for(m++;m<h;m++){if(!s(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(f))}}for(;m<h;m++){if(!o(f.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(l(f)):!1}function l(f){let h=f,m=1,g=h[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),h=h.slice(1),g=h[0]),h==="0")return 0;if(g==="0"){if(h[1]==="b")return m*parseInt(h.slice(2),2);if(h[1]==="x")return m*parseInt(h.slice(2),16);if(h[1]==="o")return m*parseInt(h.slice(2),8)}return m*parseInt(h,10)}function u(f){return l(f)}function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&f%1===0&&!r.isNegativeZero(f)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:u,predicate:d,represent:{binary:function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},octal:function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},decimal:function(f){return f.toString(10)},hexadecimal:function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Eu=le(((t,e)=>{var r=cn(),n=Oe(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){return f===null||!i.test(f)?!1:Number.isFinite(parseFloat(f,10))?!0:s.test(f)}function a(f){let h=f.toLowerCase(),m=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:m*parseFloat(h,10)}var l=/^[-+]?[0-9]+e/;function u(f,h){if(isNaN(f))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return l.test(m)?m.replace("e",".e"):m}function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:u,defaultStyle:"lowercase"})})),$u=le(((t,e)=>{e.exports=_u().extend({implicit:[wu(),bu(),Su(),Eu()]})})),Cu=le(((t,e)=>{e.exports=$u()})),ku=le(((t,e)=>{var r=Oe(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(l){return l===null?!1:n.exec(l)!==null||i.exec(l)!==null}function o(l){let u=0,d=null,f=n.exec(l);if(f===null&&(f=i.exec(l)),f===null)throw new Error("Date resolve error");let h=+f[1],m=+f[2]-1,g=+f[3];if(!f[4])return new Date(Date.UTC(h,m,g));let _=+f[4],x=+f[5],E=+f[6];if(f[7]){for(u=f[7].slice(0,3);u.length<3;)u+="0";u=+u}if(f[9]){let G=+f[10],j=+(f[11]||0);d=(G*60+j)*6e4,f[9]==="-"&&(d=-d)}let V=new Date(Date.UTC(h,m,g,_,x,E,u));return d&&V.setTime(V.getTime()-d),V}function a(l){return l.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a})})),xu=le(((t,e)=>{var r=Oe();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),Pu=le(((t,e)=>{var r=Oe(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
472
+ \r`;function i(l){if(l===null)return!1;let u=0,d=l.length,f=n;for(let h=0;h<d;h++){let m=f.indexOf(l.charAt(h));if(!(m>64)){if(m<0)return!1;u+=6}}return u%8===0}function s(l){let u=l.replace(/[\r\n=]/g,""),d=u.length,f=n,h=0,m=[];for(let _=0;_<d;_++)_%4===0&&_&&(m.push(h>>16&255),m.push(h>>8&255),m.push(h&255)),h=h<<6|f.indexOf(u.charAt(_));let g=d%4*6;return g===0?(m.push(h>>16&255),m.push(h>>8&255),m.push(h&255)):g===18?(m.push(h>>10&255),m.push(h>>2&255)):g===12&&m.push(h>>4&255),new Uint8Array(m)}function o(l){let u="",d=0,f=l.length,h=n;for(let g=0;g<f;g++)g%3===0&&g&&(u+=h[d>>18&63],u+=h[d>>12&63],u+=h[d>>6&63],u+=h[d&63]),d=(d<<8)+l[g];let m=f%3;return m===0?(u+=h[d>>18&63],u+=h[d>>12&63],u+=h[d>>6&63],u+=h[d&63]):m===2?(u+=h[d>>10&63],u+=h[d>>4&63],u+=h[d<<2&63],u+=h[64]):m===1&&(u+=h[d>>2&63],u+=h[d<<4&63],u+=h[64],u+=h[64]),u}function a(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o})})),Ou=le(((t,e)=>{var r=Oe(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let l=[],u=a;for(let d=0,f=u.length;d<f;d+=1){let h=u[d],m=!1;if(i.call(h)!=="[object Object]")return!1;let g;for(g in h)if(n.call(h,g))if(!m)m=!0;else return!1;if(!m)return!1;if(l.indexOf(g)===-1)l.push(g);else return!1}return!0}function o(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o})})),Au=le(((t,e)=>{var r=Oe(),n=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,l=new Array(a.length);for(let u=0,d=a.length;u<d;u+=1){let f=a[u];if(n.call(f)!=="[object Object]")return!1;let h=Object.keys(f);if(h.length!==1)return!1;l[u]=[h[0],f[h[0]]]}return!0}function s(o){if(o===null)return[];let a=o,l=new Array(a.length);for(let u=0,d=a.length;u<d;u+=1){let f=a[u],h=Object.keys(f);l[u]=[h[0],f[h[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s})})),Ru=le(((t,e)=>{var r=Oe(),n=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let l in a)if(n.call(a,l)&&a[l]!==null)return!1;return!0}function s(o){return o!==null?o:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s})})),xo=le(((t,e)=>{e.exports=Cu().extend({implicit:[ku(),xu()],explicit:[Pu(),Ou(),Au(),Ru()]})})),by=le(((t,e)=>{var r=cn(),n=ln(),i=wy(),s=xo(),o=Object.prototype.hasOwnProperty,a=1,l=2,u=3,d=4,f=1,h=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=/[\x85\u2028\u2029]/,x=/[,\[\]{}]/,E=/^(?:!|!!|![0-9A-Za-z-]+!)$/,V=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function G(c){return Object.prototype.toString.call(c)}function j(c){return c===10||c===13}function L(c){return c===9||c===32}function Q(c){return c===9||c===32||c===10||c===13}function ne(c){return c===44||c===91||c===93||c===123||c===125}function Mt(c){if(c>=48&&c<=57)return c-48;let y=c|32;return y>=97&&y<=102?y-97+10:-1}function nt(c){return c===120?2:c===117?4:c===85?8:0}function _e(c){return c>=48&&c<=57?c-48:-1}function Ne(c){switch(c){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
473
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Ee(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function it(c,y,S){y==="__proto__"?Object.defineProperty(c,y,{configurable:!0,enumerable:!0,writable:!0,value:S}):c[y]=S}var st=new Array(256),bt=new Array(256);for(let c=0;c<256;c++)st[c]=Ne(c)?1:0,bt[c]=Ne(c);function se(c,y){this.input=c,this.filename=y.filename||null,this.schema=y.schema||s,this.onWarning=y.onWarning||null,this.legacy=y.legacy||!1,this.json=y.json||!1,this.listener=y.listener||null,this.maxDepth=typeof y.maxDepth=="number"?y.maxDepth:100,this.maxMergeSeqLength=typeof y.maxMergeSeqLength=="number"?y.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function ci(c,y){let S={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return S.snippet=i(S),new n(y,S)}function D(c,y){throw ci(c,y)}function hr(c,y){c.onWarning&&c.onWarning.call(null,ci(c,y))}function St(c,y,S){let k=c.anchorMapTransactions;if(k.length!==0){let b=k[k.length-1];o.call(b,y)||(b[y]={existed:o.call(c.anchorMap,y),value:c.anchorMap[y]})}c.anchorMap[y]=S}function Qs(c){c.anchorMapTransactions.push(Object.create(null))}function Wt(c){let y=c.anchorMapTransactions.pop(),S=c.anchorMapTransactions;if(S.length===0)return;let k=S[S.length-1],b=Object.keys(y);for(let R=0,p=b.length;R<p;R+=1){let v=b[R];o.call(k,v)||(k[v]=y[v])}}function Zs(c){let y=c.anchorMapTransactions.pop(),S=Object.keys(y);for(let k=S.length-1;k>=0;k-=1){let b=y[S[k]];b.existed?c.anchorMap[S[k]]=b.value:delete c.anchorMap[S[k]]}}function tn(c){return{position:c.position,line:c.line,lineStart:c.lineStart,lineIndent:c.lineIndent,firstTabInLine:c.firstTabInLine,tag:c.tag,anchor:c.anchor,kind:c.kind,result:c.result}}function mr(c,y){c.position=y.position,c.line=y.line,c.lineStart=y.lineStart,c.lineIndent=y.lineIndent,c.firstTabInLine=y.firstTabInLine,c.tag=y.tag,c.anchor=y.anchor,c.kind=y.kind,c.result=y.result}var li={YAML:function(y,S,k){y.version!==null&&D(y,"duplication of %YAML directive"),k.length!==1&&D(y,"YAML directive accepts exactly one argument");let b=/^([0-9]+)\.([0-9]+)$/.exec(k[0]);b===null&&D(y,"ill-formed argument of the YAML directive");let R=parseInt(b[1],10),p=parseInt(b[2],10);R!==1&&D(y,"unacceptable YAML version of the document"),y.version=k[0],y.checkLineBreaks=p<2,p!==1&&p!==2&&hr(y,"unsupported YAML version of the document")},TAG:function(y,S,k){let b;k.length!==2&&D(y,"TAG directive accepts exactly two arguments");let R=k[0];b=k[1],E.test(R)||D(y,"ill-formed tag handle (first argument) of the TAG directive"),o.call(y.tagMap,R)&&D(y,'there is a previously declared suffix for "'+R+'" tag handle'),V.test(b)||D(y,"ill-formed tag prefix (second argument) of the TAG directive");try{b=decodeURIComponent(b)}catch{D(y,"tag prefix is malformed: "+b)}y.tagMap[R]=b}};function qe(c,y,S,k){if(y<S){let b=c.input.slice(y,S);if(k)for(let R=0,p=b.length;R<p;R+=1){let v=b.charCodeAt(R);v===9||v>=32&&v<=1114111||D(c,"expected valid JSON character")}else g.test(b)&&D(c,"the stream contains non-printable characters");c.result+=b}}function Lt(c,y,S,k){r.isObject(S)||D(c,"cannot merge mappings; the provided source object is unacceptable");let b=Object.keys(S);for(let R=0,p=b.length;R<p;R+=1){let v=b[R];o.call(y,v)||(it(y,v,S[v]),k[v]=!0)}}function Et(c,y,S,k,b,R,p,v,A){if(Array.isArray(b)){b=Array.prototype.slice.call(b);for(let $=0,C=b.length;$<C;$+=1)Array.isArray(b[$])&&D(c,"nested arrays are not supported inside keys"),typeof b=="object"&&G(b[$])==="[object Object]"&&(b[$]="[object Object]")}if(typeof b=="object"&&G(b)==="[object Object]"&&(b="[object Object]"),b=String(b),y===null&&(y={}),k==="tag:yaml.org,2002:merge")if(Array.isArray(R)){R.length>c.maxMergeSeqLength&&D(c,"merge sequence length exceeded maxMergeSeqLength ("+c.maxMergeSeqLength+")");let $=new Set;for(let C=0,O=R.length;C<O;C+=1){let P=R[C];$.has(P)||($.add(P),Lt(c,y,P,S))}}else Lt(c,y,R,S);else!c.json&&!o.call(S,b)&&o.call(y,b)&&(c.line=p||c.line,c.lineStart=v||c.lineStart,c.position=A||c.position,D(c,"duplicated mapping key")),it(y,b,R),delete S[b];return y}function gr(c){let y=c.input.charCodeAt(c.position);y===10?c.position++:y===13?(c.position++,c.input.charCodeAt(c.position)===10&&c.position++):D(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function me(c,y,S){let k=0,b=c.input.charCodeAt(c.position);for(;b!==0;){for(;L(b);)b===9&&c.firstTabInLine===-1&&(c.firstTabInLine=c.position),b=c.input.charCodeAt(++c.position);if(y&&b===35)do b=c.input.charCodeAt(++c.position);while(b!==10&&b!==13&&b!==0);if(j(b))for(gr(c),b=c.input.charCodeAt(c.position),k++,c.lineIndent=0;b===32;)c.lineIndent++,b=c.input.charCodeAt(++c.position);else break}return S!==-1&&k!==0&&c.lineIndent<S&&hr(c,"deficient indentation"),k}function yr(c){let y=c.position,S=c.input.charCodeAt(y);return!!((S===45||S===46)&&S===c.input.charCodeAt(y+1)&&S===c.input.charCodeAt(y+2)&&(y+=3,S=c.input.charCodeAt(y),S===0||Q(S)))}function $t(c,y){y===1?c.result+=" ":y>1&&(c.result+=r.repeat(`
474
+ `,y-1))}function ui(c,y,S){let k,b,R,p,v,A,$=c.kind,C=c.result,O=c.input.charCodeAt(c.position);if(Q(O)||ne(O)||O===35||O===38||O===42||O===33||O===124||O===62||O===39||O===34||O===37||O===64||O===96)return!1;if(O===63||O===45){let P=c.input.charCodeAt(c.position+1);if(Q(P)||S&&ne(P))return!1}for(c.kind="scalar",c.result="",k=b=c.position,R=!1;O!==0;){if(O===58){let P=c.input.charCodeAt(c.position+1);if(Q(P)||S&&ne(P))break}else if(O===35){if(Q(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&yr(c)||S&&ne(O))break;if(j(O))if(p=c.line,v=c.lineStart,A=c.lineIndent,me(c,!1,-1),c.lineIndent>=y){R=!0,O=c.input.charCodeAt(c.position);continue}else{c.position=b,c.line=p,c.lineStart=v,c.lineIndent=A;break}}R&&(qe(c,k,b,!1),$t(c,c.line-p),k=b=c.position,R=!1),L(O)||(b=c.position+1),O=c.input.charCodeAt(++c.position)}return qe(c,k,b,!1),c.result?!0:(c.kind=$,c.result=C,!1)}function fi(c,y){let S,k,b=c.input.charCodeAt(c.position);if(b!==39)return!1;for(c.kind="scalar",c.result="",c.position++,S=k=c.position;(b=c.input.charCodeAt(c.position))!==0;)if(b===39)if(qe(c,S,c.position,!0),b=c.input.charCodeAt(++c.position),b===39)S=c.position,c.position++,k=c.position;else return!0;else j(b)?(qe(c,S,k,!0),$t(c,me(c,!1,y)),S=k=c.position):c.position===c.lineStart&&yr(c)?D(c,"unexpected end of the document within a single quoted scalar"):(c.position++,L(b)||(k=c.position));D(c,"unexpected end of the stream within a single quoted scalar")}function rn(c,y){let S,k,b,R=c.input.charCodeAt(c.position);if(R!==34)return!1;for(c.kind="scalar",c.result="",c.position++,S=k=c.position;(R=c.input.charCodeAt(c.position))!==0;){if(R===34)return qe(c,S,c.position,!0),c.position++,!0;if(R===92){if(qe(c,S,c.position,!0),R=c.input.charCodeAt(++c.position),j(R))me(c,!1,y);else if(R<256&&st[R])c.result+=bt[R],c.position++;else if((b=nt(R))>0){let p=b,v=0;for(;p>0;p--)R=c.input.charCodeAt(++c.position),(b=Mt(R))>=0?v=(v<<4)+b:D(c,"expected hexadecimal character");c.result+=Ee(v),c.position++}else D(c,"unknown escape sequence");S=k=c.position}else j(R)?(qe(c,S,k,!0),$t(c,me(c,!1,y)),S=k=c.position):c.position===c.lineStart&&yr(c)?D(c,"unexpected end of the document within a double quoted scalar"):(c.position++,L(R)||(k=c.position))}D(c,"unexpected end of the stream within a double quoted scalar")}function di(c,y){let S=!0,k,b,R,p=c.tag,v,A=c.anchor,$,C,O,P,N=Object.create(null),T,F,U,Z=c.input.charCodeAt(c.position);if(Z===91)$=93,P=!1,v=[];else if(Z===123)$=125,P=!0,v={};else return!1;for(c.anchor!==null&&St(c,c.anchor,v),Z=c.input.charCodeAt(++c.position);Z!==0;){if(me(c,!0,y),Z=c.input.charCodeAt(c.position),Z===$)return c.position++,c.tag=p,c.anchor=A,c.kind=P?"mapping":"sequence",c.result=v,!0;S?Z===44&&D(c,"expected the node content, but found ','"):D(c,"missed comma between flow collection entries"),F=T=U=null,C=O=!1,Z===63&&Q(c.input.charCodeAt(c.position+1))&&(C=O=!0,c.position++,me(c,!0,y)),k=c.line,b=c.lineStart,R=c.position,kt(c,y,a,!1,!0),F=c.tag,T=c.result,me(c,!0,y),Z=c.input.charCodeAt(c.position),(O||c.line===k)&&Z===58&&(C=!0,Z=c.input.charCodeAt(++c.position),me(c,!0,y),kt(c,y,a,!1,!0),U=c.result),P?Et(c,v,N,F,T,U,k,b,R):C?v.push(Et(c,null,N,F,T,U,k,b,R)):v.push(T),me(c,!0,y),Z=c.input.charCodeAt(c.position),Z===44?(S=!0,Z=c.input.charCodeAt(++c.position)):S=!1}D(c,"unexpected end of the stream within a flow collection")}function pi(c,y){let S,k=f,b=!1,R=!1,p=y,v=0,A=!1,$,C=c.input.charCodeAt(c.position);if(C===124)S=!1;else if(C===62)S=!0;else return!1;for(c.kind="scalar",c.result="";C!==0;)if(C=c.input.charCodeAt(++c.position),C===43||C===45)f===k?k=C===43?m:h:D(c,"repeat of a chomping mode identifier");else if(($=_e(C))>=0)$===0?D(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):R?D(c,"repeat of an indentation width identifier"):(p=y+$-1,R=!0);else break;if(L(C)){do C=c.input.charCodeAt(++c.position);while(L(C));if(C===35)do C=c.input.charCodeAt(++c.position);while(!j(C)&&C!==0)}for(;C!==0;){for(gr(c),c.lineIndent=0,C=c.input.charCodeAt(c.position);(!R||c.lineIndent<p)&&C===32;)c.lineIndent++,C=c.input.charCodeAt(++c.position);if(!R&&c.lineIndent>p&&(p=c.lineIndent),j(C)){v++;continue}if(!R&&p===0&&D(c,"missing indentation for block scalar"),c.lineIndent<p){k===m?c.result+=r.repeat(`
475
+ `,b?1+v:v):k===f&&b&&(c.result+=`
476
+ `);break}S?L(C)?(A=!0,c.result+=r.repeat(`
477
+ `,b?1+v:v)):A?(A=!1,c.result+=r.repeat(`
478
+ `,v+1)):v===0?b&&(c.result+=" "):c.result+=r.repeat(`
479
+ `,v):c.result+=r.repeat(`
480
+ `,b?1+v:v),b=!0,R=!0,v=0;let O=c.position;for(;!j(C)&&C!==0;)C=c.input.charCodeAt(++c.position);qe(c,O,c.position,!1)}return!0}function Ct(c,y){let S=c.tag,k=c.anchor,b=[],R=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&St(c,c.anchor,b);let p=c.input.charCodeAt(c.position);for(;p!==0&&(c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,D(c,"tab characters must not be used in indentation")),!(p!==45||!Q(c.input.charCodeAt(c.position+1))));){if(R=!0,c.position++,me(c,!0,-1)&&c.lineIndent<=y){b.push(null),p=c.input.charCodeAt(c.position);continue}let v=c.line;if(kt(c,y,u,!1,!0),b.push(c.result),me(c,!0,-1),p=c.input.charCodeAt(c.position),(c.line===v||c.lineIndent>y)&&p!==0)D(c,"bad indentation of a sequence entry");else if(c.lineIndent<y)break}return R?(c.tag=S,c.anchor=k,c.kind="sequence",c.result=b,!0):!1}function hi(c,y,S){let k,b,R,p,v=c.tag,A=c.anchor,$={},C=Object.create(null),O=null,P=null,N=null,T=!1,F=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&St(c,c.anchor,$);let U=c.input.charCodeAt(c.position);for(;U!==0;){!T&&c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,D(c,"tab characters must not be used in indentation"));let Z=c.input.charCodeAt(c.position+1),pe=c.line;if((U===63||U===58)&&Q(Z))U===63?(T&&(Et(c,$,C,O,P,null,b,R,p),O=P=N=null),F=!0,T=!0,k=!0):T?(T=!1,k=!0):D(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,U=Z;else{if(b=c.line,R=c.lineStart,p=c.position,!kt(c,S,l,!1,!0))break;if(c.line===pe){for(U=c.input.charCodeAt(c.position);L(U);)U=c.input.charCodeAt(++c.position);if(U===58)U=c.input.charCodeAt(++c.position),Q(U)||D(c,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(Et(c,$,C,O,P,null,b,R,p),O=P=N=null),F=!0,T=!1,k=!1,O=c.tag,P=c.result;else if(F)D(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=v,c.anchor=A,!0}else if(F)D(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=v,c.anchor=A,!0}if((c.line===pe||c.lineIndent>y)&&(T&&(b=c.line,R=c.lineStart,p=c.position),kt(c,y,d,!0,k)&&(T?P=c.result:N=c.result),T||(Et(c,$,C,O,P,N,b,R,p),O=P=N=null),me(c,!0,-1),U=c.input.charCodeAt(c.position)),(c.line===pe||c.lineIndent>y)&&U!==0)D(c,"bad indentation of a mapping entry");else if(c.lineIndent<y)break}return T&&Et(c,$,C,O,P,null,b,R,p),F&&(c.tag=v,c.anchor=A,c.kind="mapping",c.result=$),F}function eo(c){let y=!1,S=!1,k,b,R=c.input.charCodeAt(c.position);if(R!==33)return!1;c.tag!==null&&D(c,"duplication of a tag property"),R=c.input.charCodeAt(++c.position),R===60?(y=!0,R=c.input.charCodeAt(++c.position)):R===33?(S=!0,k="!!",R=c.input.charCodeAt(++c.position)):k="!";let p=c.position;if(y){do R=c.input.charCodeAt(++c.position);while(R!==0&&R!==62);c.position<c.length?(b=c.input.slice(p,c.position),R=c.input.charCodeAt(++c.position)):D(c,"unexpected end of the stream within a verbatim tag")}else{for(;R!==0&&!Q(R);)R===33&&(S?D(c,"tag suffix cannot contain exclamation marks"):(k=c.input.slice(p-1,c.position+1),E.test(k)||D(c,"named tag handle cannot contain such characters"),S=!0,p=c.position+1)),R=c.input.charCodeAt(++c.position);b=c.input.slice(p,c.position),x.test(b)&&D(c,"tag suffix cannot contain flow indicator characters")}b&&!V.test(b)&&D(c,"tag name cannot contain such characters: "+b);try{b=decodeURIComponent(b)}catch{D(c,"tag name is malformed: "+b)}return y?c.tag=b:o.call(c.tagMap,k)?c.tag=c.tagMap[k]+b:k==="!"?c.tag="!"+b:k==="!!"?c.tag="tag:yaml.org,2002:"+b:D(c,'undeclared tag handle "'+k+'"'),!0}function mi(c){let y=c.input.charCodeAt(c.position);if(y!==38)return!1;c.anchor!==null&&D(c,"duplication of an anchor property"),y=c.input.charCodeAt(++c.position);let S=c.position;for(;y!==0&&!Q(y)&&!ne(y);)y=c.input.charCodeAt(++c.position);return c.position===S&&D(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(S,c.position),!0}function gi(c){let y=c.input.charCodeAt(c.position);if(y!==42)return!1;y=c.input.charCodeAt(++c.position);let S=c.position;for(;y!==0&&!Q(y)&&!ne(y);)y=c.input.charCodeAt(++c.position);c.position===S&&D(c,"name of an alias node must contain at least one character");let k=c.input.slice(S,c.position);return o.call(c.anchorMap,k)||D(c,'unidentified alias "'+k+'"'),c.result=c.anchorMap[k],me(c,!0,-1),!0}function to(c,y,S,k){let b=tn(c);return Qs(c),mr(c,y),c.tag=null,c.anchor=null,c.kind=null,c.result=null,hi(c,S,k)&&c.kind==="mapping"?(Wt(c),!0):(Zs(c),mr(c,b),!1)}function kt(c,y,S,k,b){let R,p,v=1,A=!1,$=!1,C=null,O,P,N;c.depth>=c.maxDepth&&D(c,"nesting exceeded maxDepth ("+c.maxDepth+")"),c.depth+=1,c.listener!==null&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null;let T=R=p=d===S||u===S;if(k&&me(c,!0,-1)&&(A=!0,c.lineIndent>y?v=1:c.lineIndent===y?v=0:c.lineIndent<y&&(v=-1)),v===1)for(;;){let F=c.input.charCodeAt(c.position),U=tn(c);if(A&&(F===33&&c.tag!==null||F===38&&c.anchor!==null)||!eo(c)&&!mi(c))break;C===null&&(C=U),me(c,!0,-1)?(A=!0,p=T,c.lineIndent>y?v=1:c.lineIndent===y?v=0:c.lineIndent<y&&(v=-1)):p=!1}if(p&&(p=A||b),v===1||d===S)if(a===S||l===S?P=y:P=y+1,N=c.position-c.lineStart,v===1)if(p&&(Ct(c,N)||hi(c,N,P))||di(c,P))$=!0;else{let F=c.input.charCodeAt(c.position);C!==null&&T&&!p&&F!==124&&F!==62&&to(c,C,C.position-C.lineStart,P)||R&&pi(c,P)||fi(c,P)||rn(c,P)?$=!0:gi(c)?($=!0,(c.tag!==null||c.anchor!==null)&&D(c,"alias node should not have any properties")):ui(c,P,a===S)&&($=!0,c.tag===null&&(c.tag="?")),c.anchor!==null&&St(c,c.anchor,c.result)}else v===0&&($=p&&Ct(c,N));if(c.tag===null)c.anchor!==null&&St(c,c.anchor,c.result);else if(c.tag==="?"){c.result!==null&&c.kind!=="scalar"&&D(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(let F=0,U=c.implicitTypes.length;F<U;F+=1)if(O=c.implicitTypes[F],O.resolve(c.result)){c.result=O.construct(c.result),c.tag=O.tag,c.anchor!==null&&St(c,c.anchor,c.result);break}}else if(c.tag!=="!"){if(o.call(c.typeMap[c.kind||"fallback"],c.tag))O=c.typeMap[c.kind||"fallback"][c.tag];else{O=null;let F=c.typeMap.multi[c.kind||"fallback"];for(let U=0,Z=F.length;U<Z;U+=1)if(c.tag.slice(0,F[U].tag.length)===F[U].tag){O=F[U];break}}O||D(c,"unknown tag !<"+c.tag+">"),c.result!==null&&O.kind!==c.kind&&D(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+O.kind+'", not "'+c.kind+'"'),O.resolve(c.result,c.tag)?(c.result=O.construct(c.result,c.tag),c.anchor!==null&&St(c,c.anchor,c.result)):D(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return c.listener!==null&&c.listener("close",c),c.depth-=1,c.tag!==null||c.anchor!==null||$}function ro(c){let y=c.position,S=!1,k;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);(k=c.input.charCodeAt(c.position))!==0&&(me(c,!0,-1),k=c.input.charCodeAt(c.position),!(c.lineIndent>0||k!==37));){S=!0,k=c.input.charCodeAt(++c.position);let b=c.position;for(;k!==0&&!Q(k);)k=c.input.charCodeAt(++c.position);let R=c.input.slice(b,c.position),p=[];for(R.length<1&&D(c,"directive name must not be less than one character in length");k!==0;){for(;L(k);)k=c.input.charCodeAt(++c.position);if(k===35){do k=c.input.charCodeAt(++c.position);while(k!==0&&!j(k));break}if(j(k))break;for(b=c.position;k!==0&&!Q(k);)k=c.input.charCodeAt(++c.position);p.push(c.input.slice(b,c.position))}k!==0&&gr(c),o.call(li,R)?li[R](c,R,p):hr(c,'unknown document directive "'+R+'"')}if(me(c,!0,-1),c.lineIndent===0&&c.input.charCodeAt(c.position)===45&&c.input.charCodeAt(c.position+1)===45&&c.input.charCodeAt(c.position+2)===45?(c.position+=3,me(c,!0,-1)):S&&D(c,"directives end mark is expected"),kt(c,c.lineIndent-1,d,!1,!0),me(c,!0,-1),c.checkLineBreaks&&_.test(c.input.slice(y,c.position))&&hr(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&yr(c)){c.input.charCodeAt(c.position)===46&&(c.position+=3,me(c,!0,-1));return}c.position<c.length-1&&D(c,"end of the stream or a document separator is expected")}function yi(c,y){c=String(c),y=y||{},c.length!==0&&(c.charCodeAt(c.length-1)!==10&&c.charCodeAt(c.length-1)!==13&&(c+=`
481
+ `),c.charCodeAt(0)===65279&&(c=c.slice(1)));let S=new se(c,y),k=c.indexOf("\0");for(k!==-1&&(S.position=k,D(S,"null byte is not allowed in input")),S.input+="\0";S.input.charCodeAt(S.position)===32;)S.lineIndent+=1,S.position+=1;for(;S.position<S.length-1;)ro(S);return S.documents}function vi(c,y,S){y!==null&&typeof y=="object"&&typeof S>"u"&&(S=y,y=null);let k=yi(c,S);if(typeof y!="function")return k;for(let b=0,R=k.length;b<R;b+=1)y(k[b])}function no(c,y){let S=yi(c,y);if(S.length!==0){if(S.length===1)return S[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=vi,e.exports.load=no})),Sy=le(((t,e)=>{var r=cn(),n=ln(),i=xo(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,d=13,f=32,h=33,m=34,g=35,_=37,x=38,E=39,V=42,G=44,j=45,L=58,Q=61,ne=62,Mt=63,nt=64,_e=91,Ne=93,Ee=96,it=123,st=124,bt=125,se={};se[0]="\\0",se[7]="\\a",se[8]="\\b",se[9]="\\t",se[10]="\\n",se[11]="\\v",se[12]="\\f",se[13]="\\r",se[27]="\\e",se[34]='\\"',se[92]="\\\\",se[133]="\\N",se[160]="\\_",se[8232]="\\L",se[8233]="\\P";var ci=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function hr(p,v){if(v===null)return{};let A={},$=Object.keys(v);for(let C=0,O=$.length;C<O;C+=1){let P=$[C],N=String(v[P]);P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2));let T=p.compiledTypeMap.fallback[P];T&&o.call(T.styleAliases,N)&&(N=T.styleAliases[N]),A[P]=N}return A}function St(p){let v,A,$=p.toString(16).toUpperCase();if(p<=255)v="x",A=2;else if(p<=65535)v="u",A=4;else if(p<=4294967295)v="U",A=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+v+r.repeat("0",A-$.length)+$}var Qs=1,Wt=2;function Zs(p){this.schema=p.schema||i,this.indent=Math.max(1,p.indent||2),this.noArrayIndent=p.noArrayIndent||!1,this.skipInvalid=p.skipInvalid||!1,this.flowLevel=r.isNothing(p.flowLevel)?-1:p.flowLevel,this.styleMap=hr(this.schema,p.styles||null),this.sortKeys=p.sortKeys||!1,this.lineWidth=p.lineWidth||80,this.noRefs=p.noRefs||!1,this.noCompatMode=p.noCompatMode||!1,this.condenseFlow=p.condenseFlow||!1,this.quotingType=p.quotingType==='"'?Wt:Qs,this.forceQuotes=p.forceQuotes||!1,this.replacer=typeof p.replacer=="function"?p.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tn(p,v){let A=r.repeat(" ",v),$=0,C="",O=p.length;for(;$<O;){let P,N=p.indexOf(`
482
+ `,$);N===-1?(P=p.slice($),$=O):(P=p.slice($,N+1),$=N+1),P.length&&P!==`
483
+ `&&(C+=A),C+=P}return C}function mr(p,v){return`
484
+ `+r.repeat(" ",p.indent*v)}function li(p,v){for(let A=0,$=p.implicitTypes.length;A<$;A+=1)if(p.implicitTypes[A].resolve(v))return!0;return!1}function qe(p){return p===f||p===l}function Lt(p){return p>=32&&p<=126||p>=161&&p<=55295&&p!==8232&&p!==8233||p>=57344&&p<=65533&&p!==a||p>=65536&&p<=1114111}function Et(p){return Lt(p)&&p!==a&&p!==d&&p!==u}function gr(p,v,A){let $=Et(p),C=$&&!qe(p);return(A?$:$&&p!==G&&p!==_e&&p!==Ne&&p!==it&&p!==bt)&&p!==g&&!(v===L&&!C)||Et(v)&&!qe(v)&&p===g||v===L&&C}function me(p){return Lt(p)&&p!==a&&!qe(p)&&p!==j&&p!==Mt&&p!==L&&p!==G&&p!==_e&&p!==Ne&&p!==it&&p!==bt&&p!==g&&p!==x&&p!==V&&p!==h&&p!==st&&p!==Q&&p!==ne&&p!==E&&p!==m&&p!==_&&p!==nt&&p!==Ee}function yr(p){return!qe(p)&&p!==L}function $t(p,v){let A=p.charCodeAt(v),$;return A>=55296&&A<=56319&&v+1<p.length&&($=p.charCodeAt(v+1),$>=56320&&$<=57343)?(A-55296)*1024+$-56320+65536:A}function ui(p){return/^\n* /.test(p)}var fi=1,rn=2,di=3,pi=4,Ct=5;function hi(p,v,A,$,C,O,P,N){let T,F=0,U=null,Z=!1,pe=!1,ql=$!==-1,nn=-1,sn=me($t(p,0))&&yr($t(p,p.length-1));if(v||P)for(T=0;T<p.length;F>=65536?T+=2:T++){if(F=$t(p,T),!Lt(F))return Ct;sn=sn&&gr(F,U,N),U=F}else{for(T=0;T<p.length;F>=65536?T+=2:T++){if(F=$t(p,T),F===u)Z=!0,ql&&(pe=pe||T-nn-1>$&&p[nn+1]!==" ",nn=T);else if(!Lt(F))return Ct;sn=sn&&gr(F,U,N),U=F}pe=pe||ql&&T-nn-1>$&&p[nn+1]!==" "}return!Z&&!pe?sn&&!P&&!C(p)?fi:O===Wt?Ct:rn:A>9&&ui(p)?Ct:P?O===Wt?Ct:rn:pe?pi:di}function eo(p,v,A,$,C){p.dump=(function(){if(v.length===0)return p.quotingType===Wt?'""':"''";if(!p.noCompatMode&&(ci.indexOf(v)!==-1||D.test(v)))return p.quotingType===Wt?'"'+v+'"':"'"+v+"'";let O=p.indent*Math.max(1,A),P=p.lineWidth===-1?-1:Math.max(Math.min(p.lineWidth,40),p.lineWidth-O),N=$||p.flowLevel>-1&&A>=p.flowLevel;function T(F){return li(p,F)}switch(hi(v,N,p.indent,P,T,p.quotingType,p.forceQuotes&&!$,C)){case fi:return v;case rn:return"'"+v.replace(/'/g,"''")+"'";case di:return"|"+mi(v,p.indent)+gi(tn(v,O));case pi:return">"+mi(v,p.indent)+gi(tn(to(v,P),O));case Ct:return'"'+ro(v,P)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function mi(p,v){let A=ui(p)?String(v):"",$=p[p.length-1]===`
485
+ `;return A+($&&(p[p.length-2]===`
486
+ `||p===`
487
+ `)?"+":$?"":"-")+`
488
+ `}function gi(p){return p[p.length-1]===`
489
+ `?p.slice(0,-1):p}function to(p,v){let A=/(\n+)([^\n]*)/g,$=(function(){let N=p.indexOf(`
490
+ `);return N=N!==-1?N:p.length,A.lastIndex=N,kt(p.slice(0,N),v)})(),C=p[0]===`
491
+ `||p[0]===" ",O,P;for(;P=A.exec(p);){let N=P[1],T=P[2];O=T[0]===" ",$+=N+(!C&&!O&&T!==""?`
492
+ `:"")+kt(T,v),C=O}return $}function kt(p,v){if(p===""||p[0]===" ")return p;let A=/ [^ ]/g,$,C=0,O,P=0,N=0,T="";for(;$=A.exec(p);)N=$.index,N-C>v&&(O=P>C?P:N,T+=`
493
+ `+p.slice(C,O),C=O+1),P=N;return T+=`
494
+ `,p.length-C>v&&P>C?T+=p.slice(C,P)+`
495
+ `+p.slice(P+1):T+=p.slice(C),T.slice(1)}function ro(p){let v="",A=0;for(let $=0;$<p.length;A>=65536?$+=2:$++){A=$t(p,$);let C=se[A];!C&&Lt(A)?(v+=p[$],A>=65536&&(v+=p[$+1])):v+=C||St(A)}return v}function yi(p,v,A){let $="",C=p.tag;for(let O=0,P=A.length;O<P;O+=1){let N=A[O];p.replacer&&(N=p.replacer.call(A,String(O),N)),(S(p,v,N,!1,!1)||typeof N>"u"&&S(p,v,null,!1,!1))&&($!==""&&($+=","+(p.condenseFlow?"":" ")),$+=p.dump)}p.tag=C,p.dump="["+$+"]"}function vi(p,v,A,$){let C="",O=p.tag;for(let P=0,N=A.length;P<N;P+=1){let T=A[P];p.replacer&&(T=p.replacer.call(A,String(P),T)),(S(p,v+1,T,!0,!0,!1,!0)||typeof T>"u"&&S(p,v+1,null,!0,!0,!1,!0))&&((!$||C!=="")&&(C+=mr(p,v)),p.dump&&u===p.dump.charCodeAt(0)?C+="-":C+="- ",C+=p.dump)}p.tag=O,p.dump=C||"[]"}function no(p,v,A){let $="",C=p.tag,O=Object.keys(A);for(let P=0,N=O.length;P<N;P+=1){let T="";$!==""&&(T+=", "),p.condenseFlow&&(T+='"');let F=O[P],U=A[F];p.replacer&&(U=p.replacer.call(A,F,U)),S(p,v,F,!1,!1)&&(p.dump.length>1024&&(T+="? "),T+=p.dump+(p.condenseFlow?'"':"")+":"+(p.condenseFlow?"":" "),S(p,v,U,!1,!1)&&(T+=p.dump,$+=T))}p.tag=C,p.dump="{"+$+"}"}function c(p,v,A,$){let C="",O=p.tag,P=Object.keys(A);if(p.sortKeys===!0)P.sort();else if(typeof p.sortKeys=="function")P.sort(p.sortKeys);else if(p.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let N=0,T=P.length;N<T;N+=1){let F="";(!$||C!=="")&&(F+=mr(p,v));let U=P[N],Z=A[U];if(p.replacer&&(Z=p.replacer.call(A,U,Z)),!S(p,v+1,U,!0,!0,!0))continue;let pe=p.tag!==null&&p.tag!=="?"||p.dump&&p.dump.length>1024;pe&&(p.dump&&u===p.dump.charCodeAt(0)?F+="?":F+="? "),F+=p.dump,pe&&(F+=mr(p,v)),S(p,v+1,Z,!0,pe)&&(p.dump&&u===p.dump.charCodeAt(0)?F+=":":F+=": ",F+=p.dump,C+=F)}p.tag=O,p.dump=C||"{}"}function y(p,v,A){let $=A?p.explicitTypes:p.implicitTypes;for(let C=0,O=$.length;C<O;C+=1){let P=$[C];if((P.instanceOf||P.predicate)&&(!P.instanceOf||typeof v=="object"&&v instanceof P.instanceOf)&&(!P.predicate||P.predicate(v))){if(A?P.multi&&P.representName?p.tag=P.representName(v):p.tag=P.tag:p.tag="?",P.represent){let N=p.styleMap[P.tag]||P.defaultStyle,T;if(s.call(P.represent)==="[object Function]")T=P.represent(v,N);else if(o.call(P.represent,N))T=P.represent[N](v,N);else throw new n("!<"+P.tag+'> tag resolver accepts not "'+N+'" style');p.dump=T}return!0}}return!1}function S(p,v,A,$,C,O,P){p.tag=null,p.dump=A,y(p,A,!1)||y(p,A,!0);let N=s.call(p.dump),T=$;$&&($=p.flowLevel<0||p.flowLevel>v);let F=N==="[object Object]"||N==="[object Array]",U,Z;if(F&&(U=p.duplicates.indexOf(A),Z=U!==-1),(p.tag!==null&&p.tag!=="?"||Z||p.indent!==2&&v>0)&&(C=!1),Z&&p.usedDuplicates[U])p.dump="*ref_"+U;else{if(F&&Z&&!p.usedDuplicates[U]&&(p.usedDuplicates[U]=!0),N==="[object Object]")$&&Object.keys(p.dump).length!==0?(c(p,v,p.dump,C),Z&&(p.dump="&ref_"+U+p.dump)):(no(p,v,p.dump),Z&&(p.dump="&ref_"+U+" "+p.dump));else if(N==="[object Array]")$&&p.dump.length!==0?(p.noArrayIndent&&!P&&v>0?vi(p,v-1,p.dump,C):vi(p,v,p.dump,C),Z&&(p.dump="&ref_"+U+p.dump)):(yi(p,v,p.dump),Z&&(p.dump="&ref_"+U+" "+p.dump));else if(N==="[object String]")p.tag!=="?"&&eo(p,p.dump,v,O,T);else{if(N==="[object Undefined]")return!1;if(p.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+N)}if(p.tag!==null&&p.tag!=="?"){let pe=encodeURI(p.tag[0]==="!"?p.tag.slice(1):p.tag).replace(/!/g,"%21");p.tag[0]==="!"?pe="!"+pe:pe.slice(0,18)==="tag:yaml.org,2002:"?pe="!!"+pe.slice(18):pe="!<"+pe+">",p.dump=pe+" "+p.dump}}return!0}function k(p,v){let A=[],$=[];b(p,A,$);let C=$.length;for(let O=0;O<C;O+=1)v.duplicates.push(A[$[O]]);v.usedDuplicates=new Array(C)}function b(p,v,A){if(p!==null&&typeof p=="object"){let $=v.indexOf(p);if($!==-1)A.indexOf($)===-1&&A.push($);else if(v.push(p),Array.isArray(p))for(let C=0,O=p.length;C<O;C+=1)b(p[C],v,A);else{let C=Object.keys(p);for(let O=0,P=C.length;O<P;O+=1)b(p[C[O]],v,A)}}}function R(p,v){v=v||{};let A=new Zs(v);A.noRefs||k(p,A);let $=p;return A.replacer&&($=A.replacer.call({"":$},"",$)),S(A,0,$,!0,!0)?A.dump+`
496
+ `:""}e.exports.dump=R})),Iu=_y(le(((t,e)=>{var r=by(),n=Sy();function i(s,o){return function(){throw new Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}e.exports.Type=Oe(),e.exports.Schema=mu(),e.exports.FAILSAFE_SCHEMA=_u(),e.exports.JSON_SCHEMA=$u(),e.exports.CORE_SCHEMA=Cu(),e.exports.DEFAULT_SCHEMA=xo(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=ln(),e.exports.types={binary:Pu(),float:Eu(),map:vu(),null:wu(),pairs:Au(),set:Ru(),timestamp:ku(),bool:bu(),int:Su(),merge:xu(),omap:Ou(),seq:yu(),str:gu()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:bk,Schema:Sk,FAILSAFE_SCHEMA:Ek,JSON_SCHEMA:$k,CORE_SCHEMA:Ck,DEFAULT_SCHEMA:kk,load:xk,loadAll:Pk,dump:Ok,YAMLException:Ak,types:Rk,safeLoad:Ik,safeLoadAll:Tk,safeDump:Nk}=Iu.default,Pt=Iu.default;async function Cy(t=process.cwd()){let e=he(t);for(;;){let r=he(e,"view-contracts.config.yaml");try{return await Ey(r),r}catch{let n=$i(e);if(n===e)return null;e=n}}}async function Kt(t){if(t)return he(t);let e=await Cy();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Jt(t){let e=he(t),r=await Tu(e,"utf-8"),n=Pt.load(r);return ky(e,n)}function ky(t,e){let r=$e(t);return{...e,openapi:he(r,e.openapi),bindings:he(r,e.bindings),microContractsConfig:he(r,e.microContractsConfig),viewsDir:he(r,e.viewsDir),generated:{contractDir:he(r,e.generated.contractDir),actions:he(r,e.generated.actions),bridge:he(r,e.generated.bridge),reactDir:he(r,e.generated.reactDir)},componentsModule:e.componentsModule?he(r,e.componentsModule):void 0,themeModule:e.themeModule?he(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?he(r,e.design.tokens):void 0,theme:e.design.theme?he(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?he(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?he(r,e.extensions):void 0}}async function un(t){let e=await Tu(he(t),"utf-8");return Pt.load(e)}function Nu(t,e){return he(t.generated.reactDir,`${e.screenName}.generated.tsx`)}function $e(t){return $i(he(t))}function wr(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}function Mu(t,e,r){let n=he($i(r),"../components/index.ts"),i=$y($i(he(r)),n);return i.startsWith(".")||(i=`./${i}`),i.replace(/\.tsx?$/,".js")}import{relative as xy}from"node:path";function Lu(t,e){return xy(t,e).split("\\").join("/")}var qp=io(Dp(),1);import{readFile as Vp}from"node:fs/promises";import{resolve as Fp}from"node:path";import{readFileSync as fb}from"node:fs";import{createRequire as db}from"node:module";import{dirname as Pc,resolve as pb}from"node:path";import{fileURLToPath as hb}from"node:url";var jr;function Xe(){if(jr)return jr;let t=db(import.meta.url);try{return jr=Pc(t.resolve("view-contracts/package.json")),jr}catch{let e=Pc(hb(import.meta.url));for(;;){try{let n=pb(e,"package.json");if(JSON.parse(fb(n,"utf8")).name==="view-contracts")return jr=e,jr}catch{}let r=Pc(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var mb=qp.default,gb=Fp(Xe(),"spec/ui-dsl-extensions.meta.json"),is;async function yb(){if(is)return is;let t=JSON.parse(await Vp(gb,"utf-8"));return is=new mb({allErrors:!0,strict:!1}).compile(t),is}async function Hp(t){if(!t)return{extensions:{}};let e=Fp(t),r=await Vp(e,"utf-8"),n=Pt.load(r),i=await yb();if(!i(n)){let s=i.errors?.map(o=>`${o.instancePath||"/"} ${o.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${s}`)}return n}import{resolve as _b}from"node:path";import{readFile as vb}from"node:fs/promises";async function Bp(t){return Pt.load(await vb(t,"utf-8"))}function Up(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Gp(t,e,r){for(let[n,i]of Object.entries(t))for(let s of e)if(i[s]===void 0||i[s]===null||i[s]==="")throw new Error(`${r}: element "${n}" is missing required "${String(s)}"`)}var MP=Xe();var zp="renderers/react/elements.yaml",Oc=null;function wb(t){Up(Object.keys(t.elements),vr,zp),Gp(t.elements,["tag"],zp)}async function Wp(t){if(!t&&Oc)return Oc;let e=t??_b(Xe(),"renderers/react/elements.yaml"),r=await Bp(e);return wb(r),t||(Oc=r),r}var Kp=new Set(["align","aspectRatio","axis","contentAlign","direction","fontWeight","gap","headingLevel","height","justify","lineLimit","maxHeight","maxWidth","minHeight","minWidth","padding","scroll","selfAlign","textAlign","textOverflow","textStyle","weight","width","size"]);function B(t){return" ".repeat(t)}function Bn(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function ss(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,s])=>`${i}: ${Vr(s,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Rc(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
497
+ ${t.map(n=>`${B(e+1)}${Rc(n,e+1,r)}`).join(`,
580
498
  `)}
581
- ${F(e)}]`;if(typeof n=="object"&&n!==null){let r=n;return"kind"in r&&r.kind==="action"?_n(r,t):`{
582
- ${Object.entries(r).map(([o,a])=>`${o}: ${Gr(a,e+1,t)}`).map(o=>`${F(e+1)}${o}`).join(`,
499
+ ${B(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?ss(n,r):`{
500
+ ${Object.entries(n).map(([s,o])=>`${s}: ${Rc(o,e+1,r)}`).map(s=>`${B(e+1)}${s}`).join(`,
583
501
  `)}
584
- ${F(e)}}`}return"undefined"}function ft(n,e,t=!1){if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[
585
- ${n.map(r=>`${F(e+1)}${ft(r,e+1,t)}`).join(`,
502
+ ${B(e)}}`}return"undefined"}function Vr(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
503
+ ${t.map(n=>`${B(e+1)}${Vr(n,e+1,r)}`).join(`,
586
504
  `)}
587
- ${F(e)}]`;if(typeof n=="object"&&n!==null&&"kind"in n){if(n.kind==="binding")return Mt(n);if(n.kind==="action")return _n(n,t);if(n.kind==="literal")return Gr(n.value,e,t)}return"undefined"}function Ue(n,e){let t=n[e];if(t!=null){if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="object"&&"kind"in t&&t.kind==="literal")return t.value}}function q(n,e){let t=n[e];if(t!=null)return ft(t,0)}function as(n){let e=Object.entries(n).filter(([r])=>rs.has(r));return e.length===0?"{}":`{ ${e.map(([r,i])=>`${r}: ${ft(i,0)}`).join(", ")} }`}function Dc(n,e){if(!n.flex)return"";let t=["display: 'flex'",`flexDirection: '${n.flex==="column"?"column":"row"}'`];return e.align&&t.push(`alignItems: mapAlign(${q(e,"align")})`),e.justify&&t.push(`justifyContent: mapJustify(${q(e,"justify")})`),`, ${t.join(", ")}`}function Wr(n,e){let t=as(e),r=Dc(n,e);if(n.flexGrowProp&&e[n.flexGrowProp]){let i=q(e,n.flexGrowProp);return`style={{ ...commonStyle(${t})${r}, flexGrow: ${i} ?? 1 }}`}return r?`style={{ ...commonStyle(${t})${r} }}`:`style={commonStyle(${t})}`}function Vc(n,e){let t=n.action??n[e==="onClick"?"onClick":"onSubmit"];if(!t||typeof t!="object"||!("kind"in t)||t.kind!=="action")return;let r=_n(t,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function is(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function os(n,e){let t=Ue(e,"variant");if(typeof t=="string")return` vc-${is(n)}--${t}`;let r=q(e,"variant");if(r)return` vc-${is(n)}--\${${r}}`}function Ur(n,e,t,r){let i=e.className??"";if(e.tag==="dynamic-heading"&&r!==void 0){let a=`${i} vc-heading-${r}`,l=os(n,t);return l?typeof Ue(t,"variant")=="string"?`className="${a}${l}"`:`className={\`${a}${l}\`}`:`className="${a}"`}let o=os(n,t);if(o)return typeof Ue(t,"variant")=="string"?`className="${i}${o}"`:`className={\`${i}${o}\`}`;if(e.wrapProp&&Ue(t,e.wrapProp)===!0)return`className="${i} vc-wrap"`;if(e.sizeClass&&t.size){let a=q(t,"size");return`className={\`${e.className} ${e.sizeClass}-\${${a} ?? 'md'}\`}`}return`className="${i}"`}function Fc(n,e,t){let r=Ue(e,"label"),i=Ue(e,"help"),o=Ue(e,"error"),a=q(e,"label"),l=q(e,"help"),p=q(e,"error"),c=[`${F(t)}<label className="vc-field">`];return typeof r=="string"?c.push(`${F(t+1)}<span className="vc-field-label">{${JSON.stringify(r)}}</span>`):a&&c.push(`${F(t+1)}{${a} ? <span className="vc-field-label">{${a}}</span> : null}`),c.push(`${F(t+1)}${n}`),typeof i=="string"?c.push(`${F(t+1)}<span className="vc-field-help">{${JSON.stringify(i)}}</span>`):l&&c.push(`${F(t+1)}{${l} ? <span className="vc-field-help">{${l}}</span> : null}`),typeof o=="string"?c.push(`${F(t+1)}<span className="vc-field-error">{${JSON.stringify(o)}}</span>`):p&&c.push(`${F(t+1)}{${p} ? <span className="vc-field-error">{${p}}</span> : null}`),c.push(`${F(t)}</label>`),c.join(`
588
- `)}function Bc(n,e){let t=q(n,"name")??'""',r=q(n,"label")??'""',i=n.checked?`defaultChecked={${q(n,"checked")}}`:"",o=n.enabled?`disabled={${q(n,"enabled")} === false}`:"";return`${F(e)}<label className="vc-checkbox">
589
- ${F(e+1)}<input type="checkbox" name={${t}} ${i} ${o} />
590
- ${F(e+1)}<span>{${r}}</span>
591
- ${F(e)}</label>`}function ss(n,e){let t=n.options;if(!t||typeof t!="object"||!("kind"in t))return"";if(t.kind==="literal"&&Array.isArray(t.value))return t.value.map(o=>`${F(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
592
- `);let r=ft(t,0);return`${F(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function $c(n,e,t,r){let i=[Ur(n,e,t),Wr(e,t)];return t.name&&i.push(`name={${q(t,"name")}}`),t.placeholder&&i.push(`placeholder={${q(t,"placeholder")}}`),e.inputType&&i.push(`type={${q(t,"type")??JSON.stringify(e.inputType)}}`),t.required&&i.push(`required={${q(t,"required")}}`),t.readonly&&i.push(`readOnly={${q(t,"readonly")}}`),t.enabled&&i.push(`disabled={${q(t,"enabled")} === false}`),t.rows&&i.push(`rows={${q(t,"rows")??"4"}`),`${F(r)}<${e.tag} ${i.join(" ")} />`}function vn(n,e,t,r,i){let o=[];if(e.ariaHidden&&o.push("aria-hidden"),t.id&&o.push(`id={${q(t,"id")}}`),t.role?o.push(`role={${q(t,"role")}}`):e.defaultRole&&o.push(`role="${e.defaultRole}"`),e.ariaLabel&&(t.ariaLabel?o.push(`aria-label={${q(t,"ariaLabel")}}`):t.label?o.push(`aria-label={${q(t,"label")}}`):t.title&&o.push(`aria-label={${q(t,"title")}}`)),e.actionEvent){let a=Vc(t,e.actionEvent);a&&o.push(a)}return e.tag==="button"&&t.enabled&&o.push(`disabled={${q(t,"enabled")} === false}`),e.tag==="a"&&t.href&&o.push(`href={${q(t,"href")}}`),e.tag==="button"&&o.push(`type={${q(t,"type")??'"button"'}}`),o.push(Ur(n,e,t,i)),o.push(Wr(e,t)),`<${r} ${o.join(" ")}`}function pt(n,e,t){if(e.visible===void 0)return n;let r=q(e,"visible");return`${F(t)}{${r} !== false ? (
593
- ${n}
594
- ${F(t)}) : null}`}function Jr(n,e,t,r){if(n.length===0)return"";let i=r??"vm";return n.map(a=>{if(a.kind==="text"){let l=a.value;return l?`${F(e)}{${JSON.stringify(l)}}`:""}return a.kind==="binding"?`${F(e)}{${Mt(a,i)}}`:a.kind==="map"?Hc(a,e,t):a.kind==="fragment"?Jr(a.children,e,t,r):a.kind==="component"?t(a,e,r):""}).filter(Boolean).join(`
595
- `)}function Hc(n,e,t){let r=n.item,i=t(n.body,e+1,r);if(n.key){let o=` key={${Mt(n.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${F(e)}{${Mt(n.source)}.map((${r}) => (
505
+ ${B(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Bn(t);if(t.kind==="action")return ss(t,r);if(t.kind==="literal")return Rc(t.value,e,r)}return"undefined"}function yt(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function H(t,e){let r=t[e];if(r!=null)return Vr(r,0)}function eh(t){let e=Object.entries(t).filter(([n])=>Kp.has(n));return e.length===0?"{}":`{ ${e.map(([n,i])=>`${n}: ${Vr(i,0)}`).join(", ")} }`}function bb(t,e){if(!t.flex)return"";let r=["display: 'flex'",`flexDirection: '${t.flex==="column"?"column":"row"}'`];return e.align&&r.push(`alignItems: mapAlign(${H(e,"align")})`),e.justify&&r.push(`justifyContent: mapJustify(${H(e,"justify")})`),`, ${r.join(", ")}`}function Sb(t){return t==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:t==="both"?{overflowX:"auto",overflowY:"auto"}:t==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Dr(t,e){let r=eh(e),n=bb(t,e);if(t.scrollContainer){let i=yt(e,"scroll"),s=yt(e,"axis"),o=typeof i=="string"?i:typeof s=="string"?s==="horizontal"?"horizontal":"vertical":void 0;if(o){let{overflowX:d,overflowY:f}=Sb(o);return`style={{ ...commonStyle(${r})${n}, overflowX: '${d}', overflowY: '${f}' }}`}let a=H(e,"scroll"),l=H(e,"axis"),u=a??(l?`(${l} === 'horizontal' ? 'horizontal' : 'vertical')`:"'vertical'");return`style={{ ...commonStyle(${r})${n}, ...(() => {
506
+ const __scroll = ${u};
507
+ if (__scroll === 'horizontal') return { overflowX: 'auto', overflowY: 'hidden' };
508
+ if (__scroll === 'both') return { overflowX: 'auto', overflowY: 'auto' };
509
+ if (__scroll === 'none') return { overflowX: 'hidden', overflowY: 'hidden' };
510
+ return { overflowX: 'hidden', overflowY: 'auto' };
511
+ })() }}`}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=H(e,t.flexGrowProp);return`style={{ ...commonStyle(${r})${n}, flexGrow: ${i} ?? 1 }}`}return n?`style={{ ...commonStyle(${r})${n} }}`:`style={commonStyle(${r})}`}function Eb(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=ss(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Jp(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Yp(t,e){let r=yt(e,"variant");if(typeof r=="string")return` vc-${Jp(t)}--${r}`;let n=H(e,"variant");if(n)return` vc-${Jp(t)}--\${${n}}`}function qr(t,e,r,n){let i=e.className??"";if(e.tag==="dynamic-heading"&&n!==void 0){let o=`${i} vc-heading-${n}`,a=Yp(t,r);return a?typeof yt(r,"variant")=="string"?`className="${o}${a}"`:`className={\`${o}${a}\`}`:`className="${o}"`}let s=Yp(t,r);if(s)return typeof yt(r,"variant")=="string"?`className="${i}${s}"`:`className={\`${i}${s}\`}`;if(e.wrapProp&&yt(r,e.wrapProp)===!0)return`className="${i} vc-wrap"`;if(e.sizeClass&&r.size){let o=H(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${i}"`}function Xp(t,e,r){let n=yt(e,"label"),i=yt(e,"help"),s=yt(e,"error"),o=H(e,"label"),a=H(e,"help"),l=H(e,"error"),u=[`${B(r)}<label className="vc-field">`];return typeof n=="string"?u.push(`${B(r+1)}<span className="vc-field-label">{${JSON.stringify(n)}}</span>`):o&&u.push(`${B(r+1)}{${o} ? <span className="vc-field-label">{${o}}</span> : null}`),u.push(`${B(r+1)}${t}`),typeof i=="string"?u.push(`${B(r+1)}<span className="vc-field-help">{${JSON.stringify(i)}}</span>`):a&&u.push(`${B(r+1)}{${a} ? <span className="vc-field-help">{${a}}</span> : null}`),typeof s=="string"?u.push(`${B(r+1)}<span className="vc-field-error">{${JSON.stringify(s)}}</span>`):l&&u.push(`${B(r+1)}{${l} ? <span className="vc-field-error">{${l}}</span> : null}`),u.push(`${B(r)}</label>`),u.join(`
512
+ `)}function $b(t,e){let r=H(t,"name")??'""',n=H(t,"label")??'""',i=t.checked?`defaultChecked={${H(t,"checked")}}`:"",s=t.enabled?`disabled={${H(t,"enabled")} === false}`:"";return`${B(e)}<label className="vc-checkbox">
513
+ ${B(e+1)}<input type="checkbox" name={${r}} ${i} ${s} />
514
+ ${B(e+1)}<span>{${n}}</span>
515
+ ${B(e)}</label>`}function Cb(t,e){let r=H(t,"binding")??H(t,"name")??'""',n=H(t,"value")??'""',i=H(t,"label")??'""',s=t.checked?`defaultChecked={${H(t,"checked")}}`:"",o=t.enabled?`disabled={${H(t,"enabled")} === false}`:"";return`${B(e)}<label className="vc-radio">
516
+ ${B(e+1)}<input type="radio" name={${r}} value={${n}} ${s} ${o} />
517
+ ${B(e+1)}<span>{${i}}</span>
518
+ ${B(e)}</label>`}function kb(t,e){let r=H(t,"binding")??H(t,"name")??'""',n=H(t,"label")??'""',i=t.checked?`defaultChecked={${H(t,"checked")}}`:"",s=t.enabled?`disabled={${H(t,"enabled")} === false}`:"";return`${B(e)}<label className="vc-switch">
519
+ ${B(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${s} />
520
+ ${B(e+1)}<span>{${n}}</span>
521
+ ${B(e)}</label>`}function xb(t,e,r){let n=t.props;if(n.alt!==void 0){let o=[qr(t.name,e,n),Dr(e,n),`src={${H(n,"name")??'""'}}`,`alt={${H(n,"alt")??'""'}}`];return n.id&&o.push(`id={${H(n,"id")}}`),`${B(r)}<img ${o.join(" ")} />`}let s=[qr(t.name,e,n),Dr(e,n),"aria-hidden"];return n.id&&s.push(`id={${H(n,"id")}}`),n.name&&s.push(`data-icon={${H(n,"name")}}`),`${B(r)}<span ${s.join(" ")} />`}function Qp(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(s=>`${B(e+1)}<option key={${JSON.stringify(s.value)}} value={${JSON.stringify(s.value)}}>{${JSON.stringify(s.label)}}</option>`).join(`
522
+ `);let n=Vr(r,0);return`${B(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Zp(t,e,r,n){let i=[qr(t,e,r),Dr(e,r)];return e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${H(r,"id")}}`),r.role?i.push(`role={${H(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${H(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${H(r,"label")}}`):r.title&&i.push(`aria-label={${H(r,"title")}}`)),r.name&&i.push(`name={${H(r,"name")}}`),r.placeholder&&i.push(`placeholder={${H(r,"placeholder")}}`),e.inputType&&i.push(`type={${H(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${H(r,"required")}}`),r.readonly&&i.push(`readOnly={${H(r,"readonly")}}`),r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${H(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${H(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${H(r,"value")}}`),r.rows&&i.push(`rows={${H(r,"rows")??"4"}}`),`${B(n)}<${e.tag} ${i.join(" ")} />`}function Ac(t,e,r,n,i){let s=[];if(e.ariaHidden&&s.push("aria-hidden"),r.id&&s.push(`id={${H(r,"id")}}`),r.role?s.push(`role={${H(r,"role")}}`):e.defaultRole&&s.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?s.push(`aria-label={${H(r,"ariaLabel")}}`):r.label?s.push(`aria-label={${H(r,"label")}}`):r.title&&s.push(`aria-label={${H(r,"title")}}`)),e.actionEvent){let o=Eb(r,e.actionEvent);o&&s.push(o)}return e.tag==="button"&&r.enabled&&s.push(`disabled={${H(r,"enabled")} === false}`),e.tag==="a"&&r.href&&s.push(`href={${H(r,"href")}}`),e.tag==="button"&&s.push(`type={${H(r,"type")??'"button"'}}`),s.push(qr(t,e,r,i)),s.push(Dr(e,r)),`<${n} ${s.join(" ")}`}function ft(t,e,r){if(e.visible===void 0)return t;let n=H(e,"visible");return`${B(r)}{${n} !== false ? (
523
+ ${t}
524
+ ${B(r)}) : null}`}function Ic(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(o=>{if(o.kind==="text"){let a=o.value;return a?`${B(e)}{${JSON.stringify(a)}}`:""}return o.kind==="binding"?`${B(e)}{${Bn(o,i)}}`:o.kind==="map"?Pb(o,e,r):o.kind==="fragment"?Ic(o.children,e,r,n):o.kind==="component"?r(o,e,n):""}).filter(Boolean).join(`
525
+ `)}function Pb(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let s=` key={${Bn(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${s}`)}return`${B(e)}{${Bn(t.source)}.map((${n}) => (
596
526
  ${i}
597
- ${F(e)}))}`}function jc(n,e,t,r,i){let o=n.props,a=Jr(n.children,t+1,i,r);if(e.checkbox)return pt(Bc(o,t),o,t);if(e.fieldWrap){let h=e.tag,u;if(e.optionsProp&&o[e.optionsProp]){let d=vn(n.name,e,o,h);u=`${F(t+1)}${d}>
598
- ${ss(o,t+2)}
599
- ${F(t+1)}</${h}>`}else u=$c(n.name,e,o,t+1);return pt(Fc(u,o,t),o,t)}if(e.tag==="dynamic-heading"){let h=Ue(o,"level");if(typeof h=="number"){let v=Math.min(6,Math.max(1,h)),C=`h${v}`,L=vn(n.name,e,o,C,v),K=a?`${F(t)}${L}>
600
- ${a}
601
- ${F(t)}</${C}>`:`${F(t)}${L} />`;return pt(K,o,t)}let u=q(o,"level")??"2",d=a?`${F(t+1)}{(() => { const __level = Math.min(6, Math.max(1, ${u} ?? 2)); const Tag = ('h' + __level) as keyof JSX.IntrinsicElements; return <Tag className={\`vc-heading vc-heading-\${__level}\`} style={commonStyle(${as(o)})}>{/* children below */}</Tag>; })()}`:"";return pt(d||`${F(t)}<h2 ${Ur(n.name,e,o,2)} ${Wr(e,o)} />`,o,t)}let l=e.tag;if(e.void)return pt(`${F(t)}${vn(n.name,e,o,l)} />`,o,t);let p=vn(n.name,e,o,l),c;return!a&&e.optionsProp&&o[e.optionsProp]?c=`${F(t)}${p}>
602
- ${ss(o,t+1)}
603
- ${F(t)}</${l}>`:a?c=`${F(t)}${p}>
604
- ${a}
605
- ${F(t)}</${l}>`:c=`${F(t)}${p} />`,pt(c,o,t)}function qc(n,e){let t=e??"vm";return Object.entries(n).map(([r,i])=>r==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${r}={${_n(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Mt(i,t)}}`:r==="children"?"":`${r}={${ft(i,0,r==="columns")}}`).join(" ")}function Gc(n,e,t,r){let i=qc(n.props,t),o=i?` ${i}`:"",a=Jr(n.children,e+1,r,t);return a?`${F(e)}<${n.name}${o}>
606
- ${a}
607
- ${F(e)}</${n.name}>`:`${F(e)}<${n.name}${o} />`}function ls(n,e,t){return n in e.elements&&!t.includes(n)}function Nt(n,e,t,r){if(n.kind==="component"){ls(n.name,e,t)||r.add(n.name);for(let i of n.children)Nt(i,e,t,r);return}if(n.kind==="map"&&Nt(n.body,e,t,r),n.kind==="fragment")for(let i of n.children)Nt(i,e,t,r)}function cs(n,e){let t=(r,i,o)=>ls(r.name,n,e)?jc(r,n.elements[r.name],i,o,t):Gc(r,i,o,t);return t}async function Wc(n,e){let t=await ns(e.elementMapPath),r=e.allowlistExtra??[],i=n.exportName.replace(/View$/,"")||n.exportName,o=i.charAt(0).toUpperCase()+i.slice(1),a=n.root.kind==="component"?n.root:null;if(!a)throw new Error(`View IR root must be a component node (${n.source})`);let p=cs(t,r)(a,2),c=new Set;Nt(n.root,t,r,c);let h=[...c].sort(),u=["import type { ReactElement } from 'react';","import { dispatchAction } from '../runtime/dispatch.js';","import { commonStyle, mapAlign, mapJustify } from '../components/style-helpers.js';",`import type { ${n.viewModel}, ActionDescriptor } from '../contracts';`];return h.length>0&&u.push(`import { ${h.join(", ")} } from '${e.componentsImportFrom}';`),`/**
608
- * Auto-generated React component from ${n.source}
527
+ ${B(e)}))}`}function Ob(t,e,r,n,i){let s=t.props,o=Ic(t.children,r+1,i,n);if(e.checkbox)return ft($b(s,r),s,r);if(t.name==="Radio")return ft(Cb(s,r),s,r);if(t.name==="Switch")return ft(kb(s,r),s,r);if(t.name==="Icon")return ft(xb(t,e,r),s,r);if(t.name==="Spinner"){let d=[qr(t.name,e,s),Dr(e,s),'aria-busy="true"'];return s.id&&d.push(`id={${H(s,"id")}}`),s.role?d.push(`role={${H(s,"role")}}`):e.defaultRole&&d.push(`role="${e.defaultRole}"`),ft(`${B(r)}<div ${d.join(" ")} />`,s,r)}if(e.fieldContainer){let d=o||`${B(r+1)}<div />`;return ft(Xp(d,s,r),s,r)}if(e.fieldWrap){let d=e.tag,f;if(e.optionsProp&&s[e.optionsProp]){let h=Ac(t.name,e,s,d);f=`${B(r+1)}${h}>
528
+ ${Qp(s,r+2)}
529
+ ${B(r+1)}</${d}>`}else f=Zp(t.name,e,s,r+1);return ft(Xp(f,s,r),s,r)}if(e.tag==="dynamic-heading"){let d=yt(s,"level");if(typeof d=="number"){let m=Math.min(6,Math.max(1,d)),g=`h${m}`,_=Ac(t.name,e,s,g,m),x=o?`${B(r)}${_}>
530
+ ${o}
531
+ ${B(r)}</${g}>`:`${B(r)}${_} />`;return ft(x,s,r)}let f=H(s,"level")??"2",h=o?`${B(r+1)}{(() => { const __level = Math.min(6, Math.max(1, ${f} ?? 2)); const Tag = ('h' + __level) as keyof JSX.IntrinsicElements; return <Tag className={\`vc-heading vc-heading-\${__level}\`} style={commonStyle(${eh(s)})}>{/* children below */}</Tag>; })()}`:"";return ft(h||`${B(r)}<h2 ${qr(t.name,e,s,2)} ${Dr(e,s)} />`,s,r)}let a=e.tag;if(e.void)return ft(Zp(t.name,e,s,r),s,r);let l=Ac(t.name,e,s,a),u;return!o&&e.optionsProp&&s[e.optionsProp]?u=`${B(r)}${l}>
532
+ ${Qp(s,r+1)}
533
+ ${B(r)}</${a}>`:o?u=`${B(r)}${l}>
534
+ ${o}
535
+ ${B(r)}</${a}>`:u=`${B(r)}${l} />`,ft(u,s,r)}function Ab(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${ss(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Bn(i,r)}}`:n==="children"?"":`${n}={${Vr(i,0,n==="columns")}}`).join(" ")}function Rb(t,e,r,n){let i=Ab(t.props,r),s=i?` ${i}`:"",o=Ic(t.children,e+1,n,r);return o?`${B(e)}<${t.name}${s}>
536
+ ${o}
537
+ ${B(e)}</${t.name}>`:`${B(e)}<${t.name}${s} />`}function th(t,e,r){return t in e.elements&&!r.includes(t)}function Hn(t,e,r,n){if(t.kind==="component"){th(t.name,e,r)||n.add(t.name);for(let i of t.children)Hn(i,e,r,n);return}if(t.kind==="map"&&Hn(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Hn(i,e,r,n)}function rh(t,e){let r=(n,i,s)=>th(n.name,t,e)?Ob(n,t.elements[n.name],i,s,r):Rb(n,i,s,r);return r}async function Ib(t,e){let r=await Wp(e.elementMapPath),n=e.allowlistExtra??[],i=t.exportName.replace(/View$/,"")||t.exportName,s=i.charAt(0).toUpperCase()+i.slice(1),o=t.root.kind==="component"?t.root:null;if(!o)throw new Error(`View IR root must be a component node (${t.source})`);let l=rh(r,n)(o,2),u=new Set;Hn(t.root,r,n,u);let d=[...u].sort(),f=e.previewImports,h=f?.dispatch??"../runtime/dispatch.js",m=f?.styleHelpers??"../components/style-helpers.js",g=f?.contracts??"../contracts",_=f?.extensions??e.componentsImportFrom,x=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${h}';`,`import { commonStyle, mapAlign, mapJustify } from '${m}';`,`import type { ${t.viewModel}, ActionDescriptor } from '${g}';`];return d.length>0&&x.push(`import { ${d.join(", ")} } from '${_}';`),`${f?`/**
538
+ * Preview module \u2014 compiled live from ${t.source}
539
+ * Same lowering as generated/; not written to disk.
540
+ */`:`/**
541
+ * Auto-generated React component from ${t.source}
609
542
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
610
- */
611
- ${u.join(`
543
+ */`}
544
+ ${x.join(`
612
545
  `)}
613
546
 
614
- export function ${o}({ vm }: { vm: ${n.viewModel} }): ReactElement {
547
+ export function ${s}({ vm }: { vm: ${t.viewModel} }): ReactElement {
615
548
  return (
616
- ${p}
549
+ ${l}
617
550
  );
618
551
  }
619
- `}async function us(n,e,t){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),a=await Wc(n,t);await i(o(e),{recursive:!0}),await r(e,a,"utf-8")}import{readFile as St,writeFile as xe,mkdir as Ki,stat as ph,cp as fh,unlink as hh}from"node:fs/promises";import{resolve as W}from"node:path";import{readFile as ps}from"node:fs/promises";import{createRequire as Uc}from"node:module";import{dirname as Jc,resolve as hs}from"node:path";var fs=/^@import\s+['"](.+?)['"]\s*;/gm,Yc=Uc(import.meta.url);async function Kc(n,e){return n.startsWith("@")||!n.startsWith(".")&&!n.startsWith("/")?Yc.resolve(n):hs(e,n)}async function ds(n){let e=hs(n),t=await ps(e,"utf-8"),r=Jc(e);for(let i of t.matchAll(fs)){let o=i[0],a=i[1];if(!a)continue;let l=await Kc(a,r),p=await ps(l,"utf-8");t=t.replace(o,`${p}
620
- `)}return t.replace(fs,"").trim()}import{resolve as ys}from"node:path";import{readFile as zc}from"node:fs/promises";import{extname as Qc,resolve as Xc}from"node:path";async function yn(n){let e=Xc(n),t=await zc(e,"utf-8"),r=Qc(e).toLowerCase();if(r===".json")return JSON.parse(t);if(r===".yaml"||r===".yml")return Qe.load(t);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var wn=["color","dimension","shadow","typography"],Pe=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},bn=["background","foreground","radius","padding","shadow","typography"],xn={background:["color"],foreground:["color"],radius:["dimension"],padding:["dimension"],shadow:["shadow"],typography:["typography"]},le=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}};var Zc=/^\{([^}]+)\}$/;function Sn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function eu(n){if(!bn.includes(n))throw new le(`Unknown variant property "${n}" (expected ${bn.join(", ")})`);return n}function tu(n,e,t,r){if(typeof n!="string")throw new le(`${e}.${t}.${r} must be a token reference string like "{ui.primary}"`);let i=n.match(Zc);if(!i)throw new le(`${e}.${t}.${r} must be a token reference like "{ui.primary}", got "${n}"`);return i[1]}function nu(n,e,t){let r={};for(let[i,o]of Object.entries(t)){let a=eu(i),l=tu(o,n,e,i);r[a]={ref:l,accepts:[...xn[a]]}}return r}function Yr(n){if(!Sn(n))throw new le("Theme document must be a YAML/JSON object");let e=n.variants;if(!Sn(e))throw new le('Theme document must contain a "variants" object');let t={};for(let[r,i]of Object.entries(e)){if(!Sn(i))throw new le(`Theme variants for "${r}" must be an object`);let o={};for(let[a,l]of Object.entries(i)){if(!Sn(l))throw new le(`Theme variant "${r}.${a}" must be an object`);o[a]=nu(r,a,l)}t[r]=o}return{variants:t}}var ru=/^\{([^}]+)\}$/;function Dt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function iu(n){return`--${n.replace(/\./g,"-")}`}function ou(n,e){if(typeof n!="string"||!wn.includes(n))throw new Pe(`Token "${e}" has unsupported $type "${String(n)}" (expected ${wn.join(", ")})`);return n}function ms(n,e,t){if(Dt(n)){if("$type"in n&&"$value"in n){t.push({path:e,type:ou(n.$type,e),rawValue:n.$value});return}for(let[r,i]of Object.entries(n)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;ms(i,o,t)}}}function su(n,e){if(typeof e=="string")return e;if(n==="typography"&&Dt(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let t=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(t.length>0)return t.map(String).join(" ")}if(n==="shadow"&&Array.isArray(e))return e.map(t=>Dt(t)?`${t.offsetX??0} ${t.offsetY??0} ${t.blur??0} ${t.color??"transparent"}`:String(t)).join(", ");if(n==="shadow"&&Dt(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Pe(`Token value for "${n}" must be a string or supported object`)}function au(n){return typeof n!="string"?null:n.match(ru)?.[1]??null}function gs(n,e,t,r,i){let o=au(e);if(!o){let p=t.get(n);if(!p)throw new Pe(`Unknown token path "${n}"`);return{value:su(p.type,e)}}if(r.has(n))throw new Pe(`Circular token reference detected at "${n}"`);let a=t.get(o);if(!a)throw new Pe(`Token "${n}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(n);let l=gs(o,a.rawValue,t,r,i);return r.delete(n),i.set(o,l.value),{value:l.value,ref:o}}function Kr(n){if(!Dt(n))throw new Pe("Token document must be a YAML/JSON object");let e=[];ms(n,"",e);let t=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:a,ref:l}=gs(o.path,o.rawValue,t,new Set,r);r.set(o.path,a),i.push({path:o.path,type:o.type,value:a,cssVar:iu(o.path),ref:l})}return{entries:i}}function lu(n){return new Map(n.entries.map(e=>[e.path,e]))}function vs(n,e){let t=lu(n);for(let[r,i]of Object.entries(e.variants))for(let[o,a]of Object.entries(i))for(let[l,p]of Object.entries(a)){let c=xn[l];if(!c)throw new le(`Unknown variant property "${l}" on ${r}.${o}`);let h=t.get(p.ref);if(!h)throw new le(`${r}.${o}.${l} references unknown token "{${p.ref}}"`);if(!c.includes(h.type))throw new le(`${r}.${o}.${l} requires a ${c.join(" or ")} token, but "{${p.ref}}" is ${h.type}`)}}function zr(n,e){vs(n,e)}function Qr(n){let e=[":root {"];for(let t of n.entries)e.push(` ${t.cssVar}: ${t.value};`);return e.push("}"),e.join(`
621
- `)}function Xr(n){return n.replace(/:root\s*\{[\s\S]*?\}\s*/m,"").trim()}var cu={background:"background",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font"};function uu(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pu(n,e){let t=n.entries.find(r=>r.path===e);if(!t)throw new Error(`Token reference "${e}" not found while emitting variant CSS`);return t.cssVar}function Zr(n,e){let t=[];for(let[r,i]of Object.entries(e.variants)){let o=uu(r);for(let[a,l]of Object.entries(i)){let p=[];for(let[c,h]of Object.entries(l)){let u=cu[c],d=pu(n,h.ref);p.push(` ${u}: var(${d});`)}p.length!==0&&t.push(`.vc-${o}--${a} {
622
- ${p.join(`
552
+ `}async function nh(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:s}=await import("node:path"),o=await Ib(t,r);await i(s(e),{recursive:!0}),await n(e,o,"utf-8")}import{readFile as dg,writeFile as ai,mkdir as fC,stat as dC,unlink as pC}from"node:fs/promises";import{resolve as tt}from"node:path";import{readFile as lS,stat as uS}from"node:fs/promises";import{resolve as fS}from"node:path";import{readFile as ih}from"node:fs/promises";import{createRequire as Tb}from"node:module";import{dirname as Nb,resolve as oh}from"node:path";var sh=/^@import\s+['"](.+?)['"]\s*;/gm,Mb=Tb(import.meta.url);async function Lb(t,e){return t.startsWith("@")||!t.startsWith(".")&&!t.startsWith("/")?Mb.resolve(t):oh(e,t)}async function ah(t){let e=oh(t),r=await ih(e,"utf-8"),n=Nb(e);for(let i of r.matchAll(sh)){let s=i[0],o=i[1];if(!o)continue;let a=await Lb(o,n),l=await ih(a,"utf-8");r=r.replace(s,`${l}
553
+ `)}return r.replace(sh,"").trim()}import{resolve as ch}from"node:path";function Un(t){return t??ch(Xe(),"renderers/react/templates")}function os(){return ch(Xe(),"renderers/react/runtime")}import{readFile as jb}from"node:fs/promises";import{extname as Db,resolve as qb}from"node:path";async function as(t){let e=qb(t),r=await jb(e,"utf-8"),n=Db(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return Pt.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var cs=["color","dimension","shadow","typography","layout"],vt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},ls=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],us={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Ie=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Fr=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}};var Vb=/^\{([^}]+)\}$/;function fs(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Fb(t){if(!ls.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${ls.join(", ")})`);return t}function Hb(t,e,r,n){if(typeof t!="string")throw new Ie(`${e}.${r}.${n} must be a token reference string like "{ui.primary}"`);let i=t.match(Vb);if(!i)throw new Ie(`${e}.${r}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return i[1]}function Bb(t,e,r){let n={};for(let[i,s]of Object.entries(r)){let o=Fb(i),a=Hb(s,t,e,i);n[o]={ref:a,accepts:[...us[o]]}}return n}function Tc(t){if(!fs(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!fs(e))throw new Ie('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!fs(i))throw new Ie(`Theme variants for "${n}" must be an object`);let s={};for(let[o,a]of Object.entries(i)){if(!fs(a))throw new Ie(`Theme variant "${n}.${o}" must be an object`);s[o]=Bb(n,o,a)}r[n]=s}return{variants:r}}var Ub=/^\{([^}]+)\}$/;function Gn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Gb(t){return`--${t.replace(/\./g,"-")}`}function zb(t,e){if(typeof t!="string"||!cs.includes(t))throw new vt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${cs.join(", ")})`);return t}function lh(t,e,r){if(Gn(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:zb(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let s=e?`${e}.${n}`:n;lh(i,s,r)}}}function Wb(t,e){if(typeof e=="string")return e;if(t==="typography"&&Gn(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>Gn(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&Gn(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new vt(`Token value for "${t}" must be a string or supported object`)}function Kb(t){return typeof t!="string"?null:t.match(Ub)?.[1]??null}function uh(t,e,r,n,i){let s=Kb(e);if(!s){let l=r.get(t);if(!l)throw new vt(`Unknown token path "${t}"`);return{value:Wb(l.type,e)}}if(n.has(t))throw new vt(`Circular token reference detected at "${t}"`);let o=r.get(s);if(!o)throw new vt(`Token "${t}" references unknown token "{${s}}"`);if(i.has(s))return{value:i.get(s),ref:s};n.add(t);let a=uh(s,o.rawValue,r,n,i);return n.delete(t),i.set(s,a.value),{value:a.value,ref:s}}function Nc(t){if(!Gn(t))throw new vt("Token document must be a YAML/JSON object");let e=[];lh(t,"",e);let r=new Map(e.map(s=>[s.path,s])),n=new Map,i=[];for(let s of e){let{value:o,ref:a}=uh(s.path,s.rawValue,r,new Set,n);n.set(s.path,o),i.push({path:s.path,type:s.type,value:o,cssVar:Gb(s.path),ref:a})}return{entries:i}}function Jb(t){return new Map(t.entries.map(e=>[e.path,e]))}function fh(t,e){let r=Jb(t);for(let[n,i]of Object.entries(e.variants))for(let[s,o]of Object.entries(i))for(let[a,l]of Object.entries(o)){let u=us[a];if(!u)throw new Ie(`Unknown variant property "${a}" on ${n}.${s}`);let d=r.get(l.ref);if(!d)throw new Ie(`${n}.${s}.${a} references unknown token "{${l.ref}}"`);if(!u.includes(d.type))throw new Ie(`${n}.${s}.${a} requires a ${u.join(" or ")} token, but "{${l.ref}}" is ${d.type}`)}}function Mc(t,e){fh(t,e)}function Lc(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
554
+ `)}function jc(t){return t.replace(/:root\s*\{[\s\S]*?\}\s*/m,"").trim()}var Yb={background:"background",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"};function Xb(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Qb(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting variant CSS`);return r.cssVar}function Dc(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let s=Xb(n);for(let[o,a]of Object.entries(i)){let l=[];for(let[u,d]of Object.entries(a)){let f=Yb[u],h=Qb(t,d.ref);l.push(` ${f}: var(${h});`)}l.length!==0&&r.push(`.vc-${s}--${o} {
555
+ ${l.join(`
623
556
  `)}
624
- }`)}}return t.join(`
557
+ }`)}}return r.join(`
625
558
 
626
- `)}var fu=new Set(["Button","IconButton","Box","Text","Heading"]);function hu(n){return typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"}function du(n){if(n.variant!==void 0)return n.variant;if(n.tone!==void 0)return n.tone}function _s(n,e,t,r,i,o){let a=t.variants[n];if(!a||e===void 0||hu(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in a||i.push(`${r}: <${n}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Cn(n,e,t,r){if(n.kind==="component"){fu.has(n.name)?_s(n.name,n.props.variant,e,t,r):n.name in e.variants&&_s(n.name,du(n.props),e,t,r,{mapMutedToDefault:!0});for(let i of n.children)Cn(i,e,t,r);return}if(n.kind==="map"){Cn(n.body,e,t,r);return}if(n.kind==="fragment")for(let i of n.children)Cn(i,e,t,r)}function ei(n,e){let t=[];for(let r of n)Cn(r.root,e,r.source,t);if(t.length>0)throw new Error(`View variant validation failed:
627
- ${t.map(r=>` - ${r}`).join(`
628
- `)}`)}function kn(){return ys(ae(),"renderers/react/defaults/tokens.yaml")}function An(){return ys(ae(),"renderers/react/defaults/theme.yaml")}async function mu(n){let e=await yn(n);return Kr(e)}async function gu(n){let e=await yn(n);return Yr(e)}async function En(n,e){let t=await mu(n),r=await gu(e);return zr(t,r),{tokenIR:t,themeIR:r}}var pl=to(cl(),1);import{readFile as ch}from"node:fs/promises";import{resolve as uh}from"node:path";var ul=new Map;async function be(n,e,t){let r=uh(n,e),i=ul.get(r);if(!i){let o=await ch(r,"utf-8");i=pl.default.compile(o,{noEscape:!0}),ul.set(r,i)}return i(t)}import{resolve as fl}from"node:path";function Ji(n){return n??fl(ae(),"renderers/react/templates")}function Yi(){return fl(ae(),"renderers/react/runtime")}var dh=ae();function mh(){return W(dh,"src/generated/schema")}async function pr(n){try{return await ph(n),!0}catch{return!1}}function zi(n){return n.split("../../../src/generated/schema/").join("./schema/")}async function gh(n){let e=mh();if(!await pr(e))return;let t=W(n,"schema");await fh(e,t,{recursive:!0});for(let r of["dsl-properties.ts","dsl-enums.ts","schema-document.ts","index.ts"]){let i=W(t,r);await pr(i)&&await xe(i,zi(await St(i,"utf-8")),"utf-8")}}async function vh(n){let e=Yi(),t=zi(await St(W(e,"style.ts"),"utf-8"));await xe(W(n,"style.ts"),t,"utf-8");let r=zi(await St(W(e,"types.ts"),"utf-8"));await xe(W(n,"types.ts"),r,"utf-8")}async function _h(n,e,t,r){let i=t.design?.tokens??kn(),o=t.design?.theme??An(),{tokenIR:a,themeIR:l}=await En(i,o),p=W(Yi(),"theme.css"),c=await ds(p),h=Zr(a,l),u=`${Qr(a)}
559
+ `)}var Zb=new Set(["Button","IconButton","Box","Text","Heading"]);function eS(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function tS(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function dh(t,e,r,n,i,s){let o=r.variants[t];if(!o||e===void 0||eS(e)||typeof e!="string")return;(s?.mapMutedToDefault&&e==="muted"?"default":e)in o||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function ds(t,e,r,n){if(t.kind==="component"){Zb.has(t.name)?dh(t.name,t.props.variant,e,r,n):t.name in e.variants&&dh(t.name,tS(t.props),e,r,n,{mapMutedToDefault:!0});for(let i of t.children)ds(i,e,r,n);return}if(t.kind==="map"){ds(t.body,e,r,n);return}if(t.kind==="fragment")for(let i of t.children)ds(i,e,r,n)}function qc(t,e){let r=[];for(let n of t)ds(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
560
+ ${r.map(n=>` - ${n}`).join(`
561
+ `)}`)}var rS=/\.vc-[a-z][\w-]*/g,nS=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,iS=/\bextensionClassName\s*\(/g;function Vc(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function ph(t,e,r){let n=e.slice(0,5).map(s=>` - ${t}: ${s}`).join(`
562
+ `),i=e.length>5?`
563
+ \u2026 and ${e.length-5} more`:"";return`${r}
564
+ ${n}${i}`}function Fc(t,e){let r=Vc(t,rS);if(r.length!==0)throw new Fr(ph(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function Hc(t,e){let r=Vc(t,nS),n=Vc(t,iS),i=[...r,...n];if(i.length!==0)throw new Fr(ph(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}import{readFile as hh,stat as sS}from"node:fs/promises";import{resolve as oS}from"node:path";async function mh(t){try{return await sS(t),!0}catch{return!1}}async function zn(t,e){let r=t.design?.extensionsCss;r&&await mh(r)&&Fc(await hh(r,"utf-8"),r);let n=$e(e);for(let i of["extensions.tsx","extensions.ts"]){let s=oS(n,"src/components",i);await mh(s)&&Hc(await hh(s,"utf-8"),s)}}async function aS(t){let e=await as(t);return Nc(e)}async function cS(t){let e=await as(t);return Tc(e)}async function Hr(t,e){let r=await aS(t),n=await cS(e);return Mc(r,n),{tokenIR:r,themeIR:n}}async function dS(t){try{return await uS(t),!0}catch{return!1}}async function Bc(t,e){let r=$e(e),{tokensPath:n,themePath:i}=wr(t),{tokenIR:s,themeIR:o}=await Hr(n,i);await zn(t,e);let a=await ah(fS(os(),"theme.css")),l=jc(a),u=Dc(s,o),d=`${Lc(s)}
629
565
 
630
- ${h}
566
+ ${l}
631
567
 
632
- ${Xr(c)}`,d=t.design?.extensionsCss??W(n,"src/theme.extensions.css");await pr(d)&&(u+=`
568
+ ${u}`,f=t.design?.extensionsCss;return f&&await dS(f)&&(d+=`
633
569
 
634
- ${await St(d,"utf-8")}`);let v=await be(Ji(r),"theme.css.hbs",{themeCss:u});await xe(e,v,"utf-8");let C=W(t.generated.reactDir,"../theme");await Ki(C,{recursive:!0}),await xe(W(C,"tokens.json"),`${JSON.stringify(a,null,2)}
635
- `,"utf-8"),await xe(W(C,"theme.json"),`${JSON.stringify(l,null,2)}
636
- `,"utf-8")}async function yh(n){for(let e of["ui-components.tsx","core.ts","actionRuntime.ts","shared.tsx","shared.ts"]){let t=W(n,e);await pr(t)&&await hh(t)}}async function hl(n,e){let t=ke(n),r=e.rendererTemplatesDir?W(t,e.rendererTemplatesDir):void 0,i=Ji(r),o=W(e.generated.reactDir,"../components"),a=W(e.generated.reactDir,"../runtime"),l=W(t,"src/components");await Ki(o,{recursive:!0}),await Ki(a,{recursive:!0}),await yh(o),await gh(o),await vh(o),await xe(W(o,"style-helpers.ts"),await be(i,"style-helpers.ts.hbs",{}),"utf-8"),await xe(W(o,"index.ts"),await be(i,"components-index.ts.hbs",{}),"utf-8");for(let h of["extensions.tsx","sample-types.ts"]){let u=W(l,h),d=await St(u,"utf-8");h==="sample-types.ts"&&(d=d.replace("from './core.js'","from './types.js'")),await xe(W(o,h),d,"utf-8")}let p=W(t,"src/runtime/handlers.ts"),c=(await St(p,"utf-8")).replace(/export async function handleAppAction\(action:\s*\{[\s\S]*?\}\)/,"export async function handleAppAction(action: DispatchableAction)");await xe(W(a,"handlers.ts"),await be(i,"handlers.ts.hbs",{handlersBody:c}),"utf-8"),await _h(t,W(e.generated.reactDir,"../theme.css"),e,r),await xe(W(a,"types.ts"),await be(i,"runtime-types.ts.hbs",{}),"utf-8"),await xe(W(a,"dispatch.ts"),await be(i,"dispatch.ts.hbs",{}),"utf-8"),console.log(` components \u2192 ${o}`),console.log(` theme \u2192 ${W(e.generated.reactDir,"../theme.css")}`)}import{access as wh,writeFile as ve,mkdir as fr}from"node:fs/promises";import{resolve as pe,dirname as dl}from"node:path";async function Qi(n){try{return await wh(n),!0}catch{return!1}}var Ct={preview:5173,app:5174,built:4174},ml=`{
570
+ ${await lS(f,"utf-8")}`),d}var ag=io(sg(),1);import{readFile as iC}from"node:fs/promises";import{resolve as sC}from"node:path";var og=new Map;async function Be(t,e,r){let n=sC(t,e),i=og.get(n);if(!i){let s=await iC(n,"utf-8");i=ag.default.compile(s,{noEscape:!0}),og.set(n,i)}return i(r)}import{readFile as cg,writeFile as Zr,mkdir as lg,stat as oC,rm as aC}from"node:fs/promises";import{resolve as et}from"node:path";async function cC(t){try{return await oC(t),!0}catch{return!1}}async function lC(t){let e=et(t,"schema");await cC(e)&&await aC(e,{recursive:!0,force:!0})}async function uC(t){let e=os();await Zr(et(t,"style.ts"),await cg(et(e,"style.ts"),"utf-8"),"utf-8"),await Zr(et(t,"types.ts"),await cg(et(e,"types.ts"),"utf-8"),"utf-8")}async function ug(t,e,r){let n=$e(t),i=Un(r??(e.rendererTemplatesDir?et(n,e.rendererTemplatesDir):void 0)),s=et(e.generated.reactDir,"../components"),o=et(e.generated.reactDir,"../runtime");return await lg(s,{recursive:!0}),await lg(o,{recursive:!0}),await lC(s),await uC(s),await Zr(et(s,"style-helpers.ts"),await Be(i,"style-helpers.ts.hbs",{}),"utf-8"),await Zr(et(s,"index.ts"),await Be(i,"components-index.ts.hbs",{}),"utf-8"),await Zr(et(o,"types.ts"),await Be(i,"runtime-types.ts.hbs",{}),"utf-8"),await Zr(et(o,"dispatch.ts"),await Be(i,"dispatch.ts.hbs",{}),"utf-8"),{componentsDir:s,runtimeDir:o}}function fg(t){return t.replace(/from 'view-contracts:runtime\/dispatch'/g,"from '../runtime/dispatch.js'").replace(/from "view-contracts:runtime\/dispatch"/g,'from "../runtime/dispatch.js"').replace(/from 'view-contracts:runtime\/types'/g,"from './types.js'").replace(/from "view-contracts:runtime\/types"/g,'from "./types.js"')}async function hC(t){try{return await dC(t),!0}catch{return!1}}async function mC(t,e,r,n){let i=await Bc(r,t),s=await Be(Un(n),"theme.css.hbs",{themeCss:i});await ai(e,s,"utf-8");let{tokensPath:o,themePath:a}=wr(r),{tokenIR:l,themeIR:u}=await Hr(o,a),d=tt(r.generated.reactDir,"../theme");await fC(d,{recursive:!0}),await ai(tt(d,"tokens.json"),`${JSON.stringify(l,null,2)}
571
+ `,"utf-8"),await ai(tt(d,"theme.json"),`${JSON.stringify(u,null,2)}
572
+ `,"utf-8")}async function gC(t){for(let e of["ui-components.tsx","core.ts","actionRuntime.ts","shared.tsx","shared.ts"]){let r=tt(t,e);await hC(r)&&await pC(r)}}async function pg(t,e){let r=$e(t),n=e.rendererTemplatesDir?tt(r,e.rendererTemplatesDir):void 0,i=Un(n),s=tt(r,"src/components"),{componentsDir:o,runtimeDir:a}=await ug(t,e,n);await gC(o);for(let d of["extensions.tsx","sample-types.ts"]){let f=tt(s,d),h=await dg(f,"utf-8");d==="extensions.tsx"&&(h=fg(h)),await ai(tt(o,d),h,"utf-8")}let l=tt(r,"src/runtime/handlers.ts"),u=(await dg(l,"utf-8")).replace(/export async function handleAppAction\(action:\s*\{[\s\S]*?\}\)/,"export async function handleAppAction(action: DispatchableAction)");await ai(tt(a,"handlers.ts"),await Be(i,"handlers.ts.hbs",{handlersBody:u}),"utf-8"),await mC(t,tt(e.generated.reactDir,"../theme.css"),e,n),console.log(` components \u2192 ${o}`),console.log(` theme \u2192 ${tt(e.generated.reactDir,"../theme.css")}`)}import{access as yC,writeFile as rt,mkdir as Ys}from"node:fs/promises";import{resolve as Ue,dirname as hg}from"node:path";async function Ll(t){try{return await yC(t),!0}catch{return!1}}var en={preview:5173,app:5174,built:4174},mg=`{
637
573
  "name": "admin-dashboard",
638
574
  "private": true,
639
575
  "type": "module",
640
576
  "scripts": {
641
577
  "dev": "vite --config .vite/vite.config.ts",
642
- "dev:preview": "vite --config .vite/vite.preview.config.ts --open /.vite/preview.html",
578
+ "dev:preview": "vite --config .vite/vite.preview.config.ts --host 0.0.0.0 --open /preview.html",
643
579
  "dev:app": "vite --config .vite/vite.config.ts --open /.vite/index.html",
644
580
  "dev:both": "bash scripts/dev-both.sh",
645
581
  "check:both": "bash scripts/check-both.sh",
@@ -660,8 +596,8 @@ ${await St(d,"utf-8")}`);let v=await be(Ji(r),"theme.css.hbs",{themeCss:u});awai
660
596
  "vite": "^6.4.1"
661
597
  }
662
598
  }
663
- `,bh=`import '../src/main.tsx';
664
- `,xh=`<!doctype html>
599
+ `,vC=`import '../src/main.tsx';
600
+ `,_C=`<!doctype html>
665
601
  <html lang="en">
666
602
  <head>
667
603
  <meta charset="UTF-8" />
@@ -673,7 +609,7 @@ ${await St(d,"utf-8")}`);let v=await be(Ji(r),"theme.css.hbs",{themeCss:u});awai
673
609
  <script type="module" src="./app-main.tsx"></script>
674
610
  </body>
675
611
  </html>
676
- `,Sh=`<!doctype html>
612
+ `,wC=`<!doctype html>
677
613
  <html lang="en">
678
614
  <head>
679
615
  <meta charset="UTF-8" />
@@ -682,65 +618,76 @@ ${await St(d,"utf-8")}`);let v=await be(Ji(r),"theme.css.hbs",{themeCss:u});awai
682
618
  </head>
683
619
  <body>
684
620
  <div id="root"></div>
685
- <script type="module" src="/.vite/preview-main.tsx"></script>
621
+ <script type="module" src="./preview-main.tsx"></script>
686
622
  </body>
687
623
  </html>
688
- `,Ch=`import '../views/preview.entry.tsx';
689
- `,kh=`/** Auto-generated preview component barrel \u2014 DO NOT EDIT */
690
- export * from '../../../src/generated/preview/vocabulary.js';
691
- export {
692
- commonStyle,
693
- isHidden,
694
- toneClass,
695
- mapAlign,
696
- mapJustify,
697
- registerPreviewActions,
698
- clearPreviewActions,
699
- dispatchPreviewAction,
700
- } from '../../../renderers/react/runtime/index.js';
701
- export * from '../src/components/extensions.js';
702
- `;function Ah(n){let t=n.views.filter(o=>o.targets.includes("react"))[0];if(!t)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let r=t.screenName,i=`${r.charAt(0).toLowerCase()}${r.slice(1)}Mock`;return`import React from 'react';
624
+ `;function bC(t){let r=t.views.filter(s=>s.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold preview entry.");let n=r.screenName,i=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
625
+ import ReactDOM from 'react-dom/client';
626
+ import 'view-contracts:theme.css';
627
+ import { ${n} } from 'view-contracts:screen/${n}.tsx';
628
+ import { ${i} } from 'view-contracts:preview/mock/${n}';
629
+ import { registerActionHandler } from 'view-contracts:runtime/dispatch';
630
+
631
+ registerActionHandler(async (action) => {
632
+ alert(\`[preview] \${action.name}: \${JSON.stringify(action.params ?? {})}\`);
633
+ });
634
+
635
+ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
636
+ <React.StrictMode>
637
+ <${n} vm={${i}} />
638
+ </React.StrictMode>,
639
+ );
640
+ `}function SC(t){let r=t.views.filter(o=>o.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let n=r.screenName,i=r.viewModel,s=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
703
641
  import ReactDOM from 'react-dom/client';
704
642
  import '../generated/theme.css';
705
- import { ${r} } from '../generated/react/${r}.generated';
706
- import { ${i} } from '../generated/mock';
643
+ import type { ${i} } from '../contracts/view-models';
644
+ import { ${n} } from '../generated/react/${n}.generated';
645
+ import { ${s} } from 'view-contracts:preview/mock/${n}';
707
646
  import { registerActionHandler } from '../generated/runtime/dispatch';
708
647
  import { handleAppAction } from '../generated/runtime/handlers';
709
648
 
710
649
  registerActionHandler(handleAppAction);
711
650
 
651
+ /** Example bootstrap only \u2014 production loads ViewModels from the API (operationId in view-bindings). */
652
+ const vm = ${s} as ${i};
653
+
712
654
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
713
655
  <React.StrictMode>
714
- <${r} vm={${i}} />
656
+ <${n} vm={vm} />
715
657
  </React.StrictMode>,
716
658
  );
717
- `}var Eh=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
659
+ `}var EC=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
718
660
  import type { DispatchableAction } from './types.js';
719
661
 
720
662
  export async function handleAppAction(action: DispatchableAction): Promise<void> {
721
663
  console.log('[app action]', action);
722
664
  }
723
- `;function Oh(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
724
- export const PREVIEW_PORT = ${Ct.preview};
725
- export const APP_PORT = ${Ct.app};
726
- export const BUILT_PORT = ${Ct.built};
727
- `}function Ph(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
728
- PREVIEW_PORT=${Ct.preview}
729
- APP_PORT=${Ct.app}
730
- BUILT_PORT=${Ct.built}
731
- `}function Ih(){return`import { defineConfig } from 'vite';
665
+ `;function $C(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
666
+ export const PREVIEW_PORT = ${en.preview};
667
+ export const APP_PORT = ${en.app};
668
+ export const BUILT_PORT = ${en.built};
669
+ `}function CC(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
670
+ PREVIEW_PORT=${en.preview}
671
+ APP_PORT=${en.app}
672
+ BUILT_PORT=${en.built}
673
+ `}function kC(){return`import { defineConfig } from 'vite';
732
674
  import react from '@vitejs/plugin-react';
733
675
  import path from 'node:path';
734
676
  import { fileURLToPath } from 'node:url';
735
677
  import { APP_PORT, BUILT_PORT } from '../dev.ports.js';
678
+ import { viewContractsPreviewMockPlugin } from '../../../src/preview/vitePlugin.ts';
736
679
 
737
680
  const viteDir = path.dirname(fileURLToPath(import.meta.url));
738
681
  const exampleRoot = path.resolve(viteDir, '..');
682
+ const configPath = path.resolve(exampleRoot, 'view-contracts.config.yaml');
739
683
 
740
- /** Standalone app \u2014 src/main.tsx imports generated/ only. */
684
+ /** Standalone example app \u2014 generated/ UI; sample VM from views/preview/*.mock.yaml only. */
741
685
  export default defineConfig({
742
686
  root: viteDir,
743
- plugins: [react()],
687
+ plugins: [
688
+ viewContractsPreviewMockPlugin({ configPath }),
689
+ react(),
690
+ ],
744
691
  server: {
745
692
  port: APP_PORT,
746
693
  strictPort: true,
@@ -760,54 +707,48 @@ export default defineConfig({
760
707
  },
761
708
  },
762
709
  });
763
- `}function Th(){return`import path from 'node:path';
710
+ `}function xC(){return`import path from 'node:path';
764
711
  import { defineConfig } from 'vite';
765
712
  import react from '@vitejs/plugin-react';
766
713
  import { fileURLToPath } from 'node:url';
767
714
  import { PREVIEW_PORT } from '../dev.ports.js';
715
+ import { viewContractsPreviewPlugin, viewContractsPreviewMockPlugin, previewRuntimeAliases } from '../../../src/preview/vitePlugin.ts';
768
716
 
769
717
  const viteDir = path.dirname(fileURLToPath(import.meta.url));
770
718
  const projectRoot = path.resolve(viteDir, '..');
771
719
  const repoRoot = path.resolve(projectRoot, '../..');
720
+ const configPath = path.resolve(projectRoot, 'view-contracts.config.yaml');
772
721
 
773
- /** Preview only \u2014 views/ + view-contracts toolchain. No generated/ or app src/. */
722
+ /** Preview \u2014 views/ DSL compiled live (same lowering as build; does not read generated/). */
774
723
  export default defineConfig({
775
- root: projectRoot,
776
- plugins: [react()],
724
+ root: viteDir,
725
+ plugins: [
726
+ viewContractsPreviewPlugin({ configPath }),
727
+ viewContractsPreviewMockPlugin({ configPath }),
728
+ react(),
729
+ ],
777
730
  resolve: {
778
- alias: [
779
- {
780
- find: '@view-contracts/preview/fixtures/admin-dashboard',
781
- replacement: path.join(repoRoot, 'src/preview/fixtures/admin-dashboard.ts'),
782
- },
783
- { find: '@view-contracts/core', replacement: path.join(repoRoot, 'packages/core/src/index.ts') },
784
- { find: '@view-contracts/runtime', replacement: path.join(repoRoot, 'packages/runtime/src/index.ts') },
785
- { find: '@view-contracts/components', replacement: path.join(viteDir, 'preview-components.ts') },
786
- { find: '@view-contracts/theme', replacement: path.join(projectRoot, 'generated/theme.css') },
787
- { find: '@view-contracts/preview', replacement: path.join(repoRoot, 'src/preview/index.ts') },
788
- ],
731
+ alias: previewRuntimeAliases(projectRoot, repoRoot),
789
732
  },
790
733
  server: {
791
734
  port: PREVIEW_PORT,
792
735
  strictPort: true,
793
736
  fs: {
794
- allow: [projectRoot, repoRoot],
737
+ allow: [viteDir, projectRoot, repoRoot],
795
738
  },
796
739
  },
797
740
  build: {
798
741
  outDir: path.resolve(projectRoot, 'dist/preview'),
799
742
  emptyOutDir: true,
800
743
  rollupOptions: {
801
- input: {
802
- preview: path.resolve(viteDir, 'preview.html'),
803
- },
744
+ input: path.resolve(viteDir, 'preview.html'),
804
745
  },
805
746
  },
806
747
  });
807
- `}async function gl(n,e,t){let r=ke(n),i=pe(r,".vite");await fr(i,{recursive:!0});let o=pe(r,"package.json");await Qi(o)?await ve(o,`${ml}
808
- `,"utf-8"):await ve(o,`${ml}
809
- `,"utf-8"),await ve(pe(i,"index.html"),xh,"utf-8"),await ve(pe(i,"preview.html"),Sh,"utf-8"),await ve(pe(i,"preview-main.tsx"),Ch,"utf-8"),await ve(pe(i,"app-main.tsx"),bh,"utf-8"),await ve(pe(i,"preview-components.ts"),kh,"utf-8"),await ve(pe(i,"vite.config.ts"),Ih(),"utf-8"),await ve(pe(i,"vite.preview.config.ts"),Th(),"utf-8"),await ve(pe(r,"dev.ports.ts"),Oh(),"utf-8");let a=pe(r,"scripts");await fr(a,{recursive:!0}),await ve(pe(a,"ports.sh"),Ph(),"utf-8");let l=pe(r,"src/main.tsx");await Qi(l)||(await fr(dl(l),{recursive:!0}),await ve(l,Ah(t),"utf-8"));let p=pe(r,"src/runtime/handlers.ts");await Qi(p)||(await fr(dl(p),{recursive:!0}),await ve(p,Eh,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}import{mkdir as vl,writeFile as hr}from"node:fs/promises";import{relative as _l,resolve as Ee}from"node:path";function yl(){return Ee(ae(),"renderers/swiftui/templates")}function wl(){return Ee(ae(),"renderers/compose/templates")}async function bl(n,e,t){let r=ke(n),i=Ee(e.generated.reactDir,"../theme"),o=_l(r,Ee(i,"theme.json")).replace(/\\/g,"/"),a=_l(r,Ee(i,"tokens.json")).replace(/\\/g,"/"),l=Ee(e.generated.reactDir,"../swiftui"),p=Ee(e.generated.reactDir,"../compose");await vl(l,{recursive:!0}),await vl(p,{recursive:!0});let c={themeJsonPath:o,tokensJsonPath:a};await hr(Ee(l,"VcTheme.swift"),await be(yl(),"VcTheme.swift.hbs",c),"utf-8"),await hr(Ee(p,"VcTheme.kt"),await be(wl(),"VcTheme.kt.hbs",{...c,packageName:"generated.compose"}),"utf-8");for(let h of t.views){if(h.targets.includes("swiftui")){let u=Ee(l,`${h.screenName}.swift`);await hr(u,await be(yl(),"Screen.swift.hbs",{...c,screenName:h.screenName}),"utf-8"),console.log(` swiftui \u2192 ${u}`)}if(h.targets.includes("compose")){let u=Ee(p,`${h.screenName}Screen.kt`);await hr(u,await be(wl(),"Screen.kt.hbs",{...c,screenName:h.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${u}`)}}console.log(` native theme hooks \u2192 ${l}/VcTheme.swift, ${p}/VcTheme.kt`)}async function xl(n){await new Promise((e,t)=>{let r=Al("npx",["micro-contracts",...n],{stdio:"inherit"});r.on("error",t),r.on("close",i=>{i===0?e():t(new Error(`micro-contracts exited with code ${i}`))})})}async function Mh(n){await new Promise((e,t)=>{let r=Al("npx",["tsx",...n],{stdio:"inherit"});r.on("error",t),r.on("close",i=>{i===0?e():t(new Error(`catalog build exited with code ${i}`))})})}async function Xi(n){let e=await Xe(n),t=await Lt(e.bindings),r=ke(n),i=await Oo(t.views.map(o=>({sourcePath:ot(r,o.source),exportName:o.exportName,screenName:o.screenName})),{allowlistExtra:e.allowlistExtra});return new Map(t.views.map((o,a)=>[o.screenName,i[a]]))}async function Sl(n,e){let t=await Xe(n),r=await Lt(t.bindings);for(let i of r.views){if(!i.targets.includes("react"))continue;let o=e.get(i.screenName);if(!o)throw new Error(`Missing View IR for ${i.screenName}`);let a=Ko(t,i),l=zo(n,t,a);await us(o,a,{componentsImportFrom:l,allowlistExtra:t.allowlistExtra}),console.log(` ${i.exportName} \u2192 ${a}`)}}async function Cl(n){let e=await Xe(n),t=await Lt(e.bindings),r=ke(n),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Qo(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let a of t.views)o.push(` ${a.screenConst}: {`),o.push(` id: ${JSON.stringify(a.id)},`),o.push(` screenId: ${JSON.stringify(a.screenId)},`),o.push(` screenName: ${JSON.stringify(a.screenName)},`),o.push(` route: ${JSON.stringify(a.route)},`),o.push(` operationId: ${JSON.stringify(a.operationId)},`),o.push(` viewModel: ${JSON.stringify(a.viewModel)},`),o.push(` source: ${JSON.stringify(a.source)},`),o.push(` targets: ${JSON.stringify(a.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await Lh(kl(ot(e.generated.bridge)),{recursive:!0}),await Rh(ot(e.generated.bridge),o.join(`
810
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${t.views.length} view(s))`)}var El={compile:async(n,e)=>{let t=await Xi(await We(n.config));console.log(`Compiled ${t.size} view(s) to View IR (in-memory)`)},renderReact:async(n,e)=>{let t=await We(n.config),r=await Xi(t);await Sl(t,r)},renderBridge:async(n,e)=>{await Cl(await We(n.config))},build:async(n,e)=>{let t=await We(n.config),r=await Xe(t),i=await Lt(r.bindings),o=await Xi(t);console.log(`Compiled ${o.size} view(s) to View IR (in-memory)`);let a=r.design?.tokens??kn(),l=r.design?.theme??An(),{themeIR:p}=await En(a,l);ei(o.values(),p),await hl(t,r),await Sl(t,o),await Cl(t),await bl(t,r,i),await gl(t,r,i)},contractsGenerate:async(n,e)=>{let t=await Xe(await We(n.config));await xl(["generate","-c",t.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(n,e)=>{let t=await Xe(await We(n.config));await xl(["lint","-c",t.microContractsConfig])},catalogBuild:async(n,e)=>{let t=await We(n.config),r=ke(t),i=n.output?ot(String(n.output)):ot(r,"dist/catalog.html"),o=ot(r,"tsconfig.catalog.json"),{existsSync:a}=await import("node:fs");if(!a(o))throw new Error(`Missing ${o}. Add tsconfig.catalog.json with @view-contracts/components paths for catalog SSR.`);let l=ot(kl(Nh(import.meta.url)),"../catalog/run.ts");await Mh(["--tsconfig",o,l,i,t]),console.log(`Catalog \u2192 ${i}`)}};var Dh={version:"0.3.0"};yo(El,Dh.version).parseAsync(process.argv).catch(n=>{console.error(n instanceof Error?n.message:n),process.exit(1)});
748
+ `}async function gg(t,e,r){let n=$e(t),i=Ue(n,".vite");await Ys(i,{recursive:!0});let s=Ue(n,"package.json");await Ll(s)?await rt(s,`${mg}
749
+ `,"utf-8"):await rt(s,`${mg}
750
+ `,"utf-8"),await rt(Ue(i,"index.html"),_C,"utf-8"),await rt(Ue(i,"preview.html"),wC,"utf-8"),await rt(Ue(i,"preview-main.tsx"),bC(r),"utf-8"),await rt(Ue(i,"app-main.tsx"),vC,"utf-8"),await rt(Ue(i,"vite.config.ts"),kC(),"utf-8"),await rt(Ue(i,"vite.preview.config.ts"),xC(),"utf-8"),await rt(Ue(n,"dev.ports.ts"),$C(),"utf-8");let o=Ue(n,"scripts");await Ys(o,{recursive:!0}),await rt(Ue(o,"ports.sh"),CC(),"utf-8");let a=Ue(n,"src/main.tsx");await Ll(a)||(await Ys(hg(a),{recursive:!0}),await rt(a,SC(r),"utf-8"));let l=Ue(n,"src/runtime/handlers.ts");await Ll(l)||(await Ys(hg(l),{recursive:!0}),await rt(l,EC,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}import{mkdir as yg,writeFile as Xs}from"node:fs/promises";import{relative as vg,resolve as pt}from"node:path";function _g(){return pt(Xe(),"renderers/swiftui/templates")}function wg(){return pt(Xe(),"renderers/compose/templates")}async function bg(t,e,r){let n=$e(t),i=pt(e.generated.reactDir,"../theme"),s=vg(n,pt(i,"theme.json")).replace(/\\/g,"/"),o=vg(n,pt(i,"tokens.json")).replace(/\\/g,"/"),a=pt(e.generated.reactDir,"../swiftui"),l=pt(e.generated.reactDir,"../compose");await yg(a,{recursive:!0}),await yg(l,{recursive:!0});let u={themeJsonPath:s,tokensJsonPath:o};await Xs(pt(a,"VcTheme.swift"),await Be(_g(),"VcTheme.swift.hbs",u),"utf-8"),await Xs(pt(l,"VcTheme.kt"),await Be(wg(),"VcTheme.kt.hbs",{...u,packageName:"generated.compose"}),"utf-8");for(let d of r.views){if(d.targets.includes("swiftui")){let f=pt(a,`${d.screenName}.swift`);await Xs(f,await Be(_g(),"Screen.swift.hbs",{...u,screenName:d.screenName}),"utf-8"),console.log(` swiftui \u2192 ${f}`)}if(d.targets.includes("compose")){let f=pt(l,`${d.screenName}Screen.kt`);await Xs(f,await Be(wg(),"Screen.kt.hbs",{...u,screenName:d.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${f}`)}}console.log(` native theme hooks \u2192 ${a}/VcTheme.swift, ${l}/VcTheme.kt`)}async function Cg(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Hp(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Sg(t){await new Promise((e,r)=>{let n=RC("npx",["micro-contracts",...t],{stdio:"inherit"});n.on("error",r),n.on("close",i=>{i===0?e():r(new Error(`micro-contracts exited with code ${i}`))})})}async function jl(t){let e=await Jt(t),r=await un(e.bindings),{extensionRegistry:n,allowlistExtra:i}=await Cg(e),s=$e(t),o=await pu(r.views.map(a=>({sourcePath:Dl(s,a.source),exportName:a.exportName,screenName:a.screenName})),{allowlistExtra:i,extensionRegistry:n});return new Map(r.views.map((a,l)=>[a.screenName,o[l]]))}async function Eg(t,e){let r=await Jt(t),{allowlistExtra:n}=await Cg(r),i=await un(r.bindings);for(let s of i.views){if(!s.targets.includes("react"))continue;let o=e.get(s.screenName);if(!o)throw new Error(`Missing View IR for ${s.screenName}`);let a=Nu(r,s),l=Mu(t,r,a);await nh(o,a,{componentsImportFrom:l,allowlistExtra:n}),console.log(` ${s.exportName} \u2192 ${a}`)}}async function $g(t){let e=await Jt(t),r=await un(e.bindings),n=$e(t),s=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${Lu(n,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let o of r.views)s.push(` ${o.screenConst}: {`),s.push(` id: ${JSON.stringify(o.id)},`),s.push(` screenId: ${JSON.stringify(o.screenId)},`),s.push(` screenName: ${JSON.stringify(o.screenName)},`),s.push(` route: ${JSON.stringify(o.route)},`),s.push(` operationId: ${JSON.stringify(o.operationId)},`),s.push(` viewModel: ${JSON.stringify(o.viewModel)},`),s.push(` source: ${JSON.stringify(o.source)},`),s.push(` targets: ${JSON.stringify(o.targets)},`),s.push(" },");s.push("} as const;",""),s.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await OC(AC(Dl(e.generated.bridge)),{recursive:!0}),await PC(Dl(e.generated.bridge),s.join(`
751
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${r.views.length} view(s))`)}var kg={compile:async(t,e)=>{let r=await jl(await Kt(t.config));console.log(`Compiled ${r.size} view(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let r=await Kt(t.config),n=await jl(r);await Eg(r,n)},renderBridge:async(t,e)=>{await $g(await Kt(t.config))},build:async(t,e)=>{let r=await Kt(t.config),n=await Jt(r),i=await un(n.bindings),s=await jl(r);console.log(`Compiled ${s.size} view(s) to View IR (in-memory)`);let{tokensPath:o,themePath:a}=wr(n),{themeIR:l}=await Hr(o,a);await zn(n,r),qc(s.values(),l),await pg(r,n),await Eg(r,s),await $g(r),await bg(r,n,i),await gg(r,n,i)},contractsGenerate:async(t,e)=>{let r=await Jt(await Kt(t.config));await Sg(["generate","-c",r.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let r=await Jt(await Kt(t.config));await Sg(["lint","-c",r.microContractsConfig])}};var IC={version:"0.3.3"};nu(kg,IC.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
811
752
  /*! Bundled license information:
812
753
 
813
754
  js-yaml/dist/js-yaml.mjs: